haskell-tools-demo-1.1.1.0: A web-based demo for Haskell-tools Refactor.

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.Tools.Demo

Synopsis

Documentation

runDemo :: [String] -> IO () Source #

app :: MVar [Int] -> FilePath -> Application Source #

The application that is evoked for each incoming request

updateClient :: FilePath -> ClientMessage -> StateT RefactorSessionState Ghc (Maybe ResponseMsg) Source #

This function does the real job of acting upon client messages in a stateful environment of a client

moduleNameAndContent :: ((String, String, FilePath), mod) -> (SourceFileKey, mod) Source #

data ClientMessage Source #

Instances
Show ClientMessage Source # 
Instance details

Defined in Language.Haskell.Tools.Demo

Generic ClientMessage Source # 
Instance details

Defined in Language.Haskell.Tools.Demo

Associated Types

type Rep ClientMessage :: Type -> Type #

FromJSON ClientMessage Source # 
Instance details

Defined in Language.Haskell.Tools.Demo

Methods

parseJSON :: Value -> Parser ClientMessage

parseJSONList :: Value -> Parser [ClientMessage]

type Rep ClientMessage Source # 
Instance details

Defined in Language.Haskell.Tools.Demo

type Rep ClientMessage = D1 (MetaData "ClientMessage" "Language.Haskell.Tools.Demo" "haskell-tools-demo-1.1.1.0-I0JTId9D38dC1XjMxDqSWA" False) ((C1 (MetaCons "KeepAlive" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "InitialProject" PrefixI True) (S1 (MetaSel (Just "initialModules") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(String, String)])) :+: C1 (MetaCons "PerformRefactoring" PrefixI True) ((S1 (MetaSel (Just "refactoring") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "moduleName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :*: (S1 (MetaSel (Just "editorSelection") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "details") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]))))) :+: (C1 (MetaCons "ModuleChanged" PrefixI True) (S1 (MetaSel (Just "moduleName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "newContent") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: (C1 (MetaCons "ModuleDeleted" PrefixI True) (S1 (MetaSel (Just "moduleName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "Disconnect" PrefixI False) (U1 :: Type -> Type))))

data ResponseMsg Source #

Instances
Show ResponseMsg Source # 
Instance details

Defined in Language.Haskell.Tools.Demo

Generic ResponseMsg Source # 
Instance details

Defined in Language.Haskell.Tools.Demo

Associated Types

type Rep ResponseMsg :: Type -> Type #

ToJSON ResponseMsg Source # 
Instance details

Defined in Language.Haskell.Tools.Demo

Methods

toJSON :: ResponseMsg -> Value

toEncoding :: ResponseMsg -> Encoding

toJSONList :: [ResponseMsg] -> Value

toEncodingList :: [ResponseMsg] -> Encoding

type Rep ResponseMsg Source # 
Instance details

Defined in Language.Haskell.Tools.Demo

type Rep ResponseMsg = D1 (MetaData "ResponseMsg" "Language.Haskell.Tools.Demo" "haskell-tools-demo-1.1.1.0-I0JTId9D38dC1XjMxDqSWA" False) ((C1 (MetaCons "RefactorChanges" PrefixI True) (S1 (MetaSel (Just "moduleChanges") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(String, Maybe String)])) :+: C1 (MetaCons "ASTViewContent" PrefixI True) (S1 (MetaSel (Just "astContent") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))) :+: (C1 (MetaCons "ErrorMessage" PrefixI True) (S1 (MetaSel (Just "errorMsg") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: (C1 (MetaCons "CompilationProblem" PrefixI True) (S1 (MetaSel (Just "errorMsg") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "Disconnected" PrefixI False) (U1 :: Type -> Type))))