git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Small cleanup to Language.PureScript.Interactive.IO (#2381)
eaaef21pete higgins
CONTRIBUTORS.md+1
@@ -63,6 +63,7 @@ This file lists the contributors to the PureScript compiler project, and the ter
63- [@paulyoung](https://github.com/paulyoung) (Paul Young) My existing contributions and all future contributions until further notice are Copyright Paul Young, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
63- [@paulyoung](https://github.com/paulyoung) (Paul Young) My existing contributions and all future contributions until further notice are Copyright Paul Young, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
64- [@pelotom](https://github.com/pelotom) (Thomas Crockett) My existing contributions and all future contributions until further notice are Copyright Thomas Crockett, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
64- [@pelotom](https://github.com/pelotom) (Thomas Crockett) My existing contributions and all future contributions until further notice are Copyright Thomas Crockett, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
65- [@phadej](https://github.com/phadej) (Oleg Grenrus) My existing contributions and all future contributions until further notice are Copyright Oleg Grenrus, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
65- [@phadej](https://github.com/phadej) (Oleg Grenrus) My existing contributions and all future contributions until further notice are Copyright Oleg Grenrus, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
66+- [@phiggins](https://github.com/phiggins) (Pete Higgins) My existing contributions and all future contributions until further notice are Copyright Pete Higgins, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
66- [@philopon](https://github.com/philopon) (Hirotomo Moriwaki) - My existing contributions and all future contributions until further notice are Copyright Hirotomo Moriwaki, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
67- [@philopon](https://github.com/philopon) (Hirotomo Moriwaki) - My existing contributions and all future contributions until further notice are Copyright Hirotomo Moriwaki, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
67- [@pseudonom](https://github.com/pseudonom) (Eric Easley) My existing contributions and all future contributions until further notice are Copyright Eric Easley, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
68- [@pseudonom](https://github.com/pseudonom) (Eric Easley) My existing contributions and all future contributions until further notice are Copyright Eric Easley, and are licensed to the owners and users of the PureScript compiler project under the terms of the [MIT license](http://opensource.org/licenses/MIT).
68- [@puffnfresh](https://github.com/puffnfresh) (Brian McKenna) All contributions I made during June 2015 were during employment at [SlamData, Inc.](#companies) who owns the copyright. I assign copyright of all my personal contributions before June 2015 to the owners of the PureScript compiler.
69- [@puffnfresh](https://github.com/puffnfresh) (Brian McKenna) All contributions I made during June 2015 were during employment at [SlamData, Inc.](#companies) who owns the copyright. I assign copyright of all my personal contributions before June 2015 to the owners of the PureScript compiler.
src/Language/PureScript/Interactive/IO.hs+2−9
@@ -1,11 +1,11 @@
1−module Language.PureScript.Interactive.IO where
1+module Language.PureScript.Interactive.IO (findNodeProcess, getHistoryFilename) where
2
2
3import Prelude.Compat
3import Prelude.Compat
4
4
5import Control.Monad (msum)
5import Control.Monad (msum)
6import Control.Monad.Trans.Maybe (MaybeT(..), runMaybeT)
6import Control.Monad.Trans.Maybe (MaybeT(..), runMaybeT)
7import System.Directory (createDirectoryIfMissing, getHomeDirectory, findExecutable)
7import System.Directory (createDirectoryIfMissing, getHomeDirectory, findExecutable)
8−import System.FilePath (takeDirectory, (</>), isPathSeparator)
8+import System.FilePath (takeDirectory, (</>))
9
9
10mkdirp :: FilePath -> IO ()
10mkdirp :: FilePath -> IO ()
11mkdirp = createDirectoryIfMissing True . takeDirectory
11mkdirp = createDirectoryIfMissing True . takeDirectory
@@ -32,10 +32,3 @@ getHistoryFilename = do
32 let filename = home </> ".purescript" </> "psci_history"
32 let filename = home </> ".purescript" </> "psci_history"
33 mkdirp filename
33 mkdirp filename
34 return filename
34 return filename
35−
36−-- |
37−-- Expands tilde in path.
38−--
39−expandTilde :: FilePath -> IO FilePath
40−expandTilde ('~':p:rest) | isPathSeparator p = (</> rest) <$> getHomeDirectory
41−expandTilde p = return p