on master help sign in
Update ST error reflection for STransLoop
commitebb4fee28470806f9ea703e438fe75a23987885d authorEdwin Brady <ecb10@st-andrews.ac.uk> dateSat 18 Mar 2017, 21:40 (10 years ago) parente1f094b
1 file changed+3−1
libs/contrib/Control/ST.idr+3−1
libs/contrib/Control/ST.idr+3−1
@@ -551,7 +551,7 @@ runLoop fuel prog onEmpty
551551||| runWith allows running an STrans program with an initial environment,
552552||| which must be consumed.
553553||| It's only allowed in the IO monad, because it's inherently unsafe, so
554−||| we don't want to be able to use it under a 'lift in just *any* ST program -
554+||| we don't want to be able to use it under a 'lift' in just *any* ST program -
555555||| if we have access to an 'Env' we can easily duplicate it - so it's the
556556||| responsibility of an implementation of an interface in IO which uses it
557557||| to ensure that it isn't duplicated.
@@ -597,10 +597,12 @@ st_precondition (CantUnify _ tm1 tm2 _ _ _)
597597 where
598598 getPreconditions : TT -> Maybe TT
599599 getPreconditions `(STrans ~m ~ret ~pre ~post) = Just pre
600+ getPreconditions `(STransLoop ~m ~ret ~pre ~post) = Just pre
600601 getPreconditions _ = Nothing
601602
602603 getPostconditions : TT -> Maybe TT
603604 getPostconditions `(STrans ~m ~ret ~pre ~post) = Just post
605+ getPostconditions `(STransLoop ~m ~ret ~pre ~post) = Just post
604606 getPostconditions _ = Nothing
605607
606608 renderPre : TT -> TT -> List (ErrorReportPart)