Skip to content

Commit

Permalink
[ pre-release ] compatibility with Agda 2.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
gallais committed Oct 6, 2018
1 parent 6be965e commit 1c38364
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/Data/List/Sized/Interface.agda
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ open import Data.Product.N-ary
instance

sized-nary : {ℓ} {A : Set ℓ} Sized A (A ^_)
Sized.view sized-nary {0} xs = Level.lift tt
Sized.view sized-nary {1} x = x , Level.lift tt
Sized.view sized-nary {2+ n} xs = xs
Sized.view sized-nary {0} xs = Level.lift tt
Sized.view sized-nary {1} x = x , Level.lift tt
Sized.view sized-nary {suc (suc n)} xs = xs
12 changes: 6 additions & 6 deletions src/Text/Parser/Monad.agda
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module Text.Parser.Monad where
open import Data.Empty
open import Data.Unit
open import Data.Char
open import Data.Product hiding (,_)
open import Data.Product as Prod hiding (,_)
open import Data.List hiding (fromMaybe ; [_])
open import Data.Vec using (Vec)
open import Data.Maybe hiding (monad ; monadT ; monadZero ; monadPlus)
Expand Down Expand Up @@ -96,14 +96,14 @@ module AgdarsecT
getAnnotations = proj₂ ST.<$> ST.get

withAnnotation : {A} C AgdarsecT E C M A AgdarsecT E C M A
withAnnotation c ma = let open ST in do
ST.modify (map(c ∷_))
a ma
ST.modify (map(drop 1))
withAnnotation c ma = let open ST in
ST.modify (Prod.map id (c ∷_)) >>
ma >>= λ a
ST.modify (Prod.map id (drop 1)) >>
ST.pure a

recordChar : Char AgdarsecT E C M ⊤
recordChar c = tt ST.<$ ST.modify (map (next c))
recordChar c = tt ST.<$ ST.modify (Prod.map (next c) id)

-- Commiting to a branch makes all the failures in that branch hard failures
-- that we cannot recover from
Expand Down

0 comments on commit 1c38364

Please sign in to comment.