fix warnings

This commit is contained in:
rhiannon morris 2023-09-19 18:05:43 +02:00
parent 80b1b3581a
commit dc076b636d
2 changed files with 29 additions and 25 deletions

View file

@ -38,17 +38,21 @@ testFreeVars lbl tm dims terms =
Right ()
private
prettyWith : (a -> Eff Pretty (Doc (Opts 80))) -> a -> String
Doc80 : Type
Doc80 = Doc $ Opts 80
private
prettyWith : (a -> Eff Pretty Doc80) -> a -> String
prettyWith f = trim . render _ . runPretty . f
parameters {d, n : Nat} (ds : BContext d) (ts : BContext n)
private
withContext : {opts : _} -> Doc opts -> Eff Pretty (Doc opts)
withContext {opts} doc =
withContext : Doc80 -> Eff Pretty Doc80
withContext doc =
if null ds && null ts then pure $ hsep ["", doc]
else pure $ sep [hsep [!(ctx1 ds), "|", !(ctx1 ts), ""], doc]
where
ctx1 : forall k. BContext k -> Eff Pretty (Doc opts)
ctx1 : forall k. BContext k -> Eff Pretty Doc80
ctx1 [<] = pure "·"
ctx1 ctx = fillSeparateTight !commaD . toList' <$>
traverse' (pure . prettyBind') ctx