Skip to content

Commit

Permalink
Make changes required by new Ormolu version
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewDaggitt committed Oct 12, 2024
1 parent 259469e commit 243647f
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ makeTestTreeFromFile testOptions testSpecFile = do
TestSpecs testSpecs <- readTestSpecsFile testSpecFile
return
[ someLocalOptions testOptions (singleTest (testSpecName testSpec) testSpec)
| testSpec <- NonEmpty.toList testSpecs
| testSpec <- NonEmpty.toList testSpecs
]

-- | Create a test tree from all test specifications in a directory, recursively.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ acceptTestProduced testProduces (IgnoreFiles testIgnores) = do
oldTestSpecProduces <- testSpecProduces . acceptTestSpec <$> get
let newTestSpecProduces =
[ testSpecProducesPattern
| testSpecProducesPattern <- oldTestSpecProduces,
any (testSpecProducesPattern `match`) actualFiles
| testSpecProducesPattern <- oldTestSpecProduces,
any (testSpecProducesPattern `match`) actualFiles
]
modify $ \acceptState@AcceptState {..} ->
acceptState {acceptTestSpec = acceptTestSpec {testSpecProduces = newTestSpecProduces}}
Expand Down Expand Up @@ -450,9 +450,9 @@ findTestProducesActual testIgnoreFiles = do
-- Filter out the files copied by 'copyTestNeeds' or matched by 'testIgnoreFiles'.
let tempFilesProducedAndNotIgnored =
[ file
| file <- tempFiles,
file `notElem` testNeeds,
and [not (ignore `match` file) | ignore <- testIgnoreFiles]
| file <- tempFiles,
file `notElem` testNeeds,
and [not (ignore `match` file) | ignore <- testIgnoreFiles]
]
return tempFilesProducedAndNotIgnored

Expand Down
3 changes: 1 addition & 2 deletions vehicle/src/Vehicle/Backend/LossFunction/Logics.hs
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,7 @@ parameterisedYagerTranslation p =
orOp = mkOp2 tRat $ \x y ->
ratLit 1
-: lmin
( ((x ^: p) +: (y ^: p)) ^: (1 / p)
)
(((x ^: p) +: (y ^: p)) ^: (1 / p))
(ratLit 1)

--------------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions vehicle/src/Vehicle/CommandLine.hs
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,7 @@ typeSystemParser =
<> line
<> indent
2
( vsep allTypeSystems
)
(vsep allTypeSystems)
)
)
<> value Standard
Expand Down
2 changes: 1 addition & 1 deletion vehicle/src/Vehicle/Compile/Print/Error.hs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ instance MeaningfulError CompileError where
mkRes :: [Endo (DSLExpr builtin)]
mkRes =
[ Endo $ \tRes -> pi Nothing (visibilityOf arg) (relevanceOf arg) (tHole ("arg" <> pack (show i))) (const tRes)
| (i, arg) <- zip [0 :: Int ..] args
| (i, arg) <- zip [0 :: Int ..] args
]

expectedType :: Expr builtin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ solveLinearityConstraint _ (WithContext constraint ctx) = do
-- Constraint solving

type MonadLinearitySolver m =
( MonadTypeChecker LinearityBuiltin m
)
(MonadTypeChecker LinearityBuiltin m)

type LinearitySolver =
forall m.
Expand Down
3 changes: 1 addition & 2 deletions vehicle/src/Vehicle/Compile/Type/Irrelevance.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ removeIrrelevantCode x = runIdentity $ remove x
-- Remove polarity and linearity annotations

type MonadRemove m =
( Monad m
)
(Monad m)

class RemoveIrrelevantCode m a where
remove :: (MonadRemove m) => a -> m a
Expand Down

0 comments on commit 243647f

Please sign in to comment.