purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.Ide.Reexports

Description

Resolves reexports for psc-ide

Synopsis

- resolveReexports :: ModuleMap [(ModuleName, DeclarationRef)] -> ModuleMap [IdeDeclarationAnn] -> ModuleMap (ReexportResult [IdeDeclarationAnn])
- prettyPrintReexportResult :: (a -> Text) -> ReexportResult a -> Text
- reexportHasFailures :: ReexportResult a -> Bool
- data ReexportResult a = ReexportResult {
  - reResolved :: a
  - reFailed :: [(ModuleName, DeclarationRef)]
  }
- resolveReexports' :: ModuleMap [IdeDeclarationAnn] -> [(ModuleName, DeclarationRef)] -> ReexportResult [IdeDeclarationAnn]

# Documentation

resolveReexports #

Arguments

:: ModuleMap [(ModuleName, DeclarationRef)] | the references to resolve
-> ModuleMap [IdeDeclarationAnn] | Modules to search for the reexported declarations
-> ModuleMap (ReexportResult [IdeDeclarationAnn]) |

Resolves Reexports for the given Modules, by looking up the reexported values from the passed in DeclarationRefs

prettyPrintReexportResult #

Arguments

:: (a -> Text) | Formatter for the resolved result
-> ReexportResult a | The Result to be pretty printed
-> Text |

Uses the passed formatter to format the resolved module, and adds possible failures

reexportHasFailures :: ReexportResult a -> Bool #

Whether any Refs couldn't be resolved

data ReexportResult a #

Contains the module with resolved reexports, and possible failures

Constructors

ReexportResult |

Fields

- reResolved :: a
- reFailed :: [(ModuleName, DeclarationRef)]

#### Instances

Instances details

Functor ReexportResult # |
Instance details Defined in Language.PureScript.Ide.Reexports Methods fmap :: (a -> b) -> ReexportResult a -> ReexportResult b # (<$) :: a -> ReexportResult b -> ReexportResult a #
Generic (ReexportResult a) # |

Instance details

Defined in Language.PureScript.Ide.Reexports

Associated Types

type Rep (ReexportResult a) |

Instance details

Defined in Language.PureScript.Ide.Reexports

type Rep (ReexportResult a) = D1 ('MetaData "ReexportResult" "Language.PureScript.Ide.Reexports" "purescript-0.15.15-2PRN9Yi4DizG6PDa5K8ocU" 'False) (C1 ('MetaCons "ReexportResult" 'PrefixI 'True) (S1 ('MetaSel ('Just "reResolved") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "reFailed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(ModuleName, DeclarationRef)])))

Methods

from :: ReexportResult a -> Rep (ReexportResult a) x #

to :: Rep (ReexportResult a) x -> ReexportResult a #

Show a => Show (ReexportResult a) # |
Instance details Defined in Language.PureScript.Ide.Reexports Methods showsPrec :: Int -> ReexportResult a -> ShowS # show :: ReexportResult a -> String # showList :: [ReexportResult a] -> ShowS #
NFData a => NFData (ReexportResult a) # |
Instance details Defined in Language.PureScript.Ide.Reexports Methods rnf :: ReexportResult a -> () #
Eq a => Eq (ReexportResult a) # |
Instance details Defined in Language.PureScript.Ide.Reexports Methods (==) :: ReexportResult a -> ReexportResult a -> Bool # (/=) :: ReexportResult a -> ReexportResult a -> Bool #
type Rep (ReexportResult a) # |

Instance details

Defined in Language.PureScript.Ide.Reexports

type Rep (ReexportResult a) = D1 ('MetaData "ReexportResult" "Language.PureScript.Ide.Reexports" "purescript-0.15.15-2PRN9Yi4DizG6PDa5K8ocU" 'False) (C1 ('MetaCons "ReexportResult" 'PrefixI 'True) (S1 ('MetaSel ('Just "reResolved") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "reFailed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [(ModuleName, DeclarationRef)])))

resolveReexports' :: ModuleMap [IdeDeclarationAnn] -> [(ModuleName, DeclarationRef)] -> ReexportResult [IdeDeclarationAnn] #