Skip to content

Commit

Permalink
Remove redundant UNPACK pragmas
Browse files Browse the repository at this point in the history
Since the cabal file has -funbox-strict-fields, they're not necessary.
  • Loading branch information
Olle Fredriksson committed Apr 29, 2015
1 parent 1dbbe50 commit 6fc5388
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Earley.cabal
Original file line number Diff line number Diff line change
@@ -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
Expand Down
22 changes: 11 additions & 11 deletions Text/Earley/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import Text.Earley.Grammar
-- | 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
Expand Down Expand Up @@ -80,26 +80,26 @@ type Pos = Int

-- | 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
Expand Down

0 comments on commit 6fc5388

Please sign in to comment.