Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
gargantext-ihaskell
Commits
bae2b044
Commit
bae2b044
authored
Dec 13, 2013
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing the error that deletes half your filesystem if you use modules
parent
7f97d11d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
Main.hs
Main.hs
+7
-0
No files found.
Main.hs
View file @
bae2b044
...
@@ -9,6 +9,7 @@ import Control.Concurrent.Chan
...
@@ -9,6 +9,7 @@ import Control.Concurrent.Chan
import
Data.Aeson
import
Data.Aeson
import
Text.Printf
import
Text.Printf
import
System.Exit
(
exitSuccess
)
import
System.Exit
(
exitSuccess
)
import
System.Directory
import
qualified
Data.Map
as
Map
import
qualified
Data.Map
as
Map
...
@@ -57,6 +58,12 @@ main = do
...
@@ -57,6 +58,12 @@ main = do
kernel
::
String
-- ^ Filename of profile JSON file.
kernel
::
String
-- ^ Filename of profile JSON file.
->
IO
()
->
IO
()
kernel
profileSrc
=
do
kernel
profileSrc
=
do
-- Switch to a temporary directory so that any files we create aren't
-- visible. On Unix, this is usually /tmp. If there is no temporary
-- directory available, just stay in the current one and ignore the
-- raised exception.
try
(
getTemporaryDirectory
>>=
setCurrentDirectory
)
::
IO
(
Either
SomeException
()
)
-- Parse the profile file.
-- Parse the profile file.
Just
profile
<-
liftM
decode
.
readFile
.
fpFromText
$
pack
profileSrc
Just
profile
<-
liftM
decode
.
readFile
.
fpFromText
$
pack
profileSrc
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment