Copyright | (c) Sebastian Witte |
---|---|
License | Apache-2.0 |
Maintainer | woozletoff@gmail.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data BuildTool
- data CabalType
- newtype Directory = Directory {}
- partialM :: Monad m => (a -> m Bool) -> a -> m (Maybe a)
- mkDirectory :: MonadIO io => FilePath -> io (Maybe Directory)
- newtype File = File {}
- mkFile :: MonadIO io => Maybe Directory -> FilePath -> io (Maybe File)
- thisAndParentDirectories :: Directory -> [Directory]
- determineProjectSettings :: MonadIO io => [Directory -> io (Maybe BuildTool)] -> [Directory] -> io (Maybe (BuildTool, Directory))
- defaultProjectIdentifiers :: MonadIO io => [Directory -> io (Maybe BuildTool)]
- guessProjectSettings :: MonadIO io => [Directory] -> io (Maybe (BuildTool, Directory))
- maybeStack :: MonadIO io => Directory -> io (Maybe BuildTool)
- maybeCabalSandbox :: MonadIO io => Directory -> io (Maybe BuildTool)
- maybeCabal :: MonadIO io => Directory -> io (Maybe BuildTool)
Documentation
Instances
Eq BuildTool Source # | |
Ord BuildTool Source # | |
Defined in Neovim.BuildTool | |
Read BuildTool Source # | |
Show BuildTool Source # | |
Generic BuildTool Source # | |
ToJSON BuildTool Source # | |
Defined in Neovim.BuildTool | |
FromJSON BuildTool Source # | |
type Rep BuildTool Source # | |
Defined in Neovim.BuildTool type Rep BuildTool = D1 (MetaData "BuildTool" "Neovim.BuildTool" "nvim-hs-contrib-2.0.0.0-LL8gFMY0ffL2nIuzJVV4m" False) (((C1 (MetaCons "Stack" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Cabal" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CabalType))) :+: (C1 (MetaCons "Shake" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Make" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "Cmake" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Ninja" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Scons" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Custom" PrefixI False) (U1 :: Type -> Type)))) |
Instances
Enum CabalType Source # | |
Defined in Neovim.BuildTool succ :: CabalType -> CabalType # pred :: CabalType -> CabalType # fromEnum :: CabalType -> Int # enumFrom :: CabalType -> [CabalType] # enumFromThen :: CabalType -> CabalType -> [CabalType] # enumFromTo :: CabalType -> CabalType -> [CabalType] # enumFromThenTo :: CabalType -> CabalType -> CabalType -> [CabalType] # | |
Eq CabalType Source # | |
Ord CabalType Source # | |
Defined in Neovim.BuildTool | |
Read CabalType Source # | |
Show CabalType Source # | |
Generic CabalType Source # | |
ToJSON CabalType Source # | |
Defined in Neovim.BuildTool | |
FromJSON CabalType Source # | |
type Rep CabalType Source # | |
Defined in Neovim.BuildTool type Rep CabalType = D1 (MetaData "CabalType" "Neovim.BuildTool" "nvim-hs-contrib-2.0.0.0-LL8gFMY0ffL2nIuzJVV4m" False) (C1 (MetaCons "Plain" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "Sandbox" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "NewBuild" PrefixI False) (U1 :: Type -> Type))) |
thisAndParentDirectories :: Directory -> [Directory] Source #
Calculate the list of all parent directories for the given directory. This function also returns the initially specified directory.
determineProjectSettings :: MonadIO io => [Directory -> io (Maybe BuildTool)] -> [Directory] -> io (Maybe (BuildTool, Directory)) Source #
Given a list of build tool identifier functions, apply these to all the
given directories and return the value of the first function that returns a
BuildTool
value or Nothing
if no function ever returns a BuildTool
.
The identifier functions and directories are tried in the order as supplied
to this function.
defaultProjectIdentifiers :: MonadIO io => [Directory -> io (Maybe BuildTool)] Source #
This list contains some build tool identifier functions for usual setups.
guessProjectSettings :: MonadIO io => [Directory] -> io (Maybe (BuildTool, Directory)) Source #
Same as determineProjectSettings
defaultProjetIdentifiers
.