Documentation ¶
Overview ¶
In this package, functions prefixed with "parse" usually parse from text to S-expression, and functions prefixed with "decode" usually parse an S-expression into a meaningful type
Index ¶
- func NewLanguage() language.Language
- type AutoModules
- type Choice
- type Codept
- type CodeptDep
- type CodeptLocal
- type CodeptSource
- type Component
- type ComponentKind
- type ComponentName
- type ComponentSlice
- type ComponentSources
- type ComponentSpec
- type ConcreteModules
- type Config
- type Deps
- type DuneComponent
- type DuneComponentCore
- type DuneConfig
- type DuneLibDep
- type DuneLibOpam
- type DuneLibSelect
- type ExcludeModules
- type ExeKind
- type ExePlain
- type ExePpx
- type ExeSpec
- type Executable
- type Generator
- type KeyValue
- type KindSpec
- type Lexer
- type LibNs
- type LibNsPpx
- type LibPlain
- type LibPpx
- type LibSpec
- type Library
- type LibraryKind
- type ModuleAlt
- type ModuleChoice
- type ModuleSpec
- type NoGenerator
- type NoPpx
- type Package
- type PackageSpec
- type PpxDirect
- type PpxKind
- type PpxTransitive
- type ResolvedLocal
- type ResolvedOpam
- type RuleResult
- type SexpComponent
- type SexpEmpty
- type SexpError
- type SexpList
- type SexpMap
- type SexpNode
- type SexpString
- type Source
- type SourceSet
- type SourceSetSlice
- type SourceSlice
- type SourcesSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AutoModules ¶
type AutoModules struct{}
AutoModules implements ModuleSpec Either `:standard` or unspecified Note: limitation: a `modules` stanza can contain both `:standard` and concrete modules
type Codept ¶
type Codept struct { Dependencies []CodeptDep Local []CodeptLocal }
type CodeptLocal ¶
type CodeptSource ¶
type CodeptSource struct {
// contains filtered or unexported fields
}
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
TODO store stuff like auto, exclude in annotations
type ComponentKind ¶
type ComponentKind interface {
// contains filtered or unexported methods
}
type ComponentName ¶
type ComponentName struct {
// contains filtered or unexported fields
}
type ComponentSlice ¶
type ComponentSlice []Component
func (ComponentSlice) Len ¶
func (s ComponentSlice) Len() int
func (ComponentSlice) Less ¶
func (s ComponentSlice) Less(i, j int) bool
func (ComponentSlice) Sort ¶
func (s ComponentSlice) Sort()
func (ComponentSlice) Swap ¶
func (s ComponentSlice) Swap(i, j int)
type ComponentSources ¶
type ComponentSources struct {
// contains filtered or unexported fields
}
type ComponentSpec ¶
type ComponentSpec struct {
// contains filtered or unexported fields
}
Executable | Library | Test
type ConcreteModules ¶
type ConcreteModules struct {
// contains filtered or unexported fields
}
ConcreteModules implements ModuleSpec
type Deps ¶
func Dependencies ¶
Here "dependencies" means "OCaml modules", not Libraries or Opam deps, based on Codept. Example codept command:
`codept -native -deps /home/sir4ur0n/code/qcheck/src/core/*.{ml,mli}`
Output:
{ "version" : [0, 11, 0], "dependencies" : [{ "file" : "/home/sir4ur0n/code/qcheck/src/core/QCheck.mli", "deps" : [["Random"], ["QCheck2"], ["Hashtbl"], ["Format"]] }, { "file" : "/home/sir4ur0n/code/qcheck/src/core/QCheck2.mli", "deps" : [["Seq"], ["Random"], ["Hashtbl"], ["Format"]] }, { "file" : "/home/sir4ur0n/code/qcheck/src/core/QCheck.ml", "deps" : [["Sys"], ["String"], ["Set"], ["Random"], ["Queue"], ["QCheck2"], ["Printf"], ["Obj"], ["List"], ["Int64"], ["Int32"], ["Int"], ["Hashtbl"], ["Char"], ["Bytes"], ["Buffer"], ["Array"]] }, { "file" : "/home/sir4ur0n/code/qcheck/src/core/QCheck2.ml", "deps" : [["Sys"], ["String"], ["Seq"], ["Result"], ["Random"], ["Printf"], ["Printexc"], ["Option"], ["List"], ["Lazy"], ["Int64"], ["Int32"], ["Int"], ["Hashtbl"], ["Fun"], ["Format"], ["Float"], ["Char"], ["Bytes"], ["Buffer"], ["Array"]] }], "local" : [{ "module" : ["QCheck"], "ml" : "/home/sir4ur0n/code/qcheck/src/core/QCheck.ml", "mli" : "/home/sir4ur0n/code/qcheck/src/core/QCheck.mli" }, { "module" : ["QCheck2"], "ml" : "/home/sir4ur0n/code/qcheck/src/core/QCheck2.ml", "mli" : "/home/sir4ur0n/code/qcheck/src/core/QCheck2.mli" }] }
type DuneComponent ¶
type DuneComponent struct {
// contains filtered or unexported fields
}
Either Executable Library
type DuneComponentCore ¶
type DuneComponentCore struct {
// contains filtered or unexported fields
}
type DuneConfig ¶
type DuneConfig struct {
// contains filtered or unexported fields
}
type DuneLibDep ¶
type DuneLibDep interface{}
type DuneLibOpam ¶
type DuneLibOpam struct {
// contains filtered or unexported fields
}
type DuneLibSelect ¶
type DuneLibSelect struct{ Choice ModuleChoice }
type ExcludeModules ¶
type ExcludeModules struct {
// contains filtered or unexported fields
}
ExcludeModules implements ModuleSpec
type ExeSpec ¶
type ExeSpec struct {
// contains filtered or unexported fields
}
ExeSpec implements KindSpec
type Executable ¶
type Executable struct {
// contains filtered or unexported fields
}
type KindSpec ¶
type KindSpec interface {
// contains filtered or unexported methods
}
Whether it's an executable or library
type LibSpec ¶
type LibSpec struct {
// contains filtered or unexported fields
}
LibSpec implements KindSpec
type LibraryKind ¶
type LibraryKind interface {
// contains filtered or unexported methods
}
type ModuleChoice ¶
type ModuleChoice struct {
// contains filtered or unexported fields
}
type ModuleSpec ¶
type ModuleSpec interface {
// contains filtered or unexported methods
}
A `modules` stanza (may be absent, in that case `auto = true`)
type NoGenerator ¶
type NoGenerator struct{}
type PackageSpec ¶
type PackageSpec struct {
// contains filtered or unexported fields
}
Directory (or Dune file or Bazel build file)
type PpxTransitive ¶
type PpxTransitive struct{}
type ResolvedLocal ¶
type ResolvedLocal struct {
// contains filtered or unexported fields
}
type ResolvedOpam ¶
type ResolvedOpam struct{}
type RuleResult ¶
type RuleResult struct {
// contains filtered or unexported fields
}
A rule to be generated by OBazl
func GenerateRules ¶
func GenerateRules(dir string, sources Deps, dune string, library bool) []RuleResult
func GenerateRulesAuto ¶
func GenerateRulesAuto(name string, sources Deps, library bool) []RuleResult
func GenerateRulesDune ¶
func GenerateRulesDune(name string, sources Deps, duneCode string, library bool) []RuleResult
type SexpComponent ¶
type SexpComponent struct {
// contains filtered or unexported fields
}
type SexpString ¶
type SexpString struct{ Content string }
func (SexpString) List ¶
func (s SexpString) List() ([]SexpNode, error)
func (SexpString) String ¶
func (s SexpString) String() (string, error)
type SourceSetSlice ¶
type SourceSetSlice []SourceSet
func (SourceSetSlice) Len ¶
func (s SourceSetSlice) Len() int
func (SourceSetSlice) Less ¶
func (s SourceSetSlice) Less(i, j int) bool
func (SourceSetSlice) Sort ¶
func (s SourceSetSlice) Sort()
func (SourceSetSlice) Swap ¶
func (s SourceSetSlice) Swap(i, j int)
type SourceSlice ¶
type SourceSlice []Source
func (SourceSlice) Len ¶
func (s SourceSlice) Len() int
func (SourceSlice) Less ¶
func (s SourceSlice) Less(i, j int) bool
func (SourceSlice) Sort ¶
func (s SourceSlice) Sort()
func (SourceSlice) Swap ¶
func (s SourceSlice) Swap(i, j int)
type SourcesSpec ¶
type SourcesSpec struct {
// contains filtered or unexported fields
}