garnet/exe/Main.hs

14 lines
386 B
Haskell
Raw Permalink Normal View History

2026-02-17 14:57:34 +00:00
module Main (main) where
2026-02-19 13:44:16 +00:00
import GarnetRs.Wrapped
2026-02-17 14:57:34 +00:00
main :: IO ()
main = do
2026-02-19 13:44:16 +00:00
hello "Haskell"
helloStruct T{a = True, b = 42}
helloStruct T{a = False, b = maxBound}
2026-02-19 13:44:16 +00:00
helloShape $ Circle 3.14
helloShape $ Rectangle 10.0 5.0
2026-02-19 15:56:55 +00:00
putStrLn $ "3 + 4 = " <> show (add 3 4)
2026-02-19 21:35:35 +00:00
putStrLn $ "Tree sum: " <> show (sumTree (Fork (Fork (Leaf 1) (Fork (Leaf 2) (Leaf 3))) (Leaf 4)))