Skip to content

Instantly share code, notes, and snippets.

import Data.List (foldl', tails)
import Data.Map.Internal.Debug
import qualified Data.Map.Strict as M
import Data.Maybe
import Data.Monoid
import qualified Data.Set as S
data TrieValue v
= TrieValue
{ next :: Trie v
import Data.List (foldl', tails)
import Data.Map.Internal.Debug
import qualified Data.Map.Strict as M
import Data.Maybe
import Data.Monoid
import qualified Data.Set as S
data TrieValue v
= TrieValue
{ next :: Trie v
import Data.List (foldl', tails)
import Data.Map.Internal.Debug
import qualified Data.Map.Strict as M
import Data.Maybe
import Data.Monoid
import qualified Data.Set as S
data TrieValue v
= TrieValue
{ next :: Trie v
import Data.List (foldl', tails)
import Data.Map.Internal.Debug
import qualified Data.Map.Strict as M
import Data.Maybe
import Data.Monoid
import qualified Data.Set as S
data TrieValue v
= TrieValue
{ next :: Trie v
@dmjio
dmjio / rbt.hs
Created October 9, 2022 19:18 — forked from abiodun0/rbt.hs
Red black tree, Haskell
module RedBlackTree
(
Tree,
empty,
member,
insert)
where
data Color = R | B deriving Show
> natVal (Proxy :: Proxy (10 * 10))
<interactive>:280:25-31: error:
• Expected kind ‘* -> Natural -> k0’, but ‘10’ has kind ‘Natural’
• In the first argument of ‘Proxy’, namely ‘(10 (*) 10)’
In an expression type signature: Proxy (10 (*) 10)
In the first argument of ‘natVal’, namely
‘(Proxy :: Proxy (10 (*)
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE DataKinds #-}
import GHC.TypeLits
-- λ> :kind! F "Foo_" "Foo_Bar"
-- F "Foo_" "Foo_Bar" :: Symbol
-- = "bar"
################################################################################
# GitLab docs on types of pipelines:
# https://docs.gitlab.com/ee/ci/pipelines/pipeline_architectures.html
#
# This one is set to be a basic pipeline of the following steps:
#
# build binaries -> test binaries -> build and push image -> deploy image
#
# we do fan out during deploy and push to all environments at once since our
# deployes are driven by infra changes

Haskell Survey

Proficiency scale

  1. Not aware of the feature/concept/package in question, what it is or when to use it. Reading the description of this feature/concept/package is the first time I've heard of it.
  2. Have heard of said feature/concept/package, vaguely familiar with usage, not familiar with implementation.
  3. Moderate usage, familiar with best practices, have used in personal projects or on the job.
  4. Used feature/concept/package heavily, know when to use, advanced understanding.
  5. Commanding understanding of the feature/concept/package, comprehensive knowledge of trade-offs to make with said feature/concept/package. She knows when not to use it, expert level understanding and familiarity with implementation, can create pedagoical implementation where/if applicable.
module Main where
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.Char8 as BL8
import System.Environment
import Debug.Trace
main :: IO ()
main = do
fileName:currentPath:newPath:[] <- getArgs