Skip to content

Commit

Permalink
Make Expr and Env strict
Browse files Browse the repository at this point in the history
  • Loading branch information
mfussenegger committed Feb 17, 2019
1 parent 5bfae80 commit dd9a560
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/Expr.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import Text.Parsec.Text (Parser)
-- $setup
-- >>> :set -XOverloadedStrings

data Expr = IntLiteral Integer
| DoubleLiteral Scientific
| StringLiteral Text
| FunctionCall { fcName :: Text, fcArgs :: [Expr] }
data Expr = IntLiteral !Integer
| DoubleLiteral !Scientific
| StringLiteral !Text
| FunctionCall { fcName :: !Text, fcArgs :: ![Expr] }
deriving (Show, Eq)


Expand Down
4 changes: 2 additions & 2 deletions src/Fake.hs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ runFakeT seed fake = do
type State a = StateT Env IO a

data Env = Env
{ envStdGen :: StdGen
, envFileCache :: M.HashMap T.Text (V.Vector Value) }
{ envStdGen :: !StdGen
, envFileCache :: !(M.HashMap T.Text (V.Vector Value)) }

instance RandomGen Env where
next env = (x, env { envStdGen = g' })
Expand Down

0 comments on commit dd9a560

Please sign in to comment.