Code Monkey home page Code Monkey logo

hweblib's Introduction

hweblib

Build Status

hweblib on Hackage

The library includes attoparsec based incremental parsers for below RFCs:

  • rfc2045.hs: Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies
  • rfc2046.hs: Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types
  • rfc2183.hs: Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field
  • rfc2234.hs: Augmented BNF for Syntax Specifications: ABNF
  • rfc2388.hs: Returning Values from Forms: multipart/form-data
  • rfc2822.hs: Internet Message Format
  • rfc3986.hs: Uniform Resource Identifier (URI): Generic Syntax
  • rfc4647.hs: Matching of Language Tags
  • rfc5234.hs: Augmented BNF for Syntax Specifications: ABNF
  • rfc5322.hs: Internet Message Format
  • rfc5646.hs: Tags for Identifying Languages
  • rfc7230.hs: Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing
  • rfc7231.hs: Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
  • rfc7232.hs: Hypertext Transfer Protocol (HTTP/1.1): Conditional Requests
  • rfc7233.hs: Hypertext Transfer Protocol (HTTP/1.1): Range Requests
  • rfc7234.hs: Hypertext Transfer Protocol (HTTP/1.1): Caching
  • rfc7235.hs: Hypertext Transfer Protocol (HTTP/1.1): Authentication

Doctests and HUnit tests are included within the distribution.

A small benchmark program is included in the package which parses a very long uri and a GET request.

Contact Information

Aycan iRiCAN [email protected]

hweblib's People

Contributors

aycanirican avatar utdemir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

tatac1 sboehme

hweblib's Issues

Test suite build failure w/ C preprocessor

Build failure with GHC 8.2.1 as seen on the Stackage build server.

1: ./Setup build (pending: 1312, failures: 21)

Building test suite 'testsuite' for hweblib-0.6.3..

src/Network/Parser/Mime.hs:23:0: error:
     error: missing binary operator before token "("
     #if MIN_VERSION_text(0,11,3)
     ^
   |
23 | #if MIN_VERSION_text(0,11,3)
   | ^
`gcc' failed in phase `C pre-processor'. (Exit code: 1)

Build failure: missing decodeLatin1

Discovered during a Stackage build. Build log:

Component build order: library
creating dist/build
creating dist/build/autogen
Building hweblib-0.6.1...
Preprocessing library hweblib-0.6.1...
Building library...
'/opt/ghc-7.4.2/bin/ghc' '--info'
'/opt/ghc-7.4.2/bin/ghc' '--info'
creating dist/build
/opt/ghc-7.4.2/bin/ghc --make -fbuilding-cabal-package -O -outputdir dist/build -odir dist/build -hidir dist/build -stubdir dist/build -i -idist/build -isrc -idist/build/autogen -Idist/build/autogen -Idist/build -optP-include -optPdist/build/autogen/cabal_macros.h -package-name hweblib-0.6.1 -hide-all-packages -no-user-package-conf -package-conf /var/lib/jenkins/workspace/Stackage with GHC 7.4.2/stackage/sandbox/package-db -package-conf dist/package.conf.inplace -package-id attoparsec-0.11.1.0-58b4530494ffa9c26977f6729e9e642a -package-id base-4.5.1.0-66f22db3dfcd87541c9c7e50e7095d26 -package-id bytestring-0.9.2.1-503e91bb155301fdb1956cb5c26ce6e9 -package-id containers-0.4.2.1-75f143aa39a3e77a1ce2300025bdd8ce -package-id mtl-2.1.2-02e701f9b1590ee88a0b5b0bd5d93a29 -package-id text-0.11.2.3-db61832d0c4660614c4ceff234ed4abb -package-id transformers-0.3.0.0-8e66ecc7d4dae2b07b2b5406908c70e4 -XHaskell2010 Network.Types Network.Http Network.Parser.RfcCommon Network.Parser.Rfc2234 Network.Parser.Rfc2822 Network.Parser.Rfc2045 Network.Parser.Rfc2046 Network.Parser.Rfc3986 Network.Parser.Rfc2616 Network.Parser.Mime -O2 -Wall -fwarn-tabs -funbox-strict-fields -threaded -fno-warn-unused-do-bind
[ 1 of 10] Compiling Network.Parser.Rfc2234 ( src/Network/Parser/Rfc2234.hs, dist/build/Network/Parser/Rfc2234.o )
[ 2 of 10] Compiling Network.Parser.RfcCommon ( src/Network/Parser/RfcCommon.hs, dist/build/Network/Parser/RfcCommon.o )

src/Network/Parser/RfcCommon.hs:11:1:
    Warning: The import of `Data.Attoparsec.ByteString' is redundant
               except perhaps to import instances from `Data.Attoparsec.ByteString'
             To import instances alone, use: import Data.Attoparsec.ByteString()

src/Network/Parser/RfcCommon.hs:12:1:
    Warning: The import of `Data.Attoparsec.Char8' is redundant
               except perhaps to import instances from `Data.Attoparsec.Char8'
             To import instances alone, use: import Data.Attoparsec.Char8()

src/Network/Parser/RfcCommon.hs:13:1:
    Warning: The import of `Data.Attoparsec.Combinator' is redundant
               except perhaps to import instances from `Data.Attoparsec.Combinator'
             To import instances alone, use: import Data.Attoparsec.Combinator()

src/Network/Parser/RfcCommon.hs:89:1:
    Warning: Top-level binding with no type signature:
               word8l :: Word8
                         -> attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                              ByteString [Word8]

src/Network/Parser/RfcCommon.hs:92:1:
    Warning: Top-level binding with no type signature:
               toRepr :: [Word8] -> [Char]
