diff --git a/.travis.yml b/.travis.yml index bc5aa221084..413dd1b4a09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,17 +8,31 @@ env: - GHCVER=7.6.3 - GHCVER=7.8.4 - GHCVER=7.10.1 + - GHCVER=7.10.2 - GHCVER=head # Note: the distinction between `before_install` and `install` is not important. before_install: - travis_retry sudo add-apt-repository -y ppa:hvr/ghc - travis_retry sudo apt-get update - - travis_retry sudo apt-get install cabal-install-1.22 ghc-$GHCVER-prof ghc-$GHCVER-dyn happy - - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.22/bin:$PATH + - travis_retry sudo apt-get install cabal-install-1.22 ghc-$GHCVER-prof ghc-$GHCVER-dyn happy-1.19.5 alex-3.1.4 + - export PATH=$HOME/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/1.22/bin:/opt/happy/1.19.5/bin:/opt/alex/3.1.4/bin:$PATH install: - cabal update + +# Install (almost) bleeding edge alex + - git clone https://github.com/simonmar/alex.git + - cd alex + - git checkout 447bbb8f53db0201e7ba7fe525f2a3b37c2a5f94 + - cabal sandbox init + - cabal install 'QuickCheck >= 2' + - cabal configure --bindir=$HOME/.cabal/bin + - cabal build + - cabal copy + - cd .. + - which alex + # We intentionally do not install anything before trying to build Cabal because # it should build with each supported GHC version out-of-the-box. diff --git a/Cabal/Cabal.cabal b/Cabal/Cabal.cabal index a7e6ff46e85..a20c303ca3e 100644 --- a/Cabal/Cabal.cabal +++ b/Cabal/Cabal.cabal @@ -142,6 +142,10 @@ source-repository head flag bundled-binary-generic default: False +flag parsec-debug + default: False + manual: True + library build-depends: base >= 4.4 && < 5, @@ -153,13 +157,24 @@ library containers >= 0.1 && < 0.6, array >= 0.1 && < 0.6, pretty >= 1 && < 1.2, - bytestring >= 0.9 + parsec >=3.1.9 && <3.2, + transformers >= 0.4 && <0.5, + bytestring >= 0.9 + + build-tools: + alex >= 3.1.4 if flag(bundled-binary-generic) build-depends: binary >= 0.5 && < 0.7 else build-depends: binary >= 0.7 && < 0.8 + if flag(parsec-debug) + cpp-options: -DCABAL_PARSEC_DEBUG + build-depends: + text >= 1.2 && <1.3, + vector >= 0.10 && <0.12 + -- Needed for GHC.Generics before GHC 7.6 if impl(ghc < 7.6) build-depends: ghc-prim >= 0.2 && < 0.3 @@ -188,6 +203,9 @@ library Distribution.PackageDescription.Parse Distribution.PackageDescription.PrettyPrint Distribution.PackageDescription.Utils + Distribution.Parsec.Lexer + Distribution.Parsec.LexerMonad + Distribution.Parsec.Parser Distribution.ParseUtils Distribution.ReadE Distribution.Simple diff --git a/Cabal/Distribution/Lexer.x b/Cabal/Distribution/Lexer.x new file mode 100644 index 00000000000..3058ba2c678 --- /dev/null +++ b/Cabal/Distribution/Lexer.x @@ -0,0 +1,244 @@ +{ +----------------------------------------------------------------------------- +-- | +-- Module : Distribution.Parsec.Lexer +-- License : BSD3 +-- +-- Maintainer : cabal-devel@haskell.org +-- Portability : portable +-- +-- Lexer for the cabal files. +{-# LANGUAGE BangPatterns #-} +module Distribution.Lexer + (ltest, lexToken, Token(..), LToken(..) + ,bol_section, in_section, in_field_layout, in_field_braces + ,mkLexState) where + +import Distribution.Parsec.LexerMonad +import Control.Monad +import Data.ByteString (ByteString) +import qualified Data.ByteString as B +import qualified Data.ByteString.Char8 as B.Char8 +import Data.Word (Word8) +import qualified Data.Char +import Data.Char (chr, ord) +import Data.List (stripPrefix) +--import Distribution.Simple.Utils (fromUTF8) --don't decode, keep as ByteString + +-- testing only: +import Debug.Trace +import Control.Exception (assert) +import qualified Data.Vector as V +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Encoding.Error as T +} + +-- Various character classes + +$space = \ -- single space char +$digit = 0-9 -- digits +$alpha = [a-z A-Z] -- alphabetic characters +$symbol = [\= \< \> \+ \* \- \& \| \! \$ \% \^ \@ \# \? \/ \\ \~] +$ctlchar = [\x0-\x1f \x7f] +$printable = \x0-\x10ffff # $ctlchar -- so no \n \r +$spacetab = [$space \t] +$bom = \xfeff +$nbsp = \xa0 +$nbspspacetab = [$nbsp $space \t] + +$paren = [ \( \) \[ \] ] +$field_layout = [$printable \t] +$field_layout' = [$printable] # [$space] +$field_braces = [$printable \t] # [\{ \}] +$field_braces' = [$printable] # [\{ \} $space] +$comment = [$printable \t] +$namecore = [$alpha] +$nameextra = [$namecore $digit \- \_ \. \'] +$instr = [$printable $space] # [\"] +$instresc = $printable + +@nl = \n | \r\n | \r +@name = $nameextra* $namecore $nameextra* +@string = \" ( $instr | \\ $instresc )* \" +@numlike = $digit [$digit \.]* +@oplike = [ \, \. \= \< \> \+ \* \- \& \| \! \$ \% \^ \@ \# \? \/ \\ \~ ]+ + +tokens :- + +<0> { + $bom ; + () ; +} + + { + $spacetab* @nl { \_ _ _ -> adjustPos retPos >> lexToken } + $nbspspacetab+ @nl { \_ _ _ -> adjustPos retPos >> addWarning "Non-breaking space occured" >> lexToken } + -- no @nl here to allow for comments on last line of the file with no trailing \n + $spacetab* "--" $comment* ; -- TODO: check the lack of @nl works here + -- including counting line numbers +} + + { + $spacetab* --TODO prevent or record leading tabs + { \pos len inp -> if B.length inp == len + then return (L pos EOF) + else setStartCode in_section + >> return (L pos (Indent len)) } + $spacetab* \{ { tok OpenBrace } + $spacetab* \} { tok CloseBrace } +} + + { + $spacetab+ ; --TODO: don't allow tab as leading space + + "--" $comment* ; + + @name { toki TokSym } + @string { \p l i -> case reads (B.Char8.unpack (B.take l i)) of + [(str,[])] -> return (L p (TokStr str)) + _ -> lexicalError p i } + @numlike { toki TokNum } + @oplike { toki TokOther } + $paren { toki TokOther } + \: { tok Colon } + \{ { tok OpenBrace } + \} { tok CloseBrace } + @nl { \_ _ _ -> adjustPos retPos >> setStartCode bol_section >> lexToken } +} + + { + $spacetab* --TODO prevent or record leading tabs + { \pos len inp -> if B.length inp == len + then return (L pos EOF) + else setStartCode in_field_layout + >> return (L pos (Indent len)) } +} + + { + $spacetab+; --TODO prevent or record leading tabs + $field_layout' $field_layout* { toki TokFieldLine } + @nl { \_ _ _ -> adjustPos retPos >> setStartCode bol_field_layout >> lexToken } +} + + { + () { \_ _ _ -> setStartCode in_field_braces >> lexToken } +} + + { + $spacetab+; --TODO prevent or record leading tabs + $field_braces' $field_braces* { toki TokFieldLine } + \{ { tok OpenBrace } + \} { tok CloseBrace } + @nl { \_ _ _ -> adjustPos retPos >> setStartCode bol_field_braces >> lexToken } +} + +{ + +data Token = TokSym !ByteString + | TokStr !String + | TokNum !ByteString + | TokOther !ByteString + | Indent !Int + | TokFieldLine !ByteString + | Colon + | OpenBrace + | CloseBrace + | EOF + | LexicalError InputStream --TODO: add separate string lexical error + deriving Show + +data LToken = L !Position !Token + deriving Show + +toki t pos len input = return $! L pos (t (B.take len input)) +tokl t pos len _input = return $! L pos (t len) +tok t pos _len _input = return $! L pos t + +-- ----------------------------------------------------------------------------- +-- The input type + +type AlexInput = InputStream + +alexInputPrevChar :: AlexInput -> Char +alexInputPrevChar _ = error "alexInputPrevChar not used" + +alexGetByte :: AlexInput -> Maybe (Word8,AlexInput) +alexGetByte = B.uncons + +lexicalError :: Position -> InputStream -> Lex LToken +lexicalError pos inp = do + setInput B.empty + return $! L pos (LexicalError inp) + +lexToken :: Lex LToken +lexToken = do + pos <- getPos + inp <- getInput + st <- getStartCode + case alexScan inp st of + AlexEOF -> return (L pos EOF) + AlexError inp' -> + let !len_bytes = B.length inp - B.length inp' in + --FIXME: we want len_chars here really + -- need to decode utf8 up to this point + lexicalError (incPos len_bytes pos) inp' + AlexSkip inp' len_chars -> do + checkPosition pos inp inp' len_chars + adjustPos (incPos len_chars) + setInput inp' + lexToken + AlexToken inp' len_chars action -> do + checkPosition pos inp inp' len_chars + adjustPos (incPos len_chars) + setInput inp' + let !len_bytes = B.length inp - B.length inp' + t <- action pos len_bytes inp + --traceShow t $ return t + return t + +checkPosition pos@(Position lineno colno) inp inp' len_chars = do + text_lines <- getDbgText + let len_bytes = B.length inp - B.length inp' + pos_txt | lineno-1 < V.length text_lines = T.take len_chars (T.drop (colno-1) (text_lines V.! (lineno-1))) + | otherwise = T.empty + real_txt = B.take len_bytes inp + when (pos_txt /= T.decodeUtf8 real_txt) $ + traceShow (pos, pos_txt, T.decodeUtf8 real_txt) $ + traceShow (take 3 (V.toList text_lines)) $ return () + where + getDbgText = Lex $ \s@LexState{ dbgText = txt } -> LexResult s txt + +lexAll :: Lex [LToken] +lexAll = do + t <- lexToken + case t of + L _ EOF -> return [t] + _ -> do ts <- lexAll + return (t : ts) + +ltest :: Int -> String -> IO () +ltest code s = + let xs = execLexer (setStartCode code >> lexAll) (B.Char8.pack s) + in mapM_ print xs + + +mkLexState :: B.ByteString -> LexState +mkLexState input = LexState { + curPos = Position 1 1, + curInput = input, + curCode = bol_section, + warnings = [], + dbgText = V.fromList . lines' . T.decodeUtf8With T.lenientDecode $ input + } + +lines' s1 + | T.null s1 = [] + | otherwise = case T.break (\c -> c == '\r' || c == '\n') s1 of + (l, s2) | Just (c,s3) <- T.uncons s2 + -> case T.uncons s3 of + Just ('\n', s4) | c == '\r' -> l `T.snoc` '\r' `T.snoc` '\n' : lines' s4 + _ -> l `T.snoc` c : lines' s3 + + | otherwise + -> [l] diff --git a/Cabal/Distribution/Parsec/Lexer.x b/Cabal/Distribution/Parsec/Lexer.x new file mode 100644 index 00000000000..f1f711b10ef --- /dev/null +++ b/Cabal/Distribution/Parsec/Lexer.x @@ -0,0 +1,255 @@ +{ +----------------------------------------------------------------------------- +-- | +-- Module : Distribution.Parsec.Lexer +-- License : BSD3 +-- +-- Maintainer : cabal-devel@haskell.org +-- Portability : portable +-- +-- Lexer for the cabal files. +{-# LANGUAGE CPP #-} +{-# LANGUAGE BangPatterns #-} +module Distribution.Parsec.Lexer + (ltest, lexToken, Token(..), LToken(..) + ,bol_section, in_section, in_field_layout, in_field_braces + ,mkLexState) where + +import Distribution.Parsec.LexerMonad +import Data.ByteString (ByteString) +import qualified Data.ByteString as B +import qualified Data.ByteString.Char8 as B.Char8 +import Data.Word (Word8) + +#ifdef CABAL_PARSEC_DEBUG +import Debug.Trace +import Control.Exception (assert) +import qualified Data.Vector as V +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Encoding.Error as T +#endif + +} +-- Various character classes + +$space = \ -- single space char +$digit = 0-9 -- digits +$alpha = [a-z A-Z] -- alphabetic characters +$symbol = [\= \< \> \+ \* \- \& \| \! \$ \% \^ \@ \# \? \/ \\ \~] +$ctlchar = [\x0-\x1f \x7f] +$printable = \x0-\x10ffff # $ctlchar -- so no \n \r +$spacetab = [$space \t] +$bom = \xfeff +$nbsp = \xa0 +$nbspspacetab = [$nbsp $space \t] + +$paren = [ \( \) \[ \] ] +$field_layout = [$printable \t] +$field_layout' = [$printable] # [$space] +$field_braces = [$printable \t] # [\{ \}] +$field_braces' = [$printable] # [\{ \} $space] +$comment = [$printable \t] +$namecore = [$alpha] +$nameextra = [$namecore $digit \- \_ \. \'] +$instr = [$printable $space] # [\"] +$instresc = $printable + +@nl = \n | \r\n | \r +@name = $nameextra* $namecore $nameextra* +@string = \" ( $instr | \\ $instresc )* \" +@numlike = $digit [$digit \.]* +@oplike = [ \, \. \= \< \> \+ \* \- \& \| \! \$ \% \^ \@ \# \? \/ \\ \~ ]+ + +tokens :- + +<0> { + $bom ; + () ; +} + + { + $spacetab* @nl { \_ _ _ -> adjustPos retPos >> lexToken } + $nbspspacetab+ @nl { \_ _ _ -> adjustPos retPos >> addWarning "Non-breaking space occured" >> lexToken } + -- no @nl here to allow for comments on last line of the file with no trailing \n + $spacetab* "--" $comment* ; -- TODO: check the lack of @nl works here + -- including counting line numbers +} + + { + $spacetab* --TODO prevent or record leading tabs + { \pos len inp -> if B.length inp == len + then return (L pos EOF) + else setStartCode in_section + >> return (L pos (Indent len)) } + $spacetab* \{ { tok OpenBrace } + $spacetab* \} { tok CloseBrace } +} + + { + $spacetab+ ; --TODO: don't allow tab as leading space + + "--" $comment* ; + + @name { toki TokSym } + @string { \p l i -> case reads (B.Char8.unpack (B.take l i)) of + [(str,[])] -> return (L p (TokStr str)) + _ -> lexicalError p i } + @numlike { toki TokNum } + @oplike { toki TokOther } + $paren { toki TokOther } + \: { tok Colon } + \{ { tok OpenBrace } + \} { tok CloseBrace } + @nl { \_ _ _ -> adjustPos retPos >> setStartCode bol_section >> lexToken } +} + + { + $spacetab* --TODO prevent or record leading tabs + { \pos len inp -> if B.length inp == len + then return (L pos EOF) + else setStartCode in_field_layout + >> return (L pos (Indent len)) } +} + + { + $spacetab+; --TODO prevent or record leading tabs + $field_layout' $field_layout* { toki TokFieldLine } + @nl { \_ _ _ -> adjustPos retPos >> setStartCode bol_field_layout >> lexToken } +} + + { + () { \_ _ _ -> setStartCode in_field_braces >> lexToken } +} + + { + $spacetab+; --TODO prevent or record leading tabs + $field_braces' $field_braces* { toki TokFieldLine } + \{ { tok OpenBrace } + \} { tok CloseBrace } + @nl { \_ _ _ -> adjustPos retPos >> setStartCode bol_field_braces >> lexToken } +} + +{ + +data Token = TokSym !ByteString + | TokStr !String + | TokNum !ByteString + | TokOther !ByteString + | Indent !Int + | TokFieldLine !ByteString + | Colon + | OpenBrace + | CloseBrace + | EOF + | LexicalError InputStream --TODO: add separate string lexical error + deriving Show + +data LToken = L !Position !Token + deriving Show + +toki :: Monad m => (ByteString -> Token) -> Position -> Int -> ByteString -> m LToken +toki t pos len input = return $! L pos (t (B.take len input)) + +tok :: Monad m => Token -> Position -> t -> t1 -> m LToken +tok t pos _len _input = return $! L pos t + +-- ----------------------------------------------------------------------------- +-- The input type + +type AlexInput = InputStream + +alexInputPrevChar :: AlexInput -> Char +alexInputPrevChar _ = error "alexInputPrevChar not used" + +alexGetByte :: AlexInput -> Maybe (Word8,AlexInput) +alexGetByte = B.uncons + +lexicalError :: Position -> InputStream -> Lex LToken +lexicalError pos inp = do + setInput B.empty + return $! L pos (LexicalError inp) + +lexToken :: Lex LToken +lexToken = do + pos <- getPos + inp <- getInput + st <- getStartCode + case alexScan inp st of + AlexEOF -> return (L pos EOF) + AlexError inp' -> + let !len_bytes = B.length inp - B.length inp' in + --FIXME: we want len_chars here really + -- need to decode utf8 up to this point + lexicalError (incPos len_bytes pos) inp' + AlexSkip inp' len_chars -> do + checkPosition pos inp inp' len_chars + adjustPos (incPos len_chars) + setInput inp' + lexToken + AlexToken inp' len_chars action -> do + checkPosition pos inp inp' len_chars + adjustPos (incPos len_chars) + setInput inp' + let !len_bytes = B.length inp - B.length inp' + t <- action pos len_bytes inp + --traceShow t $ return tok + return t + + +checkPosition :: Position -> ByteString -> ByteString -> Int -> Lex () +#ifdef CABAL_PARSEC_DEBUG +checkPosition pos@(Position lineno colno) inp inp' len_chars = do + text_lines <- getDbgText + let len_bytes = B.length inp - B.length inp' + pos_txt | lineno-1 < V.length text_lines = T.take len_chars (T.drop (colno-1) (text_lines V.! (lineno-1))) + | otherwise = T.empty + real_txt = B.take len_bytes inp + when (pos_txt /= T.decodeUtf8 real_txt) $ + traceShow (pos, pos_txt, T.decodeUtf8 real_txt) $ + traceShow (take 3 (V.toList text_lines)) $ return () + where + getDbgText = Lex $ \s@LexState{ dbgText = txt } -> LexResult s txt +#else +checkPosition _ _ _ _ = return () +#endif + +lexAll :: Lex [LToken] +lexAll = do + t <- lexToken + case t of + L _ EOF -> return [t] + _ -> do ts <- lexAll + return (t : ts) + +ltest :: Int -> String -> IO () +ltest code s = + let xs = execLexer (setStartCode code >> lexAll) (B.Char8.pack s) + in mapM_ print xs + + +mkLexState :: ByteString -> LexState +mkLexState input = LexState + { curPos = Position 1 1 + , curInput = input + , curCode = bol_section + , warnings = [] +#ifdef CABAL_PARSEC_DEBUG + , dbgText = V.fromList . lines' . T.decodeUtf8With T.lenientDecode $ input +#endif + } + +#ifdef CABAL_PARSEC_DEBUG +lines' :: T.Text -> [T.Text] +lines' s1 + | T.null s1 = [] + | otherwise = case T.break (\c -> c == '\r' || c == '\n') s1 of + (l, s2) | Just (c,s3) <- T.uncons s2 + -> case T.uncons s3 of + Just ('\n', s4) | c == '\r' -> l `T.snoc` '\r' `T.snoc` '\n' : lines' s4 + _ -> l `T.snoc` c : lines' s3 + + | otherwise + -> [l] +#endif +} \ No newline at end of file diff --git a/Cabal/Distribution/Parsec/LexerMonad.hs b/Cabal/Distribution/Parsec/LexerMonad.hs new file mode 100644 index 00000000000..8c85abf16f8 --- /dev/null +++ b/Cabal/Distribution/Parsec/LexerMonad.hs @@ -0,0 +1,143 @@ +----------------------------------------------------------------------------- +-- | +-- Module : Distribution.Parsec.LexerMonad +-- License : BSD3 +-- +-- Maintainer : cabal-devel@haskell.org +-- Portability : portable +module Distribution.Parsec.LexerMonad ( + InputStream, + LexState(..), + LexResult(..), + Position(..), + incPos, + retPos, + + Lex(..), + execLexer, + + getPos, + setPos, + adjustPos, + + getInput, + setInput, + + getStartCode, + setStartCode, + + LexWarning(..), + addWarning, + + ) where + +#if !MIN_VERSION_base(4,8,0) +import Control.Applicative (Applicative(..)) +import Data.Monoid ((<>)) +#endif + +import Control.Monad (ap, liftM) + +import qualified Data.ByteString as B + + +#ifdef CABAL_PARSEC_DEBUG +-- testing only: +import qualified Data.Vector as V +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +#endif + +-- simple state monad +newtype Lex a = Lex { unLex :: LexState -> LexResult a } + +instance Functor Lex where + fmap = liftM + +instance Applicative Lex where + pure = returnLex + (<*>) = ap + +instance Monad Lex where + return = pure + (>>=) = thenLex + +data LexResult a = LexResult {-# UNPACK #-} !LexState a + +data LexWarning = LexWarning {-# UNPACK #-} !Position + !String + deriving (Show) + +data LexState = LexState { + curPos :: {-# UNPACK #-} !Position, -- position at current input location + curInput :: {-# UNPACK #-} !InputStream, -- the current input + curCode :: {-# UNPACK #-} !StartCode, -- lexer code + warnings :: [LexWarning] +#ifdef CABAL_PARSEC_DEBUG + , dbgText :: V.Vector T.Text +#endif + } --TODO: check if we should cache the first token + -- since it looks like parsec's uncons can be called many times on the same input + +type StartCode = Int -- ^ An @alex@ lexer start code +type InputStream = B.ByteString + +data Position = Position {-# UNPACK #-} !Int -- row + {-# UNPACK #-} !Int -- column + deriving (Eq, Show) + +incPos :: Int -> Position -> Position +incPos n (Position row col) = Position row (col + n) + +retPos :: Position -> Position +retPos (Position row _col) = Position (row + 1) 1 + + +-- | Execute the given lexer on the supplied input stream. +execLexer :: Lex a -> InputStream -> ([LexWarning], a) +execLexer (Lex lexer) input = + case lexer initialState of + LexResult LexState{ warnings = ws } result -> (ws, result) + where + initialState = LexState + { curPos = Position 1 1 + , curInput = input + , curCode = 0 + , warnings = [] +#ifdef CABAL_PARSEC_DEBUG + , dbgText = V.fromList . T.lines . T.decodeUtf8 $ input +#endif + } + +{-# INLINE returnLex #-} +returnLex :: a -> Lex a +returnLex a = Lex $ \s -> LexResult s a + +{-# INLINE thenLex #-} +thenLex :: Lex a -> (a -> Lex b) -> Lex b +(Lex m) `thenLex` k = Lex $ \s -> case m s of LexResult s' a -> (unLex (k a)) s' + +setPos :: Position -> Lex () +setPos pos = Lex $ \s -> LexResult s{ curPos = pos } () + +getPos :: Lex Position +getPos = Lex $ \s@LexState{ curPos = pos } -> LexResult s pos + +adjustPos :: (Position -> Position) -> Lex () +adjustPos f = Lex $ \s@LexState{ curPos = pos } -> LexResult s{ curPos = f pos } () + +getInput :: Lex InputStream +getInput = Lex $ \s@LexState{ curInput = i } -> LexResult s i + +setInput :: InputStream -> Lex () +setInput i = Lex $ \s -> LexResult s{ curInput = i } () + +getStartCode :: Lex Int +getStartCode = Lex $ \s@LexState{ curCode = c } -> LexResult s c + +setStartCode :: Int -> Lex () +setStartCode c = Lex $ \s -> LexResult s{ curCode = c } () + +-- | Add warning at the current position +addWarning :: String -> Lex () +addWarning msg = Lex $ \s@LexState{ curPos = pos, warnings = ws } -> LexResult s{ warnings = LexWarning pos msg : ws } () diff --git a/Cabal/Distribution/Parsec/Parser.hs b/Cabal/Distribution/Parsec/Parser.hs new file mode 100644 index 00000000000..137dc9dfb00 --- /dev/null +++ b/Cabal/Distribution/Parsec/Parser.hs @@ -0,0 +1,396 @@ +{-# LANGUAGE BangPatterns #-} +{-# LANGUAGE DeriveFunctor #-} +{-# LANGUAGE MultiParamTypeClasses #-} +{-# LANGUAGE OverloadedStrings #-} +----------------------------------------------------------------------------- +-- | +-- Module : Distribution.Parsec.Parser +-- License : BSD3 +-- +-- Maintainer : cabal-devel@haskell.org +-- Portability : portable +module Distribution.Parsec.Parser ( + -- * Types + Field(..), + Name(..), + FieldLine(..), + SectionArg(..), + -- * Grammar and parsing + -- $grammar + readFields, + readFields' + ) where + +import Distribution.Parsec.Lexer +import Distribution.Parsec.LexerMonad (unLex, LexState(..), LexResult(..), Position(..), LexWarning) + +import Text.Parsec.Prim +import Text.Parsec.Combinator hiding (eof, notFollowedBy) +import Text.Parsec.Pos +import Text.Parsec.Error + +import Control.Monad (guard, liftM2) +import Data.Char as Char +import Data.Functor.Identity +import Data.ByteString (ByteString) +import qualified Data.ByteString.Char8 as B + +#ifdef CABAL_PARSEC_DEBUG +import qualified Data.Text as T +import qualified Data.Text.Encoding as T +import qualified Data.Text.Encoding.Error as T +#endif + +data LexState' = LexState' !LexState (LToken, LexState') + +mkLexState' :: LexState -> LexState' +mkLexState' st = LexState' st + (case unLex lexToken st of LexResult st' tok -> (tok, mkLexState' st')) + +type Parser a = ParsecT LexState' () Identity a + +instance Stream LexState' Identity LToken where + uncons (LexState' _ (tok, st')) = + case tok of + L _ EOF -> return Nothing + _ -> return (Just (tok, st')) + +-- | Get lexer warnings accumulated so far +getLexerWarnings :: Parser [LexWarning] +getLexerWarnings = do + LexState' (LexState { warnings = ws }) _ <- getInput + return ws + +setLexerMode :: Int -> Parser () +setLexerMode code = do + LexState' ls _ <- getInput + setInput $! mkLexState' ls { curCode = code } + +getToken :: (Token -> Maybe a) -> Parser a +getToken getTok = getTokenWithPos (\(L _ t) -> getTok t) + +getTokenWithPos :: (LToken -> Maybe a) -> Parser a +getTokenWithPos getTok = tokenPrim (\(L _ t) -> describeToken t) updatePos getTok + where + updatePos :: SourcePos -> LToken -> LexState' -> SourcePos + updatePos pos (L (Position col line) _) _ = newPos (sourceName pos) col line + +describeToken :: Token -> String +describeToken t = case t of + TokSym s -> "name " ++ show s + TokStr s -> "string " ++ show s + TokNum s -> "number " ++ show s + TokOther s -> "symbol " ++ show s + Indent _ -> "new line" + TokFieldLine _ -> "field content" + Colon -> "\":\"" + OpenBrace -> "\"{\"" + CloseBrace -> "\"}\"" +-- SemiColon -> "\";\"" + EOF -> "end of file" + LexicalError is -> "character in input " ++ show (B.head is) + +tokName :: Parser (Name Position) +tokName', tokStr, tokNum, tokOther :: Parser (SectionArg Position) +tokIndent :: Parser Int +tokColon, tokOpenBrace, tokCloseBrace :: Parser () +tokFieldLine :: Parser (FieldLine Position) + +tokName = getTokenWithPos $ \t -> case t of L pos (TokSym x) -> Just (mkName pos x); _ -> Nothing +tokName' = getTokenWithPos $ \t -> case t of L pos (TokSym x) -> Just (SecArgName pos x); _ -> Nothing +tokStr = getTokenWithPos $ \t -> case t of L pos (TokStr x) -> Just (SecArgStr pos x); _ -> Nothing +tokNum = getTokenWithPos $ \t -> case t of L pos (TokNum x) -> Just (SecArgNum pos x); _ -> Nothing +tokOther = getTokenWithPos $ \t -> case t of L pos (TokOther x) -> Just (SecArgOther pos x); _ -> Nothing +tokIndent = getToken $ \t -> case t of Indent x -> Just x; _ -> Nothing +tokColon = getToken $ \t -> case t of Colon -> Just (); _ -> Nothing +tokOpenBrace = getToken $ \t -> case t of OpenBrace -> Just (); _ -> Nothing +tokCloseBrace = getToken $ \t -> case t of CloseBrace -> Just (); _ -> Nothing +tokFieldLine = getTokenWithPos $ \t -> case t of L pos (TokFieldLine s) -> Just (FieldLine pos s); _ -> Nothing + +colon, openBrace, closeBrace :: Parser () + +sectionArg :: Parser (SectionArg Position) +sectionArg = tokName' <|> tokStr + <|> tokNum <|> tokOther "section parameter" + +fieldSecName :: Parser (Name Position) +fieldSecName = tokName "field or section name" + +colon = tokColon "\":\"" +openBrace = tokOpenBrace "\"{\"" +closeBrace = tokCloseBrace "\"}\"" + +fieldContent :: Parser (FieldLine Position) +fieldContent = tokFieldLine "field contents" + +newtype IndentLevel = IndentLevel Int + +zeroIndentLevel :: IndentLevel +zeroIndentLevel = IndentLevel 0 + +incIndentLevel :: IndentLevel -> IndentLevel +incIndentLevel (IndentLevel i) = IndentLevel (succ i) + +indentOfAtLeast :: IndentLevel -> Parser IndentLevel +indentOfAtLeast (IndentLevel i) = try $ do + j <- tokIndent + guard (j >= i) "indentation of at least " ++ show i + return (IndentLevel j) + + +newtype LexerMode = LexerMode Int + +inLexerMode :: LexerMode -> Parser p -> Parser p +inLexerMode (LexerMode mode) p = + do setLexerMode mode; x <- p; setLexerMode in_section; return x + +data Field ann = Field !(Name ann) [FieldLine ann] + | Section !(Name ann) [SectionArg ann] [Field ann] + | IfElseBlock [SectionArg ann] [Field ann] [Field ann] + deriving (Eq, Show, Functor) + +data Name ann = Name !ann !ByteString + deriving (Eq, Show, Functor) + +mkName :: ann -> ByteString -> Name ann +mkName ann bs = Name ann (B.map Char.toLower bs) + +getName :: Name a -> ByteString +getName (Name _ bs) = bs + +data FieldLine ann = FieldLine !ann !ByteString + deriving (Eq, Show, Functor) + +data SectionArg ann = SecArgName !ann !ByteString + | SecArgStr !ann !String + | SecArgNum !ann !ByteString + | SecArgOther !ann !ByteString + deriving (Eq, Show, Functor) + + +----------------------- +-- Cabal file grammar +-- + +-- $grammar +-- +-- @ +-- SecElems ::= SecElem* '\n'? +-- SecElem ::= '\n' SecElemLayout | SecElemBraces +-- SecElemLayout ::= FieldLayout | FieldBraces | SectionLayout | SectionBraces +-- SecElemBraces ::= FieldInline | FieldBraces | SectionBraces +-- FieldLayout ::= name ':' line? ('\n' line)* +-- FieldBraces ::= name ':' '\n'? '{' content '}' +-- FieldInline ::= name ':' content +-- SectionLayout ::= name arg* SecElems +-- SectionBraces ::= name arg* '\n'? '{' SecElems '}' +-- @ +-- +-- and the same thing but left factored... +-- +-- @ +-- SecElems ::= SecElem* +-- SecElem ::= '\n' name SecElemLayout +-- | name SecElemBraces +-- SecElemLayout ::= ':' FieldLayoutOrBraces +-- | arg* SectionLayoutOrBraces +-- FieldLayoutOrBraces ::= '\n'? '{' content '}' +-- | line? ('\n' line)* +-- SectionLayoutOrBraces ::= '\n'? '{' SecElems '\n'? '}' +-- | SecElems +-- SecElemBraces ::= ':' FieldInlineOrBraces +-- | arg* '\n'? '{' SecElems '\n'? '}' +-- FieldInlineOrBraces ::= '\n'? '{' content '}' +-- | content +-- @ +-- +-- Note how we have several productions with the sequence: +-- +-- > '\n'? '{' +-- +-- That is, an optional newline (and indent) followed by a @{@ token. +-- In the @SectionLayoutOrBraces@ case you can see that this makes it +-- not fully left factored (because @SecElems@ can start with a @\n@). +-- Fully left factoring here would be ugly, and though we could use a +-- lookahead of two tokens to resolve the alternatives, we can't +-- conveniently use Parsec's 'try' here to get a lookahead of only two. +-- So instead we deal with this case in the lexer by making a line +-- where the first non-space is @{@ lex as just the @{@ token, without +-- the usual indent token. Then in the parser we can resolve everything +-- with just one token of lookahead and so without using 'try'. + +-- Top level of a file using cabal syntax +-- +cabalStyleFile :: Parser [Field Position] +cabalStyleFile = do es <- elements zeroIndentLevel + eof + return es + +-- Elements that live at the top level or inside a section, ie fields +-- and sectionscontent +-- +-- elements ::= element* +elements :: IndentLevel -> Parser [Field Position] +elements ilevel = many (element ilevel) + +-- An individual element, ie a field or a section. These can either use +-- layout style or braces style. For layout style then it must start on +-- a line on it's own (so that we know its indentation level). +-- +-- element ::= '\n' name elementInLayoutContext +-- | name elementInNonLayoutContext +element :: IndentLevel -> Parser (Field Position) +element ilevel = + (do ilevel' <- indentOfAtLeast ilevel + name <- fieldSecName + elementInLayoutContext (incIndentLevel ilevel') name) + <|> (do name <- fieldSecName + elementInNonLayoutContext name) + +-- An element (field or section) that is valid in a layout context. +-- In a layout context we can have fields and sections that themselves +-- either use layout style or that use braces style. +-- +-- elementInLayoutContext ::= ':' fieldLayoutOrBraces +-- | arg* sectionLayoutOrBraces +elementInLayoutContext :: IndentLevel -> Name Position -> Parser (Field Position) +elementInLayoutContext ilevel name = + (do colon; fieldLayoutOrBraces ilevel name) + <|> (do args <- many sectionArg + elems <- sectionLayoutOrBraces ilevel + return (Section name args elems)) + +-- An element (field or section) that is valid in a non-layout context. +-- In a non-layout context we can have only have fields and sections that +-- themselves use braces style, or inline style fields. +-- +-- elementInNonLayoutContext ::= ':' FieldInlineOrBraces +-- | arg* '\n'? '{' elements '\n'? '}' +elementInNonLayoutContext :: Name Position -> Parser (Field Position) +elementInNonLayoutContext name = + (do colon; fieldInlineOrBraces name) + <|> (do args <- many sectionArg + openBrace + elems <- elements zeroIndentLevel + optional tokIndent + closeBrace + return (Section name args elems)) + +-- The body of a field, using either layout style or braces style. +-- +-- fieldLayoutOrBraces ::= '\n'? '{' content '}' +-- | line? ('\n' line)* +fieldLayoutOrBraces :: IndentLevel -> Name Position -> Parser (Field Position) +fieldLayoutOrBraces ilevel name = + (do openBrace + ls <- inLexerMode (LexerMode in_field_braces) (many fieldContent) + closeBrace + return (Field name ls)) + <|> (inLexerMode (LexerMode in_field_layout) + (do l <- option (FieldLine (Position 0 0) B.empty) fieldContent + --FIXME ^^ having to add an extra empty here is silly! + ls <- many (do _ <- indentOfAtLeast ilevel; fieldContent) + return (Field name (l:ls)))) + +-- The body of a section, using either layout style or braces style. +-- +-- sectionLayoutOrBraces ::= '\n'? '{' elements \n? '}' +-- | elements +sectionLayoutOrBraces :: IndentLevel -> Parser [Field Position] +sectionLayoutOrBraces ilevel = + (do openBrace + elems <- elements zeroIndentLevel + optional tokIndent + closeBrace + return elems) + <|> (elements ilevel) + +-- The body of a field, using either inline style or braces. +-- +-- fieldInlineOrBraces ::= '\n'? '{' content '}' +-- | content +fieldInlineOrBraces :: Name Position -> Parser (Field Position) +fieldInlineOrBraces name = + (do openBrace + ls <- inLexerMode (LexerMode in_field_braces) (many fieldContent) + closeBrace + return (Field name ls)) + <|> (do ls <- inLexerMode (LexerMode in_field_braces) (option [] (fmap (\l -> [l]) fieldContent)) + return (Field name ls)) + + +readFields :: B.ByteString -> Either ParseError [Field Position] +readFields s = fmap elaborate $ parse cabalStyleFile "the input" lexSt + where + lexSt = mkLexState' (mkLexState s) + +readFields' :: B.ByteString -> Either ParseError ([Field Position], [LexWarning]) +readFields' s = parse (liftM2 (,) cabalStyleFile getLexerWarnings) "the input" lexSt + where + lexSt = mkLexState' (mkLexState s) + +#ifdef CABAL_PARSEC_DEBUG +parseTest' p fname s = + case parse p fname (lexSt s) of + Left err -> putStrLn (formatError s err) + + Right x -> print x + where + lexSt s = mkLexState' (mkLexState s) + +parseFile :: Show a => Parser a -> FilePath -> IO () +parseFile p f = B.readFile f >>= \s -> parseTest' p f s + +parseStr :: Show a => Parser a -> String -> IO () +parseStr p s = parseTest' p "" (B.pack s) + + +formatError :: B.ByteString -> ParseError -> String +formatError input perr = + unlines + [ "Parse error "++ show (errorPos perr) ++ ":" + , errLine + , indicator ++ errmsg ] + where + pos = errorPos perr + ls = lines' (T.decodeUtf8With T.lenientDecode input) + errLine = T.unpack (ls !! (sourceLine pos - 1)) + indicator = replicate (sourceColumn pos) ' ' ++ "^" + errmsg = showErrorMessages "or" "unknown parse error" + "expecting" "unexpected" "end of file" + (errorMessages perr) + +lines' :: T.Text -> [T.Text] +lines' s1 + | T.null s1 = [] + | otherwise = case T.break (\c -> c == '\r' || c == '\n') s1 of + (l, s2) | Just (c,s3) <- T.uncons s2 + -> case T.uncons s3 of + Just ('\n', s4) | c == '\r' -> l : lines' s4 + _ -> l : lines' s3 + | otherwise -> [l] +#endif + +eof :: Parser () +eof = notFollowedBy anyToken "end of file" + where + notFollowedBy :: Parser LToken -> Parser () + notFollowedBy p = try ( (do L _ t <- try p; unexpected (describeToken t)) + <|> return ()) +--showErrorMessages "or" "unknown parse error" +-- "expecting" "unexpected" "end of input" + +-- | Elaborate a 'Section's with @if@ name into the 'IfElseBlock's. +elaborate :: Show a => [Field a] -> [Field a] +elaborate [] = [] +elaborate (field@Field{} : rest) = field : elaborate rest +elaborate (IfElseBlock args t e : rest) = + IfElseBlock args (elaborate t) (elaborate e) : elaborate rest +elaborate (Section name args fields : Section ename [] efields : rest) + | getName name == "if" && getName ename == "else" = + IfElseBlock args (elaborate fields) (elaborate efields) : elaborate rest +elaborate (Section name args fields : rest) + | getName name == "if" = + IfElseBlock args (elaborate fields) [] : elaborate rest + | otherwise = + Section name args (elaborate fields) : elaborate rest diff --git a/experiment/parse/IndexUtils.hs b/experiment/parse/IndexUtils.hs new file mode 100644 index 00000000000..1d833c7aa2d --- /dev/null +++ b/experiment/parse/IndexUtils.hs @@ -0,0 +1,59 @@ +----------------------------------------------------------------------------- +-- | +-- Module : Distribution.Client.IndexUtils +-- Copyright : (c) Duncan Coutts 2008 +-- License : BSD-like +-- +-- Maintainer : duncan@haskell.org +-- Stability : provisional +-- Portability : portable +-- +-- Extra utils related to the package indexes. +----------------------------------------------------------------------------- +module IndexUtils ( + readPackageIndexFile, + parseRepoIndex, + ) where + +import qualified Codec.Archive.Tar as Tar + +import qualified Data.ByteString.Lazy as BS +import Data.ByteString.Lazy (ByteString) +import System.FilePath (takeExtension) + +-- | Read a compressed \"00-index.tar.gz\" file into a 'PackageIndex'. +-- +-- This is supposed to be an \"all in one\" way to easily get at the info in +-- the hackage package index. +-- +-- It takes a function to map a 'GenericPackageDescription' into any more +-- specific instance of 'Package' that you might want to use. In the simple +-- case you can just use @\_ p -> p@ here. +-- +readPackageIndexFile :: FilePath -> IO [(FilePath, ByteString)] +readPackageIndexFile indexFile = + either fail return + . parseRepoIndex + =<< BS.readFile indexFile + +-- | Parse an uncompressed \"00-index.tar\" repository index file represented +-- as a 'ByteString'. +-- +parseRepoIndex :: ByteString + -> Either String [(FilePath, ByteString)] +parseRepoIndex = foldlTarball (\pkgs -> maybe pkgs (:pkgs) . extractPkg) [] + +extractPkg :: Tar.Entry -> Maybe (FilePath, ByteString) +extractPkg entry = + case Tar.entryContent entry of + Tar.NormalFile content _ | takeExtension (Tar.entryPath entry) == ".cabal" + -> Just (Tar.entryPath entry, content) + _ -> Nothing + +foldlTarball :: (a -> Tar.Entry -> a) -> a + -> ByteString -> Either String a +foldlTarball f z = either Left (Right . foldl f z) . check [] . Tar.read + where + check _ (Tar.Fail err) = Left $ show err + check ok Tar.Done = Right ok + check ok (Tar.Next e es) = check (e:ok) es diff --git a/experiment/parse/InstalledPackageInfo.hs b/experiment/parse/InstalledPackageInfo.hs new file mode 100644 index 00000000000..6ab73eefbe0 --- /dev/null +++ b/experiment/parse/InstalledPackageInfo.hs @@ -0,0 +1,296 @@ +----------------------------------------------------------------------------- +-- | +-- Module : Distribution.InstalledPackageInfo +-- Copyright : (c) The University of Glasgow 2004 +-- +-- Maintainer : libraries@haskell.org +-- Portability : portable +-- +-- This is the information about an /installed/ package that +-- is communicated to the @ghc-pkg@ program in order to register +-- a package. @ghc-pkg@ now consumes this package format (as of version +-- 6.4). This is specific to GHC at the moment. +-- +-- The @.cabal@ file format is for describing a package that is not yet +-- installed. It has a lot of flexibility, like conditionals and dependency +-- ranges. As such, that format is not at all suitable for describing a package +-- that has already been built and installed. By the time we get to that stage, +-- we have resolved all conditionals and resolved dependency version +-- constraints to exact versions of dependent packages. So, this module defines +-- the 'InstalledPackageInfo' data structure that contains all the info we keep +-- about an installed package. There is a parser and pretty printer. The +-- textual format is rather simpler than the @.cabal@ format: there are no +-- sections, for example. + +{- All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of the University nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -} + +-- This module is meant to be local-only to Distribution... + +module Distribution.InstalledPackageInfo ( + InstalledPackageInfo_(..), InstalledPackageInfo, + ParseResult(..), PError(..), PWarning, + emptyInstalledPackageInfo, + parseInstalledPackageInfo, + showInstalledPackageInfo, + showInstalledPackageInfoField, + fieldsInstalledPackageInfo, + ) where + +import Distribution.ParseUtils + ( FieldDescr(..), ParseResult(..), PError(..), PWarning + , simpleField, listField, parseLicenseQ + , showFields, showSingleNamedField, parseFieldsFlat + , parseFilePathQ, parseTokenQ, parseModuleNameQ, parsePackageNameQ + , showFilePath, showToken, boolField, parseOptVersion + , parseFreeText, showFreeText ) +import Distribution.License ( License(..) ) +import Distribution.Package + ( PackageName(..), PackageIdentifier(..), PackageId, InstalledPackageId(..) + , packageName, packageVersion ) +import qualified Distribution.Package as Package + ( Package(..) ) +import Distribution.ModuleName + ( ModuleName ) +import Distribution.Version + ( Version(..) ) +import Distribution.Text + ( Text(disp, parse) ) + +-- ----------------------------------------------------------------------------- +-- The InstalledPackageInfo type + +--TODO share PackageMetadata with PackageDescription + +data InstalledPackageInfo_ m + = InstalledPackageInfo { + -- these parts are exactly the same as PackageDescription + installedPackageId :: InstalledPackageId, + sourcePackageId :: PackageId, + license :: License, + copyright :: String, + maintainer :: String, + author :: String, + stability :: String, + homepage :: String, + pkgUrl :: String, + synopsis :: String, + description :: String, + category :: String, + -- these parts are required by an installed package only: + exposed :: Bool, + exposedModules :: [m], + hiddenModules :: [m], + trusted :: Bool, + importDirs :: [FilePath], -- contain sources in case of Hugs + libraryDirs :: [FilePath], + hsLibraries :: [String], + extraLibraries :: [String], + extraGHCiLibraries:: [String], -- overrides extraLibraries for GHCi + includeDirs :: [FilePath], + includes :: [String], + depends :: [InstalledPackageId], + hugsOptions :: [String], + ccOptions :: [String], + ldOptions :: [String], + frameworkDirs :: [FilePath], + frameworks :: [String], + haddockInterfaces :: [FilePath], + haddockHTMLs :: [FilePath] + } + deriving (Read, Show) + +instance Package.Package (InstalledPackageInfo_ str) where + packageId = sourcePackageId + +type InstalledPackageInfo = InstalledPackageInfo_ ModuleName + +emptyInstalledPackageInfo :: InstalledPackageInfo_ m +emptyInstalledPackageInfo + = InstalledPackageInfo { + installedPackageId = InstalledPackageId "", + sourcePackageId = PackageIdentifier (PackageName "") noVersion, + license = AllRightsReserved, + copyright = "", + maintainer = "", + author = "", + stability = "", + homepage = "", + pkgUrl = "", + synopsis = "", + description = "", + category = "", + exposed = False, + exposedModules = [], + hiddenModules = [], + trusted = False, + importDirs = [], + libraryDirs = [], + hsLibraries = [], + extraLibraries = [], + extraGHCiLibraries= [], + includeDirs = [], + includes = [], + depends = [], + hugsOptions = [], + ccOptions = [], + ldOptions = [], + frameworkDirs = [], + frameworks = [], + haddockInterfaces = [], + haddockHTMLs = [] + } + +noVersion :: Version +noVersion = Version{ versionBranch=[], versionTags=[] } + +-- ----------------------------------------------------------------------------- +-- Parsing + +parseInstalledPackageInfo :: String -> ParseResult InstalledPackageInfo +parseInstalledPackageInfo = + parseFieldsFlat fieldsInstalledPackageInfo emptyInstalledPackageInfo + +-- ----------------------------------------------------------------------------- +-- Pretty-printing + +showInstalledPackageInfo :: InstalledPackageInfo -> String +showInstalledPackageInfo = showFields fieldsInstalledPackageInfo + +showInstalledPackageInfoField :: String -> Maybe (InstalledPackageInfo -> String) +showInstalledPackageInfoField = showSingleNamedField fieldsInstalledPackageInfo + +-- ----------------------------------------------------------------------------- +-- Description of the fields, for parsing/printing + +fieldsInstalledPackageInfo :: [FieldDescr InstalledPackageInfo] +fieldsInstalledPackageInfo = basicFieldDescrs ++ installedFieldDescrs + +basicFieldDescrs :: [FieldDescr InstalledPackageInfo] +basicFieldDescrs = + [ simpleField "name" + disp parsePackageNameQ + packageName (\name pkg -> pkg{sourcePackageId=(sourcePackageId pkg){pkgName=name}}) + , simpleField "version" + disp parseOptVersion + packageVersion (\ver pkg -> pkg{sourcePackageId=(sourcePackageId pkg){pkgVersion=ver}}) + , simpleField "id" + disp parse + installedPackageId (\ipid pkg -> pkg{installedPackageId=ipid}) + , simpleField "license" + disp parseLicenseQ + license (\l pkg -> pkg{license=l}) + , simpleField "copyright" + showFreeText parseFreeText + copyright (\val pkg -> pkg{copyright=val}) + , simpleField "maintainer" + showFreeText parseFreeText + maintainer (\val pkg -> pkg{maintainer=val}) + , simpleField "stability" + showFreeText parseFreeText + stability (\val pkg -> pkg{stability=val}) + , simpleField "homepage" + showFreeText parseFreeText + homepage (\val pkg -> pkg{homepage=val}) + , simpleField "package-url" + showFreeText parseFreeText + pkgUrl (\val pkg -> pkg{pkgUrl=val}) + , simpleField "synopsis" + showFreeText parseFreeText + synopsis (\val pkg -> pkg{synopsis=val}) + , simpleField "description" + showFreeText parseFreeText + description (\val pkg -> pkg{description=val}) + , simpleField "category" + showFreeText parseFreeText + category (\val pkg -> pkg{category=val}) + , simpleField "author" + showFreeText parseFreeText + author (\val pkg -> pkg{author=val}) + ] + +installedFieldDescrs :: [FieldDescr InstalledPackageInfo] +installedFieldDescrs = [ + boolField "exposed" + exposed (\val pkg -> pkg{exposed=val}) + , listField "exposed-modules" + disp parseModuleNameQ + exposedModules (\xs pkg -> pkg{exposedModules=xs}) + , listField "hidden-modules" + disp parseModuleNameQ + hiddenModules (\xs pkg -> pkg{hiddenModules=xs}) + , boolField "trusted" + trusted (\val pkg -> pkg{trusted=val}) + , listField "import-dirs" + showFilePath parseFilePathQ + importDirs (\xs pkg -> pkg{importDirs=xs}) + , listField "library-dirs" + showFilePath parseFilePathQ + libraryDirs (\xs pkg -> pkg{libraryDirs=xs}) + , listField "hs-libraries" + showFilePath parseTokenQ + hsLibraries (\xs pkg -> pkg{hsLibraries=xs}) + , listField "extra-libraries" + showToken parseTokenQ + extraLibraries (\xs pkg -> pkg{extraLibraries=xs}) + , listField "extra-ghci-libraries" + showToken parseTokenQ + extraGHCiLibraries (\xs pkg -> pkg{extraGHCiLibraries=xs}) + , listField "include-dirs" + showFilePath parseFilePathQ + includeDirs (\xs pkg -> pkg{includeDirs=xs}) + , listField "includes" + showFilePath parseFilePathQ + includes (\xs pkg -> pkg{includes=xs}) + , listField "depends" + disp parse + depends (\xs pkg -> pkg{depends=xs}) + , listField "hugs-options" + showToken parseTokenQ + hugsOptions (\path pkg -> pkg{hugsOptions=path}) + , listField "cc-options" + showToken parseTokenQ + ccOptions (\path pkg -> pkg{ccOptions=path}) + , listField "ld-options" + showToken parseTokenQ + ldOptions (\path pkg -> pkg{ldOptions=path}) + , listField "framework-dirs" + showFilePath parseFilePathQ + frameworkDirs (\xs pkg -> pkg{frameworkDirs=xs}) + , listField "frameworks" + showToken parseTokenQ + frameworks (\xs pkg -> pkg{frameworks=xs}) + , listField "haddock-interfaces" + showFilePath parseFilePathQ + haddockInterfaces (\xs pkg -> pkg{haddockInterfaces=xs}) + , listField "haddock-html" + showFilePath parseFilePathQ + haddockHTMLs (\xs pkg -> pkg{haddockHTMLs=xs}) + ] diff --git a/experiment/parse/ParseFields.hs b/experiment/parse/ParseFields.hs new file mode 100644 index 00000000000..64c963c199f --- /dev/null +++ b/experiment/parse/ParseFields.hs @@ -0,0 +1,140 @@ +{-# LANGUAGE BangPatterns, GADTSyntax, ExistentialQuantification #-} +module ParseFields where + +import Parser hiding (Parser) +import qualified Text.Parsec +import Control.Monad.Identity + +import qualified Data.Text as T +import Data.Text (Text) +import qualified Data.ByteString as BS +import Data.ByteString (ByteString) +import qualified Data.Map as M +import Data.Map (Map) + +-- | Define a set of field descriptions (a 'FieldsDescr'). This can then be used +-- with 'readFields' or 'parseCabalStyleFile'. +-- +fieldsDescr :: a -> [FieldDescr a] -> FieldsDescr a +fieldsDescr empty = + foldl' accum (FieldsDescr empty Nothing Map.empty Nothing Map.empty) + where + accum (FieldsDescr e fs fo ss so) (FieldDescr fname set parser) = + FieldsDescr e (Map.insert fname (set, parser) fs) fo ss so + + accum (FieldsDescr e fs fo ss so) (FieldDescrOther set parser) = + FieldsDescr e fs (Just (set, parser)) ss so + + +-- | Describe an individual named field. +-- +fieldDescr :: String -> (a -> b -> a) -> FParser s b -> FieldDescr a +fieldDescr = FieldDescr + +-- | Describe what to do with fields other than those named with 'fieldDescr'. +-- +fieldDescrOther :: (a -> b -> a) -> (String -> FParser s b) -> FieldDescr a +fieldDescrOther = FieldDescrOther + +sectionDescr :: String -> (a -> b -> c) -> FParser s a -> FieldsDescr b -> FieldDescr c +sectionDescr = SectionDescr + +sectionDescrOther :: (a -> b -> c) -> (String -> FParser s a) -> FieldsDescr b -> FieldDescr c +sectionDescrOther = SectionDescrOther + +data FieldsDescr a where + FieldsDescr :: a -> (a -> b -> a) -> Map FieldName (FieldDescr b) -> FieldsDescr a + +data FieldDescr a where + FieldDescr :: String -> (a -> b -> a) -> FParser [FieldLine] a -> FieldDescr a + FieldDescrOther :: (a -> b -> a) -> (String -> FParser s b) -> FieldDescr a + SectionDescr :: String -> (a -> b -> c) -> FParser s a -> FieldsDescr b -> FieldDescr c + SectionDescrOther :: (a -> b -> c) -> (String -> FParser s a) -> FieldsDescr b -> FieldDescr c + + +data Ex = Ex { exField1 :: Int, exField2 :: String } + +example :: FieldsDescr Ex +example = + fieldsDescr (Ex 0 "") + [ fieldDescr "field1" (\e x -> e { exField1 = x }) + (\_ -> ParseOk [] 42) + , fieldDescr "field2" (\e x -> e { exField2 = x }) + (\_ -> ParseOk [] "foo!") + , fieldDescrOther const + (\f _ -> ParseOk ["Unexpected field " ++ f] ()) + ] + +type ParseError = () +type ParseWarning = () +data ParseResult a = ParseFailed [ParseError] | ParseOk [ParseWarning] a + +--type Parsec a = Text.Parsec.Stream s m Char => Text.Parsec.ParsecT s u Identity a +--type Parsec s a = Text.Parsec.ParsecT s () Identity a +type FParser s a = s -> ParseResult a + +-- | Parse a file in Cabal-style syntax. +-- +-- You supply a description of the fields and sections that are allowed. +-- +parseCabalStyleFile :: FieldsDescr a -> ByteString -> ParseResult a +parseCabalStyleFile descrs input = + outlineParseCabalStyleFile input >>= parseFields descr + +-- | Do an \"outline\" parse of a file in Cabal-style syntax. +-- +-- It just parses the structure, but not the contents of the individual fields. +-- This can be useful if you need to treat the file in a generic way and do not +-- know what is in every field, for example if you want to edit just a few +-- specific fields and write the file out again. +-- +outlineParseCabalStyleFile :: ByteString -> ParseResult [Field] +outlineParseCabalStyleFile = undefined + +type FieldName = ByteString + +data FieldsDescr a where + FieldsDescr :: a -> (a -> b -> a) -> Map FieldName (FieldDescr b) -> FieldsDescr a + +data FieldDescr a where + FieldDescr :: FParser [FieldLine] a -> FieldDescr a + SubsectionDescr :: (c -> b -> a) -> FParser [SectionArg] c -> FieldsDescr b -> FieldDescr a + + +parseFields :: FieldsDescr a -> [Field] -> ParseResult a +parseFields (FieldsDescr empty add fielddescrmap) = undefined {- go [] empty + where + go [] !acc [] = Right acc + go errs !acc [] = Left (reverse errs) + + go errs !acc (Field (Name pos name) content : fields) = + case M.lookup name fielddescrmap of + Just (FieldDescr parseField) + | Right x <- parseField content + -> go errs (acc `add` x) fields + + | otherwise + -> go (err:errs) acc fields + where + err = () -- parse error in field name at pos: content + _ -> go (err:errs) acc fields + where + err = () -- unexpected field name at pos + + go errs !acc (Section (Name _ name) args fields' : fields) = + case M.lookup name fielddescrmap of + Just (SubsectionDescr subsec parseArgs fielddescrs) + | Right a <- parseArgs args + -> case parseFields fielddescrs fields' of + Right x -> go errs (acc `add` subsec a x) fields + Left errs' -> go (errs'++errs) acc fields + + | otherwise + -> go (err:errs) acc fields + where + err = () -- parse error in field name at pos: content + + _ -> go (err:errs) acc fields + where + err = () -- unexpected section name at pos +-} diff --git a/experiment/parse/Perf.hs b/experiment/parse/Perf.hs new file mode 100644 index 00000000000..ada8b14b000 --- /dev/null +++ b/experiment/parse/Perf.hs @@ -0,0 +1,171 @@ +module Main where + +import IndexUtils + +import qualified Distribution.ParseUtils as ParseUtils (readFields, ParseResult(..)) +import Distribution.Simple.Utils (fromUTF8) + +import qualified Distribution.Parsec.Lexer as Lexer +import qualified Distribution.Parsec.LexerMonad as Lexer +import qualified Distribution.Parsec.Parser as Parser + +import qualified PostParser + +import Text.Parsec.Error (ParseError) + +import System.Environment +import Control.Exception (evaluate) +import qualified Data.ByteString.Lazy.Char8 as LBS +import qualified Data.ByteString.Char8 as BS +import qualified Data.List as L + +checkedFiles :: [FilePath] +checkedFiles = + [ +{- +Executable NameServer + Main-Is: NameServer.hs + Other modules: DSTM, NameService +-} + "DSTM/0.1/DSTM.cabal" + , "DSTM/0.1.1/DSTM.cabal" + , "DSTM/0.1.2/DSTM.cabal" + +{- + default- extensions: + ScopedTypeVariables, +-} + + , "control-monad-exception-mtl/0.10.3/control-monad-exception-mtl.cabal" + +{- + default-language: Haskell2010 +Test-Suite test-unify: + hs-source-dirs: test +-} + + , "ds-kanren/0.2.0.0/ds-kanren.cabal" + , "ds-kanren/0.2.0.1/ds-kanren.cabal" + +-- Using {- as a comment + , "ixset/1.0.4/ixset.cabal" + +-- test-suite metric-tests: + , "metric/0.1.4/metric.cabal" + , "metric/0.2.0/metric.cabal" + +-- impl(ghc >= 7.4): + , "phasechange/0.1/phasechange.cabal" + , "shelltestrunner/1.3/shelltestrunner.cabal" + , "smartword/0.0.0.5/smartword.cabal" + +-- unexpected character in input '\DEL' + , "vacuum-opengl/0.0/vacuum-opengl.cabal" + , "vacuum-opengl/0.0.1/vacuum-opengl.cabal" + ] + +-- NBSP files +{- + , "Octree/0.5/Octree.cabal" + , "hermit/0.1.8.0/hermit.cabal" + , "oeis/0.3.0/oeis.cabal" + , "oeis/0.3.1/oeis.cabal" + , "oeis/0.3.2/oeis.cabal" + , "oeis/0.3.3/oeis.cabal" + , "oeis/0.3.4/oeis.cabal" + , "oeis/0.3.5/oeis.cabal" + , "oeis/0.3.6/oeis.cabal" +-} + +-- Parser results +checkedFiles2 :: [FilePath] +checkedFiles2 = + -- Curly braces + -- There are a lot in descriptions, but HaTex have them in author field + [ "HaTeX/3." + , "HaTeX-meta/1." + + -- other-modules without colon + , "graphs/0.1/graphs.cabal" + , "graphs/0.2/graphs.cabal" + + -- hs-source-dirs: + -- . + , "hspec-expectations-pretty/0.1/" + + -- multiline copyright + , "tn/1.0.0/tn.cabal" + ] + +main :: IO () +main = do + [which, n, indexfile] <- getArgs + cabalFiles <- IndexUtils.readPackageIndexFile indexfile + + case which of + "perf-baseline" -> print (length cabalFiles) + + "perf-old" -> let parse = ParseUtils.readFields . fromUTF8 . LBS.unpack . snd + parsed = [ pkg | ParseUtils.ParseOk _ pkg <- map parse cabalFiles ] + in print (length parsed) + + "perf-new" -> let parse = Parser.readFields . toStrict . snd + parsed = [ pkg | Right pkg <- map parse cabalFiles ] + in print (length parsed) + + "check-old" -> let parse = ParseUtils.readFields . fromUTF8 . LBS.unpack . snd + parsed = [ (msg, f) + | (ParseUtils.ParseFailed msg, f) <- + map (\f -> (parse f, f)) cabalFiles ] + in case parsed of + [] -> print "all ok!" + ((msg, (name, f)):_) -> do print msg + LBS.putStr f + + "check-new" -> let parse = Parser.readFields . toStrict . snd + parsed = [ (msg, f) + | (Left msg, f) <- + map (\f -> (parse f, f)) cabalFiles ] + in case drop (read n) $ filter (\(_, (name, _)) -> name `notElem` checkedFiles) parsed of + [] -> print "all ok!" + ((msg, (name, f)):_) -> do putStrLn name + print msg + LBS.putStr f + + "compare" -> let parseOld :: LBS.ByteString -> ParseUtils.ParseResult [Parser.Field ()] + parseOld = (fmap . fmap . fmap) (const ()) . fmap (PostParser.postProcessFields2 . PostParser.postProcessFields) . ParseUtils.readFields . fromUTF8 . LBS.unpack + parseNew :: LBS.ByteString -> Either ParseError [Parser.Field ()] + parseNew = (fmap . fmap . fmap) (const ()) . fmap PostParser.postProcessFields2 . Parser.readFields . toStrict + parsed = [ (f, parseOld c, parseNew c) | (f, c) <- cabalFiles ] + parsed' = [ (f, o, n) | (f, ParseUtils.ParseOk _ o, Right n) <- parsed, o /= n, all (\prefix -> not $ prefix `L.isPrefixOf` f) checkedFiles2 ] + printDiff (f, o, n) = do putStrLn f + putStrLn (show (length o) ++ " " ++ show (length n)) + mapM_ id [ putStr "- " >> print o' >> putStr "+ " >> print n' | (o', n') <- zip o n, o' /= n' ] + in mapM_ printDiff $ take 1 parsed' + + "lexer-warnings" -> let parse = Parser.readFields' . toStrict + parsed :: [(FilePath, [Lexer.LexWarning])] + parsed = [ (name, ws) + | (name, bs) <- cabalFiles + , let p = parse bs + , isRight p + , let Right (_, ws) = p + ] + output (f, ws) | null ws = return () + | otherwise = putStrLn f >> mapM_ print ws >> putStrLn "----" + in mapM_ output parsed + + + "extract-fail" -> let parse = Parser.readFields . toStrict . snd + parsed = [ f + | (Left msg, f) <- + map (\f -> (parse f, f)) cabalFiles ] + in sequence_ + [ LBS.writeFile ("fail/" ++ show n ++ ".cabal") (snd f) + | (f,n) <- zip parsed [0..] ] + + where + toStrict = BS.concat . LBS.toChunks + +isRight (Right _) = True +isRight _ = False diff --git a/experiment/parse/PostParser.hs b/experiment/parse/PostParser.hs new file mode 100644 index 00000000000..b713112a7cb --- /dev/null +++ b/experiment/parse/PostParser.hs @@ -0,0 +1,73 @@ +{-# LANGUAGE OverloadedStrings #-} +-- | This module is only to verify that Old and New parsers agree +module PostParser where + +import qualified Distribution.ParseUtils as O (Field(..)) +import qualified Distribution.Parsec.Parser as N (Field(..), Name(..), FieldLine(..), SectionArg(..)) + +import Data.ByteString (ByteString) +import qualified Data.ByteString as B +import qualified Data.ByteString.Char8 as B8 +import qualified Data.Char as C +import qualified Data.Text as T +import qualified Data.Foldable as F +import qualified Data.Text.Encoding as T + +toUtf8 :: String -> ByteString +toUtf8 = T.encodeUtf8 . T.pack + +postProcessFields :: [O.Field] -> [N.Field ()] +postProcessFields [] = [] +postProcessFields (O.F line name "" : xs) = + let field = N.Field (toName name) [ N.FieldLine () $ toUtf8 "" ] + rest = postProcessFields xs + in field : rest +postProcessFields (O.F line name content : xs) = + let field = N.Field (toName name) [ N.FieldLine () $ toUtf8 c | c <- lines content ] + rest = postProcessFields xs + in field : rest +postProcessFields (O.Section line name arg fields : xs) = + let field = N.Section (toName name) [N.SecArgName () $ toUtf8 arg | not $ null arg] (postProcessFields fields) + rest = postProcessFields xs + in field : rest +postProcessFields (O.IfBlock line arg fields fields' : xs) = + let field = N.IfElseBlock [N.SecArgName () $ toUtf8 arg] (postProcessFields fields) (postProcessFields fields') + rest = postProcessFields xs + in field : rest + +postProcessFields2 :: [N.Field a] -> [N.Field a] +postProcessFields2 = map f + where f (N.Field name lines) + | getName name == "description" = N.Field name $ concatLines $ filter p' $ map g $ lines + | otherwise = N.Field name $ filter p $ map g $ lines + f (N.Section name args fields) = N.Section name (flattenArgs args) $ postProcessFields2 fields + f (N.IfElseBlock args t e) = N.IfElseBlock (flattenArgs args) (postProcessFields2 t) (postProcessFields2 e) + p (N.FieldLine _ content) = not $ B.null content + p' (N.FieldLine _ content) = not (B.null content) && content /= "." + -- Description normalising is quite a trick + g (N.FieldLine ann content)= N.FieldLine ann (trimB8 content) + concatLines [] = [] + concatLines lines@(N.FieldLine ann _ : _) = [N.FieldLine ann $ B.concat (map lineContent lines) ] + lineContent (N.FieldLine ann content) = trimB8 $ B8.filter notCurly content + notCurly '{' = False + notCurly '}' = False + notCurly ' ' = False + notCurly _ = True + trimB8 = B.reverse . B8.dropWhile C.isSpace . B.reverse . B8.dropWhile C.isSpace + +flattenArgs [] = [] +flattenArgs xs@(first : _) = [ N.SecArgName (g first) $ B8.filter (not . C.isSpace) $ F.foldMap f xs] + where f (N.SecArgName _ x) = x + f (N.SecArgStr _ x) = B8.pack ("\"" ++ x ++ "\"") + f (N.SecArgNum _ x) = x + f (N.SecArgOther _ x) = x + g (N.SecArgName p x) = p + g (N.SecArgStr p x) = p + g (N.SecArgNum p x) = p + g (N.SecArgOther p x) = p + +toName :: String -> N.Name () +toName = N.Name () . toUtf8 + +getName :: N.Name a -> ByteString +getName (N.Name _ bs) = bs \ No newline at end of file diff --git a/experiment/parse/SVGFonts/0.2/SVGFonts.cabal b/experiment/parse/SVGFonts/0.2/SVGFonts.cabal new file mode 100644 index 00000000000..41cd7a75e33 --- /dev/null +++ b/experiment/parse/SVGFonts/0.2/SVGFonts.cabal @@ -0,0 +1,27 @@ +Name: SVGFonts +Version: 0.2 +Description: parse svg-font files and generate outlines of letters and sentences +category: graphics +License: GPL +License-file: LICENSE +Author: Tillmann Vogt +Maintainer: Tillmann.Vogt@rwth-aachen.de +Build-Type: Simple +Cabal-Version: >=1.2 + +Library + hs-source-dirs: src + build-depends: + haskell98, + base, + OpenGL, + GLUT, + xml, + parsec + exposed-modules: + Graphics.SVGFonts.ReadFont Graphics.SVGFonts.KETTriangulation + +Executable Fonts + hs-source-dirs: src + Main-is: Test/Fonts.hs + other-modules: Test.PointOfView, Graphics.SVGFonts.ReadFont diff --git a/experiment/parse/SearchExperiment.hs b/experiment/parse/SearchExperiment.hs new file mode 100644 index 00000000000..40f56857163 --- /dev/null +++ b/experiment/parse/SearchExperiment.hs @@ -0,0 +1,58 @@ +module Main where + +import IndexUtils + +import Distribution.Package +import Distribution.PackageDescription +import Distribution.PackageDescription.Parse +import Distribution.Simple.Utils (fromUTF8) + +import System.Environment +import qualified Data.ByteString.Lazy.Char8 as LBS +import qualified Data.ByteString.Char8 as BS +import qualified Data.Map as Map +import qualified Data.Set as Set +import Data.List +import Data.List.Split +import Data.Char + +main = do + [indexfile] <- getArgs + cabalFiles <- IndexUtils.readPackageIndexFile indexfile + + print (length cabalFiles) + + let parse = parsePackageDescription . fromUTF8 . LBS.unpack + pkgs = [ packageDescription pkg + | ParseOk _ pkg <- map parse cabalFiles ] + latestPkgs = Map.fromListWith + (\a b -> if packageVersion a > packageVersion b + then a else b) + [ (packageName pkg, pkg) | pkg <- pkgs ] + + print (Map.size latestPkgs) + + let wordfreqs = Map.fromListWith (+) + [ (w,1) + | pkg <- Map.elems latestPkgs + , w <- extractWords pkg ] + mostfreq = take 100 $ sortBy (flip compare) + [ (f,w) | (w,f) <- Map.toList wordfreqs, f > 1 ] + mostfreqSet = Set.fromList (map snd mostfreq) + + putStr $ unlines + [ display pkg ++ ": " ++ intercalate ", " ws) + | pkg <- Map.elems latestPkgs + , let ws = filter (`Set.notMember` mostfreqSet) (extractWords pkg) ] + +-- putStr $ unlines +-- [ show n ++ " " ++ show f ++ ": " ++ w +-- | ((f,w), n) <- zip (Set.toList mostfreq) [0..] ] + +extractWords = + noDups . map (map toLower) . split strategy . description + where + strategy = dropFinalBlank . dropInitBlank . dropDelims . condense + $ oneOf " \n\t.,;:@|/\\&^%$!\"*()<>" + +noDups = map head . group . sort diff --git a/experiment/parse/Test.hs b/experiment/parse/Test.hs new file mode 100644 index 00000000000..e7d4d3e5efd --- /dev/null +++ b/experiment/parse/Test.hs @@ -0,0 +1,139 @@ +module Main where + +import IndexUtils + +import qualified OldParse +import Distribution.Simple.Utils (fromUTF8) + +import qualified Parser +import qualified LexerMonad as Parser + +import System.Environment +import Control.Exception (evaluate) +import qualified Data.ByteString.Lazy.Char8 as LBS +import qualified Data.ByteString.Char8 as BS +import Data.List +import Data.Char +import Distribution.Simple.Utils (fromUTF8) + +{- +old <- parseOldFile "diff/2.cabal" +new <- parseNewFile "diff/2.cabal" +let old' = normaliseOldFields old +let new' = normaliseNewFields new +let new'' = toOldFields new' +-} + +parseOldFile :: FilePath -> IO [OldParse.Field] +parseOldFile file = do + OldParse.ParseOk _ fs <- fmap parse $ readFile file + return fs + where + parse = OldParse.readFields . fromUTF8 + +parseNewFile :: FilePath -> IO [Parser.Field] +parseNewFile file = do + Right fs <- fmap parse $ BS.readFile file + return fs + where + parse = Parser.readFields + +toOldFields :: [Parser.Field] -> [OldParse.Field] +toOldFields [] = [] +toOldFields (Parser.Field n ls : rest) = OldParse.F (lineOfName n) (toOldName n) (toOldFieldContent ls) + : toOldFields rest +toOldFields (Parser.Section n@(Parser.Name _ sif) as fs : + Parser.Section (Parser.Name _ selse) _ fs' : rest) + | isIf sif, isElse selse = OldParse.IfBlock (lineOfName n) (toOldArgs as) (toOldFields fs) (toOldFields fs') + : toOldFields rest +toOldFields (Parser.Section n@(Parser.Name _ sif) as fs : rest) + | isIf sif = OldParse.IfBlock (lineOfName n) (toOldArgs as) (toOldFields fs) [] + : toOldFields rest +toOldFields (Parser.Section n as fs : rest) = OldParse.Section (lineOfName n) (toOldName n) (toOldArgs as) (toOldFields fs) + : toOldFields rest + +isIf s = BS.map toLower s == BS.pack "if" +isElse s = BS.map toLower s == BS.pack "else" + +lineOfName (Parser.Name (Parser.Position l _) _) = l +toOldName (Parser.Name _ n) = map toLower (BS.unpack n) +toOldArgs = concatMap toOldArg + where + toOldArg (Parser.SecArgName _ a) = BS.unpack a + toOldArg (Parser.SecArgStr _ a) = a + toOldArg (Parser.SecArgNum _ a) = BS.unpack a + toOldArg (Parser.SecArgOther _ a) = BS.unpack a + +toOldFieldContent ls = intercalate "\n" + . normaliseFieldContent + $ [ BS.unpack l | Parser.FieldLine _ l <- ls ] + +normaliseFieldContent = + dropLeadingEmpty + . dotToBlank + . trimLines + . mungeBraces + . map fromUTF8 + where + trimLines = map trim + dropLeadingEmpty ("":ls) = ls + dropLeadingEmpty ls = ls + dotToBlank (l:ls) = l : map (\l -> if l == "." then "" else l) + (filter (/="") ls) + dotToBlank [] = [] + + -- The old parser did funny things with {}'s inside fields + mungeBraces = concatMap (splitOn (\c -> c == '{' || c == '}')) + +trim :: String -> String +trim = reverse . dropWhile (\c -> c == ' ' || c == '\t') + . reverse . dropWhile (\c -> c == ' ' || c == '\t') + +splitOn _ "" = [""] +splitOn p s = unfoldr step s + where + step s | null s = Nothing + | otherwise = Just (l,drop 1 s') where (l,s') = break p s + +normaliseOldFields :: [OldParse.Field] -> [OldParse.Field] +normaliseOldFields = filter (not . isCommentSection) + . map normaliseOldField + where + isCommentSection (OldParse.Section _ "--" _ []) = True + isCommentSection _ = False + +normaliseOldField :: OldParse.Field -> OldParse.Field +normaliseOldField (OldParse.F p n v) = OldParse.F p n v +normaliseOldField (OldParse.Section p n a fs) = OldParse.Section p n (normaliseOldSectionArgs a) (normaliseOldFields fs) +normaliseOldField (OldParse.IfBlock p c t e) = OldParse.IfBlock p (normaliseOldSectionArgs c) (normaliseOldFields t) (normaliseOldFields e) + +normaliseOldSectionArgs n@(_:_:_) | head n == '"' && last n == '"' = init (tail n) +normaliseOldSectionArgs n = filter (/=' ') n + +main = do + [indexfile] <- getArgs + cabalFiles <- IndexUtils.readPackageIndexFile indexfile + sequence_ + [ do putStrLn $ "writing " ++ outfile + LBS.writeFile outfile cabalFile + writeFile (outfile ++ ".old") (show old) + writeFile (outfile ++ ".new") (show new) + | ((cabalFile, old, new), n) <- zip (diffFiles cabalFiles) [0..] + , let outfile = "diff/" ++ show n ++ ".cabal" ] + + +diffFiles cabalFiles = + [ (cabalFile, old', new') + | let oldParse = OldParse.readFields . fromUTF8 . LBS.unpack + newParse = Parser.readFields . toStrict + , (cabalFile, OldParse.ParseOk _ old, Right new) <- map (\f -> (f, oldParse f, newParse f)) cabalFiles + , let old' = normaliseOldFields old + new' = toOldFields new + , old' /= new' + ] + where + toStrict = BS.concat . LBS.toChunks + +diffFields as bs = + [ (a,b) | (a,b) <- zip as bs, a/=b ] + diff --git a/experiment/parse/cabal-files/Cabal-edit.cabal b/experiment/parse/cabal-files/Cabal-edit.cabal new file mode 100644 index 00000000000..18654e3ecfd --- /dev/null +++ b/experiment/parse/cabal-files/Cabal-edit.cabal @@ -0,0 +1,170 @@ +Name: Cabal +Version: 1.15.0 +x-revision: 1 +Copyright: 2003-2006, Isaac Jones + 2005-2011, Duncan Coutts +License: BSD3 +License-File: LICENSE +Author: Isaac Jones + Duncan Coutts +Maintainer: cabal-devel@haskell.org +Homepage: http://www.haskell.org/cabal/ +bug-reports: http://hackage.haskell.org/trac/hackage/ +Synopsis: A framework for packaging Haskell software +Description: + The Haskell Common Architecture for Building Applications and + Libraries: a framework defining a common interface for authors to more + easily build their Haskell applications in a portable way. + . + The Haskell Cabal is part of a larger infrastructure for distributing, + organizing, and cataloging Haskell libraries and tools. +Category: Distribution +cabal-version: >=1.10 +Build-Type: Custom +-- Even though we do use the default Setup.lhs it's vital to bootstrapping +-- that we build Setup.lhs using our own local Cabal source code. + +Extra-Source-Files: + README changelog + +source-repository head + type: darcs + location: http://darcs.haskell.org/cabal/ + subdir: Cabal + +Flag base4 + Description: Choose the even newer, even smaller, split-up base package. + +Flag base3 + Description: Choose the new smaller, split-up base package. + +Library + build-depends: base >= 2 && < 5, + filepath >= 1 && < 1.4 + if flag(base4) { build-depends: base >= 4 } else { build-depends: base < 4 } + if flag(base3) { build-depends: base >= 3 } else { build-depends: base < 3 } + if flag(base3) + Build-Depends: directory >= 1 && < 1.2, + process >= 1 && < 1.2, + old-time >= 1 && < 1.2, + containers >= 0.1 && < 0.6, + array >= 0.1 && < 0.5, + pretty >= 1 && < 1.3 + + if !os(windows) + Build-Depends: unix >= 2.0 && < 2.6 + + ghc-options: -Wall -fno-ignore-asserts + if impl(ghc >= 6.8) + ghc-options: -fwarn-tabs + nhc98-Options: -K4M + + Exposed-Modules: + Distribution.Compiler, + Distribution.InstalledPackageInfo, + Distribution.License, + Distribution.Make, + Distribution.ModuleName, + Distribution.Package, + Distribution.PackageDescription, + Distribution.PackageDescription.Configuration, + Distribution.PackageDescription.Parse, + Distribution.PackageDescription.Check, + Distribution.PackageDescription.PrettyPrint, + Distribution.ParseUtils, + Distribution.ReadE, + Distribution.Simple, + Distribution.Simple.Build, + Distribution.Simple.Build.Macros, + Distribution.Simple.Build.PathsModule, + Distribution.Simple.BuildPaths, + Distribution.Simple.Bench, + Distribution.Simple.Command, + Distribution.Simple.Compiler, + Distribution.Simple.Configure, + Distribution.Simple.GHC, + Distribution.Simple.LHC, + Distribution.Simple.Haddock, + Distribution.Simple.Hpc, + Distribution.Simple.Hugs, + Distribution.Simple.Install, + Distribution.Simple.InstallDirs, + Distribution.Simple.JHC, + Distribution.Simple.LocalBuildInfo, + Distribution.Simple.NHC, + Distribution.Simple.PackageIndex, + Distribution.Simple.PreProcess, + Distribution.Simple.PreProcess.Unlit, + Distribution.Simple.Program, + Distribution.Simple.Program.Ar, + Distribution.Simple.Program.Builtin, + Distribution.Simple.Program.Db, + Distribution.Simple.Program.GHC, + Distribution.Simple.Program.HcPkg, + Distribution.Simple.Program.Hpc, + Distribution.Simple.Program.Ld, + Distribution.Simple.Program.Run, + Distribution.Simple.Program.Script, + Distribution.Simple.Program.Types, + Distribution.Simple.Register, + Distribution.Simple.Setup, + Distribution.Simple.SrcDist, + Distribution.Simple.Test, + Distribution.Simple.UHC, + Distribution.Simple.UserHooks, + Distribution.Simple.Utils, + Distribution.System, + Distribution.TestSuite, + Distribution.Text, + Distribution.Verbosity, + Distribution.Version, + Distribution.Compat.ReadP, + Language.Haskell.Extension + + Other-Modules: + Distribution.GetOpt, + Distribution.Compat.Exception, + Distribution.Compat.CopyFile, + Distribution.Compat.TempFile, + Distribution.Simple.GHC.IPI641, + Distribution.Simple.GHC.IPI642, + Paths_Cabal + + Default-Language: Haskell98 + Default-Extensions: CPP + +test-suite unit-tests + type: exitcode-stdio-1.0 + main-is: suite.hs + other-modules: PackageTests.BuildDeps.GlobalBuildDepsNotAdditive1.Check, + PackageTests.BuildDeps.GlobalBuildDepsNotAdditive2.Check, + PackageTests.BuildDeps.InternalLibrary0.Check, + PackageTests.BuildDeps.InternalLibrary1.Check, + PackageTests.BuildDeps.InternalLibrary2.Check, + PackageTests.BuildDeps.InternalLibrary3.Check, + PackageTests.BuildDeps.InternalLibrary4.Check, + PackageTests.BuildDeps.TargetSpecificDeps1.Check, + PackageTests.BuildDeps.TargetSpecificDeps2.Check, + PackageTests.BuildDeps.TargetSpecificDeps3.Check, + PackageTests.BuildDeps.SameDepsAllRound.Check, + PackageTests.TestOptions.Check, + PackageTests.TestStanza.Check, + PackageTests.TestSuiteExeV10.Check, + PackageTests.BenchmarkStanza.Check, + PackageTests.PackageTester + hs-source-dirs: tests + build-depends: + base, + test-framework, + test-framework-quickcheck2, + test-framework-hunit, + HUnit, + QuickCheck >= 2.1.0.1, + Cabal, + process, + directory, + filepath, + extensible-exceptions, + bytestring, + unix + Default-Language: Haskell98 diff --git a/experiment/parse/cabal-files/Cabal.cabal b/experiment/parse/cabal-files/Cabal.cabal new file mode 100644 index 00000000000..675f3c6a354 --- /dev/null +++ b/experiment/parse/cabal-files/Cabal.cabal @@ -0,0 +1,169 @@ +Name: Cabal +Version: 1.15.0 +Copyright: 2003-2006, Isaac Jones + 2005-2011, Duncan Coutts +License: BSD3 +License-File: LICENSE +Author: Isaac Jones + Duncan Coutts +Maintainer: cabal-devel@haskell.org +Homepage: http://www.haskell.org/cabal/ +bug-reports: http://hackage.haskell.org/trac/hackage/ +Synopsis: A framework for packaging Haskell software +Description: + The Haskell Common Architecture for Building Applications and + Libraries: a framework defining a common interface for authors to more + easily build their Haskell applications in a portable way. + . + The Haskell Cabal is part of a larger infrastructure for distributing, + organizing, and cataloging Haskell libraries and tools. +Category: Distribution +cabal-version: >=1.10 +Build-Type: Custom +-- Even though we do use the default Setup.lhs it's vital to bootstrapping +-- that we build Setup.lhs using our own local Cabal source code. + +Extra-Source-Files: + README changelog + +source-repository head + type: darcs + location: http://darcs.haskell.org/cabal/ + subdir: Cabal + +Flag base4 + Description: Choose the even newer, even smaller, split-up base package. + +Flag base3 + Description: Choose the new smaller, split-up base package. + +Library + build-depends: base >= 2 && < 5, + filepath >= 1 && < 1.4 + if flag(base4) { build-depends: base >= 4 } else { build-depends: base < 4 } + if flag(base3) { build-depends: base >= 3 } else { build-depends: base < 3 } + if flag(base3) + Build-Depends: directory >= 1 && < 1.2, + process >= 1 && < 1.2, + old-time >= 1 && < 1.2, + containers >= 0.1 && < 0.6, + array >= 0.1 && < 0.5, + pretty >= 1 && < 1.2 + + if !os(windows) + Build-Depends: unix >= 2.0 && < 2.6 + + ghc-options: -Wall -fno-ignore-asserts + if impl(ghc >= 6.8) + ghc-options: -fwarn-tabs + nhc98-Options: -K4M + + Exposed-Modules: + Distribution.Compiler, + Distribution.InstalledPackageInfo, + Distribution.License, + Distribution.Make, + Distribution.ModuleName, + Distribution.Package, + Distribution.PackageDescription, + Distribution.PackageDescription.Configuration, + Distribution.PackageDescription.Parse, + Distribution.PackageDescription.Check, + Distribution.PackageDescription.PrettyPrint, + Distribution.ParseUtils, + Distribution.ReadE, + Distribution.Simple, + Distribution.Simple.Build, + Distribution.Simple.Build.Macros, + Distribution.Simple.Build.PathsModule, + Distribution.Simple.BuildPaths, + Distribution.Simple.Bench, + Distribution.Simple.Command, + Distribution.Simple.Compiler, + Distribution.Simple.Configure, + Distribution.Simple.GHC, + Distribution.Simple.LHC, + Distribution.Simple.Haddock, + Distribution.Simple.Hpc, + Distribution.Simple.Hugs, + Distribution.Simple.Install, + Distribution.Simple.InstallDirs, + Distribution.Simple.JHC, + Distribution.Simple.LocalBuildInfo, + Distribution.Simple.NHC, + Distribution.Simple.PackageIndex, + Distribution.Simple.PreProcess, + Distribution.Simple.PreProcess.Unlit, + Distribution.Simple.Program, + Distribution.Simple.Program.Ar, + Distribution.Simple.Program.Builtin, + Distribution.Simple.Program.Db, + Distribution.Simple.Program.GHC, + Distribution.Simple.Program.HcPkg, + Distribution.Simple.Program.Hpc, + Distribution.Simple.Program.Ld, + Distribution.Simple.Program.Run, + Distribution.Simple.Program.Script, + Distribution.Simple.Program.Types, + Distribution.Simple.Register, + Distribution.Simple.Setup, + Distribution.Simple.SrcDist, + Distribution.Simple.Test, + Distribution.Simple.UHC, + Distribution.Simple.UserHooks, + Distribution.Simple.Utils, + Distribution.System, + Distribution.TestSuite, + Distribution.Text, + Distribution.Verbosity, + Distribution.Version, + Distribution.Compat.ReadP, + Language.Haskell.Extension + + Other-Modules: + Distribution.GetOpt, + Distribution.Compat.Exception, + Distribution.Compat.CopyFile, + Distribution.Compat.TempFile, + Distribution.Simple.GHC.IPI641, + Distribution.Simple.GHC.IPI642, + Paths_Cabal + + Default-Language: Haskell98 + Default-Extensions: CPP + +test-suite unit-tests + type: exitcode-stdio-1.0 + main-is: suite.hs + other-modules: PackageTests.BuildDeps.GlobalBuildDepsNotAdditive1.Check, + PackageTests.BuildDeps.GlobalBuildDepsNotAdditive2.Check, + PackageTests.BuildDeps.InternalLibrary0.Check, + PackageTests.BuildDeps.InternalLibrary1.Check, + PackageTests.BuildDeps.InternalLibrary2.Check, + PackageTests.BuildDeps.InternalLibrary3.Check, + PackageTests.BuildDeps.InternalLibrary4.Check, + PackageTests.BuildDeps.TargetSpecificDeps1.Check, + PackageTests.BuildDeps.TargetSpecificDeps2.Check, + PackageTests.BuildDeps.TargetSpecificDeps3.Check, + PackageTests.BuildDeps.SameDepsAllRound.Check, + PackageTests.TestOptions.Check, + PackageTests.TestStanza.Check, + PackageTests.TestSuiteExeV10.Check, + PackageTests.BenchmarkStanza.Check, + PackageTests.PackageTester + hs-source-dirs: tests + build-depends: + base, + test-framework, + test-framework-quickcheck2, + test-framework-hunit, + HUnit, + QuickCheck >= 2.1.0.1, + Cabal, + process, + directory, + filepath, + extensible-exceptions, + bytestring, + unix + Default-Language: Haskell98 diff --git a/experiment/parse/cabal-files/tst.cabal b/experiment/parse/cabal-files/tst.cabal new file mode 100644 index 00000000000..77cef4a07bc --- /dev/null +++ b/experiment/parse/cabal-files/tst.cabal @@ -0,0 +1,7 @@ +section { + foo: + foo + bar:bar +baz:baz +} + diff --git a/experiment/parse/cabal-files/tst2.cabal b/experiment/parse/cabal-files/tst2.cabal new file mode 100644 index 00000000000..738a629fab3 --- /dev/null +++ b/experiment/parse/cabal-files/tst2.cabal @@ -0,0 +1,14 @@ +Library + build-depends: base >= 2 && < 5, + if flag(base4) { build-depends: base >= 4 } else { build-depends: base < 4 } + filepath >= 1 && < 1.4 + if flag(base3) { build-depends: base >= 3 } else { build-depends: base < 3 } + if flag(base3) + Build-Depends: directory >= 1 && < 1.2, + process >= 1 && < 1.2, + old-time >= 1 && < 1.2, + containers >= 0.1 && < 0.6, + array >= 0.1 && < 0.5, + pretty >= 1 && < 1.2 + else + baz: diff --git a/experiment/parse/cabal-files/unpack-funcs.cabal b/experiment/parse/cabal-files/unpack-funcs.cabal new file mode 100644 index 00000000000..a555c6325f4 --- /dev/null +++ b/experiment/parse/cabal-files/unpack-funcs.cabal @@ -0,0 +1,29 @@ +name: unpack-funcs +version: 0.1.2 +cabal-version: >= 1.6 +tested-with: GHC +category: Control +synopsis: Monad transformers that mirror worker-wrapper transformations. +description: Provides a typeclass and Template Haskell-driven instance generators that create "worker-wrapper" + @ReaderT@ monad transformers, which unpacks the arguments of single-constructor data types. +license: BSD3 +license-file: LICENSE +author: Louis Wasserman +maintainer: wasserman.louis@gmail.com +build-type: Simple + +source-repository head + type: git + location: git@github.com:lowasser/unpack-funcs.git + +Library{ +build-Depends: base < 5.0.0.0, template-haskell >= 2.5.0.0, bytestring >= 0.9.1.0, + vector >= 0.6, primitive >= 0.3, transformers +ghc-options: + -Wall -fno-warn-name-shadowing -fno-warn-orphans +exposed-modules: + Control.Monad.Unpack +other-modules: + Control.Monad.Unpack.Class, + Control.Monad.Unpack.TH +} diff --git a/experiment/parse/diff/0.cabal b/experiment/parse/diff/0.cabal new file mode 100644 index 00000000000..8f9c4ec1bb2 --- /dev/null +++ b/experiment/parse/diff/0.cabal @@ -0,0 +1,46 @@ +name: graphs +category: Data Structures +version: 0.1 +license: BSD3 +cabal-version: >= 1.6 +license-file: LICENSE +author: Edward A. Kmett +maintainer: Edward A. Kmett +stability: experimental +homepage: http://github.com/ekmett/graphs +copyright: Copyright (C) 2011 Edward A. Kmett +synopsis: A simple monadic graph library +description: A simple monadic graph library +build-type: Simple + +source-repository head + type: git + location: git://github.com/ekmett/graphs.git + +library + build-depends: + base >= 4 && < 4.4, + array >= 0.3 && < 0.5, + data-default >= 0.2 && < 0.3, + transformers >= 0.2.2 && < 0.3, + containers >= 0.3 && < 0.5, + void >= 0.3 && < 0.4 + + exposed-modules: + Data.Graph.AdjacencyList + Data.Graph.AdjacencyMatrix + Data.Graph.Algorithm.DepthFirstSearch + Data.Graph.Algorithm.BreadthFirstSearch + Data.Graph.Class + Data.Graph.Class.AdjacencyList + Data.Graph.Class.AdjacencyMatrix + Data.Graph.Class.EdgeEnumerable + Data.Graph.Class.Bidirectional + Data.Graph.Class.VertexEnumerable + Data.Graph.Dual + Data.Graph.Empty + Data.Graph.PropertyMap + other-modules + Data.Graph.Internal.Color + + ghc-options: -Wall diff --git a/experiment/parse/diff/0.cabal.new b/experiment/parse/diff/0.cabal.new new file mode 100644 index 00000000000..c6f5ab2cefa --- /dev/null +++ b/experiment/parse/diff/0.cabal.new @@ -0,0 +1 @@ +[F 1 "name" "graphs",F 2 "category" "Data Structures",F 3 "version" "0.1",F 4 "license" "BSD3",F 5 "cabal-version" ">= 1.6",F 6 "license-file" "LICENSE",F 7 "author" "Edward A. Kmett",F 8 "maintainer" "Edward A. Kmett ",F 9 "stability" "experimental",F 10 "homepage" "http://github.com/ekmett/graphs",F 11 "copyright" "Copyright (C) 2011 Edward A. Kmett",F 12 "synopsis" "A simple monadic graph library",F 13 "description" "A simple monadic graph library",F 14 "build-type" "Simple",Section 16 "source-repository" "head" [F 17 "type" "git",F 18 "location" "git://github.com/ekmett/graphs.git"],Section 20 "library" "" [F 21 "build-depends" "base >= 4 && < 4.4,\narray >= 0.3 && < 0.5,\ndata-default >= 0.2 && < 0.3,\ntransformers >= 0.2.2 && < 0.3,\ncontainers >= 0.3 && < 0.5,\nvoid >= 0.3 && < 0.4",F 29 "exposed-modules" "Data.Graph.AdjacencyList\nData.Graph.AdjacencyMatrix\nData.Graph.Algorithm.DepthFirstSearch\nData.Graph.Algorithm.BreadthFirstSearch\nData.Graph.Class\nData.Graph.Class.AdjacencyList\nData.Graph.Class.AdjacencyMatrix\nData.Graph.Class.EdgeEnumerable\nData.Graph.Class.Bidirectional\nData.Graph.Class.VertexEnumerable\nData.Graph.Dual\nData.Graph.Empty\nData.Graph.PropertyMap",Section 43 "other-modules" "" [Section 44 "data.graph.internal.color" "" []],F 46 "ghc-options" "-Wall"]] \ No newline at end of file diff --git a/experiment/parse/diff/0.cabal.old b/experiment/parse/diff/0.cabal.old new file mode 100644 index 00000000000..7813edb66d4 --- /dev/null +++ b/experiment/parse/diff/0.cabal.old @@ -0,0 +1 @@ +[F 1 "name" "graphs",F 2 "category" "Data Structures",F 3 "version" "0.1",F 4 "license" "BSD3",F 5 "cabal-version" ">= 1.6",F 6 "license-file" "LICENSE",F 7 "author" "Edward A. Kmett",F 8 "maintainer" "Edward A. Kmett ",F 9 "stability" "experimental",F 10 "homepage" "http://github.com/ekmett/graphs",F 11 "copyright" "Copyright (C) 2011 Edward A. Kmett",F 12 "synopsis" "A simple monadic graph library",F 13 "description" "A simple monadic graph library",F 14 "build-type" "Simple",Section 16 "source-repository" "head" [F 17 "type" "git",F 18 "location" "git://github.com/ekmett/graphs.git"],Section 20 "library" "" [F 21 "build-depends" "base >= 4 && < 4.4,\narray >= 0.3 && < 0.5,\ndata-default >= 0.2 && < 0.3,\ntransformers >= 0.2.2 && < 0.3,\ncontainers >= 0.3 && < 0.5,\nvoid >= 0.3 && < 0.4",F 29 "exposed-modules" "Data.Graph.AdjacencyList\nData.Graph.AdjacencyMatrix\nData.Graph.Algorithm.DepthFirstSearch\nData.Graph.Algorithm.BreadthFirstSearch\nData.Graph.Class\nData.Graph.Class.AdjacencyList\nData.Graph.Class.AdjacencyMatrix\nData.Graph.Class.EdgeEnumerable\nData.Graph.Class.Bidirectional\nData.Graph.Class.VertexEnumerable\nData.Graph.Dual\nData.Graph.Empty\nData.Graph.PropertyMap",Section 43 "other-modules" "" [Section 44 "data" ".Graph.Internal.Color" []],F 46 "ghc-options" "-Wall"]] \ No newline at end of file diff --git a/experiment/parse/diff/1.cabal b/experiment/parse/diff/1.cabal new file mode 100644 index 00000000000..ab063060424 --- /dev/null +++ b/experiment/parse/diff/1.cabal @@ -0,0 +1,45 @@ +name: graphs +category: Data Structures +version: 0.2 +license: BSD3 +cabal-version: >= 1.6 +license-file: LICENSE +author: Edward A. Kmett +maintainer: Edward A. Kmett +stability: experimental +homepage: http://github.com/ekmett/graphs +copyright: Copyright (C) 2011 Edward A. Kmett +synopsis: A simple monadic graph library +description: A simple monadic graph library +build-type: Simple + +source-repository head + type: git + location: git://github.com/ekmett/graphs.git + +library + build-depends: + base >= 4 && < 4.4, + array >= 0.3 && < 0.5, + data-default >= 0.2 && < 0.3, + transformers >= 0.2.2 && < 0.3, + containers >= 0.3 && < 0.5, + void >= 0.3 && < 0.4 + + exposed-modules: + Data.Graph.AdjacencyList + Data.Graph.AdjacencyMatrix + Data.Graph.Algorithm.DepthFirstSearch + Data.Graph.Algorithm.BreadthFirstSearch + Data.Graph.Class + Data.Graph.Class.AdjacencyList + Data.Graph.Class.AdjacencyMatrix + Data.Graph.Class.EdgeEnumerable + Data.Graph.Class.Bidirectional + Data.Graph.Class.VertexEnumerable + Data.Graph.Dual + Data.Graph.PropertyMap + other-modules + Data.Graph.Internal.Color + + ghc-options: -Wall diff --git a/experiment/parse/diff/1.cabal.new b/experiment/parse/diff/1.cabal.new new file mode 100644 index 00000000000..54a5199419c --- /dev/null +++ b/experiment/parse/diff/1.cabal.new @@ -0,0 +1 @@ +[F 1 "name" "graphs",F 2 "category" "Data Structures",F 3 "version" "0.2",F 4 "license" "BSD3",F 5 "cabal-version" ">= 1.6",F 6 "license-file" "LICENSE",F 7 "author" "Edward A. Kmett",F 8 "maintainer" "Edward A. Kmett ",F 9 "stability" "experimental",F 10 "homepage" "http://github.com/ekmett/graphs",F 11 "copyright" "Copyright (C) 2011 Edward A. Kmett",F 12 "synopsis" "A simple monadic graph library",F 13 "description" "A simple monadic graph library",F 14 "build-type" "Simple",Section 16 "source-repository" "head" [F 17 "type" "git",F 18 "location" "git://github.com/ekmett/graphs.git"],Section 20 "library" "" [F 21 "build-depends" "base >= 4 && < 4.4,\narray >= 0.3 && < 0.5,\ndata-default >= 0.2 && < 0.3,\ntransformers >= 0.2.2 && < 0.3,\ncontainers >= 0.3 && < 0.5,\nvoid >= 0.3 && < 0.4",F 29 "exposed-modules" "Data.Graph.AdjacencyList\nData.Graph.AdjacencyMatrix\nData.Graph.Algorithm.DepthFirstSearch\nData.Graph.Algorithm.BreadthFirstSearch\nData.Graph.Class\nData.Graph.Class.AdjacencyList\nData.Graph.Class.AdjacencyMatrix\nData.Graph.Class.EdgeEnumerable\nData.Graph.Class.Bidirectional\nData.Graph.Class.VertexEnumerable\nData.Graph.Dual\nData.Graph.PropertyMap",Section 42 "other-modules" "" [Section 43 "data.graph.internal.color" "" []],F 45 "ghc-options" "-Wall"]] \ No newline at end of file diff --git a/experiment/parse/diff/1.cabal.old b/experiment/parse/diff/1.cabal.old new file mode 100644 index 00000000000..ff9ed6b79e5 --- /dev/null +++ b/experiment/parse/diff/1.cabal.old @@ -0,0 +1 @@ +[F 1 "name" "graphs",F 2 "category" "Data Structures",F 3 "version" "0.2",F 4 "license" "BSD3",F 5 "cabal-version" ">= 1.6",F 6 "license-file" "LICENSE",F 7 "author" "Edward A. Kmett",F 8 "maintainer" "Edward A. Kmett ",F 9 "stability" "experimental",F 10 "homepage" "http://github.com/ekmett/graphs",F 11 "copyright" "Copyright (C) 2011 Edward A. Kmett",F 12 "synopsis" "A simple monadic graph library",F 13 "description" "A simple monadic graph library",F 14 "build-type" "Simple",Section 16 "source-repository" "head" [F 17 "type" "git",F 18 "location" "git://github.com/ekmett/graphs.git"],Section 20 "library" "" [F 21 "build-depends" "base >= 4 && < 4.4,\narray >= 0.3 && < 0.5,\ndata-default >= 0.2 && < 0.3,\ntransformers >= 0.2.2 && < 0.3,\ncontainers >= 0.3 && < 0.5,\nvoid >= 0.3 && < 0.4",F 29 "exposed-modules" "Data.Graph.AdjacencyList\nData.Graph.AdjacencyMatrix\nData.Graph.Algorithm.DepthFirstSearch\nData.Graph.Algorithm.BreadthFirstSearch\nData.Graph.Class\nData.Graph.Class.AdjacencyList\nData.Graph.Class.AdjacencyMatrix\nData.Graph.Class.EdgeEnumerable\nData.Graph.Class.Bidirectional\nData.Graph.Class.VertexEnumerable\nData.Graph.Dual\nData.Graph.PropertyMap",Section 42 "other-modules" "" [Section 43 "data" ".Graph.Internal.Color" []],F 45 "ghc-options" "-Wall"]] \ No newline at end of file diff --git a/experiment/parse/fail/0.cabal b/experiment/parse/fail/0.cabal new file mode 100644 index 00000000000..d05b82ac30d --- /dev/null +++ b/experiment/parse/fail/0.cabal @@ -0,0 +1,66 @@ +Name: ixset +Version: 1.0.4 +Synopsis: Efficient relational queries on Haskell sets. +Description: + Create and query sets that are indexed by multiple indices. +License: BSD3 +License-file: COPYING +Author: Happstack team, HAppS LLC +Maintainer: Happstack team +homepage: http://happstack.com +Category: Data Structures +Build-Type: Simple +Cabal-Version: >= 1.8 + +source-repository head + type: darcs + subdir: ixset + location: http://patch-tag.com/r/mae/happstack + +flag base4 + +Library +-- Default-Language: Haskell2010 + if flag(base4) + Build-Depends: base >=4 && < 5, syb + else + Build-Depends: base < 4 + + if impl(ghc >= 6.12.1) + Build-Depends: syb-with-class >= 0.6.1 + else + Build-Depends: syb-with-class < 0.6.1 + + + Build-Depends: containers, + safecopy, + template-haskell + + hs-source-dirs: src + Exposed-modules: + Data.IxSet + Data.IxSet.Ix + + if impl(ghc >= 6.12) + ghc-options: -Wall -fno-warn-unused-do-bind + else + ghc-options: -Wall + GHC-Prof-Options: -auto-all +{- + +Disable for now because it causes problems with older versions of Cabal. + +Test-Suite test-ixset + Default-Language: Haskell2010 + type: detailed-0.9 + test-module: Test + other-modules: Data.IxSet.Tests + hs-source-dirs: tests + build-depends: base, + Cabal >= 1.10, + containers, + HUnit, + ixset, + QuickCheck, + random +-} \ No newline at end of file diff --git a/experiment/parse/fail/1.cabal b/experiment/parse/fail/1.cabal new file mode 100644 index 00000000000..e8a3229e8c5 --- /dev/null +++ b/experiment/parse/fail/1.cabal @@ -0,0 +1,93 @@ +Name: DSTM +Version: 0.1.2 +Copyright: (c) 2010, Frank Kupke +License: LGPL +License-File: LICENSE +Author: Frank Kupke +Maintainer: frk@informatik.uni-kiel.de +Cabal-Version: >= 1.2.3 +Stability: provisional +Synopsis: A framework for using STM within distributed systems +Description: +{ +The DSTM package consists of the DSTM library, a name server application, and +three sample distributed programs using the library. DSTM is a framework +enabling the use of the STM interface, known from concurrent programming, to be +used for distributed Haskell applications as well. Provided are a simple Dining +Philosophers, a Chat, and a soft real-time Bomberman game application. +. +Distributed communication is transparent to the application programmer. The +application designer uses a very simple nameserver mechanism to set up the +system. The DSTM library includes the management of unavailable process nodes +and provides the application with abstract error information thus facilitating +the implementation of robust distributed application programs. +. +For usage please look into the included file: DSTMManual.pdf, also available at +http:\/\/www.informatik.uni-kiel.de\/prog\/mitarbeiter\/frank-kupke\/. +. +Changes from last version: +. +* documentation available online +. +* fixed typos in Chat example +. +* set debug flags to no debug output +} +Category: Distributed Computing +Build-Type: Simple +Tested-With: GHC ==6.10 + +Data-Files: field.txt, input1.txt, input2.txt, input3.txt +Data-Dir: Bomberman +Extra-source-files: README LICENSE DSTMManual.pdf + +Library + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + + GHC-Options: -Wall + + Exposed-Modules: + Control.Distributed.STM.DSTM + + Other-Modules: + Control.Distributed.STM.DebugBase, + Control.Distributed.STM.DebugDSTM, + Control.Distributed.STM.Dist + Control.Distributed.STM.EnvAddr, + Control.Distributed.STM.NameService, + Control.Distributed.STM.RetryVar, + Control.Distributed.STM.TVar, + Control.Distributed.STM.STM, + Control.Distributed.STM.Utils, + Paths_DSTM + + Extensions: DeriveDataTypeable, + ScopedTypeVariables + +Executable NameServer + Main-Is: NameServer.hs + Other modules: DSTM, NameService + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Nameserver, . + +Executable Phil + Main-Is: Phil.hs + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Phil, . + +Executable ChatClient + Main-Is: ChatClient.hs + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Chat, . + Other-Modules: ChatData + +Executable ChatServer + Main-Is: ChatServer.hs + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Chat, . + Other-Modules: ChatData + +Executable Bomberman + Main-Is: Bomberman.hs + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Bomberman, . diff --git a/experiment/parse/fail/10.cabal b/experiment/parse/fail/10.cabal new file mode 100644 index 00000000000..62e8b3f6b16 --- /dev/null +++ b/experiment/parse/fail/10.cabal @@ -0,0 +1,40 @@ +name: oeis +version: 0.3.0 +stability: experimental +category: Math +synopsis: Interface to the Online Encyclopedia of Integer Sequences +description: Interface to the Online Encyclopedia of Integer Sequences. See . +author: Brent Yorgey +maintainer: Brian Lewis +license: BSD3 +license-file: LICENSE + +cabal-version: >= 1.6 +build-type: Custom + +data-files: + README + example/Catalan.hs + +extra-source-files: + src/test.hs + +library + hs-source-dirs: + src + + exposed-modules: + Math.OEIS + + build-depends: + base == 3.* || == 4.*, + network == 2.*, + HTTP >= 4000.0.2 || == 4000.1.* + + ghc-options: -Wall + if impl(ghc >= 6.8) + ghc-options: -fwarn-tabs + +source-repository head +  type: git +  location: git://github.com/bsl/oeis.git diff --git a/experiment/parse/fail/11.cabal b/experiment/parse/fail/11.cabal new file mode 100644 index 00000000000..6802115b3a4 --- /dev/null +++ b/experiment/parse/fail/11.cabal @@ -0,0 +1,44 @@ +name: control-monad-exception-mtl +version: 0.10.3 +Cabal-Version: >= 1.10 +build-type: Simple +license: PublicDomain +author: Pepe Iborra +maintainer: pepeiborra@gmail.com +homepage: http://pepeiborra.github.com/control-monad-exception +synopsis: MTL instances for the EMT exceptions monad transformer +category: Control, Monads, Failure +stability: experimental +tested-with: GHC == 6.12.1 +bug-reports: http://github.com/pepeiborra/control-monad-exception/issues +description: + MTL classes instances for the EMT exceptions monad transformer + . + +Library + buildable: True + default-language: Haskell98 + build-depends: base > 4 && < 5 + , control-monad-exception >= 0.10.3 + , mtl + + + default- extensions: + ScopedTypeVariables, + MultiParamTypeClasses, + FlexibleContexts, + FlexibleInstances, + UndecidableInstances + + exposed-modules: + Control.Monad.Exception.MTL + + hs-source-dirs: extensions + + ghc-options: -Wall -fno-warn-name-shadowing -fno-warn-orphans + + + +source-repository head + type: git + location: git://github.com/pepeiborra/control-monad-exception.git diff --git a/experiment/parse/fail/2.cabal b/experiment/parse/fail/2.cabal new file mode 100644 index 00000000000..59f45d4098e --- /dev/null +++ b/experiment/parse/fail/2.cabal @@ -0,0 +1,84 @@ +Name: DSTM +Version: 0.1.1 +Copyright: (c) 2010, Frank Kupke +License: LGPL +License-File: LICENSE +Author: Frank Kupke +Maintainer: frk@informatik.uni-kiel.de +Cabal-Version: >= 1.2.3 +Stability: provisional +Synopsis: A framework for using STM within distributed systems +Description: +{- +The DSTM package consists of the DSTM library, a name server application, and +three sample distributed programs using the library. DSTM is a framework +enabling the use of the STM interface, known from concurrent programming, to be +used for distributed Haskell applications as well. Provided are a simple Dining +Philosophers, a Chat, and a soft real-time Bomberman game application. + +Distributed communication is transparent to the application programmer. The +application designer uses a very simple nameserver mechanism to set up the +system. The DSTM library includes the management of unavailable process nodes +and provides the application with abstract error information thus facilitating +the implementation of robust distributed application programs. + +For usage please look into the included file: DSTMManual.pdf. +-} +Category: Distributed Computing +Build-Type: Simple +Tested-With: GHC ==6.10 + +Data-Files: field.txt, input1.txt, input2.txt, input3.txt +Data-Dir: Bomberman +Extra-source-files: README LICENSE DSTMManual.pdf + +Library + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + + GHC-Options: -Wall + + Exposed-Modules: + Control.Distributed.STM.DSTM + + Other-Modules: + Control.Distributed.STM.DebugBase, + Control.Distributed.STM.DebugDSTM, + Control.Distributed.STM.Dist + Control.Distributed.STM.EnvAddr, + Control.Distributed.STM.NameService, + Control.Distributed.STM.RetryVar, + Control.Distributed.STM.TVar, + Control.Distributed.STM.STM, + Control.Distributed.STM.Utils, + Paths_DSTM + + Extensions: DeriveDataTypeable, + ScopedTypeVariables + +Executable NameServer + Main-Is: NameServer.hs + Other modules: DSTM, NameService + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Nameserver, . + +Executable Phil + Main-Is: Phil.hs + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Phil, . + +Executable ChatClient + Main-Is: ChatClient.hs + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Chat, . + Other-Modules: ChatData + +Executable ChatServer + Main-Is: ChatServer.hs + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Chat, . + Other-Modules: ChatData + +Executable Bomberman + Main-Is: Bomberman.hs + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Bomberman, . diff --git a/experiment/parse/fail/3.cabal b/experiment/parse/fail/3.cabal new file mode 100644 index 00000000000..10f156c1c2a --- /dev/null +++ b/experiment/parse/fail/3.cabal @@ -0,0 +1,82 @@ +Name: DSTM +Version: 0.1 +Copyright: (c) 2010, Frank Kupke +License: LGPL +License-File: LICENSE +Author: Frank Kupke +Maintainer: frk@informatik.uni-kiel.de +Cabal-Version: >= 1.2.3 +Stability: provisional +Synopsis: A framework for using STM within distributed systems +Description: +{- +The DSTM package consists of the DSTM library, a name server application, and +three sample distributed programs using the library. DSTM is a framework +enabling the use of the STM interface, known from concurrent programming, to be +used for distributed Haskell applications as well. Provided are a simple Dining +Philosophers, a Chat, and a soft real-time Bomberman game application. + +Distributed communication is transparent to the application programmer. The +application designer uses a very simple nameserver mechanism to set up the +system. The DSTM library includes the management of unavailable process nodes +and provides the application with abstract error information thus facilitating +the implementation of robust distributed application programs. + +For usage please look into the included file: DSTMManual.pdf. +-} +Category: Distributed Computing +Build-Type: Simple +Tested-With: GHC ==6.10 + +Data-Files: field.txt, input1.txt, input2.txt, input3.txt +Data-Dir: Bomberman +Extra-source-files: README LICENSE DSTMManual.pdf + +Library + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + + GHC-Options: -Wall + + Exposed-Modules: + Control.Distributed.STM.DSTM + + Other-Modules: + Control.Distributed.STM.DebugBase, + Control.Distributed.STM.DebugDSTM, + Control.Distributed.STM.Dist + Control.Distributed.STM.EnvAddr, + Control.Distributed.STM.NameService, + Control.Distributed.STM.RetryVar, + Control.Distributed.STM.TVar, + Control.Distributed.STM.STM, + Control.Distributed.STM.Utils, + Paths_DSTM + + Extensions: DeriveDataTypeable, + ScopedTypeVariables + +Executable NameServer + Main-Is: NameServer.hs + Other modules: DSTM, NameService + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Nameserver, . + +Executable Phil + Main-Is: Phil.hs + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Phil, . + +Executable ChatClient + Main-Is: ChatClient.hs + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Chat, . + +Executable ChatServer + Main-Is: ChatServer.hs + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Chat, . + +Executable Bomberman + Main-Is: Bomberman.hs + Build-Depends: base >=4 && <5, unix, process, network, haskell98, containers + Hs-Source-Dirs: Bomberman, . diff --git a/experiment/parse/fail/4.cabal b/experiment/parse/fail/4.cabal new file mode 100644 index 00000000000..dcebfc46148 --- /dev/null +++ b/experiment/parse/fail/4.cabal @@ -0,0 +1,18 @@ +Name: nat +Version: 0.1 +Description: Implementation of natural numbers and integers by a binary + representation. The implementation is supposed to be lazy and + reasonable efficient (in comparison to peano numbers). This + implementation is inspired by a similar approach in the functional + logic programming language Curry. +Synopsis: Lazy binary natural numbers +License: BSD3 +Author: Andres L�h, Frank Huch, Jan Christiansen +Maintainer: Jan Christiansen +Category: Data, Math +Build-Depends: base +Exposed-modules: Data.Number.Nat Data.Number.NatO Data.Number.Int +ghc-options: -Wall +build-type: Simple + +extra-source-files: Tests.hs diff --git a/experiment/parse/fail/5.cabal b/experiment/parse/fail/5.cabal new file mode 100644 index 00000000000..1c3859c667e --- /dev/null +++ b/experiment/parse/fail/5.cabal @@ -0,0 +1,79 @@ +name: phasechange +category: Data +version: 0.1 +author: Gábor Lehel +maintainer: Gábor Lehel +homepage: http://github.com/glehel/phasechange +copyright: Copyright (C) 2012 Gábor Lehel +license: BSD3 +license-file: LICENSE +stability: experimental +cabal-version: >= 1.10 +build-type: Simple +synopsis: Freezing, thawing, and copy elision +description: + This library provides a class for types which present the same underlying data in both an immutable (frozen) as well as a mutable (thawed) form, + and various functions to manipulate them. Some of the functions allow for copy elision. + . + Instances are provided for the array types from the @primitive@, @array@, and @vector@ packages, but this is mainly for completeness: there is + nothing these instances do which @vector@ doesn't already do better. The main purpose, rather, is to assist new types, for instance types whose implementation relies on destructive-update foreign imports, and cases when writing a full stream fusion framework isn't practical. + . + There are three modules: + . + [Data.PhaseChange] This module exports the class without its methods, together with functions which guarantee referential transparency + (provided that instances are well-behaved). This is the module you should normally import to work with PhaseChangeable data. + . + [Data.PhaseChange.Unsafe] This module exports functions which can break referential transparency if they are used improperly. Be careful. + . + [Data.PhaseChange.Impl] This module exports the class along with its methods. Import it if you want to define a new instance. + +source-repository head + type: git + location: git://github.com/glehel/phasechange.git + +library + default-language: + Haskell98 + + other-extensions: + CPP, + MagicHash, + Rank2Types, + TypeFamilies, + UnboxedTuples, + FlexibleContexts, + FlexibleInstances, + UndecidableInstances, + MultiParamTypeClasses + + impl(ghc >= 7.4): + other-extensions: + Trustworthy, + ConstraintKinds + + impl(ghc >= 7.6): + other-extensions: + Unsafe + + build-depends: + base >= 4.4 && < 4.6, + ghc-prim, + primitive == 0.4.*, +-- newtype == 0.2.*, + monad-st == 0.2.*, + array == 0.4.*, + vector == 0.9.* + + exposed-modules: + Data.PhaseChange + Data.PhaseChange.Unsafe + Data.PhaseChange.Impl + + other-modules: + Data.PhaseChange.Internal + Data.PhaseChange.Instances + + include-dirs: . + + ghc-options: + -Wall diff --git a/experiment/parse/fail/6.cabal b/experiment/parse/fail/6.cabal new file mode 100644 index 00000000000..01133e40448 --- /dev/null +++ b/experiment/parse/fail/6.cabal @@ -0,0 +1,56 @@ +Name: vacuum-opengl +Version: 0.0 +Synopsis: Visualize live Haskell data structures using vacuum, graphviz and OpenGL. +Description: Visualize live Haskell data structures using vacuum, graphviz and OpenGL. + Intended as an easier-to-build alternative (no large dependency chain) + to vacuum-cairo. Because of severe problems with GHCi+GLUT, it is + implemented using a client-server architecture. +License: PublicDomain +License-file: LICENSE +Author: Balazs Komuves +Maintainer: bkomuves (plus) hackage (at) gmail (dot) com +Homepage: http://code.haskell.org/~bkomuves/ +Stability: Experimental +Category: Development +Tested-With: GHC == 6.10.1 +Cabal-Version: >= 1.2 +Build-Type: Simple + +Flag base4 + Description: Base v4 + +Executable vacuum-opengl-server + if flag(base4) + Build-Depends: base >= 4 && < 5, directory, process, network + cpp-options: -DBASE_MAJOR_VERSION=4 + else + Build-Depends: base >= 3 && < 4, directory, process, network + cpp-options: -DBASE_MAJOR_VERSION=3 + + Build-Depends: stb-image >= 0.1.3, OpenGL >= 2.2, GLUT >= 2.1 + + Main-is: ServerMain.hs + Other-Modules: System.Vacuum.OpenGL.Server + + Hs-Source-Dirs: . + Extensions: CPP + cpp-options: -DVACUUM_OPENGL_DEFAULTPORT=55961 + ghc-options: -Wall -threaded + +Library + if flag(base4) + Build-Depends: base >= 4 && < 5, pretty, network + cpp-options: -DBASE_MAJOR_VERSION=4 + else + Build-Depends: base >= 3 && < 4, pretty, network + cpp-options: -DBASE_MAJOR_VERSION=3 + + Build-Depends: vacuum >= 0.0.90 + + Exposed-Modules: System.Vacuum.OpenGL.Client, + System.Vacuum.OpenGL + + Hs-Source-Dirs: . + Extensions: CPP + cpp-options: -DVACUUM_OPENGL_DEFAULTPORT=55961 + ghc-options: -Wall diff --git a/experiment/parse/fail/7.cabal b/experiment/parse/fail/7.cabal new file mode 100644 index 00000000000..631e3f42c28 --- /dev/null +++ b/experiment/parse/fail/7.cabal @@ -0,0 +1,56 @@ +Name: vacuum-opengl +Version: 0.0.1 +Synopsis: Visualize live Haskell data structures using vacuum, graphviz and OpenGL. +Description: Visualize live Haskell data structures using vacuum, graphviz and OpenGL. + Intended as an easier-to-build alternative (no large dependency chain) + to vacuum-cairo. Because of severe problems with GHCi+GLUT, it is + implemented using a client-server architecture. +License: PublicDomain +License-file: LICENSE +Author: Balazs Komuves +Maintainer: bkomuves (plus) hackage (at) gmail (dot) com +Homepage: http://code.haskell.org/~bkomuves/ +Stability: Experimental +Category: Development +Tested-With: GHC == 6.10.1 +Cabal-Version: >= 1.2 +Build-Type: Simple + +Flag base4 + Description: Base v4 + +Executable vacuum-opengl-server + if flag(base4) + Build-Depends: base >= 4 && < 5, directory, process, network + cpp-options: -DBASE_MAJOR_VERSION=4 + else + Build-Depends: base >= 3 && < 4, directory, process, network + cpp-options: -DBASE_MAJOR_VERSION=3 + + Build-Depends: stb-image >= 0.1.3, OpenGL >= 2.2, GLUT >= 2.1 + + Main-is: ServerMain.hs + Other-Modules: System.Vacuum.OpenGL.Server + + Hs-Source-Dirs: . + Extensions: CPP + cpp-options: -DVACUUM_OPENGL_DEFAULTPORT=55961 + ghc-options: -Wall -threaded + +Library + if flag(base4) + Build-Depends: base >= 4 && < 5, pretty, network + cpp-options: -DBASE_MAJOR_VERSION=4 + else + Build-Depends: base >= 3 && < 4, pretty, network + cpp-options: -DBASE_MAJOR_VERSION=3 + + Build-Depends: vacuum >= 0.0.90 + + Exposed-Modules: System.Vacuum.OpenGL.Client, + System.Vacuum.OpenGL + + Hs-Source-Dirs: . + Extensions: CPP + cpp-options: -DVACUUM_OPENGL_DEFAULTPORT=55961 + ghc-options: -Wall diff --git a/experiment/parse/fail/8.cabal b/experiment/parse/fail/8.cabal new file mode 100644 index 00000000000..0946b3ee7cd --- /dev/null +++ b/experiment/parse/fail/8.cabal @@ -0,0 +1,3452 @@ +Name: smartword +Synopsis: Web based flash card for Word Smart I and II vocabularies +Version: 0.0.0.5 +Homepage: http://kyagrd.dyndns.org/~kyagrd/project/smartword/ +Category: Web,Education +License: BSD3 +License-file: LICENSE +Author: Ahn, Ki Yung +Maintainer: Ahn, Ki Yung +Build-Type: Simple +Cabal-Version: >=1.2 +extra-source-files: README + +Description: + Web based online study tool for all vocabularies in Word Smart I and II, + a poular book series for studying GRE vocabularies. + (FYI, I typed the vocabulary data and wrote the program in 2004, + because I got too boring just going over the strange English words.) + If you don't read Korean, you can just ignore the Korean translation. + + Installation: + You can either compile CGI binaries with GHC + or use Hugs to run lhs as a CGI script. + Copy all .cgi files and data directories (book1, book1.ans, book2, book2.ans) + into your webserver CGI directory (usually cgi-bin). + + Usage: + If you get it wright the flash card goes away, + but if you didn't get it the flash card goes to the bottom of the deck again. + So, it won't end until you get all of them right. + +Data-files: + book1.ans/abash + book1.ans/abate + book1.ans/abdicate + book1.ans/aberration + book1.ans/abhor + book1.ans/abject + book1.ans/abnegate + book1.ans/abortive + book1.ans/abridge + book1.ans/absolute + book1.ans/absolve + book1.ans/abstinent + book1.ans/abstract + book1.ans/abstruse + book1.ans/abysmal + book1.ans/accolade + book1.ans/accost + book1.ans/acerbic + book1.ans/acquiesce + book1.ans/acrid + book1.ans/acrimonious + book1.ans/acumen + book1.ans/acute + book1.ans/adamant + book1.ans/address + book1.ans/adherent + book1.ans/admonish + book1.ans/adroit + book1.ans/adulation + book1.ans/adulterate + book1.ans/adverse + book1.ans/aesthetic + book1.ans/affable + book1.ans/affectation + book1.ans/affinity + book1.ans/affluent + book1.ans/agenda + book1.ans/aggregate + book1.ans/agnostic + book1.ans/agrarian + book1.ans/alacrity + book1.ans/allege + book1.ans/alleviate + book1.ans/allocate + book1.ans/alloy + book1.ans/allusion + book1.ans/aloof + book1.ans/altruism + book1.ans/ambience + book1.ans/ambiguous + book1.ans/ambivalent + book1.ans/ameliorate + book1.ans/amenable + book1.ans/amenity + book1.ans/amiable + book1.ans/amnesty + book1.ans/amoral + book1.ans/amorous + book1.ans/amorphous + book1.ans/anachronism + book1.ans/analogy + book1.ans/anarchy + book1.ans/anecdote + book1.ans/anguish + book1.ans/animosity + book1.ans/anomaly + book1.ans/antecedent + book1.ans/antipathy + book1.ans/antithesis + book1.ans/apartheid + book1.ans/apathy + book1.ans/aphorism + book1.ans/apocalypse + book1.ans/apocryphal + book1.ans/apotheosis + book1.ans/appease + book1.ans/appreciate + book1.ans/apprehensive + book1.ans/approbation + book1.ans/appropriate + book1.ans/aptitude + book1.ans/arbiter + book1.ans/arbitrary + book1.ans/arcane + book1.ans/archaic + book1.ans/archetype + book1.ans/ardent + book1.ans/arduous + book1.ans/aristocratic + book1.ans/artful + book1.ans/artifice + book1.ans/ascendancy + book1.ans/ascetic + book1.ans/assiduous + book1.ans/assimilate + book1.ans/assuage + book1.ans/astute + book1.ans/attrition + book1.ans/audacity + book1.ans/augment + book1.ans/auspicious + book1.ans/austere + book1.ans/autocratic + book1.ans/autonomous + book1.ans/avarice + book1.ans/avow + book1.ans/avuncular + book1.ans/awry + book1.ans/axiom + book1.ans/banal + book1.ans/bane + book1.ans/bastion + book1.ans/beget + book1.ans/belabor + book1.ans/beleaguer + book1.ans/belie + book1.ans/belittle + book1.ans/belligerent + book1.ans/bemused + book1.ans/benefactor + book1.ans/benevolent + book1.ans/benign + book1.ans/bequest + book1.ans/bereaved + book1.ans/beset + book1.ans/blasphemy + book1.ans/blatant + book1.ans/blight + book1.ans/blithe + book1.ans/bourgeois + book1.ans/bovine + book1.ans/brevity + book1.ans/broach + book1.ans/bucolic + book1.ans/bureaucracy + book1.ans/burgeon + book1.ans/burlesque + book1.ans/cacophony + book1.ans/cadence + book1.ans/cajole + book1.ans/callow + book1.ans/candor + book1.ans/capitalism + book1.ans/capitulate + book1.ans/capricious + book1.ans/caricature + book1.ans/castigate + book1.ans/catalyst + book1.ans/categorical + book1.ans/catharsis + book1.ans/catholic + book1.ans/caustic + book1.ans/celibacy + book1.ans/censure + book1.ans/cerebral + book1.ans/chagrin + book1.ans/charisma + book1.ans/charlatan + book1.ans/chasm + book1.ans/chastise + book1.ans/chicanery + book1.ans/chimera + book1.ans/choleric + book1.ans/chronic + book1.ans/chronicle + book1.ans/circuitous + book1.ans/circumlocution + book1.ans/circumscribe + book1.ans/circumspect + book1.ans/circumvent + book1.ans/civil + book1.ans/clemency + book1.ans/cliche + book1.ans/clique + book1.ans/coalesce + book1.ans/coerce + book1.ans/cogent + book1.ans/cognitive + book1.ans/cognizant + book1.ans/coherent + book1.ans/colloquial + book1.ans/collusion + book1.ans/commensurate + book1.ans/compelling + book1.ans/compendium + book1.ans/complacent + book1.ans/complement + book1.ans/complicity + book1.ans/comprehensive + book1.ans/comprise + book1.ans/conciliatory + book1.ans/concise + book1.ans/concord + book1.ans/concurrent + book1.ans/condescend + book1.ans/condone + book1.ans/conducive + book1.ans/confluence + book1.ans/congenial + book1.ans/congenital + book1.ans/conjecture + book1.ans/conjure + book1.ans/connoisseur + book1.ans/consecrate + book1.ans/consensus + book1.ans/consonant + book1.ans/construe + book1.ans/consummate + book1.ans/contentious + book1.ans/contiguous + book1.ans/contingent + book1.ans/contrite + book1.ans/contrived + book1.ans/conventional + book1.ans/convivial + book1.ans/copious + book1.ans/corollary + book1.ans/corroborate + book1.ans/cosmopolitan + book1.ans/countenance + book1.ans/coup + book1.ans/covenant + book1.ans/covert + book1.ans/covet + book1.ans/credulous + book1.ans/criterion + book1.ans/cryptic + book1.ans/culinary + book1.ans/culminate + book1.ans/culpable + book1.ans/cursory + book1.ans/curtail + book1.ans/cynic + book1.ans/daunt + book1.ans/dearth + book1.ans/debacle + book1.ans/debauchery + book1.ans/debilitate + book1.ans/decadent + book1.ans/decimate + book1.ans/decorous + book1.ans/deduce + book1.ans/defame + book1.ans/deference + book1.ans/definitive + book1.ans/degenerate + book1.ans/deleterious + book1.ans/delineate + book1.ans/delude + book1.ans/deluge + book1.ans/demagogue + book1.ans/denizen + book1.ans/depravity + book1.ans/deprecate + book1.ans/deride + book1.ans/derogatory + book1.ans/desiccate + book1.ans/despondent + book1.ans/despot + book1.ans/destitute + book1.ans/desultory + book1.ans/dialectical + book1.ans/dictum + book1.ans/didactic + book1.ans/diffident + book1.ans/digress + book1.ans/dilettante + book1.ans/discern + book1.ans/discreet + book1.ans/discrete + book1.ans/discriminate + book1.ans/disdain + book1.ans/disinterested + book1.ans/disparage + book1.ans/disparate + book1.ans/disseminate + book1.ans/dissipate + book1.ans/dissolution + book1.ans/distend + book1.ans/distinguish + book1.ans/docile + book1.ans/doctrinaire + book1.ans/dogmatic + book1.ans/domestic + book1.ans/dormant + book1.ans/dubious + book1.ans/duplicity + book1.ans/ebullient + book1.ans/eccentric + book1.ans/eclectic + book1.ans/edify + book1.ans/efface + book1.ans/effusion + book1.ans/egalitarian + book1.ans/egocentric + book1.ans/egregious + book1.ans/elicit + book1.ans/elliptical + book1.ans/elusive + book1.ans/emigrate + book1.ans/eminent + book1.ans/empirical + book1.ans/emulate + book1.ans/encroach + book1.ans/endemic + book1.ans/enervate + book1.ans/enfranchise + book1.ans/engender + book1.ans/enigma + book1.ans/enormity + book1.ans/ephemeral + book1.ans/epigram + book1.ans/epitome + book1.ans/equanimity + book1.ans/equitable + book1.ans/equivocal + book1.ans/erudite + book1.ans/esoteric + book1.ans/espouse + book1.ans/ethereal + book1.ans/euphemism + book1.ans/evanescent + book1.ans/exacerbate + book1.ans/exacting + book1.ans/exalt + book1.ans/exasperate + book1.ans/exemplify + book1.ans/exhaustive + book1.ans/exhort + book1.ans/exigency + book1.ans/existential + book1.ans/exonerate + book1.ans/expatriate + book1.ans/expedient + book1.ans/expedite + book1.ans/explicit + book1.ans/extol + book1.ans/extraneous + book1.ans/extrapolate + book1.ans/extricate + book1.ans/extrovert + book1.ans/exult + book1.ans/fabrication + book1.ans/facetious + book1.ans/facile + book1.ans/faction + book1.ans/farcical + book1.ans/fastidious + book1.ans/fatalist + book1.ans/fatuous + book1.ans/fauna + book1.ans/fecund + book1.ans/felicity + book1.ans/fervor + book1.ans/fetter + book1.ans/fidelity + book1.ans/figurative + book1.ans/finesse + book1.ans/flagrant + book1.ans/flaunt + book1.ans/flout + book1.ans/foible + book1.ans/foment + book1.ans/forbear + book1.ans/forgo + book1.ans/forsake + book1.ans/fortuitous + book1.ans/founder + book1.ans/fraternal + book1.ans/frenetic + book1.ans/frugal + book1.ans/furtive + book1.ans/futile + book1.ans/garrulous + book1.ans/genre + book1.ans/genteel + book1.ans/gesticulate + book1.ans/glut + book1.ans/grandiloquent + book1.ans/grandiose + book1.ans/gratuitous + book1.ans/gravity + book1.ans/gregarious + book1.ans/guile + book1.ans/hackneyed + book1.ans/hapless + book1.ans/harbinger + book1.ans/hedonism + book1.ans/hegemony + book1.ans/heresy + book1.ans/hermetic + book1.ans/heyday + book1.ans/hiatus + book1.ans/hierarchy + book1.ans/histrionic + book1.ans/homily + book1.ans/homogeneous + book1.ans/husbandry + book1.ans/hyperbole + book1.ans/hypothetical + book1.ans/iconoclast + book1.ans/ideology + book1.ans/idiosyncrasy + book1.ans/idyllic + book1.ans/ignominy + book1.ans/illicit + book1.ans/imminent + book1.ans/immutable + book1.ans/impartial + book1.ans/impeccable + book1.ans/imperial + book1.ans/impervious + book1.ans/impetuous + book1.ans/implement + book1.ans/impotent + book1.ans/impugn + book1.ans/inane + book1.ans/inaugurate + book1.ans/incandescent + book1.ans/incantation + book1.ans/incense + book1.ans/incessant + book1.ans/incipient + book1.ans/incisive + book1.ans/incongruous + book1.ans/incorrigible + book1.ans/increment + book1.ans/indifferent + book1.ans/indigenous + book1.ans/indigent + book1.ans/indignant + book1.ans/indolent + book1.ans/indulgent + book1.ans/ineffable + book1.ans/inept + book1.ans/inert + book1.ans/inexorable + book1.ans/infamous + book1.ans/infatuated + book1.ans/infer + book1.ans/infinitesimal + book1.ans/ingenuous + book1.ans/inherent + book1.ans/injunction + book1.ans/innate + book1.ans/innocuous + book1.ans/inordinate + book1.ans/insatiable + book1.ans/insidious + book1.ans/insinuate + book1.ans/insipid + book1.ans/insolent + book1.ans/instigate + book1.ans/insular + book1.ans/insurgent + book1.ans/integral + book1.ans/intractable + book1.ans/intransigent + book1.ans/intrinsic + book1.ans/introspective + book1.ans/inundate + book1.ans/invective + book1.ans/inveterate + book1.ans/irascible + book1.ans/ironic + book1.ans/irrevocable + book1.ans/itinerant + book1.ans/judicious + book1.ans/juxtapose + book1.ans/kinetic + book1.ans/labyrinth + book1.ans/laconic + book1.ans/lament + book1.ans/lampoon + book1.ans/languish + book1.ans/largess + book1.ans/latent + book1.ans/laud + book1.ans/legacy + book1.ans/lethargy + book1.ans/levity + book1.ans/libel + book1.ans/litigate + book1.ans/loquacious + book1.ans/lucid + book1.ans/lugubrious + book1.ans/luminous + book1.ans/machination + book1.ans/magnanimous + book1.ans/magnate + book1.ans/malaise + book1.ans/malfeasance + book1.ans/malinger + book1.ans/malleable + book1.ans/mandate + book1.ans/manifest + book1.ans/manifesto + book1.ans/marshal + book1.ans/martial + book1.ans/martyr + book1.ans/matriculate + book1.ans/maudlin + book1.ans/maverick + book1.ans/maxim + book1.ans/mediate + book1.ans/mellifluous + book1.ans/mendacious + book1.ans/mendicant + book1.ans/mentor + book1.ans/mercenary + book1.ans/mercurial + book1.ans/metamorphosis + book1.ans/microcosm + book1.ans/milieu + book1.ans/minuscule + book1.ans/misanthropic + book1.ans/mitigate + book1.ans/mollify + book1.ans/monolithic + book1.ans/moribund + book1.ans/morose + book1.ans/mortify + book1.ans/mundane + book1.ans/munificent + book1.ans/myopia + book1.ans/myriad + book1.ans/narcissism + book1.ans/nebulous + book1.ans/nefarious + book1.ans/neologism + book1.ans/nepotism + book1.ans/nihilism + book1.ans/nominal + book1.ans/nostalgia + book1.ans/notorious + book1.ans/novel + book1.ans/noxious + book1.ans/nuance + book1.ans/obdurate + book1.ans/obfuscate + book1.ans/oblique + book1.ans/oblivion + book1.ans/obscure + book1.ans/obsequious + book1.ans/obtuse + book1.ans/officious + book1.ans/onerous + book1.ans/opaque + book1.ans/opulent + book1.ans/orthodox + book1.ans/ostensible + book1.ans/ostentatious + book1.ans/pacify + book1.ans/painstaking + book1.ans/palliate + book1.ans/palpable + book1.ans/paltry + book1.ans/panacea + book1.ans/paradigm + book1.ans/paradox + book1.ans/parochial + book1.ans/parody + book1.ans/parsimonious + book1.ans/partisan + book1.ans/patent + book1.ans/paternal + book1.ans/pathology + book1.ans/patriarch + book1.ans/patrician + book1.ans/patronize + book1.ans/paucity + book1.ans/peccadillo + book1.ans/pedantic + book1.ans/pedestrian + book1.ans/pejorative + book1.ans/penchant + book1.ans/penitent + book1.ans/pensive + book1.ans/peremptory + book1.ans/perennial + book1.ans/perfidy + book1.ans/perfunctory + book1.ans/peripatetic + book1.ans/periphery + book1.ans/perjury + book1.ans/permeate + book1.ans/pernicious + book1.ans/perquisite + book1.ans/pertinent + book1.ans/perturb + book1.ans/peruse + book1.ans/pervade + book1.ans/petulant + book1.ans/philanthropy + book1.ans/philistine + book1.ans/pious + book1.ans/pivotal + book1.ans/placate + book1.ans/plaintive + book1.ans/platitude + book1.ans/plebeian + book1.ans/plethora + book1.ans/poignant + book1.ans/polarize + book1.ans/polemic + book1.ans/ponderous + book1.ans/portent + book1.ans/postulate + book1.ans/pragmatic + book1.ans/precedent + book1.ans/precept + book1.ans/precipitate + book1.ans/precipitous + book1.ans/preclude + book1.ans/precursor + book1.ans/predilection + book1.ans/preeminent + book1.ans/preempt + book1.ans/premise + book1.ans/prepossess + book1.ans/prerogative + book1.ans/prevail + book1.ans/pristine + book1.ans/prodigal + book1.ans/prodigious + book1.ans/prodigy + book1.ans/profane + book1.ans/profess + book1.ans/proficient + book1.ans/profligate + book1.ans/profound + book1.ans/profuse + book1.ans/proletariat + book1.ans/proliferate + book1.ans/prolific + book1.ans/promulgate + book1.ans/propensity + book1.ans/propitious + book1.ans/proponent + book1.ans/proprietary + book1.ans/propriety + book1.ans/prosaic + book1.ans/proscribe + book1.ans/proselytize + book1.ans/protagonist + book1.ans/protract + book1.ans/provident + book1.ans/provincial + book1.ans/provisional + book1.ans/proximity + book1.ans/prudent + book1.ans/purported + book1.ans/putative + book1.ans/qualify + book1.ans/qualitative + book1.ans/querulous + book1.ans/quixotic + book1.ans/ramification + book1.ans/rancor + book1.ans/rapacious + book1.ans/rebuke + book1.ans/rebut + book1.ans/recalcitrant + book1.ans/recant + book1.ans/reciprocal + book1.ans/reclusive + book1.ans/recondite + book1.ans/recrimination + book1.ans/redolent + book1.ans/redundant + book1.ans/refute + book1.ans/reiterate + book1.ans/relegate + book1.ans/relentless + book1.ans/relinquish + book1.ans/remonstrate + book1.ans/renaissance + book1.ans/renounce + book1.ans/reparation + book1.ans/repercussion + book1.ans/replenish + book1.ans/replete + book1.ans/reprehensible + book1.ans/reprisal + book1.ans/reproach + book1.ans/reprove + book1.ans/repudiate + book1.ans/requisite + book1.ans/resolute + book1.ans/respite + book1.ans/reticent + book1.ans/revere + book1.ans/rhetoric + book1.ans/rigorous + book1.ans/robust + book1.ans/rogue + book1.ans/rudimentary + book1.ans/ruminate + book1.ans/rustic + book1.ans/saccharine + book1.ans/sacrilege + book1.ans/sacrosanct + book1.ans/sagacious + book1.ans/salient + book1.ans/salutary + book1.ans/sanctimonious + book1.ans/sanguine + book1.ans/scintillate + book1.ans/scrupulous + book1.ans/scrutinize + book1.ans/secular + book1.ans/sedition + book1.ans/sensory + book1.ans/sentient + book1.ans/sequester + book1.ans/serendipity + book1.ans/servile + book1.ans/singular + book1.ans/slander + book1.ans/sloth + book1.ans/sobriety + book1.ans/solicitous + book1.ans/solvent + book1.ans/soporific + book1.ans/sordid + book1.ans/spawn + book1.ans/specious + book1.ans/sporadic + book1.ans/spurious + book1.ans/squalor + book1.ans/squander + book1.ans/stagnation + book1.ans/static + book1.ans/staunch + book1.ans/steadfast + book1.ans/stigmatize + book1.ans/stipulate + book1.ans/stoic + book1.ans/stratum + book1.ans/stricture + book1.ans/strife + book1.ans/stringent + book1.ans/stymie + book1.ans/subjugate + book1.ans/sublime + book1.ans/subordinate + book1.ans/substantive + book1.ans/subtle + book1.ans/subversive + book1.ans/succinct + book1.ans/succumb + book1.ans/supercilious + book1.ans/superficial + book1.ans/superfluous + book1.ans/surfeit + book1.ans/surreptitious + book1.ans/surrogate + book1.ans/sycophant + book1.ans/synthesis + book1.ans/tacit + book1.ans/taciturn + book1.ans/tangential + book1.ans/tangible + book1.ans/tantamount + book1.ans/tautological + book1.ans/temerity + book1.ans/temperate + book1.ans/tenable + book1.ans/tenacious + book1.ans/tenet + book1.ans/tentative + book1.ans/tenuous + book1.ans/terse + book1.ans/theology + book1.ans/tirade + book1.ans/torpor + book1.ans/touchstone + book1.ans/tout + book1.ans/transcend + book1.ans/transgress + book1.ans/transient + book1.ans/trepidation + book1.ans/turpitude + book1.ans/ubiquitous + book1.ans/unconscionable + book1.ans/unctuous + book1.ans/uniform + book1.ans/unremitting + book1.ans/unwitting + book1.ans/urbane + book1.ans/usurp + book1.ans/utilitarian + book1.ans/utopia + book1.ans/vacillate + book1.ans/vapid + book1.ans/vehement + book1.ans/venal + book1.ans/venerate + book1.ans/veracity + book1.ans/verbose + book1.ans/verisimilitude + book1.ans/vernacular + book1.ans/vestige + book1.ans/vex + book1.ans/viable + book1.ans/vicarious + book1.ans/vicissitude + book1.ans/vilify + book1.ans/vindicate + book1.ans/vindictive + book1.ans/virtuoso + book1.ans/virulent + book1.ans/visionary + book1.ans/vitiate + book1.ans/vitriolic + book1.ans/vocation + book1.ans/vociferous + book1.ans/volatile + book1.ans/volition + book1.ans/wanton + book1.ans/willful + book1.ans/wistful + book1.ans/zealous + book1/.empty + book1/.A.list + book1/.B.list + book1/.C.list + book1/.D.list + book1/.E.list + book1/.F.list + book1/.G.list + book1/.H.list + book1/.I.list + book1/.J.list + book1/.K.list + book1/.L.list + book1/.M.list + book1/.N.list + book1/.O.list + book1/.P.list + book1/.Q.list + book1/.R.list + book1/.S.list + book1/.T.list + book1/.U.list + book1/.V.list + book1/.W.list + book1/.X.list + book1/.Y.list + book1/.Z.list + book1/abash + book1/abate + book1/abdicate + book1/aberration + book1/abhor + book1/abject + book1/abnegate + book1/abortive + book1/abridge + book1/absolute + book1/absolve + book1/abstinent + book1/abstract + book1/abstruse + book1/abysmal + book1/accolade + book1/accost + book1/acerbic + book1/acquiesce + book1/acrid + book1/acrimonious + book1/acumen + book1/acute + book1/adamant + book1/address + book1/adherent + book1/admonish + book1/adroit + book1/adulation + book1/adulterate + book1/adverse + book1/aesthetic + book1/affable + book1/affectation + book1/affinity + book1/affluent + book1/agenda + book1/aggregate + book1/agnostic + book1/agrarian + book1/alacrity + book1/allege + book1/alleviate + book1/allocate + book1/alloy + book1/allusion + book1/aloof + book1/altruism + book1/ambience + book1/ambiguous + book1/ambivalent + book1/ameliorate + book1/amenable + book1/amenity + book1/amiable + book1/amnesty + book1/amoral + book1/amorous + book1/amorphous + book1/anachronism + book1/analogy + book1/anarchy + book1/anecdote + book1/anguish + book1/animosity + book1/anomaly + book1/antecedent + book1/antipathy + book1/antithesis + book1/apartheid + book1/apathy + book1/aphorism + book1/apocalypse + book1/apocryphal + book1/apotheosis + book1/appease + book1/appreciate + book1/apprehensive + book1/approbation + book1/appropriate + book1/aptitude + book1/arbiter + book1/arbitrary + book1/arcane + book1/archaic + book1/archetype + book1/ardent + book1/arduous + book1/aristocratic + book1/artful + book1/artifice + book1/ascendancy + book1/ascetic + book1/assiduous + book1/assimilate + book1/assuage + book1/astute + book1/attrition + book1/audacity + book1/augment + book1/auspicious + book1/austere + book1/autocratic + book1/autonomous + book1/avarice + book1/avow + book1/avuncular + book1/awry + book1/axiom + book1/banal + book1/bane + book1/bastion + book1/beget + book1/belabor + book1/beleaguer + book1/belie + book1/belittle + book1/belligerent + book1/bemused + book1/benefactor + book1/benevolent + book1/benign + book1/bequest + book1/bereaved + book1/beset + book1/blasphemy + book1/blatant + book1/blight + book1/blithe + book1/bourgeois + book1/bovine + book1/brevity + book1/broach + book1/bucolic + book1/bureaucracy + book1/burgeon + book1/burlesque + book1/cacophony + book1/cadence + book1/cajole + book1/callow + book1/candor + book1/capitalism + book1/capitulate + book1/capricious + book1/caricature + book1/castigate + book1/catalyst + book1/categorical + book1/catharsis + book1/catholic + book1/caustic + book1/celibacy + book1/censure + book1/cerebral + book1/chagrin + book1/charisma + book1/charlatan + book1/chasm + book1/chastise + book1/chicanery + book1/chimera + book1/choleric + book1/chronic + book1/chronicle + book1/circuitous + book1/circumlocution + book1/circumscribe + book1/circumspect + book1/circumvent + book1/civil + book1/clemency + book1/cliche + book1/clique + book1/coalesce + book1/coerce + book1/cogent + book1/cognitive + book1/cognizant + book1/coherent + book1/colloquial + book1/collusion + book1/commensurate + book1/compelling + book1/compendium + book1/complacent + book1/complement + book1/complicity + book1/comprehensive + book1/comprise + book1/conciliatory + book1/concise + book1/concord + book1/concurrent + book1/condescend + book1/condone + book1/conducive + book1/confluence + book1/congenial + book1/congenital + book1/conjecture + book1/conjure + book1/connoisseur + book1/consecrate + book1/consensus + book1/consonant + book1/construe + book1/consummate + book1/contentious + book1/contiguous + book1/contingent + book1/contrite + book1/contrived + book1/conventional + book1/convivial + book1/copious + book1/corollary + book1/corroborate + book1/cosmopolitan + book1/countenance + book1/coup + book1/covenant + book1/covert + book1/covet + book1/credulous + book1/criterion + book1/cryptic + book1/culinary + book1/culminate + book1/culpable + book1/cursory + book1/curtail + book1/cynic + book1/daunt + book1/dearth + book1/debacle + book1/debauchery + book1/debilitate + book1/decadent + book1/decimate + book1/decorous + book1/deduce + book1/defame + book1/deference + book1/definitive + book1/degenerate + book1/deleterious + book1/delineate + book1/delude + book1/deluge + book1/demagogue + book1/denizen + book1/depravity + book1/deprecate + book1/deride + book1/derogatory + book1/desiccate + book1/despondent + book1/despot + book1/destitute + book1/desultory + book1/dialectical + book1/dictum + book1/didactic + book1/diffident + book1/digress + book1/dilettante + book1/discern + book1/discreet + book1/discrete + book1/discriminate + book1/disdain + book1/disinterested + book1/disparage + book1/disparate + book1/disseminate + book1/dissipate + book1/dissolution + book1/distend + book1/distinguish + book1/docile + book1/doctrinaire + book1/dogmatic + book1/domestic + book1/dormant + book1/dubious + book1/duplicity + book1/ebullient + book1/eccentric + book1/eclectic + book1/edify + book1/efface + book1/effusion + book1/egalitarian + book1/egocentric + book1/egregious + book1/elicit + book1/elliptical + book1/elusive + book1/emigrate + book1/eminent + book1/empirical + book1/emulate + book1/encroach + book1/endemic + book1/enervate + book1/enfranchise + book1/engender + book1/enigma + book1/enormity + book1/ephemeral + book1/epigram + book1/epitome + book1/equanimity + book1/equitable + book1/equivocal + book1/erudite + book1/esoteric + book1/espouse + book1/ethereal + book1/euphemism + book1/evanescent + book1/exacerbate + book1/exacting + book1/exalt + book1/exasperate + book1/exemplify + book1/exhaustive + book1/exhort + book1/exigency + book1/existential + book1/exonerate + book1/expatriate + book1/expedient + book1/expedite + book1/explicit + book1/extol + book1/extraneous + book1/extrapolate + book1/extricate + book1/extrovert + book1/exult + book1/fabrication + book1/facetious + book1/facile + book1/faction + book1/farcical + book1/fastidious + book1/fatalist + book1/fatuous + book1/fauna + book1/fecund + book1/felicity + book1/fervor + book1/fetter + book1/fidelity + book1/figurative + book1/finesse + book1/flagrant + book1/flaunt + book1/flout + book1/foible + book1/foment + book1/forbear + book1/forgo + book1/forsake + book1/fortuitous + book1/founder + book1/fraternal + book1/frenetic + book1/frugal + book1/furtive + book1/futile + book1/garrulous + book1/genre + book1/genteel + book1/gesticulate + book1/glut + book1/grandiloquent + book1/grandiose + book1/gratuitous + book1/gravity + book1/gregarious + book1/guile + book1/hackneyed + book1/hapless + book1/harbinger + book1/hedonism + book1/hegemony + book1/heresy + book1/hermetic + book1/heyday + book1/hiatus + book1/hierarchy + book1/histrionic + book1/homily + book1/homogeneous + book1/husbandry + book1/hyperbole + book1/hypothetical + book1/iconoclast + book1/ideology + book1/idiosyncrasy + book1/idyllic + book1/ignominy + book1/illicit + book1/imminent + book1/immutable + book1/impartial + book1/impeccable + book1/imperial + book1/impervious + book1/impetuous + book1/implement + book1/impotent + book1/impugn + book1/inane + book1/inaugurate + book1/incandescent + book1/incantation + book1/incense + book1/incessant + book1/incipient + book1/incisive + book1/incongruous + book1/incorrigible + book1/increment + book1/indifferent + book1/indigenous + book1/indigent + book1/indignant + book1/indolent + book1/indulgent + book1/ineffable + book1/inept + book1/inert + book1/inexorable + book1/infamous + book1/infatuated + book1/infer + book1/infinitesimal + book1/ingenuous + book1/inherent + book1/injunction + book1/innate + book1/innocuous + book1/inordinate + book1/insatiable + book1/insidious + book1/insinuate + book1/insipid + book1/insolent + book1/instigate + book1/insular + book1/insurgent + book1/integral + book1/intractable + book1/intransigent + book1/intrinsic + book1/introspective + book1/inundate + book1/invective + book1/inveterate + book1/irascible + book1/ironic + book1/irrevocable + book1/itinerant + book1/judicious + book1/juxtapose + book1/kinetic + book1/labyrinth + book1/laconic + book1/lament + book1/lampoon + book1/languish + book1/largess + book1/latent + book1/laud + book1/legacy + book1/lethargy + book1/levity + book1/libel + book1/litigate + book1/loquacious + book1/lucid + book1/lugubrious + book1/luminous + book1/machination + book1/magnanimous + book1/magnate + book1/malaise + book1/malfeasance + book1/malinger + book1/malleable + book1/mandate + book1/manifest + book1/manifesto + book1/marshal + book1/martial + book1/martyr + book1/matriculate + book1/maudlin + book1/maverick + book1/maxim + book1/mediate + book1/mellifluous + book1/mendacious + book1/mendicant + book1/mentor + book1/mercenary + book1/mercurial + book1/metamorphosis + book1/microcosm + book1/milieu + book1/minuscule + book1/misanthropic + book1/mitigate + book1/mollify + book1/monolithic + book1/moribund + book1/morose + book1/mortify + book1/mundane + book1/munificent + book1/myopia + book1/myriad + book1/narcissism + book1/nebulous + book1/nefarious + book1/neologism + book1/nepotism + book1/nihilism + book1/nominal + book1/nostalgia + book1/notorious + book1/novel + book1/noxious + book1/nuance + book1/obdurate + book1/obfuscate + book1/oblique + book1/oblivion + book1/obscure + book1/obsequious + book1/obtuse + book1/officious + book1/onerous + book1/opaque + book1/opulent + book1/orthodox + book1/ostensible + book1/ostentatious + book1/pacify + book1/painstaking + book1/palliate + book1/palpable + book1/paltry + book1/panacea + book1/paradigm + book1/paradox + book1/parochial + book1/parody + book1/parsimonious + book1/partisan + book1/patent + book1/paternal + book1/pathology + book1/patriarch + book1/patrician + book1/patronize + book1/paucity + book1/peccadillo + book1/pedantic + book1/pedestrian + book1/pejorative + book1/penchant + book1/penitent + book1/pensive + book1/peremptory + book1/perennial + book1/perfidy + book1/perfunctory + book1/peripatetic + book1/periphery + book1/perjury + book1/permeate + book1/pernicious + book1/perquisite + book1/pertinent + book1/perturb + book1/peruse + book1/pervade + book1/petulant + book1/philanthropy + book1/philistine + book1/pious + book1/pivotal + book1/placate + book1/plaintive + book1/platitude + book1/plebeian + book1/plethora + book1/poignant + book1/polarize + book1/polemic + book1/ponderous + book1/portent + book1/postulate + book1/pragmatic + book1/precedent + book1/precept + book1/precipitate + book1/precipitous + book1/preclude + book1/precursor + book1/predilection + book1/preeminent + book1/preempt + book1/premise + book1/prepossess + book1/prerogative + book1/prevail + book1/pristine + book1/prodigal + book1/prodigious + book1/prodigy + book1/profane + book1/profess + book1/proficient + book1/profligate + book1/profound + book1/profuse + book1/proletariat + book1/proliferate + book1/prolific + book1/promulgate + book1/propensity + book1/propitious + book1/proponent + book1/proprietary + book1/propriety + book1/prosaic + book1/proscribe + book1/proselytize + book1/protagonist + book1/protract + book1/provident + book1/provincial + book1/provisional + book1/proximity + book1/prudent + book1/purported + book1/putative + book1/qualify + book1/qualitative + book1/querulous + book1/quixotic + book1/ramification + book1/rancor + book1/rapacious + book1/rebuke + book1/rebut + book1/recalcitrant + book1/recant + book1/reciprocal + book1/reclusive + book1/recondite + book1/recrimination + book1/redolent + book1/redundant + book1/refute + book1/reiterate + book1/relegate + book1/relentless + book1/relinquish + book1/remonstrate + book1/renaissance + book1/renounce + book1/reparation + book1/repercussion + book1/replenish + book1/replete + book1/reprehensible + book1/reprisal + book1/reproach + book1/reprove + book1/repudiate + book1/requisite + book1/resolute + book1/respite + book1/reticent + book1/revere + book1/rhetoric + book1/rigorous + book1/robust + book1/rogue + book1/rudimentary + book1/ruminate + book1/rustic + book1/saccharine + book1/sacrilege + book1/sacrosanct + book1/sagacious + book1/salient + book1/salutary + book1/sanctimonious + book1/sanguine + book1/scintillate + book1/scrupulous + book1/scrutinize + book1/secular + book1/sedition + book1/sensory + book1/sentient + book1/sequester + book1/serendipity + book1/servile + book1/singular + book1/slander + book1/sloth + book1/sobriety + book1/solicitous + book1/solvent + book1/soporific + book1/sordid + book1/spawn + book1/specious + book1/sporadic + book1/spurious + book1/squalor + book1/squander + book1/stagnation + book1/static + book1/staunch + book1/steadfast + book1/stigmatize + book1/stipulate + book1/stoic + book1/stratum + book1/stricture + book1/strife + book1/stringent + book1/stymie + book1/subjugate + book1/sublime + book1/subordinate + book1/substantive + book1/subtle + book1/subversive + book1/succinct + book1/succumb + book1/supercilious + book1/superficial + book1/superfluous + book1/surfeit + book1/surreptitious + book1/surrogate + book1/sycophant + book1/synthesis + book1/tacit + book1/taciturn + book1/tangential + book1/tangible + book1/tantamount + book1/tautological + book1/temerity + book1/temperate + book1/tenable + book1/tenacious + book1/tenet + book1/tentative + book1/tenuous + book1/terse + book1/theology + book1/tirade + book1/torpor + book1/touchstone + book1/tout + book1/transcend + book1/transgress + book1/transient + book1/trepidation + book1/turpitude + book1/ubiquitous + book1/unconscionable + book1/unctuous + book1/uniform + book1/unremitting + book1/unwitting + book1/urbane + book1/usurp + book1/utilitarian + book1/utopia + book1/vacillate + book1/vapid + book1/vehement + book1/venal + book1/venerate + book1/veracity + book1/verbose + book1/verisimilitude + book1/vernacular + book1/vestige + book1/vex + book1/viable + book1/vicarious + book1/vicissitude + book1/vilify + book1/vindicate + book1/vindictive + book1/virtuoso + book1/virulent + book1/visionary + book1/vitiate + book1/vitriolic + book1/vocation + book1/vociferous + book1/volatile + book1/volition + book1/wanton + book1/willful + book1/wistful + book1/zealous + book2.ans/abase + book2.ans/abet + book2.ans/abeyance + book2.ans/abjure + book2.ans/abomination + book2.ans/aboriginal + book2.ans/abound + book2.ans/abrogate + book2.ans/accede + book2.ans/accentuate + book2.ans/access + book2.ans/acclaim + book2.ans/accord + book2.ans/accouterments + book2.ans/accrue + book2.ans/acquisitive + book2.ans/acquit + book2.ans/acronym + book2.ans/ad-lib + book2.ans/adage + book2.ans/adduce + book2.ans/adjourn + book2.ans/adjunct + book2.ans/advent + book2.ans/adventitious + book2.ans/advocate + book2.ans/affidavit + book2.ans/affiliate + book2.ans/affliction + book2.ans/afford + book2.ans/affront + book2.ans/aftermath + book2.ans/aggrandize + book2.ans/aggrieve + book2.ans/aghast + book2.ans/alchemy + book2.ans/alienate + book2.ans/allegiance + book2.ans/allegory + book2.ans/allot + book2.ans/altercation + book2.ans/amass + book2.ans/amid + book2.ans/anathema + book2.ans/ancillary + book2.ans/angst + book2.ans/annex + book2.ans/annuity + book2.ans/antedate + book2.ans/anterior + book2.ans/anthology + book2.ans/anthropomorphic + book2.ans/antipodal + book2.ans/antiquity + book2.ans/aperture + book2.ans/apex + book2.ans/apogee + book2.ans/apoplexy + book2.ans/apostasy + book2.ans/appalling + book2.ans/apparition + book2.ans/appellation + book2.ans/appendage + book2.ans/apportion + book2.ans/apposite + book2.ans/appraise + book2.ans/apprise + book2.ans/appurtenance + book2.ans/apropos + book2.ans/apt + book2.ans/arcade + book2.ans/archipelago + book2.ans/archives + book2.ans/arid + book2.ans/armament + book2.ans/armistice + book2.ans/arraign + book2.ans/arrant + book2.ans/arrears + book2.ans/arsenal + book2.ans/articulate + book2.ans/artisan + book2.ans/ascertain + book2.ans/ascribe + book2.ans/askance + book2.ans/aspersion + book2.ans/assail + book2.ans/assert + book2.ans/assess + book2.ans/astringent + book2.ans/asylum + book2.ans/atone + book2.ans/atrophy + book2.ans/attest + book2.ans/attribute + book2.ans/augur + book2.ans/august + book2.ans/auspices + book2.ans/auxiliary + book2.ans/avail + book2.ans/avant-garde + book2.ans/aversion + book2.ans/avert + book2.ans/avid + book2.ans/bacchanal + book2.ans/baleful + book2.ans/balk + book2.ans/ballyhoo + book2.ans/balm + book2.ans/bandy + book2.ans/banter + book2.ans/baroque + book2.ans/barrage + book2.ans/bauble + book2.ans/bedlam + book2.ans/begrudge + book2.ans/behest + book2.ans/bemoan + book2.ans/benediction + book2.ans/benighted + book2.ans/bestow + book2.ans/bilious + book2.ans/bivouac + book2.ans/blanch + book2.ans/bland + book2.ans/blandishment + book2.ans/bliss + book2.ans/bluster + book2.ans/bombast + "book2.ans/bon vivant" + "book2.ans/bona fide" + book2.ans/boon + book2.ans/boor + book2.ans/booty + book2.ans/botch + book2.ans/bracing + book2.ans/brandish + book2.ans/bravado + book2.ans/brawn + book2.ans/brazen + book2.ans/breach + book2.ans/brink + book2.ans/bristle + book2.ans/bromide + book2.ans/brouhaha + book2.ans/brusque + book2.ans/buffoon + book2.ans/bulwark + book2.ans/byzantine + book2.ans/cabal + book2.ans/cache + book2.ans/calamity + book2.ans/callous + book2.ans/calumny + book2.ans/canon + book2.ans/cant + book2.ans/canvass + book2.ans/capacious + book2.ans/capital + book2.ans/captivate + book2.ans/carcinogenic + book2.ans/cardinal + book2.ans/careen + book2.ans/cartography + book2.ans/cascade + book2.ans/cataclysm + book2.ans/caucus + book2.ans/cavalier + book2.ans/cavil + book2.ans/chaff + book2.ans/chameleon + book2.ans/champion + book2.ans/channel + book2.ans/chaste + book2.ans/cherub + book2.ans/chortle + book2.ans/churl + book2.ans/chutzpah + book2.ans/cipher + book2.ans/circumnavigate + book2.ans/citadel + book2.ans/clandestine + book2.ans/classic + book2.ans/cleave + book2.ans/climatic + book2.ans/cloister + book2.ans/clone + book2.ans/clout + book2.ans/cloy + book2.ans/coddle + book2.ans/cogitate + book2.ans/cohort + book2.ans/commemorate + book2.ans/commiserate + book2.ans/commodious + book2.ans/compatible + book2.ans/competent + book2.ans/compile + book2.ans/comply + book2.ans/composed + book2.ans/compromise + book2.ans/compunction + book2.ans/concave + book2.ans/concede + book2.ans/concentric + book2.ans/concert + book2.ans/concoct + book2.ans/concomitant + book2.ans/confederate + book2.ans/confer + book2.ans/confidant + book2.ans/configuration + book2.ans/conflagration + book2.ans/confluence + book2.ans/confound + book2.ans/congeal + book2.ans/conjugal + book2.ans/connive + book2.ans/conservatory + book2.ans/consign + book2.ans/consolidate + book2.ans/conspicuous + book2.ans/consternation + book2.ans/constituency + book2.ans/contempt + book2.ans/continuum + book2.ans/contraband + book2.ans/contretemps + book2.ans/contumely + book2.ans/conundrum + book2.ans/convene + book2.ans/conversant + book2.ans/converse + book2.ans/convey + book2.ans/conviction + book2.ans/convolution + book2.ans/copious + book2.ans/cordial + book2.ans/corollary + book2.ans/corporeal + book2.ans/correlation + book2.ans/corrosive + book2.ans/corrugated + book2.ans/coterie + book2.ans/cower + book2.ans/crass + book2.ans/craven + book2.ans/crescendo + book2.ans/crestfallen + book2.ans/crevice + book2.ans/cringe + book2.ans/critique + book2.ans/crux + book2.ans/cuisine + book2.ans/cull + book2.ans/curb + book2.ans/curmudgeon + book2.ans/cursory + book2.ans/debase + book2.ans/debunk + book2.ans/decree + book2.ans/decry + book2.ans/deem + book2.ans/deficit + book2.ans/defile + book2.ans/deft + book2.ans/defunct + book2.ans/degrade + book2.ans/deign + book2.ans/deity + book2.ans/dejected + book2.ans/delectable + book2.ans/delinquent + book2.ans/delve + book2.ans/demeanor + book2.ans/demise + book2.ans/demography + book2.ans/demur + book2.ans/demure + book2.ans/denomination + book2.ans/denote + book2.ans/denounce + book2.ans/depict + book2.ans/deplete + book2.ans/deplore + book2.ans/deploy + book2.ans/depose + book2.ans/depredate + book2.ans/derelict + book2.ans/desist + book2.ans/devout + book2.ans/diatribe + book2.ans/dichotomy + book2.ans/diffuse + book2.ans/dilapidate + book2.ans/dilate + book2.ans/dilemma + book2.ans/diminution + book2.ans/dire + book2.ans/dirge + book2.ans/disaffect + book2.ans/disarray + book2.ans/disclaim + book2.ans/discomfit + book2.ans/disconcert + book2.ans/discourse + book2.ans/discrepancy + book2.ans/discursive + book2.ans/disgruntle + book2.ans/disinformation + book2.ans/dismal + book2.ans/dismay + book2.ans/dispassionate + book2.ans/disperse + book2.ans/dispirit + book2.ans/disposition + book2.ans/disproportionate + book2.ans/disquiet + book2.ans/dissemble + book2.ans/dissent + book2.ans/disservice + book2.ans/dissident + book2.ans/dissuade + book2.ans/distinct + book2.ans/diurnal + book2.ans/divine + book2.ans/divulge + book2.ans/document + book2.ans/doldrums + book2.ans/doleful + book2.ans/dolt + book2.ans/dotage + "book2.ans/double entendre" + book2.ans/dour + book2.ans/downcast + book2.ans/downplay + book2.ans/draconian + book2.ans/droll + book2.ans/dross + book2.ans/duress + book2.ans/ebb + book2.ans/ecclesiastical + book2.ans/eclipse + book2.ans/ecosystem + book2.ans/edict + book2.ans/edifice + book2.ans/effectual + book2.ans/efficacy + book2.ans/effigy + book2.ans/elation + book2.ans/electorate + book2.ans/elegy + book2.ans/elite + book2.ans/elocution + book2.ans/emaciate + book2.ans/emanate + book2.ans/emancipate + book2.ans/embargo + book2.ans/embellish + book2.ans/embody + book2.ans/embroil + book2.ans/embryonic + book2.ans/emissary + book2.ans/empathy + book2.ans/empower + book2.ans/endear + book2.ans/engaging + book2.ans/enmity + book2.ans/ennui + book2.ans/ensue + book2.ans/entail + book2.ans/entity + book2.ans/entreat + book2.ans/entrepreneur + book2.ans/enumerate + book2.ans/envision + book2.ans/epicure + book2.ans/epilogue + book2.ans/epoch + book2.ans/equestrian + book2.ans/estimable + book2.ans/estrange + book2.ans/ethics + book2.ans/eulogy + book2.ans/evince + book2.ans/evoke + book2.ans/excise + book2.ans/exempt + book2.ans/exhume + book2.ans/exodus + book2.ans/exorbitant + book2.ans/expiate + book2.ans/explicate + book2.ans/exposition + book2.ans/expostulate + book2.ans/expunge + book2.ans/exquisite + book2.ans/extant + book2.ans/extort + book2.ans/extremity + book2.ans/exuberant + book2.ans/facade + book2.ans/facet + book2.ans/fallacy + book2.ans/fathom + book2.ans/faux + book2.ans/fawn + book2.ans/feign + book2.ans/fester + book2.ans/fetish + book2.ans/fiasco + book2.ans/fiat + book2.ans/fickle + book2.ans/figment + book2.ans/fiscal + book2.ans/fledgling + book2.ans/flippant + book2.ans/florid + book2.ans/fodder + book2.ans/folly + book2.ans/foray + book2.ans/forebode + book2.ans/foreclose + book2.ans/forensic + book2.ans/forestall + book2.ans/forswear + book2.ans/forte + book2.ans/forthright + book2.ans/foster + book2.ans/fragmentary + book2.ans/fruitful + book2.ans/fuel + book2.ans/fulminate + book2.ans/gaffe + book2.ans/galvanize + book2.ans/gambit + book2.ans/gamut + book2.ans/garner + book2.ans/gastronomy + book2.ans/generic + book2.ans/genesis + book2.ans/genocide + book2.ans/germane + book2.ans/ghastly + book2.ans/gratis + book2.ans/grievous + book2.ans/grimace + book2.ans/guise + book2.ans/habituate + book2.ans/halcyon + book2.ans/harass + book2.ans/harbinger + book2.ans/harp + book2.ans/harry + book2.ans/heinous + book2.ans/herald + book2.ans/hoary + book2.ans/homage + book2.ans/hubris + book2.ans/hypocrisy + book2.ans/idiom + book2.ans/imbue + book2.ans/impasse + book2.ans/impeach + book2.ans/impecunious + book2.ans/impede + book2.ans/impending + book2.ans/impenetrable + book2.ans/imperative + book2.ans/impetuous + book2.ans/implication + book2.ans/importune + book2.ans/impoverish + book2.ans/impregnable + book2.ans/impresario + book2.ans/impromptu + book2.ans/improvise + book2.ans/impunity + book2.ans/inadvertent + book2.ans/inalienable + book2.ans/incarnation + book2.ans/incendiary + book2.ans/inclination + book2.ans/inculcate + book2.ans/incumbent + book2.ans/incursion + book2.ans/indict + book2.ans/induce + book2.ans/ineluctable + book2.ans/ineradicable + book2.ans/inflammatory + book2.ans/influx + book2.ans/infraction + book2.ans/infrastructure + book2.ans/infringe + book2.ans/infuse + book2.ans/ingratiate + book2.ans/inimical + book2.ans/inimitable + book2.ans/innuendo + book2.ans/inquisition + book2.ans/insouciant + book2.ans/insufferable + book2.ans/insuperable + book2.ans/insurrection + book2.ans/integral + book2.ans/interim + book2.ans/interloper + book2.ans/interlude + book2.ans/interminable + book2.ans/intermittent + book2.ans/intersperse + book2.ans/intervene + book2.ans/intimate + book2.ans/intricate + book2.ans/intrigue + book2.ans/invidious + book2.ans/inviolate + book2.ans/invoke + book2.ans/iridescent + book2.ans/jargon + book2.ans/jaunt + book2.ans/jingoism + book2.ans/jocular + book2.ans/jubilation + book2.ans/junction + book2.ans/junta + book2.ans/karma + book2.ans/larceny + book2.ans/lascivious + book2.ans/lavish + book2.ans/lax + book2.ans/layman + book2.ans/liaison + book2.ans/licentious + book2.ans/limpid + book2.ans/listless + book2.ans/litany + book2.ans/livid + book2.ans/loath + book2.ans/lobby + book2.ans/lout + book2.ans/ludicrous + book2.ans/lyrical + book2.ans/malapropism + book2.ans/mania + book2.ans/marginal + book2.ans/materialistic + book2.ans/mawkish + book2.ans/meander + book2.ans/medium + book2.ans/melancholy + book2.ans/melee + book2.ans/menagerie + book2.ans/meticulous + book2.ans/millennium + book2.ans/mire + book2.ans/mode + book2.ans/modulate + book2.ans/momentum + book2.ans/moratorium + book2.ans/mores + book2.ans/motif + book2.ans/motley + book2.ans/municipal + book2.ans/muse + book2.ans/muster + book2.ans/mystic + book2.ans/nebulous + book2.ans/nemesis + book2.ans/neophyte + book2.ans/nirvana + book2.ans/noisome + book2.ans/nomadic + book2.ans/nomenclature + book2.ans/nonchalant + book2.ans/nullify + book2.ans/obeisance + book2.ans/objective + book2.ans/obtrusive + book2.ans/obviate + book2.ans/occult + book2.ans/odious + book2.ans/odyssey + book2.ans/olfactory + book2.ans/oligarchy + book2.ans/ominous + book2.ans/omniscient + book2.ans/opprobrious + book2.ans/ordinance + book2.ans/oscillate + book2.ans/osmosis + book2.ans/ostracize + book2.ans/oust + book2.ans/override + book2.ans/overture + book2.ans/oxymoron + book2.ans/palatable + book2.ans/pallor + book2.ans/pandemic + book2.ans/panegyric + book2.ans/parable + book2.ans/paragon + book2.ans/parallel + book2.ans/paranoia + book2.ans/paranormal + book2.ans/paroxysm + book2.ans/partition + book2.ans/pastoral + book2.ans/pathos + book2.ans/patina + book2.ans/patrimony + book2.ans/peculiar + book2.ans/peregrination + book2.ans/perpetrator + book2.ans/perpetuate + book2.ans/perverse + book2.ans/phantasm + book2.ans/phlegmatic + book2.ans/pilgrimage + book2.ans/placebo + book2.ans/platonic + book2.ans/plausible + book2.ans/pliable + book2.ans/plight + book2.ans/plunder + book2.ans/pluralism + book2.ans/pontificate + book2.ans/porous + book2.ans/posterity + book2.ans/posthumous + book2.ans/posture + book2.ans/prattle + book2.ans/precarious + book2.ans/precocious + book2.ans/predecessor + book2.ans/predicament + book2.ans/predispose + book2.ans/predominant + book2.ans/pregnant + book2.ans/prelude + book2.ans/premeditated + book2.ans/preponderance + book2.ans/presage + book2.ans/presentiment + book2.ans/presumably + book2.ans/presuppose + book2.ans/primal + book2.ans/pristine + book2.ans/privation + book2.ans/proclaim + book2.ans/procure + book2.ans/progeny + book2.ans/propagate + book2.ans/propound + book2.ans/protege + book2.ans/protocol + book2.ans/provocation + book2.ans/prowess + book2.ans/prurient + book2.ans/pseudonym + book2.ans/psyche + book2.ans/pummel + book2.ans/punctilious + book2.ans/pundit + book2.ans/pungent + book2.ans/punitive + book2.ans/purblind + book2.ans/puritanical + book2.ans/quaint + book2.ans/quandary + book2.ans/quasi + book2.ans/quay + book2.ans/quell + book2.ans/query + book2.ans/queue + book2.ans/quiescent + book2.ans/quintessential + book2.ans/quizzical + book2.ans/quotidian + book2.ans/rampant + book2.ans/rapture + book2.ans/rarefied + book2.ans/ratify + book2.ans/ratiocination + book2.ans/rationale + book2.ans/raucous + book2.ans/reactionary + book2.ans/rebuff + book2.ans/recidivism + book2.ans/reclaim + book2.ans/redeem + book2.ans/redress + book2.ans/referendum + book2.ans/refractory + book2.ans/regime + book2.ans/regimen + book2.ans/remission + book2.ans/remuneration + book2.ans/rend + book2.ans/render + book2.ans/repartee + book2.ans/replicate + book2.ans/repose + book2.ans/repress + book2.ans/reprimand + book2.ans/reprisal + book2.ans/reprobate + book2.ans/repugnant + book2.ans/resignation + book2.ans/resplendent + book2.ans/resurrection + book2.ans/retort + book2.ans/retrospect + book2.ans/revamp + book2.ans/revel + book2.ans/revile + book2.ans/revulsion + book2.ans/rhapsodize + book2.ans/ribald + book2.ans/rife + book2.ans/rivet + book2.ans/rout + book2.ans/rue + book2.ans/sally + book2.ans/salutation + book2.ans/sanction + book2.ans/sarcasm + book2.ans/savant + book2.ans/scant + book2.ans/schism + book2.ans/scorn + book2.ans/seamless + book2.ans/secede + book2.ans/seclusion + book2.ans/sect + book2.ans/sedentary + book2.ans/self-made + book2.ans/sententious + book2.ans/serene + book2.ans/serpentine + book2.ans/shackle + book2.ans/shibboleth + book2.ans/shrewd + book2.ans/singular + book2.ans/skirmish + book2.ans/skittish + book2.ans/slake + book2.ans/solace + book2.ans/solidarity + book2.ans/sophomoric + book2.ans/sordid + book2.ans/sovereign + book2.ans/spate + book2.ans/specious + book2.ans/specter + book2.ans/spectrum + book2.ans/spurn + book2.ans/stalwart + book2.ans/stark + book2.ans/stint + book2.ans/stipend + book2.ans/stolid + book2.ans/stout + book2.ans/stratagem + book2.ans/stupendous + book2.ans/stupor + book2.ans/subside + book2.ans/subsidiary + book2.ans/subsidize + book2.ans/substantiate + book2.ans/subterfuge + book2.ans/suffice + book2.ans/suffrage + book2.ans/suffuse + book2.ans/sumptuous + book2.ans/supersede + book2.ans/supine + book2.ans/supplication + book2.ans/suppress + book2.ans/surmise + book2.ans/surreal + book2.ans/susceptible + book2.ans/sweeping + book2.ans/syntax + book2.ans/systemic + book2.ans/tactical + book2.ans/taint + book2.ans/tedium + book2.ans/teem + book2.ans/temporal + book2.ans/temporize + book2.ans/tepid + book2.ans/thesis + book2.ans/thorny + book2.ans/threshold + book2.ans/throttle + book2.ans/thwart + book2.ans/timorous + book2.ans/titillate + book2.ans/titular + book2.ans/toil + book2.ans/tortuous + book2.ans/toxic + book2.ans/transfix + book2.ans/trauma + book2.ans/travesty + book2.ans/trenchant + book2.ans/triumvirate + book2.ans/tryst + book2.ans/tumult + book2.ans/turbid + book2.ans/turmoil + book2.ans/uncanny + book2.ans/underlying + book2.ans/undermine + book2.ans/underpinning + book2.ans/underscore + book2.ans/underwrite + book2.ans/unilateral + book2.ans/usury + book2.ans/vacuous + book2.ans/vagary + book2.ans/vanquish + book2.ans/veneer + book2.ans/verdant + book2.ans/verge + book2.ans/verity + book2.ans/vie + book2.ans/vigilant + book2.ans/vignette + book2.ans/viscous + book2.ans/vivacious + book2.ans/vogue + book2.ans/voluminous + book2.ans/voluptuous + book2.ans/voracious + book2.ans/waft + book2.ans/waive + book2.ans/wake + book2.ans/wane + book2.ans/warrant + book2.ans/wary + book2.ans/wizened + book2.ans/woe + book2.ans/wrath + book2.ans/zeitgeist + book2.ans/zenith + book2/.empty + book2/.A.list + book2/.B.list + book2/.C.list + book2/.D.list + book2/.E.list + book2/.F.list + book2/.G.list + book2/.H.list + book2/.I.list + book2/.J.list + book2/.K.list + book2/.L.list + book2/.M.list + book2/.N.list + book2/.O.list + book2/.P.list + book2/.Q.list + book2/.R.list + book2/.S.list + book2/.T.list + book2/.U.list + book2/.V.list + book2/.W.list + book2/.X.list + book2/.Y.list + book2/.Z.list + book2/abase + book2/abet + book2/abeyance + book2/abjure + book2/abomination + book2/aboriginal + book2/abound + book2/abrogate + book2/accede + book2/accentuate + book2/access + book2/acclaim + book2/accord + book2/accouterments + book2/accrue + book2/acquisitive + book2/acquit + book2/acronym + book2/ad-lib + book2/adage + book2/adduce + book2/adjourn + book2/adjunct + book2/advent + book2/adventitious + book2/advocate + book2/affidavit + book2/affiliate + book2/affliction + book2/afford + book2/affront + book2/aftermath + book2/aggrandize + book2/aggrieve + book2/aghast + book2/alchemy + book2/alienate + book2/allegiance + book2/allegory + book2/allot + book2/altercation + book2/amass + book2/amid + book2/anathema + book2/ancillary + book2/angst + book2/annex + book2/annuity + book2/antedate + book2/anterior + book2/anthology + book2/anthropomorphic + book2/antipodal + book2/antiquity + book2/aperture + book2/apex + book2/apogee + book2/apoplexy + book2/apostasy + book2/appalling + book2/apparition + book2/appellation + book2/appendage + book2/apportion + book2/apposite + book2/appraise + book2/apprise + book2/appurtenance + book2/apropos + book2/apt + book2/arcade + book2/archipelago + book2/archives + book2/arid + book2/armament + book2/armistice + book2/arraign + book2/arrant + book2/arrears + book2/arsenal + book2/articulate + book2/artisan + book2/ascertain + book2/ascribe + book2/askance + book2/aspersion + book2/assail + book2/assert + book2/assess + book2/astringent + book2/asylum + book2/atone + book2/atrophy + book2/attest + book2/attribute + book2/augur + book2/august + book2/auspices + book2/auxiliary + book2/avail + book2/avant-garde + book2/aversion + book2/avert + book2/avid + book2/bacchanal + book2/baleful + book2/balk + book2/ballyhoo + book2/balm + book2/bandy + book2/banter + book2/baroque + book2/barrage + book2/bauble + book2/bedlam + book2/begrudge + book2/behest + book2/bemoan + book2/benediction + book2/benighted + book2/bestow + book2/bilious + book2/bivouac + book2/blanch + book2/bland + book2/blandishment + book2/bliss + book2/bluster + book2/bombast + "book2/bon vivant" + "book2/bona fide" + book2/boon + book2/boor + book2/booty + book2/botch + book2/bracing + book2/brandish + book2/bravado + book2/brawn + book2/brazen + book2/breach + book2/brink + book2/bristle + book2/bromide + book2/brouhaha + book2/brusque + book2/buffoon + book2/bulwark + book2/byzantine + book2/cabal + book2/cache + book2/calamity + book2/callous + book2/calumny + book2/canon + book2/cant + book2/canvass + book2/capacious + book2/capital + book2/captivate + book2/carcinogenic + book2/cardinal + book2/careen + book2/cartography + book2/cascade + book2/cataclysm + book2/caucus + book2/cavalier + book2/cavil + book2/chaff + book2/chameleon + book2/champion + book2/channel + book2/chaste + book2/cherub + book2/chortle + book2/churl + book2/chutzpah + book2/cipher + book2/circumnavigate + book2/citadel + book2/clandestine + book2/classic + book2/cleave + book2/climatic + book2/cloister + book2/clone + book2/clout + book2/cloy + book2/coddle + book2/cogitate + book2/cohort + book2/commemorate + book2/commiserate + book2/commodious + book2/compatible + book2/competent + book2/compile + book2/comply + book2/composed + book2/compromise + book2/compunction + book2/concave + book2/concede + book2/concentric + book2/concert + book2/concoct + book2/concomitant + book2/confederate + book2/confer + book2/confidant + book2/configuration + book2/conflagration + book2/confluence + book2/confound + book2/congeal + book2/conjugal + book2/connive + book2/conservatory + book2/consign + book2/consolidate + book2/conspicuous + book2/consternation + book2/constituency + book2/contempt + book2/continuum + book2/contraband + book2/contretemps + book2/contumely + book2/conundrum + book2/convene + book2/conversant + book2/converse + book2/convey + book2/conviction + book2/convolution + book2/copious + book2/cordial + book2/corollary + book2/corporeal + book2/correlation + book2/corrosive + book2/corrugated + book2/coterie + book2/cower + book2/crass + book2/craven + book2/crescendo + book2/crestfallen + book2/crevice + book2/cringe + book2/critique + book2/crux + book2/cuisine + book2/cull + book2/curb + book2/curmudgeon + book2/cursory + book2/debase + book2/debunk + book2/decree + book2/decry + book2/deem + book2/deficit + book2/defile + book2/deft + book2/defunct + book2/degrade + book2/deign + book2/deity + book2/dejected + book2/delectable + book2/delinquent + book2/delve + book2/demeanor + book2/demise + book2/demography + book2/demur + book2/demure + book2/denomination + book2/denote + book2/denounce + book2/depict + book2/deplete + book2/deplore + book2/deploy + book2/depose + book2/depredate + book2/derelict + book2/desist + book2/devout + book2/diatribe + book2/dichotomy + book2/diffuse + book2/dilapidate + book2/dilate + book2/dilemma + book2/diminution + book2/dire + book2/dirge + book2/disaffect + book2/disarray + book2/disclaim + book2/discomfit + book2/disconcert + book2/discourse + book2/discrepancy + book2/discursive + book2/disgruntle + book2/disinformation + book2/dismal + book2/dismay + book2/dispassionate + book2/disperse + book2/dispirit + book2/disposition + book2/disproportionate + book2/disquiet + book2/dissemble + book2/dissent + book2/disservice + book2/dissident + book2/dissuade + book2/distinct + book2/diurnal + book2/divine + book2/divulge + book2/document + book2/doldrums + book2/doleful + book2/dolt + book2/dotage + "book2/double entendre" + book2/dour + book2/downcast + book2/downplay + book2/draconian + book2/droll + book2/dross + book2/duress + book2/ebb + book2/ecclesiastical + book2/eclipse + book2/ecosystem + book2/edict + book2/edifice + book2/effectual + book2/efficacy + book2/effigy + book2/elation + book2/electorate + book2/elegy + book2/elite + book2/elocution + book2/emaciate + book2/emanate + book2/emancipate + book2/embargo + book2/embellish + book2/embody + book2/embroil + book2/embryonic + book2/emissary + book2/empathy + book2/empower + book2/endear + book2/engaging + book2/enmity + book2/ennui + book2/ensue + book2/entail + book2/entity + book2/entreat + book2/entrepreneur + book2/enumerate + book2/envision + book2/epicure + book2/epilogue + book2/epoch + book2/equestrian + book2/estimable + book2/estrange + book2/ethics + book2/eulogy + book2/evince + book2/evoke + book2/excise + book2/exempt + book2/exhume + book2/exodus + book2/exorbitant + book2/expiate + book2/explicate + book2/exposition + book2/expostulate + book2/expunge + book2/exquisite + book2/extant + book2/extort + book2/extremity + book2/exuberant + book2/facade + book2/facet + book2/fallacy + book2/fathom + book2/faux + book2/fawn + book2/feign + book2/fester + book2/fetish + book2/fiasco + book2/fiat + book2/fickle + book2/figment + book2/fiscal + book2/fledgling + book2/flippant + book2/florid + book2/fodder + book2/folly + book2/foray + book2/forebode + book2/foreclose + book2/forensic + book2/forestall + book2/forswear + book2/forte + book2/forthright + book2/foster + book2/fragmentary + book2/fruitful + book2/fuel + book2/fulminate + book2/gaffe + book2/galvanize + book2/gambit + book2/gamut + book2/garner + book2/gastronomy + book2/generic + book2/genesis + book2/genocide + book2/germane + book2/ghastly + book2/gratis + book2/grievous + book2/grimace + book2/guise + book2/habituate + book2/halcyon + book2/harass + book2/harbinger + book2/harp + book2/harry + book2/heinous + book2/herald + book2/hoary + book2/homage + book2/hubris + book2/hypocrisy + book2/idiom + book2/imbue + book2/impasse + book2/impeach + book2/impecunious + book2/impede + book2/impending + book2/impenetrable + book2/imperative + book2/impetuous + book2/implication + book2/importune + book2/impoverish + book2/impregnable + book2/impresario + book2/impromptu + book2/improvise + book2/impunity + book2/inadvertent + book2/inalienable + book2/incarnation + book2/incendiary + book2/inclination + book2/inculcate + book2/incumbent + book2/incursion + book2/indict + book2/induce + book2/ineluctable + book2/ineradicable + book2/inflammatory + book2/influx + book2/infraction + book2/infrastructure + book2/infringe + book2/infuse + book2/ingratiate + book2/inimical + book2/inimitable + book2/innuendo + book2/inquisition + book2/insouciant + book2/insufferable + book2/insuperable + book2/insurrection + book2/integral + book2/interim + book2/interloper + book2/interlude + book2/interminable + book2/intermittent + book2/intersperse + book2/intervene + book2/intimate + book2/intricate + book2/intrigue + book2/invidious + book2/inviolate + book2/invoke + book2/iridescent + book2/jargon + book2/jaunt + book2/jingoism + book2/jocular + book2/jubilation + book2/junction + book2/junta + book2/karma + book2/larceny + book2/lascivious + book2/lavish + book2/lax + book2/layman + book2/liaison + book2/licentious + book2/limpid + book2/listless + book2/litany + book2/livid + book2/loath + book2/lobby + book2/lout + book2/ludicrous + book2/lyrical + book2/malapropism + book2/mania + book2/marginal + book2/materialistic + book2/mawkish + book2/meander + book2/medium + book2/melancholy + book2/melee + book2/menagerie + book2/meticulous + book2/millennium + book2/mire + book2/mode + book2/modulate + book2/momentum + book2/moratorium + book2/mores + book2/motif + book2/motley + book2/municipal + book2/muse + book2/muster + book2/mystic + book2/nebulous + book2/nemesis + book2/neophyte + book2/nirvana + book2/noisome + book2/nomadic + book2/nomenclature + book2/nonchalant + book2/nullify + book2/obeisance + book2/objective + book2/obtrusive + book2/obviate + book2/occult + book2/odious + book2/odyssey + book2/olfactory + book2/oligarchy + book2/ominous + book2/omniscient + book2/opprobrious + book2/ordinance + book2/oscillate + book2/osmosis + book2/ostracize + book2/oust + book2/override + book2/overture + book2/oxymoron + book2/palatable + book2/pallor + book2/pandemic + book2/panegyric + book2/parable + book2/paragon + book2/parallel + book2/paranoia + book2/paranormal + book2/paroxysm + book2/partition + book2/pastoral + book2/pathos + book2/patina + book2/patrimony + book2/peculiar + book2/peregrination + book2/perpetrator + book2/perpetuate + book2/perverse + book2/phantasm + book2/phlegmatic + book2/pilgrimage + book2/placebo + book2/platonic + book2/plausible + book2/pliable + book2/plight + book2/plunder + book2/pluralism + book2/pontificate + book2/porous + book2/posterity + book2/posthumous + book2/posture + book2/prattle + book2/precarious + book2/precocious + book2/predecessor + book2/predicament + book2/predispose + book2/predominant + book2/pregnant + book2/prelude + book2/premeditated + book2/preponderance + book2/presage + book2/presentiment + book2/presumably + book2/presuppose + book2/primal + book2/pristine + book2/privation + book2/proclaim + book2/procure + book2/progeny + book2/propagate + book2/propound + book2/protege + book2/protocol + book2/provocation + book2/prowess + book2/prurient + book2/pseudonym + book2/psyche + book2/pummel + book2/punctilious + book2/pundit + book2/pungent + book2/punitive + book2/purblind + book2/puritanical + book2/quaint + book2/quandary + book2/quasi + book2/quay + book2/quell + book2/query + book2/queue + book2/quiescent + book2/quintessential + book2/quizzical + book2/quotidian + book2/rampant + book2/rapture + book2/rarefied + book2/ratify + book2/ratiocination + book2/rationale + book2/raucous + book2/reactionary + book2/rebuff + book2/recidivism + book2/reclaim + book2/redeem + book2/redress + book2/referendum + book2/refractory + book2/regime + book2/regimen + book2/remission + book2/remuneration + book2/rend + book2/render + book2/repartee + book2/replicate + book2/repose + book2/repress + book2/reprimand + book2/reprisal + book2/reprobate + book2/repugnant + book2/resignation + book2/resplendent + book2/resurrection + book2/retort + book2/retrospect + book2/revamp + book2/revel + book2/revile + book2/revulsion + book2/rhapsodize + book2/ribald + book2/rife + book2/rivet + book2/rout + book2/rue + book2/sally + book2/salutation + book2/sanction + book2/sarcasm + book2/savant + book2/scant + book2/schism + book2/scorn + book2/seamless + book2/secede + book2/seclusion + book2/sect + book2/sedentary + book2/self-made + book2/sententious + book2/serene + book2/serpentine + book2/shackle + book2/shibboleth + book2/shrewd + book2/singular + book2/skirmish + book2/skittish + book2/slake + book2/solace + book2/solidarity + book2/sophomoric + book2/sordid + book2/sovereign + book2/spate + book2/specious + book2/specter + book2/spectrum + book2/spurn + book2/stalwart + book2/stark + book2/stint + book2/stipend + book2/stolid + book2/stout + book2/stratagem + book2/stupendous + book2/stupor + book2/subside + book2/subsidiary + book2/subsidize + book2/substantiate + book2/subterfuge + book2/suffice + book2/suffrage + book2/suffuse + book2/sumptuous + book2/supersede + book2/supine + book2/supplication + book2/suppress + book2/surmise + book2/surreal + book2/susceptible + book2/sweeping + book2/syntax + book2/systemic + book2/tactical + book2/taint + book2/tedium + book2/teem + book2/temporal + book2/temporize + book2/tepid + book2/thesis + book2/thorny + book2/threshold + book2/throttle + book2/thwart + book2/timorous + book2/titillate + book2/titular + book2/toil + book2/tortuous + book2/toxic + book2/transfix + book2/trauma + book2/travesty + book2/trenchant + book2/triumvirate + book2/tryst + book2/tumult + book2/turbid + book2/turmoil + book2/uncanny + book2/underlying + book2/undermine + book2/underpinning + book2/underscore + book2/underwrite + book2/unilateral + book2/usury + book2/vacuous + book2/vagary + book2/vanquish + book2/veneer + book2/verdant + book2/verge + book2/verity + book2/vie + book2/vigilant + book2/vignette + book2/viscous + book2/vivacious + book2/vogue + book2/voluminous + book2/voluptuous + book2/voracious + book2/waft + book2/waive + book2/wake + book2/wane + book2/warrant + book2/wary + book2/wizened + book2/woe + book2/wrath + book2/zeitgeist + book2/zenith + + +Executable answer.cgi + main-is: answer.lhs + build-depends: base,haskell98,pretty,unix + other-modules: CGI,SWlib,Xhtml1 + ghc-options: -Wall -O2 +Executable index.cgi + main-is: index.lhs + build depends: base,haskell98,pretty,unix + other-modules: CGI,SWlib,Xhtml1 + ghc-options: -Wall -O2 +Executable start.cgi + main-is: start.lhs + build-depends: base,haskell98,pretty,unix + other-modules: CGI,SWlib,Xhtml1 + ghc-options: -Wall -O2 +Executable sw.cgi + main-is: sw.lhs + build-depends: base,haskell98,pretty,unix,utf8-string + other-modules: CGI,SWlib,Xhtml1 + ghc-options: -Wall -O2 + + diff --git a/experiment/parse/fail/9.cabal b/experiment/parse/fail/9.cabal new file mode 100644 index 00000000000..b8c86f7718d --- /dev/null +++ b/experiment/parse/fail/9.cabal @@ -0,0 +1,40 @@ +name: oeis +version: 0.3.1 +stability: experimental +category: Math +synopsis: Interface to the Online Encyclopedia of Integer Sequences +description: Interface to the Online Encyclopedia of Integer Sequences. See . +author: Brent Yorgey +maintainer: Brian Lewis +license: BSD3 +license-file: LICENSE + +cabal-version: >= 1.6 +build-type: Custom + +data-files: + README + example/Catalan.hs + +extra-source-files: + src/test.hs + +library + hs-source-dirs: + src + + exposed-modules: + Math.OEIS + + build-depends: + base == 3.* || == 4.*, + network == 2.*, + HTTP >= 4000.0.2 || == 4000.1.* + + ghc-options: -Wall + if impl(ghc >= 6.8) + ghc-options: -fwarn-tabs + +source-repository head +  type: git +  location: git://github.com/bsl/oeis.git diff --git a/experiment/parse/parse.cabal b/experiment/parse/parse.cabal new file mode 100644 index 00000000000..a25d3ee9a0f --- /dev/null +++ b/experiment/parse/parse.cabal @@ -0,0 +1,30 @@ +-- This file has been generated from package.yaml by hpack version 0.8.0. +-- +-- see: https://github.com/sol/hpack + +name: parse +version: 0.0.0 +build-type: Simple +cabal-version: >= 1.10 + +executable cabal-parser-perf + main-is: Perf.hs + hs-source-dirs: + . + build-depends: + base + , bytestring + , Cabal + , directory + , old-time + , filepath + , text + , array + , containers + , parsec + , vector + , tar + other-modules: + IndexUtils + PostParser + default-language: Haskell2010 diff --git a/experiment/parse/unpack-funcs/0.1.2/unpack-funcs.cabal b/experiment/parse/unpack-funcs/0.1.2/unpack-funcs.cabal new file mode 100644 index 00000000000..a555c6325f4 --- /dev/null +++ b/experiment/parse/unpack-funcs/0.1.2/unpack-funcs.cabal @@ -0,0 +1,29 @@ +name: unpack-funcs +version: 0.1.2 +cabal-version: >= 1.6 +tested-with: GHC +category: Control +synopsis: Monad transformers that mirror worker-wrapper transformations. +description: Provides a typeclass and Template Haskell-driven instance generators that create "worker-wrapper" + @ReaderT@ monad transformers, which unpacks the arguments of single-constructor data types. +license: BSD3 +license-file: LICENSE +author: Louis Wasserman +maintainer: wasserman.louis@gmail.com +build-type: Simple + +source-repository head + type: git + location: git@github.com:lowasser/unpack-funcs.git + +Library{ +build-Depends: base < 5.0.0.0, template-haskell >= 2.5.0.0, bytestring >= 0.9.1.0, + vector >= 0.6, primitive >= 0.3, transformers +ghc-options: + -Wall -fno-warn-name-shadowing -fno-warn-orphans +exposed-modules: + Control.Monad.Unpack +other-modules: + Control.Monad.Unpack.Class, + Control.Monad.Unpack.TH +} diff --git a/experiment/parse/words.list b/experiment/parse/words.list new file mode 100644 index 00000000000..10caab125fc --- /dev/null +++ b/experiment/parse/words.list @@ -0,0 +1,1002 @@ +28468 +4870 +0 2695: a +1 2658: the +2 2560: for +3 2521: and +4 2363: to +5 2165: of +6 1878: is +7 1851: this +8 1636: in +9 1368: with +10 1280: library +11 1212: package +12 1171: haskell +13 1134: it +14 1047: that +15 989: be +16 977: an +17 963: on +18 871: as +19 855: provides +20 847: http +21 817: by +22 816: are +23 815: can +24 798: from +25 693: data +26 663: use +27 606: you +28 605: or +29 596: which +30 572: using +31 558: functions +32 538: see +33 498: more +34 491: type +35 490: not +36 489: used +37 483: simple +38 476: at +39 454: code +40 430: org +41 430: also +42 407: but +43 389: all +44 370: module +45 367: file +46 364: types +47 362: other +48 360: interface +49 360: com +50 359: some +51 356: implementation +52 331: has +53 329: version +54 329: files +55 329: 1 +56 320: only +57 314: 2 +58 311: example +59 310: based +60 309: if +61 308: 0 +62 306: into +63 293: will +64 288: support +65 282: have +66 271: www +67 267: your +68 257: like +69 256: api +70 253: program +71 250: information +72 247: allows +73 243: so +74 242: system +75 242: function +76 240: any +77 238: one +78 238: - +79 237: uses +80 236: language +81 236: contains +82 234: monad +83 231: these +84 221: set +85 219: such +86 218: instances +87 218: html +88 212: i +89 211: c +90 205: when +91 205: should +92 204: time +93 203: programming +94 198: examples +95 197: do +96 196: documentation +97 195: 3 +98 193: class +99 191: than +100 191: text +101 190: new +102 189: its +103 188: available +104 186: there +105 185: ghc +106 185: currently +107 184: work +108 184: no +109 182: very +110 181: values +111 181: bindings +112 176: useful +113 176: them +114 176: list +115 175: format +116 173: supports +117 172: tool +118 171: well +119 171: note +120 169: parser +121 167: packages +122 167: hackage +123 166: two +124 166: may +125 165: programs +126 164: run +127 164: provide +128 164: e +129 162: make +130 160: source +131 160: features +132 160: both +133 159: where +134 159: standard +135 159: output +136 159: need +137 159: libraries +138 158: provided +139 158: github +140 156: modules +141 156: io +142 156: been +143 154: then +144 153: please +145 152: user +146 152: same +147 151: way +148 150: operations +149 149: changes +150 148: they +151 148: between +152 147: most +153 147: many +154 147: = +155 146: control +156 146: about +157 144: functional +158 144: does +159 143: write +160 143: via +161 143: found +162 143: each +163 142: web +164 142: their +165 142: applications +166 141: number +167 140: input +168 140: easy +169 140: different +170 139: we +171 139: was +172 139: now +173 138: written +174 138: supported +175 138: just +176 138: framework +177 138: cabal +178 137: including +179 136: includes +180 136: get +181 136: fast +182 135: usage +183 135: build +184 134: over +185 134: binding +186 132: application +187 131: project +188 131: possible +189 130: parsing +190 130: implemented +191 128: read +192 128: instead +193 128: command +194 126: structures +195 126: main +196 126: https +197 126: 4 +198 125: without +199 124: efficient +200 123: various +201 123: instance +202 123: functionality +203 121: basic +204 120: implements +205 120: given +206 119: structure +207 119: how +208 119: access +209 118: syntax +210 118: generate +211 117: up +212 117: similar +213 116: classes +214 115: test +215 115: binary +216 114: import +217 114: g +218 113: value +219 113: tools +220 112: want +221 112: out +222 112: combinators +223 111: line +224 111: defined +225 111: 6 +226 109: generic +227 108: string +228 107: following +229 106: xml +230 106: common +231 105: server +232 105: however +233 104: wrapper +234 103: template +235 103: performance +236 103: net +237 103: algorithm +238 102: small +239 101: directory +240 100: utility +241 100: lazy +242 100: create +243 100: compiler +244 99: included +245 99: here +246 98: those +247 98: order +248 98: makes +249 97: pure +250 97: lists +251 96: paper +252 96: intended +253 96: database +254 95: writing +255 95: client +256 95: added +257 94: 7 +258 94: 5 +259 93: it's +260 92: tree +261 92: through +262 92: hs +263 92: add +264 91: x +265 91: general +266 91: full +267 91: etc +268 91: details +269 91: default +270 90: own +271 90: name +272 90: multiple +273 89: while +274 89: single +275 89: since +276 89: several +277 89: designed +278 89: automatically +279 88: working +280 88: first +281 88: allow +282 87: pdf +283 87: dependencies +284 86: systems +285 86: much +286 86: error +287 85: works +288 85: numbers +289 84: defines +290 83: wiki +291 83: versions +292 83: include +293 83: backend +294 82: memory +295 82: install +296 82: described +297 82: core +298 82: because +299 81: under +300 81: parse +301 81: original +302 80: running +303 79: top +304 79: state +305 79: representation +306 79: providing +307 79: generated +308 79: either +309 79: around +310 78: requires +311 78: point +312 78: handling +313 78: complete +314 77: release +315 77: implementations +316 77: graphics +317 76: vector +318 76: show +319 76: rather +320 75: level +321 75: executable +322 74: yet +323 74: style +324 74: network +325 74: current +326 73: good +327 72: windows +328 72: software +329 72: map +330 72: form +331 72: building +332 72: base +333 72: arbitrary +334 71: users +335 71: collection +336 70: results +337 70: particular +338 70: change +339 70: called +340 69: readme +341 69: reading +342 69: model +343 69: find +344 69: creating +345 69: command-line +346 68: strings +347 68: random +348 68: monadic +349 68: implement +350 68: high +351 68: algorithms +352 67: would +353 67: utilities +354 67: process +355 67: page +356 67: generating +357 67: ] +358 66: what +359 66: transformer +360 66: tests +361 66: large +362 66: interfaces +363 66: haskellwiki +364 66: generator +365 66: generation +366 66: game +367 66: easily +368 66: allowing +369 65: inspired +370 65: future +371 65: formats +372 65: even +373 65: development +374 65: built +375 64: protocol +376 64: generates +377 64: directly +378 64: 10 +379 63: transformers +380 63: size +381 63: return +382 63: might +383 63: help +384 63: compile +385 63: case +386 63: better +387 62: names +388 62: compatible +389 62: bytestring +390 61: strict +391 61: still +392 61: made +393 61: expressions +394 61: environment +395 61: convert +396 60: result +397 60: parallel +398 60: needed +399 60: must +400 60: monads +401 59: s +402 59: o +403 59: linux +404 59: license +405 59: extension +406 59: edu +407 59: don't +408 59: addition +409 58: pretty +410 58: opengl +411 58: free +412 58: extensions +413 58: embedded +414 58: before +415 58: alternative +416 58: abstract +417 57: processing +418 57: fixed +419 57: few +420 57: experimental +421 57: another +422 56: within +423 56: testing +424 56: let +425 56: elements +426 56: cases +427 55: specification +428 55: rendering +429 55: messages +430 55: languages +431 55: being +432 54: trees +433 54: specific +434 54: required +435 54: part +436 54: known +437 54: interpreter +438 54: graph +439 54: darcs +440 54: call +441 54: additional +442 53: together +443 53: space +444 53: master +445 53: installed +446 53: conversion +447 52: tutorial +448 52: thus +449 52: tested +450 52: parsers +451 52: objects +452 52: look +453 52: external +454 51: variables +455 51: takes +456 51: safe +457 51: homepage +458 51: description +459 51: dependency +460 51: commands +461 51: bug +462 50: regular +463 50: n +464 50: gui +465 50: ffi +466 50: define +467 49: portable +468 49: less +469 49: every +470 49: dynamic +471 49: design +472 49: datatypes +473 49: convenient +474 48: three +475 48: terms +476 48: start +477 48: specified +478 48: sets +479 48: send +480 48: path +481 48: open +482 48: encoding +483 48: check +484 48: avoid +485 47: things +486 47: subset +487 47: special +488 47: repository +489 47: method +490 47: message +491 47: means +492 47: json +493 47: idea +494 47: existing +495 47: computation +496 47: complex +497 47: calls +498 47: bytestrings +499 46: right +500 46: projects +501 46: prelude +502 46: port +503 46: options +504 46: my +505 46: making +506 46: later +507 46: itself +508 46: handle +509 46: feature +510 46: events +511 46: documents +512 46: deprecated +513 46: computations +514 46: array +515 46: after +516 46: adds +517 46: [ +518 46: 8 +519 45: suitable +520 45: stream +521 45: once +522 45: linear +523 45: expression +524 45: event +525 45: engine +526 45: display +527 45: custom +528 45: could +529 45: arguments +530 45: + +531 44: vectors +532 44: unix +533 44: take +534 44: runtime +535 44: low-level +536 44: key +537 44: internal +538 44: ghci +539 44: further +540 44: back +541 44: audio +542 43: unicode +543 43: split +544 43: sequence +545 43: search +546 43: require +547 43: produce +548 43: methods +549 43: machine +550 43: local +551 43: image +552 43: errors +553 43: easier +554 43: done +555 43: distributed +556 43: changed +557 43: arrays +558 43: able +559 43: 98 +560 42: typed +561 42: rules +562 42: reads +563 42: purpose +564 42: properties +565 42: parts +566 42: download +567 42: developed +568 42: definitions +569 42: content +570 42: channel +571 42: b +572 42: along +573 41: too +574 41: posix +575 41: matching +576 41: lets +577 41: interactive +578 41: high-level +579 41: gtk +580 41: git +581 41: defining +582 41: de +583 41: configuration +584 41: bit +585 40: welcome +586 40: script +587 40: problem +588 40: platform +589 40: pattern +590 40: operators +591 40: natural +592 40: google +593 40: exception +594 40: due +595 40: doesn't +596 40: cs +597 40: authentication +598 40: already +599 40: -- +600 39: try +601 39: started +602 39: simply +603 39: separate +604 39: sample +605 39: requests +606 39: real +607 39: quite +608 39: mutable +609 39: haddock +610 39: extended +611 39: exceptions +612 39: contain +613 39: compiled +614 39: although +615 38: underlying +616 38: times +617 38: store +618 38: speed +619 38: related +620 38: problems +621 38: perform +622 38: p +623 38: numeric +624 38: manual +625 38: irc +626 38: integer +627 38: images +628 38: give +629 38: f +630 38: correct +631 38: automatic +632 38: approach +633 38: against +634 38: advanced +635 38: 9 +636 37: were +637 37: threads +638 37: specify +639 37: runs +640 37: represented +641 37: quickcheck +642 37: query +643 37: probably +644 37: png +645 37: old +646 37: nice +647 37: log +648 37: extra +649 37: evaluation +650 37: docs +651 37: definition +652 37: containing +653 37: analysis +654 37: algebraic +655 37: ' +656 36: yesod +657 36: url +658 36: tries +659 36: static +660 36: something +661 36: sequences +662 36: second +663 36: removed +664 36: patches +665 36: optional +666 36: needs +667 36: mode +668 36: limited +669 36: index +670 36: implementing +671 36: graphs +672 36: distribution +673 36: blog +674 36: ability +675 36: 2010 +676 35: update +677 35: until +678 35: type-safe +679 35: sourceforge +680 35: serialization +681 35: r +682 35: processes +683 35: online +684 35: often +685 35: least +686 35: keep +687 35: int +688 35: handles +689 35: fully +690 35: fix +691 35: element +692 35: depend +693 35: combinator +694 35: blob +695 35: applicative +696 35: almost +697 35: aims +698 35: action +699 34: words +700 34: window +701 34: view +702 34: supporting +703 34: stm +704 34: representing +705 34: replacement +706 34: references +707 34: print +708 34: patterns +709 34: parameters +710 34: manipulating +711 34: lightweight +712 34: javascript +713 34: explicit +714 34: concurrent +715 34: cannot +716 34: according +717 34: above +718 34: 3d +719 34: 12 +720 33: shell +721 33: semantics +722 33: select +723 33: resources +724 33: partial +725 33: normal +726 33: necessary +727 33: music +728 33: initial +729 33: helper +730 33: handler +731 33: games +732 33: flag +733 33: fields +734 33: families +735 33: end +736 33: dsl +737 33: document +738 33: created +739 33: corresponding +740 33: constant +741 33: communication +742 33: associated +743 33: additionally +744 33: actual +745 32: wrappers +746 32: type-level +747 32: thread +748 32: templates +749 32: tags +750 32: streams +751 32: produces +752 32: printing +753 32: next +754 32: long +755 32: live +756 32: lines +757 32: know +758 32: keys +759 32: info +760 32: home +761 32: goal +762 32: faster +763 32: declarations +764 32: comments +765 32: channels +766 32: c++ +767 32: argument +768 31: variable +769 31: v +770 31: thanks +771 31: table +772 31: record +773 31: queries +774 31: put +775 31: primitive +776 31: present +777 31: preprocessor +778 31: plain +779 31: per +780 31: parameter +781 31: ones +782 31: native +783 31: modified +784 31: issues +785 31: gnu +786 31: flexible +787 31: exports +788 31: enough +789 31: connection +790 31: components +791 31: commonly +792 31: checking +793 31: characters +794 31: character +795 31: algebra +796 31: actions +797 30: world +798 30: word +799 30: video +800 30: suite +801 30: stored +802 30: storage +803 30: request +804 30: representations +805 30: purely +806 30: programmer +807 30: practical +808 30: powerful +809 30: polymorphic +810 30: persistent +811 30: papers +812 30: option +813 30: object +814 30: missing +815 30: mechanism +816 30: me +817 30: loading +818 30: load +819 30: left +820 30: ideas +821 30: hash +822 30: gives +823 30: direct +824 30: cairo +825 30: bsd3 +826 30: [1 +827 29: wai +828 29: unit +829 29: track +830 29: storable +831 29: sources +832 29: sometimes +833 29: slow +834 29: points +835 29: others +836 29: maybe +837 29: logic +838 29: integrated +839 29: installation +840 29: infinite +841 29: having +842 29: gtk2hs +843 29: foreign +844 29: explicitly +845 29: datatype +846 29: copy +847 29: constructor +848 29: composition +849 29: comes +850 29: builds +851 29: best +852 29: 2012 +853 28: whose +854 28: whether +855 28: upon +856 28: updated +857 28: reports +858 28: pass +859 28: offers +860 28: moment +861 28: meant +862 28: manipulation +863 28: management +864 28: integration +865 28: important +866 28: forms +867 28: follows +868 28: extend +869 28: execution +870 28: down +871 28: double +872 28: diagrams +873 28: detailed +874 28: depends +875 28: course +876 28: context +877 28: computer +878 28: changelog +879 28: boilerplate +880 28: always +881 28: 'data +882 27: variety +883 27: unlike +884 27: typeclass +885 27: session +886 27: represent +887 27: reference +888 27: refer +889 27: really +890 27: raw +891 27: primary +892 27: post +893 27: plus +894 27: play +895 27: platforms +896 27: operation +897 27: minimal +898 27: last +899 27: interesting +900 27: higher +901 27: graphical +902 27: expected +903 27: except +904 27: especially +905 27: enable +906 27: en +907 27: editor +908 27: containers +909 27: construction +910 27: constraints +911 27: cgi +912 27: author +913 26: wikipedia +914 26: who +915 26: website +916 26: unboxed +917 26: theory +918 26: service +919 26: scripts +920 26: returns +921 26: reactive +922 26: quickly +923 26: properly +924 26: otherwise +925 26: off +926 26: nodes +927 26: length +928 26: layer +929 26: latex +930 26: happstack +931 26: ftp +932 26: focus +933 26: flags +934 26: field +935 26: family +936 26: extensible +937 26: everything +938 26: equality +939 26: dealing +940 26: converting +941 26: constructors +942 26: constraint +943 26: config +944 26: conal +945 26: computing +946 26: compatibility +947 26: close +948 26: arrow +949 26: arithmetic +950 26: appropriate +951 26: abstraction +952 25: unique +953 25: tables +954 25: svg +955 25: starting +956 25: short +957 25: services +958 25: servers +959 25: render +960 25: records +961 25: primitives +962 25: people +963 25: originally +964 25: modular +965 25: maps +966 25: m +967 25: kind +968 25: issue +969 25: head +970 25: generators +971 25: finite +972 25: filter +973 25: fairly +974 25: extends +975 25: comparison +976 25: block +977 25: below +978 25: adding +979 24: widget +980 24: ways +981 24: us +982 24: therefore +983 24: sure +984 24: standalone +985 24: python +986 24: plugin +987 24: place +988 24: parses +989 24: outputs +990 24: nothing +991 24: notes +992 24: named +993 24: mtl +994 24: mostly +995 24: midi +996 24: manager +997 24: internally +998 24: instructions +999 24: h diff --git a/stack.yaml b/stack.yaml index 237839395d4..387dbc789ff 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,9 +1,14 @@ flags: + Cabal: + parsec-debug: false text: integer-simple: false + tar: + old-time: false packages: - Cabal/ - cabal-install/ +- experiment/parse/ extra-deps: - HTTP-4000.2.20 - mtl-2.2.1 @@ -36,4 +41,8 @@ extra-deps: - primitive-0.6 - transformers-compat-0.4.0.4 +# parse experiment +- vector-0.11.0.0 +- tar-0.4.2.1 + resolver: ghc-7.10