@@ -66,7 +66,7 @@ data PSCiState = PSCiState
66 { psciImportedFilenames :: [FilePath]
66 { psciImportedFilenames :: [FilePath]
67 , psciImportedModuleNames :: [P.ModuleName]
67 , psciImportedModuleNames :: [P.ModuleName]
68 , psciLoadedModules :: [(FilePath, P.Module)]
68 , psciLoadedModules :: [(FilePath, P.Module)]
69− , psciLetBindings :: [P.Value -> P.Value]
69+ , psciLetBindings :: [P.Expr -> P.Expr]
72-- State helpers
72-- State helpers
@@ -92,7 +92,7 @@ updateModules modules st = st { psciLoadedModules = psciLoadedModules st ++ modu
93-- Updates the state to have more let bindings.
93-- Updates the state to have more let bindings.
95−updateLets :: (P.Value -> P.Value) -> PSCiState -> PSCiState
95+updateLets :: (P.Expr -> P.Expr) -> PSCiState -> PSCiState
96updateLets name st = st { psciLetBindings = name : psciLetBindings st }
96updateLets name st = st { psciLetBindings = name : psciLetBindings st }
98-- File helpers
98-- File helpers
@@ -242,7 +242,7 @@ mkdirp = createDirectoryIfMissing True . takeDirectory
243-- Makes a volatile module to execute the current expression.
243-- Makes a volatile module to execute the current expression.
245−createTemporaryModule :: Bool -> PSCiState -> P.Value -> P.Module
245+createTemporaryModule :: Bool -> PSCiState -> P.Expr -> P.Module
246createTemporaryModule exec PSCiState{psciImportedModuleNames = imports, psciLetBindings = lets} value =
246createTemporaryModule exec PSCiState{psciImportedModuleNames = imports, psciLetBindings = lets} value =
248 moduleName = P.ModuleName [P.ProperName "Main"]
248 moduleName = P.ModuleName [P.ProperName "Main"]
@@ -278,7 +278,7 @@ indexFile = ".psci_modules" ++ pathSeparator : "index.js"
279-- Takes a value declaration and evaluates it with the current state.
279-- Takes a value declaration and evaluates it with the current state.
281−handleDeclaration :: P.Value -> PSCI ()
281+handleDeclaration :: P.Expr -> PSCI ()
282handleDeclaration value = do
282handleDeclaration value = do
283 st <- PSCI $ lift get
283 st <- PSCI $ lift get
284 let m = createTemporaryModule True st value
284 let m = createTemporaryModule True st value
@@ -297,7 +297,7 @@ handleDeclaration value = do
298-- Takes a value and prints its type
298-- Takes a value and prints its type
300−handleTypeOf :: P.Value -> PSCI ()
300+handleTypeOf :: P.Expr -> PSCI ()
301handleTypeOf value = do
301handleTypeOf value = do
302 st <- PSCI $ lift get
302 st <- PSCI $ lift get
303 let m = createTemporaryModule False st value
303 let m = createTemporaryModule False st value
@@ -325,7 +325,7 @@ handleKindOf typ = do
325 Just (_, typ') -> do
325 Just (_, typ') -> do
326 let chk = P.CheckState env' 0 0 (Just mName)
326 let chk = P.CheckState env' 0 0 (Just mName)
327 k = L.runStateT (P.unCheck (P.kindOf mName typ')) chk
327 k = L.runStateT (P.unCheck (P.kindOf mName typ')) chk
328− case k of
328+ case k of
329 Left errStack -> PSCI . outputStrLn . P.prettyPrintErrorStack False $ errStack
329 Left errStack -> PSCI . outputStrLn . P.prettyPrintErrorStack False $ errStack
330 Right (kind, _) -> PSCI . outputStrLn . P.prettyPrintKind $ kind
330 Right (kind, _) -> PSCI . outputStrLn . P.prettyPrintKind $ kind
331 Nothing -> PSCI $ outputStrLn "Could not find kind"
331 Nothing -> PSCI $ outputStrLn "Could not find kind"