This file contains hidden or 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 GADTs, TypeFamilies, DeriveFunctor, LambdaCase #-} | |
module Hylo | |
where | |
import Data.Functor.Foldable | |
import Data.List | |
data TreeF a r = Leaf | Node a r r deriving (Functor, Show) |
This file contains hidden or 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
Resources: | |
MyVPCAFB07A31: | |
Type: AWS::EC2::VPC | |
Properties: | |
CidrBlock: 10.0.0.0/16 | |
EnableDnsHostnames: true | |
EnableDnsSupport: true | |
InstanceTenancy: default | |
Tags: | |
- Key: Name |
This file contains hidden or 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
C:\Users\User\aws\cdk01>tree . | |
C:\USERS\USER\AWS\CDK01 | |
├─bin | |
├─cdk.out | |
│ ├─asset.1ebc9d3ac2033816c4abb63e4afd69d350b4aba8704cc9236b82ea520b74f4b0 | |
│ ├─asset.a5671030823ed06a8f9dae8c58ed287890a1f8f142c62aaba9808e007d84abd8 | |
│ └─asset.a65ac4beaa2b5a7b20eebf3b7c5c1c886b71428afa377e02dab0d10ab3be57e7 | |
├─lib | |
├─my-front-end | |
├─my-queue-consumer |
This file contains hidden or 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 Data.List | |
suffixArray :: [Char] -> [Int] | |
suffixArray xs = sortBy (\x y -> compare (drop x xs) (drop y xs) ) [0..(length xs - 1)] | |
{- | |
> suffixArray "abracadabra" | |
[10,7,0,3,5,8,1,4,6,9,2] | |
> suffixArray "banana" | |
[5,3,1,0,4,2] |
This file contains hidden or 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
module SampleStream where | |
import Prelude as P hiding(lines) | |
import qualified Data.ByteString.UTF8 as BU | |
import System.IO.Streams | |
import System.IO.Streams.Debug | |
copy :: IO () | |
copy = withFileAsOutput "./test/data/Types.hs.out1" (\os -> do |
This file contains hidden or 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 LambdaCase #-} | |
module SampleStream where | |
import Control.Monad.IO.Class (liftIO) | |
import System.IO.Streams as S | |
main :: IO () | |
main = do | |
i <- S.fromList [1,2,3,9,4] >>= \i' -> |
This file contains hidden or 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 #-} | |
module SampleStream (main) where | |
import Data.Foldable (forM_) | |
import qualified Data.Text as T | |
import qualified Data.Text.IO as T | |
import System.IO (IOMode (..), withFile) | |
import System.IO.Streams as S |
This file contains hidden or 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 TypeOperators, DataKinds, OverloadedLabels, FlexibleContexts, GADTs #-} | |
import Data.Extensible | |
-- | |
-- standard | |
-- | |
data A = AX | AY deriving (Show, Eq) | |
data B = BY | BZ deriving (Show, Eq) |
This file contains hidden or 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 DataKinds #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE OverloadedLabels #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE TypeOperators #-} | |
import Control.Monad.Reader | |
import Control.Monad.Reader.Class | |
import Data.Extensible | |
import Data.Extensible.Effect |
This file contains hidden or 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
package com.example.xml; | |
import org.joox.Match; | |
import org.w3c.dom.*; | |
import javax.xml.parsers.DocumentBuilder; | |
import javax.xml.parsers.DocumentBuilderFactory; | |
import javax.xml.transform.OutputKeys; | |
import javax.xml.transform.Transformer; | |
import javax.xml.transform.TransformerFactory; |
NewerOlder