From 33197faf9b626acb6c2815786e6caa316df64a33 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Sun, 11 Feb 2024 23:29:09 -0700 Subject: Move Main.hs to Config.hs and override _start() Now if one tries to execute the built binary with 'stack run' or by just executing it, a helpful message prints to the screen instead of the segmentation fault that normally happens. This technically makes things not portable to other architectures, but it's all just window dressing and can be taken out if need be for other architectures. --- src/Config.hs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/Config.hs (limited to 'src/Config.hs') diff --git a/src/Config.hs b/src/Config.hs new file mode 100644 index 0000000..14326cb --- /dev/null +++ b/src/Config.hs @@ -0,0 +1,8 @@ +module Config () where + +import Wetterhorn.Core + +foreign export ccall wetterhorn :: IO Wetterhorn + +wetterhorn :: IO Wetterhorn +wetterhorn = initWetterhorn defaultConfig -- cgit