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
68bcf6c5
Commit
68bcf6c5
authored
Dec 13, 2013
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding logo!
parent
24db4b42
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
6 deletions
+16
-6
Display.hs
IHaskell/Display.hs
+3
-1
Evaluate.hs
IHaskell/Eval/Evaluate.hs
+4
-3
IPython.hs
IHaskell/IPython.hs
+3
-0
Main.hs
Main.hs
+0
-1
Setup.hs
Setup.hs
+6
-1
ihaskell-logo.png
images/ihaskell-logo.png
+0
-0
No files found.
IHaskell/Display.hs
View file @
68bcf6c5
...
@@ -7,6 +7,8 @@ module IHaskell.Display (
...
@@ -7,6 +7,8 @@ module IHaskell.Display (
)
where
)
where
import
ClassyPrelude
import
ClassyPrelude
import
Data.String.Utils
(
rstrip
)
import
IHaskell.Types
import
IHaskell.Types
-- | A class for displayable Haskell types.
-- | A class for displayable Haskell types.
...
@@ -15,7 +17,7 @@ class IHaskellDisplay a where
...
@@ -15,7 +17,7 @@ class IHaskellDisplay a where
-- | Generate a plain text display.
-- | Generate a plain text display.
plain
::
String
->
DisplayData
plain
::
String
->
DisplayData
plain
=
Display
PlainText
plain
=
Display
PlainText
.
rstrip
-- | Generate an HTML display.
-- | Generate an HTML display.
html
::
String
->
DisplayData
html
::
String
->
DisplayData
...
...
IHaskell/Eval/Evaluate.hs
View file @
68bcf6c5
...
@@ -190,7 +190,7 @@ evalCommand (Directive GetType expr) = wrapExecution $ do
...
@@ -190,7 +190,7 @@ evalCommand (Directive GetType expr) = wrapExecution $ do
result
<-
exprType
expr
result
<-
exprType
expr
flags
<-
getSessionDynFlags
flags
<-
getSessionDynFlags
let
typeStr
=
showSDocUnqual
flags
$
ppr
result
let
typeStr
=
showSDocUnqual
flags
$
ppr
result
return
[
Display
PlainText
typeStr
,
Display
MimeH
tml
$
formatGetType
typeStr
]
return
[
plain
typeStr
,
h
tml
$
formatGetType
typeStr
]
evalCommand
(
Statement
stmt
)
=
do
evalCommand
(
Statement
stmt
)
=
do
write
$
"Statement: "
++
stmt
write
$
"Statement: "
++
stmt
...
@@ -200,7 +200,7 @@ evalCommand (Statement stmt) = do
...
@@ -200,7 +200,7 @@ evalCommand (Statement stmt) = do
RunOk
names
->
do
RunOk
names
->
do
dflags
<-
getSessionDynFlags
dflags
<-
getSessionDynFlags
write
$
"Names: "
++
show
(
map
(
showPpr
dflags
)
names
)
write
$
"Names: "
++
show
(
map
(
showPpr
dflags
)
names
)
let
output
=
[
Display
PlainText
printed
|
not
.
null
$
strip
printed
]
let
output
=
[
plain
printed
|
not
.
null
$
strip
printed
]
return
(
Success
,
output
)
return
(
Success
,
output
)
RunException
exception
->
do
RunException
exception
->
do
write
$
"RunException: "
++
show
exception
write
$
"RunException: "
++
show
exception
...
@@ -300,6 +300,7 @@ formatError :: ErrMsg -> String
...
@@ -300,6 +300,7 @@ formatError :: ErrMsg -> String
formatError
=
printf
"<span style='color: red; font-style: italic;'>%s</span>"
.
formatError
=
printf
"<span style='color: red; font-style: italic;'>%s</span>"
.
replace
"
\n
"
"<br/>"
.
replace
"
\n
"
"<br/>"
.
replace
useDashV
""
.
replace
useDashV
""
.
rstrip
.
typeCleaner
typeCleaner
where
where
useDashV
=
"
\n
Use -v to see a list of the files searched for."
useDashV
=
"
\n
Use -v to see a list of the files searched for."
...
@@ -312,4 +313,4 @@ formatGetType :: String -> String
...
@@ -312,4 +313,4 @@ formatGetType :: String -> String
formatGetType
=
printf
"<span style='font-weight: bold; color: green;'>%s</span>"
formatGetType
=
printf
"<span style='font-weight: bold; color: green;'>%s</span>"
displayError
::
ErrMsg
->
[
DisplayData
]
displayError
::
ErrMsg
->
[
DisplayData
]
displayError
msg
=
[
Display
PlainText
msg
,
Display
MimeH
tml
$
formatError
msg
]
displayError
msg
=
[
plain
msg
,
h
tml
$
formatError
msg
]
IHaskell/IPython.hs
View file @
68bcf6c5
...
@@ -97,6 +97,9 @@ writeConfigFilesTo profileDir ihaskellPath = do
...
@@ -97,6 +97,9 @@ writeConfigFilesTo profileDir ihaskellPath = do
mkdir_p
(
conf
"static/custom/"
)
mkdir_p
(
conf
"static/custom/"
)
writeFile
(
conf
"static/custom/custom.js"
)
Config
.
customjs
writeFile
(
conf
"static/custom/custom.js"
)
Config
.
customjs
-- Make directory for images.
mkdir_p
(
conf
"static/base/images"
)
-- The notebook/js directory many not exist, in which case we'll create it.
-- The notebook/js directory many not exist, in which case we'll create it.
mkdir_p
(
conf
"static/notebook/"
)
mkdir_p
(
conf
"static/notebook/"
)
mkdir_p
(
conf
"static/notebook/js"
)
mkdir_p
(
conf
"static/notebook/js"
)
...
...
Main.hs
View file @
68bcf6c5
...
@@ -144,7 +144,6 @@ replyTo interface ExecuteRequest{ getCode = code } replyHeader state = do
...
@@ -144,7 +144,6 @@ replyTo interface ExecuteRequest{ getCode = code } replyHeader state = do
-- Construct a function for publishing output as this is going.
-- Construct a function for publishing output as this is going.
let
publish
::
[
DisplayData
]
->
Interpreter
()
let
publish
::
[
DisplayData
]
->
Interpreter
()
publish
outputs
=
do
publish
outputs
=
do
liftIO
$
print
outputs
header
<-
dupHeader
replyHeader
DisplayDataMessage
header
<-
dupHeader
replyHeader
DisplayDataMessage
send
$
PublishDisplayData
header
"haskell"
outputs
send
$
PublishDisplayData
header
"haskell"
outputs
...
...
Setup.hs
View file @
68bcf6c5
...
@@ -6,7 +6,12 @@ main :: IO ()
...
@@ -6,7 +6,12 @@ main :: IO ()
main
=
defaultMainWithHooks
simpleUserHooks
{
main
=
defaultMainWithHooks
simpleUserHooks
{
preConf
=
\
args
confFlags
->
do
preConf
=
\
args
confFlags
->
do
buildParser
buildParser
preConf
simpleUserHooks
args
confFlags
preConf
simpleUserHooks
args
confFlags
,
postInst
=
\
args
flags
descr
buildInfo
->
do
postInst
simpleUserHooks
args
flags
descr
buildInfo
system
"IHaskell setup"
system
"cp ./images/ihaskell-logo.png `ipython locate profile haskell`/static/base/images/ipynblogo.png"
return
()
}
}
buildParser
=
system
"./build-parser.sh"
buildParser
=
system
"./build-parser.sh"
images/ihaskell-logo.png
0 → 100644
View file @
68bcf6c5
42.9 KB
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