purescript-0.15.15: PureScript Programming Language Compiler
Safe HaskellNone
LanguageHaskell2010

Language.PureScript.Bundle

Description

Bundles compiled PureScript modules for the browser.

This module takes as input the individual generated modules from Make and performs dead code elimination, filters empty modules, and generates the final JavaScript bundle.

Synopsis

Documentation

data ModuleIdentifier #

A module is identified by its module name and its type.

Instances

Instances details
ToJSON ModuleIdentifier # 
Instance details

Defined in Language.PureScript.Bundle

NFData ModuleIdentifier # 
Instance details

Defined in Language.PureScript.Bundle

Methods

rnf :: ModuleIdentifier -> () #

Generic ModuleIdentifier # 
Instance details

Defined in Language.PureScript.Bundle

Associated Types

type Rep ModuleIdentifier 
Instance details

Defined in Language.PureScript.Bundle

type Rep ModuleIdentifier = D1 ('MetaData "ModuleIdentifier" "Language.PureScript.Bundle" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "ModuleIdentifier" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleType)))
Show ModuleIdentifier # 
Instance details

Defined in Language.PureScript.Bundle

Eq ModuleIdentifier # 
Instance details

Defined in Language.PureScript.Bundle

Ord ModuleIdentifier # 
Instance details

Defined in Language.PureScript.Bundle

type Rep ModuleIdentifier # 
Instance details

Defined in Language.PureScript.Bundle

type Rep ModuleIdentifier = D1 ('MetaData "ModuleIdentifier" "Language.PureScript.Bundle" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "ModuleIdentifier" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleType)))

data ModuleType #

Modules are either "regular modules" (i.e. those generated by the PureScript compiler) or foreign modules.

Constructors

Regular 
Foreign 

Instances

Instances details
NFData ModuleType # 
Instance details

Defined in Language.PureScript.Bundle

Methods

rnf :: ModuleType -> () #

Generic ModuleType # 
Instance details

Defined in Language.PureScript.Bundle

Associated Types

type Rep ModuleType 
Instance details

Defined in Language.PureScript.Bundle

type Rep ModuleType = D1 ('MetaData "ModuleType" "Language.PureScript.Bundle" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "Regular" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Foreign" 'PrefixI 'False) (U1 :: Type -> Type))
Show ModuleType # 
Instance details

Defined in Language.PureScript.Bundle

Eq ModuleType # 
Instance details

Defined in Language.PureScript.Bundle

Ord ModuleType # 
Instance details

Defined in Language.PureScript.Bundle

type Rep ModuleType # 
Instance details

Defined in Language.PureScript.Bundle

type Rep ModuleType = D1 ('MetaData "ModuleType" "Language.PureScript.Bundle" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (C1 ('MetaCons "Regular" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Foreign" 'PrefixI 'False) (U1 :: Type -> Type))

data ErrorMessage #

The type of error messages. We separate generation and rendering of errors using a data type, in case we need to match on error types later.

Instances

Instances details
NFData ErrorMessage # 
Instance details

Defined in Language.PureScript.Bundle

Methods

rnf :: ErrorMessage -> () #

Generic ErrorMessage # 
Instance details

Defined in Language.PureScript.Bundle

Associated Types

type Rep ErrorMessage 
Instance details

Defined in Language.PureScript.Bundle

type Rep ErrorMessage = D1 ('MetaData "ErrorMessage" "Language.PureScript.Bundle" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (((C1 ('MetaCons "UnsupportedModulePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "InvalidTopLevel" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UnableToParseModule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "UnsupportedImport" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "UnsupportedExport" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorInModule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleIdentifier) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorMessage))) :+: (C1 ('MetaCons "MissingEntryPoint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "MissingMainModule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))))
Show ErrorMessage # 
Instance details

Defined in Language.PureScript.Bundle

type Rep ErrorMessage # 
Instance details

Defined in Language.PureScript.Bundle

type Rep ErrorMessage = D1 ('MetaData "ErrorMessage" "Language.PureScript.Bundle" "purescript-0.15.15-8K0LbmS63k4ILju2RsIrDp" 'False) (((C1 ('MetaCons "UnsupportedModulePath" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "InvalidTopLevel" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UnableToParseModule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "UnsupportedImport" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "UnsupportedExport" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ErrorInModule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ModuleIdentifier) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ErrorMessage))) :+: (C1 ('MetaCons "MissingEntryPoint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)) :+: C1 ('MetaCons "MissingMainModule" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))))

printErrorMessage :: ErrorMessage -> [String] #

Prepare an error message for consumption by humans.

data Module #

A module is just a list of elements of the types listed above.

Instances

Instances details
ToJSON Module # 
Instance details

Defined in Language.PureScript.Bundle

Show Module # 
Instance details

Defined in Language.PureScript.Bundle