twentefp 0.4 → 0.4.1
raw patch · 4 files changed
+78/−49 lines, 4 files
Files
- README +28/−0
- examples/Prac6.hs +46/−0
- examples/prac6.hs +0/−46
- twentefp.cabal +4/−3
+ README view
@@ -0,0 +1,28 @@+= ALL =+Install the 'gloss' package with the GLFW backend:+- cabal install gloss --flags="-GLUT GLFW" --enable-documentation+Install this package:+- cabal install twentefp --enable-documentation++= Windows =+- Add the GLUT32.DLL [1] to your "%systemroot%\System32" or "%systemroot%\SysWow64" directory+- Create "%appdata%\ghc\ghci.conf"+- Add the following lines to "%appdata%\ghc\ghci.conf":+:set -XNoImplicitPrelude+:set -XNoMonomorphisRestriction++= Linux =+- Create "~/.ghci"+- Add the following lines to ".ghci":+:set -XNoImplicitPrelude+:set -XNoMonomorphisRestriction++= OS X =+- Create "~/.ghci"+- Add the following lines to ".ghci":+:set -XNoImplicitPrelude+:set -XNoMonomorphisRestriction+:set -fno-ghci-sandbox+++[1] http://user.xmission.com/~nate/glut.html
+ examples/Prac6.hs view
@@ -0,0 +1,46 @@+module Prac6 where++import Prelude+import FPPrac.Graphics+import FPPrac.Events+import Graphics++import System.FilePath (splitPath, dropExtension)++import CreateGraph+import Debug.Trace++data MyStore = MyStore+ { myGraph :: Graph+ }++initPrac6 graph = MyStore {myGraph = graph}++main = doGraph doPrac6 initPrac6 myGraph drawMypracBottomLine++doPrac6 :: MyStore -> Input -> (MyStore,[Output])+-- =======================================+-- = Voeg hier extra doPrac6 clauses toe =+-- =======================================+-- doPrac6 myStore (KeyIn 'r') = (myStore', o)+-- where+-- myStore' = ...+-- o = ...+--++doPrac6 myStore i = (myStore,[])++drawMypracBottomLine :: Graph -> Picture+drawMypracBottomLine graph =+ Pictures+ [ Translate 0 (-300 + bottomLineHeight / 2) $ Color white $ rectangleSolid 800 bottomLineHeight+ , Color black $ Line [(-400,height1),(400,height1)]+ , Color black $ Line [(-240,height1),(-240,-300)]+ , Translate (-392) height2 $ Color black $ Scale 0.11 0.11 $ Text "myprac:"+ , Translate (-332) height2 $ Color red $ Scale 0.11 0.11 $ Text $ (case (name graph) of "" -> "" ; xs -> dropExtension $ last $ splitPath xs)+ -- Vervang onderstaande tekst, indien nodig, door extra informatie+ , Translate (-235) height2 $ Color black $ Scale 0.11 0.11 $ Text "Press 'q' to return to node-drawing"+ ]+ where+ height1 = -300 + bottomLineHeight+ height2 = -300 + bottomTextHeight
− examples/prac6.hs
@@ -1,46 +0,0 @@-module Prac6 where--import Prelude-import FPPrac.Graphics-import FPPrac.Events-import Graphics--import System.FilePath (splitPath, dropExtension)--import CreateGraph-import Debug.Trace--data MyStore = MyStore- { myGraph :: Graph- }--initPrac6 graph = MyStore {myGraph = graph}--main = doGraph doPrac6 initPrac6 myGraph drawMypracBottomLine--doPrac6 :: MyStore -> Input -> (MyStore,[Output])--- =======================================--- = Voeg hier extra doPrac6 clauses toe =--- =======================================--- doPrac6 myStore (KeyIn 'r') = (myStore', o)--- where--- myStore' = ...--- o = ...-----doPrac6 myStore i = (myStore,[])--drawMypracBottomLine :: Graph -> Picture-drawMypracBottomLine graph =- Pictures- [ Translate 0 (-300 + bottomLineHeight / 2) $ Color white $ rectangleSolid 800 bottomLineHeight- , Color black $ Line [(-400,height1),(400,height1)]- , Color black $ Line [(-240,height1),(-240,-300)]- , Translate (-392) height2 $ Color black $ Scale 0.11 0.11 $ Text "myprac:"- , Translate (-332) height2 $ Color red $ Scale 0.11 0.11 $ Text $ (case (name graph) of "" -> "" ; xs -> dropExtension $ last $ splitPath xs)- -- Vervang onderstaande tekst, indien nodig, door extra informatie- , Translate (-235) height2 $ Color black $ Scale 0.11 0.11 $ Text "Press 'q' to return to node-drawing"- ]- where- height1 = -300 + bottomLineHeight- height2 = -300 + bottomTextHeight
twentefp.cabal view
@@ -1,5 +1,5 @@ Name: twentefp-Version: 0.4+Version: 0.4.1 Synopsis: Lab Assignments Environment at Univeriteit Twente Description: Lab Assignments Environment at Univeriteit Twente License: BSD3@@ -10,9 +10,10 @@ Build-type: Simple Cabal-version: >=1.6 -Extra-Source-Files: examples/CreateGraph.hs,+Extra-Source-Files: README,+ examples/CreateGraph.hs, examples/Graphics.hs,- examples/prac6.hs,+ examples/Prac6.hs, examples/RBgraphics.hs, examples/RBrun.hs, examples/RoseTree.hs