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
77cebfe3
Commit
77cebfe3
authored
Dec 27, 2013
by
Andrew Gibiansky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaned up old code
parent
e9f21bf3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
36 deletions
+48
-36
Haskell-Notebook.ipynb
Haskell-Notebook.ipynb
+48
-7
IPython.hs
IHaskell/IPython.hs
+0
-29
No files found.
Haskell-Notebook.ipynb
View file @
77cebfe3
...
@@ -12,34 +12,75 @@
...
@@ -12,34 +12,75 @@
"cell_type": "code",
"cell_type": "code",
"collapsed": false,
"collapsed": false,
"input": [
"input": [
"data X = Y Int"
"import Diagrams.Prelude\n",
"import Diagrams.Backend.SVG.CmdLine\n",
":extension NoMonomorphismRestriction"
],
],
"language": "python",
"language": "python",
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"prompt_number":
2
"prompt_number":
8
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"collapsed": false,
"collapsed": false,
"input": [
"input": [
"data X = Y Int deriving Show"
"example = circle 1 # fc blue\n",
" # lw 0.05\n",
" # lc purple\n",
" # dashing [0.2,0.05] 0\n",
"\n",
"test :: Diagram SVG R2 -> Diagram SVG R2\n",
"test = id"
],
],
"language": "python",
"language": "python",
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"prompt_number":
4
"prompt_number":
15
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"collapsed": false,
"collapsed": false,
"input": [
"input": [
"print (Y 3)"
":t example\n",
":t test example\n",
":t example :: Diagram B R2"
],
],
"language": "python",
"language": "python",
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [
"prompt_number": 5
{
"html": [
"<span style='font-weight: bold; color: green;'>forall b. (TrailLike b, Transformable b, HasStyle b, V b ~ R2) => b</span>"
],
"metadata": {},
"output_type": "display_data",
"text": [
"forall b. (TrailLike b, Transformable b, HasStyle b, V b ~ R2) => b"
]
},
{
"html": [
"<span style='font-weight: bold; color: green;'>Diagram SVG R2</span>"
],
"metadata": {},
"output_type": "display_data",
"text": [
"Diagram SVG R2"
]
},
{
"html": [
"<span style='font-weight: bold; color: green;'>Diagram B R2</span>"
],
"metadata": {},
"output_type": "display_data",
"text": [
"Diagram B R2"
]
}
],
"prompt_number": 16
},
},
{
{
"cell_type": "code",
"cell_type": "code",
...
...
IHaskell/IPython.hs
View file @
77cebfe3
...
@@ -90,35 +90,6 @@ setupIPythonProfile profile = shelly $ do
...
@@ -90,35 +90,6 @@ setupIPythonProfile profile = shelly $ do
liftIO
$
copyProfile
profileDir
liftIO
$
copyProfile
profileDir
insertIHaskellPath
profileDir
insertIHaskellPath
profileDir
{-
writeConfigFilesTo profileDir path
-- | Write IPython configuration files to the profile directory.
writeConfigFilesTo :: Text -- ^ Profile directory to write to. Must have a trailing slash.
-> String -- ^ Path to IHaskell executable.
-> Sh ()
writeConfigFilesTo profileDir ihaskellPath = do
writeFile (conf "ipython_config.py") $ Config.ipython ihaskellPath
writeFile (conf "ipython_notebook_config.py") Config.notebook
writeFile (conf "ipython_console_config.py") Config.console
writeFile (conf "ipython_qtconsole_config.py") Config.qtconsole
-- The custom directory many not exist, in which case we'll create it.
mkdir_p (conf "static/custom/")
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.
mkdir_p (conf "static/notebook/")
mkdir_p (conf "static/notebook/js")
forM_ Config.notebookJavascript $ \(file, content) ->
writeFile (conf "static/notebook/js/" ++ file) content
where
conf filename = fromText $ profileDir ++ filename
-}
-- | Copy the profile files into the IPython profile.
-- | Copy the profile files into the IPython profile.
copyProfile
::
Text
->
IO
()
copyProfile
::
Text
->
IO
()
...
...
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