-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patherror.ml
24 lines (19 loc) · 865 Bytes
/
error.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
open Ppxlib
let error_extensionf ~loc fmt =
Location.error_extensionf ~loc ("ppx_deriving_dyn: " ^^ fmt)
;;
let unsupported_type_param ~loc = error_extensionf ~loc "unsupported type parameter"
let unsupported_longident ~loc = error_extensionf ~loc "unsupported longident"
let unsupported_type ~loc = error_extensionf ~loc "cannot derive to_dyn for this type"
let unsupported_gadt ~loc = error_extensionf ~loc "cannot derive to_dyn for GADTs"
let unsupported_rinherit ~loc =
error_extensionf ~loc "cannot derive to_dyn for inherited polymorphic variant types."
;;
let unsupported_conjunctive_tag_arg ~loc =
error_extensionf
~loc
"cannot derive to_dyn for polymorphic variant tag with conjunctive type argument."
;;
let cannot_ignore_all_elements ~loc =
error_extensionf ~loc "you cannot mark all elements of a tuple or record with [@ignore]"
;;