gsh/evaluator/types

Types

pub type TypeNode {
  Named(name: String, parameters: List(TypeNode))
  Tuple(elements: List(TypeNode))
  Variable(id: Int)
  Fn(params: List(TypeNode), ret: TypeNode)
}

Constructors

Values

pub fn get_entry_type(
  json_string: String,
  module_name: String,
) -> Result(String, String)
pub fn infer_or_get_type(
  json_string: String,
  module_name: String,
  source_input: String,
) -> Result(String, Nil)

Attempts to retrieve the entry type from the exported package interface JSON, falling back to fast pattern inference on expression literals and custom constructors.

pub fn render(node: TypeNode) -> String
pub fn type_node_decoder() -> decode.Decoder(TypeNode)
Search Document