_id
stringlengths
64
64
repository
stringlengths
6
84
name
stringlengths
4
110
content
stringlengths
0
248k
license
null
download_url
stringlengths
89
454
language
stringclasses
7 values
comments
stringlengths
0
74.6k
code
stringlengths
0
248k
842880387c2d1a53f7be9faa609579fa0f3c74b3e0298d3d6b3cb8ef88b23ec3
agda/agda
RTD.hs
{-# OPTIONS -fglasgow-exts -cpp #-} module RTD(cast, Typeable(..), mkTyCon, mkTyConApp, Dynamic ) where import GHC.Base import Data.Typeable(Typeable(..), mkTyCon, mkTyConApp) import Data.Dynamic(Dynamic) cast :: a -> b cast = unsafeCoerce#
null
https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/examples/outdated-and-incorrect/Alonzo/RTD.hs
haskell
# OPTIONS -fglasgow-exts -cpp #
module RTD(cast, Typeable(..), mkTyCon, mkTyConApp, Dynamic ) where import GHC.Base import Data.Typeable(Typeable(..), mkTyCon, mkTyConApp) import Data.Dynamic(Dynamic) cast :: a -> b cast = unsafeCoerce#
76e9c36d2faef79a90cab9ca9b07ff13264857c534561660814db2e27b9195df
BinaryAnalysisPlatform/bap
bap_disasm_prim.ml
open Core_kernel[@@warning "-D"] open Bap_disasm_backend_types type t = int external create : backend:string -> triple:string -> cpu:string -> attrs:string -> debug_level:int -> t = "bap_disasm_create_with_attrs_stub" [@@noalloc] external backends_size : unit -> int = "bap_disasm_backends_size_stub" [...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_disasm/bap_disasm_prim.ml
ocaml
open Core_kernel[@@warning "-D"] open Bap_disasm_backend_types type t = int external create : backend:string -> triple:string -> cpu:string -> attrs:string -> debug_level:int -> t = "bap_disasm_create_with_attrs_stub" [@@noalloc] external backends_size : unit -> int = "bap_disasm_backends_size_stub" [...
389ceb97ec81b2dd97873d7aee0be70c19ec005e8618ed6df72325fdc975f3e1
Guest0x0/trebor
Quote.mli
open Syntax open Value val value_to_core : #Context.context -> int -> value -> Core.expr val head_to_core : #Context.context -> int -> head -> Core.expr val elim_to_core : #Context.context -> int -> Core.expr -> elimination -> Core.expr val meta_info_to_core : #Context.context -> meta_info -> Core.meta_info val...
null
https://raw.githubusercontent.com/Guest0x0/trebor/c6b6c099e3e848979bd8f501d28c4c2f35f1235e/Kernel/Quote.mli
ocaml
open Syntax open Value val value_to_core : #Context.context -> int -> value -> Core.expr val head_to_core : #Context.context -> int -> head -> Core.expr val elim_to_core : #Context.context -> int -> Core.expr -> elimination -> Core.expr val meta_info_to_core : #Context.context -> meta_info -> Core.meta_info val...
151d62795bc8696060e5d9621d84a789c1e499283c0dee6361e4dd711023b299
drym-org/qi
aux-syntax.rkt
#lang racket/base (provide literal subject clause starts-with) (require syntax/parse racket/string) (define-syntax-class literal (pattern (~or* expr:boolean expr:char expr:string expr:bytes expr:number expr:regexp expr:byt...
null
https://raw.githubusercontent.com/drym-org/qi/a8bd930eda09e07b8f44fd2e7100b7be96d446ea/qi-lib/flow/aux-syntax.rkt
racket
We'd like to treat quoted forms as literals as well. This includes symbols, and would also include, for instance, syntactic specifications of flows, since flows are syntactically lists as they inherit the elementary syntax of the underlying language (Racket). Quoted forms are read as (quote ...), so we match agai...
#lang racket/base (provide literal subject clause starts-with) (require syntax/parse racket/string) (define-syntax-class literal (pattern (~or* expr:boolean expr:char expr:string expr:bytes expr:number expr:regexp expr:byt...
af348a072fbc2af1164d6e57e695eec0e403cd65490fe02c837fac662188c94d
Kakadu/fp2022
REPL.ml
open Base open Lambda_lib let run_repl _ = Caml.Format.eprintf "OCaml-style toplevel (ocamlc, utop) is not implemented" ;; let run_single eval = let open Lambda_lib in let text = Stdio.In_channel.(input_all stdin) |> String.rstrip in let ast = Parser.parse text in match ast with | Error e -> Caml.Format.p...
null
https://raw.githubusercontent.com/Kakadu/fp2022/0d134cc88e5db154e705c25b1d010b70df757505/Lambda/REPL.ml
ocaml
open Base open Lambda_lib let run_repl _ = Caml.Format.eprintf "OCaml-style toplevel (ocamlc, utop) is not implemented" ;; let run_single eval = let open Lambda_lib in let text = Stdio.In_channel.(input_all stdin) |> String.rstrip in let ast = Parser.parse text in match ast with | Error e -> Caml.Format.p...
6667ad2a8f79418adc038a21bc67a9bdf227cf6789233dab4588adf1e91182c1
gonimo/gonimo
UI.hs
# LANGUAGE GADTs # {-# LANGUAGE RecursiveDo #-} # LANGUAGE ScopedTypeVariables # module Gonimo.Client.Parent.UI where import Control.Lens import Data.Foldable import qualified Data.Map as Map import qualified Data.Set as Set imp...
null
https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/front/src/Gonimo/Client/Parent/UI.hs
haskell
# LANGUAGE RecursiveDo # | Show confirmation dialog on history back navigation. If confirmed, another history back event gets fired - finally leaving the parent station. If not confirmed, push another `RouteParent` on the stack so we can ask again for confirmation next time. The returned event fir...
# LANGUAGE GADTs # # LANGUAGE ScopedTypeVariables # module Gonimo.Client.Parent.UI where import Control.Lens import Data.Foldable import qualified Data.Map as Map import qualified Data.Set as Set import qualified GHCJS.DOM.MediaStream ...
ab9f08fb36c5cae588a811dc887e3b9bfa10f608c7acb4fa97d42f4e5fded64c
BartoszMilewski/XOperad
Vector.hs
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # {-# LANGUAGE GADTs #-} module Vector where import Numbers import Control.Applicative import Data.Traversable import Data.Foldable import Data.Monoid import Prelude hiding (concat, sum) data Vec n a where VCons :: a -> Vec n a -> Vec (S n) a VNil :: Vec Z a in...
null
https://raw.githubusercontent.com/BartoszMilewski/XOperad/e42090e2e53625c2fa1f63a0e1d54d63476586db/Vector.hs
haskell
# LANGUAGE GADTs # must not happen!
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # module Vector where import Numbers import Control.Applicative import Data.Traversable import Data.Foldable import Data.Monoid import Prelude hiding (concat, sum) data Vec n a where VCons :: a -> Vec n a -> Vec (S n) a VNil :: Vec Z a instance (Show a) => Show...
8f021554aa529661bd2e2096ce821827f5a7f29e0827199b4313c0a23bdefc9a
dgtized/shimmers
control_panels.cljs
(ns shimmers.sketches.control-panels (:require [shimmers.algorithm.square-packing :as square] [shimmers.common.svg :as csvg] [shimmers.common.ui.controls :as ctrl] [shimmers.math.deterministic-random :as dr] [shimmers.math.equations :as eq] [shimmers.math.geometry :as geometry] [shimmers.math.vec...
null
https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/control_panels.cljs
clojure
Alternative short name might be +pv, as in plus polar vector. bounding box
(ns shimmers.sketches.control-panels (:require [shimmers.algorithm.square-packing :as square] [shimmers.common.svg :as csvg] [shimmers.common.ui.controls :as ctrl] [shimmers.math.deterministic-random :as dr] [shimmers.math.equations :as eq] [shimmers.math.geometry :as geometry] [shimmers.math.vec...
5acbf94fa2c25238ca0078a5228fc6f1663c704048463afe33a0bfab051fa99a
ruedigergad/bowerick
multi_connector_exchange.clj
;;; Copyright 2016 , ;;; This software is released under the terms of the Eclipse Public License ( EPL ) 1.0 . You can find a copy of the EPL at : ;;; -1.0.php ;;; (ns ^{:author "Ruediger Gad", :doc "Tests for JMS exchanging messages across multiple connectors."} bowerick.test.multi-connecto...
null
https://raw.githubusercontent.com/ruedigergad/bowerick/80b48ebec19f5f9a225d4cf43eb9b484c5f98afa/test/bowerick/test/multi_connector_exchange.clj
clojure
-1.0.php "ws:55533" (deftest test-nippy-stress-data-exchange-json-producer-consumer (doseq [src urls dst urls] (println "Multi-connector nippy-stress-data exchange test from" src "to" dst) (let [producer (create-json-producer src test-topic) taoensso.nippy/stress-data-benchab...
Copyright 2016 , This software is released under the terms of the Eclipse Public License ( EPL ) 1.0 . You can find a copy of the EPL at : (ns ^{:author "Ruediger Gad", :doc "Tests for JMS exchanging messages across multiple connectors."} bowerick.test.multi-connector-exchange (:require ...
77821d22b0d60c8bdec7d2a2f08d029bfa2dbd4e3354eb24ec676ef50341017e
s-expressionists/ctype
cclass.lisp
(in-package #:ctype) (defmethod ctypep (object (ct cclass)) (subclassp (class-of object) (cclass-class ct))) (defmethod subctypep ((ct1 cclass) (ct2 cclass)) NOTE : If ctypes are supposed to work in the face of future redefinitions , ;; this should return NIL NIL except with unredefinable classes. (values (su...
null
https://raw.githubusercontent.com/s-expressionists/ctype/2b13bc5a17fad0117b4a5860bade678ed6bf7c3c/cclass.lisp
lisp
this should return NIL NIL except with unredefinable classes. so they don't appear here. function sometimes sort of is. condition may not be a class. FIXME: Refers to environment system classes is a subclass of structure-object or whatever, it can be understood to be disjoint from user classes. These classes may...
(in-package #:ctype) (defmethod ctypep (object (ct cclass)) (subclassp (class-of object) (cclass-class ct))) (defmethod subctypep ((ct1 cclass) (ct2 cclass)) NOTE : If ctypes are supposed to work in the face of future redefinitions , (values (subclassp (cclass-class ct1) (cclass-class ct2)) t)) (defmethod ctyp...
8f3744b9796badf621202f2236b8eb6b479bb088ab092cae49bb7ab1376efe4d
uw-unsat/jitsynth
machine-instance.rkt
#lang rosette (require "../ams/machine.rkt" "../ams/machine-loader.rkt" "../common/instructions.rkt" "../common/data-utils.rkt" "../common/data-structures.rkt" "interpreter.rkt" "lsc-dsl.rkt") (require rosette/lib/angelic) (provide make-lsc-machine) (define MAX-BITLEN 64) (define (wrap-ls...
null
https://raw.githubusercontent.com/uw-unsat/jitsynth/69529e18d4a8d4dace884bfde91aa26b549523fa/lsc/machine-instance.rkt
racket
TODO Why is rule-end having so much issue? (thunk (choose* bveq (lambda (a b) (not (bveq a b))))) Can make more args later, but they need different instruction names TODO Don't need this argument for source machines
#lang rosette (require "../ams/machine.rkt" "../ams/machine-loader.rkt" "../common/instructions.rkt" "../common/data-utils.rkt" "../common/data-structures.rkt" "interpreter.rkt" "lsc-dsl.rkt") (require rosette/lib/angelic) (provide make-lsc-machine) (define MAX-BITLEN 64) (define (wrap-ls...
7d8ef1f8033e2affb19ba5822a5eff5ecde6a21201ad6fc3961b14e64769f8e2
codinuum/cca
token.ml
Copyright 2012 - 2020 Codinuum Software Lab < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in wri...
null
https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/ast/analyzing/langs/python/parsing/src/token.ml
ocaml
token.ml
Copyright 2012 - 2020 Codinuum Software Lab < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in wri...
115cc597994a8c81f75e5211c815e541477a4931df1aad25b3bf24fc9bb10602
yetanalytics/dave
events.cljs
(ns com.yetanalytics.dave.ui.events (:require [re-frame.core :as re-frame] [com.yetanalytics.dave.ui.app.nav :as nav] [com.yetanalytics.dave.ui.app.db :as db] [com.yetanalytics.dave.ui.app.dom :as dom] [com.yetanalytics.dave.ui.app.http] [com.yetanalytics.dave.ui.app.notify] [com.yetanalytics.dav...
null
https://raw.githubusercontent.com/yetanalytics/dave/7a71c2017889862b2fb567edc8196b4382d01beb/src/com/yetanalytics/dave/ui/events.cljs
clojure
Utility Handlers dispatch debounce on trailing edge note that you should only use this to call handlers that use a db predicate to determine whether or not to continue, and remove the timer if it is false.
(ns com.yetanalytics.dave.ui.events (:require [re-frame.core :as re-frame] [com.yetanalytics.dave.ui.app.nav :as nav] [com.yetanalytics.dave.ui.app.db :as db] [com.yetanalytics.dave.ui.app.dom :as dom] [com.yetanalytics.dave.ui.app.http] [com.yetanalytics.dave.ui.app.notify] [com.yetanalytics.dav...
7486c3e880988a8b455d9c2da048b74eeb2e597c25ca9aeb759132281b4a0291
gafiatulin/codewars
Arithmetic.hs
-- Make a function that does arithmetic! -- module Kata where data Operation = Add | Divide | Multiply | Subtract deriving (Eq, Show, Enum, Bounded) arithmetic :: Fractional a => a -> a -> Operation -> a arithmetic a b Add = a + b arithmetic a b Divide = a / b arithmetic a b Multiply = a * b arithmetic a b Subtract...
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/Arithmetic.hs
haskell
Make a function that does arithmetic!
module Kata where data Operation = Add | Divide | Multiply | Subtract deriving (Eq, Show, Enum, Bounded) arithmetic :: Fractional a => a -> a -> Operation -> a arithmetic a b Add = a + b arithmetic a b Divide = a / b arithmetic a b Multiply = a * b arithmetic a b Subtract = a - b
5f3557d7ffb75b863c44f641374d6d2dca75084956cba2e2a1709466f8eba71b
nuprl/gradual-typing-performance
htdp-beginner-reader.rkt
(module htdp-beginner-reader mzscheme (require "htdp-reader.rkt") (provide (rename -read-syntax read-syntax) (rename -read read)) (define -read-syntax (make-read-syntax '(lib "htdp-beginner.ss" "lang"))) (define -read (make-read '(lib "htdp-beginner.ss" "lang"))))
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/lang/htdp-beginner-reader.rkt
racket
(module htdp-beginner-reader mzscheme (require "htdp-reader.rkt") (provide (rename -read-syntax read-syntax) (rename -read read)) (define -read-syntax (make-read-syntax '(lib "htdp-beginner.ss" "lang"))) (define -read (make-read '(lib "htdp-beginner.ss" "lang"))))
713d99e6385a8523e9cf681702767f90a2abc8e8cf6db9450b51a625b593229e
gigasquid/libpython-clj-examples
mxnet.clj
(ns gigasquid.mxnet (:require [libpython-clj.require :refer [require-python]] [libpython-clj.python :as py :refer [py. py.. py.-]] [clojure.string :as string])) ;;; sudo pip3 install mxnet sudo pip3 install opencv - python (require-python '[mxnet :as mxnet]) (require-python '[mxnet.ndarray...
null
https://raw.githubusercontent.com/gigasquid/libpython-clj-examples/f151c00415c82a144a13959ff7b56f58704ac6f2/src/gigasquid/mxnet.clj
clojure
sudo pip3 install mxnet get the mnist data and format it => [DataDesc[softmax_label,(10,),<class 'numpy.float32'>,NCHW]] Setting up the model and initializing it training visualization
(ns gigasquid.mxnet (:require [libpython-clj.require :refer [require-python]] [libpython-clj.python :as py :refer [py. py.. py.-]] [clojure.string :as string])) sudo pip3 install opencv - python (require-python '[mxnet :as mxnet]) (require-python '[mxnet.ndarray :as ndarray]) (require-pyth...
1caab8f7cb146ed799b7006c9711017c72b118d42de54dd986c9cc68707da364
vshaxe/hxparser
symbolPrinter.ml
open Tokens module Parser = Parser.Make(NullEmitter) open Parser.MenhirInterpreter let s_xsymbol x = match x with | X (T x) -> begin match x with | T_COLON -> ":" | T_SEMICOLON -> ";" | T_COMMA -> "," | T_DOT -> "." | T_PACKAGE -> "package" | T_IDENT -> "IDENT" | T_DOT_IDENT -> "DOT_IDENT" | T_DOL...
null
https://raw.githubusercontent.com/vshaxe/hxparser/8621d5e44805b6d664654d15737faf6a3a4a18fa/src/syntax/symbolPrinter.ml
ocaml
| N_dollar_ident -> "dollar_ident" options lists
open Tokens module Parser = Parser.Make(NullEmitter) open Parser.MenhirInterpreter let s_xsymbol x = match x with | X (T x) -> begin match x with | T_COLON -> ":" | T_SEMICOLON -> ";" | T_COMMA -> "," | T_DOT -> "." | T_PACKAGE -> "package" | T_IDENT -> "IDENT" | T_DOT_IDENT -> "DOT_IDENT" | T_DOL...
52e088ee0c983ffb6abb31cd359a6a8fa600bdccd54917d94013baabc49587f8
ygmpkk/house
Grammar.hs
module Util.Grammar where import Text.PrettyPrint data Grammar = Empty | Alt Grammar Grammar | Seq Grammar Grammar | Many Grammar | Opt Grammar | Terminal String | Nonterminal String Grammar | Grammar :--- String ppGrammar :: Grammar -> (Doc,[Doc]) ppGrammar p = case p of Emp...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/kernel/Util/Grammar.hs
haskell
- String
module Util.Grammar where import Text.PrettyPrint data Grammar = Empty | Alt Grammar Grammar | Seq Grammar Grammar | Many Grammar | Opt Grammar | Terminal String | Nonterminal String Grammar ppGrammar :: Grammar -> (Doc,[Doc]) ppGrammar p = case p of Empty -> (empty,[]) Seq...
dab58d18c15508f8816d6fdda62bc023055f36b987486f1d5967767131f76ec6
Mattiemus/LaneWars
Serialization.hs
module Game.Shared.Serialization where import Data.Serialize import Data.Serialize.Get import Data.ByteString as BS -- |Decodes every value from a byte string, returning the list of values read . Will stop at and return the first error encountered . decodeAll :: Serialize a => ByteString -> Either String [a] decode...
null
https://raw.githubusercontent.com/Mattiemus/LaneWars/4c4a0a11f49cbd9ff722aedf3e0f352e49b140fe/Game/Shared/Serialization.hs
haskell
|Decodes every value from a byte string, returning the list of values
module Game.Shared.Serialization where import Data.Serialize import Data.Serialize.Get import Data.ByteString as BS read . Will stop at and return the first error encountered . decodeAll :: Serialize a => ByteString -> Either String [a] decodeAll bytes = decodeAll' bytes [] where decodeAll' :: Serialize...
d4148c46aac757ae521b95eeb71712ae88456910f4b951f3efe1e2616d854b5d
wangsix/VMO_repeated_themes_discovery
occurrences.lisp
;(in-package :common-lisp-user) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "csv-files" :type "lisp") *lisp-code-root*)) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "director-musices" :type "lisp") *lisp-co...
null
https://raw.githubusercontent.com/wangsix/VMO_repeated_themes_discovery/0082b3c55e64ed447c8b68bcb705fd6da8e3541f/JKUPDD-Oct2013/groundTruth/gibbonsSilverSwan1612/monophonic/repeatedPatterns/tomCollins/E/occurrences/script/occurrences.lisp
lisp
(in-package :common-lisp-user) Load the piece and the pattern. Define all occurrences. occi. Save as csv, lisp, and midi. Definition of ontime-pitch pairs. Definition for MIDI file. Save MIDI file (have to alter any anacrusis). Save lisp-format text file. Save CSV.
(load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "csv-files" :type "lisp") *lisp-code-root*)) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "director-musices" :type "lisp") *lisp-code-root*)) (load (merge-pathnam...
edb028760ecdce6e68a2b98fccf4a94659e8df3a89d8d402aef3d89d71dad473
ros/roslisp
xml.lisp
;;;; -*- mode: lisp -*- ;;;; $ I d : xml.lisp , v 1.14 2005/11/20 14:24:34 scaekenberghe Exp $ ;;;; ;;;; This is a Common Lisp implementation of a basic but usable XML parser. The parser is non - validating and not complete ( no CDATA ) . Namespace and entities are handled . ;;;; The API into the parser is a pure...
null
https://raw.githubusercontent.com/ros/roslisp/559355a8d695e34e6dedae071a9af2c065411687/s-xml/src/xml.lisp
lisp
-*- mode: lisp -*- This is a Common Lisp implementation of a basic but usable XML parser. The API into the parser is a pure functional parser hook model that comes from SSAX, see also /~oleg/ftp/Scheme/xml.html or You are granted the rights to distribute and use this software (), also known as the LLGPL. er...
$ I d : xml.lisp , v 1.14 2005/11/20 14:24:34 scaekenberghe Exp $ The parser is non - validating and not complete ( no CDATA ) . Namespace and entities are handled . Different DOM models are provided , an XSML , an LXML and a xml - element struct based one . Copyright ( C ) 2002 , 2003 , 2004 , 2005 , Beta...
bd6c09dfb397f9cd1c0de173b24fc86a4972eb0cb7124a6c470ac1729e46ddd5
Happstack/happstack-server
HelloWorld.hs
module Main where import Happstack.Server {- interesting urls: / -} main :: IO () main = simpleHTTP nullConf $ ok "Hello World"
null
https://raw.githubusercontent.com/Happstack/happstack-server/d9cdb9af5635b1ebd9db0801b66dbf4e58aba66b/attic/Examples/set/ServerPart/HelloWorld.hs
haskell
interesting urls: /
module Main where import Happstack.Server main :: IO () main = simpleHTTP nullConf $ ok "Hello World"
95feab3e8e81cbe6af09cef5426ab7b935eb2a8b51dd387a1ce9e921a096c85b
degree9/uikit-hl
article.cljs
(ns uikit-hl.article (:require [hoplon.core :as hl] [uikit-hl.core :as core])) (def ^:dynamic *title* "") (def ^:dynamic *meta* "") (hl/defelem article [attr kids] (let [title (:title attr *title*) meta (:meta attr *meta*) attr (-> attr (dissoc :title :meta) (assoc :class [:uk-articl...
null
https://raw.githubusercontent.com/degree9/uikit-hl/b226b1429ea50f8e9a6c1d12c082a3be504dda33/docs/docs.html.out/uikit_hl/article.cljs
clojure
(ns uikit-hl.article (:require [hoplon.core :as hl] [uikit-hl.core :as core])) (def ^:dynamic *title* "") (def ^:dynamic *meta* "") (hl/defelem article [attr kids] (let [title (:title attr *title*) meta (:meta attr *meta*) attr (-> attr (dissoc :title :meta) (assoc :class [:uk-articl...
337cbcf96f2aa59b313e50499af037fa15fd4bc96c858f265db882dacece10e3
mwotton/judy
Bench.hs
# LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleInstances # # OPTIONS_GHC -fno - full - laziness # -- cabal install judy. import Criterion.Main import Control.Monad import qualified Data.Judy as J import qualified Data.IntMap as I import qualified Data.HashTable as H import Data.List import Control.Parallel.St...
null
https://raw.githubusercontent.com/mwotton/judy/0fdb8687b39e67bfec21430865ce3611a0c6b266/tests/examples/Bench.hs
haskell
cabal install judy. : : IO ( J.JudyL Int ) :: IO (J.JudyL Int)
# LANGUAGE ScopedTypeVariables # # LANGUAGE FlexibleInstances # # OPTIONS_GHC -fno - full - laziness # import Criterion.Main import Control.Monad import qualified Data.Judy as J import qualified Data.IntMap as I import qualified Data.HashTable as H import Data.List import Control.Parallel.Strategies import Contro...
6a7020a0576542742dd4a3b2def199646e319e29abcf4f10f4738db803277ec5
uhc/uhc
Parser.hs
| Module : Parser License : GPL Maintainer : Stability : experimental Portability : portable License : GPL Maintainer : Stability : experimental Portability : portable -} module Helium.Parser.Parser ( module_, exp_, ex...
null
https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/helium/Parser/Parser.hs
haskell
module -> "module" modid exports? "where" body -- | body only contain imports Simplified import: impdecl -> "import" modid impspec? impspec -> "hiding" "(" import "," ... ")" import -> var decls -> "{" decl1 ";" ... ";" decln "}" (n>=0) rhs -> "=" exp rhs1 |...
| Module : Parser License : GPL Maintainer : Stability : experimental Portability : portable License : GPL Maintainer : Stability : experimental Portability : portable -} module Helium.Parser.Parser ( module_, exp_, ex...
11b866f19f3905222982439fb60a286c5da566387eb4d3f195fb47b8fd562112
simonmichael/hledger
Cashflow.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # {-| The @cashflow@ command prints a simplified cashflow statement. It just shows the change in all "cash" accounts for the period (without the traditional segmentation into operating, ...
null
https://raw.githubusercontent.com/simonmichael/hledger/c966a0f4132e81829cd8081d852c04b87d5c1cd7/hledger/Hledger/Cli/Commands/Cashflow.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE QuasiQuotes # | The @cashflow@ command prints a simplified cashflow statement. It just shows the change in all "cash" accounts for the period (without the traditional segmentation into operating, investing, and financing cash flows.)
# LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # module Hledger.Cli.Commands.Cashflow ( cashflowmode ,cashflow ) where import System.Console.CmdArgs.Explicit import Hledger import Hledger.Cli.CliOptions import Hledger.Cli.CompoundBalanceCommand cashflowSpec = CompoundBalanceCommandSpec { cbcdoc ...
1360d9c61b593d7ede2387df5ed1a3e4bfef09a6585f77933360c027d554919a
Ekatereana/CommonLispWorks
formatter.lisp
(require 'asdf) (load "cl-simple-table/cl-simple-table.asd") (asdf:load-system 'cl-simple-table) (defun symbol-append (&rest symbols) (intern (apply #'concatenate 'string (mapcar #'symbol-name symbols)))) ;;;; text formatting (defun string-include (s1 s2) (cond ((zerop (length s1)) nil) ...
null
https://raw.githubusercontent.com/Ekatereana/CommonLispWorks/13111f7c45ec4d672dfdf3689ba22554d5c60727/formatter.lisp
lisp
text formatting loop for all key-words
(require 'asdf) (load "cl-simple-table/cl-simple-table.asd") (asdf:load-system 'cl-simple-table) (defun symbol-append (&rest symbols) (intern (apply #'concatenate 'string (mapcar #'symbol-name symbols)))) (defun string-include (s1 s2) (cond ((zerop (length s1)) nil) ((> (length s1) (l...
14cb44d53729179faa694aee83f7687343735568f0c0a913fe0e7d8f690f1cb6
nada-attia/dama
state.mli
(** [State] contains the state of the game and functions on it*) (** The abstract data type representing the state of the game *) type state (** Raised when the player tries to make an illegal move*) exception IllegalMove * Raised when the player tries to make a move when one of their pieces has a jump availab...
null
https://raw.githubusercontent.com/nada-attia/dama/1e2b57c141fffce90e193d525be2e862a5867626/src/state.mli
ocaml
* [State] contains the state of the game and functions on it * The abstract data type representing the state of the game * Raised when the player tries to make an illegal move * [player_turn state] is the string representation of the player * [get_turn state] is the color of the player whose turn it is * [get_board ...
type state exception IllegalMove * Raised when the player tries to make a move when one of their pieces has a jump available has a jump available *) exception RequiredJumpNotTaken * [ init_state board ] is the initial state when the game first starts val init_state : Board.t -> state val player_turn : st...
2d6ea777228c6cd04d33fb0a4d259a413416241c8769ed03d6495deff5ceb0d5
dpiponi/Moodler
audio_sin.hs
do root <- currentPlane (x, y) <- fmap (quantise2 quantum) mouse panel <- container' "panel_3x1.png" (x, y) (Inside root) lab <- label' "audio_sin" (x-25.0, y+75.0) (Outside panel) name <- new' "audio_sin" inp <- plugin' (name ++ ".freq") (x-21, y+25) (Outside panel) setColour inp "#control"...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/audio_sin.hs
haskell
do root <- currentPlane (x, y) <- fmap (quantise2 quantum) mouse panel <- container' "panel_3x1.png" (x, y) (Inside root) lab <- label' "audio_sin" (x-25.0, y+75.0) (Outside panel) name <- new' "audio_sin" inp <- plugin' (name ++ ".freq") (x-21, y+25) (Outside panel) setColour inp "#control"...
bb57ab1ec736d3c37c3449d8f8c85d89b9989023788d2e3e532d8f5db27dfbaf
mbj/stratosphere
LoggingFilterProperty.hs
module Stratosphere.WAFv2.LoggingConfiguration.LoggingFilterProperty ( module Exports, LoggingFilterProperty(..), mkLoggingFilterProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.WAFv2.Logging...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/wafv2/gen/Stratosphere/WAFv2/LoggingConfiguration/LoggingFilterProperty.hs
haskell
# SOURCE #
module Stratosphere.WAFv2.LoggingConfiguration.LoggingFilterProperty ( module Exports, LoggingFilterProperty(..), mkLoggingFilterProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import St...
b08930d89007d85490a3b3b4100ab44727cae9f47bbaff35cbca1304bd475874
martinkersner/cl-ml
spam-ham.lisp
;;;; Spam Ham Dataset ;;;; Author : ;;;; ;;;; ;;;; Features: ;;;; *spam-ham-data* ;;;; Tokens found in emails. ;;;; ;;;; Classes: ;;;; *spam-ham-labels* ;;;; 0 Ham 1 Spam (defparameter *spam-ham-data* '(;ham (Ryan Whybrew comented on your status Ryan wrote turd ferguson or but horn) (Arvind Thirumala...
null
https://raw.githubusercontent.com/martinkersner/cl-ml/f6263b9fb4abd1e069e892a595fe85fbfa5f9c9f/datasets/spam-ham.lisp
lisp
Spam Ham Dataset Features: *spam-ham-data* Tokens found in emails. Classes: *spam-ham-labels* 0 Ham ham spam
Author : 1 Spam (defparameter *spam-ham-data* (Ryan Whybrew comented on your status Ryan wrote turd ferguson or but horn) (Arvind Thirumalai comented on your status Arvind wrote you know Reply to this email to coment on this status) (Thanks Peter I l definitely check in on this How is your bok going?...
e739722494c84ff8f724247474a3139ee612bf4990c7aebc7fc8877cbfef1f18
6502/JSLisp
html.lisp
(setf (hash-reader "#") (lambda (src) (next-char src) `(document.getElementById ,(if (or (<= "a" (current-char src) "z") (<= "a" (current-char src) "z")) (symbol-name (parse-symbol src)) (read src))))) (defmacro set-style (element &re...
null
https://raw.githubusercontent.com/6502/JSLisp/9a4aa1a9116f0cfc598ec9f3f30b59d99810a728/html.lisp
lisp
(setf (hash-reader "#") (lambda (src) (next-char src) `(document.getElementById ,(if (or (<= "a" (current-char src) "z") (<= "a" (current-char src) "z")) (symbol-name (parse-symbol src)) (read src))))) (defmacro set-style (element &re...
c4341d7d14a5a82e0fee9cd855eae4e7087c32325b639e3d36a8a401defcf7b0
avsm/platform
opamFilename.ml
(**************************************************************************) (* *) Copyright 2012 - 2015 OCamlPro Copyright 2012 INRIA (* ...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/core/opamFilename.ml
ocaml
************************************************************************ All rights reserved. This file is distributed under the terms of the exception on linking descr...
Copyright 2012 - 2015 OCamlPro Copyright 2012 INRIA GNU Lesser General Public License version 2.1 , with the special module Base = struct include OpamStd.AbstractString let check_suffix filename s = Fil...
2302b7b13d4c00f2892f5aa59ccbac8ade18675b11ea21535429dd4411d2ab03
replikativ/konserve
cache_test.cljs
(ns konserve.cache-test (:require [cljs.core.async :refer [<! >! go promise-chan put!]] [cljs.test :refer [deftest testing is are async]] [fress.api :as fress] [konserve.cache :as k] [konserve.node-filestore :as fstore])) (def store-path "/tmp/cache-store") (deftest c...
null
https://raw.githubusercontent.com/replikativ/konserve/6c0bf0aa36aa6f21f3efbe3a61d98a79275665e3/test/konserve/cache_test.cljs
clojure
(ns konserve.cache-test (:require [cljs.core.async :refer [<! >! go promise-chan put!]] [cljs.test :refer [deftest testing is are async]] [fress.api :as fress] [konserve.cache :as k] [konserve.node-filestore :as fstore])) (def store-path "/tmp/cache-store") (deftest c...
ae505920b10c8aa1556d8e7313311165d6d82828eadccff98c64a5ede70f1dc2
gregnwosu/haskellbook
Listy.hs
module Listy where newtype Listy a = Listy [a] deriving (Eq, Show) instance Monoid (Listy a) where mempty = Listy [] mappend (Listy l) (Listy l') = Listy $ mappend l l'
null
https://raw.githubusercontent.com/gregnwosu/haskellbook/b21fb6772e58f07cff334d9c551d0477ec856897/chapter15/orphan-instance/Listy.hs
haskell
module Listy where newtype Listy a = Listy [a] deriving (Eq, Show) instance Monoid (Listy a) where mempty = Listy [] mappend (Listy l) (Listy l') = Listy $ mappend l l'
a472dce634e2f70a9445650344785afe6eb61308a7c592803532b985dd86a950
melange-re/melange
ast_derive.mli
Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P. * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later...
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/frontend/ast_derive.mli
ocaml
[register name cb] example: [register "accessors" cb]
Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P. * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later...
35319029a086b096c11e3861a3b4c2c69e103782dd6222ec426cab776716e37c
input-output-hk/ouroboros-network
Protocol.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeApplications # {-# LANGUAGE TypeFamilies #-} # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - orphans # module Ouroboros.Consensus.Shelley....
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/1cc4e0638b43040cb746cd3ff85caf0d3f6380ad/ouroboros-consensus-shelley/src/Ouroboros/Consensus/Shelley/Ledger/Protocol.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # ------------------------------------------------------------------------------ Support for Transitional Praos consensus algorithm ------------------------------------------------------------------------------
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - orphans # module Ouroboros.Consensus.Shelley.Ledger.Protocol () where import Ouroboros.Consensus.Block import Ouroboros.Consensus.Protocol...
7a85fbca401ea12a8428b4bc93975c2783fbc293faebb498a493cb843165f46c
koji-kojiro/lem-pygments-colorthemes
algol.lisp
(in-package :lem-user) (define-color-theme "algol" () (foreground "#000000") (background "#ffffff") (cursor :foreground "#ffffff" :background "#000000") (syntax-warning-attribute :foreground nil :background "#ffffff") (syntax-string-attribute :foreground "#666666" :background "#ffffff") (syntax-comment-att...
null
https://raw.githubusercontent.com/koji-kojiro/lem-pygments-colorthemes/f7de93ca7a68be7fb99ec48cc571e132292a6712/themes/algol.lisp
lisp
(in-package :lem-user) (define-color-theme "algol" () (foreground "#000000") (background "#ffffff") (cursor :foreground "#ffffff" :background "#000000") (syntax-warning-attribute :foreground nil :background "#ffffff") (syntax-string-attribute :foreground "#666666" :background "#ffffff") (syntax-comment-att...
3fc61fb4890ff466044f3613bc900bbefed8647c93294cc0fb789949c8cae832
joelburget/lvca
Tree_view.mli
type default_expanded_depth = | ExpandedTo of int (** Start tree expanded to this many levels *) | FullyExpanded (** Start tree fully expanded *) * For the given term , create a DOM node and an event for selection of some range . val view_tm : ?source_column:bool * Render a column displaying the name of the row...
null
https://raw.githubusercontent.com/joelburget/lvca/f8a3b8e294f564d1fc9836af63e6169b26ca0234/pages/Tree_view.mli
ocaml
* Start tree expanded to this many levels * Start tree fully expanded * Render a column displaying the row's range within its source file / buffer? * How many levels of the term to expand and display initially. Fully expanded by default.
type default_expanded_depth = * For the given term , create a DOM node and an event for selection of some range . val view_tm : ?source_column:bool * Render a column displaying the name of the row 's source file / buffer ? -> ?range_column:bool -> ?default_expanded_depth:default_expanded_depth -> ?highlighted...
4e48b6f4b2e29d9ebc8bd8ad9cbead0a6a613afc9b9fa254b78745e630581c76
digitallyinduced/ihp
MigrationGenerator.hs
| Module : IHP.IDE.CodeGen . MigrationGenerator Description : Generates database migration sql files Copyright : ( c ) digitally induced GmbH , 2021 Module: IHP.IDE.CodeGen.MigrationGenerator Description: Generates database migration sql files Copyright: (c) digitally induced GmbH, 2021 -} module IHP.IDE.CodeGe...
null
https://raw.githubusercontent.com/digitallyinduced/ihp/c9acf9c4024d948604779f0a63534e442fd7bc85/IHP/IDE/CodeGen/MigrationGenerator.hs
haskell
the tables have no differences except the name. the function have no differences except the body. | Emits 'ALTER TABLE table ADD UNIQUE (column);' This function substitutes the following queries: > ALTER TABLE table DROP COLUMN column; > ALTER TABLE table ADD COLUMN column UNIQUE; With a more natural @ADD UNI...
| Module : IHP.IDE.CodeGen . MigrationGenerator Description : Generates database migration sql files Copyright : ( c ) digitally induced GmbH , 2021 Module: IHP.IDE.CodeGen.MigrationGenerator Description: Generates database migration sql files Copyright: (c) digitally induced GmbH, 2021 -} module IHP.IDE.CodeGe...
dc715f8b419e155f050eb713f5ff8eb7dcd16795b4e609f501c3678f5c041411
omarkj/erollbar
erollbar_message.erl
-module(erollbar_message). %% @doc This module is used to create erollbar records that can be safely converted into records that can be sent to Rollbar.com %% Create records -export([trace/1 ,frame/1 ,message/1 ]). %% Fill them -export([message/2 ,description/2 ,lineno/2 ...
null
https://raw.githubusercontent.com/omarkj/erollbar/23e5930be5156ba40adc86f0d117d056ad2c13e6/src/erollbar_message.erl
erlang
@doc This module is used to create erollbar records that can be Create records Fill them Getters Message types Other types @doc Create a new trace message. @doc Create a new frame message. @doc Create a new message message @doc Add a Line Number to a Frame message @doc Add a Column Number to a Frame message ...
-module(erollbar_message). safely converted into records that can be sent to Rollbar.com -export([trace/1 ,frame/1 ,message/1 ]). -export([message/2 ,description/2 ,lineno/2 ,colno/2 ,method/2 ,code/2 ,args/2 ,metadata/3 ,frame...
0ede64eafe29574d18332ce51607e5ea56071687a70215e3ed34d0452b1862b9
openvstorage/alba
cli_messages.ml
Copyright ( C ) iNuron - This file is part of Open vStorage . For license information , see < LICENSE.txt > Copyright (C) iNuron - This file is part of Open vStorage. For license information, see <LICENSE.txt> *) open! Prelude open Cli_common open Lwt.Infix open Cmdliner open Albamgr_protocol let acc...
null
https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/cli_messages.ml
ocaml
Copyright ( C ) iNuron - This file is part of Open vStorage . For license information , see < LICENSE.txt > Copyright (C) iNuron - This file is part of Open vStorage. For license information, see <LICENSE.txt> *) open! Prelude open Cli_common open Lwt.Infix open Cmdliner open Albamgr_protocol let acc...
d9a6c35417f8c5617f36eaf6690e643c9cb536053728fbb7dc1cc7757a245a5a
aeternity/aeternity
aega_attach_tx_tests.erl
%%%------------------------------------------------------------------- ( C ) 2018 , Aeternity Anstalt %%% @doc Unit tests for contract create tx ADT %%% @end %%%------------------------------------------------------------------- -module(aega_attach_tx_tests). -include_lib("eunit/include/eunit.hrl"). -include_lib...
null
https://raw.githubusercontent.com/aeternity/aeternity/e66a588a41d8af5f4ce8467f28258d3f2c74cd8e/apps/aega/test/aega_attach_tx_tests.erl
erlang
------------------------------------------------------------------- @doc @end -------------------------------------------------------------------
( C ) 2018 , Aeternity Anstalt Unit tests for contract create tx ADT -module(aega_attach_tx_tests). -include_lib("eunit/include/eunit.hrl"). -include_lib("aecontract/include/aecontract.hrl"). basic_test_() -> [ {"Gas-related getters test", fun gas_getters/0} ]. gas_getters() -> Tx = attach_tx(#{gas...
044957978677a50b4de28ba22e73b9bcf8c914a0b5acf91af98ea9e3cd799dba
hstreamdb/hstream
Pretty.hs
# LANGUAGE CPP # module HStream.SQL.Planner.Pretty where import qualified Data.List as L import qualified Data.Map as Map import qualified Data.Text as T import Data.Text.Prettyprint.Doc import Data.Text.Pre...
null
https://raw.githubusercontent.com/hstreamdb/hstream/35b2284d122202a6ad7efc98e6c6304b68a0e49d/hstream-sql/src/HStream/SQL/Planner/Pretty.hs
haskell
# LANGUAGE CPP # module HStream.SQL.Planner.Pretty where import qualified Data.List as L import qualified Data.Map as Map import qualified Data.Text as T import Data.Text.Prettyprint.Doc import Data.Text.Pre...
40db9c8aedea45bf58d234c4a4943038d0933b26ba47330a4606c6d53c00f35d
threatgrid/ring-jwt-middleware
config.clj
(ns ring-jwt-middleware.config (:require [clojure.string :as string] [clojure.tools.logging :as log] [ring-jwt-middleware.schemas :refer [Config JWTClaims UserConfig]] [ring.util.http-response :as resp] [schema.core :as s])) (s/defn current-millis! :- s/Num "This int...
null
https://raw.githubusercontent.com/threatgrid/ring-jwt-middleware/ed285d4be03d49dfdaa08179697c1e1c378ee417/src/ring_jwt_middleware/config.clj
clojure
the key of the jwt map that starts with prefix remove the prefix split on / finally keywordize all elements remove key not starting by prefix construct the hash-map :sub overwrite any :user :id and scopes should be a set, not alist
(ns ring-jwt-middleware.config (:require [clojure.string :as string] [clojure.tools.logging :as log] [ring-jwt-middleware.schemas :refer [Config JWTClaims UserConfig]] [ring.util.http-response :as resp] [schema.core :as s])) (s/defn current-millis! :- s/Num "This int...
4a2ec7dd4743f2f821aa0b0ac867a85b95b143f58af6ee45ef2d44cee8bec038
jship/monad-logger-aeson
MetadataYesThreadContextYes.hs
# LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # module TestCase.LogInfoN.MetadataYesThreadContextYes ( testCase ) where import Control.Monad.Logger.Aeson ( (.=), Loc(..), LogLevel(..), LoggedMessage(..), Message(..), logInfoN, withThreadContext ) import Data.Aeson.QQ.Sim...
null
https://raw.githubusercontent.com/jship/monad-logger-aeson/209a4f8cea11ac25721d5fe06783e4ce461c1d70/monad-logger-aeson/test-suite/TestCase/LogInfoN/MetadataYesThreadContextYes.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NamedFieldPuns # # LANGUAGE QuasiQuotes # module TestCase.LogInfoN.MetadataYesThreadContextYes ( testCase ) where import Control.Monad.Logger.Aeson ( (.=), Loc(..), LogLevel(..), LoggedMessage(..), Message(..), logInfoN, withThreadContext ) import Data.Aeson.QQ.Simple (aesonQQ) import Data.Time (UTC...
d193942a52122fecfc4f6089eecf4595b1b6b0582eb17f7067456d2207e355b2
bolducp/SICP
01.15.scm
;The sine of an angle (specified in radians) can be computed by making ;use of the approximation sin(x)=x if x is sufficiently small, ;and the trigonometric identity ; ) ; ;to reduce the size of the argument of sin. (For purposes of this exercise an angle is considered “ sufficiently small ” if its magnitude is not...
null
https://raw.githubusercontent.com/bolducp/SICP/871babe9296b84b2b9648a02f9202752d21ebf93/exercises/chapter_01/1.2_exercises/01.15.scm
scheme
The sine of an angle (specified in radians) can be computed by making use of the approximation sin(x)=x if x is sufficiently small, and the trigonometric identity to reduce the size of the argument of sin. (For purposes of this exercise an angle These ideas are incorporated in the following procedures: What is the ...
) is considered “ sufficiently small ” if its magnitude is not greater than 0.1 radians . ) How many times is the procedure p applied when ( sine 12.15 ) is evaluated ? (define (cube x) (* x x x)) (define (p x) (- (* 3 x) (* 4 (cube x)))) (define (sine angle) (if (not (> (abs angle) 0.1)) angle ...
3269e10e806eb3c9456e7e4c62bfabff68aa0c3caaf605b7229950a150a47102
input-output-hk/plutus-apps
HelloWorldApp.hs
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module HelloWorldApp where import Data.Text qualified as T import Plutus.Contract (Contract, EmptySchema, Endpoint, logInfo) import PlutusTx.Prelude () -- BLOCK1 -- | A 'Contract' that logs a me...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/96ced2949ec9bfe59dccc2d344e5c1ab72f4d2c5/doc/plutus/tutorials/HelloWorldApp.hs
haskell
BLOCK1 | A 'Contract' that logs a message. BLOCK2
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module HelloWorldApp where import Data.Text qualified as T import Plutus.Contract (Contract, EmptySchema, Endpoint, logInfo) import PlutusTx.Prelude () hello :: Contract () EmptySchema T.Text ()...
451c5437250d442eb193062c027ff9d31cbcba9f28fde0d66553caf2427b3d93
gvolpe/shopping-cart-haskell
Version.hs
# LANGUAGE DataKinds # module Http.Routes.Version where type ApiVersion = "v1"
null
https://raw.githubusercontent.com/gvolpe/shopping-cart-haskell/3c54d7671f40a49fcd38f182ec7f8672dbafe8a7/src/Http/Routes/Version.hs
haskell
# LANGUAGE DataKinds # module Http.Routes.Version where type ApiVersion = "v1"
034b0c0168afe14a4b297d7e82a245a98dac1688df6ee87d533c4c8f0152ea9c
clojure-interop/aws-api
AmazonManagedBlockchainClient.clj
(ns com.amazonaws.services.managedblockchain.AmazonManagedBlockchainClient "Client for accessing ManagedBlockchain. All service calls made using this client are blocking, and will not return until the service call completes. Amazon Managed Blockchain is a fully managed service for creating and managing blockch...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.managedblockchain/src/com/amazonaws/services/managedblockchain/AmazonManagedBlockchainClient.clj
clojure
(ns com.amazonaws.services.managedblockchain.AmazonManagedBlockchainClient "Client for accessing ManagedBlockchain. All service calls made using this client are blocking, and will not return until the service call completes. Amazon Managed Blockchain is a fully managed service for creating and managing blockch...
25527fbe9718ee4374a4a7f798fbe9c43cb8f6ae0b2a207ed8fe52833802c621
uhc/uhc
PhaseDesugarer.hs
| Module : PhaseDesugarer License : GPL Maintainer : Stability : experimental Portability : portable License : GPL Maintainer : Stability : experimental Portability : portable -} module Helium.Compiler.PhaseDesugarer(phaseD...
null
https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/src/helium/Compiler/PhaseDesugarer.hs
haskell
remove dead (import) declarations | Make sure the module has a name. If there is no name (module without header) insert the base name of the file name as name. !!!Name
| Module : PhaseDesugarer License : GPL Maintainer : Stability : experimental Portability : portable License : GPL Maintainer : Stability : experimental Portability : portable -} module Helium.Compiler.PhaseDesugarer(phaseD...
7e6bc3d1af1981a97d551516c7623bc0aeabd3edd8480d600f171243532de14f
jacekschae/learn-reitit-course-files
server.clj
(ns cheffy.server (:require [reitit.ring :as ring] [ring.adapter.jetty :as jetty] [integrant.core :as ig] [environ.core :refer [env]] [cheffy.router :as router])) (defn app [env] (router/routes env)) (defmethod ig/prep-key :server/jetty [_ config] (merge confi...
null
https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/21-recipe-responses/src/cheffy/server.clj
clojure
(ns cheffy.server (:require [reitit.ring :as ring] [ring.adapter.jetty :as jetty] [integrant.core :as ig] [environ.core :refer [env]] [cheffy.router :as router])) (defn app [env] (router/routes env)) (defmethod ig/prep-key :server/jetty [_ config] (merge confi...
d681fdb1852ba22b6cfd331b84c09983e7f6819f3f94fdc2758fea8618c8864b
haskell-beam/beam
Migrate.hs
# LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE DataKinds # # LANGUAGE UndecidableInstances # # LANGUAGE CPP # # OPTIONS_GHC -fno - warn - orphans -fno - warn - type - defaults # | Migrations support for beam - postgres . S...
null
https://raw.githubusercontent.com/haskell-beam/beam/596981a1ea6765b9f311d48a2ec4d8460ebc4b7e/beam-postgres/Database/Beam/Postgres/Migrate.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE OverloadedStrings # information on beam migrations. * Postgres data types | Top-level migration backend for use by @beam-migrate@ tools * 'smallserial' * 'serial' * 'bigserial' * 'tsvector' * 'tsquery' * 'text' * 'json' * 'jsonb' * 'uuid' * ...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE DataKinds # # LANGUAGE UndecidableInstances # # LANGUAGE CPP # # OPTIONS_GHC -fno - warn - orphans -fno - warn - type - defaults # | Migrations support for beam - postgres . See " Database . Beam . Migrate " for more module Database.Beam....
2fef5a7defa1a92036601350335442a3442d8d3be8c53733c0474dc3f54814a7
reborg/clojure-essential-reference
6.clj
< 1 > {'ns1 [['a1 1] ['b1 2]] 'ns2 [['a2 2] ['b2 2]]}) < 2 > (for [[ns defs] definitions [name body] defs] (do (create-ns ns) (intern ns name body)))) (defns definitions) ; <3> ;; (#'ns1/a1 #'ns1/b1 #'ns2/a2 #'ns2/b2)
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OtherFunctions/VarsandNamespaces/def%2Cdeclare%2Cinternanddefonce/6.clj
clojure
<3> (#'ns1/a1 #'ns1/b1 #'ns2/a2 #'ns2/b2)
< 1 > {'ns1 [['a1 1] ['b1 2]] 'ns2 [['a2 2] ['b2 2]]}) < 2 > (for [[ns defs] definitions [name body] defs] (do (create-ns ns) (intern ns name body))))
5664c696f02aed3f1e1553f4bcdd0369319bd2cd48c8423c08bcb31b4b85f447
ijvcms/chuanqi_dev
player_instance_cache.erl
%%%------------------------------------------------------------------- @author zhengsiying ( C ) 2015 , < COMPANY > %%% @doc %%% %%% @end Created : 15 . 十二月 2015 下午8:18 %%%------------------------------------------------------------------- -module(player_instance_cache). -include("common.hrl"). -include("cache....
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/player/player_instance_cache.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API ==================================================================== API functions ==================================================================== 特殊要求,特殊处理 ...
@author zhengsiying ( C ) 2015 , < COMPANY > Created : 15 . 十二月 2015 下午8:18 -module(player_instance_cache). -include("common.hrl"). -include("cache.hrl"). -export([ select_all/1, select_row/1, insert/1, update/2, delete/1, delete_all/1, remove_cache/1 ]). select_all(PlayerId) -> db_cache_lib:select_al...
794566a8efa0462a7b0b372919752ef346564a33ccbabb150a473f5cbe78a994
jaked/ooauth
oauth_base32.mli
val encode : unit -> Cryptokit.transform val decode : unit -> Cryptokit.transform
null
https://raw.githubusercontent.com/jaked/ooauth/8fa9d19570c7c5dea1036b5e9f5bbd945e51166d/oauth_base32.mli
ocaml
val encode : unit -> Cryptokit.transform val decode : unit -> Cryptokit.transform
db0c052658e4a7e4125986b9aa258135309a8fae9bfef549fef43fdf1c149f5a
rm-hull/wireframes
wavefront_loader.clj
(ns wireframes.shapes.wavefront-loader (:require [clojure.string :as str] [clojure.core.rrb-vector :as fv] [wireframes.common :as c] [wireframes.transform :as t])) (def vertex-matcher (let [converter (partial c/parse-string #" +" c/parse-double)] (fn [s] {:points (fv/vector ...
null
https://raw.githubusercontent.com/rm-hull/wireframes/7df78cc6e2040cd0de026795f2e63ad129e4fee5/src/clj/wireframes/shapes/wavefront_loader.clj
clojure
(ns wireframes.shapes.wavefront-loader (:require [clojure.string :as str] [clojure.core.rrb-vector :as fv] [wireframes.common :as c] [wireframes.transform :as t])) (def vertex-matcher (let [converter (partial c/parse-string #" +" c/parse-double)] (fn [s] {:points (fv/vector ...
2cb081e88a70bbc700cde5532b5fa9e186e52d8d3beb2ee7b279e7f2a5cb0cdf
ml4tp/tcoq
context.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/kernel/context.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** local declaration * name, type * ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * The modules defined below r...
7a31c63fd1329314c947a8f9325aa8f0ecd14ad1e608f0916acb80b5d2673b1c
MLstate/opalang
bslTags.ml
Copyright © 2011 , 2012 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/libbsl/bslTags.ml
ocaml
<!> If you add anything there, update *parse* and *parsed_t* functions for error messages, please put all tags there following guidelines about errors opaname is now set by default, but we keep the syntax for backward compatibility internal attributes : should not be parsed, but are generated by bslregister ...
Copyright © 2011 , 2012 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
40af0c78b8c8695386f49587538ed8bd1a7aafe19b4e2405182ee5648499825d
palf/haskell-sdl2-examples
Lesson03.hs
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import qualified SDL import qualified Common as C import Control.Monad.Extra (whileM) main :: IO () main = C.withSDL $ C.withWindow "Lesson 03" (640, 480) $ \w -> do screen <- SDL.getWindowSurface w image <- SDL.loadBMP "./assets/x.bmp" ...
null
https://raw.githubusercontent.com/palf/haskell-sdl2-examples/3b4af6eea5ed362ec7941331449ac64c8f31009e/examples/lesson03/src/Lesson03.hs
haskell
# LANGUAGE OverloadedStrings #
module Main (main) where import qualified SDL import qualified Common as C import Control.Monad.Extra (whileM) main :: IO () main = C.withSDL $ C.withWindow "Lesson 03" (640, 480) $ \w -> do screen <- SDL.getWindowSurface w image <- SDL.loadBMP "./assets/x.bmp" let doRender = C.renderSurfaceToWi...
2bcc3717efc0c70c6338a2477e60cbcdd185d2bb0e1deaab7a84ca76d8701d67
ghc/packages-dph
Main.hs
-- | This divide and conquer program accesseses top-level array from the -- computations at the bottom of the tree. In lifted backends that -- don't manage sharing properly, this program will blow up when it tries -- to replicate the top-level a array at every step in the division phase. import Util import Timin...
null
https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-examples/examples/smoke/sharing/Indices/Main.hs
haskell
| This divide and conquer program accesseses top-level array from the computations at the bottom of the tree. In lifted backends that don't manage sharing properly, this program will blow up when it tries to replicate the top-level a array at every step in the division phase. Vectorised Nested Data Parallel ...
import Util import Timing import Randomish import System.Environment import Control.Exception import qualified Vector as IU import qualified Vectorised as ID import qualified Data.Array.Parallel.PArray as P import qualified Data.Vector.Unboxed as U main = do...
d10d5392be98cd6846bcba27d3af1e9c696596f20ed6ef33fbb058a3f44706eb
bennn/dissertation
bytevectors-6-typed.rkt
#lang typed/racket/base (provide Endianness endianness) (require (only-in rnrs/bytevectors-6 endianness)) (define-type Endianness Symbol) (require/typed/provide rnrs/bytevectors-6 [bytevector-u16-ref (-> Bytes Natural Endianness Natural)] [bytevector-u32-ref (-> Bytes Natural Endianness Natural)] ...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/QA/math-test/jpeg/base/bytevectors-6-typed.rkt
racket
#lang typed/racket/base (provide Endianness endianness) (require (only-in rnrs/bytevectors-6 endianness)) (define-type Endianness Symbol) (require/typed/provide rnrs/bytevectors-6 [bytevector-u16-ref (-> Bytes Natural Endianness Natural)] [bytevector-u32-ref (-> Bytes Natural Endianness Natural)] ...
0d2b943f9eaf5cccf2ab28b4d5b71889ca1f28d93ad6f0e4c3354e689d5a6589
jonase/eastwood
macro_call_outside_refresh_dirs.clj
(ns testcases.unhinted-reflective-call.macro-call-outside-refresh-dirs (:require [eastwood.test.outside-test-paths.reflection-warning])) (defn foo [x] (eastwood.test.outside-test-paths.reflection-warning/foo x))
null
https://raw.githubusercontent.com/jonase/eastwood/a515efe22c9ce3c84d73d800e23ae7ebbda4a78a/cases/testcases/unhinted_reflective_call/macro_call_outside_refresh_dirs.clj
clojure
(ns testcases.unhinted-reflective-call.macro-call-outside-refresh-dirs (:require [eastwood.test.outside-test-paths.reflection-warning])) (defn foo [x] (eastwood.test.outside-test-paths.reflection-warning/foo x))
6d21b0f8b0d7fdf699b21c9977b7c706f830bbd0e5d8b99ee8b492717729f70f
smallmelon/sdzmmo
lib_mount.erl
%%%-------------------------------------- @Module : @Author : xhg %%% @Email : @Created : 2010.06.02 %%% @Description : 坐骑信息 %%%-------------------------------------- -module(lib_mount). -include("common.hrl"). -include("record.hrl"). -compile(export_all). %% 计算消耗灵力 , CellNum ) - > in...
null
https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/lib/lib_mount.erl
erlang
-------------------------------------- @Email : @Description : 坐骑信息 -------------------------------------- 计算消耗灵力 取一条记录信息 lib_goods:make_info(goods, GoodsInfo). 乘上坐骑 原来乘有坐骑 修改玩家坐骑状态 修改玩家坐骑状态 丢弃坐骑 @spec throw_away(MountId) -> ok | Error
@Module : @Author : xhg @Created : 2010.06.02 -module(lib_mount). -include("common.hrl"). -include("record.hrl"). -compile(export_all). , CellNum ) - > int ( ) get_spirit(MountTypeId) -> MountTypeInfo = goods_util:get_ets_info(?ETS_GOODS_TYPE, MountTypeId), case is_record(MountTy...
7c345b913f71ca286d030233563cd5a5d234d9f6e256fc6f7ecb8aaad1813a5f
areina/elfeed-cljsrn
rn.cljs
(ns elfeed-cljsrn.rn (:require [reagent.core :as r])) (def ReactNative (js/require "react-native")) (def app-registry (.-AppRegistry ReactNative)) (def navigation-header-raw (.-Header (.-NavigationExperimental ReactNative))) (def navigation-header (r/adapt-react-class navigation-header-raw)) (def navigation-header-...
null
https://raw.githubusercontent.com/areina/elfeed-cljsrn/4dea27f785d24a16da05c0ab2ac0c6a6f23360f1/src/elfeed_cljsrn/rn.cljs
clojure
(ns elfeed-cljsrn.rn (:require [reagent.core :as r])) (def ReactNative (js/require "react-native")) (def app-registry (.-AppRegistry ReactNative)) (def navigation-header-raw (.-Header (.-NavigationExperimental ReactNative))) (def navigation-header (r/adapt-react-class navigation-header-raw)) (def navigation-header-...
54e2c1c9a737ca7c866bbe35023e25873fdfdf203c5219f080deaa712935ba00
ghcjs/ghcjs-boot
Internals.hs
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , CApiFFI # {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | Module : System . . Internals Copyright : ( c ) The University of Glasgow , 1992 - 2002 -- License : see librari...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/System/Posix/Internals.hs
haskell
# OPTIONS_HADDOCK hide # --------------------------------------------------------------------------- | License : see libraries/base/LICENSE Maintainer : Stability : internal Portability : non-portable (requires POSIX) POSIX support layer for the standard libraries. Non-posix compliant in order to ...
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , CApiFFI # Module : System . . Internals Copyright : ( c ) The University of Glasgow , 1992 - 2002 This library is built on * every * platform , including . module System.Posix.Internals where #include "HsBaseConfig.h" import System.P...
8b26f803e59bacb5fa980b82cdd50d7a51a22a89188136b17e58e7c663e19720
gsakkas/rite
20060407-19:01:03-abd1f315759bb561fda04484cb139c03.seminal.ml
* * * * * Note : Problem 1 does not use ; see the assignment * * * * exception Unimplemented exception RuntimeTypeError exception BadSourceProgram exception BadPrecomputation # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060407-19%3A01%3A03-abd1f315759bb561fda04484cb139c03.seminal.ml
ocaml
store env! ********* examples and testing **********
* * * * * Note : Problem 1 does not use ; see the assignment * * * * exception Unimplemented exception RuntimeTypeError exception BadSourceProgram exception BadPrecomputation # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ...
c48ed4ff2b47afb683d20f576574f5326e570e13e71fead9e1f7736ef1e3e2e4
apache/couchdb-ioq
ioq_tests.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/apache/couchdb-ioq/961a5c84b2079689a7e61d675685011d57629b36/test/ioq_tests.erl
erlang
use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(ioq_tests). -include_lib("eunit/include/eunit.hrl"). -include_lib("ioq/include/ioq.hrl"). all_test_() -> {setup, fun setup/0, fun cleanup/1, f...
0c39ea7e2e85a6fcf2aa2e8601e7e3e0f35065350a3ab0b9cd9ba23fc2671013
google/proto-lens
parser_test.hs
-- | Unit and property tests for our custom parsing monad. module Main (main) where import Control.Applicative (liftA2) import qualified Data.ByteString as B import Data.Either (isLeft) import Test.QuickCheck import Test.Tasty (defaultMain, testGroup, TestTree) import Test.Tasty.QuickCheck (testProperty) import Data...
null
https://raw.githubusercontent.com/google/proto-lens/081815877430afc1db669ca5e4edde1558b5fd9d/proto-lens/tests/parser_test.hs
haskell
| Unit and property tests for our custom parsing monad. Test out the Applicative instance by using "traverse" to read the same number of bytes as in the input. "traverse (const f) g" runs f once for every element of g. Since this is a test, just implement the slow stack-heavy way.
module Main (main) where import Control.Applicative (liftA2) import qualified Data.ByteString as B import Data.Either (isLeft) import Test.QuickCheck import Test.Tasty (defaultMain, testGroup, TestTree) import Test.Tasty.QuickCheck (testProperty) import Data.ProtoLens.Encoding.Bytes import Data.ProtoLens.Encoding.Pa...
38cc0cc4d53485106b4b01d3d30a8e8caff702d9bfdf7ff0c8f830e01ba1af0e
diagrams/diagrams-canvas
Geom.hs
# LANGUAGE NoMonomorphismRestriction # module Main where import Diagrams.Backend.Canvas.CmdLine import Diagrams.Prelude hiding (dot) theta = 3/8 @@ turn alpha = 7/16 @@ turn chordX = cos (theta ^. rad) chordY = sin (theta ^. rad) midX = sin (theta ^. rad - pi / 2) h = sin ...
null
https://raw.githubusercontent.com/diagrams/diagrams-canvas/7c5f133becebfd30e8a5d04c5371424b6dbaef8f/examples/Geom.hs
haskell
-----------------------------------------------------------------------------
# LANGUAGE NoMonomorphismRestriction # module Main where import Diagrams.Backend.Canvas.CmdLine import Diagrams.Prelude hiding (dot) theta = 3/8 @@ turn alpha = 7/16 @@ turn chordX = cos (theta ^. rad) chordY = sin (theta ^. rad) midX = sin (theta ^. rad - pi / 2) h = sin ...
c15928c60310342b49b44c22b5fa10ce39453b78384bf77d55936decdaa31b98
marigold-dev/mankavar
c_like.ml
[@@@warning "-34"] type variable = string type op1 = Not [@@deriving ez] module Op2 = struct type t = | Add | Sub | Mul | Div | And | Or [@@deriving ez] end type op2 = Op2.t type expression = | Literal of int64 | Variable of variable | Application of variable * expression | Assignment of variable * expressi...
null
https://raw.githubusercontent.com/marigold-dev/mankavar/87a532f13c58dc69b0b39826cfd8d7431cd0dc7a/src/vm/c_like.ml
ocaml
[@@@warning "-34"] type variable = string type op1 = Not [@@deriving ez] module Op2 = struct type t = | Add | Sub | Mul | Div | And | Or [@@deriving ez] end type op2 = Op2.t type expression = | Literal of int64 | Variable of variable | Application of variable * expression | Assignment of variable * expressi...
227694639b29ff5930aee89bece84ab149c8e4dc87305527d4340f045161861b
msgpack/msgpack-haskell
Integer.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE LambdaCase # {-# LANGUAGE PatternSynonyms #-} # LANGUAGE ScopedTypeVariables # -- | -- Module : Data.MessagePack.Integer Copyright : © 2019 -- License : BSD3 -- Type representing MessagePack integers -- module Data.MessagePack.Integer ( MPIn...
null
https://raw.githubusercontent.com/msgpack/msgpack-haskell/f52a5d2db620a7be70810eca648fd152141f8b14/msgpack/src/Data/MessagePack/Integer.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE PatternSynonyms # | Module : Data.MessagePack.Integer License : BSD3 ** Internal helper # UNPACK # value # UNPACK # NOTE: Internal invariant of 'MPInteger' | Convert a 'MPInteger' value to something else if possible The instances for 'FromMPInteger' ...
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # Copyright : © 2019 Type representing MessagePack integers module Data.MessagePack.Integer ( MPInteger , ToMPInteger(..) , FromMPInteger(..) , fromIntegerTry , tryMPInteger ) where import Compat.Prelude import...
debe6658e71a06939384862ac14596b5923031cec7a4e640508816dce73dc892
bluejay77/MRS-NOVEL9
test.lisp
TEST.LSP 0.2 18 - Mar-83 0058 000 1 ML PUPFTP 18 - Mar-83 ;;; TEST a new MRS - **** retrieve test files from score ***** ;;; ;;; perm filename TEST.LSP[MRS , LSP ] blob sn#702138 filedate 1983 - 03 - 18 ;;; generic text, type T, neo UTF8 ;;; ;;; This function reads forms from the file whose name is in ;;; an...
null
https://raw.githubusercontent.com/bluejay77/MRS-NOVEL9/3a2d7a9c52b711125521444bb3eb6df7fb727017/test.lisp
lisp
TEST a new MRS - **** retrieve test files from score ***** generic text, type T, neo UTF8 This function reads forms from the file whose name is in and prints errors on the terminal. When done, the function prints the total number of errors and exits.
TEST.LSP 0.2 18 - Mar-83 0058 000 1 ML PUPFTP 18 - Mar-83 perm filename TEST.LSP[MRS , LSP ] blob sn#702138 filedate 1983 - 03 - 18 (defun test (in) (setq in (open in '(in ascii block))) (do ((test) (expect) (actual) (n 0)) ((nil)) (cond ((eq 'stop (setq test (read in 'stop))) (close in) (retur...
704f1036a0bcc6e1e97ae465096fafb4d4c3a879383443590f25a3ee63171021
jarofghosts/clojure-koans
07_conditionals.clj
(defn explain-defcon-level [exercise-term] (case exercise-term :fade-out :you-and-what-army :double-take :call-me-when-its-important :round-house :o-rly :fast-pace :thats-pretty-bad :cocked-pistol :sirens :say-what?)) (meditations "Yo...
null
https://raw.githubusercontent.com/jarofghosts/clojure-koans/9bc2a46414f479021ff27ac8744d36dce507ad7f/07_conditionals.clj
clojure
(defn explain-defcon-level [exercise-term] (case exercise-term :fade-out :you-and-what-army :double-take :call-me-when-its-important :round-house :o-rly :fast-pace :thats-pretty-bad :cocked-pistol :sirens :say-what?)) (meditations "Yo...
b3f5d60dbddc06e1a2d5a25a1f5f838f87bbe441f91ed1fb37f7c3d59725107d
nmunro/mtg-api
set.lisp
(defpackage mtg-api/set (:use :cl) (:export #:make-set-api #:make-set #:code #:gatherer-code #:old-code #:expansion #:name #:type #:border #:mkm-id #:booster #:mkm-name #:release-date ...
null
https://raw.githubusercontent.com/nmunro/mtg-api/f014272053f34fcf2c55c6c197403ca52833c18a/src/set/set.lisp
lisp
(defpackage mtg-api/set (:use :cl) (:export #:make-set-api #:make-set #:code #:gatherer-code #:old-code #:expansion #:name #:type #:border #:mkm-id #:booster #:mkm-name #:release-date ...
c64d9a37cec89e9541e0fdb79f53c7b717d381822f806875221724bad089c5d7
ndmitchell/catch
Head.hs
-- #CATCH {: _ * _} module Head where main x = head x
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/examples/Regress/Head.hs
haskell
#CATCH {: _ * _}
module Head where main x = head x
00ccbea9a8c47136deac7a81196df42fe5a5e3e673a1bfcb5f67c8c7b0022d00
camlp5/camlp5
eg_q_ast.ml
(* camlp5o *) (* eg_sexp.ml,v *) Copyright ( c ) INRIA 2007 - 2017 open Fmt ;; let loc = Ploc.dummy ;; let one = <:expr< 1 >> ;; let nil = <:expr< SEXP () >> ;; let rec pp pps = function <:sexp< () >> -> Fmt.(pf pps "()") | <:sexp< ( $exp:a$ . $exp:b$ ) >> -> Fmt.(pf pps "(%a . %a)" pp a pp b) | <:sexp< $a...
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/tutorials/eg_sexp_example/eg_q_ast.ml
ocaml
camlp5o eg_sexp.ml,v
Copyright ( c ) INRIA 2007 - 2017 open Fmt ;; let loc = Ploc.dummy ;; let one = <:expr< 1 >> ;; let nil = <:expr< SEXP () >> ;; let rec pp pps = function <:sexp< () >> -> Fmt.(pf pps "()") | <:sexp< ( $exp:a$ . $exp:b$ ) >> -> Fmt.(pf pps "(%a . %a)" pp a pp b) | <:sexp< $atom:a$ >> -> Fmt.(pf pps "%a" str...
a5fd00e08e00009c572a33385b4141d48f0265bbe423221e4f38546b3d6cafea
grin-compiler/ghc-wpc-sample-programs
Simplified.hs
| Module : Description : Simplified expressions , where functions / constructors can only be applied to variables . License : : The Idris Community . Module : IRTS.Simplified Description : Simplified expressions, where functions/constructors can only be applied to variables. License ...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/src/IRTS/Simplified.hs
haskell
location to reallocate, if available translated differently erased value, will never be inspected | Simplify an expression by let-binding argument expressions that are not variables The boolean parameter indicates whether the expression is at tail call position. | Let-bind a list of expressions to variables and...
| Module : Description : Simplified expressions , where functions / constructors can only be applied to variables . License : : The Idris Community . Module : IRTS.Simplified Description : Simplified expressions, where functions/constructors can only be applied to variables. License ...
e1d33879431db29279efc08fb57d81a3166d38efc43b800da397cba0e84828ca
ocaml/num
ratio.mli
(**************************************************************************) (* *) (* OCaml *) (* *) , ...
null
https://raw.githubusercontent.com/ocaml/num/a635233b5c3da673e617de2cfe210fc869050e12/src/ratio.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the * Operation on rational numbers . This module is used to support the implementation of { ! } and shou...
005c0523ff5794cbf89f0c513c8cc765109409d6735649e39e021ff97e5eec35
facebook/infer
PulseValueHistory.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/12a7b8501c61a29a7c1f9a93e43bfa7cd4487490/infer/src/pulse/PulseValueHistory.mli
ocaml
* start of time * trace of the "main" value being traced * contextual traces, eg conditionals that the path is under * branch history due to a binop
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
7c15cf5a1ea05c5b57decb396a1655f36632f852cc8232e817e318d9c7c5aa0a
rmloveland/scheme48-0.53
low-packages.scm
Copyright ( c ) 1993 - 1999 by and . See file COPYING . ; Alternate implementations of the low-structures. ; Cf. low-structures-interface in ../packages.scm and ../alt-structures.scm. ; Most of the low-structures are assumed to be inherited or obtained elsewhere ( probably from a running Scheme 48 ) . This ...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/alt/low-packages.scm
scheme
Alternate implementations of the low-structures. Cf. low-structures-interface in ../packages.scm and ../alt-structures.scm. Most of the low-structures are assumed to be inherited or obtained structures that export privileged operations. Only for re-export Only for re-export templates -- unneeded now?
Copyright ( c ) 1993 - 1999 by and . See file COPYING . elsewhere ( probably from a running Scheme 48 ) . This only defines (define-structure escapes escapes-interface (open scheme-level-2 define-record-types signals) (files escape)) (define-structures ((primitives primitives-interface) (primiti...
b461d10f58ba6ba1e27b85b5fd48243fbe4e0c0ef671f1fa4a386bf0ff5910c1
ghc/ghc
Arity11.hs
module F11 where fib 0 = 1 fib 1 = 1 fib n = fib (n-1) + fib (n-2) f11f = \z -> let x = fib 1000 in \y -> x+y f11 = (f11f 5 6, f11f 7 8)
null
https://raw.githubusercontent.com/ghc/ghc/37cfe3c0f4fb16189bbe3bb735f758cd6e3d9157/testsuite/tests/arityanal/should_compile/Arity11.hs
haskell
module F11 where fib 0 = 1 fib 1 = 1 fib n = fib (n-1) + fib (n-2) f11f = \z -> let x = fib 1000 in \y -> x+y f11 = (f11f 5 6, f11f 7 8)
0f2b10dcf9d735c7bc89a99ba6b0249128f4a6d042cec933d0accc667feae1fd
Garmelon/mima-tools
Subphase4.hs
# LANGUAGE DataKinds # module Mima.Asm.Phase2.Subphase4 ( subphase4 ) where import Control.Monad import Control.Monad.Trans.Class import Control.Monad.Trans.Reader import qualified Data.Map.Strict as Map import Data.Maybe import qualified Data.Text ...
null
https://raw.githubusercontent.com/Garmelon/mima-tools/4155deb250391960919579eae3365ee0fe5c6505/src/Mima/Asm/Phase2/Subphase4.hs
haskell
# LANGUAGE DataKinds # module Mima.Asm.Phase2.Subphase4 ( subphase4 ) where import Control.Monad import Control.Monad.Trans.Class import Control.Monad.Trans.Reader import qualified Data.Map.Strict as Map import Data.Maybe import qualified Data.Text ...
f5bd2ccd9e9efe15aae2e477e0cbac9c1526e2b6598316f5c6f12a2e26be42fd
t-sin/niko
main.lisp
(defpackage #:niko (:use #:cl) (:import-from #:niko/views/main) (:import-from #:niko/webhook) (:export #:start #:stop #:generate-migrations #:migrate #:migration-status)) (in-package #:niko) (defparameter *webhook-handler* nil) (defparameter *admin-handler* nil) (de...
null
https://raw.githubusercontent.com/t-sin/niko/53cbb4c31ad80379144b839b252d6067f134698a/main.lisp
lisp
now cannot handle other thread's condition because of it, some conditions are not handled; e.g. port already used
(defpackage #:niko (:use #:cl) (:import-from #:niko/views/main) (:import-from #:niko/webhook) (:export #:start #:stop #:generate-migrations #:migrate #:migration-status)) (in-package #:niko) (defparameter *webhook-handler* nil) (defparameter *admin-handler* nil) (de...
fecbaa7fdda56e76da95c3eb21cab4444d7ef6d1c61d88a522ab4d02bde8f5c0
clash-lang/clash-compiler
Wrapping.hs
Copyright : ( C ) 2021 , QBayLogic B.V. License : BSD2 ( see the file LICENSE ) Maintainer : QBayLogic B.V. < > Copyright : (C) 2021, QBayLogic B.V. License : BSD2 (see the file LICENSE) Maintainer : QBayLogic B.V. <> -} # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # ...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/031a664b87042969996307d3cabcabed94d81f55/clash-prelude/src/Clash/Num/Wrapping.hs
haskell
underlying type. Numbers can be converted to wrap by default using 'toWrapping'. # INLINE resize # # INLINE (+) # # INLINE (-) # # INLINE (*) # Assume the default behaviour is to wrap anyway. is not in range (typically wrapping). It would be better if this also definitely wrapped, but in a way which remained syn...
Copyright : ( C ) 2021 , QBayLogic B.V. License : BSD2 ( see the file LICENSE ) Maintainer : QBayLogic B.V. < > Copyright : (C) 2021, QBayLogic B.V. License : BSD2 (see the file LICENSE) Maintainer : QBayLogic B.V. <> -} # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # ...
5fc9ab68c9aee963fd19d3240593d6c40eb91b747325f64540849c7fd1209629
ocaml/ocaml
Alert_toplevel.mli
(* TEST * ocamldoc with html *) (** There's a top-comment before. *) [@@@deprecated "foo"]
null
https://raw.githubusercontent.com/ocaml/ocaml/1e52236624bad1c80b3c46857723a35c43974297/testsuite/tests/tool-ocamldoc/Alert_toplevel.mli
ocaml
TEST * ocamldoc with html * There's a top-comment before.
[@@@deprecated "foo"]
7488c53d7e8f1cf5f69153a3e5dacb55be99b763a627af2a248fb7e18f38cc88
jaspervdj/advent-of-code
08.hs
# LANGUAGE RecordWildCards # module Main where import AdventOfCode.Dijkstra (bfs, bfsGoal) import qualified AdventOfCode.NanoParser as P import Control.Applicative ((<|>)) import Data.List (find) import qualified Data.Set as Set import qualified Data.Vec...
null
https://raw.githubusercontent.com/jaspervdj/advent-of-code/bdc9628d1495d4e7fdbd9cea2739b929f733e751/2020/08.hs
haskell
Current instruction number and whether or not we've already switched an instruction. Doing a simple forward search on this can show us which instruction to switch.
# LANGUAGE RecordWildCards # module Main where import AdventOfCode.Dijkstra (bfs, bfsGoal) import qualified AdventOfCode.NanoParser as P import Control.Applicative ((<|>)) import Data.List (find) import qualified Data.Set as Set import qualified Data.Vec...
e375b7bcb84bd8e50cbbd2c43f63686c04327db26352d19d0a1b988c74fe87f6
rvirding/luerl
ttdict.erl
Copyright ( c ) 2013 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software distributed under ...
null
https://raw.githubusercontent.com/rvirding/luerl/e9aa5d19a0ce7436fba64618c389c6a4e5327273/src/ttdict.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright ( c ) 2013 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , Author : Purpose : Key - Value dictionary as a 2 - 3 tree . This implementation uses 2 - 3 trees . The description of the tree restructuri...
7275897c51fcdacbde8b9a85da4f838a58748b5eda5494f757f5a7661d45051b
Ptival/chick
TopDown.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE TemplateHaskell # module Diff.Guess.TopDown ( runTopDown, topDownStateM, ) where import Control.Lens (Lens', makeLenses, over, set, view) import Control.Monad (forM_, when) import Control.Monad.Loops (whileM_) import Data.List (partition, sortOn, union) import Diff....
null
https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/Diff/Guess/TopDown.hs
haskell
trace "pop l1" trace "pop l2" trace "pop both" trace $ printf "h1: %s" (show h1) trace $ printf "h2: %s" (show h2) trace $ printf "Adding candidate mapping (%s, %s)" (show t1) (show t2) trace "Now sorting candidate mappings by dice" forM_ a $ \ (t1, t2) -> do trace $ printf "A: (%s, %s)" (show $ t1) (show $ ...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE TemplateHaskell # module Diff.Guess.TopDown ( runTopDown, topDownStateM, ) where import Control.Lens (Lens', makeLenses, over, set, view) import Control.Monad (forM_, when) import Control.Monad.Loops (whileM_) import Data.List (partition, sortOn, union) import Diff....
626133c6a18e70026a8b1c380f190395440e49960eb5fa6aed4c1d0fd2a58cf0
composewell/streamly
Rate.hs
# OPTIONS_GHC -Wno - deprecations # # LANGUAGE FlexibleContexts # -- | -- Module : Main Copyright : ( c ) 2018 Composewell Technologies -- -- License : BSD3 -- Maintainer : import Streamly.Prelude (fromAsync, fromAhead, maxThreads, IsStream, MonadAsync) import qualified Streamly.Prelude as S import S...
null
https://raw.githubusercontent.com/composewell/streamly/5327f181db2cf956461b74ed50720eebf119f25a/benchmark/Streamly/Benchmark/Prelude/Rate.hs
haskell
| Module : Main License : BSD3 Maintainer : ----------------------------------------------------------------------------- Average Rate ----------------------------------------------------------------------------- # INLINE rateNothing # XXX arbitrarily large rate should be the same as rate Nothing ben...
# OPTIONS_GHC -Wno - deprecations # # LANGUAGE FlexibleContexts # Copyright : ( c ) 2018 Composewell Technologies import Streamly.Prelude (fromAsync, fromAhead, maxThreads, IsStream, MonadAsync) import qualified Streamly.Prelude as S import Streamly.Benchmark.Common import Streamly.Benchmark.Prelude import Gau...
90eddc1bd62a60858e2572c05eca2595bea4e57f7bb3c993eebba16001180e3b
hypernumbers/hypernumbers
funs_util.erl
@author ( C ) 2011 - 2014 , Hypernumbers Ltd %%% @doc some utilities for hnfuns %%% %%% @end Created : 22 Aug 2011 by < > %%%------------------------------------------------------------------- %%% %%% LICENSE %%% %%% This program is free software: you can redistribute it and/or modify it under t...
null
https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/formula_engine-1.0/src/funs_util.erl
erlang
@doc some utilities for hnfuns @end ------------------------------------------------------------------- LICENSE This program is free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty...
@author ( C ) 2011 - 2014 , Hypernumbers Ltd Created : 22 Aug 2011 by < > it under the terms of the GNU Affero General Public License as published by the Free Software Foundation version 3 You should have received a copy of the GNU Affero General Public License -module(funs_util). -export([ ...
8f3d5d00da95e4885e7f6198b3272f2f33797519af8a3f3e6802aff37fa573c7
ocaml-multicore/ocaml-tsan
Tests.ml
(* TEST * expect *) (* Subtyping is "syntactic" *) fun (x : < x : int >) y z -> (y :> 'a), (x :> 'a), (z :> 'a);; [%%expect{| - : < x : int > -> < x : int > -> < x : int > -> < x : int > * < x : int > * < x : int > = <fun> |}];; (* - : (< x : int > as 'a) -> 'a -> 'a * 'a = <fun> *) (* Quirks of class typing. ...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/testsuite/tests/typing-objects/Tests.ml
ocaml
TEST * expect Subtyping is "syntactic" - : (< x : int > as 'a) -> 'a -> 'a * 'a = <fun> Quirks of class typing. class ['a] c : unit -> object constraint 'a = int method f : 'a c end and ['a] d : unit -> object constraint 'a = int method f : 'a c end 'a free in class d Create instance #c class virtu...
fun (x : < x : int >) y z -> (y :> 'a), (x :> 'a), (z :> 'a);; [%%expect{| - : < x : int > -> < x : int > -> < x : int > -> < x : int > * < x : int > * < x : int > = <fun> |}];; class ['a] c () = object method f = (new c (): int c) end and ['a] d () = object inherit ['a] c () end;; [%%expect{| class ['a] c : ...
688cac469c62e5ba02a4fb1d29528f588e18b43beb863d360935fbe154143d6c
gsakkas/rite
20060407-12:38:30-642a84ce028494fa2e6f268cb01f2d6e.seminal.ml
* * * * * Note : Problem 1 does not use ; see the assignment * * * * exception Unimplemented exception RuntimeTypeError exception BadSourceProgram exception BadPrecomputation # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060407-12%3A38%3A30-642a84ce028494fa2e6f268cb01f2d6e.seminal.ml
ocaml
store env! ********* examples and testing **********
* * * * * Note : Problem 1 does not use ; see the assignment * * * * exception Unimplemented exception RuntimeTypeError exception BadSourceProgram exception BadPrecomputation # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # ...
1fcb888a4a3cae7ba6fe9b40226522391039ddc7a0ed453cc13fc14101f711de
vert-x/mod-lang-clojure
project.clj
(defproject embedded "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"] [io.vertx/clojure-api "1.0.0.Beta1"]] :main embedded.core)
null
https://raw.githubusercontent.com/vert-x/mod-lang-clojure/dcf713460b8f46c08d0db6e7bf8537f1dd91f297/examples/embedded/project.clj
clojure
(defproject embedded "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"] [io.vertx/clojure-api "1.0.0.Beta1"]] :main embedded.core)
80ff30055e0a20784c8be4d15045c25727064ec574185f4763aa80d1db793e8b
janestreet/universe
ppx_python_conv.ml
open Base open Ppxlib open Ast_builder.Default let default = Attribute.declare "python.default" Attribute.Context.label_declaration Ast_pattern.(pstr (pstr_eval __ nil ^:: nil)) (fun x -> x) ;; let option = Attribute.declare "python.option" Attribute.Context.label_declaration Ast_patte...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_python/src/ppx_python_conv.ml
ocaml
Generated function names. For parameterized types, use these function names as arguments. we've called [name_type_params_in_td]
open Base open Ppxlib open Ast_builder.Default let default = Attribute.declare "python.default" Attribute.Context.label_declaration Ast_pattern.(pstr (pstr_eval __ nil ^:: nil)) (fun x -> x) ;; let option = Attribute.declare "python.option" Attribute.Context.label_declaration Ast_patte...
34899e96effb883f639ee4a2c69a3453afc1c684deb8ba6c7deb87bf93ca4e92
rabbitmq/ra-kv-store
generator.clj
(ns jepsen.generator "Generates operations for a test. Generators are composable, stateful objects which emit operations for processes until they are exhausted, at which point they return nil. Generators may sleep when generating operations, to delay the rate at which the test proceeds Generators do *not* ha...
null
https://raw.githubusercontent.com/rabbitmq/ra-kv-store/faf36863bb3822ef4dcd99de5635007273d35997/jepsen/jepsen/src/jepsen/generator.clj
clojure
test other threads are 0-n, Define lots of generators! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; For pretty-printing Function body For prn/str, we'll generate a defmethod Rewrite field expression, changing field names to instance variable getters This was a field Something else Spaces between fields e.g....
(ns jepsen.generator "Generates operations for a test. Generators are composable, stateful objects which emit operations for processes until they are exhausted, at which point they return nil. Generators may sleep when generating operations, to delay the rate at which the test proceeds workers will take care...
d60c6c39db815e4b60092916c5f2d7161eb86e0164c8dc13ec05411bac7248b3
liquidz/antq
edn_test.clj
(ns antq.report.edn-test (:require [antq.report :as report] [antq.report.edn] [antq.test-helper :as h] [clojure.edn :as edn] [clojure.string :as str] [clojure.test :as t])) (t/deftest edn-reporter-test (let [deps [(h/test-dep {:file "a" :name "foo" :version "1" :latest-version "2"}) ...
null
https://raw.githubusercontent.com/liquidz/antq/ca8472b28702f5e568492001bc476fb09e5b2e6b/test/antq/report/edn_test.clj
clojure
(ns antq.report.edn-test (:require [antq.report :as report] [antq.report.edn] [antq.test-helper :as h] [clojure.edn :as edn] [clojure.string :as str] [clojure.test :as t])) (t/deftest edn-reporter-test (let [deps [(h/test-dep {:file "a" :name "foo" :version "1" :latest-version "2"}) ...
1842053eadec06895675bb0c15e762a3604dbbd0d79d5ca091ee246be77afb85
futurice/haskell-mega-repo
Config.hs
module Futurice.App.SmsProxy.Config where import Prelude () import Futurice.Prelude import Futurice.EnvConfig import Network.HTTP.Client (Request) data Config = Config { cfgTwilioBaseReq :: !Request -- ^ Twilio API endpoint , cfgTwilioUser :: !Text -- ^ API SID , cfgTwilioPass :: !Text -- ^...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/sms-proxy/src/Futurice/App/SmsProxy/Config.hs
haskell
^ Twilio API endpoint ^ API SID ^ API Secret ^ SMS Sender ID (or phonenumber)
module Futurice.App.SmsProxy.Config where import Prelude () import Futurice.Prelude import Futurice.EnvConfig import Network.HTTP.Client (Request) data Config = Config } deriving (Show) instance Configure Config where configure = Config <$> envVar "TWILIO_URL" <*> envVar "TWILIO_USER" ...
91bf5397ab790a21eb6d9e0e75ce114b0ca5979e3e2998bb8bf5412e5d554b87
tweag/servant-template
AppServices.hs
{-# LANGUAGE RankNTypes #-} module API.AppServices where import Control.Monad ((<=<)) import Control.Monad.Except (throwError) import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Except (ExceptT, runExceptT) import Crypto.JOSE.JWK (JWK) import Hasql.Session (QueryError) import Infrastructure.Authenticat...
null
https://raw.githubusercontent.com/tweag/servant-template/b5598af43ff69160c6d8a59d5e4a1f23358b6410/src/API/AppServices.hs
haskell
# LANGUAGE RankNTypes # | Collection of services needed by the application to work | Lifts a computation from 'ExceptT e IO' to 'Handler a' using the provided 'handleError' function | | | | Creates a 'PasswordManager' service injecting its dependencies and handling errors
module API.AppServices where import Control.Monad ((<=<)) import Control.Monad.Except (throwError) import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Except (ExceptT, runExceptT) import Crypto.JOSE.JWK (JWK) import Hasql.Session (QueryError) import Infrastructure.Authentication.AuthenticateUser (Authen...
48eb8845969198a28391afc6b21d59a72a7f4d4366ec8fe43fd066f15c40bf84
PLTools/Lama-devel
tool.ml
open Language Test using : mkae -C tools & & LAMA=./runtime tools / gtd.exe tools / demo1.lama -pos 20,22 -use should give : found definition for ` f ` at ( 17,19 ) Total 2 usages found ( 5,25 ) ( 5,22 ) mkae -C tools && LAMA=./runtime tools/gtd.exe tools/demo1.lama -pos 20,22 -use ...
null
https://raw.githubusercontent.com/PLTools/Lama-devel/7eb3e223b8b289394ae23622ec117aeff879afaf/tools/tool.ml
ocaml
we found what we want looks for line,col in the tree Format.printf "%s\n%!" (GT.show Expr.t e);
open Language Test using : mkae -C tools & & LAMA=./runtime tools / gtd.exe tools / demo1.lama -pos 20,22 -use should give : found definition for ` f ` at ( 17,19 ) Total 2 usages found ( 5,25 ) ( 5,22 ) mkae -C tools && LAMA=./runtime tools/gtd.exe tools/demo1.lama -pos 20,22 -use ...