_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
6f5ea79465fd8375936e79c32ad7aeabc43754fb308146f79771b52a7b610cea
inhabitedtype/ocaml-aws
getQueryLoggingConfig.mli
open Types type input = GetQueryLoggingConfigRequest.t type output = GetQueryLoggingConfigResponse.t type error = Errors_internal.t include Aws.Call with type input := input and type output := output and type error := error
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/route53/lib/getQueryLoggingConfig.mli
ocaml
open Types type input = GetQueryLoggingConfigRequest.t type output = GetQueryLoggingConfigResponse.t type error = Errors_internal.t include Aws.Call with type input := input and type output := output and type error := error
7c3bbf95a3ad24691e52270a0b55ee3356f4e8a4e5d25eb7d6fe6325dae38de3
wavewave/hoodle
Erase.hs
{-# LANGUAGE BangPatterns #-} module Hoodle.Web.Erase where import Control.Monad (when) import Control.Monad.IO.Class (MonadIO (liftIO)) import Control.Monad.State (MonadState (get)) import Data.Foldable (toList, traverse_) import Data.List (nub, sort) import Data.Sequence (Seq, ViewR (..), singleton, viewr, (|>)) im...
null
https://raw.githubusercontent.com/wavewave/hoodle/1acd7a713697b6146bda13a38591cf868cea6685/web/client/Hoodle/Web/Erase.hs
haskell
# LANGUAGE BangPatterns #
module Hoodle.Web.Erase where import Control.Monad (when) import Control.Monad.IO.Class (MonadIO (liftIO)) import Control.Monad.State (MonadState (get)) import Data.Foldable (toList, traverse_) import Data.List (nub, sort) import Data.Sequence (Seq, ViewR (..), singleton, viewr, (|>)) import qualified Data.Sequence a...
3229f8506cca652353223f54585b0aad5f9328f9b266405d96c7020e2d2c7d15
BinaryAnalysisPlatform/bap-plugins
cut.mli
open Bap.Std * A cut is a subgraph that contains a call to a sink we are interested in . Each cut has a unique caller ( and callstring up to the root of the program ) . We define cut * groups * since a single cut may contain multiple sinks within the final calling sub . E.g. , bar below will f...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap-plugins/2e9aa5c7c24ef494d0e7db1b43c5ceedcb4196a8/minos/cut.mli
ocaml
Stores the blks that call a given source The callstring from src to the lca The sub that calls src. src_caller_blks are all contained in this sub root max depth we would have to inline to hit this group id, for output
open Bap.Std * A cut is a subgraph that contains a call to a sink we are interested in . Each cut has a unique caller ( and callstring up to the root of the program ) . We define cut * groups * since a single cut may contain multiple sinks within the final calling sub . E.g. , bar below will f...
558e55518f080f4c65389f859abc47f3c561ee0d4a71bedbd94eda21c30ffbd1
chrisdone/prana
IO.hs
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , CApiFFI # ----------------------------------------------------------------------------- -- | -- Module : System.IO Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintain...
null
https://raw.githubusercontent.com/chrisdone/prana/f2e45538937d326aff562b6d49296eaedd015662/prana-boot/packages/base-4.11.1.0/System/IO.hs
haskell
--------------------------------------------------------------------------- | Module : System.IO License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : stable Portability : portable --------------------------------------------------------------------------- * File...
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , CApiFFI # Copyright : ( c ) The University of Glasgow 2001 The standard IO library . module System.IO ( * The IO monad IO, fixIO, FilePath, | GHC note : a ' Handle ' will be automatically closed when the garbage an explicit ...
7ba1b61549b67cb75cc7104721fc85c91658b1cc3e55ffa16e28bfb845f51f08
ghcjs/jsaddle-dom
ScriptProcessorNode.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.ScriptProcessorNode (audioProcess, getBufferSize, ScriptProcessorNode(..), gTypeScriptProcessorNode) ...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/ScriptProcessorNode.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.ScriptProcessorNode (audioProcess, getBufferSize, ScriptProcessorNode(..), gTypeScriptProcessorNode) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fr...
67d7640e40e31995867e9b63c68ffae87e29a9470eab89de7b9b51190367958f
racket/rhombus-prototype
class-together.rkt
#lang racket/base (require (for-syntax racket/base syntax/parse/pre) "provide.rkt" "name-root.rkt" "definition.rkt" "expression.rkt" "space.rkt" (submod "class.rkt" for-together) "interface.rkt" (submod "interface.rkt" for-toge...
null
https://raw.githubusercontent.com/racket/rhombus-prototype/4e66c1361bdde51c2df9332644800baead49e86f/rhombus/private/class-together.rkt
racket
#lang racket/base (require (for-syntax racket/base syntax/parse/pre) "provide.rkt" "name-root.rkt" "definition.rkt" "expression.rkt" "space.rkt" (submod "class.rkt" for-together) "interface.rkt" (submod "interface.rkt" for-toge...
49a7200d517dbad16e4ab4b69521d8dd8e23b81500f17ec4f2d304b8e00e8ec3
jiangpengnju/htdp2e
recursion-that-ignores-structure.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 recursion-that-ignores-structure) (read-case-sensitive #t) (teachpacks ()) (htdp-settings ...
null
https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/generative-recursion/non-stand-recursion/recursion-that-ignores-structure.rkt
racket
about the language level of this file in a form that our tools can easily process. [List-of Number] -> [List-of Number] creates a list of numbers with the same numbers as alon, sorted in ascending order
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname recursion-that-ignores-structure) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (check-expect (quick-sort '(...
bdfd16fa2da70a2e3e3261fded61b373157d22ddf37e9f2ec8d6d8c592d90eb2
atlas-engineer/nyxt
package.lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (nyxt:define-package :nyxt/tests (:use :lisp-unit2))
null
https://raw.githubusercontent.com/atlas-engineer/nyxt/aa27fc47314046062d6f4e7ef5d8c95a62c2858f/tests/package.lisp
lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (nyxt:define-package :nyxt/tests (:use :lisp-unit2))
6e218ac12d66871269d82da608c847e305c1194928619f215234fada70999dba
kepler16/gx.cljc
errors.cljc
(ns k16.gx.beta.errors) (defrecord ErrorContext [error-type node-key node-contents signal-key causes]) (def ^:dynamic *err-ctx* "Error context is used for creating/throwing exceptions with contextual data" (map->ErrorContext {:error-type :general :causes []})) (d...
null
https://raw.githubusercontent.com/kepler16/gx.cljc/623f563c557403943f11d63198534d4969362d4a/src/k16/gx/beta/errors.cljc
clojure
(ns k16.gx.beta.errors) (defrecord ErrorContext [error-type node-key node-contents signal-key causes]) (def ^:dynamic *err-ctx* "Error context is used for creating/throwing exceptions with contextual data" (map->ErrorContext {:error-type :general :causes []})) (d...
9369034c63775a4c7921596079ac14944176f871a07c00c4809be2931047fbb1
keera-studios/haskell-game-programming
Connect.hs
import System.CWiid main :: IO () main = do putStrLn "Initializing WiiMote. Please press 1+2 to connect." wm <- cwiidOpen case wm of Just _aWiimote -> putStrLn "Connected" Nothing -> putStrLn "Could not connect"
null
https://raw.githubusercontent.com/keera-studios/haskell-game-programming/d4998decb4664a978c87199347f53b420d763b1e/tutorials/hardware/wiimote/tutorial1/Connect.hs
haskell
import System.CWiid main :: IO () main = do putStrLn "Initializing WiiMote. Please press 1+2 to connect." wm <- cwiidOpen case wm of Just _aWiimote -> putStrLn "Connected" Nothing -> putStrLn "Could not connect"
06ca6673f820c76bed4124a7ecc1779affe496505a9d76dd0cc09f862378c29e
krestenkrab/hanoidb
hanoidb_tests.erl
%% ---------------------------------------------------------------------------- %% hanoidb : LSM - trees ( Log - Structured Merge Trees ) Indexed Storage %% Copyright 2011 - 2012 ( c ) . / %% Copyright 2012 ( c ) Basho Technologies , Inc. All Rights Reserved . %% / %% This file is provided to you ...
null
https://raw.githubusercontent.com/krestenkrab/hanoidb/68333fa51a6fdf27834fc84f42d4421f9627e3b7/test/hanoidb_tests.erl
erlang
---------------------------------------------------------------------------- / "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 WARRANTIES OR CONDITIONS OF ANY KIN...
hanoidb : LSM - trees ( Log - Structured Merge Trees ) Indexed Storage Copyright 2011 - 2012 ( c ) . / Copyright 2012 ( c ) Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , Version 2.0 ( the distributed under the License is distributed on an ...
8abb38c29ce8d0a8b6d3f2988615492b23ca6982cd2ab7ca90ce297cc0e8c105
clojure-interop/aws-api
AmazonTextractAsync.clj
(ns com.amazonaws.services.textract.AmazonTextractAsync "Interface for accessing Amazon Textract asynchronously. Each asynchronous method will return a Java Future object overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. Note: Do not directly i...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.textract/src/com/amazonaws/services/textract/AmazonTextractAsync.clj
clojure
(ns com.amazonaws.services.textract.AmazonTextractAsync "Interface for accessing Amazon Textract asynchronously. Each asynchronous method will return a Java Future object overloads which accept an AsyncHandler can be used to receive notification when an asynchronous operation completes. Note: Do not directly i...
778e1351ebb00fa2b886aff6126e030967ba79c7fe3824f331247fde09ee108c
spechub/Hets
Sublogics.hs
{-# LANGUAGE DeriveDataTypeable #-} | Module : ./CASL_DL / Sublogics.hs Description : sublogic analysis for CASL_DL Copyright : ( c ) 2008 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable Sublogic analysis fo...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/CASL_DL/Sublogics.hs
haskell
# LANGUAGE DeriveDataTypeable #
| Module : ./CASL_DL / Sublogics.hs Description : sublogic analysis for CASL_DL Copyright : ( c ) 2008 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable Sublogic analysis for CASL_DL This module provides th...
d8f7be068840bab441e9e811b1d3912c836322f1d2767377e220723cab1042c3
gsakkas/rite
0089.ml
CaseG VarG [(WildPatG,Nothing,VarG),(TuplePatG (fromList [EmptyPatG]),Nothing,AppG [EmptyG,EmptyG])] match x with | (h1 , h2) -> ((h1 + h2) / 10) :: (((h1 + h2) mod 10) :: a) | _ -> a
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/clusters/0089.ml
ocaml
CaseG VarG [(WildPatG,Nothing,VarG),(TuplePatG (fromList [EmptyPatG]),Nothing,AppG [EmptyG,EmptyG])] match x with | (h1 , h2) -> ((h1 + h2) / 10) :: (((h1 + h2) mod 10) :: a) | _ -> a
2504d0f6b422617d9116efadcee3f11153a8467daee0e521d9a224ee3af1924e
vouillon/osm
projection.mli
OSM tools * Copyright ( C ) 2013 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the License , or ( at your opti...
null
https://raw.githubusercontent.com/vouillon/osm/a42d1bcc82a4ad73c26c81ac7a75f9f1c7470344/database/projection.mli
ocaml
[project index input] The index must be sorted. There can be duplicated entries in the index. [project_unique index input] Both the index and the input table must be sorted.
OSM tools * Copyright ( C ) 2013 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the License , or ( at your opti...
e0735bfc7158c42b6f8672c3f382fda6e7a4c7f74196c350e69c29520d607abe
hypernumbers/hypernumbers
mochiweb_request.erl
@author < > 2007 Mochi Media , Inc. %% @doc MochiWeb HTTP Request abstraction. -module(mochiweb_request, [Socket, Method, RawPath, Version, Headers]). -author(''). -include_lib("kernel/include/file.hrl"). -define(QUIP, "Heave awa lads I'm no deid yet!"). -define(READ_SIZE, 8192). -export([get_header_value/...
null
https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/mochiweb/src/mochiweb_request.erl
erlang
@doc MochiWeb HTTP Request abstraction. @type iolist() = [iolist() | binary() | char()]. @type iodata() = binary() | iolist(). @type key() = atom() | string() | binary() @type value() = atom() | string() | binary() | integer() @type headers(). A mochiweb_headers structure. @type response(). A mochiweb_response p...
@author < > 2007 Mochi Media , Inc. -module(mochiweb_request, [Socket, Method, RawPath, Version, Headers]). -author(''). -include_lib("kernel/include/file.hrl"). -define(QUIP, "Heave awa lads I'm no deid yet!"). -define(READ_SIZE, 8192). -export([get_header_value/1, get_primary_header_value/1, get/1, dump/...
6eb0373cf895616734dc7d872095887de24873f63f1ce0f7f8027fadc31ae289
shaneutt/erlang_notebook
erlang_notebook_mnesia_db.erl
-module(erlang_notebook_mnesia_db). -export([init/0, get_item/0, set_item/0]). -export_type([erlang_notebook_item/0]). -define(TABLENAME, erlang_notebook_config). -define(INTERVAL, 300000). %%==================================================================== %% API functions for setup and initialization %%==========...
null
https://raw.githubusercontent.com/shaneutt/erlang_notebook/b4f291db2d1b2711569e275fed09446fcc1ffb66/apps/erlang_notebook_mnesia_db/src/erlang_notebook_mnesia_db.erl
erlang
==================================================================== API functions for setup and initialization ==================================================================== add our Nodes to the mnesia database over the network check to see if the table we're looking for exists already in mnesia across all No...
-module(erlang_notebook_mnesia_db). -export([init/0, get_item/0, set_item/0]). -export_type([erlang_notebook_item/0]). -define(TABLENAME, erlang_notebook_config). -define(INTERVAL, 300000). -type erlang_notebook_item() :: binary(). -spec init() -> ok. init() -> Nodes = application:get_env(erlang_notebook, nodes, ...
71d0637ecc013eeeb3d429c594a079526bfd8af24ddacf91d49dd7b21b49de6e
RBornat/jape
forcedef.ml
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . 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 ver...
null
https://raw.githubusercontent.com/RBornat/jape/afe9f207e89e965636b43ef8fad38fd1f69737ae/distrib/camlengine/forcedef.ml
ocaml
pat vars body: a binder there is no operator priority in forcedefs ... now also includes the disproof universe bit of shared proofs
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . 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 ver...
c2f7eb0b023203c737b747d50063cdd0f42e969ac694246bd9b0d2c233add956
ekmett/transformers
Strict.hs
----------------------------------------------------------------------------- -- | Module : Control . . Trans . State . Strict Copyright : ( c ) 2001 , ( c ) Oregon Graduate Institute of Science and Technology , 2001 -- License : BSD-style (see the file LICENSE) -- -- Maintaine...
null
https://raw.githubusercontent.com/ekmett/transformers/eb2f3223114f67f68c8970458ca863e231bdb576/Control/Monad/Trans/State/Strict.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style (see the file LICENSE) Maintainer : Stability : experimental Portability : portable Strict state monads, passing an updateable state through a computation. See below for examples. In this version, se...
Module : Control . . Trans . State . Strict Copyright : ( c ) 2001 , ( c ) Oregon Graduate Institute of Science and Technology , 2001 For a lazy version , see " Control . . Trans . Writer . Lazy " , which * For a read - only state , see " Control . . Trans . Reader " . " C...
28acad5db35b7ab9aaac48d90cf9d6be96e05de72c9cd5e1291927827b4c6b76
andy128k/cl-gobject-introspection
package.lisp
(in-package cl-user) (cl:defpackage flood-game-example (:use #:cl))
null
https://raw.githubusercontent.com/andy128k/cl-gobject-introspection/d0136c8d9ade2560123af1fc55bbf70d2e3db539/examples/flood-game/src/package.lisp
lisp
(in-package cl-user) (cl:defpackage flood-game-example (:use #:cl))
267f1b44f58f7bc675c1be15f0353615fb9f81694de33640024f88ae00f32bfd
kadena-io/chainweb-node
Paging.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # -- | Module : Chainweb . Ut...
null
https://raw.githubusercontent.com/kadena-io/chainweb-node/62e5eeccd1ae4a5e4ca56452f7c85d07cdb483c4/src/Chainweb/Utils/Paging.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveTraversable # # LANGUAGE OverloadedStrings # | Stability: experimental Tools for paging HTTP responses * Limit * Page * Next Item * End-Of-Stream * Tools for creating pages from streams internal modules ------------------------------------------------------------...
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # Module : Chainweb . Utils . Paging Copyright : Copyright © 2018 Kadena LLC . License : MIT Maintainer : < > module Chain...
53de37480d912113f07c880b06db3b65e267b2b15ffc2d339e4ffb9792076d3e
YoshikuniJujo/test_haskell
Lib.hs
# LANGUAGE TemplateHaskell # # LANGUAGE PatternSynonyms # # OPTIONS_GHC -Wall -fno - warn - tabs # module Lib where import Foreign.Storable import Foreign.C.Enum enum "Foo" ''Int [''Show, ''Read, ''Storable] [ ("FooBar", 123), ("FooBaz", 456) ]
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/87b3078eab3276e5c0df0d7407f1e20afe6dc2f0/features/ffi/c_enum_structure/try-c-enum/src/Lib.hs
haskell
# LANGUAGE TemplateHaskell # # LANGUAGE PatternSynonyms # # OPTIONS_GHC -Wall -fno - warn - tabs # module Lib where import Foreign.Storable import Foreign.C.Enum enum "Foo" ''Int [''Show, ''Read, ''Storable] [ ("FooBar", 123), ("FooBaz", 456) ]
5e1d417eb0c253a5114cb05c5e9089f648f6a3c6e11a145ecdd8efe2a92ded23
vii/teepeedee2
css.lisp
(in-package #:tpd2.ml) From -CSS2/propidx.html ; if you want more just use "strings" (defvar *css-properties* '( :azimuth :background :background-color :background-image :background-...
null
https://raw.githubusercontent.com/vii/teepeedee2/a2ed78c51d782993591c3284562daeed3aba3d40/src/ml/css.lisp
lisp
if you want more just use "strings" Write CSS like this: (("p.asdfsaf" "p + p") :property "value" :property "value")
(in-package #:tpd2.ml) From -CSS2/propidx.html (defvar *css-properties* '( :azimuth :background :background-color :background-image :background-repeat :bac...
b166e142dcecaa615a1c3d275d13431b240610608575d49211ca983009ff6929
0xYUANTI/stdlib2
s2_fs.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% @doc Filesystem. %%% @end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%_* Module declaration =============================================== -module(s2_fs). %%%_* Exports =========================...
null
https://raw.githubusercontent.com/0xYUANTI/stdlib2/0c334200fd9c7ddd79f6dcc3a63c0aa5de5d3a33/src/s2_fs.erl
erlang
@doc Filesystem. @end _* Module declaration =============================================== _* Exports ========================================================== _* Includes ========================================================= _* Code ============================================================= _ * read/write...
-module(s2_fs). -export([ read/1 , write/2 ]). -export([ with_fd/2 , with_fds/2 ]). -export([ with_temp_fd/1 , with_temp_fd/2 , with_temp_fds/2 ]). -export([ with_temp_file/1 , with_temp_file/2 , with_temp_files/2 ]). -export([ with_t...
301c315af3493829525951c065dd6b12c3a6f3b37ee9205a8dd42e41d0048c5f
RefactoringTools/HaRe
Declare1.hs
module FreeAndDeclared.Declare1 where import qualified Data.Generics as G toplevel :: Integer -> Integer toplevel x = c * x c,d :: Integer c = 7 d = 9 -- Pattern bind tup :: (Int, Int) h :: Int t :: Int tup@(h,t) = head $ zip [1..10] [3..15] data D = A | B String | C -- Retrieve the String from a B unD (B y) = y...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/FreeAndDeclared/Declare1.hs
haskell
Pattern bind Retrieve the String from a B But no others. Main routine
module FreeAndDeclared.Declare1 where import qualified Data.Generics as G toplevel :: Integer -> Integer toplevel x = c * x c,d :: Integer c = 7 d = 9 tup :: (Int, Int) h :: Int t :: Int tup@(h,t) = head $ zip [1..10] [3..15] data D = A | B String | C unD (B y) = y Infix data constructor , see data F = G | (...
9189d39e50f03ae8d554bda61c6336b0a0cc08a074563ba5bf87436b2ba45c56
janestreet/merlin-jst
ast_helper.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/upstream/ocaml_flambda/parsing/ast_helper.mli
ocaml
************************************************************************ OCaml ...
, LexiFi Copyright 2012 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the * Helpers to produce Parsetree fragments { b Warning } This module is unstable and part of { { ! ...
be689bd78697fdadc06c6d029fff9f1c0211a56b208ca2a18bceafc6b9c6024b
3b/3bil
minimal2.lisp
(in-package :avm2-compiler) minimal sample , for new5 compiler/3b - swf / fu (with-open-file (s "/tmp/foo.swf" :direction :output :element-type '(unsigned-byte 8) :if-exists :supersede) (3b-swf:write-swf s (append (list (3b-swf:file-attributes :has-metadata t :as3 t :use-network ...
null
https://raw.githubusercontent.com/3b/3bil/c852181848bedf476373e901869ca29471f926ee/test/minimal2.lisp
lisp
colors alpha ratios
(in-package :avm2-compiler) minimal sample , for new5 compiler/3b - swf / fu (with-open-file (s "/tmp/foo.swf" :direction :output :element-type '(unsigned-byte 8) :if-exists :supersede) (3b-swf:write-swf s (append (list (3b-swf:file-attributes :has-metadata t :as3 t :use-network ...
2a04d14e13c2694cf8852f4958664f03a38bcc583449d97ea644e80ee4225abd
factisresearch/mq-demo
TestHelper.hs
module Mgw.Util.TestHelper ( withLogging, withLoggingAndLevel, withLoggingAndLevelInteractive, parseArgs ) where ---------------------------------------- -- LOCAL ---------------------------------------- import Mgw.Util.Setup import Mgw.Util.Logging import Mgw.Util.DynConfig import Mgw.Util.Config import Mgw.Util....
null
https://raw.githubusercontent.com/factisresearch/mq-demo/0efa1991ca647a86a8c22e516a7a1fb392ab4596/server/src/lib/Mgw/Util/TestHelper.hs
haskell
-------------------------------------- LOCAL -------------------------------------- -------------------------------------- SITE-PACKAGES -------------------------------------- -------------------------------------- STDLIB --------------------------------------
module Mgw.Util.TestHelper ( withLogging, withLoggingAndLevel, withLoggingAndLevelInteractive, parseArgs ) where import Mgw.Util.Setup import Mgw.Util.Logging import Mgw.Util.DynConfig import Mgw.Util.Config import Mgw.Util.ExitAction import System.Console.GetOpt import Control.Monad import Control.Monad.State i...
8aa87741940119401d3c5b7e52ec89765201a8a2eda8c111cfc8c51c20a9972d
himura/lens-regex
sample.hs
# LANGUAGE QuasiQuotes # OUTPUT : # # # # # # # # # # # # # # # # # # # # Target String : target1 = " hoge00 fuga hoge01 neko # # Example : ^ .. regex [ r|hoge[0 - 9]+| ] [ MatchPart { _ = " hoge00 " , _ captures = [ ] } , MatchPart { _ = " hoge01 " , _ captures = [ ] } , MatchPart { _ = " hoge02 ...
null
https://raw.githubusercontent.com/himura/lens-regex/1e2dc8250131744fd12c0df05404f0dc9b17f3b9/sample/sample.hs
haskell
# LANGUAGE QuasiQuotes # OUTPUT : # # # # # # # # # # # # # # # # # # # # Target String : target1 = " hoge00 fuga hoge01 neko # # Example : ^ .. regex [ r|hoge[0 - 9]+| ] [ MatchPart { _ = " hoge00 " , _ captures = [ ] } , MatchPart { _ = " hoge01 " , _ captures = [ ] } , MatchPart { _ = " hoge02 ...
b2f25efe815b021cc29600218454974cf8b951fa94cc825fe595b291af0ff19f
ghc/nofib
Lzw.hs
module Main (main){-export list added by partain-} where { -- partain: with "ghc -cpp -DSLEAZY_UNBOXING", you get (guess what)? -- without it, you get the code as originally written. -- -- Things done here: -- * The obvious unboxing (e.g., Int ==> Int#). -- * use quot/rem, not div/mod * inline PrefixElement type ...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/compress/Lzw.hs
haskell
export list added by partain partain: with "ghc -cpp -DSLEAZY_UNBOXING", you get (guess what)? without it, you get the code as originally written. Things done here: * The obvious unboxing (e.g., Int ==> Int#). * use quot/rem, not div/mod * use shifts, not quot/rem (not necessary: C compiler converts them ...
* inline PrefixElement type into PrefixTree . PT constructor * cvt final clause of 3 - way comparison to " otherwise " * replace Tuple / List types that mention with specialised #if defined(__GLASGOW_HASKELL__) && defined(SLEAZY_UNBOXING) #define FAST_INT Int# #define ILIT(x) (x#) #define IBOX(x) (I# (x)) #...
0dd1691bf0bedd5e7b63a8a0c252cfc199679bfd80718d45c132b76147163606
msakai/toysolver
SimplexTextbook.hs
# LANGUAGE TemplateHaskell # module Test.SimplexTextbook (simplexTextbookTestGroup) where import Control.Monad import Control.Monad.State import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import Data.List import Data.Ratio import Test....
null
https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/test/Test/SimplexTextbook.hs
haskell
from /~wei/lpch5.pdf 退化して巡回の起こるKuhnの7変数3制約の例 case_pd_kuhn_7_3 :: Assertion case_pd_kuhn_7_3 = do assertBool "invalid tableau" (isValidTableau result) currentObjValue result @?= -2 where result :: Tableau Rational from /~wei/lpch5.pdf -------------------------------------------------------------------...
# LANGUAGE TemplateHaskell # module Test.SimplexTextbook (simplexTextbookTestGroup) where import Control.Monad import Control.Monad.State import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap import Data.IntSet (IntSet) import qualified Data.IntSet as IntSet import Data.List import Data.Ratio import Test....
74a42d13340546008fbfa996990d8f965ad660b1b1ea901e04e10b949c0d297b
replikativ/datahike
query_rules_test.cljc
(ns datahike.test.query-rules-test (:require #?(:cljs [cljs.test :as t :refer-macros [is deftest testing]] :clj [clojure.test :as t :refer [is deftest testing]]) [datahike.api :as d] [datahike.db :as db])) (deftest test-rules (let [db [[5 :follow 3] [1 :follow 2] [2 :follow 3]...
null
https://raw.githubusercontent.com/replikativ/datahike/527e269e2c365577ae5f1c53be7e5a168a180107/test/datahike/test/query_rules_test.cljc
clojure
(ns datahike.test.query-rules-test (:require #?(:cljs [cljs.test :as t :refer-macros [is deftest testing]] :clj [clojure.test :as t :refer [is deftest testing]]) [datahike.api :as d] [datahike.db :as db])) (deftest test-rules (let [db [[5 :follow 3] [1 :follow 2] [2 :follow 3]...
d8bbf2a9c254b59737c42f6f376804e04f27a6d6da02e52b67d7d6bddf8c685d
dongweiming/lisp-koans-answer
atoms-vs-lists.lsp
Copyright 2013 Google Inc. ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software ...
null
https://raw.githubusercontent.com/dongweiming/lisp-koans-answer/33eb6e38c7179c677db0df0a31cadd49617ae8db/koans/atoms-vs-lists.lsp
lisp
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 g...
Copyright 2013 Google Inc. distributed under the License is distributed on an " AS IS " BASIS , (define-test test-list-or-atom "Lists in lisp are forms beginning and ending with rounded parentheses. Atoms are symbols, numbers, or other forms usually separated by white-space or parentheses. The fu...
0a997dfbfd89f6f1c8f43480b3248c37bfdf59d7b3429fd943eef9605401a7bd
let-def/owee
owee_location.mli
(** An abstract type representing compiled program locations. It is designed to make sampling cheap (see [extract]), deferring most of the work in the much more expensive [lookup] function (without guarantee to succeed). *) type t (** A location that can never be resolved *) val none : t (** Sample the lo...
null
https://raw.githubusercontent.com/let-def/owee/d7e10ec52643a7bfc0de96c427c47528e85b7d7a/src/owee_location.mli
ocaml
* An abstract type representing compiled program locations. It is designed to make sampling cheap (see [extract]), deferring most of the work in the much more expensive [lookup] function (without guarantee to succeed). * A location that can never be resolved * Sample the location from an arbitrary OCaml f...
type t val none : t val extract : (_ -> _) -> t val lookup : t -> (string * int * int) option val locate : (_ -> _) -> (string * int * int) option val nearest_symbol : t -> string val demangled_symbol : string -> string val nearest_demangled_symbol : t -> string
26356880b4aa5b29152267a3eceb0adafb6abd1430170ac5ca865d52f47f6baf
thelema/ocaml-community
canvas_bind.ml
##ifdef CAMLTK let bind widget tag eventsequence action = tkCommand [| cCAMLtoTKwidget widget_canvas_table widget; TkToken "bind"; cCAMLtoTKtagOrId tag; cCAMLtoTKeventSequence eventsequence; begin match action with | BindRemove -> TkToken "" | BindSet (what, f) -> let cbId = regis...
null
https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/otherlibs/labltk/builtin/canvas_bind.ml
ocaml
##ifdef CAMLTK let bind widget tag eventsequence action = tkCommand [| cCAMLtoTKwidget widget_canvas_table widget; TkToken "bind"; cCAMLtoTKtagOrId tag; cCAMLtoTKeventSequence eventsequence; begin match action with | BindRemove -> TkToken "" | BindSet (what, f) -> let cbId = regis...
6457c884da999fc7bacf78b8767de8c58df7bcb6adfb45ecd31435816a27cb09
hammerlab/prohlatype
post_analysis.ml
open Util open ParPHMM open ParPHMM_drivers let f_of_yojson = (Output.of_yojson Multiple_loci.final_read_info_of_yojson) let of_json_file f = Yojson.Safe.stream_from_file f only one element per file . |> f_of_yojson |> unwrap type read_info = | Pr of Alleles_and_positions.t Multiple_loci.paired | Soi ...
null
https://raw.githubusercontent.com/hammerlab/prohlatype/3acaf7154f93675fc729971d4c76c2b133e90ce6/src/lib/post_analysis.ml
ocaml
open Util open ParPHMM open ParPHMM_drivers let f_of_yojson = (Output.of_yojson Multiple_loci.final_read_info_of_yojson) let of_json_file f = Yojson.Safe.stream_from_file f only one element per file . |> f_of_yojson |> unwrap type read_info = | Pr of Alleles_and_positions.t Multiple_loci.paired | Soi ...
e6ad3f4b720abe5d0c2ed93afee1dc96e40abed5cbf2ae6ee58f0171385e2fb8
binaryage/chromex
bookmark_manager_private.clj
(ns chromex.app.bookmark-manager-private " * available since Chrome 36" (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer [gen-wrap-helper]] [chromex.callgen :refer [gen-call-helper gen-tap-all-events-call]])) (declare api-table) (declare gen-ca...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps_private/chromex/app/bookmark_manager_private.clj
clojure
-- events ----------------------------------------------------------------------------------------------------------------- docs: /#tapping-events -- convenience ------------------------------------------------------------------------------------------------------------ --------------------------------------------...
(ns chromex.app.bookmark-manager-private " * available since Chrome 36" (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer [gen-wrap-helper]] [chromex.callgen :refer [gen-call-helper gen-tap-all-events-call]])) (declare api-table) (declare gen-ca...
ddbd46574d677bec57cc09131896500726fcc5b53e691e303efb99dfc4b9c86e
yutopp/rill
context.ml
* Copyright yutopp 2019 - . * * Distributed under the Boost Software License , Version 1.0 . * ( See accompanying file LICENSE_1_0.txt or copy at * ) * Copyright yutopp 2019 - . * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * )...
null
https://raw.githubusercontent.com/yutopp/rill/375b67c03ab2087d0a2a833bd9e80f3e51e2694f/rillc/lib/syntax/context.ml
ocaml
* Copyright yutopp 2019 - . * * Distributed under the Boost Software License , Version 1.0 . * ( See accompanying file LICENSE_1_0.txt or copy at * ) * Copyright yutopp 2019 - . * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * )...
5b91c963a2945c16bf5d5a6fd3c22172e3a9be57281ef7ecab586ec8107a50bd
GrammaticalFramework/gf-core
Importing.hs
module GF.Command.Importing (importGrammar, importSource) where import PGF import PGF.Internal(optimizePGF,unionPGF,msgUnionPGF) import GF.Compile import GF.Compile.Multi (readMulti) import GF.Compile.GetGrammar (getBNFCRules, getEBNFRules) for cc command import GF.Grammar.BNFC import GF.Grammar.EBNF import GF.Gram...
null
https://raw.githubusercontent.com/GrammaticalFramework/gf-core/9b4f2dd18b64b770aaebfa1885085e8e3447f119/src/compiler/GF/Command/Importing.hs
haskell
import a grammar in an environment where it extends an existing grammar for different cf formats
module GF.Command.Importing (importGrammar, importSource) where import PGF import PGF.Internal(optimizePGF,unionPGF,msgUnionPGF) import GF.Compile import GF.Compile.Multi (readMulti) import GF.Compile.GetGrammar (getBNFCRules, getEBNFRules) for cc command import GF.Grammar.BNFC import GF.Grammar.EBNF import GF.Gram...
2e94517c99fc519dfe2bc7ef374ec2728f8b461702dfdb07c8579843708f82ce
greghendershott/aws
keys.rkt
Copyright ( c ) 2012 - 2022 by . SPDX - License - Identifier : BSD-2 - Clause #lang racket/base (require (only-in http gmt-8601-string->seconds) json net/base64 net/url racket/contract racket/dict racket/file racket/format ...
null
https://raw.githubusercontent.com/greghendershott/aws/7eee5190aa8538b4016fd4cca406b4e7e06e702a/aws/keys.rkt
racket
DEPRECATED for backward compatability my old way, just each key on own line: DEPRECATED kill \r\n added by base64-encode Get credentials from EC2 instance meta-data Note: These aren't parameters because parameters are per-thread -- threads.
Copyright ( c ) 2012 - 2022 by . SPDX - License - Identifier : BSD-2 - Clause #lang racket/base (require (only-in http gmt-8601-string->seconds) json net/base64 net/url racket/contract racket/dict racket/file racket/format ...
433101e30bf62866a1ddf8237a3df9aa29fe70cea47cff06f9b4d2628ef720b4
BekaValentine/SimpleFP-v2
REPL.hs
module DependentImplicit.Unification.REPL where import Control.Monad.Reader (runReaderT) import System.IO import Utils.ABT import Utils.Env import Utils.Eval import Utils.Pretty import DependentImplicit.Core.ConSig import DependentImplicit.Core.Evaluation import DependentImplicit.Core.Parser import DependentImplicit....
null
https://raw.githubusercontent.com/BekaValentine/SimpleFP-v2/ae00ec809caefcd13664395b0ae2fc66145f6a74/src/DependentImplicit/Unification/REPL.hs
haskell
module DependentImplicit.Unification.REPL where import Control.Monad.Reader (runReaderT) import System.IO import Utils.ABT import Utils.Env import Utils.Eval import Utils.Pretty import DependentImplicit.Core.ConSig import DependentImplicit.Core.Evaluation import DependentImplicit.Core.Parser import DependentImplicit....
6429576e16e0be359c5e422d299f4f2728d3a77848fcbe62f41c4ad5ef6a0971
RRethy/nvim-treesitter-textsubjects
textsubjects-big.scm
(([ (method) (singleton_method) (module) (class) ] @_start @_end) (#make-range! "range" @_start @_end)) ; sorbet type *annotation* (((call method: (identifier) @_start) . (method) @_end) (#match? @_start "sig") (#make-range! "range" @_start @_end))
null
https://raw.githubusercontent.com/RRethy/nvim-treesitter-textsubjects/66a62f42fa74826a145d75e4715c2786e319996e/queries/ruby/textsubjects-big.scm
scheme
sorbet type *annotation*
(([ (method) (singleton_method) (module) (class) ] @_start @_end) (#make-range! "range" @_start @_end)) (((call method: (identifier) @_start) . (method) @_end) (#match? @_start "sig") (#make-range! "range" @_start @_end))
ce798198e6143c242f7513b17d2fb9f30d2084c91ff5aaa8806d5eb00a53f442
techascent/tech.ml
protocols.clj
(ns tech.v3.libs.smile.protocols (:require [tech.v3.libs.smile.data :as smile-data] [tech.v3.datatype :as dtype] [tech.v3.dataset.utils :as ds-utils]) (:import [smile.data.formula Formula] [smile.data.type StructType] [smile.regression DataFrameRegression] [s...
null
https://raw.githubusercontent.com/techascent/tech.ml/7f2cc506980a05f0f8c85f8b1ff0cde6b9451f54/src/tech/v3/libs/smile/protocols.clj
clojure
(ns tech.v3.libs.smile.protocols (:require [tech.v3.libs.smile.data :as smile-data] [tech.v3.datatype :as dtype] [tech.v3.dataset.utils :as ds-utils]) (:import [smile.data.formula Formula] [smile.data.type StructType] [smile.regression DataFrameRegression] [s...
a7d229db2ddaa4078713087399d8c5ef1f3467db29508d1d44a09b8fe7db6caa
open-company/open-company-web
reaction.cljs
(ns oc.web.utils.reaction) (defn can-pick-reaction? "Given an emoji and the list of the current reactions check if the user can react. A user can react if: - the reaction is NOT already in the reactions list - the reaction is already in the reactions list and its not reacted" [emoji reactions-data] (...
null
https://raw.githubusercontent.com/open-company/open-company-web/dfce3dd9bc115df91003179bceb87cca1f84b6cf/src/main/oc/web/utils/reaction.cljs
clojure
(ns oc.web.utils.reaction) (defn can-pick-reaction? "Given an emoji and the list of the current reactions check if the user can react. A user can react if: - the reaction is NOT already in the reactions list - the reaction is already in the reactions list and its not reacted" [emoji reactions-data] (...
6970a0c7519b88f4385d571a4b07f3cae7aa103c8efbb4d3223f2ce42f09b7c9
icicle-lang/x-ambiata
Group.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # module X.Data.Vector.Stream.Group ( embed , concatWith , chunked , grouped ) where import Control.Monad.Base (MonadBase(..)) import Control.Monad.Primitive (PrimMonad(.....
null
https://raw.githubusercontent.com/icicle-lang/x-ambiata/532f8473084b24fb9d8c90fda7fee9858b9fbe30/x-vector/src/X/Data/Vector/Stream/Group.hs
haskell
# LANGUAGE BangPatterns # | Turns a stream of @a@ in to a stream of chunks of size @n@. except for the last one. Values of @a@ which are equal according to the comparison function stay in the same chunk. # INLINE [0] notEq # # INLINE [0] loop #
# LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # module X.Data.Vector.Stream.Group ( embed , concatWith , chunked , grouped ) where import Control.Monad.Base (MonadBase(..)) import Control.Monad.Primitive (PrimMonad(..)) import Data.Vect...
6f194eb15f8147de30da2e2d47d8ca6acf2342328d44b5151eb95855cf879f90
scymtym/trivial-with-current-source-form
clasp.lisp
;;;; clasp.lisp --- Clasp implementation. ;;;; ;;;; Author: Bike <> (cl:in-package #:trivial-with-current-source-form) (defun expand (forms body) `(ext:with-current-source-form (,@forms) ,@body))
null
https://raw.githubusercontent.com/scymtym/trivial-with-current-source-form/198fdc9193c6c8bc43fad2ad7562603d11194c6d/code/clasp.lisp
lisp
clasp.lisp --- Clasp implementation. Author: Bike <>
(cl:in-package #:trivial-with-current-source-form) (defun expand (forms body) `(ext:with-current-source-form (,@forms) ,@body))
8283f1d00fb2493d452867cb0e615833661932a56aae54562549cc058adc6ec7
jacekschae/learn-pedestal-course-files
dev.clj
(ns dev (:require [clojure.edn :as edn] [cheffy.server :as server] [com.stuartsierra.component.repl :as cr])) (defn system [_] (-> (-> "src/config/cheffy/development.edn" (slurp) (edn/read-string)) (server/create-system))) (cr/set-init system) (defn start-dev [] (cr/start)) (defn...
null
https://raw.githubusercontent.com/jacekschae/learn-pedestal-course-files/33c62931273d30860e6efeeb9513dc4630c75218/increments/17-cheffy-interceptor/src/dev/dev.clj
clojure
(ns dev (:require [clojure.edn :as edn] [cheffy.server :as server] [com.stuartsierra.component.repl :as cr])) (defn system [_] (-> (-> "src/config/cheffy/development.edn" (slurp) (edn/read-string)) (server/create-system))) (cr/set-init system) (defn start-dev [] (cr/start)) (defn...
73df1d9ba4998962bec3973b532186592227b7c46713c8b2e3bb76c5c35db890
nikita-volkov/rebase
Pool.hs
module Rebase.Foreign.Marshal.Pool ( module Foreign.Marshal.Pool ) where import Foreign.Marshal.Pool
null
https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Foreign/Marshal/Pool.hs
haskell
module Rebase.Foreign.Marshal.Pool ( module Foreign.Marshal.Pool ) where import Foreign.Marshal.Pool
5719003302edff231b610f50f59d8a8b48318ebc0e28bc60508d4bda8c259fa4
realworldocaml/book
test_value_printing.ml
* Copyright ( c ) 2013 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) open OUnit2 open Ctypes let ...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ocaml-ctypes/tests/test-value_printing/test_value_printing.ml
ocaml
Test the printing of atomic values: arithmetic types and values of abstract types. char signed char short int long long long unsigned char bool unsigned short unsigned int unsigned long unsigned long long int8_t int16_t int32_t int64_t uint8_t uint16_t uint64_t size_t ...
* Copyright ( c ) 2013 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) open OUnit2 open Ctypes let ...
ca23e9519e603c4bcece3f4cbb8be59639298048830a6ae1d75331b35d280b95
monadbobo/ocaml-core
ref.ml
open Std_internal type 'a t = 'a ref = { mutable contents : 'a } let sexp_of_t sexp_of_a t = sexp_of_a !t let t_of_sexp a_of_sexp sexp = ref (a_of_sexp sexp) include Bin_prot.Utils.Make_binable1 (struct module Binable = struct type 'a t = 'a with bin_io end type 'a t = 'a ref let to_binable t = !t le...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/ref.ml
ocaml
container functions below
open Std_internal type 'a t = 'a ref = { mutable contents : 'a } let sexp_of_t sexp_of_a t = sexp_of_a !t let t_of_sexp a_of_sexp sexp = ref (a_of_sexp sexp) include Bin_prot.Utils.Make_binable1 (struct module Binable = struct type 'a t = 'a with bin_io end type 'a t = 'a ref let to_binable t = !t le...
646f2a5bd75d875867745231de4fb2eeadeef7633bb753b09fa4bfb95d147140
wdebeaum/step
noon.lisp
;;;; ;;;; W::noon ;;;; (define-words :pos W::pro :templ PRONOUN-TEMPL :tags (:base500) :words ( at noon , midnight ;; why are these pronouns? (W::noon (SENSES ((LF-PARENT ONT::noon) ( SEM ( F::time - function F::day - point ) ) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/noon.lisp
lisp
W::noon why are these pronouns?
(define-words :pos W::pro :templ PRONOUN-TEMPL :tags (:base500) :words ( at noon , midnight (W::noon (SENSES ((LF-PARENT ONT::noon) ( SEM ( F::time - function F::day - point ) ) ) ) ) ))
496c3e0f9d6522fa1c9a2e02277cdf61cacef4a89d2283a24bd4e527c50a9a1d
CardanoSolutions/kupo
MonadTime.hs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. module Kupo.Control.MonadTime ( MonadTime (..) , Time (..) , DiffTime , addTime , diffTime , secondsToDiffTime ,...
null
https://raw.githubusercontent.com/CardanoSolutions/kupo/fa37a0e569cc5d8faee925bf19f0349dac7b3990/src/Kupo/Control/MonadTime.hs
haskell
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. module Kupo.Control.MonadTime ( MonadTime (..) , Time (..) , DiffTime , addTime , diffTime , secondsToDiffTime ,...
599aba923b100868b9635020ea142f9d2cb0299784fcadf85342c3e1b5fc8f43
facebook/infer
theory.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/9d9a3a42b75697db86bc0da3092137f175782773/sledge/src/fol/theory.mli
ocaml
* Theory Solver
* 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 ...
b866cb727521cd65cfde713aa6b05096b9de446d0f08a638420ae61a25d1970b
clojure-expectations/clojure-test
test_macros.cljc
copyright ( c ) 2019 - 2020 , all rights reserved (ns expectations.clojure.test-macros "Macros to support testing the testing framework." (:require #?(:clj [clojure.test :refer [is do-report] :as t] :cljs [cljs.test :refer [do-report assert-expr] :refer-macros [is assert-ex...
null
https://raw.githubusercontent.com/clojure-expectations/clojure-test/fdf73d8a1219e17443c4b18c951b40943a7a7e3f/test/expectations/clojure/test_macros.cljc
clojure
copyright ( c ) 2019 - 2020 , all rights reserved (ns expectations.clojure.test-macros "Macros to support testing the testing framework." (:require #?(:clj [clojure.test :refer [is do-report] :as t] :cljs [cljs.test :refer [do-report assert-expr] :refer-macros [is assert-ex...
d6db6b19ecfe47c57114a35d506c4b56d66bc52459bec6f818da1a04a218d659
kupl/LearnML
patch.ml
type lambda = V of var | P of (var * lambda) | C of (lambda * lambda) and var = string let rec varfind (arr : 'a list) x : bool = match arr with | [] -> false | hd :: tl -> if hd = x then true else varfind tl x let rec find (arr : string list) (lam : lambda) : bool * string list = match lam with | V x -> ...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub127/patch.ml
ocaml
type lambda = V of var | P of (var * lambda) | C of (lambda * lambda) and var = string let rec varfind (arr : 'a list) x : bool = match arr with | [] -> false | hd :: tl -> if hd = x then true else varfind tl x let rec find (arr : string list) (lam : lambda) : bool * string list = match lam with | V x -> ...
db2190d4136263797e0b31b722edcda74126485d77d8ccf85ce3051c6a661af6
tarides/opam-monorepo
project.mli
(** Utility functions to extract project specific path and values *) type t = Fpath.t (** The type of projects. What we consider a project here is the root of a dune project/workspace *) val local_packages : recurse:bool -> t -> ((OpamPackage.Name.t * Fpath.t) list, [> Rresult.R.msg ]) result (** Retur...
null
https://raw.githubusercontent.com/tarides/opam-monorepo/9262e7f71d749520b7e046fbd90a4732a43866e9/lib/project.mli
ocaml
* Utility functions to extract project specific path and values * The type of projects. What we consider a project here is the root of a dune project/workspace * Returns the locally defined opam packages as an association list from package names to to the corresponding .opam file path. Only considers...
type t = Fpath.t val local_packages : recurse:bool -> t -> ((OpamPackage.Name.t * Fpath.t) list, [> Rresult.R.msg ]) result val all_local_packages : t -> ((OpamPackage.Name.t * Fpath.t) list, [> Rresult.R.msg ]) result val dune_project : t -> Fpath.t val name : t -> (string, [> `Msg of string ]) result va...
f6d804c1f8452225e02aedf70ebd432351261cd444615197af7938634016aef4
mbj/stratosphere
PortfolioShare.hs
module Stratosphere.ServiceCatalog.PortfolioShare ( PortfolioShare(..), mkPortfolioShare ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data PortfolioShare = Portfoli...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/servicecatalog/gen/Stratosphere/ServiceCatalog/PortfolioShare.hs
haskell
module Stratosphere.ServiceCatalog.PortfolioShare ( PortfolioShare(..), mkPortfolioShare ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data PortfolioShare = Portfoli...
c46b471aa0e26e7785fa11154632f2c62407b92770529e6cd645aebd4fd71fc0
pbl64k/gpif-datakinds
IxFunctor.hs
{-# LANGUAGE GADTs #-} # LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE KindSignatures # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE TypeOperators # # LANGUAGE InstanceSigs # # LANGUAGE In...
null
https://raw.githubusercontent.com/pbl64k/gpif-datakinds/1ae07ec5274f258c6bdf6633bd88532f6c3c1e04/src/Control/IxFunctor.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes #
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE KindSignatures # # LANGUAGE ScopedTypeVariables # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE TypeOperators # # LANGUAGE InstanceSigs # # LANGUAGE IncoherentInstances # | Module : Control . I...
d770f86eaaedffae27f11eb00f27ae281892a081d763e249b08a7a088c5dd2ae
jpmonettas/web-extractor
liga.lisp
(in-package :extractor) (def-web-extractor partido-map ((local :finder (xpath-finder "//div[@class='equipo'][1]")) (visitante :finder (xpath-finder "//div[@class='equipo'][2]")) (resultado_local :finder (compose (xpath-finder "//div[@class='vs']") (reg...
null
https://raw.githubusercontent.com/jpmonettas/web-extractor/7a78f83cec83ac4b0377eff64eaf171a5a671002/tests/liga.lisp
lisp
(asdf:oos 'asdf:load-op :cl-web-extractor) (sb-ext:save-lisp-and-die "my_sbcl_parse_liga" :executable t :toplevel 'extractor::parse-liga)
(in-package :extractor) (def-web-extractor partido-map ((local :finder (xpath-finder "//div[@class='equipo'][1]")) (visitante :finder (xpath-finder "//div[@class='equipo'][2]")) (resultado_local :finder (compose (xpath-finder "//div[@class='vs']") (reg...
0626c44ed56204625e9e0da43837e9b7d87ad5b80d43109af9348bb6e8b24060
lopec/LoPEC
logger_ext_supervisor.erl
%%% Author : Sedrik %%% Description : The client supervisor Created : Tue Sep 29 08:58:17 CEST 2009 -vsn('$Rev$ ' ) . -module(logger_ext_supervisor). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). %%%=================================================================== %%% API functions %%%===...
null
https://raw.githubusercontent.com/lopec/LoPEC/29a3989c48a60e5990615dea17bad9d24d770f7b/trunk/old_stuff/old_master/src/logger_ext_supervisor.erl
erlang
Author : Sedrik Description : The client supervisor =================================================================== API functions =================================================================== -------------------------------------------------------------------- @doc Starts the supervisor @end ---------...
Created : Tue Sep 29 08:58:17 CEST 2009 -vsn('$Rev$ ' ) . -module(logger_ext_supervisor). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). ( ) - > { ok , Pid } | ignore | { error , Error } start_link() -> supervisor:start_link(?MODULE, no_args). @private ) - > { ok , { SupFlags ...
e8afa17cc17a0ae43bc3eec8114cb45152a184363d3e9f380949b53f4913cda3
lesguillemets/sicp-haskell
1.3.2.hs
-- this section is mostly about lisp/scheme syntex, so nothing to do in -- haskell here.
null
https://raw.githubusercontent.com/lesguillemets/sicp-haskell/df524a1e28c45fb16a56f539cad8babc881d0431/text/chap01/sect3/1.3.2.hs
haskell
this section is mostly about lisp/scheme syntex, so nothing to do in haskell here.
c63f35d20e51c7416ecc13cb97142ac7d5825385da2672d407f7c393a70226b7
darrenks/nibbles
Hs.hs
module Hs where import Data.DList -- needs cabal install --lib dlist single = singleton flist = fromList a +++ b = append a b assume HsCode is parenthesized if precedence is less than apply ( only need parens for rhs ) newtype HsCode = HsCode (DList Char) deriving (Show, Eq) getHsCode (HsCode hs) = hs hsAtom :: S...
null
https://raw.githubusercontent.com/darrenks/nibbles/073d463ce50b99b76cf4ae900087d872971b4e33/Hs.hs
haskell
needs cabal install --lib dlist "::Integer)"
module Hs where single = singleton flist = fromList a +++ b = append a b assume HsCode is parenthesized if precedence is less than apply ( only need parens for rhs ) newtype HsCode = HsCode (DList Char) deriving (Show, Eq) getHsCode (HsCode hs) = hs hsAtom :: String -> HsCode hsAtom = HsCode . fromList hsApp :: ...
47e29bec3ea89a6228432aee722fd3624e8e331dd50b1530067ecb36e7aeb392
ds-wizard/engine-backend
List_Locale_GET.hs
module Wizard.Specs.API.Config.List_Locale_GET ( list_locale_GET, ) where import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Lazy.Char8 as BSL import Network.HTTP.Types import Network.Wai (Application) import Test.Hspec import Test.Hspec.Wai hiding (shouldRespondWith) import Test.Hspec.Wai...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/0ec94a4b0545f2de8a4e59686a4376023719d5e7/engine-wizard/test/Wizard/Specs/API/Config/List_Locale_GET.hs
haskell
------------------------------------------------------------------------ GET /configs/locales/{localeId} ------------------------------------------------------------------------ ---------------------------------------------------- ---------------------------------------------------- ------------------------------...
module Wizard.Specs.API.Config.List_Locale_GET ( list_locale_GET, ) where import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Lazy.Char8 as BSL import Network.HTTP.Types import Network.Wai (Application) import Test.Hspec import Test.Hspec.Wai hiding (shouldRespondWith) import Test.Hspec.Wai...
bb5fa61c6153e6a03301197a3133d742ab1602422ff72de716c9be9ce6c08ca9
argp/bap
bench_nreplace.ml
Run with : make bench BENCH_TARGETS = / bench_nreplace.native make bench BENCH_TARGETS=benchsuite/bench_nreplace.native *) open Batteries open String (* The original Batteries String.nreplace *) let nreplace_orig ~str ~sub ~by = if sub = "" then invalid_arg "nreplace: cannot replace all empty subs...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/benchsuite/bench_nreplace.ml
ocaml
The original Batteries String.nreplace allows loop to be tail recursive still need the last chunk still need the last chunk collect all positions where we need to replace, * skipping overlapping occurences create destination string do the replacement see comment above about Obj.magic see comment abo...
Run with : make bench BENCH_TARGETS = / bench_nreplace.native make bench BENCH_TARGETS=benchsuite/bench_nreplace.native *) open Batteries open String let nreplace_orig ~str ~sub ~by = if sub = "" then invalid_arg "nreplace: cannot replace all empty substrings" ; let parts = nsplit str ~by:sub in...
a6fd4b74d0ca9397356a2292946a747ebc5f83665d66ce5402af95545e4aeb07
ChrisPenner/mad-props
Links.hs
# LANGUAGE ScopedTypeVariables # module Props.Internal.Links ( disjoint , equal , require ) where import qualified Data.Set as S import Props.Internal.PropT | Apply the constraint that two variables may NOT be set to the same value . This constraint is bidirectional . E.g. you might apply this co...
null
https://raw.githubusercontent.com/ChrisPenner/mad-props/a1fd2a5fff0f2da07fb15018dea5164ca225ebc3/src/Props/Internal/Links.hs
haskell
# LANGUAGE ScopedTypeVariables # module Props.Internal.Links ( disjoint , equal , require ) where import qualified Data.Set as S import Props.Internal.PropT | Apply the constraint that two variables may NOT be set to the same value . This constraint is bidirectional . E.g. you might apply this co...
72ba0c1df26889aeeea7f672010c45e8aa25e558ac75fabbd05dd56d1c4e48c3
ConsumerDataStandardsAustralia/validation-prototype
PrismTestHelpers.hs
{-# LANGUAGE RankNTypes #-} module Web.ConsumerData.Au.Api.Types.PrismTestHelpers where import Control.Lens import Hedgehog (property, forAll, tripping) import qualified Hedgehog.Gen as Gen import Test.Tasty (TestName, TestTree) import Test.Tasty.Hedgehog (test...
null
https://raw.githubusercontent.com/ConsumerDataStandardsAustralia/validation-prototype/ff63338b77339ee49fa3e0be5bb9d7f74e50c28b/consumer-data-au-api-types/tests/Web/ConsumerData/Au/Api/Types/PrismTestHelpers.hs
haskell
# LANGUAGE RankNTypes #
module Web.ConsumerData.Au.Api.Types.PrismTestHelpers where import Control.Lens import Hedgehog (property, forAll, tripping) import qualified Hedgehog.Gen as Gen import Test.Tasty (TestName, TestTree) import Test.Tasty.Hedgehog (testProperty) testEnumPrismTrip...
c9585fc5a3eacb9b99bf0842b3f3d781b8209480ef30286472b4f6f983b1de3a
merlin-lang/merlin
Merlin_OpenFlow.ml
open Frenetic_OpenFlow open Pattern open Merlin_Types open Merlin_Error module NK = Frenetic_NetKAT type pattern = Pattern.t let all_pattern = match_all exception Empty_pat let mk_flow (pat:pattern) (group:group) : Frenetic_OpenFlow.flow = { pattern = pat; action = group; cookie = 0L; idle_timeout = ...
null
https://raw.githubusercontent.com/merlin-lang/merlin/35a88bce024a8b8be858c796f1cd718e4a660529/lib/Merlin_OpenFlow.ml
ocaml
Printf.printf "Calling pat_subseteq\n%!"; Union of t1 & t2 is their intersection followed by each of them, so all cases are captured
open Frenetic_OpenFlow open Pattern open Merlin_Types open Merlin_Error module NK = Frenetic_NetKAT type pattern = Pattern.t let all_pattern = match_all exception Empty_pat let mk_flow (pat:pattern) (group:group) : Frenetic_OpenFlow.flow = { pattern = pat; action = group; cookie = 0L; idle_timeout = ...
7897bcafb637623cd94b24aa69c0137a9aa9aef3b3aebaf241ca4e723f8322b7
ayazhafiz/plts
language.ml
type term = | Num of int | Var of string | Abs of string * term | App of term * term | Record of (string * term) list | RecordProject of term * string | Let of { is_rec : bool; name : string; rhs : term; body : term } type toplevel = { is_rec : bool; name : string; body : term } type var_state = { uid...
null
https://raw.githubusercontent.com/ayazhafiz/plts/59b3996642f4fd5941c96a4987643303acc3dee6/simple_sub/lib/language.ml
ocaml
* The level at which the variable should be generalized. Useful in representing let polymorphism, which can be deeply nested in many "let" terms, each term being more general than the last. * Types inferred from the frontend level * Positive variables are in output positions * Negative variable...
type term = | Num of int | Var of string | Abs of string * term | App of term * term | Record of (string * term) list | RecordProject of term * string | Let of { is_rec : bool; name : string; rhs : term; body : term } type toplevel = { is_rec : bool; name : string; body : term } type var_state = { uid...
82a04bdf0a556b6a84f0ac06829b3ae7a9cb235b003a3ffdbcd01416cf35287d
informatimago/lisp
macros.lisp
-*- mode : lisp;coding : utf-8 -*- ;;;;************************************************************************** FILE : macros.lisp ;;;;LANGUAGE: Common-Lisp ;;;;SYSTEM: Common-Lisp USER - INTERFACE : ;;;;DESCRIPTION ;;;; Defines DEFUN and LAMBDA , to deal with interac...
null
https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/editor/macros.lisp
lisp
coding : utf-8 -*- ************************************************************************** LANGUAGE: Common-Lisp SYSTEM: Common-Lisp DESCRIPTION LEGAL This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distri...
FILE : macros.lisp USER - INTERFACE : Defines DEFUN and LAMBDA , to deal with interactive declarations . < PJB > < > MODIFICATIONS 2015 - 01 - 11 < PJB > Extracted from editor.lisp AGPL3 Copyright 2015 - 2016 it under the terms of the GNU Affero General Public...
32af9495890e9c516e5f4c9f82da021b9b0a09b01eaac7eed1fc565f8d493cd4
theodormoroianu/SecondYearCourses
HaskellChurch_20210415163610.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_20210415163610.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...
f19aa7e147ef4d96a1dd8c2d3bf6c1f9221404eb29c696d8e5c5b8eaf5773489
goodell/cppmem
flow.ml
Js_of_ocaml compiler * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking...
null
https://raw.githubusercontent.com/goodell/cppmem/eb3ce19b607a5d6ec81138cd8cacd236f9388e87/js_of_ocaml-1.2/compiler/flow.ml
ocaml
** x depends on y ** ** ** FIX this should be moved to a different file (javascript specific) ** XXX Maybe we could iterate? **
Js_of_ocaml compiler * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking...
03f1d95bf4a84445c1114401bda7644399341a68bc1cb830e08b095d044dc44d
futurice/haskell-futurice-prelude
Setup.hs
import Distribution.Extra.Doctest main = defaultMainWithDoctests "doctests"
null
https://raw.githubusercontent.com/futurice/haskell-futurice-prelude/56192d63bea76d06cb456c5ce4c776cf41a5cd7e/Setup.hs
haskell
import Distribution.Extra.Doctest main = defaultMainWithDoctests "doctests"
82db7289e9625c4ed6e0964ab834834fb92b9baa95a9e988e3970b525087af8b
wfnuser/sicp-solutions
e2-40.scm
(define (enumerate-interval start end) (if (<= start end) (cons start (enumerate-interval (+ start 1) end)) '() ) ) (define (accumulate op initial seq) (if (null? seq) initial (op (car seq) (accumulate op initial (cdr seq))) ) ) (define (flat-map proc seq) (accumul...
null
https://raw.githubusercontent.com/wfnuser/sicp-solutions/2c94b28d8ee004dcbfe7311f866e5a346ee01d12/ch2/e2-40.scm
scheme
(define (enumerate-interval start end) (if (<= start end) (cons start (enumerate-interval (+ start 1) end)) '() ) ) (define (accumulate op initial seq) (if (null? seq) initial (op (car seq) (accumulate op initial (cdr seq))) ) ) (define (flat-map proc seq) (accumul...
8c6607e759e8e00b0afdb50ddaef6602585703c291c40d42091f9c4f540a3f8c
dwayne/haskell-programming
Main.hs
module Main where import Control.Monad (forever) import Data.Char (toLower) import Data.Maybe (isJust) import Data.List (intersperse) import System.Exit (exitSuccess) import System.IO import System.Random (randomRIO) type WordList = [String] allWords :: IO WordList allWords = do dict <- readFile "data/dict.txt"...
null
https://raw.githubusercontent.com/dwayne/haskell-programming/d08679e76cfd39985fa2ee3cd89d55c9aedfb531/ch13/hangman/src/Main.hs
haskell
module Main where import Control.Monad (forever) import Data.Char (toLower) import Data.Maybe (isJust) import Data.List (intersperse) import System.Exit (exitSuccess) import System.IO import System.Random (randomRIO) type WordList = [String] allWords :: IO WordList allWords = do dict <- readFile "data/dict.txt"...
d4856638a6c800548a02ce2ff050534b9df326345f2304c50bb51aae0dec69db
SimulaVR/godot-haskell
VisualScriptVariableGet.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.VisualScriptVariableGet (Godot.Core.VisualScriptVari...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/VisualScriptVariableGet.hs
haskell
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.VisualScriptVariableGet (Godot.Core.VisualScriptVari...
b9e3594d72ea6403133588b29652ddd1f6511f08d3e92de16e470db9bd854215
YoshikuniJujo/funpaala
guessNumber0.hs
import Data.Maybe (fromMaybe) import Text.Read (readMaybe) import System.Random (randomRIO) getInteger :: IO Integer getInteger = fromMaybe 0 . readMaybe <$> getLine doWhile :: Monad m => m (Maybe a) -> m [a] doWhile m = do mx <- m case mx of Just x -> (x :) <$> doWhile m Nothing -> return [] main :: IO () mai...
null
https://raw.githubusercontent.com/YoshikuniJujo/funpaala/5366130826da0e6b1180992dfff94c4a634cda99/samples/39_learn_io/guessNumber0.hs
haskell
import Data.Maybe (fromMaybe) import Text.Read (readMaybe) import System.Random (randomRIO) getInteger :: IO Integer getInteger = fromMaybe 0 . readMaybe <$> getLine doWhile :: Monad m => m (Maybe a) -> m [a] doWhile m = do mx <- m case mx of Just x -> (x :) <$> doWhile m Nothing -> return [] main :: IO () mai...
5ddd03526d83f7f1ecf7fb68fb5b38d93baa060272cefeb939d727144b8cc794
inaka/katana-code
ktn_io_string.erl
-module(ktn_io_string). -export([new/1]). -export([start_link/1, init/1, loop/1, skip/2, skip/3]). -type state() :: #{buffer := string(), original := string()}. -hank([{unnecessary_function_arguments, [{skip, 3}]}]). %%------------------------------------------------------------------------------ %% API %%---------...
null
https://raw.githubusercontent.com/inaka/katana-code/a1bebae843703af8f9ddd508a5924fbf9d831886/src/ktn_io_string.erl
erlang
------------------------------------------------------------------------------ API ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Implementation of a subset of the io protocol in order to only support read...
-module(ktn_io_string). -export([new/1]). -export([start_link/1, init/1, loop/1, skip/2, skip/3]). -type state() :: #{buffer := string(), original := string()}. -hank([{unnecessary_function_arguments, [{skip, 3}]}]). -spec new(string() | binary()) -> pid(). new(Str) when is_binary(Str) -> new(binary_to_list(St...
67417b644283448809907e22b4aef3b883999b8c28801dfc90af08169f26b1ff
petelliott/raylib-guile
core-input-keys.scm
(use-modules (raylib)) (define screen-width 800) (define screen-height 450) (InitWindow screen-width screen-height "raylib [core] example - keyboard input") (define ball-position (make-Vector2 (/ screen-width 2) (/ screen-height 2))) (SetTargetFPS 60) (define (Vector2-delta! vec...
null
https://raw.githubusercontent.com/petelliott/raylib-guile/88689ffc1704d0974a5b017ff409a852c6cb7635/examples/core/core-input-keys.scm
scheme
Update Draw
(use-modules (raylib)) (define screen-width 800) (define screen-height 450) (InitWindow screen-width screen-height "raylib [core] example - keyboard input") (define ball-position (make-Vector2 (/ screen-width 2) (/ screen-height 2))) (SetTargetFPS 60) (define (Vector2-delta! vec...
b9ca68a5f1b6aedbe520fa3a92a0f64498fffc90fe796207a1330374a2b819b1
Elzair/nazghul
troll.scm
; (define (troll-display . args) ; (display (kern-get-ticks)) ; (display ":") ; (apply display args)) ; (define (troll-newline) (newline)) (define (troll-display . args) ) (define (troll-newline) ) ;;---------------------------------------------------------------------------- Troll AI ;;---------------------...
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.001/troll.scm
scheme
(define (troll-display . args) (display (kern-get-ticks)) (display ":") (apply display args)) (define (troll-newline) (newline)) ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- Given an "origin" locatio...
(define (troll-display . args) ) (define (troll-newline) ) Troll AI (define (troll-is-critical? ktroll) (< (kern-char-get-hp ktroll) troll-critical-hp)) (define (troll-wander ktroll) (troll-display "troll-wander")(troll-newline) (wander ktroll)) (define (troll-flee ktroll) (troll-display "troll-flee")(...
10d29446db29baed93444ed7a149cfc0d3db58c2759729563e818fd2c1587a7f
jkrivine/tl_interpreter
token.ml
* { e Contract } . Implements basic ERC20 - like functionality . open Tools open Env.Imp.Program (** A simple [address->int] map *) let balances = data ~pp:(MP.pp Address.pp Format.pp_print_int) "balances" (** Whoever has minting power on the token *) let owner = data ~pp:Address.pp "owner" let balance = code () let...
null
https://raw.githubusercontent.com/jkrivine/tl_interpreter/c967c6578dd4491a6930c9842a0709fbc5939496/lib/contracts/token.ml
ocaml
* A simple [address->int] map * Whoever has minting power on the token * admin only * All transfers attempt to call [on_token_receive] on the receiving contract. Ignored if method is not implemented by the contract.
* { e Contract } . Implements basic ERC20 - like functionality . open Tools open Env.Imp.Program let balances = data ~pp:(MP.pp Address.pp Format.pp_print_int) "balances" let owner = data ~pp:Address.pp "owner" let balance = code () let transfer = code () let transfer_up_to = code () let transfer_all = code () let ...
dfa5a7c1167641bd3090eba95b6613c342791013c1dcbc36a97b0b7361c204b7
chiroptical/book-of-monads
Main.hs
module Main where import Lib main :: IO () main = putStrLn "Monads for Mutability"
null
https://raw.githubusercontent.com/chiroptical/book-of-monads/c2eff1c67a8958b28cfd2001d652f8b68e7c84df/chapter8/app/Main.hs
haskell
module Main where import Lib main :: IO () main = putStrLn "Monads for Mutability"
19178161ddf7b3d7d228cc829a501d5d5676ad29e67dffc8938ee1250642c140
tonyg/kali-scheme
pattern.scm
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1998 by NEC Research Institute , Inc. See file COPYING . ;(define (simplify-subtract call) ; (simplify-args call 0) ; ((pattern-simplifier ; ((- 'a 'b) '(- a b)) ; constant folding ; ((- x 'a) (+ '(- 0 a) x)) ; c...
null
https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/ps-compiler/simp/pattern.scm
scheme
(define (simplify-subtract call) (simplify-args call 0) ((pattern-simplifier ((- 'a 'b) '(- a b)) ; constant folding ((- x 'a) (+ '(- 0 a) x)) ; convert to a normal form ((- 'a (+ 'b x)) (- '(- a b) x)) ; merging constants ((- 'a (- 'b x)) (+ x '(- a b))) ...
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1998 by NEC Research Institute , Inc. See file COPYING . same primop . If the boolean - expression is present it is evaluated after ( x ... ) matches a call to 5 matches the literal 5 (define (make-pattern-simplifier specs) (set! ...
d8425c6ef9a4dfe2c0ad5d718e1b85c9ed24c5c50579ab8fbdf9d8a6b67a8718
epgsql/epgsql
epgsql_cmd_describe_statement.erl
%% @doc Asks server to provide input parameter and result rows information. %% %% Almost the same as {@link epgsql_cmd_parse}. %% %% ``` %% > Describe(STATEMENT) %% < ParameterDescription %% < RowDescription | NoData %% ''' -module(epgsql_cmd_describe_statement). -behaviour(epgsql_command). -export([init/1, execute/2, ...
null
https://raw.githubusercontent.com/epgsql/epgsql/f811a09926892dbd1359afe44a9bfa8f6907b322/src/commands/epgsql_cmd_describe_statement.erl
erlang
@doc Asks server to provide input parameter and result rows information. Almost the same as {@link epgsql_cmd_parse}. ``` > Describe(STATEMENT) < ParameterDescription < RowDescription | NoData '''
-module(epgsql_cmd_describe_statement). -behaviour(epgsql_command). -export([init/1, execute/2, handle_message/4]). -export_type([response/0]). -include("epgsql.hrl"). -include("protocol.hrl"). -type response() :: {ok, #statement{}} | {error, epgsql:query_error()}. -record(desc_stmt, {name :: iodata(), ...
9fedea90bcb2d16373e90a3a58ee9504b7965df637230efcbce5e40997de79fe
yetanalytics/dl4clj
optimize_tests.clj
(ns dl4clj.optimize-tests (:require [dl4clj.optimize.listeners :refer :all] [dl4clj.optimize.api.listeners :refer :all] [clojure.test :refer :all]) (:import [org.deeplearning4j.optimize.api IterationListener] [org.deeplearning4j.datasets.iterator.impl MnistDataSetIterator])) ;;;;...
null
https://raw.githubusercontent.com/yetanalytics/dl4clj/9ef055b2a460f1a6246733713136b981fd322510/test/dl4clj/optimize_tests.clj
clojure
objects that I need for testing testing the creation of listeners -summary.html
(ns dl4clj.optimize-tests (:require [dl4clj.optimize.listeners :refer :all] [dl4clj.optimize.api.listeners :refer :all] [clojure.test :refer :all]) (:import [org.deeplearning4j.optimize.api IterationListener] [org.deeplearning4j.datasets.iterator.impl MnistDataSetIterator])) (de...
53814306c987a4fca1b35b4173539f9f1f4107eb957cea3b4a9dfb1cf22071bf
DavidAlphaFox/RabbitMQ
rabbit_ws_test_all.erl
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in %% compliance with the License. You may obtain a copy of the License at %% / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITH...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-web-stomp/test/src/rabbit_ws_test_all.erl
erlang
compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
The contents of this file are subject to the Mozilla 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 " The Original Code is RabbitMQ Management Console . The Initial Developer of the Original Cod...
5b006746cbdf1b8143e04dfd62140b9145c5db7a989a8473c6e0b4b0f66540d7
alsonkemp/turbinado
HelloWorld.hs
module App.Controllers.HelloWorld where import Turbinado.Controller index :: Controller () index = do setViewDataValue "sample_value" "smarfle!"
null
https://raw.githubusercontent.com/alsonkemp/turbinado/da2ba7c3443ddf6a51d1ec5b05cb45a85efc0809/App/Controllers/HelloWorld.hs
haskell
module App.Controllers.HelloWorld where import Turbinado.Controller index :: Controller () index = do setViewDataValue "sample_value" "smarfle!"
e5915b46d641acdf7c3f816708f2639c22ca6207bc0c7b725ffcebe828034504
tsoding/HyperNerd
LogTest.hs
module Bot.LogTest ( spec ) where import Bot.Log (secondsAsBackwardsDiff) import Data.Time.Clock (NominalDiffTime) import Test.HUnit testSecondsAsBackwardsDiff :: Test testSecondsAsBackwardsDiff = TestLabel "Default Scenario" $ TestCase $ assertEqual "Unexpected value after conversion" expected actual where...
null
https://raw.githubusercontent.com/tsoding/HyperNerd/5322580483c5c05179bc455a6f94566d398bccdf/test/Bot/LogTest.hs
haskell
module Bot.LogTest ( spec ) where import Bot.Log (secondsAsBackwardsDiff) import Data.Time.Clock (NominalDiffTime) import Test.HUnit testSecondsAsBackwardsDiff :: Test testSecondsAsBackwardsDiff = TestLabel "Default Scenario" $ TestCase $ assertEqual "Unexpected value after conversion" expected actual where...
13ad2e674b604b2923604436ae06198fa6eae31aafe295927779dc6f4920c1a5
jorinvo/googlesheets-sql-sync
project.clj
(defproject googlesheets-sql-sync "0.7.0" :description "Keep your SQL database in sync with Google Sheets" :url "-sql-sync" :license {:name "MIT" :url ""} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/core.async "0.4.474"] [org.clojure/java.jdbc "0.7.8"]...
null
https://raw.githubusercontent.com/jorinvo/googlesheets-sql-sync/b9fb4c8d7fba36859d4225140778e465142be180/project.clj
clojure
(defproject googlesheets-sql-sync "0.7.0" :description "Keep your SQL database in sync with Google Sheets" :url "-sql-sync" :license {:name "MIT" :url ""} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/core.async "0.4.474"] [org.clojure/java.jdbc "0.7.8"]...
0c757c196dc117f5a8d72707df790b0089fb0e508da62b82cd461442aec47f51
LeifAndersen/racket-compiler2
components.rkt
#lang racket (require (except-in nanopass/base define-language define-pass) (rename-in nanopass/base [define-language nanopass:define-language] [define-pass nanopass:define-pass]) racket/splicing rackunit ...
null
https://raw.githubusercontent.com/LeifAndersen/racket-compiler2/ebd40c81621f6e4012fc72c838cd8e4ad1d8a266/private/components.rkt
racket
Representation of a compiler component Add a compiler pass to a component (to be used by define-compiler) (Adds back to front) Key object to be used in variable properties table Adds a property to a variable. Returns a key that must be used to get property out again. Variable Any -> Key Updates the propert...
#lang racket (require (except-in nanopass/base define-language define-pass) (rename-in nanopass/base [define-language nanopass:define-language] [define-pass nanopass:define-pass]) racket/splicing rackunit ...
1351fb4a92c0fddeae3f2a5f060f2dc68557d70198c239c15cccf10dde1e79cb
3b/3bgl-misc
resource-manager.lisp
(in-package 3bgl-sg2) (defparameter +globals-binding+ 0) (defparameter +materials-binding+ 1) (defparameter +per-object-binding+ 2) (defvar *globals-program* '3bgl-sg2-shaders-common::common-vertex) (defparameter *no* 0) (defparameter *draws* 0) (defparameter *objects* 0) (defparameter *once* t) (defvar *timing-help...
null
https://raw.githubusercontent.com/3b/3bgl-misc/e3bf2781d603feb6b44e5c4ec20f06225648ffd9/scenegraph2/resource-manager.lisp
lisp
buffers is indexed by a 'vertex format' as created by buffer-builder::vertex-format-for-layout, values are buffer-set objects corresponding to layout. (interned) material -> list (vector?) of things to draw globals + per-object data multi-draw-indirect command lists make sure we don't have any old texture handle...
(in-package 3bgl-sg2) (defparameter +globals-binding+ 0) (defparameter +materials-binding+ 1) (defparameter +per-object-binding+ 2) (defvar *globals-program* '3bgl-sg2-shaders-common::common-vertex) (defparameter *no* 0) (defparameter *draws* 0) (defparameter *objects* 0) (defparameter *once* t) (defvar *timing-help...
dea5d3b20b62d6bfd518ce24c63d5795316b0d724294af3189d33de8cba65f10
capsjac/opengles
Internal.hs
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # # LANGUAGE ScopedTypeVariables # module Graphics.OpenGLES.Internal where import Control.Applicative import Control.Monad import Control.Concurrent.Chan import Control.Future impo...
null
https://raw.githubusercontent.com/capsjac/opengles/23b78e5d1b058349a778a49310d867164ea1a529/src/Graphics/OpenGLES/Internal.hs
haskell
* Internal glRestoreLostObjects :: GL () saveBuffer :: Buffer -> IO () addCompiledProgramResources ** Logging ** GL Error putStrLn location -- tmp ** GL Object management addToGLOMS ref XXX check whether context is valud or not ** Types 2.0 2.0 OpenGL ** Buffer Buffer usage id (latestArray or length) **...
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FunctionalDependencies # # LANGUAGE ScopedTypeVariables # module Graphics.OpenGLES.Internal where import Control.Applicative import Control.Monad import Control.Concurrent.Chan import Control.Future impo...
64ed5d8462394fc25a572a3d76f4d4ecab92ed1b357cc1e28f5281688719bc16
input-output-hk/plutus-apps
Helpers.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # Not using all CardanoEra module PlutusScripts.Helpers where import Cardano.Api qualified as C import Cardano.Api.Shelley qualified as C import Codec.Serialise (serialise) import Data.ByteString qualified as B...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/f54eca87a81a67a86fbadae4bb32682d59f4ea02/plutus-e2e-tests/test/PlutusScripts/Helpers.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE OverloadedStrings # | Treat string of hexidecimal bytes literally, without encoding. Useful for hashes. Useful when exunits are automatically balanced. either script or reference to script V2 reference script Witness token mint with explicit execution units. Used whe...
# LANGUAGE ScopedTypeVariables # Not using all CardanoEra module PlutusScripts.Helpers where import Cardano.Api qualified as C import Cardano.Api.Shelley qualified as C import Codec.Serialise (serialise) import Data.ByteString qualified as BS (ByteString) import Data.ByteString.Lazy qualified as LBS import Data.By...
35b629421bdfd064ff6760afdb1658d7f1a682e721cffbb254de40c63e92a58d
tonyg/kali-scheme
pipe.scm
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING . Scheme analogues of popen ( ) and pclose ( ) library calls . (define (call-with-mumble-pipe input?) (lambda (command proc) (call-with-values pipe (lambda (pipe-for-read pipe-for-wri...
null
https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/misc/pipe.scm
scheme
(write `(pid = ,pid)) (newline) (display "Waiting.") (newline) (write `(status = ,status)) (newline)
Copyright ( c ) 1993 , 1994 by and . Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING . Scheme analogues of popen ( ) and pclose ( ) library calls . (define (call-with-mumble-pipe input?) (lambda (command proc) (call-with-values pipe (lambda (pipe-for-read pipe-for-wri...
1fbaeb6ea22d5c5d84265bdbcacf2df5418b14878a0956697b74d37543cc20aa
jeromesimeon/Galax
norm_overloaded.ml
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/normalization/norm_overloaded.ml
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : norm_overloaded.ml , v 1.10 2007/05/21 20:22:40 mff Exp $ Module : Norm_overloaded Description : This modules implements some support for built - in overloaded functions in XQuery 1.0 and XPath 2.0 . Descri...
0bc25300b8abd029258f022360f1f2c3fc0d2a190e020754bf4287410ffb38bb
vouch-opensource/krell
watcher.clj
(ns krell.watcher (:import [io.methvin.watcher DirectoryChangeEvent DirectoryChangeEvent$EventType DirectoryChangeListener DirectoryWatcher] [java.nio.file Paths] [org.slf4j LoggerFactory])) (def logger (LoggerFactory/getLogger "krell")) (defn fn->listener ^Direc...
null
https://raw.githubusercontent.com/vouch-opensource/krell/61546493f3891d5603f3d2fbd03662230e9e6ee6/src/krell/watcher.clj
clojure
(ns krell.watcher (:import [io.methvin.watcher DirectoryChangeEvent DirectoryChangeEvent$EventType DirectoryChangeListener DirectoryWatcher] [java.nio.file Paths] [org.slf4j LoggerFactory])) (def logger (LoggerFactory/getLogger "krell")) (defn fn->listener ^Direc...
49fc2d23e30e3b43450597dd22b038df89c77a5cc2832d031a15e1474b88279c
jcollard/unm-hip
Boxed.hs
The University of New Mexico 's Haskell Image Processing Library Copyright ( C ) 2013 -- -- 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 , ...
null
https://raw.githubusercontent.com/jcollard/unm-hip/15684cc0a4f187b718b942b77ae08802bf195b02/Data/Image/Boxed.hs
haskell
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program 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 ...
The University of New Mexico 's Haskell Image Processing Library Copyright ( C ) 2013 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 # L...
0a374b05e8533d6c9961f9673721353fa900850e89a053a9e734b6bdbdbf3913
jordanthayer/ocaml-search
das_rewrite.ml
* @author @since 2011 - 07 - 11 A Reimplementation of the DAS framework that first proposed back in ' 08 , that did n't actually get published until the SoCS 2011 paper Deadline Aware Search using Measurements of Search Behavior , Dionne , Thayer , Ruml @author jordan @since 20...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/deadline/das_rewrite.ml
ocaml
float so it can be time or exp count Comparitors utils * 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...
* @author @since 2011 - 07 - 11 A Reimplementation of the DAS framework that first proposed back in ' 08 , that did n't actually get published until the SoCS 2011 paper Deadline Aware Search using Measurements of Search Behavior , Dionne , Thayer , Ruml @author jordan @since 20...
e0a955a62c528d93a0e0206ebaa2eab387d554bc108c24e6f3f53194dd1a4a32
locusmath/locus
object.clj
(ns locus.set.tree.chain.core.object (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.mapping.general.core.object :refe...
null
https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/set/tree/chain/core/object.clj
clojure
ordered pairs of composable functions are a special case. In more advanced applications, over finite chain total orders. Get an nth set starting from the source Get the parent topos of a chain copresheaf Get the composition of a chain copresheaf Compose components in the chain copresheaf Create an inclusion chai...
(ns locus.set.tree.chain.core.object (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.mapping.general.core.object :refe...
efd551c655f2ade89f6ac514bb0927ed28e871d2ae21aa4174e2b4ef93fd53ca
Copilot-Language/copilot
Core.hs
{-# LANGUAGE Safe #-} -- | -- Description: Intermediate representation for Copilot specifications. Copyright : ( c ) 2011 National Institute of Aerospace / Galois , Inc. -- -- The following articles might also be useful: -- * Carette , and Kiselyov , and , , -- \"/Finally tagless, partially evaluated: Tag...
null
https://raw.githubusercontent.com/Copilot-Language/copilot/c981e3160f22d0f7438cf691a040185674de583a/copilot-core/src/Copilot/Core.hs
haskell
# LANGUAGE Safe # | Description: Intermediate representation for Copilot specifications. The following articles might also be useful: \"/Finally tagless, partially evaluated: Tagless staged/ /interpreters for simpler typed languages/\", For examples of how to traverse a Copilot specification see the source c...
Copyright : ( c ) 2011 National Institute of Aerospace / Galois , Inc. * Carette , and Kiselyov , and , , Journal of Functional Programming vol . 19 , p. 509 - 543 , 2009 . * , and , , \"/Type - Safe Code Transformations in " , Electronic Notes in Theoretical Computer Science vol . 174 , p....
61bca3494f86f31362fdca3c3d733777173ed4a438671263e390af61d3d46a13
as-capabl/armageddon
IORefRunner.hs
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # module Control.Arrow.Machine.IORefRunner where import Control.Monad.Trans.Control import Control.Monad.Base import qualified Control.Arrow.Machine.World as Mc import Data.IORef data IORefRunn...
null
https://raw.githubusercontent.com/as-capabl/armageddon/f9724b7a545f7e66931d2a46732402a67a59a03e/machinecell-extra/src/Control/Arrow/Machine/IORefRunner.hs
haskell
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # module Control.Arrow.Machine.IORefRunner where import Control.Monad.Trans.Control import Control.Monad.Base import qualified Control.Arrow.Machine.World as Mc import Data.IORef data IORefRunn...