-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into support-ghc981
- Loading branch information
Showing
394 changed files
with
304,048 additions
and
65,624 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,7 @@ jobs: | |
cabal-version: ${{ env.DEFAULT_CABAL_VERSION }} | ||
|
||
- name: Build wheel | ||
uses: pypa/[email protected].2 | ||
uses: pypa/[email protected].4 | ||
with: | ||
package-dir: "./vehicle-python" | ||
output-dir: "./vehicle-python/wheelhouse" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
-- Cabal project configuration file for GHC 9.4.8 | ||
-- | ||
-- See `cabal.project` for details. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
tasty-golden-executable/src/Test/Tasty/Golden/Executable/TestSpec/SizeOnly.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | ||
|
||
module Test.Tasty.Golden.Executable.TestSpec.SizeOnly | ||
( SizeOnlyExtension (..), | ||
SizeOnlyExtensions (..), | ||
toSizeOnlyExtensionsSet, | ||
) | ||
where | ||
|
||
import Data.Aeson.Types (FromJSON (..), Parser, ToJSON (..), Value, typeMismatch) | ||
import Data.Aeson.Types qualified as Value (Value (..)) | ||
import Data.Data (Typeable) | ||
import Data.Set (Set) | ||
import Data.Set qualified as Set (fromList) | ||
import Data.String (IsString (..)) | ||
import Data.Tagged (Tagged) | ||
import Data.Text qualified as Text | ||
import Test.Tasty.Options (IsOption (..), safeRead) | ||
|
||
-- | Extension for which only diffs should show the size. | ||
newtype SizeOnlyExtension = SizeOnlyExtension {extension :: FilePath} | ||
deriving (Eq, Ord, Typeable) | ||
|
||
instance Show SizeOnlyExtension where | ||
show :: SizeOnlyExtension -> String | ||
show (SizeOnlyExtension programName) = programName | ||
|
||
instance Read SizeOnlyExtension where | ||
readsPrec :: Int -> ReadS SizeOnlyExtension | ||
readsPrec _prec programName = [(SizeOnlyExtension programName, "")] | ||
|
||
instance IsString SizeOnlyExtension where | ||
fromString :: String -> SizeOnlyExtension | ||
fromString = SizeOnlyExtension | ||
|
||
instance FromJSON SizeOnlyExtension where | ||
parseJSON :: Value -> Parser SizeOnlyExtension | ||
parseJSON (Value.String name) = return $ SizeOnlyExtension (Text.unpack name) | ||
parseJSON value = typeMismatch "String" value | ||
|
||
instance ToJSON SizeOnlyExtension where | ||
toJSON :: SizeOnlyExtension -> Value | ||
toJSON = toJSON . extension | ||
|
||
newtype SizeOnlyExtensions = SizeOnlyExtensions [SizeOnlyExtension] | ||
deriving (Eq, Ord, Show, Typeable, Semigroup, Monoid) | ||
|
||
instance IsOption SizeOnlyExtensions where | ||
defaultValue :: SizeOnlyExtensions | ||
defaultValue = mempty | ||
|
||
parseValue :: String -> Maybe SizeOnlyExtensions | ||
parseValue input = SizeOnlyExtensions <$> traverse safeRead names | ||
where | ||
names = Text.unpack . Text.strip <$> Text.splitOn "," (Text.pack input) | ||
|
||
optionName :: Tagged SizeOnlyExtensions String | ||
optionName = return "sizeOnly" | ||
|
||
optionHelp :: Tagged SizeOnlyExtensions String | ||
optionHelp = return "A list of file extensions for which diffs should only display the sizes of the old and new files." | ||
|
||
toSizeOnlyExtensionsSet :: SizeOnlyExtensions -> Set String | ||
toSizeOnlyExtensionsSet (SizeOnlyExtensions exts) = Set.fromList (fmap extension exts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.