Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checkin cabal #158

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.stack-work/
cql.cabal
http/cql-http.cabal
*~
.DS_Store
*.yaml#
*.cql#
dist-newstyle/

132 changes: 132 additions & 0 deletions cql.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
cabal-version: 1.12

-- This file has been generated from package.yaml by hpack version 0.35.1.
--
-- see: https://github.com/sol/hpack

name: cql
version: 0.1.0.0
description: Please see the README on GitHub at <https://github.com/statebox/cql#readme>
homepage: https://github.com/statebox/cql#readme
bug-reports: https://github.com/statebox/cql/issues
author: Statebox
maintainer: Statebox
copyright: 2019 Statebox
license: AGPL
build-type: Simple
extra-source-files:
README.md

source-repository head
type: git
location: https://github.com/statebox/cql

library
exposed-modules:
Language.CQL
Language.CQL.Collage
Language.CQL.Common
Language.CQL.Congruence
Language.CQL.Graph
Language.CQL.Instance
Language.CQL.Instance.Algebra
Language.CQL.Instance.Presentation
Language.CQL.Internal
Language.CQL.Mapping
Language.CQL.Morphism
Language.CQL.Options
Language.CQL.Parser.Instance
Language.CQL.Parser.LexerRules
Language.CQL.Parser.Mapping
Language.CQL.Parser.Parser
Language.CQL.Parser.Program
Language.CQL.Parser.ReservedWords
Language.CQL.Parser.Schema
Language.CQL.Parser.Transform
Language.CQL.Parser.Typeside
Language.CQL.Program
Language.CQL.Prover
Language.CQL.Query
Language.CQL.Schema
Language.CQL.Term
Language.CQL.Transform
Language.CQL.Typeside
other-modules:
Paths_cql
hs-source-dirs:
src
ghc-options: -Weverything -Werror -Wno-implicit-prelude -Wno-missing-export-lists -Wno-missing-import-lists -Wno-safe -Wno-missing-safe-haskell-mode -Wno-missing-local-signatures -Wno-unsafe -Wno-monomorphism-restriction -Wno-unused-type-patterns -Wno-name-shadowing -Wno-prepositive-qualified-module -Wno-unused-packages
build-depends:
PropLogic >=0.9.0.4
, QuickCheck
, base >=4.7 && <5
, containers
, deepseq
, fgl >=5.5
, megaparsec
, mtl >=2.0
, pretty
, scientific
, semigroups
, tabular
, term-rewriting
, twee-lib
, union-find ==0.2.*
default-language: Haskell2010

executable cql
main-is: Main.hs
other-modules:
Paths_cql
hs-source-dirs:
cli
ghc-options: -Weverything -Werror -Wno-implicit-prelude -Wno-missing-export-lists -Wno-missing-import-lists -Wno-safe -Wno-missing-safe-haskell-mode -Wno-missing-local-signatures -Wno-unsafe -Wno-monomorphism-restriction -Wno-unused-type-patterns -Wno-name-shadowing -Wno-prepositive-qualified-module -Wno-unused-packages -threaded -rtsopts -with-rtsopts=-N
build-depends:
PropLogic >=0.9.0.4
, QuickCheck
, base >=4.7 && <5
, containers
, cql
, deepseq
, fgl >=5.5
, megaparsec
, mtl >=2.0
, pretty
, scientific
, semigroups
, tabular
, term-rewriting
, twee-lib
, union-find ==0.2.*
default-language: Haskell2010

test-suite cql-test
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
CQLSpec
Language.CQL.Parser.Generator
Parser.ParserSpec
Paths_cql
hs-source-dirs:
test
ghc-options: -Weverything -Werror -Wno-implicit-prelude -Wno-missing-export-lists -Wno-missing-import-lists -Wno-safe -Wno-missing-safe-haskell-mode -Wno-missing-local-signatures -Wno-unsafe -Wno-monomorphism-restriction -Wno-unused-type-patterns -Wno-name-shadowing -Wno-prepositive-qualified-module -Wno-unused-packages -threaded -rtsopts -with-rtsopts=-N
build-depends:
PropLogic >=0.9.0.4
, QuickCheck
, base >=4.7 && <5
, containers
, cql
, deepseq
, fgl >=5.5
, hspec
, megaparsec
, mtl >=2.0
, pretty
, scientific
, semigroups
, tabular
, term-rewriting
, twee-lib
, union-find ==0.2.*
default-language: Haskell2010
54 changes: 0 additions & 54 deletions cql.nix

This file was deleted.

86 changes: 0 additions & 86 deletions default.nix

This file was deleted.

41 changes: 41 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
# This is a template created by `hix init`
inputs.haskellNix.url = "github:input-output-hk/haskell.nix";
inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils, haskellNix }:
let
supportedSystems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
in
flake-utils.lib.eachSystem supportedSystems (system:
let
overlays = [ haskellNix.overlay
(final: prev: {
hixProject =
final.haskell-nix.hix.project {
src = ./.;
evalSystem = "x86_64-darwin";
};
})
];
pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; };
flake = pkgs.hixProject.flake {};
in flake // {
legacyPackages = pkgs;
});

# --- Flake Local Nix Configuration ----------------------------
nixConfig = {
# This sets the flake to use the IOG nix cache.
# Nix should ask for permission before using it,
# but remove it here if you do not want it to.
extra-substituters = ["https://cache.iog.io"];
extra-trusted-public-keys = ["hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="];
allow-import-from-derivation = "true";
};
}
3 changes: 2 additions & 1 deletion http/src/Api/Config/Environment.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-}
{-# LANGUAGE DerivingStrategies #-}
module Api.Config.Environment where

-- wai
Expand All @@ -29,7 +30,7 @@ import Network.Wai.Middleware.RequestLogger (logStdout, logStdoutDev)
data Environment
= Development
| Production
deriving (Show, Read)
deriving stock (Show, Read)

logger :: Environment -> Middleware
logger Development = logStdoutDev
Expand Down
17 changes: 17 additions & 0 deletions nix/hix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{pkgs, ...}: {
# name = "project-name";
compiler-nix-name = "ghc8107"; # Version of GHC to use

# Cross compilation support:
# crossPlatforms = p: pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86_64 ([
# p.mingwW64
# p.ghcjs
# ] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux [
# p.musl64
# ]);

# Tools to include in the development shell
shell.tools.cabal = "latest";
# shell.tools.hlint = "latest";
# shell.tools.haskell-language-server = "latest";
}
3 changes: 3 additions & 0 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,14 @@ ghc-options:
- -Wno-missing-export-lists
- -Wno-missing-import-lists
- -Wno-safe
- -Wno-missing-safe-haskell-mode
- -Wno-missing-local-signatures
- -Wno-unsafe
- -Wno-monomorphism-restriction
- -Wno-unused-type-patterns
- -Wno-name-shadowing
- -Wno-prepositive-qualified-module
- -Wno-unused-packages

executables:
cql:
Expand Down
Loading