patBoundVars :: Pat e -> [String]
patBoundVars p =
  case p of
    PVar s _ _ -> [s]
    PCtor _ l -> concatMap patBoundVars l
    PUnit     -> []
    PPair x y -> patBoundVars x ++ patBoundVars y
    PRecord m -> concatMapOf folded patBoundVars m
    _ -> []
patBoundVars :: Pat e -> [String]
patBoundVars p =
  case p of
    PVar s _ _ -> [s]
    PCtor _ l -> concatMap patBoundVars l
    PUnit     -> []
    PPair x y -> patBoundVars x ++ patBoundVars y
    PRecord m -> concatMapOf folded patBoundVars m
    _ -> []
patBoundVars p =
  case p of
    PVar s _ _ -> [s]
    PCtor _ l -> concatMap patBoundVars l
    PUnit     -> []
    PPair x y -> patBoundVars x ++ patBoundVars y
    PRecord m -> concatMapOf folded patBoundVars m
    _ -> []