Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz authored and paulcadman committed Nov 19, 2024
1 parent 1926fac commit f0b5536
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/Juvix/Compiler/Concrete/Print/Base.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1095,7 +1095,7 @@ instance (SingI s) => PrettyPrint (AxiomDef s) where
?<> builtin'
?<> ppCode _axiomKw
<+> axiomName'
<+> ppCode _axiomTypeSig
<> ppCode _axiomTypeSig

instance PrettyPrint BuiltinInductive where
ppCode i = ppCode Kw.kwBuiltin <+> keywordText (P.prettyText i)
Expand Down Expand Up @@ -1433,7 +1433,7 @@ instance (SingI s) => PrettyPrint (RecordField s) where
?<> pragmas'
?<> builtin'
?<> mayBraces (ppSymbolType _fieldName)
<+> ppCode _fieldTypeSig
<> ppCode _fieldTypeSig

instance (SingI s) => PrettyPrint (RhsRecord s) where
ppCode RhsRecord {..} = do
Expand Down Expand Up @@ -1466,7 +1466,7 @@ ppConstructorDef singleConstructor ConstructorDef {..} = do
constructorRhsHelper r = spaceMay <> ppCode r
where
spaceMay = case r of
ConstructorRhsGadt {} -> space
ConstructorRhsGadt {} -> mempty
ConstructorRhsRecord {} -> mempty
ConstructorRhsAdt a
| null (a ^. rhsAdtArguments) -> mempty
Expand Down
10 changes: 6 additions & 4 deletions tests/positive/TypeSignatures.juvix
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import Stdlib.Data.Nat open;
axiom f (x : Nat) : Nat;

g (x : Nat) : Nat :=
f@{x := x};
f@{
x := x;
};

type R := mkR@{
rf (x : Nat) : Nat;
};
type R := mkR@{rf (x : Nat) : Nat};

type R' := mkR' (rf : Nat -> Nat) : R';

type RR := mkRR : (Nat -> Nat) -> RR;

0 comments on commit f0b5536

Please sign in to comment.