on master help sign in
project-m36/examples/DynamicAtomFunctions.hs
12 lines 579 B history raw
1{-# LANGUAGE OverloadedStrings #-}
2--compile with `cabal exec ghc -- examples/DynamicAtomFunctions.hs -package project-m36`
3--load with `loadatomfunctions "DynamicAtomFunctions" "someAtomFunctions" "examples/DynamicAtomFunctions.o"`
5module DynamicAtomFunctions where
6import ProjectM36.Base
8someAtomFunctions :: [AtomFunction]
9someAtomFunctions = [AtomFunction{
10 atomFuncName = "constTrue",
11 atomFuncType = [TypeVariableType "a", BoolAtomType],
12 atomFuncBody = AtomFunctionBody Nothing (\(x:_) -> pure (BoolAtom True))}]