on master help sign in
Adjust rendering of kind signatures and implicit parameters
a2b7521mrkkrp
data/examples/declaration/data/kind-annotations-out.hsnew file+1
@@ -0,0 +1 @@
1+data Something (n :: Nat) = Something
data/examples/declaration/data/kind-annotations.hsnew file+1
@@ -0,0 +1 @@
1+data Something (n :: Nat) = Something
data/examples/declaration/value/function/implicit-params-out.hs+9
@@ -4,3 +4,12 @@ sortBy :: (a -> a -> Bool) -> [a] -> [a]
4
4
5sort :: (?cmp :: a -> a -> Bool) => [a] -> [a]
5sort :: (?cmp :: a -> a -> Bool) => [a] -> [a]
6sort = sortBy ?cmp
6sort = sortBy ?cmp
7+
8+sort'
9+ :: ( ?cmp
10+ :: a -> a -> Bool
11+ , ?foo :: Int
12+ )
13+ => [a]
14+ -> [a]
15+sort' = sort
data/examples/declaration/value/function/implicit-params.hs+5
@@ -3,3 +3,8 @@ sortBy :: (a -> a -> Bool) -> [a] -> [a]
3
3
4sort :: (?cmp :: a -> a -> Bool) => [a] -> [a]
4sort :: (?cmp :: a -> a -> Bool) => [a] -> [a]
5sort = sortBy ?cmp
5sort = sortBy ?cmp
6+
7+sort' :: (?cmp
8+ :: a -> a -> Bool
9+ ,?foo :: Int) => [a] -> [a]
10+sort' = sort
src/Ormolu/Printer/Meat/Type.hs+3−2
@@ -69,15 +69,16 @@ p_hsType = \case
69 located y p_hsType
69 located y p_hsType
70 HsParTy NoExt t ->
70 HsParTy NoExt t ->
71 parens (located t p_hsType)
71 parens (located t p_hsType)
72− HsIParamTy NoExt n t -> do
72+ HsIParamTy NoExt n t -> sitcc $ do
73 located n atom
73 located n atom
74 breakpoint
74 breakpoint
75 inci $ do
75 inci $ do
76 txt ":: "
76 txt ":: "
77 located t p_hsType
77 located t p_hsType
78 HsStarTy NoExt _ -> txt "*"
78 HsStarTy NoExt _ -> txt "*"
79− HsKindSig NoExt t k -> do
79+ HsKindSig NoExt t k -> sitcc $ do
80 located t p_hsType
80 located t p_hsType
81+ space -- FIXME
81 inci $ do
82 inci $ do
82 txt ":: "
83 txt ":: "
83 located k p_hsType
84 located k p_hsType