Earley 0.7.0 → 0.7.1
raw patch · 2 files changed
+13/−14 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Earley.cabal +2/−3
- Text/Earley/Parser.hs +11/−11
Earley.cabal view
@@ -1,5 +1,5 @@ name: Earley-version: 0.7.0+version: 0.7.1 synopsis: Parsing all context-free grammars using Earley's algorithm. description: See <https://www.github.com/ollef/Earley> for more information and@@ -24,5 +24,4 @@ build-depends: base ==4.8.*, containers >=0.5, ListLike >=4.1 -- hs-source-dirs: default-language: Haskell2010- ghc-options: -Wall -funbox-strict-fields-+ ghc-options: -Wall -funbox-strict-fields -O2
Text/Earley/Parser.hs view
@@ -24,8 +24,8 @@ -- | The concrete rule type that the parser uses data Rule s r e t a = Rule { ruleProd :: ProdR s r e t a- , ruleNullable :: {-# UNPACK #-} !(STRef s (Maybe [a]))- , ruleConts :: {-# UNPACK #-} !(STRef s (STRef s [Cont s r e t a r]))+ , ruleNullable :: !(STRef s (Maybe [a]))+ , ruleConts :: !(STRef s (STRef s [Cont s r e t a r])) } type ProdR s r e t a = Prod (Rule s r) e t a@@ -80,26 +80,26 @@ -- | An Earley state with result type @a@. data State s r e t a where- State :: {-# UNPACK #-} !Pos+ State :: !Pos -> !(ProdR s r e t f)- -> {-# UNPACK #-} !(Args s f b)- -> {-# UNPACK #-} !(Conts s r e t b a)+ -> !(Args s f b)+ -> !(Conts s r e t b a) -> State s r e t a Final :: f -> Args s f a -> State s r e t a -- | A continuation accepting an @a@ and producing a @b@. data Cont s r e t a b where- Cont :: {-# UNPACK #-} !Pos- -> {-# UNPACK #-} !(Args s a b)+ Cont :: !Pos+ -> !(Args s a b) -> !(ProdR s r e t (b -> c))- -> {-# UNPACK #-} !(Args s c d)- -> {-# UNPACK #-} !(Conts s r e t d e')+ -> !(Args s c d)+ -> !(Conts s r e t d e') -> Cont s r e t a e' FinalCont :: Args s a c -> Cont s r e t a c data Conts s r e t a c = Conts- { conts :: {-# UNPACK #-} !(STRef s [Cont s r e t a c])- , contsArgs :: {-# UNPACK #-} !(STRef s (Maybe (STRef s (ST s [a]))))+ { conts :: !(STRef s [Cont s r e t a c])+ , contsArgs :: !(STRef s (Maybe (STRef s (ST s [a])))) } contraMapCont :: Args s b a -> Cont s r e t a c -> Cont s r e t b c