Created
December 9, 2015 14:24
-
-
Save leepike/e7d09ed02e294912dda8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Lib where | |
import Control.Monad | |
import Language.Atom -- (bool, value, atom, E, Atom) | |
import Language.Atom.Elaboration (StateHierarchy(..)) | |
genAtom :: IO () | |
genAtom = do | |
let config = defaults --{ cRuleCoverage = False } | |
(schedule, _, names1, names2, nameTypeList) | |
<- compile "myAtom" config myAtom | |
-- putStrLn $ reportSchedule schedule | |
let hier = StateHierarchy "hier" [] | |
rules = [] | |
config' = config { cCode = \ _ _ _ -> ("#include \"myAtom.h\"","") } | |
_ <- writeC "main" config' hier rules schedule names1 names2 nameTypeList | |
return () | |
myAtom = atom "myAtom" $ do | |
clutchCommand <- bool "clutchCommand" False | |
cutchFeedback <- bool "cutchFeedback" False | |
failedToDisengage (value cutchFeedback) (value clutchCommand) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment