on master help sign in
Introduce a breakpoint after ‘forall’ in type signatures
a4e97damrkkrp
data/examples/declaration/rewrite-rule/type-signature-out.hs+2−1
@@ -7,7 +7,8 @@
7 k
7 k
8 z
8 z
9 ( g
9 ( g
10− :: forall b. (a -> b -> b)
10+ :: forall b.
11+ (a -> b -> b)
11 -> b
12 -> b
12 -> b
13 -> b
13 ).
14 ).
data/examples/declaration/signature/type/arguments-out.hs+2−1
@@ -4,7 +4,8 @@ functionName
4 :: (C1, C2, C3, C4, C5)
4 :: (C1, C2, C3, C4, C5)
5 => a
5 => a
6 -> b
6 -> b
7− -> ( forall a. (C6, C7)
7+ -> ( forall a.
8+ (C6, C7)
8 => LongDataTypeName
9 => LongDataTypeName
9 -> a
10 -> a
10 -> AnotherLongDataTypeName
11 -> AnotherLongDataTypeName
data/examples/declaration/type/forall-out.hsnew file+4
@@ -0,0 +1,4 @@
1+type CoerceLocalSig m m'
2+ = forall r a.
3+ LocalSig m r a
4+ -> LocalSig m' r a
data/examples/declaration/type/forall.hsnew file+4
@@ -0,0 +1,4 @@
1+type CoerceLocalSig m m' =
2+ forall r a.
3+ LocalSig m r a ->
4+ LocalSig m' r a
data/examples/declaration/value/function/fancy-forall-0-out.hsnew file+10
@@ -0,0 +1,10 @@
1+wrapError
2+ :: forall outertag innertag t outer inner m a.
3+ ( forall x. Coercible (t m x) (m x),
4+ forall m'.
5+ HasCatch outertag outer m'
6+ => HasCatch innertag inner (t m'),
7+ HasCatch outertag outer m
8+ )
9+ => (forall m'. HasCatch innertag inner m' => m' a)
10+ -> m a
data/examples/declaration/value/function/fancy-forall-0.hsnew file+6
@@ -0,0 +1,6 @@
1+wrapError :: forall outertag innertag t outer inner m a.
2+ ( forall x. Coercible (t m x) (m x)
3+ , forall m'. HasCatch outertag outer m'
4+ => HasCatch innertag inner (t m')
5+ , HasCatch outertag outer m )
6+ => (forall m'. HasCatch innertag inner m' => m' a) -> m a
data/examples/declaration/value/function/fancy-forall-1-out.hsnew file+10
@@ -0,0 +1,10 @@
1+magnify
2+ :: forall outertag innertag t outer inner m a.
3+ ( forall x. Coercible (t m x) (m x),
4+ forall m'.
5+ HasReader outertag outer m'
6+ => HasReader innertag inner (t m'),
7+ HasReader outertag outer m
8+ )
9+ => (forall m'. HasReader innertag inner m' => m' a)
10+ -> m a
data/examples/declaration/value/function/fancy-forall-1.hsnew file+6
@@ -0,0 +1,6 @@
1+magnify :: forall outertag innertag t outer inner m a.
2+ ( forall x. Coercible (t m x) (m x)
3+ , forall m'. HasReader outertag outer m'
4+ => HasReader innertag inner (t m')
5+ , HasReader outertag outer m )
6+ => (forall m'. HasReader innertag inner m' => m' a) -> m a
src/Ormolu/Printer/Meat/Type.hs+2−1
@@ -27,7 +27,8 @@ p_hsType = \case
27 txt "forall "
27 txt "forall "
28 sep space (located' p_hsTyVarBndr) bndrs
28 sep space (located' p_hsTyVarBndr) bndrs
29 txt "."
29 txt "."
30− space
30+ breakpoint
31+ vlayout (return ()) (txt " ")
31 p_hsType (unLoc t)
32 p_hsType (unLoc t)
32 HsQualTy NoExt qs t -> do
33 HsQualTy NoExt qs t -> do
33 located qs p_hsContext
34 located qs p_hsContext