Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
153
Issues
153
List
Board
Labels
Milestones
Merge Requests
9
Merge Requests
9
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
haskell-gargantext
Commits
d968f5b4
Commit
d968f5b4
authored
May 31, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] create dir if not exist
parent
6b29b426
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
Prelude.hs
src/Gargantext/Prelude.hs
+6
-2
No files found.
src/Gargantext/Prelude.hs
View file @
d968f5b4
...
...
@@ -82,14 +82,18 @@ import qualified Data.List as L hiding (head, sum)
import
qualified
Data.Map
as
M
import
qualified
Data.Set
as
Set
import
qualified
Data.Vector
as
V
import
System.FilePath.Posix
(
takeDirectory
)
import
System.Directory
(
createDirectoryIfMissing
)
printDebug
::
(
Show
a
,
MonadBase
IO
m
)
=>
[
Char
]
->
a
->
m
()
printDebug
msg
x
=
liftBase
.
putStrLn
$
msg
<>
" "
<>
show
x
-- printDebug _ _ = pure ()
saveAsFileDebug
::
(
Show
a
,
MonadBase
IO
m
)
=>
[
Char
]
->
a
->
m
()
saveAsFileDebug
fname
x
=
liftBase
.
Protolude
.
writeFile
fname
$
pack
$
show
x
saveAsFileDebug
fname
x
=
do
let
dir
=
takeDirectory
fname
_
<-
liftBase
$
createDirectoryIfMissing
True
dir
liftBase
.
Protolude
.
writeFile
fname
$
pack
$
show
x
-- | splitEvery n == chunkAlong n n
...
...
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