Commit 8026bd11 authored by Mart Lubbers's avatar Mart Lubbers
Browse files

Add date of generation to the preloaded_tasks.h

parent 607b460d
Pipeline #53982 passed with stage
in 1 minute and 35 seconds
......@@ -16,6 +16,7 @@ import Text.HTML
import System.Time
import iTasks
import iTasks.Extensions.DateTime
import mTask.Interpret.ByteCodeEncoding
import mTask.Interpret.Message
......@@ -151,7 +152,10 @@ preloadTasks :: [MTaskBox] -> Task String
preloadTasks ts = preloadTasksWithOptions zero ts
preloadTasksWithOptions :: CompileOpts [MTaskBox] -> Task String
preloadTasksWithOptions opts tasks = header <$> ptwo [zero..] tasks footer
preloadTasksWithOptions opts tasks
= get applicationName
>>- \aname->get currentDateTime
>>- \now->header now aname <$> ptwo [zero..] tasks footer
>>- viewInformation [ViewAs \a->PreTag [] [Text a]] o join "\n"
where
ptwo :: [UInt8] [MTaskBox] [String] -> Task [String]
......@@ -175,10 +179,11 @@ where
, ""
]
header s =
header now aname s =
[ "/** @file preloaded_tasks.h"
, " *"
, " * Contains the binary data for the preloaded tasks"
, " * Generated on " +++ toString now +++ " by " +++ aname
, " */"
, "#ifndef PRELOADED_TASKS_H"
, "#define PRELOADED_TASKS_H"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment