Skip to content

Commit

Permalink
did formating of the code using
Browse files Browse the repository at this point in the history
Signed-off-by: Burnleydev1 <abongwabonalais@gmail.com>
  • Loading branch information
Burnleydev1 committed Mar 16, 2023
1 parent de338b5 commit 389e05a
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions metaquot/ppxlib_metaquot.ml
Expand Up @@ -108,10 +108,10 @@ module Expr = Make (struct
assert_no_attributes attrs;
e
| _ ->
Ast_builder.Default.(
pexp_extension ~loc:(loc_of_extension ext)
(Location.error_extensionf ~loc:(loc_of_extension ext) "expression expected")
)
Ast_builder.Default.(
pexp_extension ~loc:(loc_of_extension ext)
(Location.error_extensionf ~loc:(loc_of_extension ext)
"expression expected"))
end)

module Patt = Make (struct
Expand All @@ -127,18 +127,19 @@ module Patt = Make (struct
class std_lifters = Ppxlib_metaquot_lifters.pattern_lifters

let annotate p core_type = ppat_constraint ~loc:core_type.ptyp_loc p core_type


let cast ext : Ppxlib.pattern =
match snd ext with
| PPat (p, None) -> p
| PPat (_, Some e) ->
Ast_builder.Default.(ppat_extension ~loc:e.pexp_loc
(Location.error_extensionf ~loc:e.pexp_loc "guard not expected here"))
| _ -> Ast_builder.Default.(ppat_extension ~loc:(loc_of_extension ext)
(Location.error_extensionf ~loc:(loc_of_extension ext) "pattern expected"))


let cast ext : Ppxlib.pattern =
match snd ext with
| PPat (p, None) -> p
| PPat (_, Some e) ->
Ast_builder.Default.(
ppat_extension ~loc:e.pexp_loc
(Location.error_extensionf ~loc:e.pexp_loc "guard not expected here"))
| _ ->
Ast_builder.Default.(
ppat_extension ~loc:(loc_of_extension ext)
(Location.error_extensionf ~loc:(loc_of_extension ext)
"pattern expected"))
end)

let () =
Expand Down

0 comments on commit 389e05a

Please sign in to comment.