mps 2009.11.7 → 2010.1.24
raw patch · 4 files changed
+10/−70 lines, 4 filesdep −base64-stringdep −interpolatedstring-qqdep −zlib
Dependencies removed: base64-string, interpolatedstring-qq, zlib
Files
- mps.cabal +4/−5
- src/MPS/Extra.hs +6/−3
- src/MPS/Heavy.hs +0/−54
- src/MPS/TH.hs +0/−8
mps.cabal view
@@ -1,5 +1,5 @@ Name: mps-Version: 2009.11.7+Version: 2010.1.24 Build-type: Simple Synopsis: simply oo Description: DSL that allows one to write Haskell from left to right@@ -15,13 +15,12 @@ library ghc-options: -Wall- build-depends: base >= 4 && < 5, containers, array, parallel, old-time, time, bytestring >= 0.9, regexpr >= 0.3.4, parsec >= 2, utf8-string >= 0.3.3, directory, interpolatedstring-qq, base64-string, zlib, old-locale, filepath, template-haskell+ build-depends: base >= 4 && < 5, containers, array, parallel, old-time, time, bytestring >= 0.9, regexpr >= 0.3.4, parsec >= 2, utf8-string >= 0.3.3, directory, old-locale, filepath, template-haskell hs-source-dirs: src/- exposed-modules: MPS+ exposed-modules: + MPS , MPSUTF8 , MPS.Light , MPS.Extra- , MPS.Heavy- , MPS.TH , MPS.Env other-modules: MPS.UTF8
src/MPS/Extra.hs view
@@ -49,10 +49,13 @@ splash_date = toGregorian -- String-split :: String -> String -> [String]-split re xs- | xs.match re .isJust = splitRegexPR re xs .reject empty+split_raw :: String -> String -> [String]+split_raw re xs+ | xs.match re .isJust = splitRegexPR re xs | otherwise = [xs]++split :: String -> String -> [String]+split re xs = split_raw re xs .reject empty split' :: String -> [String] split' s = s.lines.reject empty
− src/MPS/Heavy.hs
@@ -1,54 +0,0 @@-module MPS.Heavy where--import Codec.Binary.Base64.String as C-import Data.Char-import MPS.Light-import Prelude hiding ((.), (^), (>), (<), (/), elem, foldl)-import qualified Prelude as P-import Text.ParserCombinators.Parsec (many, char, many1, digit, (<|>), Parser, anyChar, try)-import qualified Codec.Compression.GZip as GZip-import qualified Data.ByteString.Lazy.Char8 as B-import qualified Text.ParserCombinators.Parsec as P----- compress--zip64, unzip64 :: String -> String-zip64 = B.pack > GZip.compress > B.unpack > C.encode-unzip64 = C.decode > B.pack > GZip.decompress > B.unpack- --- Parser-parse :: P.GenParser tok () a -> [tok] -> a-parse p s = case (P.parse p "" s) of- Left err -> err.show.error- Right x -> x----- XML-unescape_xml, escape_xml :: String -> String-unescape_xml s = parse unescape_parser s- where- unicode_char :: Parser Char- unicode_char = do- char '&'- char '#'- word <- many1 digit- char ';'- return $ chr (read word)-- unescape_parser :: Parser String- unescape_parser = many (try unicode_char <|> anyChar)--escape_xml = concatMap fixChar- where- fixChar '<' = "<"- fixChar '>' = ">"- fixChar '&' = "&"- fixChar '"' = "\""- fixChar c | ord c P.< 0x80 = [c]- fixChar c = "&#" ++ show (ord c) ++ ";"---- backward compatible-unescape_unicode_xml, escape_unicode_xml :: String -> String-unescape_unicode_xml = unescape_xml-escape_unicode_xml = escape_xml
− src/MPS/TH.hs
@@ -1,8 +0,0 @@-module MPS.TH where--import Language.Haskell.TH.Quote (QuasiQuoter)-import Text.InterpolatedString.QQ---- QQ-here :: QuasiQuoter-here = istr