module Main (main) where import Data.Vector.Storable qualified as V import GarnetRs.Wrapped import System.IO main :: IO () main = do hello "Haskell" helloStruct T{a = True, b = 42} helloStruct T{a = False, b = maxBound} helloEnum E1 helloEnum E3 helloShape $ Circle 3.14 helloShape $ Rectangle 10.0 5.0 putStrLn $ "3 + 4 = " <> show (add 3 4) putStrLn $ "Tree sum: " <> show (sumTree (Fork (Fork (Leaf 1) (Fork (Leaf 2) (Leaf 3))) (Leaf 4))) putStrLn $ "Slice sum: " <> show (sumSlice $ V.fromList [0 .. 5]) putStrLn "Nothing." >> printOptional Nothing putStr "Something: " >> hFlush stdout >> printOptional (Just 67)