Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Haskell/Template/Task.hs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
checkUniqueness (m : map fst ms)
inform $ string $ "Parsing template module " <> m
void $ parse reject exts s
mapM_ (checkLineLength reject s) $ runIdentity maxLineLength
mapM_ (checkLineLength reject s . subtract 1) $ runIdentity maxLineLength
Comment thread
jvoigtlaender marked this conversation as resolved.
void $ parseModule exts `mapM` ms
let mSampleSolution = lookup "SampleSolution" ms
-- This step is currently optional and will not run if no sample solution is provided
Expand All @@ -401,7 +401,7 @@
}
let others = filter ((/="SampleSolution") . fst) ms
let content = replace "module SampleSolution" ("module " ++ m) sampleSolution
mapM_ (checkLineLength reject content) $ runIdentity maxLineLength
mapM_ (checkLineLength reject content . subtract 3) $ runIdentity maxLineLength
Comment thread
jvoigtlaender marked this conversation as resolved.
(modules, solutionFile) <- writeModules (m, content) others path
sequence_ $ testPhases reject inform s solutionFile modules stricterConfig exts content path
where
Expand Down Expand Up @@ -610,7 +610,7 @@
checkResult reject ghcErrors how howMany $ const $ return ()
where
warnings = msum (selectWarnings config)
makeOpts xs = ("-w":) $ ("-Werror=" ++) <$> xs

Check notice on line 613 in src/Haskell/Template/Task.hs

View workflow job for this annotation

GitHub Actions / Check Spelling

Line matches candidate pattern (Compiler flags) ``(?:^|[\t ,"'`=(])-[DPWXYLlf](?=[A-Z]{2,}|[A-Z][a-z]|[a-z]{2,})`` (candidate-pattern)
ghcOpts = makeOpts warnings
howMany = runIdentity $ configGhcLimit config
extensions = extensionsOf config
Expand All @@ -625,7 +625,7 @@
-> String
-> m ()
matchTemplate reject config context exts template submission =
runMatchTestOn reject exts template submission $ \case

Check warning on line 628 in src/Haskell/Template/Task.hs

View workflow job for this annotation

GitHub Actions / build_and_test (ubuntu-latest, stack)

Pattern match(es) are non-exhaustive

Check warning on line 628 in src/Haskell/Template/Task.hs

View workflow job for this annotation

GitHub Actions / build_and_test (ubuntu-latest, stack)

Pattern match(es) are non-exhaustive
Fail loc -> mapM_ (rejectMatch rejectWithHint config context template submission) loc
where
rejectWithHint = rejectWithMessage reject rejectHint
Expand Down Expand Up @@ -819,7 +819,7 @@
(return . (,rawModules))
eConfig
where
configJson:rawModules = splitModules False configAndModules

Check warning on line 822 in src/Haskell/Template/Task.hs

View workflow job for this annotation

GitHub Actions / build_and_test (ubuntu-latest, stack)

Pattern match(es) are non-exhaustive

Check warning on line 822 in src/Haskell/Template/Task.hs

View workflow job for this annotation

GitHub Actions / build_and_test (ubuntu-latest, stack)

Pattern match(es) are non-exhaustive
eConfig :: Either ParseException SolutionConfigOpt
eConfig = decodeEither' $ BS.pack configJson

Expand Down
Loading