Permalink
Browse files

Add test programs.

  • Loading branch information...
1 parent 6f9c9d2 commit 82403884dda2dddcd36f217cb69aafd997a0b0d6 @23Skidoo committed May 31, 2012
Showing with 19 additions and 0 deletions.
  1. +16 −0 test/glut.hs
  2. +3 −0 test/regex.hs
View
@@ -0,0 +1,16 @@
+import Graphics.Rendering.OpenGL
+import Graphics.UI.GLUT
+
+myPoints :: [(GLfloat,GLfloat,GLfloat)]
+myPoints = map (\k -> (sin(2*pi*k/12),cos(2*pi*k/12),0.0)) [1..12]
+
+main = do
+ (progname, _) <- getArgsAndInitialize
+ createWindow "Hello World"
+ displayCallback $= display
+ mainLoop
+
+display = do
+ clear [ColorBuffer]
+ renderPrimitive Points $ mapM_ (\(x, y, z)->vertex$Vertex3 x y z) myPoints
+ flush
View
@@ -0,0 +1,3 @@
+import Text.Regex.Posix
+
+main = print $ ("bar" =~ "(foo|bar)" :: Bool)

0 comments on commit 8240388

Please sign in to comment.