purescript-0.15.14: PureScript Programming Language Compiler
Safe HaskellSafe-Inferred
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 Source #

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

Instances

Instances details
ToJSON ModuleIdentifier Source # 
Instance details

Defined in Language.PureScript.Bundle

Generic ModuleIdentifier Source # 
Instance details

Defined in Language.PureScript.Bundle

Associated Types

type Rep ModuleIdentifier :: Type -> Type #

Show ModuleIdentifier Source # 
Instance details

Defined in Language.PureScript.Bundle

NFData ModuleIdentifier Source # 
Instance details

Defined in Language.PureScript.Bundle

Methods

rnf :: ModuleIdentifier -> () #

Eq ModuleIdentifier Source # 
Instance details

Defined in Language.PureScript.Bundle

Ord ModuleIdentifier Source # 
Instance details

Defined in Language.PureScript.Bundle

type Rep ModuleIdentifier Source # 
Instance details

Defined in Language.PureScript.Bundle

type Rep ModuleIdentifier = D1 ('MetaData "ModuleIdentifier" "Language.PureScript.Bundle" "purescript-0.15.14-JcflwnDm1Hv5HxS5CV5TJ2" '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 Source #

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

Constructors

Regular 
Foreign 

Instances

Instances details
Generic ModuleType Source # 
Instance details

Defined in Language.PureScript.Bundle

Associated Types

type Rep ModuleType :: Type -> Type #

Show ModuleType Source # 
Instance details

Defined in Language.PureScript.Bundle

NFData ModuleType Source # 
Instance details

Defined in Language.PureScript.Bundle

Methods

rnf :: ModuleType -> () #

Eq ModuleType Source # 
Instance details

Defined in Language.PureScript.Bundle

Ord ModuleType Source # 
Instance details

Defined in Language.PureScript.Bundle

type Rep ModuleType Source # 
Instance details

Defined in Language.PureScript.Bundle

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

data ErrorMessage Source #

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
Generic ErrorMessage Source # 
Instance details

Defined in Language.PureScript.Bundle

Associated Types

type Rep ErrorMessage :: Type -> Type #

Show ErrorMessage Source # 
Instance details

Defined in Language.PureScript.Bundle

NFData ErrorMessage Source # 
Instance details

Defined in Language.PureScript.Bundle

Methods

rnf :: ErrorMessage -> () #

type Rep ErrorMessage Source # 
Instance details

Defined in Language.PureScript.Bundle

type Rep ErrorMessage = D1 ('MetaData "ErrorMessage" "Language.PureScript.Bundle" "purescript-0.15.14-JcflwnDm1Hv5HxS5CV5TJ2" '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] Source #

Prepare an error message for consumption by humans.

data Module Source #

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

Instances

Instances details
ToJSON Module Source # 
Instance details

Defined in Language.PureScript.Bundle

Show Module Source # 
Instance details

Defined in Language.PureScript.Bundle