on master help sign in
Prevent io_bind reducing at REPL
1931074Edwin Brady
src/Core/Evaluate.hs+3−1
@@ -798,7 +798,9 @@ lookupDefAcc :: Name -> Bool -> Context ->
798 [(Def, Accessibility)]
798 [(Def, Accessibility)]
799lookupDefAcc n mkpublic ctxt
799lookupDefAcc n mkpublic ctxt
800 = map mkp $ lookupCtxt n (definitions ctxt)
800 = map mkp $ lookupCtxt n (definitions ctxt)
801+ -- io_bind a special case for REPL prettiness
802+ where mkp (d, a, _) = if mkpublic && (not (n == UN "io_bind"))
801− where mkp (d, a, _) = if mkpublic then (d, Public) else (d, a)
803+ then (d, Public) else (d, a)
802
804
803lookupTotal :: Name -> Context -> [Totality]
805lookupTotal :: Name -> Context -> [Totality]
804lookupTotal n ctxt = map mkt $ lookupCtxt n (definitions ctxt)
806lookupTotal n ctxt = map mkt $ lookupCtxt n (definitions ctxt)