diff --git a/app/Main.hs b/app/Main.hs index 5f103f0..1a1bfff 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -1,7 +1,12 @@ module Main where import Frontend (interpreter) -import System.Console.Haskeline (defaultSettings, runInputT) +import System.Console.Haskeline (Settings(..), defaultSettings, runInputT) +import System.Environment (lookupEnv) main :: IO () -main = runInputT defaultSettings interpreter +main = do + hf <- lookupEnv "HOME" + runInputT + defaultSettings {historyFile = fmap (++ "/.prlg_history") hf} + interpreter