Use correct fixity info for :printdef
This prevents over-parenthesization
commit13ad7de6fbe46ac8576e0c709ee3120121cb07f7
authorDavid Raymond Christiansen <david@davidchristiansen.dk>
dateThu 1 Sep 2016, 22:04 (10 years ago)
parent5b2711f
src/Idris/REPL.hs+1−1
@@ -1512,7 +1512,7 @@ pprintDef asCore n =
15121512 let ppTm t = annotate (AnnTerm (zip vars (repeat False)) t) .
15131513 pprintPTerm (ppOptionIst ist)
15141514 (zip vars (repeat False))
1515− [] [] .
1515+ [] (idris_infixes ist) .
15161516 delab ist $
15171517 t
15181518 in group $ ppTm lhs <+> text "=" <$> (group . align . hang 2 $ ppTm rhs)
test/delab001/expected+2−2
@@ -5,8 +5,8 @@ foo n = case n of
55bar : Nat -> String -> String
66bar x y = case x of
77 0 => y
8− S _ => (y ++ y)
8+ S _ => y ++ y
99append : List a -> List a -> List a
1010append xs ys = case xs of
1111 [] => ys
12− (x :: xs) => (x :: (append xs ys))
12+ x :: xs => x :: append xs ys