[ 3 of 10] Compiling Network.Parser.Rfc2822 ( src/Network/Parser/Rfc2822.hs, dist/build/Network/Parser/Rfc2822.o )

src/Network/Parser/Rfc2822.hs:14:1:
    Warning: The import of `Data.ByteString.Char8' is redundant
               except perhaps to import instances from `Data.ByteString.Char8'
             To import instances alone, use: import Data.ByteString.Char8()

src/Network/Parser/Rfc2822.hs:16:1:
    Warning: The import of `Data.ByteString.Internal' is redundant
               except perhaps to import instances from `Data.ByteString.Internal'
             To import instances alone, use: import Data.ByteString.Internal()

src/Network/Parser/Rfc2822.hs:18:1:
    Warning: The import of `Data.Map' is redundant
               except perhaps to import instances from `Data.Map'
             To import instances alone, use: import Data.Map()

src/Network/Parser/Rfc2822.hs:27:1:
    Warning: Top-level binding with no type signature:
               no_ws_ctlPred :: Word8 -> Bool

src/Network/Parser/Rfc2822.hs:28:1:
    Warning: Top-level binding with no type signature:
               no_ws_ctl :: Parser Word8

src/Network/Parser/Rfc2822.hs:31:1:
    Warning: Top-level binding with no type signature:
               Network.Parser.Rfc2822.text :: Parser Word8

src/Network/Parser/Rfc2822.hs:81:1:
    Warning: Top-level binding with no type signature:
               cfws :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                         ByteString [Word8]

src/Network/Parser/Rfc2822.hs:84:1:
    Warning: Top-level binding with no type signature:
               atextPred :: Word8 -> Bool

src/Network/Parser/Rfc2822.hs:85:1:
    Warning: Top-level binding with no type signature:
               atext :: Parser Word8

src/Network/Parser/Rfc2822.hs:107:1:
    Warning: Top-level binding with no type signature:
               qcontent :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                             ByteString [Word8]

src/Network/Parser/Rfc2822.hs:108:1:
    Warning: Top-level binding with no type signature:
               quoted_string :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                                  ByteString [Word8]

src/Network/Parser/Rfc2822.hs:121:1:
    Warning: Top-level binding with no type signature:
               word :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                         ByteString [Word8]

src/Network/Parser/Rfc2822.hs:125:1:
    Warning: Top-level binding with no type signature:
               utext :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                          ByteString Word8

src/Network/Parser/Rfc2822.hs:163:1:
    Warning: Top-level binding with no type signature:
               display_name :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                                 ByteString [Word8]

src/Network/Parser/Rfc2822.hs:166:1:
    Warning: Top-level binding with no type signature:
               mailbox_list :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                                 ByteString [NameAddress]

src/Network/Parser/Rfc2822.hs:167:1:
    Warning: Top-level binding with no type signature:
               address_list :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                                 ByteString [[NameAddress]]

src/Network/Parser/Rfc2822.hs:173:1:
    Warning: Top-level binding with no type signature:
               local_part :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                               ByteString [Word8]

src/Network/Parser/Rfc2822.hs:174:1:
    Warning: Top-level binding with no type signature:
               domain :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                           ByteString [Word8]

src/Network/Parser/Rfc2822.hs:175:1:
    Warning: Top-level binding with no type signature:
               domain_literal :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                                   ByteString [Word8]

src/Network/Parser/Rfc2822.hs:181:1:
    Warning: Top-level binding with no type signature:
               dcontent :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                             ByteString [Word8]

src/Network/Parser/Rfc2822.hs:185:1:
    Warning: Top-level binding with no type signature:
               dtextPred :: Word8 -> Bool

src/Network/Parser/Rfc2822.hs:186:1:
    Warning: Top-level binding with no type signature:
               dtext :: Parser Word8

src/Network/Parser/Rfc2822.hs:190:1:
    Warning: Top-level binding with no type signature:
               message_id :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                               ByteString [Word8]

src/Network/Parser/Rfc2822.hs:192:1:
    Warning: Top-level binding with no type signature:
               msg_id :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                           ByteString [Word8]

src/Network/Parser/Rfc2822.hs:207:1:
    Warning: Top-level binding with no type signature:
               no_fold_quote :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                                  ByteString [Word8]

src/Network/Parser/Rfc2822.hs:213:1:
    Warning: Top-level binding with no type signature:
               no_fold_literal :: attoparsec-0.11.1.0:Data.Attoparsec.Internal.Types.Parser
                                    ByteString [Word8]
[ 4 of 10] Compiling Network.Parser.Rfc2045 ( src/Network/Parser/Rfc2045.hs, dist/build/Network/Parser/Rfc2045.o )

src/Network/Parser/Rfc2045.hs:14:1:
    Warning: The import of `Data.ByteString.Internal' is redundant
               except perhaps to import instances from `Data.ByteString.Internal'
             To import instances alone, use: import Data.ByteString.Internal()

src/Network/Parser/Rfc2045.hs:20:1:
    Warning: The import of `comment'
             from module `Network.Parser.Rfc2822' is redundant

src/Network/Parser/Rfc2045.hs:33:1:
    Warning: Top-level binding with no type signature:
               mimePartHeaders :: Parser [Header]
[ 5 of 10] Compiling Network.Parser.Mime ( src/Network/Parser/Mime.hs, dist/build/Network/Parser/Mime.o )

src/Network/Parser/Mime.hs:46:62: Not in scope: `TE.decodeLatin1'

src/Network/Parser/Mime.hs:56:38: Not in scope: `TE.decodeLatin1'

src/Network/Parser/Mime.hs:56:58: Not in scope: `TE.decodeLatin1'

src/Network/Parser/Mime.hs:57:12: Not in scope: `TE.decodeLatin1'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.