From 6ca6b3ae67c2e345be8d672ccc542b4edff99e3d Mon Sep 17 00:00:00 2001 From: pb Date: Sat, 28 Nov 2009 19:57:09 +0000 Subject: git-svn-id: https://ssl.buetow.org/repos/hsbot/trunk@4 9f8f72e9-4bf4-416e-b76e-7d4203597157 --- Foo.hs | 9 +++++++++ HsBot.hs | 15 +-------------- Makefile | 5 ++++- 3 files changed, 14 insertions(+), 15 deletions(-) create mode 100644 Foo.hs diff --git a/Foo.hs b/Foo.hs new file mode 100644 index 0000000..08ec797 --- /dev/null +++ b/Foo.hs @@ -0,0 +1,9 @@ +-- Karmabot By Paul C. Buetow + +module Main (main) where + +import Control.Monad.State +import IO + +main = return $ "hello" + diff --git a/HsBot.hs b/HsBot.hs index 2d0c5f5..dd0e875 100644 --- a/HsBot.hs +++ b/HsBot.hs @@ -2,8 +2,7 @@ module Main (main) where -import Control.Monad (forM) ---import Control.Monad.State +import Control.Monad.State import IO import Monad import Random @@ -121,18 +120,6 @@ readline = do _ -> putStrLn "" -newtype Transformator a = Transformator { execTransformator :: (a, Conf) } - -runTransformator = execTransformator -record s = Transformator ([s], ()) - -instance Monad Transformator where - return c = Transformator ([], c) - c >>= f = let (s, c') = execTransformator c - s' = f s - in Transformator (s', c') - - main :: IO () main = putStrLn "Good bye" diff --git a/Makefile b/Makefile index 5cf710f..e5a5b48 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ all: ghc HsBot.hs -o hsbot - test: all ./hsbot +foo: + ghc Foo.hs -o foo +test: foo + ./foo -- cgit v1.2.3