nvim-hs-contrib-2.0.0.2: Haskell plugin backend for neovim
Copyright(c) Sebastian Witte
LicenseApache-2.0
Maintainerwoozletoff@gmail.com
Stabilityexperimental
PortabilityGHC
Safe HaskellSafe-Inferred
LanguageHaskell2010

Neovim.BuildTool

Description

 
Synopsis

Documentation

data BuildTool Source #

Instances

Instances details
FromJSON BuildTool Source # 
Instance details

Defined in Neovim.BuildTool

ToJSON BuildTool Source # 
Instance details

Defined in Neovim.BuildTool

Generic BuildTool Source # 
Instance details

Defined in Neovim.BuildTool

Associated Types

type Rep BuildTool :: Type -> Type #

Read BuildTool Source # 
Instance details

Defined in Neovim.BuildTool

Show BuildTool Source # 
Instance details

Defined in Neovim.BuildTool

Eq BuildTool Source # 
Instance details

Defined in Neovim.BuildTool

Ord BuildTool Source # 
Instance details

Defined in Neovim.BuildTool

type Rep BuildTool Source # 
Instance details

Defined in Neovim.BuildTool

type Rep BuildTool = D1 ('MetaData "BuildTool" "Neovim.BuildTool" "nvim-hs-contrib-2.0.0.2-Gm8wSVtVXN12gBOJCuNT9F" '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))))

data CabalType Source #

Constructors

Plain 
Sandbox 
NewBuild 

Instances

Instances details
FromJSON CabalType Source # 
Instance details

Defined in Neovim.BuildTool

ToJSON CabalType Source # 
Instance details

Defined in Neovim.BuildTool

Enum CabalType Source # 
Instance details

Defined in Neovim.BuildTool

Generic CabalType Source # 
Instance details

Defined in Neovim.BuildTool

Associated Types

type Rep CabalType :: Type -> Type #

Read CabalType Source # 
Instance details

Defined in Neovim.BuildTool

Show CabalType Source # 
Instance details

Defined in Neovim.BuildTool

Eq CabalType Source # 
Instance details

Defined in Neovim.BuildTool

Ord CabalType Source # 
Instance details

Defined in Neovim.BuildTool

type Rep CabalType Source # 
Instance details

Defined in Neovim.BuildTool

type Rep CabalType = D1 ('MetaData "CabalType" "Neovim.BuildTool" "nvim-hs-contrib-2.0.0.2-Gm8wSVtVXN12gBOJCuNT9F" '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)))

newtype Directory Source #

Constructors

Directory 

Instances

Instances details
Show Directory Source # 
Instance details

Defined in Neovim.BuildTool

Eq Directory Source # 
Instance details

Defined in Neovim.BuildTool

Ord Directory Source # 
Instance details

Defined in Neovim.BuildTool

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

Instances details
Show File Source # 
Instance details

Defined in Neovim.BuildTool

Methods

showsPrec :: Int -> File -> ShowS #

show :: File -> String #

showList :: [File] -> ShowS #

Eq File Source # 
Instance details

Defined in Neovim.BuildTool

Methods

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

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

Ord File Source # 
Instance details

Defined in Neovim.BuildTool

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 #

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.