moonlight-pale-0.1.0.0: src-ghc-surface/Moonlight/Pale/Ghc/Expr.hs
{-| Scoped Haskell expression syntax, conversion, equivalence, and rendering. -}
module Moonlight.Pale.Ghc.Expr
( HsVarRef (..),
BinderAnn (..),
HsOpaqueTag (..),
HsPatOpaqueTag (..),
HsRecPatFieldValue (..),
HsRecPatItem (..),
HsPatF (..),
patBinders,
traversePatBinders,
LetRecursion (..),
FixityAssociativity (..),
FixityDeclaration (..),
TypeSignature (..),
ExactIntegral,
exactIntegralSource,
exactIntegralNegative,
exactIntegralValue,
exactIntegralToInteger,
exactIntegralFromInteger,
ExactFractional,
exactFractionalSource,
exactFractionalNegative,
exactFractionalSignificand,
exactFractionalExponent,
exactFractionalBase,
exactFractionalToRational,
exactFractionalFromRational,
ScopeId,
ScopeIdFailure (..),
ScopeCtx (..),
ScopeIndex,
ScopeIndexFailure (..),
ScopeLookupFailure (..),
FreeScopeSummary,
mkScopeId,
scopeIdKey,
rootScopeId,
mkScopeIndex,
scopeIndexRoot,
scopeParentId,
scopeDepthOf,
scopeIsAncestorOf,
scopeComparable,
scopeLca,
scopeCtxLeq,
scopeCtxMeet,
scopeCtxJoin,
scopeObservedCount,
scopeObservedContexts,
scopeTopCtx,
scopeBottomCtx,
binderIntroScope,
binderSiteScope,
emptyFreeScopeSummary,
singletonFreeScopeSummary,
mergeFreeScopeSummary,
mergeFreeScopeSummaryBy,
mergeFreeScopeSummaryByEither,
deleteFreeScopeSummary,
freeScopeSummaryContains,
freeScopeSummarySize,
freeScopeSummaryToList,
freeScopeSupportAnchor,
NormalizedLit (..),
normalizeHsLit,
NormalizedOverLit (..),
normalizeHsOverLit,
NormalizedFieldLabel (..),
normalizeFieldLabel,
NormalizedTypeText (..),
NormalizedArithSeq (..),
TupleBoxity (..),
TupleSlot (..),
HsExprF (..),
HsStmtF (..),
HsGuardStmtF (..),
GuardedAltF (..),
Expr,
exprRegion,
exprScope,
exprFreeScopes,
exprNode,
eraseExpr,
HsExprTag (..),
TagSignature (..),
tagSignatureFromTag,
tagSignatureMember,
SourceRegion (..),
SourceCharRange,
SourceEndConvention (..),
SourceRangeFailure (..),
sourceRegionFromSrcSpan,
sourceRegionFromRealSrcSpan,
sourceCharRangeStart,
sourceCharRangeEnd,
sourceCharRangeFromOffsets,
sourceRegionCharRange,
sourceRegionCharRangeWith,
sourceCharRangeRegion,
sourceCharRangeRegionWith,
sourceCharRangeText,
Binding (..),
Clause (..),
Rhs (..),
BindingGroup,
bindingGroupScope,
bindingGroupComponents,
bindingGroupBindings,
BindingComponent,
bindingComponentRows,
bindingComponentBinders,
bindingComponentDependencies,
bindingComponentRecursion,
BindingComponentRecursion (..),
bindingExpr,
bindingPattern,
bindingNames,
RecordFieldEnvironment,
emptyRecordFieldEnvironment,
recordFieldEnvironmentFromDefinitions,
ConvertedValueBinding,
tlbBinding,
tlbScope,
tlbRegion,
ConvertedInstanceDeclaration (..),
InstanceMethodSection (..),
ConvertedBindingOrigin (..),
ConvertedBindingSite (..),
ModuleDeclaration (..),
ConvertedModule (..),
convertedModuleBindings,
convertedModuleBindingSites,
convertedModuleInstanceMethodObstructions,
convertedModuleTypeSignatures,
convertedModuleFixityDeclarations,
ConvertedModuleMetrics (..),
UnsupportedDeclarationTag (..),
InstanceMethodObstructionCause (..),
InstanceMethodObstruction (..),
RecordWildcardResolutionFailure (..),
ConvertObstruction (..),
recoverableInstanceMethodObstruction,
convertHsExpr,
convertModule,
convertModuleWithRecordFieldEnvironment,
convertHaskellSource,
convertHaskellSourceWithRecordFieldEnvironment,
convertedModuleMetrics,
hsOpaqueTagName,
hsPatOpaqueTagName,
LayoutPolicy (..),
PageWidth,
defaultPageWidth,
mkPageWidth,
ModuleRenderContext (..),
RenderTarget (..),
RenderRefusal (..),
renderSource,
renderRdrName,
renderRoundTripEquivalent,
renderRoundTripGuardStatementsEquivalent,
)
where
import Moonlight.Pale.Ghc.Expr.Convert.Coalgebra
import Moonlight.Pale.Ghc.Expr.Convert.Metrics
import Moonlight.Pale.Ghc.Expr.Equivalence
( renderRoundTripGuardStatementsEquivalent,
)
import Moonlight.Pale.Ghc.Expr.NameRender (renderRdrName)
import Moonlight.Pale.Ghc.Expr.Opaque
import Moonlight.Pale.Ghc.Expr.Render
import Moonlight.Pale.Ghc.Expr.Scope
import Moonlight.Pale.Ghc.Expr.Syntax