Skip to content

Commit

Permalink
hlint improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
divarvel committed Jul 5, 2024
1 parent b00c939 commit 4dc314c
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions biscuit/test/Spec/SampleReader.hs
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeApplications #-}
module Spec.SampleReader where

import Control.Arrow ((&&&))
Expand Down Expand Up @@ -238,7 +236,7 @@ processTestCase step rootPk TestCase{..} =
compareParseErrors :: ParseError -> RustError -> Assertion
compareParseErrors pe re =
let mustMatch p = assertBool (show (re,pe)) $ isJust $ re ^? p
mustMatchEither ps = assertBool (show (re, pe)) $ any isJust $ (re ^?) <$> ps
mustMatchEither ps = assertBool (show (re, pe)) $ any (isJust . (re ^?)) ps
in case pe of
InvalidHexEncoding ->
assertFailure $ "InvalidHexEncoding can't appear here " <> show re
Expand Down

0 comments on commit 4dc314c

Please sign in to comment.