This project is mirrored from https://github.com/haskell/Cabal.git.
Pull mirroring updated .
- Mar 26, 2008
-
-
Duncan Coutts authored
-
Duncan Coutts authored
-
malcolm wallace authored
- Mar 25, 2008
-
-
Duncan Coutts authored
I think. It's hard to test since with base as it is we cannot easily compile without that instance being in scope.
-
malcolm wallace authored
-
malcolm wallace authored
-
malcolm wallace authored
-
malcolm wallace authored
-
malcolm wallace authored
-
malcolm wallace authored
-
malcolm wallace authored
-
Duncan Coutts authored
The pretty printer version should be using Text but I've left them as comments for the moment as they do not have corresponding parsers yet.
-
Duncan Coutts authored
-
- Mar 24, 2008
-
-
Duncan Coutts authored
One use was for parsing bools in the installed package info. We can go with the more liberal Text instance for that. The other use is for parsing Haskell strings in quoted string fields. So we keep it for that purpose but restrict the type and rename to parseHaskellString.
-
Duncan Coutts authored
So it accepts the same valid values as parseReadS did, but doesn't fall over on unknown values, returning (OtherCompiler "the_name").
-
Duncan Coutts authored
-
Duncan Coutts authored
-
Duncan Coutts authored
-
Duncan Coutts authored
This means we can now parse unknown extensions without falling over. Indeed if the compiler supports the unknown extension then we can even successfully use it. This gives us some forwards compatability for new extensions.
-
Duncan Coutts authored
That is, extensions the compiler does not support, as opposed to extensions that are unknown to Cabal.
-
Duncan Coutts authored
Read the ghc --supported-languages list using simpleParse rather than reads. It now parses extensions that GHC recognises but Cabal does not as (UnknownExtension theExtensionName). For example this allows people to use the PArr extension which ghc currently supports but which is not a finalised registered extension.
-
Duncan Coutts authored
The parse function is ~15x faster than using reads by using a simple hash table :: Array Char [(String, Extension)]. The hash function is then just 'head' -- the first letter of the extension name.
-
Duncan Coutts authored
-
Duncan Coutts authored
Drop parseReadSQ as that was the last use of it. Still need to add a build warning for UnknownBuildTypes
-
- Mar 23, 2008
-
-
Saizan authored
-
- Mar 21, 2008
-
-
Duncan Coutts authored
Added an UnknownLicense String constructor so that we can remember unknown license names and report them and prevent them from being uploaded to hackage, but not fail hard with a parse error upon encountering an unknown license. This does not add any new licesnes or and new valid parses of existing licenses. The parsing phase now allows an optional version like "GPL-3" however that would still be classified as an unknown license at the moment. The point is it's no longer a parse error but a semantic error instead.
-
Duncan Coutts authored
-
mnislaih authored
I shamelessly stole some code from GHCi for the highlighting.
-
- Mar 20, 2008
-
-
mnislaih authored
-
- Mar 19, 2008
-
-
mnislaih authored
-
- Mar 21, 2008
-
-
Duncan Coutts authored
Initially it's exactly the same format as Read/Show. We can make it more liberal later.
-
Duncan Coutts authored
This is a tad subtle since we actually have two ways of parsing compiler flavours. One expects, or at least allows lower case names like "ghc" and "nhc98", the other uses Read/Show which gives "GHC" and "NHC". What we're doing here is only changing the first variety. The cases where we parse using Read (and display using Show) are not changed. At some point we'll switch those over to the more liberal parser, but not yet as we don't want to cause compatibility problems.
-
Duncan Coutts authored
-
Duncan Coutts authored
And change all uses.
-
Duncan Coutts authored
The instance for Version is in the Text module itself because the Version type is defined in base. This avoids an orphan instance.
-
Duncan Coutts authored
This is intended to replace all these showFoo read/parseFoo functions we have all over the place. It's like the Read/Show classes but uses a half decent parser and pretty printer: class Text a where disp :: a -> Doc parse :: ReadP a This patch just adds the class and an instance for Bool, replacing the parseBool function used in a few places. More to follow...
-
- Mar 19, 2008
-
-
Duncan Coutts authored
-
Duncan Coutts authored
-
Duncan Coutts authored
-