Skip to content

Commit a9531a6

Browse files
committed
Update changelog
1 parent 9d66e16 commit a9531a6

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Diff for: changelog.d/1556

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
synopsis: Display capture hints in router layout
2+
prs: #1556
3+
4+
description: {
5+
6+
This PR introduces a CaptureHint type, which is passed as an extra argument to the CaptureRouter and CaptureAllRouter constructors for the Router' type.
7+
CaptureHint values are then used in routerLayout, to display the name and type of captured values, instead of just <capture> previously.
8+
9+
N.B.:
10+
Because the choice smart constructor for routers can aggregate Capture combinators with different capture hints, the Capture*Router constructors actually take a list of CaptureHint, instead of a single one.
11+
12+
This PR also introduces Spec tests for the routerLayout function.
13+
14+
Warning:
15+
This change is potentially breaking, because it adds the constraint `Typeable a` to all types that are to be captured. Because all types are typeable since GHC 7.10, this is not as bad as it sounds ; it only break expressions where `a` is quantified in an expression with `Capture a`.
16+
In those cases, the fix is easy: it suffices to add `Typeable a` to the left-hand side of the quantification constraint.
17+
18+
}

0 commit comments

Comments
 (0)