mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-24 00:39:58 +03:00
remove stray space for nullary ctors
This commit is contained in:
parent
5fc75f5e70
commit
2ab759444e
@ -74,12 +74,10 @@ prettyDataDecl env r name dd =
|
||||
where
|
||||
constructor (n, (_, _, (Type.ForallsNamed' _ t))) = constructor' n t
|
||||
constructor (n, (_, _, t) ) = constructor' n t
|
||||
constructor' n t =
|
||||
P.group . P.hang' (prettyPattern env r name n) " " $
|
||||
P.spaced (TypePrinter.pretty env 10 <$> case Type.unArrows t of
|
||||
Nothing -> mempty
|
||||
Just ts -> init ts
|
||||
)
|
||||
constructor' n t = case Type.unArrows t of
|
||||
Nothing -> prettyPattern env r name n
|
||||
Just ts -> P.group . P.hang' (prettyPattern env r name n) " "
|
||||
$ P.spaced (TypePrinter.pretty env 10 <$> init ts)
|
||||
header =
|
||||
P.sep " " (prettyDataHeader name : (P.text . Var.name <$> DD.bound dd))
|
||||
<> (" = " `P.orElse` "\n = ")
|
||||
|
Loading…
Reference in New Issue
Block a user