package CPU where import GetPut -- | The interface the CPU exposes. interface CPU = -- UART uart_tx :: Get (Bit 8) uart_rx :: Put (Bit 8) mkCPU :: Module CPU mkCPU = module byte :: Reg (Bit 8) <- mkReg 0 interface CPU uart_tx = toGet byte uart_rx = toPut $ \b -> do byte := b -- vim: set ft=haskell :