Files
inter-hub/.ghci-core
Bernd Worsch 64a9d4eeb4 feat(WP-0016/C1-C4): Layer 2 isolation and clean-base infrastructure
- Add Web/Controller/Prelude.hs (was missing; 8 controllers failed to import it)
- Add .ghci-core and scripts/compile-check-core to compile Layer 1+2 in
  isolation without loading Main.hs or any controller/view (Layer 3)
- Fix Application/Helper/BottleneckDetector.hs: replace coerce :: Id' -> UUID
  with unpackId (IHP Id' wraps a type family; Data.Coerce cannot cross it)
- Fix devenv.nix: add pkgs.nodePackages.tailwindcss so devenv process scripts
  find the tailwindcss binary (devenv v2 builds scripts with only local packages)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 15:38:01 +00:00

85 lines
2.6 KiB
Plaintext

-- .ghci-core — loads ONLY Layer 1 (Generated.Types, Web.Types) and Layer 2
-- (Application/Helper/*) for independent compilation verification.
--
-- Usage (inside devenv shell):
-- ghci -ghci-script .ghci-core
-- or:
-- ghcid --command "ghci -ghci-script .ghci-core"
--
-- This file intentionally does NOT load Main.hs or any Web/Controller / Web/View
-- modules. Once this reaches "Ok, N modules loaded" with no errors, the core
-- layer is verified clean and Layer 3 errors are isolated to controllers/views.
-- NOTE: we do NOT use :loadFromIHP applicationGhciConfig here because it ends
-- with ":l Main.hs" which would load all of Layer 3. Instead we duplicate
-- the environment flags from applicationGhciConfig and load only core modules.
:set -i.
:set -iIHP/ihp-hsx
:set -iConfig
:set -ibuild
:set -iIHP
:set -XOverloadedStrings
:set -XNoImplicitPrelude
:set -XImplicitParams
:set -XRank2Types
:set -XDisambiguateRecordFields
:set -XNamedFieldPuns
:set -XDuplicateRecordFields
:set -XOverloadedLabels
:set -XFlexibleContexts
:set -XTypeSynonymInstances
:set -XFlexibleInstances
:set -XQuasiQuotes
:set -XTypeFamilies
:set -XPackageImports
:set -XScopedTypeVariables
:set -XRecordWildCards
:set -XTypeApplications
:set -XDataKinds
:set -XInstanceSigs
:set -XDeriveGeneric
:set -XMultiParamTypeClasses
:set -XTypeOperators
:set -XUndecidableInstances
:set -Wno-unsafe -Wno-name-shadowing -Wno-monomorphism-restriction -Wno-safe -Wno-missing-local-signatures -Wno-missing-home-modules
:set -XDeriveDataTypeable
:set -XLambdaCase
:set -XDefaultSignatures
:set -XEmptyDataDeriving
:set -XBangPatterns
:set -XBlockArguments
:set -XMultiWayIf
:set -XFunctionalDependencies
:set -package ihp
:set -fbyte-code
:set -j1
:set -fkeep-going
:set -Wno-partial-type-signatures
:set -XPartialTypeSignatures
:set -XStandaloneDeriving
:set -XDerivingVia
:set -XTemplateHaskell
:set -XDeepSubsumption
:set -XOverloadedRecordDot
:set -Werror=missing-fields
:set -fwarn-incomplete-patterns
:set -package ghc
:set -fno-warn-ambiguous-fields
-- Layer 1: generated types and Web.Types
:load build/Generated/Types.hs Web/Types.hs Web/Routes.hs
-- Layer 2: helpers (order matters — imports within Layer 2 must be satisfied)
:add Application/Helper/View.hs
:add Application/Helper/Controller.hs
:add Application/Helper/TypeRegistry.hs
:add Application/Helper/ModelRouter.hs
:add Application/Helper/RoutingEngine.hs
:add Application/Helper/FrictionScore.hs
:add Application/Helper/BottleneckDetector.hs
:add Application/Helper/HubHealth.hs
:add Application/Helper/CorrelationEngine.hs
:add Application/Helper/CrossHubPropagation.hs
:add Application/Helper/AgentBridge.hs
:add Application/Helper/ApiRateLimit.hs