mad/byg/src/Main.hs

23 lines
529 B
Haskell
Raw Normal View History

2024-09-11 22:32:14 +02:00
module Main where
2024-09-21 17:13:20 +02:00
import ComputationM
import Functions
2024-09-21 22:40:17 +02:00
handleRecipeDir :: Token FilePath -> ComputationM ()
handleRecipeDir dir = do
dirContents <- listDirectory dir
imageFilenames <- filterComputationM isImageFilename dirContents
t <- inject ("hej", "hey.txt")
saveFile t
2024-09-21 18:49:50 +02:00
test :: ComputationM ()
test = do
dir <- inject "retter"
2024-09-21 17:41:04 +02:00
dirContents <- listDirectory dir
2024-09-21 22:40:17 +02:00
mapComputationM_ handleRecipeDir dirContents
t <- inject ("hej", "hey.txt")
saveFile t
2024-09-11 22:32:14 +02:00
main :: IO ()
2024-09-21 17:13:20 +02:00
main = mapM_ print $ evalComputationM test