vintage-basic 1.0 → 1.0.1
raw patch · 4 files changed
+19/−14 lines, 4 files
Files
- doc/Vintage_BASIC_Developer_Notes.html +1/−1
- doc/Vintage_BASIC_Users_Guide.html +6/−7
- src/Basic.hs +10/−4
- vintage-basic.cabal +2/−2
doc/Vintage_BASIC_Developer_Notes.html view
@@ -1,6 +1,6 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>Vintage BASIC Developer Notes</title></head> -<body><h1>Vintage BASIC Developer Notes 1.0</h1><p>© 2009, <a href="mailto://lyle@vintage-basic.net">Lyle Kopnicky</a></p><p>I began Vintage BASIC as a class project at the <a href="http://www.ogi.edu">Oregon Graduate +<body><h1>Vintage BASIC Developer Notes 1.0.1</h1><p>© 2009, <a href="mailto://lyle@vintage-basic.net">Lyle Kopnicky</a></p><p>I began Vintage BASIC as a class project at the <a href="http://www.ogi.edu">Oregon Graduate Institute</a>. My aim was to demonstrate advanced knowledge of monads in <a href="http://www.haskell.org">Haskell</a>. It occurred to me that BASIC's dynamic control structures would be
doc/Vintage_BASIC_Users_Guide.html view
@@ -4,7 +4,7 @@ </head> <body> -<h1>Vintage BASIC User's Guide 1.0</h1> +<h1>Vintage BASIC User's Guide 1.0.1</h1> <p>© 2009, <a href="mailto://lyle@vintage-basic.net">Lyle Kopnicky</a></p> <p>Congratulations on installing Vintage BASIC! You are now the @@ -66,13 +66,13 @@ For Windows, you can simply download <code>vintbas.exe</code>, and put it it somewhere in your path. For other systems, consult the <a href="http://www.vintage-basic.net/download.html">download page</a>.<br> <h3>Installation from source</h3> -<p>You can download the source code tarball, <code>vintage-basic-1.0.tar.gz</code>, from +<p>You can download the source code tarball, <code>vintage-basic-1.0.1.tar.gz</code>, from either <a href="http://www.vintage-basic.net/downloads.html">vintage-basic.net</a> or <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/vintage-basic">Hackage</a>.</p> <p>You should first unpack the tarball <code></code>using a tool such as tar, 7-Zip or WinZip. Then open a shell/console in -the vintage-basic-1.0 directory, and type: +the vintage-basic-1.0.1 directory, and type: http://hackage.haskell.org/packages/archive/armada/0.1/armada-0.1.tar.gz<br> <br> <code> runhaskell Setup.hs configure<br> @@ -87,10 +87,9 @@ </p> <h2><a class="mozTocH2" name="mozTocId230604"></a>Running Vintage BASIC</h2> -<p>The interpreter consists of one command-line tool, <code><span class="">vintbas</span></code> (<code>vintbas.exe</code> -on Windows). It can take any number of filename parameters, each one -the name of a BASIC source file. By convention (but not fiat), those -should end in <code>.bas</code>. So, if you've written +<p>The interpreter consists of one command-line tool, <code><span class="">vintbas</span></code>.+It takes one filename parameter, the name of a BASIC source file. +By convention (but not fiat), it should end in <code>.bas</code>. So, if you've written BASIC code and saved it in <code>miracle.bas</code>, you'd run it by typing <code>vintbas miracle.bas</code>.</p> <h2><a class="mozTocH2" name="mozTocId153285"></a>BASIC
src/Basic.hs view
@@ -1,14 +1,20 @@-import System.Environment(getArgs)+import System.Environment(getArgs,getProgName)+import System.Exit import System.IO-import Language.VintageBasic.Executer(executeFile)-import Language.VintageBasic.BasicMonad(runProgram)+import Control.Monad(unless) import Control.Monad.CPST.DurableTraps(done) import IO.IOStream+import Language.VintageBasic.Executer(executeFile)+import Language.VintageBasic.BasicMonad(runProgram) --- | Runs a list of BASIC programs specified on the command line.+-- | Runs a BASIC program specified on the command line. main :: IO () main = do args <- getArgs+ unless (length args == 1) $ do+ progName <- getProgName+ hPutStrLn stderr ("Usage: " ++ progName ++ " SOURCE_FILE.bas")+ exitFailure runProgram (IOStream stdin) (IOStream stdout) $ do sequence_ [executeFile fileName | fileName <- args] done
vintage-basic.cabal view
@@ -1,8 +1,8 @@ Name: vintage-basic -Version: 1.0 +Version: 1.0.1 Cabal-Version: >= 1.6 Stability: experimental -Synopsis: Interpreter for 1970s-era BASIC +Synopsis: Interpreter for microcomputer-era BASIC Description: An interpreter for what is essentially Microsoft BASIC v2, what you might find on a computer in the late 70s or early