let directive =
function
| Ast.ExNil _ -> Pdir_none
| ExStr (_, s) -> Pdir_string s
| ExInt (_, i) -> Pdir_int (int_of_string i)
| Ast.ExId (_, (Ast.IdUid (_, "True"))) -> Pdir_bool true
| Ast.ExId (_, (Ast.IdUid (_, "False"))) -> Pdir_bool false
| e -> Pdir_ident (ident (ident_of_expr e))