purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.Publish.Registry.Compat

Description

A compatibility module that allows a restricted set of purs.json manifest | files to be used for publishing. The manifest must described a package | available on GitHub, and it must be convertable to a Bower manifest. | | Fully supporting the registry manifest format will require `purs publish` | and by extension Pursuit to relax the requirement that packages are hosted | on GitHub, because the registry does not have this requirement.

Synopsis

- toBowerPackage :: PursJson -> Either BowerError PackageMeta
- data PursJson = PursJson {
  - pursJsonName :: Text
  - pursJsonLicense :: Text
  - pursJsonLocation :: Text
  - pursJsonDescription :: Maybe Text
  - pursJsonDependencies :: Map Text Text
  }
- data PursJsonError = MalformedLocationField
- showPursJsonError :: PursJsonError -> Text
- asPursJson :: Parse PursJsonError PursJson

# Documentation

toBowerPackage :: PursJson -> Either BowerError PackageMeta #

Convert a valid purs.json manifest into a bower.json manifest

data PursJson #

A partial representation of the purs.json manifest format, including only | the fields required for publishing. | | https://github.com/purescript/registry/blob/master/v1/Manifest.dhall

This type is intended for compatibility with the Bower publishing pipeline, and does not accurately reflect all possible purs.json manifests. However, supporting purs.json manifests properly introduces breaking changes to the compiler and to Pursuit.

Constructors

PursJson |

Fields

- pursJsonName :: Text

  The name of the package

- pursJsonLicense :: Text

  The SPDX identifier representing the package license

- pursJsonLocation :: Text

  The GitHub repository hosting the package

- pursJsonDescription :: Maybe Text

  An optional description of the package

- pursJsonDependencies :: Map Text Text

  A map of dependencies, where keys are package names and values are | dependency ranges of the form '>=X.Y.Z <X.Y.Z'

data PursJsonError #

Constructors

MalformedLocationField |

#### Instances

Instances details

NFData PursJsonError # |
Instance details Defined in Language.PureScript.Publish.Registry.Compat Methods rnf :: PursJsonError -> () #
Generic PursJsonError # |

Instance details

Defined in Language.PureScript.Publish.Registry.Compat

Associated Types

type Rep PursJsonError |
Instance details Defined in Language.PureScript.Publish.Registry.Compat type Rep PursJsonError = D1 ('MetaData "PursJsonError" "Language.PureScript.Publish.Registry.Compat" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "MalformedLocationField" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: PursJsonError -> Rep PursJsonError x #

to :: Rep PursJsonError x -> PursJsonError #

Show PursJsonError # |
Instance details Defined in Language.PureScript.Publish.Registry.Compat Methods showsPrec :: Int -> PursJsonError -> ShowS # show :: PursJsonError -> String # showList :: [PursJsonError] -> ShowS #
Eq PursJsonError # |
Instance details Defined in Language.PureScript.Publish.Registry.Compat Methods (==) :: PursJsonError -> PursJsonError -> Bool # (/=) :: PursJsonError -> PursJsonError -> Bool #
Ord PursJsonError # |

Instance details

Defined in Language.PureScript.Publish.Registry.Compat

Methods

compare :: PursJsonError -> PursJsonError -> Ordering #

(<) :: PursJsonError -> PursJsonError -> Bool #

(<=) :: PursJsonError -> PursJsonError -> Bool #

(>) :: PursJsonError -> PursJsonError -> Bool #

(>=) :: PursJsonError -> PursJsonError -> Bool #

max :: PursJsonError -> PursJsonError -> PursJsonError #

min :: PursJsonError -> PursJsonError -> PursJsonError #

type Rep PursJsonError # |
Instance details Defined in Language.PureScript.Publish.Registry.Compat type Rep PursJsonError = D1 ('MetaData "PursJsonError" "Language.PureScript.Publish.Registry.Compat" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "MalformedLocationField" 'PrefixI 'False) (U1 :: Type -> Type))

showPursJsonError :: PursJsonError -> Text #

asPursJson :: Parse PursJsonError PursJson #