summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorFlorian Angeletti <florian.angeletti@inria.fr>2019-09-02 17:51:17 +0200
committerGitHub <noreply@github.com>2019-09-02 17:51:17 +0200
commit2bd33ee515eef130e745d6bba9a6e88f10803955 (patch)
treec03cb3f85db89e64f4157b4cee19170f78b5be29 /testsuite
parent354bf8e4e4184adb6bbddcd94a7d5b85996dde25 (diff)
parent740baf0317e063cbd9ebb545999ad198c396a8da (diff)
downloadocaml-2bd33ee515eef130e745d6bba9a6e88f10803955.tar.gz
Merge pull request #8906 from Octachron/functor_arrow_associativity
Print parentheses in (A->B)->C
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/typing-modules/printing.ml18
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/typing-modules/printing.ml b/testsuite/tests/typing-modules/printing.ml
index f6792ba8b5..72235260d4 100644
--- a/testsuite/tests/typing-modules/printing.ml
+++ b/testsuite/tests/typing-modules/printing.ml
@@ -28,3 +28,21 @@ module M = struct module N = struct let x = 1 end end;;
module M : sig module N : sig val x : int end end
module M : sig module N : sig ... end end
|}];;
+
+(* Shortcut notation for functors *)
+module type A
+module type B
+module type C
+module type D
+module type E
+module type F
+module Test(X: ((A->(B->C)->D) -> (E -> F))) = struct end
+[%%expect {|
+module type A
+module type B
+module type C
+module type D
+module type E
+module type F
+module Test : functor (X : (A -> (B -> C) -> D) -> E -> F) -> sig end
+|}]