scope :: Action a -> Action a
scope (Action act) = Action $ do
    s0 <- get
    put s0{scopes=[] : scopes s0}
    res <- act
    modify $ \s -> s{scopes = scopes s0}
    return res
scope :: Action a -> Action a
scope (Action act) = Action $ do
    s0 <- get
    put s0{scopes=[] : scopes s0}
    res <- act
    modify $ \s -> s{scopes = scopes s0}
    return res
scope (Action act) = Action $ do
    s0 <- get
    put s0{scopes=[] : scopes s0}
    res <- act
    modify $ \s -> s{scopes = scopes s0}
    return res