sequenceDiagram
participant Bors
participant Hydra
participant User
participant GitHub
participant BorsComment
participant Analyzer
participant Automation
participant Slack
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 MultiWayIf #-} | |
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} | |
{-# OPTIONS_GHC -Wno-unused-top-binds #-} | |
{-# HLINT ignore "Redundant multi-way if" #-} | |
module Counting () where | |
-- some values | |
type S a = [a] |
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
{-# OPTIONS_GHC -Wno-unused-top-binds #-} | |
module Counting () where | |
-- some values | |
type S a = [a] | |
-- any combining operation between 2 values (+, - , * ...) | |
type Op a = a -> a -> a |
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 MultiWayIf #-} | |
{-# LANGUAGE TupleSections #-} | |
{-# HLINT ignore "Redundant multi-way if" #-} | |
import Control.Monad.Fix (fix) | |
import Data.Array (Array, array) | |
import qualified Data.Array as A | |
levCachedArray :: Eq a => [a] -> [a] -> Int |
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 BlockArguments #-} | |
{-# LANGUAGE Rank2Types #-} | |
{-# LANGUAGE NoMonomorphismRestriction #-} | |
import Control.Monad.Fix (fix) | |
import Data.List (tails) | |
import Streaming (Of ((:>)), Stream) | |
import qualified Streaming.Prelude as S |
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 BlockArguments #-} | |
module CartesianProductEx where | |
import Control.Arrow ((***)) | |
import Data.List (sortOn) | |
import Test.Hspec (shouldBe) |
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 TypeApplications #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE ViewPatterns, TemplateHaskell #-} | |
module Data.Tracer where | |
import Data.Functor.Contravariant | |
import Data.Time (getCurrentTime) | |
import Control.Lens |
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
import Control.Applicative ((<|>)) | |
import Data.Attoparsec.Text hiding (match) | |
import Data.Text (Text) | |
atto :: Text -> Text -> Text -> Either String [Char] | |
atto x y = parseOnly $ untilWord x >> untilWord y | |
untilWord :: Text -> Parser [Char] | |
untilWord x = mempty <$ string x <|> (:) <$> anyChar <*> untilWord |
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
extract :: Eq a => [a] -> [a] -> [a] -> Maybe [a] | |
extract start end xs = do | |
ys <- snd <$> split start xs | |
fst <$> split end ys | |
split :: Eq a => [a] -> [a] -> Maybe ([a], [a]) | |
split p = go id | |
where | |
go _ [] = Nothing |
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 AllowAmbiguousTypes #-} | |
{-# LANGUAGE BlockArguments #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE TypeFamilies #-} | |
import Control.Lens -- (over) |