File: HelloWorld.hs

package info (click to toggle)
haskell-alut 2.2.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 484 kB
  • ctags: 19
  • sloc: sh: 2,811; haskell: 535; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 607 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{-
   HelloWorld.hs (adapted from hello_world.c in freealut)
   Copyright (c) Sven Panne 2005-2009 <sven.panne@aedion.de>
   This file is part of the ALUT package & distributed under a BSD-style license
   See the file libraries/ALUT/LICENSE
-}

import Sound.ALUT

-- This is the Haskell version of the 'Hello World' program from the ALUT
-- reference manual.

main :: IO ()
main =
   withProgNameAndArgs runALUT $ \_progName _args -> do
      helloBuffer <- createBuffer HelloWorld
      [helloSource] <- genObjectNames 1
      buffer helloSource $= Just helloBuffer
      play [helloSource]
      sleep 1