Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Language.PureScript.DCE
Synopsis
- data Level
- data DCEError (a :: Level)
- data EntryPoint
- isEntryParseError :: EntryPoint -> Bool
- showEntryPoint :: EntryPoint -> Text
- displayDCEError :: FilePath -> DCEError 'Error -> String
- displayDCEWarning :: FilePath -> (Int, Int) -> DCEError 'Warning -> String
- errorColor :: (ColorIntensity, Color, ConsoleIntensity)
- warnColor :: (ColorIntensity, Color, ConsoleIntensity)
- codeColor :: (ColorIntensity, Color, ConsoleIntensity)
- colorString :: (ColorIntensity, Color, ConsoleIntensity) -> String -> String
- colorText :: (ColorIntensity, Color, ConsoleIntensity) -> Text -> Text
- runForeignModuleDeadCodeElimination :: [Ident] -> [JSModuleItem] -> [JSModuleItem]
- evaluate :: [Module Ann] -> [Module Ann]
- runDeadCodeElimination :: [Qualified Ident] -> [Module Ann] -> [Module Ann]
- runBindDeadCodeElimination :: Bind Ann -> Bind Ann
Documentation
data DCEError (a :: Level) Source #
Error type shared by dce
and dceEval
.
data EntryPoint Source #
Constructors
EntryPoint (Qualified Ident) | |
EntryModule ModuleName | |
EntryParseError String |
Instances
Read EntryPoint Source # | |
Defined in Language.PureScript.DCE.Errors | |
Show EntryPoint Source # | |
Defined in Language.PureScript.DCE.Errors |
isEntryParseError :: EntryPoint -> Bool Source #
showEntryPoint :: EntryPoint -> Text Source #
colorString :: (ColorIntensity, Color, ConsoleIntensity) -> String -> String Source #
colorText :: (ColorIntensity, Color, ConsoleIntensity) -> Text -> Text Source #
runForeignModuleDeadCodeElimination :: [Ident] -> [JSModuleItem] -> [JSModuleItem] Source #
Filter export statements in a foreign module. This is not 100% safe. It
might remove declarations that are used somewhere in the foreign module (for
example by using
).eval
evaluate :: [Module Ann] -> [Module Ann] Source #
Evaluate expressions in a module:
Data.Eq.eq
of two literalsData.Array.index
on a literal array- Object accessors
- Semigroup operations (
Array
,String
,Unit
) - Semiring operations (
Unit
,Unit
,Unit
)
Keep stack of local identifiers from let
and case
expressions, ignoring
the ones that are comming from abstractions (we are not reducing
applications).