update to use Control.GArrow instead of GHC.HetMet.GArrow
[coq-hetmet.git] / examples / VerilogDemo.hs
1 {-# OPTIONS_GHC -XModalTypes -fflatten -funsafe-skolemize -dcore-lint -XScopedTypeVariables -fsimpleopt-before-flatten -XKindSignatures #-}
2 module VerilogDemo (oscillator) where
3
4 oscillator :: <[ (w,()) ~~> w ]>@a -> <[ (w,(w,())) ~~> w ]>@a -> <[ (w,()) ~~> w ]>@a
5 oscillator reg xor =
6   <[ \input ->
7         let output  = ~~xor input delayed
8             delayed = ~~reg output
9         in output ]>