From 7adbf480555e803bded190b013b1d1f70ae471db Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Thu, 8 Feb 2024 22:04:31 -0700 Subject: Just some minor changes. Proof of concept for state change. --- src/Main.hs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index 2d15fce..bdffd6f 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,18 +1,22 @@ {-# HLINT ignore "Use camelCase" #-} module Main (main) where -import Control.Monad.Writer (execWriter, MonadWriter (tell)) +import Control.Monad.Writer (MonadWriter (tell), execWriter) import Wetterhorn.Core foreign export ccall wetterhorn :: IO Wetterhorn + wetterhorn :: IO Wetterhorn wetterhorn = - initWetterhorn $ - WConfig "This is a string" - (do - (WState str _) <- getWState - wio $ putStrLn $ "Handle something!!! :) " ++ str) + initWetterhorn $ + WConfig + "This is a string" + ( do + (WState str i) <- getWState + wio $ putStrLn $ "Handle something!!! :) " ++ str ++ " " ++ show i + incrementState + ) main :: IO () main = putStrLn "This should be dynamically linked!\n" -- cgit