This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
checking for a BSD-compatible install... /builddir/.xbps-network-manager-applet/wrappers/install -c | |
checking whether build environment is sane... yes | |
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p | |
checking for gawk... gawk | |
checking whether make sets $(MAKE)... yes | |
checking whether make supports nested variables... yes | |
checking whether to enable maintainer-specific portions of Makefiles... yes | |
checking whether make supports nested variables... (cached) yes | |
checking for x86_64-unknown-linux-gnu-gcc... cc | |
checking whether the C compiler works... yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
couponFields :: [FieldName] | |
couponFields = | |
[ FieldName "type" | |
, FieldName "code" | |
, FieldName "status" | |
, FieldName "createdBy.fullName" | |
, FieldName "createdBy.email" | |
, FieldName "createdBy.username" | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- from purescript-argonaut https://github.com/purescript-contrib/purescript-argonaut-codecs/blob/master/src/Data/Argonaut/Combinators.purs#L34-L35 | |
-- obj .? "foo" | |
(.?) :: forall a. (DecodeJson a) => JObject -> String -> Either String a | |
(.?) o s = maybe (Left $ "Expected field " ++ show s) decodeJson (M.lookup s o) | |
-- I would like to do something like | |
-- obj `at` ["foo", "bar"] | |
at :: forall a. (DecodeJson a) => JObject -> Array String -> Either String a | |
at obj fields = fold (.?) obj (reverse fields) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var assert = require('assert') | |
var inversions = require('Inversions').inversions | |
var list = require('Data.List') | |
describe('The inversion counting function', function() { | |
it('should find an inversion', function () { | |
assert.equal(inversions(list.Cons.create(1)(list.Cons.create(2)(list.Cons.create(3)(list.Cons.create(4)(list.Nil.value))))), 0) | |
assert.equal(inversions(list.Cons.create(2)(list.Cons.create(1)(list.Cons.create(3)(list.Cons.create(4)(list.Nil.value))))), 1) | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
logical_operator:"and", | |
conditions:[ | |
{ | |
path:"asset", | |
relation:"is", | |
values:[ | |
{ | |
type:"value", | |
id:4325 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data ConditionValues a b c = I a | T b | S c | |
deriving (Eq, Ord, Read, Show) | |
instance (ToJSON a, ToJSON b, ToJSON c) => ToJSON (ConditionValues a b c) where | |
toJSON (I a) = toJSON a | |
toJSON (T b) = toJSON b | |
toJSON (S b) = toJSON b | |
instance (FromJSON a, FromJSON b, FromJSON c) => FromJSON (ConditionValues a b c) where | |
-- parseJSON f = I <$> parseJSON f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Filters = Filters | |
{ logicalOperator :: Text | |
, conditions :: [Condition | Filters] | |
} deriving (Show, Eq, Generic) | |
instance ToJSON Filters where | |
toJSON = genericToJSON $ aesonDrop 0 snakeCase | |
instance FromJSON Filters where | |
parseJSON = genericParseJSON $ aesonDrop 0 snakeCase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
'conditions':[ | |
{ | |
'values':[ | |
'ip' | |
], | |
'path':'sg_status_list', | |
'relation':'is' | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE DeriveDataTypeable #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE FlexibleContexts #-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- , enter | |
- , (:~>)(..) | |
- -- ** `Nat` utilities | |
- , liftNat | |
- , runReaderTNat | |
- , evalStateTLNat | |
- , evalStateTSNat | |
- , logWriterTLNat | |
- , logWriterTSNat | |
- -- ** Functions based on <https://hackage.haskell.org/package/mmorph mmorph> |
NewerOlder