oneshot.hs

来自「Cores are generated from Confluence a mo」· HS 代码 · 共 22 行

HS
22
字号
-- | Rising and falling one-shots.module Language.Atom.Common.OneShot  ( oneShotRise  , oneShotFall  ) whereimport Language.Atom-- | One-shot on a rising transition.oneShotRise :: Name -> Term Bool -> System (Term Bool)oneShotRise name input = scope name $ do  last <- bool "last" False  rule "updateLast" $ do    alwaysActiveWhenEnabled    last <== input  return $ input &&. inv (value last)-- | One-shot on a falling transition.oneShotFall :: Name -> Term Bool -> System (Term Bool)oneShotFall name input = oneShotRise name $ inv input

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?