-
Notifications
You must be signed in to change notification settings - Fork 56
/
HaskelineJH.hs
40 lines (31 loc) · 1.21 KB
/
HaskelineJH.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
module HaskelineJH where
import Control.Monad.Trans.Reader
import GHC.IORef
import Juvix.Prelude.DarkArts
import System.Console.Haskeline
import System.Console.Repline
type InputTArg m a =
ReaderT
RunTerm
( ReaderT
(IORef History)
( ReaderT
(IORef KillRing)
( ReaderT
Prefs
(ReaderT (Settings m) m)
)
)
)
a
type KillRing = $(importHiddenConT "haskeline" "System.Console.Haskeline.Command.KillRing" "KillRing")
type RunTerm = $(importHiddenConT "haskeline" "System.Console.Haskeline.Term" "RunTerm")
type History = $(importHiddenConT "haskeline" "System.Console.Haskeline.History" "History")
unInputT :: InputT m a -> InputTArg m a
unInputT = $(importHiddenField "InputT" "haskeline" "System.Console.Haskeline.InputT" "unInputT")
mkInputT :: InputTArg m a -> InputT m a
mkInputT = $(importHiddenCon "haskeline" "System.Console.Haskeline.InputT" "InputT")
unHaskelineT :: HaskelineT m a -> InputT m a
unHaskelineT = $(importHiddenField "HaskelineT" "repline" "System.Console.Repline" "unHaskeline")
mkHaskelineT :: InputT m a -> HaskelineT m a
mkHaskelineT = $(importHiddenCon "repline" "System.Console.Repline" "HaskelineT")