Skip to content

Commit c05500e

Browse files
committed
more build fixups
1 parent 317e570 commit c05500e

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@
1414
#
1515
name: Haskell-CI
1616
on:
17-
- push
18-
- pull_request
17+
push:
18+
branches:
19+
- master
20+
pull_request:
21+
branches:
22+
- master
1923
jobs:
2024
linux:
2125
name: Haskell-CI - Linux - ${{ matrix.compiler }}
@@ -241,8 +245,6 @@ jobs:
241245
echo "packages: ${PKGDIR_reform}" >> cabal.project
242246
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package reform" >> cabal.project ; fi
243247
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
244-
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package reform" >> cabal.project ; fi
245-
if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
246248
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package reform" >> cabal.project ; fi
247249
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
248250
cat >> cabal.project <<EOF

Text/Reform/Core.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ instance (SG.Semigroup input, Monad m) => SG.Semigroup (Environment m input) whe
9898
(Found x, Found y) -> return $ Found (x SG.<> y)
9999
(Found x, _ ) -> return $ Found x
100100
(_ , Found y) -> return $ Found y
101+
(Default, Default) -> return Default
101102

102103
-- | Not quite sure when this is useful and so hard to say if the rules for combining things with Missing/Default are correct
103104
instance (SG.Semigroup input, Monad m) => Monoid (Environment m input) where

Text/Reform/Generalized.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ input fromInput toView initialValue =
4141
return ( View $ const $ toView i initialValue
4242
, return $ Error [(unitRange i, error)]
4343
)
44+
(Found fromInput) -> error "input: How could this even happen?"
4445
Missing ->
4546
return ( View $ const $ toView i initialValue
4647
, return $ Error [(unitRange i, commonFormError (InputMissing i))]
@@ -306,6 +307,7 @@ inputChoiceForms def choices mkView =
306307

307308
selectFirst :: [(Form m input error view proof a, lbl)] -> [(Form m input error view proof a, lbl, Bool)]
308309
selectFirst ((frm, lbl):fs) = (frm,lbl,True) : map (\(frm',lbl') -> (frm', lbl', False)) fs
310+
selectFirst [] = []
309311

310312
markSelected :: Int -> [(Int, (Form m input error view proof a, lbl))] -> [(Form m input error view proof a, lbl, Bool)]
311313
markSelected n choices =

cabal.haskell-ci

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
branches: master
2+
3+
error-unused-packages: False

0 commit comments

Comments
 (0)