added field names for DU cases #509
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While working with
FSharp.Compiler.Serviceto build features for VFPT and FSAC the lack of fieldnames has added a lot of friction to the development process. The are many cases where the type signature is not enough to understand what the field in a DU case are used for or represent, so I've added field names based on the comments in the source file.WIP, but a review and some guidance are necessary before more progress can be made.
Naming Conventions Employed
<>IdentLongIdentLongIdentWithDotsSynAttributesPreXmlDocSynAccess optionSynConstSynTyparSynMemberSigSynTypeConstraint listSynUnionCaseSynValSigMemberFlagsSynMemberSigsSynValTyparDecls,SynTyparDeclsSynBindingListSynModuleDeclSynModuleSigDeclSynTypeDefnParsedHashDirectiveSynExceptionReprSynExceptionSigSynTypeDefnSigSequencePointInfoForTargetSynFieldQuestionable Naming Conventions
SynTypeSynMemberDefnsChanges From Inconsistent Comment Naming Conventions
Types Without A Naming Convention
SynPatSynValInfoSynTyparSynTypeDefnKindSynTypeDefnSimpleReprSynTypeDefnSigReprSynModuleOrNamespaceSynModuleOrNamespaceSigSynComponentInfoSynModuleSigDeclsParsedImplFileFragment listParsedSigFileFragment listConvention Questions :
Regarding Underlying Type Information
idis used for bothIdent&Ident option)Should the field names for options have an 'Opt' suffix? (
idOpt)SynModuleSigDeclshave aListsuffix to indicate the underlying type?| Ident of Ident)Unclear on
intinArrayln 425SynType * SynTypeinStaticConstantNamedln 446Recordln 500boolinForln 515bool * rangeinMatchLambdaln 537(bool * bool)inYieldOrReturnln 661(bool * bool)inYieldOrReturnFromln 666SynPats inSynPatln 944-971Ident * Ident * Ident optionrepresent inInstanceMemberln 968SynPat * SynExpr option * SynExprepresent inClauseln 1003SynValData&SynBindingReturnInfo optionrepresent inBindingln 1045 - 1047bools inGeneralln 1128boolinSynValSigln 1232boolinSynValTyparDeclsln 1261string * string listinParsedHashDirectiveln 1406boolinNamespaceFragmentln 1412LexerWhitespaceContinuationln 2061-2073Once
ast.fsis finished I'll add union case field names totast.fs