yi-mode-haskell-0.19.1: Yi editor haskell mode

License | GPL-2
Maintainer | yi-devel@googlegroups.com
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell2010

Extensions

- Cpp
- TemplateHaskell
- TemplateHaskellQuotes
- OverloadedStrings
- DeriveDataTypeable
- DeriveGeneric
- GeneralizedNewtypeDeriving

Yi.Mode.GHCi

Description

A mode for GHCi, implemented as tweaks on Interaction mode

Synopsis

- data GhciProcessName = GhciProcessName {
  - _ghciProcessName :: FilePath
  - _ghciProcessArgs :: [String]
  }
- ghciProcessArgs :: Lens' GhciProcessName [String]
- ghciProcessName :: Lens' GhciProcessName FilePath
- mode :: Mode (Tree (Tok Token))
- homeKey :: BufferM ()
- spawnProcess :: FilePath -> [String] -> YiM BufferRef

# Documentation

data GhciProcessName Source #

The process name to use to spawn GHCi.

Constructors

GhciProcessName |

Fields

- _ghciProcessName :: FilePath

  Command to run when spawning GHCi.

- _ghciProcessArgs :: [String]

  Args to pass to the process.

#### Instances

Instances details

Binary GhciProcessName Source # |
Instance details Defined in Yi.Mode.GHCi Methods put :: GhciProcessName -> Put Source # get :: Get GhciProcessName Source # putList :: [GhciProcessName] -> Put Source #
Default GhciProcessName Source # | The process name defaults to `ghci`.
Instance details Defined in Yi.Mode.GHCi Methods def :: GhciProcessName Source #
Generic GhciProcessName Source # |

Instance details

Defined in Yi.Mode.GHCi

Associated Types

type Rep GhciProcessName |

Instance details

Defined in Yi.Mode.GHCi

type Rep GhciProcessName = D1 ('MetaData "GhciProcessName" "Yi.Mode.GHCi" "yi-mode-haskell-0.19.1-DT2Md5vR2IwCfcNk6IJEbS" 'False) (C1 ('MetaCons "GhciProcessName" 'PrefixI 'True) (S1 ('MetaSel ('Just "_ghciProcessName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "_ghciProcessArgs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String])))

Methods

from :: GhciProcessName -> Rep GhciProcessName x Source #

to :: Rep GhciProcessName x -> GhciProcessName Source #

Show GhciProcessName Source # |
Instance details Defined in Yi.Mode.GHCi Methods showsPrec :: Int -> GhciProcessName -> ShowS Source # show :: GhciProcessName -> String Source # showList :: [GhciProcessName] -> ShowS Source #
YiVariable GhciProcessName Source # | Setting this is a bit like '(setq haskell-program-name foo)' in emacs' `haskell-mode`.
Instance details Defined in Yi.Mode.GHCi
type Rep GhciProcessName Source # |

Instance details

Defined in Yi.Mode.GHCi

type Rep GhciProcessName = D1 ('MetaData "GhciProcessName" "Yi.Mode.GHCi" "yi-mode-haskell-0.19.1-DT2Md5vR2IwCfcNk6IJEbS" 'False) (C1 ('MetaCons "GhciProcessName" 'PrefixI 'True) (S1 ('MetaSel ('Just "_ghciProcessName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 FilePath) :*: S1 ('MetaSel ('Just "_ghciProcessArgs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [String])))

ghciProcessArgs :: Lens' GhciProcessName [String] Source #

ghciProcessName :: Lens' GhciProcessName FilePath Source #

mode :: Mode (Tree (Tok Token)) Source #

Mode used for GHCi. Currently it just overrides `KHome` key to go just before the prompt through the use of `homeKey`.

homeKey :: BufferM () Source #

The GHCi prompt always begins with ">"; this goes to just before it, or if one is already at the start of the prompt, goes to the beginning of the line. (If at the beginning of the line, this pushes you forward to it.)

spawnProcess Source #

Arguments

:: FilePath | Command to use.
-> [String] | Process args.
-> YiM BufferRef | Reference to the spawned buffer.

Spawns an interactive process (Yi.Mode.Interactive) with GHCi `mode` over it.