Commit 1b6d9081 authored by Andrew Gibiansky's avatar Andrew Gibiansky

Merge pull request #634 from hansroland/fix-example

Fix test example for juicypixels
parents f2393509 5d92d4fe
{ {
"metadata": { "cells": [
"language": "haskell", {
"name": "", "cell_type": "markdown",
"signature": "sha256:b9b36c162e37a16b252cd1f06e4c2991e0a80710e7fc184be82dd6b18e6dcf01" "metadata": {
}, "hidden": false
"nbformat": 3, },
"nbformat_minor": 0, "source": [
"worksheets": [ "# Notebook test\n",
"\n",
"This IHaskell noteook should just test, whether IHaskell and JuicyPixels are properly installed and working.\n",
"\n",
"Just click in the box below and click on the \"Run\" command in the above menu. "
]
},
{ {
"cells": [ "cell_type": "code",
{ "execution_count": null,
"cell_type": "code", "metadata": {
"collapsed": false, "collapsed": false,
"input": [ "hidden": false
"{-# LANGUAGE NoImplicitPrelude, TypeSynonymInstances, FlexibleInstances #-}\n", },
"\n", "outputs": [],
"import IHaskell.Display.Juicypixels\n", "source": [
" \n", "{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}\n",
"myImage = generateImage pixelRenderer 250 300\n", "\n",
" where pixelRenderer x y = PixelRGB8 (fromIntegral x) (fromIntegral y) 128\n", "import IHaskell.Display.Juicypixels\n",
" \n", "import Codec.Picture\n",
"myImage " " \n",
], "myImage = generateImage pixelRenderer 250 300\n",
"language": "python", " where pixelRenderer x y = PixelRGB8 (fromIntegral x) (fromIntegral y) 128\n",
"metadata": {}, " \n",
"outputs": [], "myImage "
"prompt_number": 8 ]
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
} }
] ],
} "metadata": {
\ No newline at end of file "kernelspec": {
"display_name": "Haskell",
"language": "haskell",
"name": "haskell"
},
"language_info": {
"codemirror_mode": "ihaskell",
"file_extension": ".hs",
"name": "haskell",
"version": "7.10.3"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
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