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
| data Position = Position | |
| { row :: Int, | |
| column :: Int | |
| } deriving (Data) | |
| data Segment = Segment {start::Position, end::Position} deriving (Data) | |
| data Node a b = Node {pos::Segment, node::a, load::b} deriving (Data) | |
| type I a = Node a () | |
| newtype PLicense = PLicense {cs::[I PComment]} deriving (Data) | |
| newtype PComment = PComment {c::Text} deriving (Data) |
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 Main where | |
| import Data.Char (ord, toLower) | |
| newtype PrsE a = PrsE { runPrsE :: String -> Either String (a, String) } | |
| satisfyE :: (Char -> Bool) -> PrsE Char | |
| satisfyE f = PrsE g | |
| where | |
| g "" = Left "unexpected end of input" | |
| g (c:cs) |
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
| #!/bin/bash | |
| TARGET=~/Downloads/Remote/ | |
| inotifywait -m -e create -e moved_to -e modify --format "%f" $TARGET \ | |
| | while read FILENAME | |
| do | |
| echo Detected $FILENAME, copying to clipboard | |
| # https://askubuntu.com/a/759660 | |
| xclip -selection clipboard -t image/png -i "${TARGET}${FILENAME}" |
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 os {input} | |
| import arrays {sum} | |
| import math {min} | |
| // custom IO | |
| fn read_strings() ([]string) {return os.input('').split(' ')} | |
| fn read_longs() ([]i64) {return read_strings().map(it.i64())} | |
| fn read_ints() ([]int) {return read_strings().map(it.int())} | |
| fn read_floats() ([]f64) {return read_strings().map(it.f64())} |
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 Main where | |
| import Prelude | |
| import Affjax as AX | |
| import Affjax.ResponseFormat as AXRF | |
| import Affjax.Web as AW | |
| import Data.Either (hush) | |
| import Data.Maybe (Maybe(..)) | |
| import Effect (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
| {-# LANGUAGE LambdaCase #-} | |
| module Lib | |
| where | |
| import Text.Megaparsec | |
| import Data.Void (Void) | |
| import Text.Megaparsec.Char (digitChar) | |
| import Data.Function ((&)) | |
| type Parser = Parsec Void String |
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 DeriveDataTypeable #-} | |
| module ListTemplate where | |
| import Data.Data | |
| import Data.HashMap.Strict | |
| import Prelude hiding (lookup) | |
| data A = A deriving (Data, Typeable, 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
| accept-flake-config = false | |
| access-tokens = | |
| allow-dirty = true | |
| allow-import-from-derivation = true | |
| allow-new-privileges = false | |
| allow-symlinked-store = false | |
| allow-unsafe-native-code-during-evaluation = false | |
| allowed-impure-host-deps = | |
| allowed-uris = | |
| allowed-users = * |
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
| example :: IO () | |
| example = do | |
| ct <- getPOSIXTime | |
| let | |
| name = "3" | |
| ws = | |
| X.def | |
| & X.atCell (3, 2) ?~ X.Cell (Just 0) (Just $ X.CellDouble 42.0) Nothing Nothing | |
| styleSheet = sheet | |
| where |
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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.17; | |
| contract Database { | |
| struct Table { | |
| string[] columns; | |
| mapping(string => string[]) values; | |
| bool exists; | |
| } |
OlderNewer