Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Haskell
Cabal
Commits
6a7656ef
Unverified
Commit
6a7656ef
authored
1 year ago
by
Phil de Joux
Browse files
Options
Downloads
Patches
Plain Diff
Use knownLanguages for describing Language
parent
12223d7b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Cabal-described/src/Distribution/Described.hs
+6
-4
6 additions, 4 deletions
Cabal-described/src/Distribution/Described.hs
Cabal-syntax/src/Language/Haskell/Extension.hs
+1
-1
1 addition, 1 deletion
Cabal-syntax/src/Language/Haskell/Extension.hs
with
7 additions
and
5 deletions
Cabal-described/src/Distribution/Described.hs
+
6
−
4
View file @
6a7656ef
...
@@ -39,8 +39,10 @@ module Distribution.Described (
...
@@ -39,8 +39,10 @@ module Distribution.Described (
)
where
)
where
import
Prelude
import
Prelude
(
Bool
(
..
),
Char
,
Either
(
..
),
Enum
(
..
),
Eq
(
..
),
Ord
(
..
),
Show
(
..
),
String
,
elem
,
fmap
,
foldr
,
id
,
map
,
maybe
,
otherwise
,
return
,
undefined
,
(
$
),
(
Bool
(
..
),
Char
,
Either
(
..
),
Enum
(
..
),
Eq
(
..
),
Ord
(
..
),
Show
(
..
),
String
(
.
))
,
elem
,
fmap
,
foldr
,
id
,
map
,
maybe
,
otherwise
,
return
,
reverse
,
undefined
,
(
$
),
(
.
),
(
<$>
)
)
import
Data.Functor.Identity
(
Identity
(
..
))
import
Data.Functor.Identity
(
Identity
(
..
))
import
Data.Maybe
(
fromMaybe
)
import
Data.Maybe
(
fromMaybe
)
...
@@ -100,7 +102,7 @@ import Distribution.Types.UnqualComponentName (UnqualComponentName)
...
@@ -100,7 +102,7 @@ import Distribution.Types.UnqualComponentName (UnqualComponentName)
import
Distribution.Utils.Path
(
LicenseFile
,
PackageDir
,
SourceDir
,
SymbolicPath
)
import
Distribution.Utils.Path
(
LicenseFile
,
PackageDir
,
SourceDir
,
SymbolicPath
)
import
Distribution.Verbosity
(
Verbosity
)
import
Distribution.Verbosity
(
Verbosity
)
import
Distribution.Version
(
Version
,
VersionRange
)
import
Distribution.Version
(
Version
,
VersionRange
)
import
Language.Haskell.Extension
(
Extension
,
Language
)
import
Language.Haskell.Extension
(
Extension
,
Language
,
knownLanguages
)
-- | Class describing the pretty/parsec format of a.
-- | Class describing the pretty/parsec format of a.
class
(
Pretty
a
,
Parsec
a
)
=>
Described
a
where
class
(
Pretty
a
,
Parsec
a
)
=>
Described
a
where
...
@@ -422,7 +424,7 @@ instance Described IncludeRenaming where
...
@@ -422,7 +424,7 @@ instance Described IncludeRenaming where
mr
=
describe
(
Proxy
::
Proxy
ModuleRenaming
)
mr
=
describe
(
Proxy
::
Proxy
ModuleRenaming
)
instance
Described
Language
where
instance
Described
Language
where
describe
_
=
REUnion
[
"GHC2021"
,
"Haskell2010"
,
"Haskell98"
]
describe
_
=
REUnion
$
(
REString
.
show
)
<$>
reverse
knownLanguages
instance
Described
LegacyExeDependency
where
instance
Described
LegacyExeDependency
where
describe
_
=
RETodo
describe
_
=
RETodo
...
...
This diff is collapsed.
Click to expand it.
Cabal-syntax/src/Language/Haskell/Extension.hs
+
1
−
1
View file @
6a7656ef
...
@@ -63,7 +63,7 @@ instance Structured Language
...
@@ -63,7 +63,7 @@ instance Structured Language
instance
NFData
Language
where
rnf
=
genericRnf
instance
NFData
Language
where
rnf
=
genericRnf
-- | List of known (supported) languages for GHC
-- | List of known (supported) languages for GHC
, oldest first.
knownLanguages
::
[
Language
]
knownLanguages
::
[
Language
]
knownLanguages
=
[
Haskell98
,
Haskell2010
,
GHC2021
]
knownLanguages
=
[
Haskell98
,
Haskell2010
,
GHC2021
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment