Skip to content

Commit

Permalink
fix: fix HLint/Style/Compiler failures
Browse files Browse the repository at this point in the history
  • Loading branch information
sgillespie committed Aug 12, 2023
1 parent c404e65 commit 130b640
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,7 @@ dist-newstyle

### Nix
result
.direnv
.direnv

### Tests
data/tests/gen/*.out.json
2 changes: 1 addition & 1 deletion src/Data/Elocrypt.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import Control.Monad.Random hiding (next)
import Data.Bool
import Data.Char
import Data.List (findIndices)
import qualified Data.Map as M
import Data.Map qualified as M
import Data.Maybe
import Data.Ratio
import Prelude hiding (max, min)
Expand Down
3 changes: 1 addition & 2 deletions src/Data/Elocrypt/Types.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedLists #-}

module Data.Elocrypt.Types
Expand Down Expand Up @@ -27,7 +26,7 @@ newtype Frequency = Frequency {unFequency :: Int}
deriving stock (Eq, Show)
deriving newtype (Num, FromJSON, ToJSON)

newtype Frequencies = Frequencies {unFrequencies :: (Map Unigram Frequency)}
newtype Frequencies = Frequencies {unFrequencies :: Map Unigram Frequency}
deriving stock (Eq, Show)
deriving newtype (FromJSON, ToJSON)

Expand Down
2 changes: 1 addition & 1 deletion src/Data/Elocrypt/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Data.Elocrypt.Utils
) where

import Data.Char (isAlphaNum, isSpace)
import qualified Data.Map as M
import Data.Map qualified as M
import Data.Maybe (fromMaybe)
import Data.Ratio

Expand Down
2 changes: 1 addition & 1 deletion test/Test/Elocrypt/QuickCheck.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import Data.List
import Data.Maybe
import System.Random
import Test.Proctest hiding (run)
import qualified Test.Proctest as Proctest
import Test.Proctest qualified as Proctest
import Test.Proctest.Assertions
import Test.QuickCheck

Expand Down
4 changes: 2 additions & 2 deletions test/Test/Elocrypt/UtilsTest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Test.Elocrypt.UtilsTest where

import Control.Monad.Random
import Data.List (elem, find, sort)
import qualified Data.Map as M
import Data.Map qualified as M
import Data.Maybe (isNothing)
import Data.Ratio ((%))

Expand Down Expand Up @@ -55,7 +55,7 @@ prop_isSymbolAlphaNumReturnsFalse c =
c `elem` (['a' .. 'z'] ++ ['A' .. 'Z'] ++ ['0' .. '9']) ==> not (isSymbol c)

prop_isSymbolWhitespaceReturnsFalse :: Bool
prop_isSymbolWhitespaceReturnsFalse = not $ any isSymbol " \n"
prop_isSymbolWhitespaceReturnsFalse = not $ any isSymbol (" \n" :: String)

-- | updateR always updates when prob = 1/0
prop_updateRAlwaysUpdates :: String -> StdGen -> Bool
Expand Down

0 comments on commit 130b640

Please sign in to comment.