glelm/elm/ast

Types

pub type Declaration {
  CustomTypeDeclaration(Type)
}

Constructors

  • CustomTypeDeclaration(Type)
pub type Exposing {
  ExposingAll
  ExposingNothing
  Explicit(List(TopLevelExpose))
}

Constructors

  • ExposingAll
  • ExposingNothing
  • Explicit(List(TopLevelExpose))
pub type FunctionName {
  FunctionName(name: String)
}

Constructors

  • FunctionName(name: String)
pub type GenericName =
  String
pub type Module {
  Module(
    name: String,
    declarations: List(Declaration),
    exposing: Exposing,
  )
}

Constructors

  • Module(
      name: String,
      declarations: List(Declaration),
      exposing: Exposing,
    )
pub type RecordDefinition {
  RecordDefinition(fields: List(RecordField))
}

Constructors

  • RecordDefinition(fields: List(RecordField))
pub type RecordField {
  RecordField(name: RecordFieldName, type_: TypeAnnotation)
}

Constructors

  • RecordField(name: RecordFieldName, type_: TypeAnnotation)
pub type RecordFieldName =
  String
pub type TopLevelExpose {
  FunctionExpose(name: FunctionName)
  TypeOrAliasExpose(name: TypeName, is_opaque: Bool)
}

Constructors

  • FunctionExpose(name: FunctionName)
  • TypeOrAliasExpose(name: TypeName, is_opaque: Bool)
pub type Type {
  Type(
    name: TypeName,
    generics: List(GenericName),
    constructor: List(ValueConstructor),
  )
}

Constructors

  • Type(
      name: TypeName,
      generics: List(GenericName),
      constructor: List(ValueConstructor),
    )

Custom type for different type annotations.

For example:

GenericType: a Typed: Maybe (Int -> String) Unit: () Tuples: (a, b, c) Record: { name : String} GenericRecord: { a | name : String} FunctionType: Int -> String

pub type TypeAnnotation {
  GenericType(GenericName)
  Unit
  Tupled(List(TypeAnnotation))
  Typed(TypeName, List(TypeAnnotation))
  Record(RecordDefinition)
  GenericRecord(GenericName, RecordDefinition)
  FunctionType(TypeAnnotation, TypeAnnotation)
}

Constructors

  • GenericType(GenericName)
  • Unit
  • Tupled(List(TypeAnnotation))
  • Typed(TypeName, List(TypeAnnotation))
  • Record(RecordDefinition)
  • GenericRecord(GenericName, RecordDefinition)
  • FunctionType(TypeAnnotation, TypeAnnotation)
pub type TypeName {
  TypeName(name: String)
}

Constructors

  • TypeName(name: String)
pub type ValueConstructor {
  ValueConstructor(
    name: TypeName,
    arguments: List(TypeAnnotation),
  )
}

Constructors

  • ValueConstructor(name: TypeName, arguments: List(TypeAnnotation))
Search Document