Commit 77cebfe3 authored by Andrew Gibiansky's avatar Andrew Gibiansky

cleaned up old code

parent e9f21bf3
......@@ -12,34 +12,75 @@
"cell_type": "code",
"collapsed": false,
"input": [
"data X = Y Int"
"import Diagrams.Prelude\n",
"import Diagrams.Backend.SVG.CmdLine\n",
":extension NoMonomorphismRestriction"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 2
"prompt_number": 8
},
{
"cell_type": "code",
"collapsed": false,
"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",
"metadata": {},
"outputs": [],
"prompt_number": 4
"prompt_number": 15
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"print (Y 3)"
":t example\n",
":t test example\n",
":t example :: Diagram B R2"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 5
"outputs": [
{
"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",
......
......@@ -90,35 +90,6 @@ setupIPythonProfile profile = shelly $ do
liftIO $ copyProfile 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.
copyProfile :: Text -> IO ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment