Safe Haskell | None |
---|---|
Language | Haskell2010 |
Emacs.Type
- data PState = PState {}
- data Ctx = Ctx {}
- type EmacsM = ReaderT Ctx IO
- data EmacsType
- emacsTypeSymbolName :: EmacsType -> Text
- emacsTypes :: [EmacsType]
- type EmacsModule = Ptr () -> IO CInt
- newtype EmacsEnv = EmacsEnv (Ptr ())
- newtype EmacsValue = EmacsValue (Ptr ())
- newtype GlobalEmacsValue = GlobalEmacsValue (Ptr ())
- castGlobalToEmacsValue :: GlobalEmacsValue -> EmacsValue
- newtype Symbol = Symbol Text
- data Nil = Nil
- data Cons = Cons EmacsValue EmacsValue
- newtype List = List [EmacsValue]
- data EmacsFuncallExit
- data EmacsException = EmacsException EmacsFuncallExit EmacsValue EmacsValue
- type EFunctionStub = EmacsEnv -> CPtrdiff -> Ptr (Ptr ()) -> StablePtr PState -> IO EmacsValue
- data InteractiveForm = InteractiveNoArgs
- newtype Doc = Doc Text
- newtype Arity = Arity Int
Documentation
Instances
ToEmacsValue a => Callable (EmacsM a) Source # | |
nil について
emacs 内部では nil は文字列で表現できないシンボルとして定義されている。 globals.h
#define Qnil builtin_lisp_symbol (0)
type-of では取得できない。nil は型ではない?かな。多分 type_of に渡 すとエラーになる。
haskell では不便なので ENil という型を導入する。
emacsTypeSymbolName :: EmacsType -> Text Source #
emacsTypes :: [EmacsType] Source #
Emacs の値に対する Haskell の型 数値や文字列は素直なんだけど、他 Nil は空 [] でいいのかな?
Instances
Constructors
Cons EmacsValue EmacsValue |
Constructors
List [EmacsValue] |
data EmacsException Source #
Constructors
EmacsException EmacsFuncallExit EmacsValue EmacsValue |
Instances
type EFunctionStub = EmacsEnv -> CPtrdiff -> Ptr (Ptr ()) -> StablePtr PState -> IO EmacsValue Source #
関数定義のため必要な型
data InteractiveForm Source #
Constructors
InteractiveNoArgs |