Skip to content
Merged
Show file tree
Hide file tree
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
89 changes: 62 additions & 27 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.14.0.20250908
compilerKind: ghc
compilerVersion: 9.14.0.20250908
setup-method: ghcup-prerelease
allow-failure: false
- compiler: ghc-9.12.2
compilerKind: ghc
compilerVersion: 9.12.2
Expand Down Expand Up @@ -107,8 +112,8 @@ jobs:
chmod a+x "$HOME/.ghcup/bin/ghcup"
- name: Install cabal-install
run: |
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1-p1 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1-p1 -vnormal+nowrap" >> "$GITHUB_ENV"
"$HOME/.ghcup/bin/ghcup" install cabal 3.16.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.16.0.0 -vnormal+nowrap" >> "$GITHUB_ENV"
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
Expand All @@ -123,6 +128,21 @@ jobs:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
HCVER: ${{ matrix.compilerVersion }}
- name: Install GHC (GHCup prerelease)
if: matrix.setup-method == 'ghcup-prerelease'
run: |
"$HOME/.ghcup/bin/ghcup" config add-release-channel prereleases
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false)
HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER")
HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#')
HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#')
echo "HC=$HC" >> "$GITHUB_ENV"
echo "HCPKG=$HCPKG" >> "$GITHUB_ENV"
echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
HCNAME: ${{ matrix.compiler }}
HCVER: ${{ matrix.compilerVersion }}
- name: Set PATH and environment variables
run: |
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
Expand All @@ -133,7 +153,7 @@ jobs:
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "HEADHACKAGE=true" >> "$GITHUB_ENV" ; else echo "HEADHACKAGE=false" >> "$GITHUB_ENV" ; fi
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
env:
HCKIND: ${{ matrix.compilerKind }}
Expand Down Expand Up @@ -161,6 +181,18 @@ jobs:
repository hackage.haskell.org
url: http://hackage.haskell.org/
EOF
if $HEADHACKAGE; then
cat >> $CABAL_CONFIG <<EOF
repository head.hackage.ghc.haskell.org
url: https://ghc.gitlab.haskell.org/head.hackage/
secure: True
root-keys: 7541f32a4ccca4f97aea3b22f5e593ba2c0267546016b992dfadcd2fe944e55d
26021a13b401500c8eb2761ca95c61f2d625bfef951b939a8124ed12ecf07329
f76d08be13e9a61a377a85e2fb63f4c5435d40f8feb3e12eb05905edb8cdea89
key-threshold: 3
active-repositories: hackage.haskell.org, head.hackage.ghc.haskell.org:override
EOF
fi
cat >> $CABAL_CONFIG <<EOF
program-default-options
ghc-options: $GHCJOBS +RTS -M3G -RTS
Expand Down Expand Up @@ -191,9 +223,9 @@ jobs:
run: |
touch cabal.project
echo "packages: $GITHUB_WORKSPACE/source/./singletons" >> cabal.project
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/./singletons-th" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/./singletons-base" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/./singletons-base-code-generator" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/./singletons-th" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/./singletons-base" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "packages: $GITHUB_WORKSPACE/source/./singletons-base-code-generator" >> cabal.project ; fi
cat cabal.project
- name: sdist
run: |
Expand All @@ -217,31 +249,34 @@ jobs:
touch cabal.project
touch cabal.project.local
echo "packages: ${PKGDIR_singletons}" >> cabal.project
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "packages: ${PKGDIR_singletons_th}" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "packages: ${PKGDIR_singletons_base}" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "packages: ${PKGDIR_singletons_base_code_generator}" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "packages: ${PKGDIR_singletons_th}" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "packages: ${PKGDIR_singletons_base}" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "packages: ${PKGDIR_singletons_base_code_generator}" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package singletons" >> cabal.project ; fi
if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "package singletons-th" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "package singletons-base" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "package singletons-base-code-generator" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "package singletons-th" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "package singletons-base" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "package singletons-base-code-generator" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package singletons" >> cabal.project ; fi
if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "package singletons-th" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "package singletons-base" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo "package singletons-base-code-generator" >> cabal.project ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "package singletons-th" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "package singletons-base" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo "package singletons-base-code-generator" >> cabal.project ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
cat >> cabal.project <<EOF
source-repository-package
type: git
location: https://github.com/goldfirere/th-desugar
tag: 1c9e884f80d6e8efb5109cb85bb889a12bc9ed8d
EOF
if $HEADHACKAGE; then
echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1,/g')" >> cabal.project
fi
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(Cabal|Cabal-syntax|singletons|singletons-base|singletons-base-code-generator|singletons-th)$/; }' >> cabal.project.local
cat cabal.project
cat cabal.project.local
Expand Down Expand Up @@ -269,12 +304,12 @@ jobs:
run: |
cd ${PKGDIR_singletons} || false
${CABAL} -vnormal check
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then cd ${PKGDIR_singletons_th} || false ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then cd ${PKGDIR_singletons_base} || false ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then cd ${PKGDIR_singletons_base_code_generator} || false ; fi
if [ $((HCNUMVER >= 91200)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then cd ${PKGDIR_singletons_th} || false ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then cd ${PKGDIR_singletons_base} || false ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then cd ${PKGDIR_singletons_base_code_generator} || false ; fi
if [ $((HCNUMVER >= 91400)) -ne 0 ] ; then ${CABAL} -vnormal check ; fi
- name: haddock
run: |
$CABAL v2-haddock --disable-documentation $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ windows for requirements on the compiler version needed to build each library:
GHC language extensions, even more so than `singletons` itself. As such, it
is difficult to maintain support for multiple GHC versions in any given
release of either library, so they only support the latest major GHC version
(currently GHC 9.12).
(currently GHC 9.14).

Any code that uses the singleton-generation functionality from `singletons-th`
or `singletons-base` needs to enable a long list of GHC extensions. This list
Expand Down
2 changes: 0 additions & 2 deletions cabal.haskell-ci
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ jobs-selection: any
haddock-components: libs
-- Needed to avoid https://github.com/haskell/cabal/issues/9917
installed: +all -Cabal -Cabal-syntax
-- Work around https://github.com/haskell-CI/haskell-ci/issues/766
cabal-install-version: 3.14.1.1
-- -Wunused-packages mistakenly flags some of singletons-base-test-suite's
-- dependencies as unused.
error-unused-packages: False
4 changes: 4 additions & 0 deletions singletons-base-code-generator/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog for the `singletons-base-code-generator` project
==========================================================

next [????.??.??]
-----------------
* Require building with GHC 9.14.

0.1 [2024.12.11]
----------------
* Initial release.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ author: Ryan Scott <ryan.gl.scott@gmail.com>
maintainer: Ryan Scott <ryan.gl.scott@gmail.com>
bug-reports: https://github.com/goldfirere/singletons/issues
stability: experimental
tested-with: GHC == 9.12.2
tested-with: GHC == 9.14.1
extra-doc-files: CHANGES.md
extra-source-files: README.md
license: BSD-3-Clause
Expand Down Expand Up @@ -38,6 +38,6 @@ executable singletons-base-code-generator
ghc-options: -Wall -Wcompat -threaded
default-language: GHC2021
main-is: SingletonsBaseCodeGenerator.hs
build-depends: base >= 4.21 && < 4.22,
build-depends: base >= 4.22 && < 4.23,
directory >= 1.2 && < 1.4,
filepath >= 1.3 && < 1.6
4 changes: 4 additions & 0 deletions singletons-base/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog for the `singletons-base` project
===========================================

next [????.??.??]
-----------------
* Require building with GHC 9.14.

3.5 [2024.12.11]
----------------
* Require building with GHC 9.12.
Expand Down
2 changes: 1 addition & 1 deletion singletons-base/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ that code with `singletons-base`.

`singletons-base` uses code that relies on bleeding-edge GHC language
extensions. As such, `singletons-base` only supports the latest major version
of GHC (currently GHC 9.12). For more information,
of GHC (currently GHC 9.14). For more information,
consult the `singletons`
[`README`](https://github.com/goldfirere/singletons/blob/master/README.md).

Expand Down
10 changes: 5 additions & 5 deletions singletons-base/singletons-base.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ author: Richard Eisenberg <rae@cs.brynmawr.edu>, Jan Stolarek <jan.stola
maintainer: Ryan Scott <ryan.gl.scott@gmail.com>
bug-reports: https://github.com/goldfirere/singletons/issues
stability: experimental
tested-with: GHC == 9.12.2
tested-with: GHC == 9.14.1
extra-doc-files: CHANGES.md
extra-source-files: README.md
tests/README.md
Expand Down Expand Up @@ -40,7 +40,7 @@ description:
.
@singletons-base@ uses code that relies on bleeding-edge GHC language
extensions. As such, @singletons-base@ only supports the latest major version
of GHC (currently GHC 9.12). For more information,
of GHC (currently GHC 9.14). For more information,
consult the @singletons@
@<https://github.com/goldfirere/singletons/blob/master/README.md README>@.
.
Expand All @@ -67,11 +67,11 @@ source-repository head

library
hs-source-dirs: src
build-depends: base >= 4.21 && < 4.22,
build-depends: base >= 4.22 && < 4.23,
pretty,
singletons == 3.0.*,
singletons-th >= 3.5 && < 3.6,
template-haskell >= 2.23 && < 2.24,
template-haskell >= 2.24 && < 2.25,
text >= 1.2
default-language: GHC2024
other-extensions: TemplateHaskell
Expand Down Expand Up @@ -149,7 +149,7 @@ test-suite singletons-base-test-suite
main-is: SingletonsBaseTestSuite.hs
other-modules: SingletonsBaseTestSuiteUtils

build-depends: base >= 4.21 && < 4.22,
build-depends: base >= 4.22 && < 4.23,
bytestring >= 0.10.9,
deepseq >= 1.4.4,
filepath >= 1.3,
Expand Down
6 changes: 3 additions & 3 deletions singletons-base/src/GHC/TypeLits/Singletons.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
module GHC.TypeLits.Singletons (
Natural, Symbol, Char,
Sing,
SNat, pattern SNat,
SSymbol, pattern SSymbol, pattern SSym,
SChar, pattern SChar,
SNat, data SNat,
SSymbol, data SSymbol, data SSym,
SChar, data SChar,
withKnownNat, withKnownSymbol, withKnownChar,
Error, sError,
ErrorWithoutStackTrace, sErrorWithoutStackTrace,
Expand Down
6 changes: 3 additions & 3 deletions singletons-base/src/GHC/TypeLits/Singletons/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ module GHC.TypeLits.Singletons.Internal (
Sing,

Natural, TL.Symbol, Char,
TN.SNat, pattern TN.SNat,
TL.SSymbol, pattern TL.SSymbol, pattern SSym,
TL.SChar, pattern TL.SChar,
TN.SNat, data TN.SNat,
TL.SSymbol, data TL.SSymbol, data SSym,
TL.SChar, data TL.SChar,
TN.withKnownNat, TL.withKnownSymbol, TL.withKnownChar,
Error, sError,
ErrorWithoutStackTrace, sErrorWithoutStackTrace,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,18 +501,18 @@ GradingClient/Database.hs:(0,0)-(0,0): Splicing declarations
TFHelper_0123456789876543210 (VEC a_0123456789876543210 a_0123456789876543210) (VEC b_0123456789876543210 b_0123456789876543210) = Apply (Apply (&&@#@$) (Apply (Apply (==@#@$) a_0123456789876543210) b_0123456789876543210)) (Apply (Apply (==@#@$) a_0123456789876543210) b_0123456789876543210)
instance PEq U where
type (==) a a = TFHelper_0123456789876543210 a a
type ShowsPrec_0123456789876543210 :: GHC.Num.Natural.Natural
type ShowsPrec_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural
-> U -> Symbol -> Symbol
type family ShowsPrec_0123456789876543210 (a :: GHC.Num.Natural.Natural) (a :: U) (a :: Symbol) :: Symbol where
type family ShowsPrec_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) (a :: U) (a :: Symbol) :: Symbol where
ShowsPrec_0123456789876543210 _ BOOL a_0123456789876543210 = Apply (Apply ShowStringSym0 "BOOL") a_0123456789876543210
ShowsPrec_0123456789876543210 _ STRING a_0123456789876543210 = Apply (Apply ShowStringSym0 "STRING") a_0123456789876543210
ShowsPrec_0123456789876543210 _ NAT a_0123456789876543210 = Apply (Apply ShowStringSym0 "NAT") a_0123456789876543210
ShowsPrec_0123456789876543210 p_0123456789876543210 (VEC arg_0123456789876543210 arg_0123456789876543210) a_0123456789876543210 = Apply (Apply (Apply ShowParenSym0 (Apply (Apply (>@#@$) p_0123456789876543210) (FromInteger 10))) (Apply (Apply (.@#@$) (Apply ShowStringSym0 "VEC ")) (Apply (Apply (.@#@$) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210)) (Apply (Apply (.@#@$) ShowSpaceSym0) (Apply (Apply ShowsPrecSym0 (FromInteger 11)) arg_0123456789876543210))))) a_0123456789876543210
instance PShow U where
type ShowsPrec a a a = ShowsPrec_0123456789876543210 a a a
type ShowsPrec_0123456789876543210 :: GHC.Num.Natural.Natural
type ShowsPrec_0123456789876543210 :: GHC.Internal.Bignum.Natural.Natural
-> AChar -> Symbol -> Symbol
type family ShowsPrec_0123456789876543210 (a :: GHC.Num.Natural.Natural) (a :: AChar) (a :: Symbol) :: Symbol where
type family ShowsPrec_0123456789876543210 (a :: GHC.Internal.Bignum.Natural.Natural) (a :: AChar) (a :: Symbol) :: Symbol where
ShowsPrec_0123456789876543210 _ CA a_0123456789876543210 = Apply (Apply ShowStringSym0 "CA") a_0123456789876543210
ShowsPrec_0123456789876543210 _ CB a_0123456789876543210 = Apply (Apply ShowStringSym0 "CB") a_0123456789876543210
ShowsPrec_0123456789876543210 _ CC a_0123456789876543210 = Apply (Apply ShowStringSym0 "CC") a_0123456789876543210
Expand Down
16 changes: 8 additions & 8 deletions singletons-base/tests/compile-and-dump/Singletons/Classes.golden
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ Singletons/Classes.hs:(0,0)-(0,0): Splicing declarations
data Foo = A | B
data Foo2 = F | G

instance Eq Foo2 where
F == F = True
G == G = True
F == G = False
G == F = False
instance MyOrd Foo where
mycompare = fooCompare
instance MyOrd () where
mycompare _ = const EQ
instance MyOrd Nat where
Zero `mycompare` Zero = EQ
Zero `mycompare` (Succ _) = LT
(Succ _) `mycompare` Zero = GT
(Succ n) `mycompare` (Succ m) = m `mycompare` n
instance MyOrd Foo where
mycompare = fooCompare
instance Eq Foo2 where
F == F = True
G == G = True
F == G = False
G == F = False |]
(Succ n) `mycompare` (Succ m) = m `mycompare` n |]
======>
const :: a -> b -> a
const x _ = x
Expand Down
Loading