Skip to content

Commit

Permalink
refactor(any): apply hlint suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
deemp committed Mar 19, 2024
1 parent 94bdd65 commit b37cdc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions eo-phi-normalizer/src/Language/EO/Phi/Rules/Yaml.hs
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ newtype MetaState = MetaState

evaluateMetaFuncs' :: Object -> State MetaState Object
evaluateMetaFuncs' (MetaFunction (MetaFunctionName "@T") _) = do

Check warning on line 303 in eo-phi-normalizer/src/Language/EO/Phi/Rules/Yaml.hs

View workflow job for this annotation

GitHub Actions / Run static checks

Warning in evaluateMetaFuncs' in module Language.EO.Phi.Rules.Yaml: Redundant pure ▫︎ Found: "do nuCount' <- gets (Common.intToBytesObject . nuCount)\n pure nuCount'" ▫︎ Perhaps: "do gets (Common.intToBytesObject . nuCount)"
res <- gets (Common.intToBytesObject . nuCount)
nuCount' <- gets (Common.intToBytesObject . nuCount)
#nuCount += 1
pure res
pure nuCount'
evaluateMetaFuncs' (Formation bindings) = Formation <$> mapM evaluateMetaFuncsBinding bindings
evaluateMetaFuncs' (Application obj bindings) = Application <$> evaluateMetaFuncs' obj <*> mapM evaluateMetaFuncsBinding bindings
evaluateMetaFuncs' (ObjectDispatch obj a) = ObjectDispatch <$> evaluateMetaFuncs' obj <*> pure a
Expand Down
3 changes: 1 addition & 2 deletions eo-phi-normalizer/test/Language/EO/Rules/PhiPaperSpec.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NumericUnderscores #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
Expand Down Expand Up @@ -231,7 +230,7 @@ defaultSearchLimits :: Int -> SearchLimits
defaultSearchLimits = defaultApplicationLimits

confluent :: [Rule] -> Property
confluent rulesFromYaml = withMaxSuccess 1000 $
confluent rulesFromYaml = withMaxSuccess 1_000 $
forAllShrink (resize 40 $ genCriticalPair rulesFromYaml) (shrinkCriticalPair rulesFromYaml) $
\pair@CriticalPair{..} ->
within 100_000 $ -- 0.1 second timeout per test
Expand Down

0 comments on commit b37cdc1

Please sign in to comment.