spago-0.21.0

Safe Haskell | None
Language | Haskell2010

Spago.Purs

Synopsis

- compile :: (HasPurs env, HasLogFunc env) => [SourcePath] -> [PursArg] -> RIO env ()
- graph :: (HasPurs env, HasLogFunc env) => [SourcePath] -> RIO env (Either Text ModuleGraph)
- repl :: HasPurs env => [SourcePath] -> [PursArg] -> RIO env ()
- bundle :: HasLogFunc env => WithMain -> WithSrcMap -> ModuleName -> TargetPath -> RIO env ()
- docs :: HasLogFunc env => DocsFormat -> [SourcePath] -> RIO env ()
- pursVersion :: RIO env (Either Text SemVer)
- hasMinPursVersion :: (HasLogFunc env, HasPurs env) => Text -> RIO env Bool
- parseDocsFormat :: Text -> Maybe DocsFormat
- findFlag :: Char -> Text -> [PursArg] -> Maybe Text
- data DocsFormat
  - = Html
  - | Markdown
  - | Ctags
  - | Etags
- newtype ModuleGraph = ModuleGraph {
  - unModuleGraph :: Map ModuleName ModuleGraphNode
  }
- data ModuleGraphNode = ModuleGraphNode {
  - graphNodePath :: Text
  - graphNodeDepends :: [ModuleName]
  }

# Documentation

compile :: (HasPurs env, HasLogFunc env) => [SourcePath] -> [PursArg] -> RIO env () #

graph :: (HasPurs env, HasLogFunc env) => [SourcePath] -> RIO env (Either Text ModuleGraph) #

repl :: HasPurs env => [SourcePath] -> [PursArg] -> RIO env () #

bundle :: HasLogFunc env => WithMain -> WithSrcMap -> ModuleName -> TargetPath -> RIO env () #

docs :: HasLogFunc env => DocsFormat -> [SourcePath] -> RIO env () #

pursVersion :: RIO env (Either Text SemVer) #

hasMinPursVersion :: (HasLogFunc env, HasPurs env) => Text -> RIO env Bool #

parseDocsFormat :: Text -> Maybe DocsFormat #

findFlag :: Char -> Text -> [PursArg] -> Maybe Text #

Try to find the content of a certain flag in a list of PursArgs See tests in: testSpagoCommand/PathSpec.hs

data DocsFormat #

Constructors

Html |
Markdown |
Ctags |
Etags |

#### Instances

Instances details

Eq DocsFormat # |
Instance details Defined in Spago.Purs Methods (==) :: DocsFormat -> DocsFormat -> Bool # (/=) :: DocsFormat -> DocsFormat -> Bool #

newtype ModuleGraph #

Constructors

ModuleGraph |
Fields unModuleGraph :: Map ModuleName ModuleGraphNode

#### Instances

Instances details

FromJSON ModuleGraph # |
Instance details Defined in Spago.Types Methods parseJSON :: Value -> Parser ModuleGraph # parseJSONList :: Value -> Parser [ModuleGraph] # omittedField :: Maybe ModuleGraph #

data ModuleGraphNode #

Constructors

ModuleGraphNode |
Fields graphNodePath :: Text graphNodeDepends :: [ModuleName]

#### Instances

Instances details

FromJSON ModuleGraphNode # |
Instance details Defined in Spago.Types Methods parseJSON :: Value -> Parser ModuleGraphNode # parseJSONList :: Value -> Parser [ModuleGraphNode] # omittedField :: Maybe ModuleGraphNode #
Generic ModuleGraphNode # |
Instance details Defined in Spago.Types Associated Types
type Rep ModuleGraphNode |
Instance details Defined in Spago.Types type Rep ModuleGraphNode = D1 ('MetaData "ModuleGraphNode" "Spago.Types" "spago-0.21.0-7fGZ7CPhD6UKUhYlrl5wZv" 'False) (C1 ('MetaCons "ModuleGraphNode" 'PrefixI 'True) (S1 ('MetaSel ('Just "graphNodePath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "graphNodeDepends") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ModuleName])))
Methods from :: ModuleGraphNode -> Rep ModuleGraphNode x # to :: Rep ModuleGraphNode x -> ModuleGraphNode #
type Rep ModuleGraphNode # |
Instance details Defined in Spago.Types type Rep ModuleGraphNode = D1 ('MetaData "ModuleGraphNode" "Spago.Types" "spago-0.21.0-7fGZ7CPhD6UKUhYlrl5wZv" 'False) (C1 ('MetaCons "ModuleGraphNode" 'PrefixI 'True) (S1 ('MetaSel ('Just "graphNodePath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "graphNodeDepends") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [ModuleName])))