Compiler.PackageName

Functions for working with package identifiers.

type PackageName

A package is identified by a string in the following format:

author/name

Where author represents the person, or organization, that built the package, and name is... well, a name. A name should ideally describe the purpose of the package.

Both author and name can contain alphanumeric characters and a single dash as a seperator, but no other characters.

example : PackageName

An example package name. Useful for tests.

Constructors

fromString : String -> Maybe PackageName

Attempt to convert a String into PackageName.

cliParser : ValueParser PackageName

A parser for use with CLI.Parser.

jsonDecoder : Decoder PackageName

A JSON decoder for PackageName

Queries

author : PackageName -> String

Retrieve the package author.

name : PackageName -> String

Retrieve the package name.

Conversions

toString : PackageName -> String

Turn PackageName into a String.

toJson : PackageName -> Value

Turn PackageName into Json.

Common package names

core : PackageName
browser : PackageName
node : PackageName