Consider this simple .hs file:
module MinHaddockFail where
yo :: String
yo = "yo"
| #!/usr/bin/env runghc | |
| module Main where | |
| {- | |
| Uninstall.hs - a Haskell uninstaller for Mac OS X | |
| This program is really far too big to be in a single file. However, I | |
| wanted it to be easily distributable and runnable, and so have kept it all | |
| together. |
| module Ant | |
| where | |
| import Prelude hiding (log) | |
| import Control.Monad ((>=>)) | |
| import Data.List ((\\)) | |
| -- | A Simple logging Monad that logs items of type e |
| module Triangle where | |
| -- top-down version | |
| minTriangleFlow :: (Num a, Ord a) => [[a]] -> a | |
| minTriangleFlow = minimum . foldl sift [] | |
| where sift as bs = zipWith (+) bs $ pres as | |
| pres [] = [0] | |
| pres as@(ah:at) = ah : zipWith min as at ++ [last as] | |
| -- bottom-up version (not safe if triangle input is misformed) |
| module SetPrime where | |
| -- import qualified Data. as List | |
| -- no need to import List, as the function all is in the Prelude | |
| import Control.Applicative ((<$>), (<*>)) | |
| -- prefer explicit imports most of the time | |
| data Shape = Oval | Squiggle | Diamond deriving (Show, Eq, Bounded, Enum, Ord) | |
| data Color = Red | Purple | Green deriving (Show, Eq, Bounded, Enum, Ord) |
| {- | |
| Copyright 2012-2013 Google Inc. All Rights Reserved. | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software |
| module SequsHorribilis | |
| where | |
| import Test.HUnit | |
| type Sequs = [Horribilis] | |
| data Horribilis = Atom Int | List Sequs | |
| deriving (Eq, Show) | |
| upThru :: Int -> Sequs -> Sequs |
| #!/bin/sh | |
| inPreprocessorMode () { | |
| hasE=0 | |
| hasU=0 | |
| hasT=0 | |
| for arg in "$@" | |
| do | |
| if [ 'x-E' = "x$arg" ]; then hasE=1; fi | |
| if [ 'x-undef' = "x$arg" ]; then hasU=1; fi |
These are instructions for building a stand alone, headless, music computer based on the Pisound audio card and a RaspberryPi 3.
I use this set up in my live performance rig where it does all of the following without breaking a sweat: