-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
better handling of whitespaces when parsing mixin stanza.
- Loading branch information
1 parent
51285fc
commit da8b959
Showing
16 changed files
with
503 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
cabal-version: 2.4 | ||
name: mixin | ||
version: 0 | ||
|
||
-- mixin field: | ||
-- in 2.2 we got leading/trailing commas | ||
-- in 3.0 we got lax space parsing | ||
-- | ||
-- This should fail | ||
executable str-example | ||
main-is: Main.hs | ||
build-depends: base, str-string, str-bytestring | ||
mixins: str-string ( Str as Str.String ), | ||
str-bytestring ( Str as Str.ByteString ), | ||
hs-source-dirs: str-example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
VERSION: Just (mkVersion [2,4]) | ||
mixin-1.cabal:13:41: | ||
unexpected space after parenthesis, use cabal-version: 2.4 or higher | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
cabal-version: 2.2 | ||
name: mixin | ||
version: 0 | ||
|
||
-- mixin field: | ||
-- in 2.2 we got leading/trailing commas | ||
-- in 2.2 we got lax space parsing | ||
-- | ||
-- This should fail | ||
executable str-example | ||
main-is: Main.hs | ||
build-depends: base, str-string, str-bytestring | ||
mixins: str-string hiding ( Foo ) | ||
hs-source-dirs: str-example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
VERSION: Just (mkVersion [2,2]) | ||
mixin-2.cabal:13:48: | ||
unexpected space after parenthesis, use cabal-version: 2.4 or higher | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cabal-version: 2.0 | ||
name: mixin | ||
version: 0 | ||
|
||
executable str-example | ||
main-is: Main.hs | ||
build-depends: base, str-string, str-bytestring | ||
mixins: str-string (Str as Str.String), | ||
str-bytestring (Str as Str.ByteString) | ||
hs-source-dirs: str-example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
GenericPackageDescription | ||
{condBenchmarks = [], | ||
condExecutables = [_×_ | ||
`UnqualComponentName "str-example"` | ||
CondNode | ||
{condTreeComponents = [], | ||
condTreeConstraints = [Dependency | ||
`PackageName "base"` | ||
AnyVersion | ||
(Set.fromList [LMainLibName]), | ||
Dependency | ||
`PackageName "str-string"` | ||
AnyVersion | ||
(Set.fromList [LMainLibName]), | ||
Dependency | ||
`PackageName "str-bytestring"` | ||
AnyVersion | ||
(Set.fromList [LMainLibName])], | ||
condTreeData = Executable | ||
{buildInfo = BuildInfo | ||
{asmOptions = [], | ||
asmSources = [], | ||
autogenModules = [], | ||
buildToolDepends = [], | ||
buildTools = [], | ||
buildable = True, | ||
cSources = [], | ||
ccOptions = [], | ||
cmmOptions = [], | ||
cmmSources = [], | ||
cppOptions = [], | ||
customFieldsBI = [], | ||
cxxOptions = [], | ||
cxxSources = [], | ||
defaultExtensions = [], | ||
defaultLanguage = Nothing, | ||
extraBundledLibs = [], | ||
extraDynLibFlavours = [], | ||
extraFrameworkDirs = [], | ||
extraGHCiLibs = [], | ||
extraLibDirs = [], | ||
extraLibFlavours = [], | ||
extraLibs = [], | ||
frameworks = [], | ||
hsSourceDirs = ["str-example"], | ||
includeDirs = [], | ||
includes = [], | ||
installIncludes = [], | ||
jsSources = [], | ||
ldOptions = [], | ||
mixins = [`Mixin {mixinPackageName = PackageName "str-string", mixinIncludeRenaming = IncludeRenaming {includeProvidesRn = ModuleRenaming [(ModuleName ["Str"],ModuleName ["Str","String"])], includeRequiresRn = DefaultRenaming}}`, | ||
`Mixin {mixinPackageName = PackageName "str-bytestring", mixinIncludeRenaming = IncludeRenaming {includeProvidesRn = ModuleRenaming [(ModuleName ["Str"],ModuleName ["Str","ByteString"])], includeRequiresRn = DefaultRenaming}}`], | ||
oldExtensions = [], | ||
options = PerCompilerFlavor [] [], | ||
otherExtensions = [], | ||
otherLanguages = [], | ||
otherModules = [], | ||
pkgconfigDepends = [], | ||
profOptions = PerCompilerFlavor [] [], | ||
sharedOptions = PerCompilerFlavor [] [], | ||
staticOptions = PerCompilerFlavor [] [], | ||
targetBuildDepends = [Dependency | ||
`PackageName "base"` | ||
AnyVersion | ||
(Set.fromList | ||
[LMainLibName]), | ||
Dependency | ||
`PackageName "str-string"` | ||
AnyVersion | ||
(Set.fromList | ||
[LMainLibName]), | ||
Dependency | ||
`PackageName "str-bytestring"` | ||
AnyVersion | ||
(Set.fromList | ||
[LMainLibName])], | ||
virtualModules = []}, | ||
exeName = `UnqualComponentName "str-example"`, | ||
exeScope = ExecutablePublic, | ||
modulePath = "Main.hs"}}], | ||
condForeignLibs = [], | ||
condLibrary = Nothing, | ||
condSubLibraries = [], | ||
condTestSuites = [], | ||
genPackageFlags = [], | ||
packageDescription = PackageDescription | ||
{author = "", | ||
benchmarks = [], | ||
bugReports = "", | ||
buildTypeRaw = Nothing, | ||
category = "", | ||
copyright = "", | ||
customFieldsPD = [], | ||
dataDir = "", | ||
dataFiles = [], | ||
description = "", | ||
executables = [], | ||
extraDocFiles = [], | ||
extraSrcFiles = [], | ||
extraTmpFiles = [], | ||
foreignLibs = [], | ||
homepage = "", | ||
library = Nothing, | ||
licenseFiles = [], | ||
licenseRaw = Left NONE, | ||
maintainer = "", | ||
package = PackageIdentifier | ||
{pkgName = `PackageName "mixin"`, | ||
pkgVersion = `mkVersion [0]`}, | ||
pkgUrl = "", | ||
setupBuildInfo = Nothing, | ||
sourceRepos = [], | ||
specVersionRaw = Left `mkVersion [2,0]`, | ||
stability = "", | ||
subLibraries = [], | ||
synopsis = "", | ||
testSuites = [], | ||
testedWith = []}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
cabal-version: 2.0 | ||
name: mixin | ||
version: 0 | ||
|
||
executable str-example | ||
main-is: Main.hs | ||
hs-source-dirs: str-example | ||
build-depends: | ||
base -any, | ||
str-string -any, | ||
str-bytestring -any | ||
mixins: | ||
str-string (Str as Str.String), | ||
str-bytestring (Str as Str.ByteString) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
cabal-version: 3.0 | ||
name: mixin | ||
version: 0 | ||
|
||
-- mixin field: | ||
-- in 2.2 we got leading/trailing commas | ||
-- in 3.0 we got lax space parsing | ||
executable str-example | ||
main-is: Main.hs | ||
build-depends: base, str-string, str-bytestring | ||
mixins: str-string ( Str as Str.String ), | ||
str-bytestring ( Str as Str.ByteString ), | ||
hs-source-dirs: str-example |
Oops, something went wrong.