nvim-hs-contrib-1.0.0.0: Haskell plugin backend for neovim

Copyright(c) Sebastian Witte
LicenseApache-2.0
Maintainerwoozletoff@gmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Neovim.BuildTool

Description

 

Synopsis

Documentation

data BuildTool Source #

Instances

Eq BuildTool Source # 
Ord BuildTool Source # 
Read BuildTool Source # 
Show BuildTool Source # 
Generic BuildTool Source # 

Associated Types

type Rep BuildTool :: * -> * #

ToJSON BuildTool Source # 
FromJSON BuildTool Source # 
type Rep BuildTool Source # 
type Rep BuildTool = D1 * (MetaData "BuildTool" "Neovim.BuildTool" "nvim-hs-contrib-1.0.0.0-JjCApFqBv9A1JZ2WAKQuNy" False) ((:+:) * ((:+:) * ((:+:) * (C1 * (MetaCons "Stack" PrefixI False) (U1 *)) (C1 * (MetaCons "Cabal" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * CabalType)))) ((:+:) * (C1 * (MetaCons "Shake" PrefixI False) (U1 *)) (C1 * (MetaCons "Make" PrefixI False) (U1 *)))) ((:+:) * ((:+:) * (C1 * (MetaCons "Cmake" PrefixI False) (U1 *)) (C1 * (MetaCons "Ninja" PrefixI False) (U1 *))) ((:+:) * (C1 * (MetaCons "Scons" PrefixI False) (U1 *)) (C1 * (MetaCons "Custom" PrefixI False) (U1 *)))))

data CabalType Source #

Constructors

Plain 
Sandbox 
NewBuild 

Instances

Enum CabalType Source # 
Eq CabalType Source # 
Ord CabalType Source # 
Read CabalType Source # 
Show CabalType Source # 
Generic CabalType Source # 

Associated Types

type Rep CabalType :: * -> * #

ToJSON CabalType Source # 
FromJSON CabalType Source # 
type Rep CabalType Source # 
type Rep CabalType = D1 * (MetaData "CabalType" "Neovim.BuildTool" "nvim-hs-contrib-1.0.0.0-JjCApFqBv9A1JZ2WAKQuNy" False) ((:+:) * (C1 * (MetaCons "Plain" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "Sandbox" PrefixI False) (U1 *)) (C1 * (MetaCons "NewBuild" PrefixI False) (U1 *))))

partialM :: Monad m => (a -> m Bool) -> a -> m (Maybe a) Source #

If the monadic boolean predicate returns true, wrap the given object in a Just constructor, otherwise return Nothing.

mkDirectory :: MonadIO io => FilePath -> io (Maybe Directory) Source #

Create Just a Directory value if the given filepath exists and otherwise return Nothing. This method does not create an actual directory on your file system.

newtype File Source #

Constructors

File 

Fields

Instances

Eq File Source # 

Methods

(==) :: File -> File -> Bool #

(/=) :: File -> File -> Bool #

Ord File Source # 

Methods

compare :: File -> File -> Ordering #

(<) :: File -> File -> Bool #

(<=) :: File -> File -> Bool #

(>) :: File -> File -> Bool #

(>=) :: File -> File -> Bool #

max :: File -> File -> File #

min :: File -> File -> File #

Show File Source # 

Methods

showsPrec :: Int -> File -> ShowS #

show :: File -> String #

showList :: [File] -> ShowS #

mkFile :: MonadIO io => Maybe Directory -> FilePath -> io (Maybe File) Source #

Create Just a File value if the given file exists and is not a directory. Otherwise return Nothing. This function does not alter your filesystem.

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.

maybeStack :: MonadIO io => Directory -> io (Maybe BuildTool) Source #

Check if directory contains a stack.yaml file and return Just Stack in this case.

maybeCabalSandbox :: MonadIO io => Directory -> io (Maybe BuildTool) Source #

Check if the directory contains a cabal.sandbox.config file and return Just (Cabal Sandbox) in that case.

maybeCabal :: MonadIO io => Directory -> io (Maybe BuildTool) Source #

Check if the directory contains a cabal file and return Just (Cabal Plain) if present.