_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
aa37f1694d4a88246927dfdbebd72a328099f29bfc51ded5c1370644394db38e
project-oak/hafnium-verification
androidFramework.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/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/checkers/androidFramework.mli
ocaml
* Android lifecycle types and their lifecycle methods that are called by the framework * return true if [typename] <: android.view.View * return true if [procname] is a special lifecycle cleanup method
* 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 ...
ebe00bab35ed0864dc2cb4069cfbf71987bf93e24fd6a6eb24576d92d6e2ff52
pinterface/burgled-batteries
ffi-callbacks.lisp
(in-package #:python.cffi) #|| We want to expand into a CFFI defcallback, then parse the arguments so we can pretend the Lisp function was defined as (defun fun (positional &key keyword keyword) ...), and /then/ run the &body. ||# (eval-when (:compile-toplevel :load-toplevel :execute) (defvar *callback-types* (make...
null
https://raw.githubusercontent.com/pinterface/burgled-batteries/8ae3815a52fde36e68e54322cd7da2c42ec09f5c/ffi-callbacks.lisp
lisp
We want to expand into a CFFI defcallback, then parse the arguments so we can pretend the Lisp function was defined as (defun fun (positional &key keyword keyword) ...), and /then/ run the &body. SELF tends to be NIL. ARGS is a list of arguments. * SELF is NIL. ARGS is an empty array. DICT is a hashtable of na...
(in-package #:python.cffi) (eval-when (:compile-toplevel :load-toplevel :execute) (defvar *callback-types* (make-hash-table)) (defun set-callback-type (lisp-name flags) (setf (gethash lisp-name *callback-types*) flags)) (defun get-callback-type (lisp-name) (or (gethash lisp-name *callback-types*) ...
f29e0c17acc4366d303d4ff8eadf7041a3fec9cdb467c7edaa504f77d1a4c809
HaskellZhangSong/Introduction_to_Haskell_2ed_source
Person.hs
# LANGUAGE TemplateHaskell # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} # LANGUAGE DeriveGeneric # module Person where import System.Exit (exitFailure, exitSuccess) import ...
null
https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell_2ed_source/140c50fdccfe608fe499ecf2d8a3732f531173f5/C18/Person.hs
haskell
# LANGUAGE RecordWildCards # # LANGUAGE OverloadedStrings # # LANGUAGE TypeOperators # | Workaround for .
# LANGUAGE TemplateHaskell # # LANGUAGE ScopedTypeVariables # # LANGUAGE DeriveGeneric # module Person where import System.Exit (exitFailure, exitSuccess) import System.IO (stderr, hPutStrLn) import qualified Data.ByteString.Lazy.Char8 as BSL import Syst...
fb8ae52cb3d4ef34cebf16345e7af1d2dbeddb5d1f54efa9db8addd9ac50d445
dimitri/pgloader
pgsql-create-schema.lisp
;;; ;;; Tools to handle PostgreSQL tables and indexes creations ;;; (in-package #:pgloader.pgsql) ;;; ;;; Table schema support ;;; (defun create-sqltypes (catalog &key if-not-exists include-drop (client-min-messages...
null
https://raw.githubusercontent.com/dimitri/pgloader/644f2617e7e779e93db3bba20ae734f193f6e30c/src/pgsql/pgsql-create-schema.lisp
lisp
Tools to handle PostgreSQL tables and indexes creations Table schema support now create the schemas (again?) API for Foreign Keys also DROP the foreign keys that depend on the indexes we want to DROP we might have loaded fkeys referencing tables that have not been included in (or have been excluded fro...
(in-package #:pgloader.pgsql) (defun create-sqltypes (catalog &key if-not-exists include-drop (client-min-messages :notice)) "Create the needed data types for given CATALOG." (let ((sqltype-list (sqltype-list ca...
81401977640bdea43adce1a398defe786f6e79a797ff8d4820ade68f77b7fb98
kaizhang/Taiji
Types.hs
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Bio.Data.Experiment.Types ( FileType(....
null
https://raw.githubusercontent.com/kaizhang/Taiji/f6a050ba0ee6acb6077435566669279455cef350/bio-experiments/src/Bio/Data/Experiment/Types.hs
haskell
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedStrings # # LANGUAGE TemplateHaskell #
# LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE MultiParamTypeClasses # module Bio.Data.Experiment.Types ( FileType(..) , File , location , format , tags , emptyFile , FileSet(..) , _Single , _Pair , Replicate , emptyReplicate , fi...
49122d89d349a0b49c97e3e29a6e8f5825679dfd6f15952d81544ca951747fd0
CryptoKami/cryptokami-core
BlockVersion.hs
-- | Update system-specific functionality related to 'BlockVersion', -- 'BlockVersionData', 'BlockVersionModifier'. module Pos.Update.BlockVersion ( applyBVM ) where import Universum import Pos.Core (BlockVersionData (..)) import Pos.Core.Update (BlockVersionModifier (..))...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/update/Pos/Update/BlockVersion.hs
haskell
| Update system-specific functionality related to 'BlockVersion', 'BlockVersionData', 'BlockVersionModifier'. | Apply 'BlockVersionModifier' to 'BlockVersionData'.
module Pos.Update.BlockVersion ( applyBVM ) where import Universum import Pos.Core (BlockVersionData (..)) import Pos.Core.Update (BlockVersionModifier (..)) applyBVM :: BlockVersionModifier -> BlockVersionData -> BlockVersionData applyBVM BlockVersionModifier {..} BlockV...
c7e0ca34c2dbcbd668d2433b537193e193e1661c4af04df3fd13f734d3b344d8
nubank/midje-nrepl
profiler.clj
(ns midje-nrepl.profiler (:require [midje-nrepl.misc :as misc]) (:import java.text.DecimalFormat java.time.Duration java.util.Locale)) (def ^:private formatter "Instance of java.text.Decimalformat used internally to format decimal values." (let [decimal-format (DecimalFormat/getInstance...
null
https://raw.githubusercontent.com/nubank/midje-nrepl/b4d505f346114db88ad5b5c6b3c8f0af4e0136fc/src/midje_nrepl/profiler.clj
clojure
(ns midje-nrepl.profiler (:require [midje-nrepl.misc :as misc]) (:import java.text.DecimalFormat java.time.Duration java.util.Locale)) (def ^:private formatter "Instance of java.text.Decimalformat used internally to format decimal values." (let [decimal-format (DecimalFormat/getInstance...
b845979c1a319f2036920feb4a42e4b9677a6776728a29513d56eea98df07831
bsaleil/lc
primes.scm.scm
;;------------------------------------------------------------------------------ Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->f64vector lst)) (def-macro (FLOATvector? x) `(f64vector? ,x)) (def-macro (FLOATvector...
null
https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultVMIL-lc-gsc-lc/LC5f64/primes.scm.scm
scheme
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Gabriel benchmarks C benchmarks Other benchmarks
Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->f64vector lst)) (def-macro (FLOATvector? x) `(f64vector? ,x)) (def-macro (FLOATvector . lst) `(f64vector ,@lst)) (def-macro (FLOATmake-vector n . init) `(make...
beccb3e64d96ebcd9dc8080612fb7593794260a6fc382933889292bcf2888fcb
ku-fpg/blank-canvas
Path.hs
{-# LANGUAGE OverloadedStrings #-} module Path where import Graphics.Blank ( 578,200 ) main :: IO () main = blankCanvas 3000 $ \ context -> do send context $ do beginPath() moveTo(100, 20) line 1 lineTo(200, 160) -- quadratic curve quadraticCurveTo(230, 200, 250, 120) ...
null
https://raw.githubusercontent.com/ku-fpg/blank-canvas/39915c17561106ce06e1e3dcef85cc2e956626e6/wiki-suite/Path.hs
haskell
# LANGUAGE OverloadedStrings # quadratic curve bezier curve
module Path where import Graphics.Blank ( 578,200 ) main :: IO () main = blankCanvas 3000 $ \ context -> do send context $ do beginPath() moveTo(100, 20) line 1 lineTo(200, 160) quadraticCurveTo(230, 200, 250, 120) bezierCurveTo(290, -40, 300, 200, 400, 150) line 2 ...
0fc3c876b7015f1a198348756b01b025a814e738c7287ceadca34f623abdc312
ghc/ghc
StaticPtrTable.hs
# LANGUAGE ViewPatterns # -- | Code generation for the Static Pointer Table -- ( c ) 2014 I / O Tweag -- -- Each module that uses 'static' keyword declares an initialization function of -- the form hs_spt_init_\<module>() which is emitted into the _stub.c file and -- annotated with __attribute__((constructor)) so th...
null
https://raw.githubusercontent.com/ghc/ghc/cc25d52e0f65d54c052908c7d91d5946342ab88a/compiler/GHC/Iface/Tidy/StaticPtrTable.hs
haskell
| Code generation for the Static Pointer Table Each module that uses 'static' keyword declares an initialization function of the form hs_spt_init_\<module>() which is emitted into the _stub.c file and annotated with __attribute__((constructor)) so that it gets executed at startup time. The function's purpose i...
# LANGUAGE ViewPatterns # ( c ) 2014 I / O Tweag pointers of this module in the hashtable of the RTS , and it looks something > static StgWord64 k0[2 ] = { 16252233372134256ULL,7370534374096082ULL } ; > static StgWord64 k1[2 ] = { 12545634534567898ULL,5409674567544151ULL } ; exported . This is done in ...
9da6d1f0d03940bfe64ddd2803561a9468ce43d0bb1f829d6664270e8b073c1e
craigl64/clim-ccl
dep-openmcl.lisp
;;; -*- Mode: Lisp; Package: Xlib; Log: clx.log -*- This file contains some of the system dependent code for CLX ;;; TEXAS INSTRUMENTS INCORPORATED ;;; P.O. BOX 2909 AUSTIN , TEXAS 78769 ;;; Copyright ( C ) 1987 Texas Instruments Incorporated . ;;; ;;; Permission is granted to any individual ...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/xlib/dep-openmcl.lisp
lisp
-*- Mode: Lisp; Package: Xlib; Log: clx.log -*- P.O. BOX 2909 Permission is granted to any individual or institution to use, copy, modify, and distribute this software, provided that this complete copyright and permission notice is maintained, intact, in all copies and supporting documentation. express ...
This file contains some of the system dependent code for CLX TEXAS INSTRUMENTS INCORPORATED AUSTIN , TEXAS 78769 Copyright ( C ) 1987 Texas Instruments Incorporated . Texas Instruments Incorporated provides this software " as is " without (in-package :xlib) (proclaim '(declaration array-regist...
991c6c4bb191a4fafc228a19402d3e7a431c503b40712a40a99d546663453239
NetworkVerification/nv
InterpUtils.ml
open Nv_datastructures open Nv_lang (* Expression and operator interpreters *) (* matches p b is Some env if v matches p and None otherwise; assumes no repeated variables in pattern *) let rec matches p (v : Syntax.value) env : Syntax.value Env.t option = let open Syntax in match p, v.v with | PWild, _ -> Som...
null
https://raw.githubusercontent.com/NetworkVerification/nv/aa48abcd1bf9d4b7167cfe83a94b44e446a636e8/src/lib/interpreter/InterpUtils.ml
ocaml
Expression and operator interpreters matches p b is Some env if v matches p and None otherwise; assumes no repeated variables in pattern matches_list ps vs
open Nv_datastructures open Nv_lang let rec matches p (v : Syntax.value) env : Syntax.value Env.t option = let open Syntax in match p, v.v with | PWild, _ -> Some env | PVar x, _ -> Some (Env.update env x v) | PUnit, VUnit -> Some env | PBool true, VBool true | PBool false, VBool false -> Some env | PInt...
10c71d941de1c02bb3b3840838ff12b72cb4354d8c36aa6b14049663324a4ecd
robertluo/fun-map
fun_map.cljc
(ns robertluo.fun-map "fun-map Api" (:require [robertluo.fun-map.core :as core] [robertluo.fun-map.wrapper :as wrapper] #?(:clj [robertluo.fun-map.helper :as helper]))) (defn fun-map "Returns a new fun-map. A fun-map is a special map which will automatically *unwrap* a value if it's a wrapper...
null
https://raw.githubusercontent.com/robertluo/fun-map/ea2d418dac2b77171f877c4d6fbc4d14d72ea04d/src/robertluo/fun_map.cljc
clojure
life cycle map
(ns robertluo.fun-map "fun-map Api" (:require [robertluo.fun-map.core :as core] [robertluo.fun-map.wrapper :as wrapper] #?(:clj [robertluo.fun-map.helper :as helper]))) (defn fun-map "Returns a new fun-map. A fun-map is a special map which will automatically *unwrap* a value if it's a wrapper...
a3114c8dd6352bc08fcfec345d0f48f12e5b9f5069a1e250e9b51279eec14e47
clojure-dus/chess
chessboard.clj
(ns chess.movelogic.bitboard.chessboard (:use [chess.movelogic.bitboard bitoperations file-rank piece-attacks]) (:use [chess.movelogic.protocol :only [read-fen->map]])) (defrecord GameState [board turn rochade ^long r ^long n ^long b ^long q ^long k ^long p ...
null
https://raw.githubusercontent.com/clojure-dus/chess/7eb0e5bf15290f520f31e7eb3f2b7742c7f27729/src/chess/movelogic/bitboard/chessboard.clj
clojure
(ns chess.movelogic.bitboard.chessboard (:use [chess.movelogic.bitboard bitoperations file-rank piece-attacks]) (:use [chess.movelogic.protocol :only [read-fen->map]])) (defrecord GameState [board turn rochade ^long r ^long n ^long b ^long q ^long k ^long p ...
e811c771ef08983d51cb27b7c644059db26be77b453c805bb21f22db25523255
clojurewerkz/ogre
branch_test.clj
(ns clojurewerkz.ogre.suite.branch-test (:refer-clojure :exclude [and count drop filter group-by key key identity iterate loop map max min next not or range repeat reverse sort shuffle]) (:require [clojurewerkz.ogre.core :refer :all]) (:import (org.apache.tinkerpop.gremlin.structure Vertex) (org.apache...
null
https://raw.githubusercontent.com/clojurewerkz/ogre/cfc5648881d509a55f8a951e01d7b2a166e71d17/test/clojure/clojurewerkz/ogre/suite/branch_test.clj
clojure
(ns clojurewerkz.ogre.suite.branch-test (:refer-clojure :exclude [and count drop filter group-by key key identity iterate loop map max min next not or range repeat reverse sort shuffle]) (:require [clojurewerkz.ogre.core :refer :all]) (:import (org.apache.tinkerpop.gremlin.structure Vertex) (org.apache...
aeb00f369b5ba92a9d7b6f5fc16478202ed8cb314acd850d70344dc5e5540d9c
project-fifo/vmwebadm
del.cljs
(ns server.keys.del (:use [server.utils :only [clj->js prn-js clj->json transform-keys]]) (:require [server.storage :as storage] [server.http :as http])) (defn handle [resource request response account id] (storage/init) (swap! storage/data update-in [:users account :keys] #(dissoc % id)) (storage/save...
null
https://raw.githubusercontent.com/project-fifo/vmwebadm/55d83bbc0ac6db8ea1d784c73d91bf4f228fa04a/src/server/keys/del.cljs
clojure
(ns server.keys.del (:use [server.utils :only [clj->js prn-js clj->json transform-keys]]) (:require [server.storage :as storage] [server.http :as http])) (defn handle [resource request response account id] (storage/init) (swap! storage/data update-in [:users account :keys] #(dissoc % id)) (storage/save...
8d8f299d0b5bfeb771d8992bf6e2ad4d8a98315645ab4c86986549a055e50ac3
sbcl/sbcl
cell.lisp
;;;; the VM definition of various primitive memory access VOPs for the ARM This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. T...
null
https://raw.githubusercontent.com/sbcl/sbcl/dfbd2f7cb1f0fbca276c8db3383d9b147725a49c/src/compiler/arm/cell.lisp
lisp
the VM definition of various primitive memory access VOPs for the more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. Data object ref/set stuff. Symbol hacking VOPs: The compiler likes to be a...
ARM This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB-VM") (define-vop (slot) (:args (object :scs (descriptor-reg))) (:info name offset lowtag) (:ig...
633f40a66dc18b3bb5425f6de0e066b537b15bed7e64c83bcf6f3f3368c0425f
Ptival/chick
Inductive.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE OverloadedStrings #-} module Diff.Guess.Inductive ( guess, ) where import Control.Monad (zipWithM) import Data.Function.HT (nest) import qualified Diff.Guess.Atom as ΔGA import qualified Diff.Guess.Constructor as ΔGC import qualified Diff.Guess.Term as ΔGT import qual...
null
https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/Diff/Guess/Inductive.hs
haskell
# LANGUAGE OverloadedStrings # FIXME: for now I cheat and assume: - constructors are in the same order - if some are missing, they are the last ones - if some are introduced, they are the last ones Ideally, we'd have some heuristic to match seemingly-related constructors
# LANGUAGE AllowAmbiguousTypes # module Diff.Guess.Inductive ( guess, ) where import Control.Monad (zipWithM) import Data.Function.HT (nest) import qualified Diff.Guess.Atom as ΔGA import qualified Diff.Guess.Constructor as ΔGC import qualified Diff.Guess.Term as ΔGT import qualified Diff.Inductive as ΔI import q...
e1db0eccfc79ece0efde85b50792d71e4ad49a7edbe01c2efac709c26c6a867c
ocaml-toml/To.ml
unicode.ml
For more informations about unicode to utf-8 converting method used see : * ( Page3 , section " 3 . UTF-8 definition " ) * (Page3, section "3. UTF-8 definition") *) decimal conversions of binary used : * 10000000 - > 128 ; 11000000 - > 192 ; 11100000 - > 224 * 10000000 -> 128; 11000000 -> 192; 111000...
null
https://raw.githubusercontent.com/ocaml-toml/To.ml/215922367a2783af22e12e08bd8182e4cd149be0/src/unicode.ml
ocaml
For more informations about unicode to utf-8 converting method used see : * ( Page3 , section " 3 . UTF-8 definition " ) * (Page3, section "3. UTF-8 definition") *) decimal conversions of binary used : * 10000000 - > 128 ; 11000000 - > 192 ; 11100000 - > 224 * 10000000 -> 128; 11000000 -> 192; 111000...
fd61bc9a634bda29a154bb9df8a26d575c33d8563ef5115ee8ab1fccb35556e8
tweag/asterius
arr008.hs
-- !!! Array - out-of-range (index,value) pairs -- supplying a list containing one or more pairs -- with out-of-range index is undefined. -- -- import Data.Array main = let a1 = array (1::Int,0) [] a2 = array (0::Int,1) (zip [0..] ['a'..'z']) in print (a1::Array Int Int) >> print a2
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/array/arr008.hs
haskell
!!! Array - out-of-range (index,value) pairs with out-of-range index is undefined.
supplying a list containing one or more pairs import Data.Array main = let a1 = array (1::Int,0) [] a2 = array (0::Int,1) (zip [0..] ['a'..'z']) in print (a1::Array Int Int) >> print a2
2b6957ca5b7457c53ff2b40f3fb4ba348ba27813b353388b472c31e1eba14544
the-dr-lazy/cascade
OffsetDatetime.hs
| Module : Cascade . Api . Data . OffsetDatetime Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! ! Copyright : ( c ) 2020 - 2021 Cascade License : MPL 2.0 Maintainer : < > ( the-dr-lazy.github.io ) Stability : Stable Portability : POSIX ! ! ! INSERT MODULE LONG DESCRIPTION...
null
https://raw.githubusercontent.com/the-dr-lazy/cascade/014a5589a2763ce373e8c84a211cddc479872b44/cascade-api/src/Cascade/Api/Data/OffsetDatetime.hs
haskell
| Module : Cascade . Api . Data . OffsetDatetime Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! ! Copyright : ( c ) 2020 - 2021 Cascade License : MPL 2.0 Maintainer : < > ( the-dr-lazy.github.io ) Stability : Stable Portability : POSIX ! ! ! INSERT MODULE LONG DESCRIPTION...
2aa13fb7bf669b6a89c2e7414948dc9fd4578e92dc9d4cd5aa523c9df4036865
FieryCod/holy-lambda-ring-adapter
codec.clj
(ns fierycod.holy-lambda-ring-adapter.codec "Functions for encoding and decoding data. All credits to @weavejester. -clojure/ring-codec" (:require [clojure.string :as str]) (:import java.util.Map [java.net URLEncoder])) (defn- double-escape [^String x] (.replace (.replace x "\\" "\\\\") "$" "\\$")) (d...
null
https://raw.githubusercontent.com/FieryCod/holy-lambda-ring-adapter/06fb440c6d42c4e1d36108c510cd1b00f21d0b71/src/fierycod/holy_lambda_ring_adapter/codec.clj
clojure
(ns fierycod.holy-lambda-ring-adapter.codec "Functions for encoding and decoding data. All credits to @weavejester. -clojure/ring-codec" (:require [clojure.string :as str]) (:import java.util.Map [java.net URLEncoder])) (defn- double-escape [^String x] (.replace (.replace x "\\" "\\\\") "$" "\\$")) (d...
b5ac0e76d96dbc19687c8de2a15eca0bf4f9ef50ffdcb59926851083bd6db2d7
fused-effects/fused-effects
Writer.hs
# LANGUAGE ExistentialQuantification # {-# LANGUAGE RankNTypes #-} | An effect allowing writes to an accumulated quantity alongside a computed value . A ' Writer ' @w@ effect keeps track of a monoidal datum of type @w@ and strictly appends to that monoidal value with the ' tell ' effect . Writes to that value can be...
null
https://raw.githubusercontent.com/fused-effects/fused-effects/9790ed4fb2cbaaf8933ce0eb42d7c55bc38f12ac/src/Control/Effect/Writer.hs
haskell
# LANGUAGE RankNTypes # * Writer effect * Re-exports | Write a value to the log. @ @ # INLINE tell # | Run a computation, returning the pair of its output and its result. @ @ | Run a computation, applying a function to its output and returning the pair of the modified output and its result. @ @ | Run ...
# LANGUAGE ExistentialQuantification # | An effect allowing writes to an accumulated quantity alongside a computed value . A ' Writer ' @w@ effect keeps track of a monoidal datum of type @w@ and strictly appends to that monoidal value with the ' tell ' effect . Writes to that value can be detected and intercepted wi...
bd11b7adca94fa8bc1d4373090dce3909b4038c38749c1199fe6c2ff81b42fb4
BoeingX/haskell-programming-from-first-principles
GivenATypeWriteTheFunction.hs
module Types.ChapterExercises.GivenATypeWriteTheFunction where Question 1 i :: a -> a -- or i = id i a = a Question 2 c :: a -> b -> a -- or c = const c a _ = a Question 3 c'' :: b -> a -> b c'' = c Question 4 c' :: a -> b -> b c' _ b = b Question 5 r :: [a] -> [a] r = id r' :: [a] -> [a] r' = reverse ...
null
https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/src/Types/ChapterExercises/GivenATypeWriteTheFunction.hs
haskell
or i = id or c = const
module Types.ChapterExercises.GivenATypeWriteTheFunction where Question 1 i :: a -> a i a = a Question 2 c :: a -> b -> a c a _ = a Question 3 c'' :: b -> a -> b c'' = c Question 4 c' :: a -> b -> b c' _ b = b Question 5 r :: [a] -> [a] r = id r' :: [a] -> [a] r' = reverse Question 6 co :: (b -> c) ->...
c2aa4e09255ff07eb89c188d50794d526c000604aeeacf334f6f85a488316048
lucasdicioccio/deptrack-project
BlockDevice.hs
module Devops.Storage.BlockDevice where data BlockDevice a = BlockDevice { blockDevicePath :: FilePath , partitionPath :: Int -> FilePath }
null
https://raw.githubusercontent.com/lucasdicioccio/deptrack-project/cd3d59a796815af8ae8db32c47b1e1cdc209ac71/deptrack-devops-recipes/src/Devops/Storage/BlockDevice.hs
haskell
module Devops.Storage.BlockDevice where data BlockDevice a = BlockDevice { blockDevicePath :: FilePath , partitionPath :: Int -> FilePath }
53e3dc9442664a3cf34665a5731a8a3d9fbfaa6ffc9fc9a82626868a6574d8b1
viercc/kitchen-sink-hs
Indexed.hs
# LANGUAGE TypeApplications # # LANGUAGE PolyKinds # # LANGUAGE StandaloneKindSignatures # {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeOperators # {-# LANGUAGE GADTs #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE InstanceSigs # # LANGUAGE EmptyCase # | - style Indexed Monad ...
null
https://raw.githubusercontent.com/viercc/kitchen-sink-hs/5038b17a39e4e6f19e6fb4779a7c8aaddf64d922/monads-collection/src/Monad/Indexed.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE RankNTypes # # LANGUAGE GADTs # * Example: Indexed State monad * Example: Free Monad * Indexed Applicative (Atkey-style) | Indexed Functor is a Functor from Hask^K to Hask^K, kind @k@. functor @x@ has any instance of type class (like @Functor@ or @Monad@), and don't...
# LANGUAGE TypeApplications # # LANGUAGE PolyKinds # # LANGUAGE StandaloneKindSignatures # # LANGUAGE TypeOperators # # LANGUAGE ScopedTypeVariables # # LANGUAGE InstanceSigs # # LANGUAGE EmptyCase # | - style Indexed Monad Conor McBride-style Indexed Monad -} module Monad.Indexed( * IxFunctor and ...
88b87e3d77f1118182c7ae7a89c1d385670f662aedb248a2002677e81a99ea68
janestreet/incr_dom
main.ml
open! Core open! Incr_dom open! Js_of_ocaml let () = let counters = List.range 0 5 |> List.map ~f:(fun k -> k, Random.int_incl 0 10) |> Int.Map.of_alist_exn in Start_app.start (module Counters) ~bind_to_element_with_id:"app" ~initial_model:(Counters.Model.Fields.create ~counters) ;;
null
https://raw.githubusercontent.com/janestreet/incr_dom/56c04e44d6a8f1cc9b2b841495ec448de4bf61a1/example/svg_graph/main.ml
ocaml
open! Core open! Incr_dom open! Js_of_ocaml let () = let counters = List.range 0 5 |> List.map ~f:(fun k -> k, Random.int_incl 0 10) |> Int.Map.of_alist_exn in Start_app.start (module Counters) ~bind_to_element_with_id:"app" ~initial_model:(Counters.Model.Fields.create ~counters) ;;
22056b1b3220a31b998d1309ac8ee2c6d51b3a5d26f524605051e92554407c2b
jordanthayer/ocaml-search
beam_stack_search.ml
(** Beam Stack Search *) type 'a node = {f : float; g : float; data : 'a; depth : int; mutable pos: int;} let wrap f = (** takes a function to be applied to the data payload such as the goal-test or the domain heuristic and wraps it so that it can be applied to the entire ...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/anytime/beam_stack_search.ml
ocaml
* Beam Stack Search * takes a function to be applied to the data payload such as the goal-test or the domain heuristic and wraps it so that it can be applied to the entire node * Unwraps a solution which is in the form of a search node and presents it in the format the domain expects it, which...
type 'a node = {f : float; g : float; data : 'a; depth : int; mutable pos: int;} let wrap f = (fun n -> f n.data) let unwrap_sol s = match s with Limit.Nothing -> None | Limit.Incumbent (q,n) -> Some (n.data, n.g) let ordered_p a b = a.f <= b.f let better_p a b = let ma...
816ecb1334d0c9fc98a773737f83c200f48ba6fe9a0c7871de37aa10b4a96ff8
theodormoroianu/SecondYearCourses
HaskellChurch_20210415163937.hs
{-# LANGUAGE RankNTypes #-} module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = "cBool " <> show (cIf b True False) The boolean constant true always ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415163937.hs
haskell
# LANGUAGE RankNTypes # The boolean negation switches the alternatives The boolean conjunction can be built as a conditional The boolean disjunction can be built as a conditional a pair is a way to compute something based on the values contained within the pair. a function to be applied on the values, it will apply i...
module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = "cBool " <> show (cIf b True False) The boolean constant true always chooses the first alternativ...
5de1103c88327d8bedd2316a2081f0036ff22fbccc7590a33cf1bd638d93501e
petelliott/pscheme
test.scm
(define-library (pscheme test) (import (scheme base) (scheme write) (scheme process-context)) (export assert skip-test run-test define-test finish-tests) (begin (define has-global-fail #f) (define has-local-fail #f) (define (assert b) ...
null
https://raw.githubusercontent.com/petelliott/pscheme/dcedb1141210308fe1e48a2119f0a209f1dccdf5/scm/pscheme/test.scm
scheme
(define-library (pscheme test) (import (scheme base) (scheme write) (scheme process-context)) (export assert skip-test run-test define-test finish-tests) (begin (define has-global-fail #f) (define has-local-fail #f) (define (assert b) ...
01b52406331e100fc40423c20b1c8dfdcbae79c378e464821dba876012df48b2
nc6/tabula
Destination.hs
Copyright ( c ) 2014 Genome Research Ltd. Author : < > This program is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , or ( at your option ) any later version . ...
null
https://raw.githubusercontent.com/nc6/tabula/f76524bbe56b45b125707cf1f4f9526817c4e6e8/Tabula/Destination.hs
haskell
^ Sink records to a store ^ Fetch the last
Copyright ( c ) 2014 Genome Research Ltd. Author : < > This program is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , or ( at your option ) any later version . ...
3da9ae635e5152a559c6b9b427182f281d85842370444aaa51e026ddcf4b26e5
gigasquid/libpython-clj-examples
datasets_estimators.clj
(ns gigasquid.sk-learn.datasets-estimators (:require [libpython-clj.require :refer [require-python]] [libpython-clj.python :as py :refer [py. py.. py.-]] [gigasquid.plot :as plot])) (require-python '[sklearn.datasets :as datasets]) (require-python '[matplotlib.pyplot :as pyplot]) (require-pyt...
null
https://raw.githubusercontent.com/gigasquid/libpython-clj-examples/f151c00415c82a144a13959ff7b56f58704ac6f2/src/gigasquid/sk_learn/datasets_estimators.clj
clojure
From -learn.org/stable/tutorial/statistical_inference/settings.html Taking a look as the standard iris dataset An example of reshaping is with the digits dataset Estimator objects An estimator is any object that learns from data it may be a classification, regression or clustering algorithm or a transformer that e...
(ns gigasquid.sk-learn.datasets-estimators (:require [libpython-clj.require :refer [require-python]] [libpython-clj.python :as py :refer [py. py.. py.-]] [gigasquid.plot :as plot])) (require-python '[sklearn.datasets :as datasets]) (require-python '[matplotlib.pyplot :as pyplot]) (require-pyt...
6731e80464ef464e1cbfafd3e1cf03bbb09efbe99daecd98e61cb1b263e1c9c6
expipiplus1/vulkan
Bracket.hs
module VMA.Bracket ( brackets ) where import Relude hiding ( Handle , Type ) import Data.Vector ( Vector ) import qualified Data.Map as Map im...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/generate-new/vma/VMA/Bracket.hs
haskell
module VMA.Bracket ( brackets ) where import Relude hiding ( Handle , Type ) import Data.Vector ( Vector ) import qualified Data.Map as Map im...
6821240c6765ae551207e0c3f66526015606364dc66301bc8df973564b72c7bd
dpiponi/Moodler
test_arpeggiator.hs
do restart root <- getRoot let out = "out" let keyboard = "keyboard" let trigger = "trigger" arpeggiator0 <- new' "arpeggiator" arpeggiator1 <- new' "arpeggiator" audio_saw2 <- new' "audio_saw" audio_saw3 <- new' "audio_saw" audio_saw4 <- new' "audio_saw" id10 <- new' "id" ...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/saves/test_arpeggiator.hs
haskell
do restart root <- getRoot let out = "out" let keyboard = "keyboard" let trigger = "trigger" arpeggiator0 <- new' "arpeggiator" arpeggiator1 <- new' "arpeggiator" audio_saw2 <- new' "audio_saw" audio_saw3 <- new' "audio_saw" audio_saw4 <- new' "audio_saw" id10 <- new' "id" ...
a48b5310b6b50fd9b5af1b8638a24e2b65ef6d72dbe6e96cb859154280b0342e
jordanthayer/ocaml-search
timers.ml
* Basic default timing mechanisms for heuristic searches where nodes need to have values intermittently recalculated . When the timers return true , it is time for the values to be recalculated and the queues will need to be resorted then . need to have values intermittently recalculated. When ...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/timers.ml
ocaml
* Never resort. * always resort * Resort every [d] steps. * Resorts on a geometrically growing scale * Randomly resorts with probability [p] * Resorts once at the [d]th step of the algorithm, and then never again
* Basic default timing mechanisms for heuristic searches where nodes need to have values intermittently recalculated . When the timers return true , it is time for the values to be recalculated and the queues will need to be resorted then . need to have values intermittently recalculated. When ...
9def0c174bacecfc9f8edbc9e26eb91bd9b287974cfee6ee682bd57b350b4b6c
monadbobo/ocaml-core
pSet_test.ml
open OUnit;; open Core.Std let s1 = Set.Poly.of_list ["a"; "b"; "c"; "d"] let = Map.of_alist [ " a",1 ; " c",-3 ; " d",4 ; " e",5 ] let test = "pSet" >::: [ "sexp" >:: (fun () -> let s = "(a b c d)" in let s1' = Set.Poly.t_of_sexp string_of_sexp (Sexp.of_string s) in "of_s...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib_test/pSet_test.ml
ocaml
open OUnit;; open Core.Std let s1 = Set.Poly.of_list ["a"; "b"; "c"; "d"] let = Map.of_alist [ " a",1 ; " c",-3 ; " d",4 ; " e",5 ] let test = "pSet" >::: [ "sexp" >:: (fun () -> let s = "(a b c d)" in let s1' = Set.Poly.t_of_sexp string_of_sexp (Sexp.of_string s) in "of_s...
740d048bda7a6f7139f5f4b627351140aadff9d94cf6fa81cb4a46bfedc7e36b
aesiniath/unbeliever
Context.hs
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ImportQualifiedPost # # LANGUAGE InstanceSigs # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE StandaloneDeriving # {-...
null
https://raw.githubusercontent.com/aesiniath/unbeliever/723d5073189038428f7ad02b0088152bf309bd40/core-program/lib/Core/Program/Context.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE StrictData # # OPTIONS_HADDOCK hide # `spanIdentifierFrom` is a Maybe because at startup there is not yet a this as the parent value - in this case, no parent, which is what we want. | Implementation of a forwarder for structured logging of the teleme...
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ImportQualifiedPost # # LANGUAGE InstanceSigs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE StandaloneDeriving # # OPTIONS_GHC -fno - warn - orphans # This is an Internal modu...
bec8ce6483677bd3ae592ce78cf5d6f1d5691c3bf1978c0580c875731ef7ac6e
vincenthz/hs-hourglass
Internal.hs
-- | -- Module : Data.Hourglass.Internal -- License : BSD-style Maintainer : < > -- Stability : experimental -- Portability : unknown -- -- System lowlevel functions -- # LANGUAGE CPP # module Data.Hourglass.Internal ( dateTimeFromUnixEpochP , dateTimeFromUnixEpoch , systemGetTimezone ...
null
https://raw.githubusercontent.com/vincenthz/hs-hourglass/36bd2e6d5d0eb316532f13285d1c533d6da297ef/Data/Hourglass/Internal.hs
haskell
| Module : Data.Hourglass.Internal License : BSD-style Stability : experimental Portability : unknown System lowlevel functions
Maintainer : < > # LANGUAGE CPP # module Data.Hourglass.Internal ( dateTimeFromUnixEpochP , dateTimeFromUnixEpoch , systemGetTimezone , systemGetElapsed , systemGetElapsedP ) where #ifdef WINDOWS import Data.Hourglass.Internal.Win #else import Data.Hourglass.Internal.Unix #endif
d4160529189b363307e1005a92936e37ff5c4427dc7117ffd1bd638b24ec5e22
clojure-interop/aws-api
ContentManagerBuilder.clj
(ns com.amazonaws.services.workdocs.ContentManagerBuilder "Fluent builder for ContentManager. Use of the builder is required instead of constructors of the client class." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.services.workdocs ContentManagerBuilder])) (defn ->content-manager-...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.workdocs/src/com/amazonaws/services/workdocs/ContentManagerBuilder.clj
clojure
(ns com.amazonaws.services.workdocs.ContentManagerBuilder "Fluent builder for ContentManager. Use of the builder is required instead of constructors of the client class." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.services.workdocs ContentManagerBuilder])) (defn ->content-manager-...
1ef92dbf517fe0112ec80fad18d73682a2ee3d44d529dad073a04766fa51a434
mfoemmel/erlang-otp
wxPanel.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxPanel.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(wxPanel). -include("wxe.hrl"). -e...
847173955ea293f8787953dfa3e0aee8d5e49b97ebb7e1d4e5ac57cddb1c96f0
raml-org/api-modeling-framework
raml_types_shapes.cljc
(ns api-modeling-framework.parser.domain.raml-types-shapes (:require [api-modeling-framework.model.vocabulary :as v] [api-modeling-framework.model.domain :as domain] [api-modeling-framework.model.document :as document] [api-modeling-framework.model.syntax :as syntax] [a...
null
https://raw.githubusercontent.com/raml-org/api-modeling-framework/34bb3b6c3e3f91b775e27f8e389e04eb2c36beb7/src/api_modeling_framework/parser/domain/raml_types_shapes.cljc
clojure
(println (str "Cannot parse type expression '" exp "': " ex)) instead of node, we have a datatype here we mark it for our own purposes, for example being able to detect it easily without checking cardinality range of the prop range of the prop common properties mandatory prop? we always try to return a referenc...
(ns api-modeling-framework.parser.domain.raml-types-shapes (:require [api-modeling-framework.model.vocabulary :as v] [api-modeling-framework.model.domain :as domain] [api-modeling-framework.model.document :as document] [api-modeling-framework.model.syntax :as syntax] [a...
5c20322593e0a6d6db61e62a132054bc45c197b8a1d875821e5c32237d39f2d6
expipiplus1/vulkan
ShaderType.hs
module Vulkan.Utils.ShaderQQ.ShaderType ( ShaderType (..) ) where import Data.String (IsString (..)) data ShaderType = GLSL | HLSL instance IsString ShaderType where fromString = \case "glsl" -> GLSL "hlsl" -> HLSL t -> error $ "not support '" ++ t ++ "' shader" instance Show ShaderT...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/utils/src/Vulkan/Utils/ShaderQQ/ShaderType.hs
haskell
module Vulkan.Utils.ShaderQQ.ShaderType ( ShaderType (..) ) where import Data.String (IsString (..)) data ShaderType = GLSL | HLSL instance IsString ShaderType where fromString = \case "glsl" -> GLSL "hlsl" -> HLSL t -> error $ "not support '" ++ t ++ "' shader" instance Show ShaderT...
e63b92c3ff0bf6fe0ecc211aea6c0a668f277753201c6094a67b269069581454
dmjio/miso
Main.hs
-- | Haskell language pragma {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE CPP # -- | Haskell module declaration module Main where | Miso framework import import Miso import Miso.String -- | JSAddle import #ifndef __GHCJS__ import Language.Javascript.JSadd...
null
https://raw.githubusercontent.com/dmjio/miso/4baab9de2a8970c99f7296ba38a4f15ed919d3cd/sample-app-jsaddle/Main.hs
haskell
| Haskell language pragma # LANGUAGE OverloadedStrings # | Haskell module declaration | JSAddle import | Type synonym for an application model | Sum type for application events | Entry point for a miso application initial action to be executed on application load initial model update function view function d...
# LANGUAGE RecordWildCards # # LANGUAGE CPP # module Main where | Miso framework import import Miso import Miso.String #ifndef __GHCJS__ import Language.Javascript.JSaddle.Warp as JSaddle import qualified Network.Wai.Handler.Warp as Warp import Network.WebSockets #en...
5b1941f20c26763856c6e9bd90f4c3d9528962236934fe69cedfa85a68b10a67
janestreet/ppx_typed_fields
typed_deriver_variants.mli
open Base open Ppxlib open Variant_kind_generator_intf * Generates the anonymous records and gives them a concrete name . e.g. ( Also attaches [ @@deriving typed_fields ] if needed . ) { [ type rgb = { r : int ; : int ; b : int } type ' x = { r : int ; : int ; b : int ; x : ' x } [ @@...
null
https://raw.githubusercontent.com/janestreet/ppx_typed_fields/cf7511db2ccfdbbc0e43601e4d9a0c9d0a36c9e2/src/typed_deriver_variants.mli
ocaml
Generate a Typed_fields(_t | of_x) structure item given a specific implementation module for how to handle the specific conversions like how the names for the typed_fields constructors are determined and how setter/getter functions work. Generates packed with value type, e.g. type ('a, 'b, 'c, 'd) packed_wi...
open Base open Ppxlib open Variant_kind_generator_intf * Generates the anonymous records and gives them a concrete name . e.g. ( Also attaches [ @@deriving typed_fields ] if needed . ) { [ type rgb = { r : int ; : int ; b : int } type ' x = { r : int ; : int ; b : int ; x : ' x } [ @@...
5663fddce86c8c6b5dd0e7acc3b71f73d0e901ec74791e04dd10d857ee2aa2a7
nuprl/gradual-typing-performance
vec.rkt
#lang racket/base (provide v) (define v #'(1 2 3 3 4))
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/tools/summarize/test/higher-order/untyped/vec.rkt
racket
#lang racket/base (provide v) (define v #'(1 2 3 3 4))
1fab81b8b1053af08e59f5926c4a1f8b18a70d94fc5c52bf8b63e4d2cb658f83
cronburg/antlr-haskell
Grammar.hs
# LANGUAGE DeriveAnyClass , DeriveGeneric , TypeFamilies , QuasiQuotes , DataKinds , ScopedTypeVariables , OverloadedStrings , TypeSynonymInstances , FlexibleInstances , UndecidableInstances # , DataKinds, ScopedTypeVariables, OverloadedStrings, TypeSynonymInstances , FlexibleInstances, UndecidableI...
null
https://raw.githubusercontent.com/cronburg/antlr-haskell/7a9367038eaa58f9764f2ff694269245fbebc155/test/chisel/Language/Chisel/Grammar.hs
haskell
Types used to the right of the '->' directive must instance Read
# LANGUAGE DeriveAnyClass , DeriveGeneric , TypeFamilies , QuasiQuotes , DataKinds , ScopedTypeVariables , OverloadedStrings , TypeSynonymInstances , FlexibleInstances , UndecidableInstances # , DataKinds, ScopedTypeVariables, OverloadedStrings, TypeSynonymInstances , FlexibleInstances, UndecidableI...
ded7aa8beab1fef3e245e94f3b95059ffc05461802b9cbdc372da61f68152afa
theodormoroianu/SecondYearCourses
lab13-sol_20210115191705.hs
import Data.Char import Data.List prelStr strin = map toUpper strin ioString = do strin <- getLine putStrLn $ "Intrare\n" ++ strin let strout = prelStr strin putStrLn $ "Iesire\n" ++ strout prelNo noin = sqrt noin ioNumber = do noin <- readLn :: IO Double ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab13/lab13-sol_20210115191705.hs
haskell
import Data.Char import Data.List prelStr strin = map toUpper strin ioString = do strin <- getLine putStrLn $ "Intrare\n" ++ strin let strout = prelStr strin putStrLn $ "Iesire\n" ++ strout prelNo noin = sqrt noin ioNumber = do noin <- readLn :: IO Double ...
e65d8f9763f6b570861b039b2b3287dead4370599c1977b92e157c932aa22ad4
theodormoroianu/SecondYearCourses
HaskellChurch_20210415163124.hs
{-# LANGUAGE RankNTypes #-} module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = show $ cIf b True False The boolean constant true always chooses the ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415163124.hs
haskell
# LANGUAGE RankNTypes # The boolean negation switches the alternatives The boolean conjunction can be built as a conditional The boolean disjunction can be built as a conditional a pair is a way to compute something based on the values contained within the pair. a function to be applied on the values, it will apply i...
module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = show $ cIf b True False The boolean constant true always chooses the first alternative cTrue :: C...
25ae35ab1467767bb630a54e5e30b8487cf64ffa7d3f9e98f187a4570f29364f
flipstone/haskell-for-beginners
3_where.hs
-- Write a function to tell whether a triangle -- is big or not. A triangle should be called big if its hypoteneuse is longer than 10 . -- (be sure to use where to make your function -- more readable) bigTriangle :: Float -> Float -> Bool bigTriangle length width = hypoteneuse > 10 where hypoteneuse = sqrt (...
null
https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/answers/chapter_04/3_where.hs
haskell
Write a function to tell whether a triangle is big or not. A triangle should be called (be sure to use where to make your function more readable) Write a function that classifies rectangles area. The pair given is the rectangle's length and width. Write a function that constructs a rect from a in the li...
big if its hypoteneuse is longer than 10 . bigTriangle :: Float -> Float -> Bool bigTriangle length width = hypoteneuse > 10 where hypoteneuse = sqrt (length*length + width*width) into at least 5 size categories based their rectSize :: (Integer, Integer) -> String rectSize (length, width) | area > 25 = "Supe...
054210a9ee13b4b05693da619dccf9b6de675f202ab482bf9e3c1b6416c002e0
oofp/Beseder
STMProducer.hs
# LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # module Beseder.Misc.Prosumers.STMProducer where import Protolude import Beseder.Misc.Prosumers.Producer import Beseder.Misc.Prosumers.AsyncProducer import Beseder.Base.Common stmProducer :: (TaskPoster m,...
null
https://raw.githubusercontent.com/oofp/Beseder/a0f5c5e3138938b6fa18811d646535ee6df1a4f4/src/Beseder/Misc/Prosumers/STMProducer.hs
haskell
# LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # module Beseder.Misc.Prosumers.STMProducer where import Protolude import Beseder.Misc.Prosumers.Producer import Beseder.Misc.Prosumers.AsyncProducer import Beseder.Base.Common stmProducer :: (TaskPoster m,...
fc8ad04d654fe25fa6d7b79066b14dc8142e594fa3eb55276b5a5aa8aadc42ea
karamellpelle/grid
Modify.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/Game/Modify.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
grid is a game written in Haskell Copyright ( C ) 2018 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License module Game.Modify ( defaultModify, noCo...
ce34d051778ff266ac7bf37163b44e3dc29680d5a132885e1b3f7244030ddc7c
cabol/cross_db
xdb_mnesia_boot_repo.erl
%%%------------------------------------------------------------------- %%% @doc %%% Mnesia bootable repo. %%% @end %%%------------------------------------------------------------------- -module(xdb_mnesia_boot_repo). %% Repo callbacks -export([init/1]). %%%=============================================================...
null
https://raw.githubusercontent.com/cabol/cross_db/365bb3b6cffde1b4da7109ed2594a0a3f1a4a949/src/adapters/xdb_mnesia_boot_repo.erl
erlang
------------------------------------------------------------------- @doc Mnesia bootable repo. @end ------------------------------------------------------------------- Repo callbacks =================================================================== Repo callbacks =================================================...
-module(xdb_mnesia_boot_repo). -export([init/1]). init(Opts) -> ok = init_mnesia(Opts), {ok, Opts}. Internal functions @private init_mnesia(Opts) -> stopped = mnesia:stop(), ok = mnesia_create_schema(node()), ok = mnesia:start(), ok = create_schemas(Opts), ok. @private mnesia_create_schema(Nod...
ce8861c5e9b9a4d99e4854b31b684f88c6ec09ae16710e043bacd5a905be5686
Verites/verigraph
Processes.hs
module Processes ( Options , options , execute ) where import Control.Monad import Data.Maybe (fromJust, isJust) import Data.Monoid ((<>)) import Data.Set ...
null
https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/src/CLI/Processes.hs
haskell
module Processes ( Options , options , execute ) where import Control.Monad import Data.Maybe (fromJust, isJust) import Data.Monoid ((<>)) import Data.Set ...
f98bb18d813551cf6de474af2e1d09d3bcd7b7243f034c669ee2eb3795c3c8a8
dundalek/liz
compiler.clj
(ns liz.impl.compiler (:refer-clojure :exclude [compile]) (:require [liz.impl.analyzer :as ana] [liz.impl.reader :as reader] [clojure.tools.analyzer.env :as env] [clojure.java.shell :refer [sh]] [liz.impl.emitter :as emitter] [clojure.pprint :refer [pprint...
null
https://raw.githubusercontent.com/dundalek/liz/158129a160fe68646b164df585cae479a6cde231/src/liz/impl/compiler.clj
clojure
No need to print extra info since
(ns liz.impl.compiler (:refer-clojure :exclude [compile]) (:require [liz.impl.analyzer :as ana] [liz.impl.reader :as reader] [clojure.tools.analyzer.env :as env] [clojure.java.shell :refer [sh]] [liz.impl.emitter :as emitter] [clojure.pprint :refer [pprint...
9ab7ac95d163426419759bf75356a12dc23299e85e6482ce1e8346a782b4e623
fizruk/http-api-data
FormUrlEncoded.hs
-- | values to and from @application / xxx - form - urlencoded@ format . module Web.FormUrlEncoded ( -- * Classes ToForm (..), FromForm (..), -- ** Keys for 'Form' entries ToFormKey(..), FromFormKey(..), -- * 'Form' type Form(..), * Encoding and decoding @'Form'@s urlEncodeAsForm, urlEncode...
null
https://raw.githubusercontent.com/fizruk/http-api-data/b0904171ab4c03898c002151fceb8c56d08216ce/src/Web/FormUrlEncoded.hs
haskell
| * Classes ** Keys for 'Form' entries * 'Form' type ** Encoding options * Helpers
values to and from @application / xxx - form - urlencoded@ format . module Web.FormUrlEncoded ( ToForm (..), FromForm (..), ToFormKey(..), FromFormKey(..), Form(..), * Encoding and decoding @'Form'@s urlEncodeAsForm, urlEncodeAsFormStable, urlDecodeAsForm, urlEncodeForm, urlEncodeFormStabl...
a073fdfa87e3f1f13db3928d4b1b947b843cb53e0238d13c43aeb89123a58815
jlongster/gambit-iphone-example
app3.scm
;;;; "app3" ;;; renders a 3d box, which may bounce around some (declare (block) (standard-bindings) (extended-bindings)) (include "events#.scm") (include "obj-loader2.scm") (include "scene.scm") (include "physics.scm") ;;;;; settings (define %%settings (make-table)) (define (get-config name #!opt...
null
https://raw.githubusercontent.com/jlongster/gambit-iphone-example/e55d915180cb6c57312cbb683d81823ea455e14f/lib/apps/app3.scm
scheme
"app3" renders a 3d box, which may bounce around some settings masses throwing collisions sphere collision (define (detect-collisions) (reset-table!) (fold (fold (lambda (obj2 acc) (obj-collided? obj1 obj2)))) #f scene-list))) #f sce...
(declare (block) (standard-bindings) (extended-bindings)) (include "events#.scm") (include "obj-loader2.scm") (include "scene.scm") (include "physics.scm") (define %%settings (make-table)) (define (get-config name #!optional default) (table-ref %%settings name default)) (define (set-config nam...
3f81cd69c4d89dc77c2b87d77b9c762edad0be5a47d17c4c1d65efaac2b0058a
clojurewerkz/meltdown
consumers.clj
Copyright ( c ) 2013 - 2014 , , and the ClojureWerkz Team . ;; 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 ...
null
https://raw.githubusercontent.com/clojurewerkz/meltdown/58d50141bb35b4a5abf59dcb13db9f577b6b3b9f/src/clojure/clojurewerkz/meltdown/consumers.clj
clojure
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 p...
Copyright ( c ) 2013 - 2014 , , and the ClojureWerkz Team . distributed under the License is distributed on an " AS IS " BASIS , (ns clojurewerkz.meltdown.consumers "Operations on consumers and registrations" (:require [clojurewerkz.meltdown.events :as ev]) (:import [reactor.function Consumer] ...
3eac79495f81fbe39a672831195b06cf99dbc9371446d76b3a9fde381abaac3a
chebert/schemeish
continuations.lisp
(in-package :schemeish.backend) (install-syntax!) (def (full-ordinary-lambda-list ordinary-lambda-list) "Return a lambda list with optional/keywords fully expanded to their (name default-value provided?) form. If necessary, unique symbols will be generated for provided? names. Aux variables will be (name value)" ...
null
https://raw.githubusercontent.com/chebert/schemeish/872ea3dc3f2ea8438388b5e7660acd9446c49948/src/continuations.lisp
lisp
Required arguments are symbols Optional arguments are lists If the function has an associated cps-function, we can just call it. If the function is an ordinary function, we need to deliver its returned values to the continuation Evaluate all arguments from left to right Set up a catch. If a CPS-FUNCTION is calle...
(in-package :schemeish.backend) (install-syntax!) (def (full-ordinary-lambda-list ordinary-lambda-list) "Return a lambda list with optional/keywords fully expanded to their (name default-value provided?) form. If necessary, unique symbols will be generated for provided? names. Aux variables will be (name value)" ...
10c8275b48b9937497f919e7d20659de006fce27d2bb7bef3c9209c4c168aeba
haskell-github/github
GitLog.hs
module GitLog where import qualified Github.Repos.Commits as Github import Data.List main = do possibleCommits <- Github.commitsFor "thoughtbot" "paperclip" case possibleCommits of (Left error) -> putStrLn $ "Error: " ++ (show error) (Right commits) -> putStrLn $ intercalate "\n\n" $ map formatCommit c...
null
https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/samples/Repos/Commits/GitLog.hs
haskell
module GitLog where import qualified Github.Repos.Commits as Github import Data.List main = do possibleCommits <- Github.commitsFor "thoughtbot" "paperclip" case possibleCommits of (Left error) -> putStrLn $ "Error: " ++ (show error) (Right commits) -> putStrLn $ intercalate "\n\n" $ map formatCommit c...
0916c18cc0705a85711dd53576360b2b2007cfa44c13132528c5966a9b93ac25
nikomatsakis/a-mir-formality
test-solution.rkt
#lang racket (require redex/reduction-semantics "../../util.rkt" "../../logic/env-inequalities.rkt" "../../logic/substitution.rkt" "../../logic/instantiate.rkt" "../../logic/solution.rkt" "../grammar.rkt" "../user-ty.rkt" "hook.rkt" ) (mo...
null
https://raw.githubusercontent.com/nikomatsakis/a-mir-formality/bc951e21bff2bae1ccab8cc05b2b39cfb6365bfd/racket-src/ty/test/test-solution.rkt
racket
Model a canonical query (?A ?B) that has an answer ?A = Vec<?C>, ?C <: ?B Create placeholder T and inference variables ?A and ?B that are meant to be part of the "canonical query" Create the "solution" constraints: * there exists a C... * where C <: B
#lang racket (require redex/reduction-semantics "../../util.rkt" "../../logic/env-inequalities.rkt" "../../logic/substitution.rkt" "../../logic/instantiate.rkt" "../../logic/solution.rkt" "../grammar.rkt" "../user-ty.rkt" "hook.rkt" ) (mo...
0a7764ef1108233f66dd75cb87b6b9a8274a0c4781eabaaea4a70bbcf164ad32
LimitEpsilon/reanalyze-ropas
PrintSE.ml
open SetExpression let string_of_arithop : arithop -> string = function | INT x | INT32 x | INT64 x | FLOAT x | NATURALINT x -> ( match x with | ADD -> "+" | SUB -> "-" | DIV -> "÷" | MUL -> "×" | NEG -> "~-" | ABS -> "abs" | MOD -> "mod" | AND -> "&&" | OR -> "||" | NOT -...
null
https://raw.githubusercontent.com/LimitEpsilon/reanalyze-ropas/0db54b5fa4b85467a0ca7495bba8fc693da72a59/src/PrintSE.ml
ocaml
Hashtbl.iter (fun param loc_tagged_expr -> prerr_string "Globalenv :\n param = "; prerr_string "\n code_loc tagged_expr = "; print_tagged_expr loc_tagged_expr; prerr_newline ()) env_map
open SetExpression let string_of_arithop : arithop -> string = function | INT x | INT32 x | INT64 x | FLOAT x | NATURALINT x -> ( match x with | ADD -> "+" | SUB -> "-" | DIV -> "÷" | MUL -> "×" | NEG -> "~-" | ABS -> "abs" | MOD -> "mod" | AND -> "&&" | OR -> "||" | NOT -...
ab15f0e05108f5d7c602c4a86882df78423c4aedf3b35fa875f84b0b37b3d6b3
ChrisKuklewicz/SafeSemaphore
SSem.hs
----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.STM.SSem Copyright : ( c ) , 2012 -- License : BSD-style -- -- Maintainer : -- Stability : experimental -- Portability : non-portable (concurrency) -- -- Very simple quantity sem...
null
https://raw.githubusercontent.com/ChrisKuklewicz/SafeSemaphore/c05e7aaea6dfcf1713a0c8eb3214cb832c9356f3/src/Control/Concurrent/STM/SSem.hs
haskell
--------------------------------------------------------------------------- | Module : Control.Concurrent.STM.SSem License : BSD-style Maintainer : Stability : experimental Portability : non-portable (concurrency) Very simple quantity semaphore. ---------------------------------------------...
Copyright : ( c ) , 2012 module Control.Concurrent.STM.SSem(SSem, new, wait, signal, tryWait , waitN, signalN, tryWaitN , getValue) where import Control.Monad.STM(STM,retry) import Control.Concurrent.STM.TVar(newTVar,readTVar,writeTVar) impor...
f3e4f1e6b9047a0e37a59a70e0673ad8231e528bdfcf324296879c008dec2f8b
unclebob/spacewar
direction_selector.cljc
(ns spacewar.ui.widgets.direction-selector (:require [quil.core :as q #?@(:cljs [:include-macros true])] [spacewar.ui.protocols :as p] [spacewar.geometry :as geo] [spacewar.ui.config :as uic] [spacewar.vector :as vector])) (defn degree-tick [radius angle] (let [tick-...
null
https://raw.githubusercontent.com/unclebob/spacewar/71c3195b050c4fdb7e643f53556ab580d70f27ba/src/spacewar/ui/widgets/direction_selector.cljc
clojure
(ns spacewar.ui.widgets.direction-selector (:require [quil.core :as q #?@(:cljs [:include-macros true])] [spacewar.ui.protocols :as p] [spacewar.geometry :as geo] [spacewar.ui.config :as uic] [spacewar.vector :as vector])) (defn degree-tick [radius angle] (let [tick-...
55406f6b1b8f5ec4e02c6ea7a26eec71f9c340a6f2f5d480cb2611ef2f9cecf6
whalliburton/language
packages.lisp
packages.lisp (defpackage language (:use common-lisp drakma anaphora split-sequence iterate typeset) (:import-from alexandria when-let with-input-from-file with-output-to-file shuffle) (:import-from cl-fad list-directory) (:import-from json decode-json-from-string) (:import-from sb-ext run-program process-...
null
https://raw.githubusercontent.com/whalliburton/language/d16ddf05c2b7e067f6f9ce74416c73f0b64b63c4/packages.lisp
lisp
packages.lisp (defpackage language (:use common-lisp drakma anaphora split-sequence iterate typeset) (:import-from alexandria when-let with-input-from-file with-output-to-file shuffle) (:import-from cl-fad list-directory) (:import-from json decode-json-from-string) (:import-from sb-ext run-program process-...
cc53b280b149aad6ec4aa833ee94ff607b25ec7b6bdfcbe22f6139673fd908a4
janestreet/merlin-jst
mpipeline.ml
open Std let {Logger. log} = Logger.for_section "Pipeline" let time_shift = ref 0.0 let timed_lazy r x = lazy ( let start = Misc.time_spent () in let time_shift0 = !time_shift in let update () = let delta = Misc.time_spent () -. start in let shift = !time_shift -. time_shift0 in time_...
null
https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/src/kernel/mpipeline.ml
ocaml
Values from configuration that are used as a key for the cache. These values should: - allow to maximize reuse; associating a single typechecker instance to a filename and directory is natural, but keying also based on verbosity makes no sense - prevent reuse in different environments (if ...
open Std let {Logger. log} = Logger.for_section "Pipeline" let time_shift = ref 0.0 let timed_lazy r x = lazy ( let start = Misc.time_spent () in let time_shift0 = !time_shift in let update () = let delta = Misc.time_spent () -. start in let shift = !time_shift -. time_shift0 in time_...
1fbc378c32d28cdf2231a06e54df544164f4ac48ff2f3e9f9fc2f3df7e8f5e14
snoyberg/conduit
Unqualified.hs
# OPTIONS_HADDOCK not - home # # LANGUAGE CPP # # LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE GADTs #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE NoImplicitPrelude # # LANGUAGE NoMonomorphismRestriction # module Data.Conduit.Combinators.Unqualified ( -- ** Producers ...
null
https://raw.githubusercontent.com/snoyberg/conduit/1771780ff4b606296924a28bf5d4433ae6a916f3/conduit/src/Data/Conduit/Combinators/Unqualified.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE GADTs # ** Producers *** Pure *** I\/O *** Filesystem ** Consumers *** Pure *** I\/O ** Transformers *** Pure *** Textual ** Builders ** Special BEGIN IMPORTS BEGIN IMPORTS END IMPORTS | Generate a producer from a seed value. @since 1.3.0 | Enumerate from a value to...
# OPTIONS_HADDOCK not - home # # LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NoImplicitPrelude # # LANGUAGE NoMonomorphismRestriction # module Data.Conduit.Combinators.Unqualified CC.yieldMany , unfoldC , enumFromToC , iterateC , repeatC...
196543a659f13d21b50d45bf654a63da748fe4dd610a9c554b3166b015307a4c
initc3/SaUCy
TypeError.hs
{-# OPTIONS_GHC -Wall #-} -------------------------------------------------------------------------------- -- | -- Module : Language.ILC.TypeError Copyright : ( C ) 2018 -- License : BSD-style (see LICENSE) Maintainer : ( ) -- Stability : experimental -- -- Describes type errors and imp...
null
https://raw.githubusercontent.com/initc3/SaUCy/199154c1f488af4561e4bf1f7f5f3ef8876dfa6b/src/Language/ILC/TypeError.hs
haskell
# OPTIONS_GHC -Wall # ------------------------------------------------------------------------------ | Module : Language.ILC.TypeError License : BSD-style (see LICENSE) Stability : experimental Describes type errors and implements error messages. ---------------------------------------------------...
Copyright : ( C ) 2018 Maintainer : ( ) module Language.ILC.TypeError ( TypeError(..) ) where import Text.PrettyPrint.ANSI.Leijen import Language.ILC.Syntax import Language.ILC.Type data TypeError = UnificationFail Type Type | InfiniteType TVar Type | UnboundVar...
847b1da7f7e5c0e13bb06a707121666099eed25e5b78965e51f13ef2b01f7163
jackfirth/point-free
info.rkt
#lang info (define collection 'multi) (define deps '("base" "rackunit-lib" "doc-coverage")) (define build-deps '("cover" "doc-coverage" "scribble-lib" "rackunit-lib" "racket-doc"))
null
https://raw.githubusercontent.com/jackfirth/point-free/d294a342466d5071dd2c8f16ba9e50f9006b54af/info.rkt
racket
#lang info (define collection 'multi) (define deps '("base" "rackunit-lib" "doc-coverage")) (define build-deps '("cover" "doc-coverage" "scribble-lib" "rackunit-lib" "racket-doc"))
f31e57df8138543872ca73d76bfd8f8923ad98de1041dace9a3f093e24981a0f
ctford/Idris-Elba-Dev
Chaser.hs
module Idris.Chaser(buildTree, getModuleFiles, ModuleTree(..)) where import Idris.Parser import Idris.AbsSyntax import Idris.Imports import Idris.Unlit import Idris.Error import Idris.IBC import System.FilePath import System.Directory import Data.Time.Clock import Control.Monad.Trans import Control.Monad.State import...
null
https://raw.githubusercontent.com/ctford/Idris-Elba-Dev/e915e1d6b7a5921ba43d2572a9ad9b980619b8ee/src/Idris/Chaser.hs
haskell
Given a module tree, return the list of files to be loaded. If any module has a descendent which needs reloading, return its source, otherwise Needs rechecking if 'rechk' is true, or if any of the when (not (ibc p) || rechk) $ already guaranteed built = idrisCatch (btree [] fp) ...
module Idris.Chaser(buildTree, getModuleFiles, ModuleTree(..)) where import Idris.Parser import Idris.AbsSyntax import Idris.Imports import Idris.Unlit import Idris.Error import Idris.IBC import System.FilePath import System.Directory import Data.Time.Clock import Control.Monad.Trans import Control.Monad.State import...
f4a3ba459c3c4884fb353de635f5ef18b116dfc3c27a7ba550dbf761a35cf953
typedclojure/typedclojure
repl_new.clj
(ns clojure.core.typed.test.repl-new (:require [typed.clojure :as t] [clojure.test :refer :all] [typed.clj.checker.test-utils :refer :all])) (deftest apropos-test (is-tc-e #(apropos "clojure") [-> (t/Seq t/Sym)] :requires [[clojure.repl :refer [apropos]]]) (is-t...
null
https://raw.githubusercontent.com/typedclojure/typedclojure/5fd7cdf7941c6e7d1dd5df88bf44474fa35e1fca/typed/clj.checker/test/clojure/core/typed/test/repl_new.clj
clojure
(ns clojure.core.typed.test.repl-new (:require [typed.clojure :as t] [clojure.test :refer :all] [typed.clj.checker.test-utils :refer :all])) (deftest apropos-test (is-tc-e #(apropos "clojure") [-> (t/Seq t/Sym)] :requires [[clojure.repl :refer [apropos]]]) (is-t...
7351e73baf5f0e13953004c3846539a5c8b710f7fc2d0593971501ab55af2d30
lambda-study-group/sicp
anabastos.clj
(defn p [] p) (defn test [x y] (if (> x 0) 0 y)) (test 0 (p)) The expression ( test 0 ( p ) ) will end in a infinite loop if the programming language evaluates in applicative - order ; In normal order evaluation the expression is evaluated outside in, terminating the execution.
null
https://raw.githubusercontent.com/lambda-study-group/sicp/70819ea6156dfc4e49a2d174dff62c6527c8f024/1.1-TheElementsOfProgramming/ex-1.5/anabastos.clj
clojure
In normal order evaluation the expression is evaluated outside in, terminating the execution.
(defn p [] p) (defn test [x y] (if (> x 0) 0 y)) (test 0 (p)) The expression ( test 0 ( p ) ) will end in a infinite loop if the programming language evaluates in applicative - order
b7160626a6f41bbb8b9a3df1528e062b4ad22cf783284778220c02933c152cff
eslick/cl-langutils
reference.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; Package : utils -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: reference ;;;; Purpose: A wrapper around vector representations of text ;;;; Programmer : ...
null
https://raw.githubusercontent.com/eslick/cl-langutils/38beec7a82eeb35b0bfb0824a41d13ed94fc648b/src/reference.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 ; Package : utils -*- ************************************************************************* FILE IDENTIFICATION Name: reference Purpose: A wrapper around vector representations of text --------------------------- Document wrapper text vector tag v...
Programmer : Date Started : October 2004 (in-package :langutils) (defclass vector-document () :accessor document-text :initarg :text :type (array fixnum)) :accessor document-tags :initarg :tags :type (array symbol)) (annotations :accessor document-annotations :initarg ...
6ee5809e65d2a1135c2eed0c184e20d43995c28b241e38b748818cb84ea5e8b8
juliannagele/ebso
evm_stack.ml
Copyright 2019 and 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/juliannagele/ebso/8e516036fcb98074b6be14fc81ae020f76977712/lib/evm_stack.ml
ocaml
stack(x0 ... x(sd-1), j, n) = nth word on stack after j instructions starting from a stack that contained words x0 ... x(sd-1) set inital words on stack source and target stack counter are equal source and target stack are equal below the stack counter; note that it doesn't matter which stack counter...
Copyright 2019 and 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 ...
d6057f0035cd757905e86f3d0c457c82069872d19ae0b8607559f6f54618cbf2
evturn/haskellbook
21.12-traversable-instances.hs
import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes type IIIs = (Int, Int, [Int]) ----------------------------------------------------------------------------- -- Identity -- newtype Identity a = Identity a deriving (Eq, Ord, Show) instance Functor Id...
null
https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/21/21.12-traversable-instances.hs
haskell
--------------------------------------------------------------------------- Identity --------------------------------------------------------------------------- Constant --------------------------------------------------------------------------- Maybe --------------------------------------------------------------...
import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes type IIIs = (Int, Int, [Int]) newtype Identity a = Identity a deriving (Eq, Ord, Show) instance Functor Identity where fmap f (Identity x) = Identity (f x) instance Foldable Identity where foldr...
321472fadd7afaee389dfdfb74dde594dae86bd4ecce557facb6e9d4e9bac995
Liqwid-Labs/plutus-extra
Natural.hs
module Compare.Natural (tests) where import Functions.Integer qualified as I import Functions.Natural qualified as Nat import Plutus.V1.Ledger.Scripts (fromCompiledCode) import Test.Tasty (TestTree, testGroup) import Test.Tasty.ExpectedFailure (expectFailBecause) import Test.Tasty.Plutus.Size (fitsUnder) import Prelud...
null
https://raw.githubusercontent.com/Liqwid-Labs/plutus-extra/19c03bf6f66fadef4465c3eff849472d4ac8bc05/plutus-numeric/test/size/Compare/Natural.hs
haskell
module Compare.Natural (tests) where import Functions.Integer qualified as I import Functions.Natural qualified as Nat import Plutus.V1.Ledger.Scripts (fromCompiledCode) import Test.Tasty (TestTree, testGroup) import Test.Tasty.ExpectedFailure (expectFailBecause) import Test.Tasty.Plutus.Size (fitsUnder) import Prelud...
c66138578ba3b366d2f97efdd24b0293b896dc777ff8bd937d2a4c1b30ec0fa8
herbelin/coq-hh
cbytegen.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/kernel/cbytegen.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Compilation of variables + computin...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Author : as part of the b...
dd48b66230b7d03194c543369a3f2eb208a9aecc261faca1cbd9b0f7d1a9eabc
katox/neanderthal-stick
nippy_ext.clj
Copyright ( c ) . All rights reserved . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 2.0 (-2.0) or later ;; which can be found in the file LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by...
null
https://raw.githubusercontent.com/katox/neanderthal-stick/b8f92e46327a54c065232a1fb0f0bebef38c4b40/src/neanderthal_stick/nippy_ext.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 2.0 (-2.0) or later which can be found in the file LICENSE at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns neanderthal-stick.nippy-ext (:require [taoensso.nippy :as nippy] [uncomplicate.commons.core :refer [info let-release release with-release]] [uncomplicate.commons.utils :refer [dragan-says-ex]] [uncomplicate.neanderthal.core :refer ...
02ffd50dbaa4ed3fa059cbc156ebee50f3de3e48c99e60c8c321069708223c4b
PacktPublishing/Haskell-High-Performance-Programming
th-names.hs
# LANGUAGE TemplateHaskell # import Language.Haskell.TH n = 5 main = print $(fmap VarE (newName "n")) where n = 1
null
https://raw.githubusercontent.com/PacktPublishing/Haskell-High-Performance-Programming/2b1bfdb8102129be41e8d79c7e9caf12100c5556/Chapter09/th-names.hs
haskell
# LANGUAGE TemplateHaskell # import Language.Haskell.TH n = 5 main = print $(fmap VarE (newName "n")) where n = 1
fc721dcb67104cb325b6e3eddc49f207bed55fda96690c6deed911fddafb837b
jaylevitt/gibak
ometastore.ml
Copyright ( C ) 2008 < > http//eigenclass.org * See README.txt and LICENSE for the redistribution and modification terms * See README.txt and LICENSE for the redistribution and modification terms *) open Printf open Unix open Folddir open Util open FileUtil.StrUtil let debug = ref false let verbose = ref fal...
null
https://raw.githubusercontent.com/jaylevitt/gibak/4fa77cda38c3a61af5e1bf9ead0a63c6824fd6ce/ometastore.ml
ocaml
version
Copyright ( C ) 2008 < > http//eigenclass.org * See README.txt and LICENSE for the redistribution and modification terms * See README.txt and LICENSE for the redistribution and modification terms *) open Printf open Unix open Folddir open Util open FileUtil.StrUtil let debug = ref false let verbose = ref fal...
9ae6e47b43d746226bcfbd9941947939847485573ed71ec5e1089885d763cb86
dccsillag/dotfiles
Scratchpads.hs
module XMonad.Csillag.Scratchpads where import Data.List import XMonad import qualified XMonad.StackSet as W import XMonad.Util.NamedScratchpad import XMonad.Csillag.Externals -- Scratchpads: myScratchpads = [ NS { name = "sysmon" , cmd = termRun' "sysmon" systemMonitor , query = className =? "...
null
https://raw.githubusercontent.com/dccsillag/dotfiles/1a8aa69b19c560ce7355990d15e28eb05eacfc65/.xmonad/lib/XMonad/Csillag/Scratchpads.hs
haskell
Scratchpads:
module XMonad.Csillag.Scratchpads where import Data.List import XMonad import qualified XMonad.StackSet as W import XMonad.Util.NamedScratchpad import XMonad.Csillag.Externals myScratchpads = [ NS { name = "sysmon" , cmd = termRun' "sysmon" systemMonitor , query = className =? "sysmon" ,...
ceef4aa6b074fcaeb8720cc0be46172c6bb4184cc2d01281abdbf80f4fa47a87
softlab-ntua/bencherl
client_db.erl
%%%-------------------------------------------------------------------- %%% CLIENT_DB MODULE %%% @author : upon a design by ( C ) 2014 , RELEASE project %%% @doc %%% Client_DB module for the Distributed Erlang instant messenger ( IM ) application developed as a real benchmark for the Scalable Distribu...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/IM/src/client_db.erl
erlang
-------------------------------------------------------------------- CLIENT_DB MODULE @doc Client_DB module for the Distributed Erlang instant messenger This module implementes the functionality for the database that stores the cients that are loggen in at a given time in a system @end ------------------------...
@author : upon a design by ( C ) 2014 , RELEASE project ( IM ) application developed as a real benchmark for the Scalable Distributed Erlang extension of the Erlang / OTP language . similar to the system described in the Section 2 of the document " Instant Messenger Architectures Design Pr...
3197df022549f1664601b75ba1bdb64372933c6f0a5a0f12307c5c018ceceeeb
mbenke/zpf2013
Simpl2.hs
# LANGUAGE QuasiQuotes # import ExprQuote2 import Expr2 simpl :: Exp -> Exp simpl [expr|0 + $x|] = x main = print $ simpl [expr|0+2|]
null
https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/TH/QQ/Simpl2.hs
haskell
# LANGUAGE QuasiQuotes # import ExprQuote2 import Expr2 simpl :: Exp -> Exp simpl [expr|0 + $x|] = x main = print $ simpl [expr|0+2|]
f4244ece2b0c18fc2ed44a673279898ede5369df99d991e0de7cbbd179a172ee
gebi/jungerl
ibrowse.erl
%%%------------------------------------------------------------------- %%% File : ibrowse.erl Author : > %%% Description : Load balancer process for HTTP client connections. %%% Created : 11 Oct 2003 by > %%%------------------------------------------------------------------- @author at gmail do...
null
https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/ibrowse/src/ibrowse.erl
erlang
------------------------------------------------------------------- File : ibrowse.erl Description : Load balancer process for HTTP client connections. ------------------------------------------------------------------- @version 1.5.2 module implements the API of the HTTP client. There is one named (implemente...
Author : > Created : 11 Oct 2003 by > @author at gmail dot com > 2005 - 2009 @doc The ibrowse application implements an HTTP 1.1 client . This process called ' ibrowse ' which assists in load balancing and maintaining configuration . There is one load balancing process per unique webserve...
8d9494b3bf33bca77b8e0db7456d3718dde167d71103ea497a826d692813f46c
plum-umd/fundamentals
yo-client2.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname yo-client2) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repea...
null
https://raw.githubusercontent.com/plum-umd/fundamentals/eb01ac528d42855be53649991a17d19c025a97ad/1/www/code/yo-client2.rkt
racket
about the language level of this file in a form that our tools can easily process. The Yo App - exchange "yo" messages with users online Use (run '!) to start a demo. How to use the client: - Numeric keys open chat window for designated user. - Enter key sends "yo" in current chat window. Data Definitions A H...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname yo-client2) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (require 2htdp/universe) (require 2htdp/image) ...
5a0c98f45d60eb2cfed8868fbced08646ce817512eb124d8f5ebdbbe1281864c
larcenists/larceny
esc3.scm
(text (begin (push $eip) (push $win) (push $lose)) (seq (push $eip) (push $win) (push $lose) (nop))) 00000000 6805000000 push dword 0x5 00000005 680A000000 push dword 0xa 0000000A 680F000000 push dword 0xf 0000000F 6814000000 push dword 0x14 00000...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/prims/esc3.scm
scheme
(text (begin (push $eip) (push $win) (push $lose)) (seq (push $eip) (push $win) (push $lose) (nop))) 00000000 6805000000 push dword 0x5 00000005 680A000000 push dword 0xa 0000000A 680F000000 push dword 0xf 0000000F 6814000000 push dword 0x14 00000...
61a798128cf3075ae81a620305aab6a535cd13a6ab05aeab5a28448b318ec282
may-liu/qtalk
ejabberd_ldap_sup.erl
-module(ejabberd_ldap_sup). %% API -export([start_link/1, init/1]). -export([add_pid/1, remove_pid/1, get_pids/0, get_random_pid/0]). -export([ login/2, get_dep/0]). -define(POOLSIZE, 5). start_link(Option) -> ets:new(ldap_server_pid, [named_table, bag, public]), supervisor:start_link({local,?MO...
null
https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/ejabberd_ldap_sup.erl
erlang
API ejabberd_ldap_sup:get_dep().
-module(ejabberd_ldap_sup). -export([start_link/1, init/1]). -export([add_pid/1, remove_pid/1, get_pids/0, get_random_pid/0]). -export([ login/2, get_dep/0]). -define(POOLSIZE, 5). start_link(Option) -> ets:new(ldap_server_pid, [named_table, bag, public]), supervisor:start_link({local,?MODULE}, ...
391e045e4ab76f659fadf2fdc47385ec93c944eaa39c9da0c884042454337e2b
nvim-treesitter/nvim-treesitter
locals.scm
(class_definition body: (_) @scope) (block) @scope (try_statement) @scope (catch_clause) @scope (finally_clause) @scope
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/ddc0f1b606472b6a1ab85ee9becfd4877507627d/queries/dart/locals.scm
scheme
(class_definition body: (_) @scope) (block) @scope (try_statement) @scope (catch_clause) @scope (finally_clause) @scope
4627a1126e4d5eeaa9d10411f01946959cbfcd83cecc38f5c23478bb028a2c26
ckirkendall/fresnel
runner.cljs
(ns fresnel.runner (:require [cljs.test :as t :include-macros true :refer [report]] [doo.runner :include-macros true :refer [doo-all-tests]] [fresnel.lenses-test])) (doo-all-tests #"fresnel.*test")
null
https://raw.githubusercontent.com/ckirkendall/fresnel/aba1102220b0aac50061557d3969ce3bb54bac24/test/fresnel/runner.cljs
clojure
(ns fresnel.runner (:require [cljs.test :as t :include-macros true :refer [report]] [doo.runner :include-macros true :refer [doo-all-tests]] [fresnel.lenses-test])) (doo-all-tests #"fresnel.*test")
79b567b4598f632f83ec4054a16fee81c1a86140b0549ab68f08d14079402860
paurkedal/ocaml-caqti
test_mariadb.ml
Copyright ( C ) 2021 < > * * This library 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 version , with the ...
null
https://raw.githubusercontent.com/paurkedal/ocaml-caqti/8fa70f082461dd9772d94daf080e48ee69abfef4/caqti-driver-mariadb/test/test_mariadb.ml
ocaml
Copyright ( C ) 2021 < > * * This library 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 version , with the ...
496a66a4705163451b4bf0de63fb09f1d240d315ee4463e2572b685afac0e545
caradoc-org/caradoc
typesgraphic.ml
(*****************************************************************************) (* Caradoc: a PDF parser and validator *) Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 (* ...
null
https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/type/pdf/typesgraphic.ml
ocaml
*************************************************************************** Caradoc: a PDF parser and validator This program is free software; you can redistribute it and/or modify ...
Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation . You should have rece...
b4456f303af124e4f8de08bfa05866ad9e9c08ade163c1f78f777fad560d0e49
erlang/otp
erl_distribution_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1997 - 2022 . All Rights Reserved . %% 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 applicab...
null
https://raw.githubusercontent.com/erlang/otp/9ce9c59aa7f97d694da6307e2e52dc1378393a99/lib/kernel/test/erl_distribution_SUITE.erl
erlang
%CopyrightBegin% 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 lan...
Copyright Ericsson AB 1997 - 2022 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(erl_distribution_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("kernel/include/dist.hrl")...
73858a87bb999b97efcf9f20de8a29f676f8b158a0457290eb12ede872237ea2
ijvcms/chuanqi_dev
dynamic_compile.erl
Copyright ( c ) 2007 Mats < > < > < > %% %% Permission is hereby granted, free of charge, to any person %% obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without %% restriction, including without limitatio...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/system/misc/dynamic_compile.erl
erlang
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell Software is furnished to do so, subject to the following condi...
Copyright ( c ) 2007 Mats < > < > < > files ( the " Software " ) , to deal in the Software without copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT W...
e067c850cc747b1310c46cb7839c28b7f301b8de8c615032f3b51c7df0182a2b
geneweb/geneweb
notes.mli
val path_of_fnotes : string -> string val commit_notes : Config.config -> Gwdb.base -> string -> string -> unit val notes_links_db : Config.config -> Gwdb.base -> bool -> (Mutil.StrSet.elt * (Gwdb.iper, Gwdb.ifam) Def.NLDB.page list) list val update_notes_links_db : Gwdb.base -> (Gwdb.iper, Gwdb.ifam) Def.N...
null
https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/notes.mli
ocaml
* [note conf base env str] Interprets wiki syntax in a "note" context: - [env] is available during [str] interpretation * [person_note conf base person str] Interprets wiki syntax in a "note" context: - env is available during [str] interpretation with [i] variable bound to person image * [source_note...
val path_of_fnotes : string -> string val commit_notes : Config.config -> Gwdb.base -> string -> string -> unit val notes_links_db : Config.config -> Gwdb.base -> bool -> (Mutil.StrSet.elt * (Gwdb.iper, Gwdb.ifam) Def.NLDB.page list) list val update_notes_links_db : Gwdb.base -> (Gwdb.iper, Gwdb.ifam) Def.N...
cf43f2efb680f832701645a7486a4db3ebf534a79f51020f028734d2313b3394
facebookarchive/pfff
model_codemap.ml
* * Copyright ( C ) 2013 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file licens...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/web/code_map/model_codemap.ml
ocaml
*************************************************************************** Prelude *************************************************************************** *************************************************************************** Types **************************************************************************...
* * Copyright ( C ) 2013 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file licens...
76b8e41fed56160e1630b9cd18c5659f2764965713e733339d1de5efb376d1ff
bennn/dissertation
main.rkt
#lang typed/racket/base AKA quick-test.rkt ;; ----------------------------------------------------------------------------- (require require-typed-check "../base/core-types.rkt" "../base/quad-types.rkt" (only-in typed/racket/class new send) ) (require/typed/check "world.rkt" [world:allow-hyphenated-last-word...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/quadT/typed/main.rkt
racket
----------------------------------------------------------------------------- =============================================================================
#lang typed/racket/base AKA quick-test.rkt (require require-typed-check "../base/core-types.rkt" "../base/quad-types.rkt" (only-in typed/racket/class new send) ) (require/typed/check "world.rkt" [world:allow-hyphenated-last-word-in-paragraph Boolean] [world:quality-default (Parameterof Index)] [world:dra...
d056f28ba5b8570e3b282e62649aa82320ed9d86cd0cd2d477909e258420895d
pkamenarsky/replica
Render.hs
{-# LANGUAGE OverloadedStrings #-} module Replica.VDOM.Render where import qualified Data.Text as T import qualified Data.Text.Lazy.Builder as TB import qualified Data.Map as M import Replica.VDOM.Types (HTML, VDOM(VNode,VLeaf,VText,VRawText), Attrs, Attr(AT...
null
https://raw.githubusercontent.com/pkamenarsky/replica/f01bbfb77c9536a1ea6ab011fb38351d91cb0217/src/Replica/VDOM/Render.hs
haskell
# LANGUAGE OverloadedStrings #
module Replica.VDOM.Render where import qualified Data.Text as T import qualified Data.Text.Lazy.Builder as TB import qualified Data.Map as M import Replica.VDOM.Types (HTML, VDOM(VNode,VLeaf,VText,VRawText), Attrs, Attr(AText,ABool,AEvent,AMap)) renderHTML :...
2e814c2b741f71b8078b255eebd59006cbd7d4bd393db371ecd356424b01a1d9
michiakig/sicp
ex-1.09.scm
;;;; Structure and Interpretation of Computer Programs Chapter 1 Section 2 Procedures and the Processes They Generate Exercise 1.09 illustrate iterative and recursive procedures (define (+ a b) (if (= a 0) b (inc (+ (dec a) b)))) ;; (+ 4 5) ;; (inc (+ 3 5)) ;; (inc (inc (+ 2 5))) ;; (inc (inc (inc ...
null
https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch1/ex-1.09.scm
scheme
Structure and Interpretation of Computer Programs (+ 4 5) (inc (+ 3 5)) (inc (inc (+ 2 5))) (inc (inc (inc (+ 1 5)))) (inc (inc (inc (inc (+ 0 5))))) (inc (inc (inc (inc 5)))) (inc (inc (inc 6))) (inc (inc 7)) (inc 8) This is clearly a recursive process. (+ 4 5) (+ 3 6) (+ 2 7) (+ 1 8) (+ 0 9) This cle...
Chapter 1 Section 2 Procedures and the Processes They Generate Exercise 1.09 illustrate iterative and recursive procedures (define (+ a b) (if (= a 0) b (inc (+ (dec a) b)))) 9 (define (+ a b) (if (= a 0) b (+ (dec a) (inc b)))) 9
558e02a49af7a0ce5664ce7b8cca73e6cdbaf47e6d861a8eff40d359f96eae4b
dada-lang/dada-model
opsem.rkt
#lang racket (require "opsem/lang.rkt" "opsem/small-step.rkt") (provide Dada Dada-reduction)
null
https://raw.githubusercontent.com/dada-lang/dada-model/7833849ebb10e8c458d168c597bcc289569dc707/racket/opsem.rkt
racket
#lang racket (require "opsem/lang.rkt" "opsem/small-step.rkt") (provide Dada Dada-reduction)
3d1afd55a3fca350b84390ef09dde2dfe5f0439b6de3242f14ce90fb67ba84dc
basho/clique
clique_app.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2014 - 2017 Basho Technologies , Inc. %% This file is provided to you 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...
null
https://raw.githubusercontent.com/basho/clique/4014357e4e677164b890fdad08a45cfa54b3e8f3/src/clique_app.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2014 - 2017 Basho Technologies , Inc. This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(clique_app). -b...
3aaae8ee69d767df10868ca48323d29fa309e93e3bc7ca4860a2ddd30ee66957
BranchTaken/Hemlock
test_union.ml
open! Basis.Rudiments open! Basis open MapTest open Map let test () = let test ks0 ks1 = begin let map0 = of_klist ks0 in let map1 = of_klist ks1 in let map = union ~f:merge map0 map1 in let kvs = to_alist map in List.iter ks0 ~f:(fun k -> assert ((mem k map) && (mem k map0))); List.iter ks1 ...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/07922d4658ca6ecf37dfd46f5aca31c8b58e06e4/bootstrap/test/basis/map/test_union.ml
ocaml
open! Basis.Rudiments open! Basis open MapTest open Map let test () = let test ks0 ks1 = begin let map0 = of_klist ks0 in let map1 = of_klist ks1 in let map = union ~f:merge map0 map1 in let kvs = to_alist map in List.iter ks0 ~f:(fun k -> assert ((mem k map) && (mem k map0))); List.iter ks1 ...