diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2024-02-08 21:08:00 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2024-02-08 21:08:00 -0700 |
| commit | dac9d40ce5f4f1bee733acb1ed91b301c899c2d6 (patch) | |
| tree | a69c70ab730a4fcf8691c473d9d33b836ddc3f4e /src/Main.hs | |
| parent | 3e5cdf208606700b45acecf7c8a0b366a8caa106 (diff) | |
| download | montis-dac9d40ce5f4f1bee733acb1ed91b301c899c2d6.tar.gz montis-dac9d40ce5f4f1bee733acb1ed91b301c899c2d6.tar.bz2 montis-dac9d40ce5f4f1bee733acb1ed91b301c899c2d6.zip | |
Made some more complex state in Wetterhorn.
Things are still purely for testing as I figure out how best to handle
the ffi boundary, though things are starting to make sense.
Diffstat (limited to 'src/Main.hs')
| -rw-r--r-- | src/Main.hs | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/Main.hs b/src/Main.hs index c43ef13..2d15fce 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,14 +1,18 @@ +{-# HLINT ignore "Use camelCase" #-} + module Main (main) where import Control.Monad.Writer (execWriter, MonadWriter (tell)) -foreign export ccall call_in :: IO () -call_in :: IO () -call_in = putStrLn $ execWriter $ do - tell "Yo," - tell " This was " - tell "Called" - tell " From" - tell " C!!" +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) main :: IO () main = putStrLn "This should be dynamically linked!\n" |