diff options
| author | Andrew <saintruler@gmail.com> | 2020-11-26 18:06:45 +0400 |
|---|---|---|
| committer | Andrew <saintruler@gmail.com> | 2020-11-26 18:06:45 +0400 |
| commit | 8464c5cec2e2cba0eae009826de0532675152c4e (patch) | |
| tree | 981d8db02b3e87d514ed8a0d97fdf533f5a04f35 | |
| parent | 6907a35ac265c4d4eeb127befea481a84e59ad4a (diff) | |
Added stack tool to project
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | CHANGELOG.md | 5 | ||||
| -rw-r--r-- | Http.hs | 7 | ||||
| -rw-r--r-- | Main.hs | 2 | ||||
| -rw-r--r-- | Utils.hs | 2 | ||||
| -rw-r--r-- | hask.cabal | 25 | ||||
| -rw-r--r-- | haskell-web.cabal | 19 | ||||
| -rw-r--r-- | hie.yaml | 2 | ||||
| -rw-r--r-- | stack.yaml | 67 |
9 files changed, 99 insertions, 33 deletions
@@ -1,2 +1,3 @@ +.stack-work dist-newstyle -*.save0
\ No newline at end of file +*.save*
\ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index d41f76e..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -# Revision history for hask - -## 0.1.0.0 -- YYYY-mm-dd - -* First version. Released on an unsuspecting world. @@ -0,0 +1,7 @@ +module Http where + +import Data.Text (Text) + +data Header = Header Text Text +data Method = GET | POST +data QueryPair = QueryPair Text Text @@ -1,10 +1,12 @@ module Main where import System.IO + import Response import Request import Router import Views +import Utils renderTemplate name = do template <- readTemplate name @@ -8,6 +8,8 @@ import qualified Data.Text as T import Data.Text.Encoding (encodeUtf8, decodeUtf8) import Data.Text (Text) +import Http + -- Query string parser decodeUrl :: Text -> Text diff --git a/hask.cabal b/hask.cabal deleted file mode 100644 index abc15ba..0000000 --- a/hask.cabal +++ /dev/null @@ -1,25 +0,0 @@ -cabal-version: >=1.10 --- Initial package description 'hask.cabal' generated by 'cabal init'. For --- further documentation, see http://haskell.org/cabal/users-guide/ - -name: hask -version: 0.1.0.0 --- synopsis: --- description: --- bug-reports: --- license: -license-file: LICENSE -author: Andrew Guschin -maintainer: saintruler@gmail.com --- copyright: --- category: -build-type: Simple -extra-source-files: CHANGELOG.md - -executable hask - main-is: Main.hs - -- other-modules: - -- other-extensions: - build-depends: base >=4.14 && <4.15 - -- hs-source-dirs: - default-language: Haskell2010 diff --git a/haskell-web.cabal b/haskell-web.cabal new file mode 100644 index 0000000..041d6e8 --- /dev/null +++ b/haskell-web.cabal @@ -0,0 +1,19 @@ +cabal-version: >=1.10 +-- Initial package description 'haskell-web.cabal' generated by 'cabal +-- init'. For further documentation, see +-- http://haskell.org/cabal/users-guide/ + +name: haskell-web +version: 0.1.0.0 +author: Andrew +maintainer: saintruler@gmail.com +build-type: Simple + +executable haskell-web + main-is: Main.hs + -- other-modules: + -- other-extensions: + build-depends: + base >=4.14 && <4.15, text, http-types, bytestring + -- hs-source-dirs: + default-language: Haskell2010 diff --git a/hie.yaml b/hie.yaml deleted file mode 100644 index 142e69f..0000000 --- a/hie.yaml +++ /dev/null @@ -1,2 +0,0 @@ -cradle: - stack:
\ No newline at end of file diff --git a/stack.yaml b/stack.yaml new file mode 100644 index 0000000..43c8738 --- /dev/null +++ b/stack.yaml @@ -0,0 +1,67 @@ +# This file was automatically generated by 'stack init' +# +# Some commonly used options have been documented as comments in this file. +# For advanced use and comprehensive documentation of the format, please see: +# https://docs.haskellstack.org/en/stable/yaml_configuration/ + +# Resolver to choose a 'specific' stackage snapshot or a compiler version. +# A snapshot resolver dictates the compiler version and the set of packages +# to be used for project dependencies. For example: +# +# resolver: lts-3.5 +# resolver: nightly-2015-09-21 +# resolver: ghc-7.10.2 +# +# The location of a snapshot can be provided as a file or url. Stack assumes +# a snapshot provided as a file might change, whereas a url resource does not. +# +# resolver: ./custom-snapshot.yaml +# resolver: https://example.com/snapshots/2018-01-01.yaml +resolver: + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2020/11/23.yaml + +# User packages to be built. +# Various formats can be used as shown in the example below. +# +# packages: +# - some-directory +# - https://example.com/foo/bar/baz-0.0.2.tar.gz +# subdirs: +# - auto-update +# - wai +packages: +- . +# Dependency packages to be pulled from upstream that are not in the resolver. +# These entries can reference officially published versions as well as +# forks / in-progress versions pinned to a git hash. For example: +# +# extra-deps: +# - acme-missiles-0.3 +# - git: https://github.com/commercialhaskell/stack.git +# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a +# +# extra-deps: [] + +# Override default flag values for local packages and extra-deps +# flags: {} + +# Extra package databases containing global packages +# extra-package-dbs: [] + +# Control whether we use the GHC we find on the path +# system-ghc: true +# +# Require a specific version of stack, using version ranges +# require-stack-version: -any # Default +# require-stack-version: ">=2.5" +# +# Override the architecture used by stack, especially useful on Windows +# arch: i386 +# arch: x86_64 +# +# Extra directories used by stack for building +# extra-include-dirs: [/path/to/dir] +# extra-lib-dirs: [/path/to/dir] +# +# Allow a newer minor version of GHC than the snapshot specifies +# compiler-check: newer-minor |