Skip to content

Commit

Permalink
Merge pull request #535 from fosskers/colin/rio
Browse files Browse the repository at this point in the history
RIO
  • Loading branch information
fosskers authored Feb 9, 2020
2 parents 98ae5f7 + 802972f commit 93f722c
Show file tree
Hide file tree
Showing 40 changed files with 710 additions and 798 deletions.
18 changes: 10 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
dist/
dist-newstyle/
*.dump-hi
*.hi
*.o
*.prof
*.svg
*.txt
.cabal-sandbox
cabal.sandbox.config
build/
.stack-work/*
*.svg
*.prof
AUR-SECURITY.*
TAGS
build/
cabal.sandbox.config
dist-newstyle/
dist/
flames
*.txt
*.dump-hi
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ addons:
# The different configurations we want to test. You could also do things like
# change flags or use --stack-yaml to point to a different file.
env:
- ARGS="--resolver lts-14.3"
- ARGS="--resolver lts-14.23"

before_install:
# Download and unpack the stack executable
Expand Down
2 changes: 0 additions & 2 deletions aur-security/Main.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TupleSections #-}

Expand Down
9 changes: 2 additions & 7 deletions aur/lib/Linux/Arch/Aur.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ module Linux.Arch.Aur
) where

import Control.Applicative ((<|>))
import Control.Monad (mzero)
import Data.Aeson
import Data.Proxy
import Data.Text (Text)
Expand All @@ -40,14 +39,12 @@ data RPCResp = RPCResp
, _results :: [AurInfo] } deriving (Show)

instance FromJSON RPCResp where
parseJSON (Object v) = RPCResp
parseJSON = withObject "RPCResp" $ \v -> RPCResp
<$> v .: "version"
<*> v .: "type"
<*> v .: "resultcount"
<*> v .: "results"

parseJSON _ = mzero

-- | All relevant information about an AUR package.
data AurInfo = AurInfo
{ aurIdOf :: Int
Expand All @@ -73,7 +70,7 @@ data AurInfo = AurInfo
, keywordsOf :: [Text] } deriving (Eq,Show)

instance FromJSON AurInfo where
parseJSON (Object v) = AurInfo
parseJSON = withObject "AurInfo" $ \v -> AurInfo
<$> v .: "ID"
<*> v .: "Name"
<*> v .: "PackageBaseID"
Expand All @@ -96,8 +93,6 @@ instance FromJSON AurInfo where
<*> v .:? "License" .!= []
<*> v .:? "Keywords" .!= []

parseJSON _ = mzero

instance ToJSON AurInfo where
toJSON ai = object
[ "ID" .= aurIdOf ai
Expand Down
4 changes: 4 additions & 0 deletions aura/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Aura Changelog

## 2.0.4 (2020-02-08)

- Removed `fused-effects` dependency in favour of `rio` to simplify code.

## 2.0.3

- Updated Spanish translations. Thanks to Max Ferrer!
Expand Down
30 changes: 14 additions & 16 deletions aura/aura.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.2
name: aura
version: 2.0.3
version: 2.0.4
synopsis:
A secure package manager for Arch Linux and the AUR, written in Haskell.

Expand All @@ -12,7 +12,7 @@ description:
AUR package managers.

category: System
homepage: https://github.com/aurapm/aura
homepage: https://github.com/fosskers/aura
author: Colin Woodbury
maintainer: [email protected]
license: GPL-3.0-only
Expand All @@ -34,22 +34,21 @@ common commons
-funclutter-valid-hole-fits

build-depends:
, base >=4.12 && <5
, base-prelude >=1.2 && <1.4
, bytestring ^>=0.10
, containers ^>=0.6
, microlens ^>=0.4
, paths ^>=0.2
, text ^>=1.2
, versions ^>=3.5
, base >=4.12 && <5
, bytestring ^>=0.10
, containers ^>=0.6
, microlens ^>=0.4
, paths ^>=0.2
, rio ^>=0.1.13
, text ^>=1.2
, versions ^>=3.5

common libexec
build-depends:
, errors ^>=2.3
, fused-effects >=0.4 && <1.1
, http-client >=0.5 && <0.7
, nonempty-containers ^>=0.3
, prettyprinter >=1.2 && < 1.6
, prettyprinter >=1.2 && <1.6
, prettyprinter-ansi-terminal ^>=1.1
, transformers ^>=0.5
, typed-process ^>=0.2
Expand Down Expand Up @@ -93,9 +92,8 @@ library
, algebraic-graphs >=0.1 && <0.5
, aur ^>=6.3
, compactable ^>=0.1
, directory ^>=1.3
, filepath ^>=1.4
, generic-lens >=1.1 && < 1.3
, generic-lens >=1.1 && <1.3
, http-types >=0.9 && <0.13
, language-bash ^>=0.8
, megaparsec ^>=7
Expand All @@ -106,7 +104,7 @@ library
, semigroupoids >=5.2 && <5.4
, stm ^>=2.5
, these ^>=1.0
, time >=1.8 && < 1.10
, time >=1.8 && <1.10
, unliftio ^>=0.2

executable aura
Expand All @@ -121,7 +119,7 @@ executable aura
build-depends:
, aura
, http-client-tls ^>=0.3
, optparse-applicative >=0.14 && < 0.16
, optparse-applicative >=0.14 && <0.16
, pretty-simple >=2.1 && <3.3

test-suite aura-test
Expand Down
Loading

0 comments on commit 93f722c

Please sign in to comment.