From 8257ab61a40eb4d61a3ee6345af78f55635b7789 Mon Sep 17 00:00:00 2001 From: Qiao Wang Date: Wed, 20 Jul 2022 21:28:49 +0800 Subject: [PATCH] Update config & support default extensions --- .github/workflows/release.yaml | 2 +- package.yaml | 5 +++ src/Stargaze/Aggregate.hs | 2 -- src/Stargaze/Command.hs | 2 -- src/Stargaze/Manage.hs | 1 - src/Stargaze/Types.hs | 3 -- stack.yaml | 64 ++-------------------------------- stack.yaml.lock | 3 +- 8 files changed, 9 insertions(+), 73 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3fd7288..f0195a9 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,7 @@ jobs: asset_name: stargaze-linux-amd64 - os: windows-latest artifact_name: stargaze.exe - asset_name: stargaze-windows-amd64 + asset_name: stargaze-windows-amd64.exe - os: macos-latest artifact_name: stargaze asset_name: stargaze-macos-amd64 diff --git a/package.yaml b/package.yaml index 436382f..047fcff 100644 --- a/package.yaml +++ b/package.yaml @@ -12,6 +12,11 @@ extra-source-files: description: Please see the README on GitHub at +default-extensions: +- OverloadedStrings +- LambdaCase +- DeriveGeneric + dependencies: - base >= 4.7 && < 5 - aeson diff --git a/src/Stargaze/Aggregate.hs b/src/Stargaze/Aggregate.hs index fbfa437..2f49b08 100644 --- a/src/Stargaze/Aggregate.hs +++ b/src/Stargaze/Aggregate.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE OverloadedStrings #-} - module Stargaze.Aggregate ( aggregate, MergeMap (..), diff --git a/src/Stargaze/Command.hs b/src/Stargaze/Command.hs index 100b7db..2eafc56 100644 --- a/src/Stargaze/Command.hs +++ b/src/Stargaze/Command.hs @@ -1,5 +1,3 @@ -{-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE LambdaCase #-} module Stargaze.Command where import Data.Text (Text) diff --git a/src/Stargaze/Manage.hs b/src/Stargaze/Manage.hs index 8f00d94..48decb1 100644 --- a/src/Stargaze/Manage.hs +++ b/src/Stargaze/Manage.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Stargaze.Manage diff --git a/src/Stargaze/Types.hs b/src/Stargaze/Types.hs index df03332..b79d4d9 100644 --- a/src/Stargaze/Types.hs +++ b/src/Stargaze/Types.hs @@ -1,6 +1,3 @@ -{-# LANGUAGE DeriveGeneric #-} -{-# LANGUAGE OverloadedStrings #-} - module Stargaze.Types where import Control.Monad (MonadPlus (mzero)) diff --git a/stack.yaml b/stack.yaml index 721e079..0aec0f9 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,67 +1,7 @@ -# 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: lts-19.15 -# 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.7" -# -# 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 +ghc-options: + "$everything": -split-sections diff --git a/stack.yaml.lock b/stack.yaml.lock index a62fce9..33b6233 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -9,5 +9,4 @@ snapshots: size: 618952 url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/15.yaml sha256: 82e5ccb47b068521de4055034e8aa278eab430b586881d9cc29ba8b382ce3253 - original: - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/15.yaml + original: lts-19.15