* ```
class EdgeDetector(Elaboratable):
    def __init__(self):
        self.m = Module()

    def rose(self, value, *, domain="sync"):
        value_r = Signal.like(value)
        m.d[domain] += value_r.eq(value)
        return (value_r == 0) & (value != 0)


class ThingThatNeedsEdgeDetection(Elaboratable):
    def elaborate(self, platform):
        m = Module()
        m.submodules.edge = edge = EdgeDetector()

        with m.If(edge.rose(self.x)):
            ...

        return m
```