_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
f07dd5a29ee5c4c5f08a23155d5094471547c7894ea77fbf3adda583aedc9865
avatar29A/hs-aitubots-api
DeleteGroupAvatar.hs
# LANGUAGE RecordWildCards # # LANGUAGE DuplicateRecordFields # {-# LANGUAGE OverloadedStrings #-} module Aitu.Bot.Commands.DeleteGroupAvatar ( DeleteGroupAvatar(..) ) where import Data.Aeson import Data.Maybe import Data.Text import Data.UUID.Types import Ai...
null
https://raw.githubusercontent.com/avatar29A/hs-aitubots-api/9cc3fd1e4e9e81491628741a6bbb68afbb85704e/src/Aitu/Bot/Commands/DeleteGroupAvatar.hs
haskell
# LANGUAGE OverloadedStrings # doc: -api-contract/DeleteGroupAvatar.html
# LANGUAGE RecordWildCards # # LANGUAGE DuplicateRecordFields # module Aitu.Bot.Commands.DeleteGroupAvatar ( DeleteGroupAvatar(..) ) where import Data.Aeson import Data.Maybe import Data.Text import Data.UUID.Types import Aitu.Bot.Types.Peer ( Peer...
bcaa2c6bcf730369a230410918ebdee017d1ec2e32038f04e4056fc2b3d998d6
caribou/caribou-core
field.clj
(ns caribou.field (:require [caribou.db :as db] [caribou.util :as util] [caribou.config :as config] [caribou.logger :as log] [caribou.db.adapter.protocol :as adapter])) (defprotocol Field "a protocol for expected behavior of all model fields" (table-additions [this...
null
https://raw.githubusercontent.com/caribou/caribou-core/6ebd9db4e14cddb1d6b4e152e771e016fa9c55f6/src/caribou/field.clj
clojure
functions for localized fields #(let [value (adapter/text-value (config/draw :database :adapter) %)] (if (and value (not (empty? value))) (read-string value))))))
(ns caribou.field (:require [caribou.db :as db] [caribou.util :as util] [caribou.config :as config] [caribou.logger :as log] [caribou.db.adapter.protocol :as adapter])) (defprotocol Field "a protocol for expected behavior of all model fields" (table-additions [this...
e60836446de93b8315ccb05a649cb648d691a98ab4ede532e42d24ee03c89f34
khigia/eocarve
gradientHist.ml
* seamcarve , content - aware image resizing using seam carving * Copyright ( C ) 2007 < > * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ; either * version 2.1...
null
https://raw.githubusercontent.com/khigia/eocarve/8a5f65b8175b27bfc0d792719485b5d31b72760a/seamcarve/_darcs/pristine/gradientHist.ml
ocaml
* seamcarve , content - aware image resizing using seam carving * Copyright ( C ) 2007 < > * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ; either * version 2.1...
caab1d32837c43461974f43ab8fc1462f641a1e2fbaffdf79c0855ac498f9e68
aztek/tptp
Pretty.hs
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE CPP # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleInstances # -- | -- Module : Data.TPTP.Pretty -- Description : Pretty printers for the TPTP language. Copyright : ( c ) , 2019 - 2021 -- License : GPL-3 Maintainer ...
null
https://raw.githubusercontent.com/aztek/tptp/7b850b5680debcf2f9245a328102c4aadcb6da2c/src/Data/TPTP/Pretty.hs
haskell
# LANGUAGE OverloadedStrings # | Module : Data.TPTP.Pretty Description : Pretty printers for the TPTP language. License : GPL-3 Stability : experimental * Helper functions * Names * Sorts and types TPTP v7.3.0.0 doesn't allow for wrapping atom in parentesis in a negated atom in CNF formulas. I...
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE CPP # # LANGUAGE LambdaCase # # LANGUAGE FlexibleInstances # Copyright : ( c ) , 2019 - 2021 Maintainer : module Data.TPTP.Pretty ( Pretty(..) ) where #if !MIN_VERSION_base(4, 8, 0) import Data.Foldable (Foldable) import Data.Functor ((<$>)) import Dat...
0851c0e5459272e0718fe6c2b663ddee7e649039f31f82b4167390880ab3cafa
narkisr-deprecated/core
model.clj
(comment re-core, Copyright 2012 Ronen Narkis, narkisr.com 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 distri...
null
https://raw.githubusercontent.com/narkisr-deprecated/core/85b4a768ef4b3a4eae86695bce36d270dd51dbae/src/openstack/model.clj
clojure
(comment re-core, Copyright 2012 Ronen Narkis, narkisr.com 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 distri...
c4f9178c0300ab32b6f5688b5e74d28fdcefdf113533eb32c44ae5312eaafa5c
TerrorJack/ghc-alter
hGetBuf002.hs
import System.IO import Foreign import Foreign.C main = do test True; test False test blocking = do h <- openBinaryFile "hGetBuf002.hs" ReadMode let sz = 42 loop = do b <- allocaBytes sz $ \ptr -> do r <- (if blocking then hGetBuf else hGetBufNonBlocking) h ptr sz i...
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/hGetBuf002.hs
haskell
tail call
import System.IO import Foreign import Foreign.C main = do test True; test False test blocking = do h <- openBinaryFile "hGetBuf002.hs" ReadMode let sz = 42 loop = do b <- allocaBytes sz $ \ptr -> do r <- (if blocking then hGetBuf else hGetBufNonBlocking) h ptr sz i...
606052b1ef2b6aee569b0b9bf8930a02668a4af37a6ccefb0913c9a00c9cd7c7
processone/tsung
ts_test_stats.erl
%%%------------------------------------------------------------------- %%% File : ts_test_stats.erl Author : < > %%% Description : %%% Created : 12 Jul 2011 by < > %%%------------------------------------------------------------------- -module(ts_test_stats). -compile(export_all). -include_lib("eunit/in...
null
https://raw.githubusercontent.com/processone/tsung/e9babe2acfb4298e3b51bd56886561b052979884/src/test/ts_test_stats.erl
erlang
------------------------------------------------------------------- File : ts_test_stats.erl Description : -------------------------------------------------------------------
Author : < > Created : 12 Jul 2011 by < > -module(ts_test_stats). -compile(export_all). -include_lib("eunit/include/eunit.hrl"). -include_lib("ts_profile.hrl"). -include_lib("ts_config.hrl"). set_dynvar_random_test() -> Min=1, Max=10, R=lists:map(fun(_)->ts_stats:uniform(Min,Max) end, lists:s...
8d337fa27514c6fb4fd3a847984038ad4a5ac10f7d51b092b2f40b36179eef78
ofmooseandmen/Aeromess
Parser.hs
# LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn - orphans # -- | Aeromess Parser . -- Allows to abstract away the choice of the underlying parser library ( e.g. Parsec or MegaParsec ) . module Data.Aeromess.Parser ( Error(message, column) , Parser , (<|>) , betwee...
null
https://raw.githubusercontent.com/ofmooseandmen/Aeromess/765f3ea10073993e43c71b6b6955b9f0d234a4ef/src/Data/Aeromess/Parser.hs
haskell
| Allows to abstract away the choice of the underlying parser | Parsing error. | Parser. | Parses @p@ between given characters. | Parses given char. | Parses a '-' character | Parses an enum representation. Returns the parsed value. The parsing is done in a greedy fashion by sorting the list of values by reve...
# LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn - orphans # Aeromess Parser . library ( e.g. Parsec or MegaParsec ) . module Data.Aeromess.Parser ( Error(message, column) , Parser , (<|>) , between , char , choice , dash , enumeration , identif...
f5b11ca418dce21d55d5f4dc67b602a41ab2d3a47e9604b80bd47d8b4518f529
aryx/xix
digest.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/lib_core/unused/digest.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . $ I d : digest.ml , v 1.3 1997/04/11 13:57:48 xleroy Exp $ type t = string external unsafe_string: string -...
0e573d0a41f70c32d3eb366da5251024d76980d971162ac9004a3c2f3a9df851
schibsted/spid-tech-docs
enlive.clj
(ns spid-docs.enlive "Enlive is a templating toolkit that offer very cool things like document transformations based on selections. Unfortunately, it's API is notoriously hard to work with, so this little wrapper presents the things we use in a more digestable way." (:require [hiccup.core :as hiccup] ...
null
https://raw.githubusercontent.com/schibsted/spid-tech-docs/ee6a4394e9732572e97fc3a55506b2d6b9a9fe2b/src/spid_docs/enlive.clj
clojure
(ns spid-docs.enlive "Enlive is a templating toolkit that offer very cool things like document transformations based on selections. Unfortunately, it's API is notoriously hard to work with, so this little wrapper presents the things we use in a more digestable way." (:require [hiccup.core :as hiccup] ...
822b82a8cc175f5a5e19eb602c100484c65d262670caf2b4777df12855e41acc
dimitri/pgcharts
front-main.lisp
(in-package #:pgcharts) ;;; ;;; Main dashboard ;;; (defun list-queries (query-list &key (title "Queries")) "Return a whole web page for the QUERY-LIST." (serve-page (with-html-output-to-string (s) (htm (:div :class "col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" (:h1 :class "pag...
null
https://raw.githubusercontent.com/dimitri/pgcharts/9b9549c53cca77039e8aaca18bce939ecb2b6549/src/front-main.lisp
lisp
Main dashboard
(in-package #:pgcharts) (defun list-queries (query-list &key (title "Queries")) "Return a whole web page for the QUERY-LIST." (serve-page (with-html-output-to-string (s) (htm (:div :class "col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main" (:h1 :class "page-header" (str title)) ...
efc1e348158a9c36ee16347e7931a8475688a01d26a69fe3a43ef288bd370b42
HealthSamurai/igpop
inline_parser.clj
(ns igpop.inline-parser (:require [clojure.string :as str])) (def inline-type-regex [[:map #"^\s*\{"] [:coll #"^\s*\["] [:str-q #"^\s*'"] [:str-dq #"^\s*\""] [:true #"^\s*true"] [:false #"^\s*false"] [:null #"^\s*null"] [:num #"\s*\d+\.\d*"] [:int #"\s*\d+"]]) (defmulti read-inline (fn ...
null
https://raw.githubusercontent.com/HealthSamurai/igpop/d4e6f6100b78c20a1706add125e90ff7d912e3d4/src/igpop/inline_parser.clj
clojure
(ns igpop.inline-parser (:require [clojure.string :as str])) (def inline-type-regex [[:map #"^\s*\{"] [:coll #"^\s*\["] [:str-q #"^\s*'"] [:str-dq #"^\s*\""] [:true #"^\s*true"] [:false #"^\s*false"] [:null #"^\s*null"] [:num #"\s*\d+\.\d*"] [:int #"\s*\d+"]]) (defmulti read-inline (fn ...
3823ea921288913240eb325f162e86212165d83283515cf003278fac0eb02f4d
IvanMartinez/oauth2_webmachine
owner_token.erl
@author 2013 author . %% @doc Implements RFC6749 4.3 Resource Owner Password Credentials Grant. Distributed under the terms and conditions of the Apache 2.0 license . -module(owner_token). -export([init/1, allowed_methods/2, malformed_request/2, process_post/2]). -include_lib("webm...
null
https://raw.githubusercontent.com/IvanMartinez/oauth2_webmachine/d4b358167bdb2129989a4bec71753ab75044ad69/src/resources/owner_token.erl
erlang
@doc Implements RFC6749 4.3 Resource Owner Password Credentials Grant. ==================================================================== API functions ====================================================================
@author 2013 author . Distributed under the terms and conditions of the Apache 2.0 license . -module(owner_token). -export([init/1, allowed_methods/2, malformed_request/2, process_post/2]). -include_lib("webmachine/include/webmachine.hrl"). -record(request, {grant_type :: a...
a1336e7b5e9205a652112ed35d9d453cdc5dabb0674c25f9bc0a2e3ce0acfe57
TempusMUD/cl-tempus
test-magic.lisp
(in-package #:tempus.tests) (defsuite (tempus.magic :in test)) (in-suite tempus.magic) (deftest mag-savingthrow/wizard/makes-save () (with-fixtures ((alice mock-player)) (setf (tempus::level-of alice) (1+ tempus::+lvl-god+)) (is (tempus::mag-savingthrow alice 50 tempus::+saving-para+)))) (deftest mag-savin...
null
https://raw.githubusercontent.com/TempusMUD/cl-tempus/c5008c8d782ba44373d89b77c23abaefec3aa6ff/tests/test-magic.lisp
lisp
(in-package #:tempus.tests) (defsuite (tempus.magic :in test)) (in-suite tempus.magic) (deftest mag-savingthrow/wizard/makes-save () (with-fixtures ((alice mock-player)) (setf (tempus::level-of alice) (1+ tempus::+lvl-god+)) (is (tempus::mag-savingthrow alice 50 tempus::+saving-para+)))) (deftest mag-savin...
c68bbfcf6c054c61a9a99dda9fbdbc6177b255ff9b3c0d15baa40a6469e5a757
folq/elm-syntax
Type.hs
# language DeriveFoldable # {-# language DeriveFunctor #-} {-# language DeriveTraversable #-} {-# language OverloadedStrings #-} # language TemplateHaskell # module Language.Elm.Type where import Control.Monad import Data.Bifunctor import Data.Eq.Deriving (deriveEq1) import Data.Foldable import Data.Ord.Deriving (deri...
null
https://raw.githubusercontent.com/folq/elm-syntax/a38ac159c7c0eb7028e06c2982237bd2930623ac/src/Language/Elm/Type.hs
haskell
# language DeriveFunctor # # language DeriveTraversable # # language OverloadedStrings #
# language DeriveFoldable # # language TemplateHaskell # module Language.Elm.Type where import Control.Monad import Data.Bifunctor import Data.Eq.Deriving (deriveEq1) import Data.Foldable import Data.Ord.Deriving (deriveOrd1) import Data.String import Text.Show.Deriving (deriveShow1) import qualified Language.Elm.Nam...
ce7fea83ea621f0a71e55544ae60c80ba8c73c58c5ebff6cc881187e3f0b8c9c
CSCfi/rems
export_applications.cljs
(ns rems.administration.export-applications "Page for exporting applications." (:require [re-frame.core :as rf] [rems.administration.administration :as administration] [rems.atoms :as atoms] [rems.collapsible :as collapsible] [rems.dropdown :as dropdown] [...
null
https://raw.githubusercontent.com/CSCfi/rems/644ef6df4518b8e382cdfeadd7719e29508a26f0/src/cljs/rems/administration/export_applications.cljs
clojure
(ns rems.administration.export-applications "Page for exporting applications." (:require [re-frame.core :as rf] [rems.administration.administration :as administration] [rems.atoms :as atoms] [rems.collapsible :as collapsible] [rems.dropdown :as dropdown] [...
67ea324f3dc7c96c808495d03ad82e57ecf584aa3db175c75c45572d47120395
uim/uim
ustr.scm
ustr.scm : logical order string of abstract elements ;;; Copyright ( c ) 2003 - 2013 uim Project ;;; ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: 1 . Redistributions of sourc...
null
https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/ustr.scm
scheme
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer in the documen...
ustr.scm : logical order string of abstract elements Copyright ( c ) 2003 - 2013 uim Project 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . Neither the name of authors nor the names of its contributors THIS SOFTWA...
e40f2266f72ab6f8aeb952bb6d89e9a220cdb94c00532f92b6b4303b1fe76230
racket/racket7
collection.rkt
#lang racket/base (require racket/private/check racket/private/config "parameter.rkt" ;; Avoid keyword-argument variant: (only-in '#%kernel directory-list)) (provide collection-path collection-file-path find-library-collection-paths find-library-collection...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/eval/collection.rkt
racket
Avoid keyword-argument variant: If we get here, then something is configured wrong, and making up paths relative to the current directory is not great --- but we have to come up with some path at this point. `#f' means `current-library-collection-paths': user-specific installation-wide: map from link-file name...
#lang racket/base (require racket/private/check racket/private/config "parameter.rkt" (only-in '#%kernel directory-list)) (provide collection-path collection-file-path find-library-collection-paths find-library-collection-links find-col-file) (define (re...
74a479011f19b485bd4f75f5e2aa6fb2d657340d9c6909a291643d7556380ddb
elginer/Delve
VMASTCompiler.hs
The Delve Programming Language Copyright 2009 Distributed under the terms of the GNU General Public License v3 , or ( at your option ) any later version . This file is part of Delve . Delve is free software : you can redistribute it and/or modify it under the terms of the GNU Ge...
null
https://raw.githubusercontent.com/elginer/Delve/997c25d2c43ac3ab06f7d70304a59f4a8d5f9670/src/VMASTCompiler.hs
haskell
# OPTIONS -XTypeFamilies -XEmptyDataDecls -XMultiParamTypeClasses -XTypeSynonymInstances -XFlexibleInstances -XFlexibleContexts -XUndecidableInstances # some effort should go into uniting them into one general backend - However, a lot of th...
The Delve Programming Language Copyright 2009 Distributed under the terms of the GNU General Public License v3 , or ( at your option ) any later version . This file is part of Delve . Delve is free software : you can redistribute it and/or modify it under the terms of the GNU Ge...
2bf48ce54ab276806e5720fa2507532f960ce33515684d488ac33b30b5fcd74f
runtimeverification/haskell-backend
Interpreter.hs
module Test.Kore.Repl.Interpreter ( test_replInterpreter, ) where import Control.Concurrent.MVar import Control.Lens qualified as Lens import Control.Monad.Reader ( runReaderT, ) import Control.Monad.Trans.State.Strict ( evalStateT, runStateT, ) import Data.Coerce ( coerce, ) import Data.Generic...
null
https://raw.githubusercontent.com/runtimeverification/haskell-backend/74bc7a963a825d0f0f034b5d3412dc59448e51bb/kore/test/Test/Kore/Repl/Interpreter.hs
haskell
module Test.Kore.Repl.Interpreter ( test_replInterpreter, ) where import Control.Concurrent.MVar import Control.Lens qualified as Lens import Control.Monad.Reader ( runReaderT, ) import Control.Monad.Trans.State.Strict ( evalStateT, runStateT, ) import Data.Coerce ( coerce, ) import Data.Generic...
ee45e75d87be8cf655a07715af825c430f224420b1a299683ed7b075ac567da5
dmoverton/finite-domain
SendMoreMoney.hs
module SendMoreMoney (sendMoreMoney) where import Control.Monad (guard) import FD sendMoreMoney = runFD $ do vars@[s, e, n, d, m, o, r, y] <- news 8 (0, 9) s #\= 0 m #\= 0 allDifferent vars 1000 * s + 100 * e + 10 * n + d + 1000 * m + 100 * o + 10 * r + e #== 10000 * m + 1000 * o + ...
null
https://raw.githubusercontent.com/dmoverton/finite-domain/65373e30aa3f72031bd41d19ebf9684bfa1e01f0/src/SendMoreMoney.hs
haskell
module SendMoreMoney (sendMoreMoney) where import Control.Monad (guard) import FD sendMoreMoney = runFD $ do vars@[s, e, n, d, m, o, r, y] <- news 8 (0, 9) s #\= 0 m #\= 0 allDifferent vars 1000 * s + 100 * e + 10 * n + d + 1000 * m + 100 * o + 10 * r + e #== 10000 * m + 1000 * o + ...
b13e4a707cdac6ff0c6b6025c24dd370106b399c1a6ef9c660b98a62ba20cfa3
webyrd/n-grams-for-synthesis
infer-core-ml-curried.scm
Type inferencer for ML - ish language , based on joint work with Kanae Tsushima . ;; Simplified, curried, ML-like language: ;; ;; * curried lambda/application ;; * 'cons', but no 'list' ;; * update expert-ordering alist to match expert ordering of simple-typed.rkt (define (bool-!-o expr gamma type) (conde ((=...
null
https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/infer-core-ml-curried.scm
scheme
Simplified, curried, ML-like language: * curried lambda/application * 'cons', but no 'list' * update expert-ordering alist to match expert ordering of simple-typed.rkt our letrec is polymorphic Make sure the right-hand-side of the polymorphic 'letrec' binding has a type, but then forget about the type. Curried...
Type inferencer for ML - ish language , based on joint work with Kanae Tsushima . (define (bool-!-o expr gamma type) (conde ((== #t expr) (== 'bool type)) ((== #f expr) (== 'bool type)))) (define (num-!-o expr gamma type) (fresh () (numbero expr) (== 'int type))) (define (nil-!-o expr gamma ty...
d896fde4f31c567c6c3f67e4ec7c23b7ce95127cf08a16e8a9b7d74bacd205d5
ddellacosta/om-cookbook
core.cljs
(ns complex-selection.core (:require-macros [cljs.core.async.macros :refer [go]]) (:require [om.core :as om :include-macros true] [sablono.core :as html :refer [html] :include-macros true] [cljs.core.async :as async :refer [>! <! put! chan]])) (enable-console-print!) (defn element [element owner {:k...
null
https://raw.githubusercontent.com/ddellacosta/om-cookbook/fa123884c7d3023e2b4832d69bc69d9a9abacec7/complex-selection/src/core.cljs
clojure
(ns complex-selection.core (:require-macros [cljs.core.async.macros :refer [go]]) (:require [om.core :as om :include-macros true] [sablono.core :as html :refer [html] :include-macros true] [cljs.core.async :as async :refer [>! <! put! chan]])) (enable-console-print!) (defn element [element owner {:k...
1d0a0dfd36fb581bc0e801a80f8062210a4c7af1ae44f2c0530225423958eeef
art-w/deque
dequeue_internal.ml
type ('a, 'color) buffer = | B0 : ('a, [`red ]) buffer | B1 : 'a -> ('a, [`yellow]) buffer | B2 : 'a * 'a -> ('a, [< `green | `yellow]) buffer | B3 : 'a * 'a * 'a -> ('a, [< `green | `yellow]) buffer | B4 : 'a * 'a * 'a * 'a -> ('a,...
null
https://raw.githubusercontent.com/art-w/deque/20d3cfafa93b73c9f7ee20c230dc3e1b3f86956e/src/dequeue_internal.ml
ocaml
type ('a, 'color) buffer = | B0 : ('a, [`red ]) buffer | B1 : 'a -> ('a, [`yellow]) buffer | B2 : 'a * 'a -> ('a, [< `green | `yellow]) buffer | B3 : 'a * 'a * 'a -> ('a, [< `green | `yellow]) buffer | B4 : 'a * 'a * 'a * 'a -> ('a,...
a160961c27d15a18ee9ac15f70bae0e2b6cb39a388e4db3bd7f77b1e40a8da38
avsm/mirage-duniverse
ppx_sexp_conv_expander.mli
open Ppxlib module Attrs : sig val default : (label_declaration, expression) Attribute.t val drop_default : (label_declaration, unit ) Attribute.t val drop_if : (label_declaration, expression) Attribute.t end module Sexp_of : sig val type_extension : core_type -> core_type val core_type : co...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/ppx_sexp_conv/expander/ppx_sexp_conv_expander.mli
ocaml
open Ppxlib module Attrs : sig val default : (label_declaration, expression) Attribute.t val drop_default : (label_declaration, unit ) Attribute.t val drop_if : (label_declaration, expression) Attribute.t end module Sexp_of : sig val type_extension : core_type -> core_type val core_type : co...
cbf56a03125d4d68c786a9e56722d97489a46381123f0e2c030a22991729074a
soegaard/little-helper
common-test-heap.scm
test-heap.scm -- -- dec 12th 2005 (require "srfi-check.scm" (lib "42.ss" "srfi") (lib "67.ss" "srfi") (only (lib "list.ss") mergesort)) ;;; HELPERS (define (same? l1 l2) (equal? (mergesort l1 <) (mergesort l2 <))) (define (compare-mod2 x1 x2) (num...
null
https://raw.githubusercontent.com/soegaard/little-helper/26249c688e5adf1e2535c405c6289030eff561b4/planet/galore.plt/2/2/tests/common-test-heap.scm
scheme
HELPERS TESTS count delete delete-all delete-min empty? find-min elements - see insert* fold get heap? heap-ec :heap and : insert* select singleton size union TEST REPORT
test-heap.scm -- -- dec 12th 2005 (require "srfi-check.scm" (lib "42.ss" "srfi") (lib "67.ss" "srfi") (only (lib "list.ss") mergesort)) (define (same? l1 l2) (equal? (mergesort l1 <) (mergesort l2 <))) (define (compare-mod2 x1 x2) (number-compare (...
2dd4135fef2850d5139872eaee06f537f7f1efcda3b676ebf861a437d4d45587
josephwilk/musical-creativity
bach.clj
(ns data.bach) (def bach1 [{:time 0 :pitch 57} {:time 0 :pitch 60} {:time 0 :pitch 69} {:time 0 :pitch 76} {:time 1000 :pitch 59} {:time 1000 :pitch 62} {:time 1000 :pitch 67} {:time 1000 :pitch 79} {:time 2000 :pitch 60} {:time 2000 :pitch 64} {:time 2000 :pitch 76} {:time 2500 :pitch 59} {:time 2500 :pitc...
null
https://raw.githubusercontent.com/josephwilk/musical-creativity/c2e6aab2a26d69ee2e51f4fad84fa3a71805e6ca/data/bach.clj
clojure
(ns data.bach) (def bach1 [{:time 0 :pitch 57} {:time 0 :pitch 60} {:time 0 :pitch 69} {:time 0 :pitch 76} {:time 1000 :pitch 59} {:time 1000 :pitch 62} {:time 1000 :pitch 67} {:time 1000 :pitch 79} {:time 2000 :pitch 60} {:time 2000 :pitch 64} {:time 2000 :pitch 76} {:time 2500 :pitch 59} {:time 2500 :pitc...
00d3dedde0c137b945e5e21ae1e2bf80730ba30a3a98998798be502303bd0e28
nuprl/gradual-typing-performance
modulegraph.rkt
#lang typed/racket/base Utilities for working with modules graphs . ;; The source of truth are TiKZ'd module graphs ;; (because their layout requires human intervention) ;; so this file provides a (brittle) parser. (provide from-directory ;; (-> Path ModuleGraph) Parse a directory into a module graph . ;;...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/paper/popl-2016/scripts/modulegraph.rkt
racket
(because their layout requires human intervention) so this file provides a (brittle) parser. (-> Path ModuleGraph) Does not collect module dependency information. (-> Path-String ModuleGraph) Return a list of all module names in the project (-> Path-String String) Get the project name direct from the modulegra...
#lang typed/racket/base Utilities for working with modules graphs . The source of truth are TiKZ'd module graphs (provide from-directory Parse a directory into a module graph . from-tex Parse a tex file into a module graph module-names ( - > ModuleGraph ( ) ) path->project-name Parse a projec...
9131469cd07c683d64914ebf311bdcf7643f5ece018a17f719135b9c8e8ae651
victornicolet/parsynt
SymbExe.mli
open Beta open Fn open Utils val debug : bool ref val verbose : bool ref type exec_info = { context : context; state_exprs : fnExpr IM.t; intermediate_states : fnExpr list IM.t; index_exprs : fnExpr IM.t; inputs : ES.t } exception SymbExeError of string * fnExpr * exec_once : simulate the app...
null
https://raw.githubusercontent.com/victornicolet/parsynt/d3f530923c0c75537b92c2930eb882921f38268c/src/singleloop/SymbExe.mli
ocaml
open Beta open Fn open Utils val debug : bool ref val verbose : bool ref type exec_info = { context : context; state_exprs : fnExpr IM.t; intermediate_states : fnExpr list IM.t; index_exprs : fnExpr IM.t; inputs : ES.t } exception SymbExeError of string * fnExpr * exec_once : simulate the app...
25491301ab69161e8a3c2cdcd8764523b17826553457283a518150f313f4c278
y-taka-23/miso-vue-example
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Data.Bifunctor (bimap) import Miso import Transition main :: IO () main = do startApp App { initialAction = NoOp , model = initialModel , update = updateModel , view = viewModel , subs = [] , even...
null
https://raw.githubusercontent.com/y-taka-23/miso-vue-example/4d3fe5a129fa8e126ed4aa786db58c454e79add4/modal-component/Main.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import Data.Bifunctor (bimap) import Miso import Transition main :: IO () main = do startApp App { initialAction = NoOp , model = initialModel , update = updateModel , view = viewModel , subs = [] , events = defaultEvents , mountPoint...
7ad937fdbba69f68252184ef3fe55daba033d34b3a6da42db9eacd3cf9f8ddcf
dainiusjocas/lucene-grep
fs.clj
(ns lmgrep.fs (:require [clojure.java.io :as io] [clojure.java.shell :as sh] [clojure.string :as str] [babashka.fs :as bfs] [lmgrep.print :as print]) (:import (java.nio.file FileSystems Path Files LinkOption) (java.io File IOException))) (set! *warn-on-ref...
null
https://raw.githubusercontent.com/dainiusjocas/lucene-grep/45cb96ac205be8991ea127211d432e45e9870754/src/lmgrep/fs.clj
clojure
(ns lmgrep.fs (:require [clojure.java.io :as io] [clojure.java.shell :as sh] [clojure.string :as str] [babashka.fs :as bfs] [lmgrep.print :as print]) (:import (java.nio.file FileSystems Path Files LinkOption) (java.io File IOException))) (set! *warn-on-ref...
481f4dbbf44e573e606347b5b002fa72b981c2537d3afa6999deb5c09e17f509
kpblc2000/KpblcLispLib
_kpblc-cmd-silence.lsp
(defun _kpblc-cmd-silence (cmd / err sysvar res lastent) ;| * Âûïîëíåíèå êîìàíäû â "ñêðûòîì" ðåæèìå * Ïàðàìåòðû âûçîâà: cmd ; èñïîëíÿåìàÿ êîìàíäà - ñòðîêà èëè ñïèñîê * Âîçâðàùàåò t â ñëó÷àå óñïåõà âûïîëíåíèÿ êîìàíäû èëè nil â ñëó÷àå îøèáêè. * Ïðèìåðû âûçîâà: ...
null
https://raw.githubusercontent.com/kpblc2000/KpblcLispLib/49d1d9d29078b4167cc65dc881bea61b706c620d/lsp/cmd/_kpblc-cmd-silence.lsp
lisp
| èñïîëíÿåìàÿ êîìàíäà - ñòðîêà èëè ñïèñîê _ end of if _ end of lambda _ end of function _ end of mapcar _ end of vl-remove _ end of setq _ end of if _ end of cond _ end of cond _ end of setq _ end of lambda _ end of function _ end of vl-catch-all-apply _ end of setq _ end of vl-catch-all-error-p _ e...
(defun _kpblc-cmd-silence (cmd / err sysvar res lastent) * Âûïîëíåíèå êîìàíäû â "ñêðûòîì" ðåæèìå * Ïàðàìåòðû âûçîâà: * Âîçâðàùàåò t â ñëó÷àå óñïåõà âûïîëíåíèÿ êîìàíäû èëè nil â ñëó÷àå îøèáêè. * Ïðèìåðû âûçîâà: (_kpblc-cmd-silence "_.regenall") (_kpblc-cmd-silence (list "_.wssave" (getvar "...
4d9effd164590086e84fb48206c8f71edd393d58c8fc3c2583c3fc4c3e24c3bd
TorXakis/TorXakis
Sim.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} # LANGUAGE RecordWildCards # -- -------...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/core/src/Sim.hs
haskell
----------------------------------------------------------------------------------------- -- ----------------------------------------------------------------------------------------- -- -- Simulation of a Model ...
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} # LANGUAGE RecordWildCards # module Si...
e0de82a9bbaab82ddf8c9c238c02442135a10bfb6fe8abf093c4c78f0b504a1f
mikelevins/folio2
boxes-package.lisp
;;;; *********************************************************************** ;;;; Name : package.lisp ;;;; Project: folio2 - Functional idioms for Common Lisp ;;;; Purpose: boxes package ;;;; Author: mikel evins Copyright : 2015 by mikel evins ;;;; ;;;; ****************************...
null
https://raw.githubusercontent.com/mikelevins/folio2/a96052f78f0e0358376a498c6351342ece6a9b7b/src/boxes-package.lisp
lisp
*********************************************************************** Project: folio2 - Functional idioms for Common Lisp Purpose: boxes package Author: mikel evins ***********************************************************************
Name : package.lisp Copyright : 2015 by mikel evins (in-package :cl-user) (defpackage :net.bardcode.folio2.boxes (:use :cl :net.bardcode.folio2.as :net.bardcode.folio2.make) (:export :box :box? :set-box! :unbox))
540a9274257b5ce155e2c8e174b31fa4388a26897f1f4932ff388235f7801ddc
LeventErkok/sbv
Fib.hs
----------------------------------------------------------------------------- -- | Module : Documentation . SBV.Examples . . Fib Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- -- Proof of correctness of an imperative fibonacci algorithm, using weakest -- preconditions. N...
null
https://raw.githubusercontent.com/LeventErkok/sbv/be4d7260187067a71ef8af18006e74698e2a565b/Documentation/SBV/Examples/WeakestPreconditions/Fib.hs
haskell
--------------------------------------------------------------------------- | License : BSD3 Maintainer: Stability : experimental Proof of correctness of an imperative fibonacci algorithm, using weakest preconditions. Note that due to the recursive nature of fibonacci, we cannot write the spec directly, so w...
Module : Documentation . SBV.Examples . . Fib Copyright : ( c ) # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # module Documentation.SBV.Examples.WeakestPreconditions.Fib where import Data.SBV import Data.SBV.Control import Data.SBV.Tools.Weakes...
2515b118927f5aed19c3a8b7d7d05a2307eb0c73eefcb88ddd6ddf180e11581d
solita/mnt-teet
timeline.cljs
(ns teet.ui.timeline "SVG timeline component" (:require [goog.date :as dt] [reagent.core :as r] [teet.ui.format :as format] [teet.ui.material-ui :refer [Popper]] [cljs-time.core :as t] [teet.theme.theme-colors :as theme-colors] [teet.theme.them...
null
https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/frontend/src/cljs/teet/ui/timeline.cljs
clojure
Fill rectangles based on status Handler to prevent scrolling when mouse is inside the timeline-bars Find "timeline-bars" element from event, and scroll it horizontally Item styles for timeline items. TODO a bad abstraction, doesn't allow for styles per item, only per item type.
(ns teet.ui.timeline "SVG timeline component" (:require [goog.date :as dt] [reagent.core :as r] [teet.ui.format :as format] [teet.ui.material-ui :refer [Popper]] [cljs-time.core :as t] [teet.theme.theme-colors :as theme-colors] [teet.theme.them...
56c4f47400fd4018240bcd5208da9df68824cb0f23663059170e62de35bc5468
metaocaml/ber-metaocaml
redefinition_hints.ml
(* TEST * toplevel *) (* This is a toplevel test to trigger toplevel specific hints *) module Empty = struct end type u = A type v = B module type S = sig end let m = (module Empty:S) module M = struct type 'a t = X of 'a end let x =M.X (A,B,m);; module type S = sig end let m = (module Empty:S) type u = A ...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-toplevel/redefinition_hints.ml
ocaml
TEST * toplevel This is a toplevel test to trigger toplevel specific hints
module Empty = struct end type u = A type v = B module type S = sig end let m = (module Empty:S) module M = struct type 'a t = X of 'a end let x =M.X (A,B,m);; module type S = sig end let m = (module Empty:S) type u = A type v = B module M = struct type 'a t = X of 'a end let y = M.X (A,B,m);; x = y;; typ...
8ac6a203789dc3f8df271e92b1930fe66c1ef9106bb7cb6ad253335c3eea3fcc
mfikes/fifth-postulate
ns147.cljs
(ns fifth-postulate.ns147) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns147.cljs
clojure
(ns fifth-postulate.ns147) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
68d5208bb257e6813f72d2476c9a5a861aacb65ffb4e1ecf1922ee8fbf33c7e8
spurious/sagittarius-scheme-mirror
dbi.scm
;; -*- scheme -*- #!compatible (library (dbd test) (export make-test-driver) (import (rnrs) (dbi) (clos user) (clos core)) (define-class <dbi-test-driver> (<dbi-driver>) ()) (define-class <dbi-test-connection> (<dbi-connection>) ()) ;; to make method more specifig (define-class ...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/dbi.scm
scheme
-*- scheme -*- to make method more specifig no slot it's just a test query level commit and rollback default implementation return the same statement it's just a test connection level commit and rollback condition tests
#!compatible (library (dbd test) (export make-test-driver) (import (rnrs) (dbi) (clos user) (clos core)) (define-class <dbi-test-driver> (<dbi-driver>) ()) (define-class <dbi-test-connection> (<dbi-connection>) ()) (define-class <dbi-test-query> (<dbi-query>) (define-method dbi...
a3ff092c4d28871e4a2ad48306d027250a1c801ce50bc844d8c0a64d4a402d99
IG-Group/Havoc
docker_command_generator.clj
(ns ig.havoc.impl.docker-command-generator (:require clojure.data clojure.set [clojure.test.check.generators :as gen] [ig.havoc.impl.command-generator :as core] loom.graph loom.attr loom.alg)) (defn key-with-val [m v] (get (clojure.set/map-inv...
null
https://raw.githubusercontent.com/IG-Group/Havoc/24c9d8409b273d791370593d131525f04ba2c9a1/src/ig/havoc/impl/docker_command_generator.clj
clojure
; TODO : on start / unpause , execute all the handicaps + broken links . or it should just pause the java process ? ? ? :paused {:container/unpause :ok}
(ns ig.havoc.impl.docker-command-generator (:require clojure.data clojure.set [clojure.test.check.generators :as gen] [ig.havoc.impl.command-generator :as core] loom.graph loom.attr loom.alg)) (defn key-with-val [m v] (get (clojure.set/map-inv...
d70462ccafe6753e0e7295009095025558485e13eaf0626eae6d6347d5483326
ocaml-multicore/lockfree
stm_ws_deque.ml
* Sequential and Parallel model - based tests of ws_deque open QCheck open STM open Util module Ws_deque = Lockfree.Ws_deque module WSDConf = struct type cmd = Push of int | Pop | Steal let show_cmd c = match c with | Push i -> "Push " ^ string_of_int i | Pop -> "Pop" | Steal -> "Steal" type s...
null
https://raw.githubusercontent.com/ocaml-multicore/lockfree/6f0e3a97a004daf939db0b42e46d056810599b1b/test/ws_deque/stm_ws_deque.ml
ocaml
Gen.return Steal; No point in stealing from yourself :-D if i<>1213 then i::s else s an artificial fault [arb_cmds_par] differs in what each triple component generates: "Owner domain" cmds can't be [Steal], "stealer domain" cmds can only be [Steal]. A parallel agreement test - w/repeat and retries combined ...
* Sequential and Parallel model - based tests of ws_deque open QCheck open STM open Util module Ws_deque = Lockfree.Ws_deque module WSDConf = struct type cmd = Push of int | Pop | Steal let show_cmd c = match c with | Push i -> "Push " ^ string_of_int i | Pop -> "Pop" | Steal -> "Steal" type s...
4fc54270f054bb88b379125c4480a3c10e97af01d84284e66c589137154556de
xh4/web-toolkit
dummy.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; indent - tabs - mode : nil ; coding : utf-8 ; show - trailing - whitespace : t -*- (in-package :cl+ssl.test) (in-suite :cl+ssl) (test (sanity-check.1 :compile-at :definition-time) (is-true t "SANITY CHECK: T isn't T")) (test (sanity-check.2 :compile-at :definition-time...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/cl%2Bssl-20191130-git/test/dummy.lisp
lisp
Syntax : COMMON - LISP ; indent - tabs - mode : nil ; coding : utf-8 ; show - trailing - whitespace : t -*-
(in-package :cl+ssl.test) (in-suite :cl+ssl) (test (sanity-check.1 :compile-at :definition-time) (is-true t "SANITY CHECK: T isn't T")) (test (sanity-check.2 :compile-at :definition-time) (is-false nil "SANITY CHECK: NIL isn't NIL"))
127a9cf762d433a46b9bb9d7ecf65851a8d20104dc7922afc8b6a7e19009de69
Frechmatz/cl-synthesizer
run-profiler.lisp
(asdf:load-system :cl-synthesizer/profiling) (cl-synthesizer-profiling::run-all)
null
https://raw.githubusercontent.com/Frechmatz/cl-synthesizer/ba2e4003448829078187013f6723eb5c8ce8adbc/makedoc/run-profiler.lisp
lisp
(asdf:load-system :cl-synthesizer/profiling) (cl-synthesizer-profiling::run-all)
5ca69634a1d467a67b30b6519708a7ff713bcb4301f04d4f17ba5f693d6ef0d4
PseudoPower/AFSM
Event.hs
----------------------------------------------------------------------------- -- | -- Module : Control.AFSM.Event Copyright : ( c ) , 2016 , License : MIT License -- -- Maintainer : -- Stability : experimental -- Portability : portable ----------------------------------------...
null
https://raw.githubusercontent.com/PseudoPower/AFSM/9d6ace9d279992a18f44856058040a0ef391abd6/src/Control/AFSM/Event.hs
haskell
--------------------------------------------------------------------------- | Module : Control.AFSM.Event Maintainer : Stability : experimental Portability : portable --------------------------------------------------------------------------- | extract [a] from [Event a]
Copyright : ( c ) , 2016 , License : MIT License module Control.AFSM.Event ( extractEvents )where import Control.Applicative import Control.Monad import Control.AFSM.CoreType import Control.AFSM.SMFunctor | ' Event ' type , there are 4 different events : event a , no event , e...
25d80f6d193f09c111e4e6b0a4c6c6154fd0c85dba067c0883108fb40d21b7d9
Naproche-SAD/Naproche-SAD
Server.hs
{- generated by Isabelle -} Title : Isabelle / Server.hs Author : Makarius LICENSE : BSD 3 - clause ( Isabelle ) TCP server on localhost . Author: Makarius LICENSE: BSD 3-clause (Isabelle) TCP server on localhost. -} module Isabelle.Server ( localhost_name, localho...
null
https://raw.githubusercontent.com/Naproche-SAD/Naproche-SAD/da131a6eaf65d4e02e82082a50a4febb6d42db3d/Isabelle/src/Isabelle/Server.hs
haskell
generated by Isabelle server address server
Title : Isabelle / Server.hs Author : Makarius LICENSE : BSD 3 - clause ( Isabelle ) TCP server on localhost . Author: Makarius LICENSE: BSD 3-clause (Isabelle) TCP server on localhost. -} module Isabelle.Server ( localhost_name, localhost, publish_text, publish_st...
0657ef2dcafa9568a2477bfba4469e619e64709461cb1fd273214335a4f72a52
finnishtransportagency/harja
materiaalit.clj
(ns harja.palvelin.palvelut.materiaalit (:require [com.stuartsierra.component :as component] [harja.palvelin.komponentit.http-palvelin :refer [julkaise-palvelu poista-palvelut]] [harja.kyselyt.materiaalit :as q] [harja.kyselyt.konversio :as konv] [harja.kyselyt.toteumat...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/004fe49738720b68df4f2d109d050b3cb8b1d4a9/src/clj/harja/palvelin/palvelut/materiaalit.clj
clojure
INSERT DELETE UPDATE
(ns harja.palvelin.palvelut.materiaalit (:require [com.stuartsierra.component :as component] [harja.palvelin.komponentit.http-palvelin :refer [julkaise-palvelu poista-palvelut]] [harja.kyselyt.materiaalit :as q] [harja.kyselyt.konversio :as konv] [harja.kyselyt.toteumat...
cb775ddc4f1cc127dec8e8dc9eec835172d2b456814fd8cfbefd920a833a2cb9
carl-eastlund/dracula
defun.rkt
#| defun generates macros that check that the defined function is used only in operator position (or acl2-provide/contract). Also does arity checking. |# #lang racket (require "constants.rkt" "declare.rkt" "do-check.rkt" racket/stxparam racket/require (path-up "self/require.rkt") (for-syntax "t-or-...
null
https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/lang/defun.rkt
racket
defun generates macros that check that the defined function is used only in operator position (or acl2-provide/contract). Also does arity checking.
#lang racket (require "constants.rkt" "declare.rkt" "do-check.rkt" racket/stxparam racket/require (path-up "self/require.rkt") (for-syntax "t-or-nil.rkt" racket/match (cce-in function) (cce-in syntax))) (provide defun defund defstub mutual-recursion) (define-f...
fd9cbfed4ad28f38e3a5dd53d3dd5a6c3a97d1203e5795ee0da6823c1013c187
coord-e/mlml
simple_func.ml
let () = Tester.expr "let f x = x + 3 in f 40"; Tester.expr {| let f x = x + 3 in let g x = 10 * x in f (g 4) |}; Tester.expr {| let f x = x + 3 in let g x = 10 * x in f 0 + g 4 |}; Tester.expr "let f x = x * 3 in f 1 -4" ;;
null
https://raw.githubusercontent.com/coord-e/mlml/ec34b1fe8766901fab6842b790267f32b77a2861/test/simple_func.ml
ocaml
let () = Tester.expr "let f x = x + 3 in f 40"; Tester.expr {| let f x = x + 3 in let g x = 10 * x in f (g 4) |}; Tester.expr {| let f x = x + 3 in let g x = 10 * x in f 0 + g 4 |}; Tester.expr "let f x = x * 3 in f 1 -4" ;;
be4bf3bd4b5c2d59eaf966c3605acf5beac59e0ca0a9f118de7fe949a4d97cc9
metasoarous/odum
user.clj
(ns user (:require [clojure.java.javadoc :refer [javadoc]] [clojure.pprint :refer [pprint]] [clojure.reflect :refer [reflect]] [clojure.repl :refer [apropos dir doc find-doc pst source]] [com.stuartsierra.component :as component] [clojure.tools.namespace.repl :refer [refresh refresh-all]] ...
null
https://raw.githubusercontent.com/metasoarous/odum/92965d14c8f5702a1bdbfcfb2e44ebbfa41c8cab/dev/clj/user.clj
clojure
This is some system setup stuff; ignore for now.... see below for DataScript examples XXX Hmm... not sure how to get config-overrides with reset because of refresh :after needing a 0-arity fn Run a customized system XXX You can use this to add dependencies without rebooting your repl. NOW FOR SOME datascripts! ==...
(ns user (:require [clojure.java.javadoc :refer [javadoc]] [clojure.pprint :refer [pprint]] [clojure.reflect :refer [reflect]] [clojure.repl :refer [apropos dir doc find-doc pst source]] [com.stuartsierra.component :as component] [clojure.tools.namespace.repl :refer [refresh refresh-all]] ...
1637df4afcec702d6bbb9a8512e782afccab6afbdeafdfed9cedc32075c182bd
Armael/ocaml-xkbcommon
xkbcommon.mli
type keycode = int type keysym = int module Keysyms : module type of Keysyms module Context : sig type flag = | No_default_includes | No_environment_names type flags = flag list type t val t : t Ctypes.typ val with_new : ?flags:flags -> fail:(unit -> 'a) -> (t -> 'a) -> 'a (** low level: prefe...
null
https://raw.githubusercontent.com/Armael/ocaml-xkbcommon/af0cd8c938938db3e67b65ac13b6444102756ba0/lib/xkbcommon.mli
ocaml
* low level: prefer using [with_new] low level: prefer using [with_new_from_*]
type keycode = int type keysym = int module Keysyms : module type of Keysyms module Context : sig type flag = | No_default_includes | No_environment_names type flags = flag list type t val t : t Ctypes.typ val with_new : ?flags:flags -> fail:(unit -> 'a) -> (t -> 'a) -> 'a val create : ?flags:...
34f51c982c1da80c083d0d99bcdf6969a7ad9d16478e91cbd486dde1866bec1d
mirage/ocaml-git
value.ml
* Copyright ( c ) 2013 - 2017 < > * and < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVID...
null
https://raw.githubusercontent.com/mirage/ocaml-git/37c9ef41944b5b19117c34eee83ca672bb63f482/src/git/value.ml
ocaml
* Copyright ( c ) 2013 - 2017 < > * and < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVID...
b011f611e2b2e9da9717c566d8a8b419b304e9050ba24ee3d6e59f48fdc75296
VictorNicollet/99-Problems-OCaml
p41.ml
Goldbach 's conjecture let divides d n = (n mod d) = 0 ;; let is_prime n = let n = max n (-n) in let rec aux d = d * d > n || not (divides d n) && aux (d+1) in aux 2 ;; let goldbach n = let rec aux d = if is_prime d && is_prime (n - d) then (d, n-d) else aux (d+1) in aux 2 ;; let re...
null
https://raw.githubusercontent.com/VictorNicollet/99-Problems-OCaml/a13e625545d54d4d927b39b18ab1ffba7de6b7e6/41-50/p41.ml
ocaml
Goldbach 's conjecture let divides d n = (n mod d) = 0 ;; let is_prime n = let n = max n (-n) in let rec aux d = d * d > n || not (divides d n) && aux (d+1) in aux 2 ;; let goldbach n = let rec aux d = if is_prime d && is_prime (n - d) then (d, n-d) else aux (d+1) in aux 2 ;; let re...
ee6f33bdff76b306fd813d89cdbb4cc29d9bba0c9c79ff82f536c05520a4d2f8
jabber-at/ejabberd
mod_vcard.erl
%%%---------------------------------------------------------------------- %%% File : mod_vcard.erl Author : < > %%% Purpose : Vcard management Created : 2 Jan 2003 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne %%% %%% This program is free software; you can redistribute it and/or...
null
https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/mod_vcard.erl
erlang
---------------------------------------------------------------------- File : mod_vcard.erl Purpose : Vcard management This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT AN...
Author : < > Created : 2 Jan 2003 by < > ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License along ...
0c470759e3f1c17e58e1eafa669b67f2ecc62bd792c2fbce1fa3cd6dd2d01ab5
aib/Project-Euler
euler42.hs
import Data.Char import Data.List.Split ntri n = (n * (n+1)) `div` 2 wordVal = sum . map charVal where charVal = ((+1) . (subtract $ ord 'A') . ord) triNum n = (elem n . takeWhile (<= n)) $ map ntri [1..] main = do file <- readFile "euler42-words.txt" wordList <- return $ map (filter (/= '"')) $ words...
null
https://raw.githubusercontent.com/aib/Project-Euler/a01a142d360f3a30fcea69ab29d4d198160ee921/euler42.hs
haskell
import Data.Char import Data.List.Split ntri n = (n * (n+1)) `div` 2 wordVal = sum . map charVal where charVal = ((+1) . (subtract $ ord 'A') . ord) triNum n = (elem n . takeWhile (<= n)) $ map ntri [1..] main = do file <- readFile "euler42-words.txt" wordList <- return $ map (filter (/= '"')) $ words...
224e169deb6d3bb88910eab4ada06c15580d1e0646a07f8d7de04fbb5a79ea17
babashka/babashka
glob.clj
(require '[clojure.java.io :as io]) (defn glob [pattern] (let [matcher (.getPathMatcher (java.nio.file.FileSystems/getDefault) (str "glob:" pattern))] (into [] (comp (filter #(.isFile %)) (filter #(.matches matcher (.normalize (.toPath %)))) (map #(.re...
null
https://raw.githubusercontent.com/babashka/babashka/3dfc15f5a40efaec07cba991892c1207a352fab4/test-resources/babashka/glob.clj
clojure
(require '[clojure.java.io :as io]) (defn glob [pattern] (let [matcher (.getPathMatcher (java.nio.file.FileSystems/getDefault) (str "glob:" pattern))] (into [] (comp (filter #(.isFile %)) (filter #(.matches matcher (.normalize (.toPath %)))) (map #(.re...
db345cfeafb3147220d1f5425468980a4ba3b6fbc908e32590498a21e066f15b
nyu-acsys/drift
xy0.ml
let rec loopa lx ly = if (ly < 10) then loopa (lx + 1) (ly + 1) else lx let rec loopb bx by = if (bx > 0) then loopb (bx - 1) (bx - 1) else assert (by > (-1)) let main (mm:unit(*-:{v:Unit | unit}*)) = let x = 0 in let y = 0 in loopa x y
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/DOrder/first/xy0.ml
ocaml
-:{v:Unit | unit}
let rec loopa lx ly = if (ly < 10) then loopa (lx + 1) (ly + 1) else lx let rec loopb bx by = if (bx > 0) then loopb (bx - 1) (bx - 1) else assert (by > (-1)) let x = 0 in let y = 0 in loopa x y
396f7d931db68e6b063da721f7fdce6af3ca94650a78160c1285b40a1a31465d
namin/reflection-schemes
lang.scm
(define (ev process) (ev-open evl process)) (define (ev-open tie process) (call/cc (lambda (k) (evl tie process (get process '(:exp)) k)))) (define (evl evl this exp jump) (define (evli exp i) (evl evl this (geti exp i) jump)) (cond ((symbol? exp) (get this `(:env ,exp))) ((or (number? ex...
null
https://raw.githubusercontent.com/namin/reflection-schemes/d3fd61aa7edc8af5f7f2c9783b4e3c5356cd2bd5/02-toyos-failed-towers/lang.scm
scheme
(define (ev process) (ev-open evl process)) (define (ev-open tie process) (call/cc (lambda (k) (evl tie process (get process '(:exp)) k)))) (define (evl evl this exp jump) (define (evli exp i) (evl evl this (geti exp i) jump)) (cond ((symbol? exp) (get this `(:env ,exp))) ((or (number? ex...
fe3d88c75dcb6b311bbf529467d4c6c75e44eb9ca53ab1b9e0cb2833c3814c6b
Dexterminator/clj-templates
transit_test.clj
(ns clj-templates.util.transit-test (:require [clojure.test :refer [use-fixtures]] [clj-templates.test-utils :refer [facts fact is= instrument-test]] [clj-templates.util.transit :refer [transit-json read-transit-json]])) (use-fixtures :each instrument-test) (facts "transit-json-fns" (let [...
null
https://raw.githubusercontent.com/Dexterminator/clj-templates/705e652fece2455257e5008c12c712bb9f7802d1/test/clj/clj_templates/util/transit_test.clj
clojure
(ns clj-templates.util.transit-test (:require [clojure.test :refer [use-fixtures]] [clj-templates.test-utils :refer [facts fact is= instrument-test]] [clj-templates.util.transit :refer [transit-json read-transit-json]])) (use-fixtures :each instrument-test) (facts "transit-json-fns" (let [...
745d7a950c0dc67c9fe0a2dc54614cc534317faf97819765c5cc4d16f8692ca8
facebookarchive/duckling_old
time.clj
( "intersect" sequence of two tokens with a time dimension (intersect %1 %2) mostly for January 12 , 2005 ; this is a separate rule, because commas separate very specific tokens ; so we want this rule's classifier to learn this "intersect by \",\"" sequence of two tokens with a time fn (intersect %1...
null
https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/zh/rules/time.clj
clojure
this is a separate rule, because commas separate very specific tokens so we want this rule's classifier to learn this Named things Including cycles assumed to be strictly in the future: 下[个|個]? Ordinals assumed to be in the future [#"下" (dim :time)] part of day (morning, evening...) TOBECHECKED 三月十二号 ; Hour...
( "intersect" sequence of two tokens with a time dimension (intersect %1 %2) mostly for January 12 , 2005 "intersect by \",\"" sequence of two tokens with a time fn (intersect %1 %3) "named-day" #"星期一|周一|礼拜一|禮拜一|週一" (day-of-week 1) "named-day" #"星期二|周二|礼拜二|禮拜二|週二" (day-of-week 2) "named...
e087d2d8787d7a0c5559fcc2cc6a474bb4b024a14a7c6ec5a69afa329e016dbf
RichiH/git-annex
ReKey.hs
git - annex command - - Copyright 2012 - 2016 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2012-2016 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Command.ReKey where import Command import qualified Annex import Annex.Content import Annex...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Command/ReKey.hs
haskell
but a Key very rarely does. Make a hard link to the old key content (when supported), - to avoid wasting disk space. If the object file is already hardlinked to elsewhere, a hard - link won't be made by getViaTmp', but a copy instead. - This avoids hard linking to content linked to an - unlocked file, which ...
git - annex command - - Copyright 2012 - 2016 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2012-2016 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module Command.ReKey where import Command import qualified Annex import Annex.Content import Annex...
cebd4c1cf806f8e422e4dbb0cc07c39203227ac954ee0d3f776969a57b696e4c
trailofbits/indurative
Indurative.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Indurative (A...
null
https://raw.githubusercontent.com/trailofbits/indurative/6da8af17f35952c11d1e0d3bef423024fbcadf95/lib/Indurative.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DeriveAnyClass # Class definition {{{ | A class for data structures with authenticated access semantics. Ref. /~mwh/papers/gpads.pdf | The type of an access proof ("the set of digests needed to compute the root digest") | The return type of a query ('Maybe' if the query can...
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Indurative (Auth(..), Authenticate(..), hash, hashCons, nullHashes, replaced) ...
a9aab6a70c5a49a48a73850c2f2f777a54d299ed9cd0744ad255f72471f25f35
hidaris/thinking-dumps
4-14.rkt
;; (value-of (let-exp (var exp1 body)) env store) ( value - of exp1 env store ) = ( val store1 ) ;; ------------------------------------------------------------------ ;; (value-of body (extend-env var location env) [location = val]store1)
null
https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap4/4-14.rkt
racket
(value-of (let-exp (var exp1 body)) env store) ------------------------------------------------------------------ (value-of body (extend-env var location env) [location = val]store1)
( value - of exp1 env store ) = ( val store1 )
fe9084cb40d46b7180eb539a3e70229c30d7a2ce5cb4f2dfbca59c2df71c6671
uelis/IntML
printing.ml
(** Printing of terms and types *) (* TODO: * - printing of upper class terms *) open Term let name_counter = ref 0 let new_name () = let i = !name_counter in incr(name_counter); let c = Char.chr(Char.code 'a' + i mod 26) in let n = i / 26 in if (n = 0) then Printf.sprintf "%c" c else P...
null
https://raw.githubusercontent.com/uelis/IntML/d0d29b689e2503642aeb9c0b9a35cc61a26419a6/printing.ml
ocaml
* Printing of terms and types TODO: * - printing of upper class terms works properly only on well-formed types recognize loops and avoid printing infinite types Print only information that is interesting to the user, * but not the details
open Term let name_counter = ref 0 let new_name () = let i = !name_counter in incr(name_counter); let c = Char.chr(Char.code 'a' + i mod 26) in let n = i / 26 in if (n = 0) then Printf.sprintf "%c" c else Printf.sprintf "%c%i" c n;; let reset_names () = name_counter := 0 let name_table...
161d958c2744796d89d1b4e5e9a35179375528fb9ef0f5e78d5d331a71023339
input-output-hk/project-icarus-importer
Logic.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE TypeFamilies # -- | This module does some hard work related to block processing -- logic, but not specific to any particular part of the -- system. On the contrary, modules like 'Pos.Block.Logic.VAR' -- unite logic from multiple components into functions. module Pos...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/block/src/Pos/Block/Slog/Logic.hs
haskell
| This module does some hard work related to block processing logic, but not specific to any particular part of the system. On the contrary, modules like 'Pos.Block.Logic.VAR' unite logic from multiple components into functions. -------------------------------------------------------------------------- Helpers ---...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE TypeFamilies # module Pos.Block.Slog.Logic ( mustDataBeKnown , MonadSlogBase , MonadSlogVerify , slogVerifyBlocks , MonadSlogApply , slogApplyBlocks , slogRollbackBlocks , BypassSecurityCheck(..) , Sh...
9b6f4e8d404e4e97c0f65b9d716c31f2e74a605890d198c2f202b1b5fd99feeb
wireapp/wire-server
KeyPackage.hs
# LANGUAGE GeneralizedNewtypeDeriving # -- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Fou...
null
https://raw.githubusercontent.com/wireapp/wire-server/e03f7219210019ae5be50739f594dc667e669168/libs/wire-api/src/Wire/API/MLS/KeyPackage.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under 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 PARTI...
# LANGUAGE GeneralizedNewtypeDeriving # Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public Licens...
3a18f8a4767fdddbe13888574b1ad1afa7f5756f0aa3d2b2ce00d9885a9f208e
Datomic/day-of-datomic
query_tour.clj
Copyright ( c ) Cognitect , Inc. All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be...
null
https://raw.githubusercontent.com/Datomic/day-of-datomic/20c02d26fd2a12481903dd5347589456c74f8eeb/tutorial/query_tour.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) Cognitect , Inc. All rights reserved . (require '[datomic.api :as d] '[datomic.samples.repl :as repl]) (def conn (repl/setup-sample-db-1 (repl/scratch-conn))) (def db (d/db conn)) (d/q '[:find [?e ...] :where [?e :user/email]] db) (d/q '[:find [?e ...] :in $ ?email :...
30c04d150f68d5ee351a8cbb9a5fbbf6275146e22be737799ffd15bde96e1afa
diagrams/diagrams-cairo
CmdLine.hs
# LANGUAGE CPP # # LANGUAGE FlexibleInstances # # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeFamilies #-} # OPTIONS_GHC -fno - warn - orphans # ----------------------------------------------------------------------------- -- | Module : Diagrams . Backend . Cairo . CmdLine Copyright...
null
https://raw.githubusercontent.com/diagrams/diagrams-cairo/6d6cc74c27ce54635237d0a5fd2f80a8ad9d39d3/src/Diagrams/Backend/Cairo/CmdLine.hs
haskell
# LANGUAGE TypeFamilies # --------------------------------------------------------------------------- | License : BSD-style (see LICENSE) Maintainer : Convenient creation of command-line-driven executables for * 'defaultMain' creates an executable which can render a single diagram at various opti...
# LANGUAGE CPP # # LANGUAGE FlexibleInstances # # LANGUAGE TemplateHaskell # # OPTIONS_GHC -fno - warn - orphans # Module : Diagrams . Backend . Cairo . CmdLine Copyright : ( c ) 2013 Diagrams - cairo team ( see LICENSE ) rendering diagrams using the cairo backend . * ` gifMain ...
59cee661b4e06ce4767dd0ba5d747e149dbd61cef8cdf1996626fb61853f8df2
ryanpbrewster/haskell
P045Test.hs
module Problems.P045Test ( case_045_main ) where import Problems.P045 import Test.Tasty.Discover (Assertion, (@?=)) case_045_main :: Assertion case_045_main = solve @?= "1533776805"
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/tests/Problems/P045Test.hs
haskell
module Problems.P045Test ( case_045_main ) where import Problems.P045 import Test.Tasty.Discover (Assertion, (@?=)) case_045_main :: Assertion case_045_main = solve @?= "1533776805"
0dfadbc0eeee1546aaf8a06dba0b63195a11de0d32f6da61aad433bb7609c3ff
wireapp/wire-server
MetaSchemaSpec.hs
# LANGUAGE TypeApplications # -- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , ...
null
https://raw.githubusercontent.com/wireapp/wire-server/e03f7219210019ae5be50739f594dc667e669168/libs/hscim/test/Test/Schema/MetaSchemaSpec.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under 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 PARTI...
# LANGUAGE TypeApplications # Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along m...
8d3de3c491d3019f877fb88c563ecb9b296b4c59e3090b44d206299531c5bce2
cnuernber/dtype-next
graal_main.clj
(ns graal-main (:require [libc :as libc] [tech.v3.datatype.ffi :as dt-ffi] [tech.v3.datatype :as dtype] ;;required for generated class to work correctly [tech.v3.datatype.ffi.graalvm-runtime]) (:import [libc GraalBindings]) (:gen-class)) (defn -main [& args] (...
null
https://raw.githubusercontent.com/cnuernber/dtype-next/8fb3166a44a2ce21a673c864ae4d0351b6813d46/examples/clj-ffi/src/graal_main.clj
clojure
required for generated class to work correctly
(ns graal-main (:require [libc :as libc] [tech.v3.datatype.ffi :as dt-ffi] [tech.v3.datatype :as dtype] [tech.v3.datatype.ffi.graalvm-runtime]) (:import [libc GraalBindings]) (:gen-class)) (defn -main [& args] (let [libinst (libc.GraalBindings.) _ (dt-ffi/library-...
820367c41eedd64833d3db121c35ec770c528f27a5fa61c186efec1795474a19
manuel-serrano/hop
resolve.scm
;*=====================================================================*/ * serrano / prgm / project / hop/3.0.x / js2scheme / resolve.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation : ...
null
https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/js2scheme/resolve.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * Bind all the unresolved variables. */ *===========================...
* serrano / prgm / project / hop/3.0.x / js2scheme / resolve.scm * / * Author : * / * Creation : Tue Oct 8 09:03:28 2013 * / * Last change : Sat Dec 26 19:36:43 2015 ( serrano ) * / * Copyr...
8f5d163e78f9e4e8376b8e3f976fd1692ad63f1bbef11ef3b8129a87f73e2b85
melange-re/melange
res_printer.mli
open Import.Ast_406 val convertBsExternalAttribute : string -> string val convertBsExtension : string -> string val printTypeParams : (Parsetree.core_type * Asttypes.variance) list -> Res_comments_table.t -> Res_doc.t val printLongident : Longident.t -> Res_doc.t val printTypExpr : Parsetree.core_type -> Res_comme...
null
https://raw.githubusercontent.com/melange-re/melange/d6f41989ec092eea5a623171fe5e54e17fde0d10/jscomp/napkin/res_printer.mli
ocaml
open Import.Ast_406 val convertBsExternalAttribute : string -> string val convertBsExtension : string -> string val printTypeParams : (Parsetree.core_type * Asttypes.variance) list -> Res_comments_table.t -> Res_doc.t val printLongident : Longident.t -> Res_doc.t val printTypExpr : Parsetree.core_type -> Res_comme...
081a95797e4e582b9818d5cdb32e2b29d1ee55ae94c2af9d5ac5ba8a4eb9dd3f
fortytools/holumbus
Client.hs
module Main ( main ) where -- the mr facade import Holumbus.MapReduce.Examples.MandelbrotSet.SimpleDMapReduceIO -- mandel libs import Holumbus.MapReduce.Examples.MandelbrotSet.DMandel import Holumbus.MapReduce.Examples.MandelbrotSet.ImageTypes system libs import System.Environment import Data.List import Data....
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/mapreduce/Examples2/Mandelbrot-set/Mandelbrot-set_1/Client.hs
haskell
the mr facade mandel libs read command line arguments call map reduce make the image generate the pixlist order function the pixels
module Main ( main ) where import Holumbus.MapReduce.Examples.MandelbrotSet.SimpleDMapReduceIO import Holumbus.MapReduce.Examples.MandelbrotSet.DMandel import Holumbus.MapReduce.Examples.MandelbrotSet.ImageTypes system libs import System.Environment import Data.List import Data.Time.Clock.POSIX import Holumbus...
a1f8c04ea81fc2826a5866ea0b63884e24ce4c9a090c123720a53cfda3c7441d
S8A/htdp-exercises
ex286.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 ex286) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex286.rkt
racket
about the language level of this file in a form that our tools can easily process. Data definitions :. An Inventory Record (IR) is a structure: (make-ir String String Number Number) Data examples :. Functions :. [List-of IR] -> [List-of IR] Sorts the list of inventory records by their price differences. IR -...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex286) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define-struct ir [name description acquisition-price ...
cec6b2c045db73474e8be4027ced14dc372142d40118fae65198f0d3f6cdb473
technion/ct_advisor
scheduler.erl
-module(scheduler). -behaviour(gen_server). -define(SERVER, ?MODULE). %% ------------------------------------------------------------------ %% API Function Exports %% ------------------------------------------------------------------ -export([start_link/0]). %% -------------------------------------------------------...
null
https://raw.githubusercontent.com/technion/ct_advisor/d5f3120c468e4203caefbe57f1c64fa4b7017613/apps/ct_advisor/src/scheduler.erl
erlang
------------------------------------------------------------------ API Function Exports ------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ -------------------------...
-module(scheduler). -behaviour(gen_server). -define(SERVER, ?MODULE). -export([start_link/0]). gen_server Function Exports -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). start_link() -> gen_server:start_link({local, ?SERVER}, ?MODULE, [], []). gen_ser...
04f98548c6bdaf2ba244457364c4509ddfdc1ed306a9eaffeadd5e76705e93fc
fyquah/hardcaml_zprize
point.ml
module Jacobian = struct type 'a t = { x : 'a ; y : 'a ; z : 'a } [@@deriving sexp_of, hardcaml] end module Affine = struct type 'a t = { x : 'a ; y : 'a } [@@deriving sexp_of, hardcaml] end
null
https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/elliptic_curve/lib/point.ml
ocaml
module Jacobian = struct type 'a t = { x : 'a ; y : 'a ; z : 'a } [@@deriving sexp_of, hardcaml] end module Affine = struct type 'a t = { x : 'a ; y : 'a } [@@deriving sexp_of, hardcaml] end
3cc36af361cb34f8fc4974bc60de4d5196f7640580df90e76d1a47c4fef0747b
patricoferris/ocaml-multicore-monorepo
unsafe_stable.ml
let set_int32_le b i x = Bytes.set_int32_le b i x let get_int64_le b i = Bytes.get_int64_le b i
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/eqaf/lib/unsafe_stable.ml
ocaml
let set_int32_le b i x = Bytes.set_int32_le b i x let get_int64_le b i = Bytes.get_int64_le b i
69c5f0f0d7d4181319ea069bac310e1b762aa3dee7a1d72126c88cf090db86b8
huangjs/cl
fnwrap-exs.lisp
(in-package :fnwrap) (defun fact (n) (declare (notinline fact)) (if (= n 1) 1 (* n (fact (1- n))))) (defwrapper fact (fn n) (when (zerop (rem n 5)) (break "~S is a multiple of 5" n)) (funcall fn n)) (defwrapper fact (fn n) (when (oddp n) (print (list 'fact n))) (let ((result (funcall fn n))) ...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/other-code/cs325/www.cs.northwestern.edu/academics/courses/325/programs/fnwrap-exs.lisp
lisp
(in-package :fnwrap) (defun fact (n) (declare (notinline fact)) (if (= n 1) 1 (* n (fact (1- n))))) (defwrapper fact (fn n) (when (zerop (rem n 5)) (break "~S is a multiple of 5" n)) (funcall fn n)) (defwrapper fact (fn n) (when (oddp n) (print (list 'fact n))) (let ((result (funcall fn n))) ...
387d6c0268147ef3b14e1e2416c22fcfcbd198953b54bf7238f7e7b110086dae
haskell-mafia/projector
Rewrite.hs
{- | Global (backend-independent) rewrite rules. These should be type-preserving. -} # LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # module Projector.Html.Backend.Rewrite ( globalRules ) where import P import Projector.C...
null
https://raw.githubusercontent.com/haskell-mafia/projector/6af7c7f1e8a428b14c2c5a508f7d4a3ac2decd52/projector-html/src/Projector/Html/Backend/Rewrite.hs
haskell
| Global (backend-independent) rewrite rules. These should be type-preserving. # LANGUAGE OverloadedStrings # adjacent plaintext nodes - fold together rules for concat rule for append rules for list fold rules for isEmpty Fold together raw text nodes concat strings together fold lists together
# LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # # LANGUAGE PatternSynonyms # module Projector.Html.Backend.Rewrite ( globalRules ) where import P import Projector.Core import Projector.Html.Data.Prim globalRules :: [RewriteRule PrimT a] globalRules = fmap Rewrite [ ...
99a8c64c0e84e4fa6b2fc6bf39387eeafd90293fc69814c76fbda64cc2246882
aprolog-lang/aprolog
translate.ml
Alpha Prolog Translate : translate the results of unification back into human - readable absyn terms . human-readable absyn terms. *) module A = Absyn;; open Internal;; open Isym;; open Nstbl;; open Tcenv;; module T = Types;; let rec translate_ty sg env s = let h = translate_ty sg env in match s wit...
null
https://raw.githubusercontent.com/aprolog-lang/aprolog/410327a615919eb6827d71661e69de14279b8c50/src/translate.ml
ocaml
|translate_gm sg env t| Translates a term to internal syntax plus additional goals and existentially quantified variables. Occurrences of concretion are translated into new subgoals which eventually constrain the goal/program clause in which the concretion appears TODO: Add "is_var" to tenv, use it here ...
Alpha Prolog Translate : translate the results of unification back into human - readable absyn terms . human-readable absyn terms. *) module A = Absyn;; open Internal;; open Isym;; open Nstbl;; open Tcenv;; module T = Types;; let rec translate_ty sg env s = let h = translate_ty sg env in match s wit...
42b47ea26b330f6cd9b7485cba707a9012b5687857bc1a978e9a394aaec36ec6
craigl64/clim-ccl
font.lisp
;; -*- mode: common-lisp; package: tk -*- ;; See the file LICENSE for the full license governing this code. ;; (in-package :tk) (defclass font (ff:foreign-pointer) ((name :initarg :name :reader font-name))) (defmethod print-object ((x font) stream) (print-unreadable-object (x stream :type t :identity t) (for...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/tk/font.lisp
lisp
-*- mode: common-lisp; package: tk -*- See the file LICENSE for the full license governing this code. char-width and char-dimenstions could be more elegent if x11:xfontstruct-min-bounds was defined. The returned XCharStruct than the per-char-index. Need to investigate the def-c-type in --- Dont free the font info...
(in-package :tk) (defclass font (ff:foreign-pointer) ((name :initarg :name :reader font-name))) (defmethod print-object ((x font) stream) (print-unreadable-object (x stream :type t :identity t) (format stream "~A" (if (slot-boundp x 'name) (font-name x) :dunno)))) (defmethod initialize-instance :after ...
c79444837826af2797bc13ffc3bf8c694d1f47ca1986b1766f5d2eae57d8047a
pbrisbin/tee-io
SpecHelper.hs
module SpecHelper ( module SpecHelper , module X ) where import Application (makeFoundation, makeLogWare) import Database.Persist.Sql ( SqlBackend , SqlPersistM , connEscapeName , rawExecute , rawSql , runSqlPersistMPool , unSingle ) import LoadEnv (loadEnvFrom) import Yeso...
null
https://raw.githubusercontent.com/pbrisbin/tee-io/26f4643a7f44fafb9bf92f1c1f82a60309dc8b66/test/SpecHelper.hs
haskell
module SpecHelper ( module SpecHelper , module X ) where import Application (makeFoundation, makeLogWare) import Database.Persist.Sql ( SqlBackend , SqlPersistM , connEscapeName , rawExecute , rawSql , runSqlPersistMPool , unSingle ) import LoadEnv (loadEnvFrom) import Yeso...
3e2b4baa6df085d535a038c814ac3ae2fedb2930c6a2e27e3d04a4c6281a7589
yallop/ocaml-ctypes
driver.ml
* Copyright ( c ) 2014 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2014 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) (* Stub generation driver for...
null
https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/tests/test-arrays/stub-generator/driver.ml
ocaml
Stub generation driver for the arrays tests.
* Copyright ( c ) 2014 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2014 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) let () = Tests_common.run Sy...
e31475bc6e2a435fe88944d52bf5a4d9c578dccbd3452b8a6b1938f22e3c39f4
S8A/htdp-exercises
ex005.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-beginner-reader.ss" "lang")((modname ex5) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" ...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex005.rkt
racket
about the language level of this file in a form that our tools can easily process. Proportionality constants Portion of image occupied by leaves Portion of image left blank / percent difference between leaves' radii Portion of image occupied by trunk Dimensions of the image Size of the tree's leaves Size of the...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex5) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none #f...
1df7d9c7538c85219afbe472b78a40106f807a0d86fc0793bdd293293dd6db24
jasonrudolph/one-rep-max
git_deps.clj
(ns leiningen.git-deps "How this works: It clones projects into .lein-git-deps/<whatever>. If the directory already exists, it does a git pull and git checkout." (:require [clojure.java.shell :as sh] [clojure.java.io :as io] [clojure.string :as string])) (def ^{:private true :doc "...
null
https://raw.githubusercontent.com/jasonrudolph/one-rep-max/8bdc8eccd4f36cf91b0dd57b0a378efb1b24f7a3/src/leiningen/git_deps.clj
clojure
you can specify for 'git checkout', like a commit id or a branch name.
(ns leiningen.git-deps "How this works: It clones projects into .lein-git-deps/<whatever>. If the directory already exists, it does a git pull and git checkout." (:require [clojure.java.shell :as sh] [clojure.java.io :as io] [clojure.string :as string])) (def ^{:private true :doc "...
1fcd46d53e308e7fc03fd6f0d398b80db22cbe2c0bfc243641cf352a2c72c583
wangsix/VMO_repeated_themes_discovery
converter.lisp
;(in-package :common-lisp-user) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "csv-files" :type "lisp") *lisp-code-root*)) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "humdrum-by-col" :type "lisp") *lisp-code...
null
https://raw.githubusercontent.com/wangsix/VMO_repeated_themes_discovery/0082b3c55e64ed447c8b68bcb705fd6da8e3541f/JKUPDD-Aug2013/groundTruth/mozartK282Mvt2/monophonic/script/converter.lisp
lisp
(in-package :common-lisp-user) mono, no anacrusis.
(load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "csv-files" :type "lisp") *lisp-code-root*)) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "humdrum-by-col" :type "lisp") *lisp-code-root*)) (load (merge-pathnames...
5d88b5df61c956aa18177a9bc1b69b7a71afc44fff802f09f7fabe3c0f4d68df
Concordium/concordium-client
TransactionStatus.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} module Concordium.Client.Types.TransactionStatus where import qualified Data.Map.Strict as Map import Data.Aeson import Data.Aeson.TH import Concordium.Types.Execution import Concordium.Types import Concordium.Utils data TransactionState = Received | Co...
null
https://raw.githubusercontent.com/Concordium/concordium-client/346e4aa95a2c496ff1c01fc65bd47dc244f4cac3/src/Concordium/Client/Types/TransactionStatus.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Concordium.Client.Types.TransactionStatus where import qualified Data.Map.Strict as Map import Data.Aeson import Data.Aeson.TH import Concordium.Types.Execution import Concordium.Types import Concordium.Utils data TransactionState = Received | Committed | Finalized | Absent derivi...
d5bc43269b1748d4e6ca3aa9dec69313cdde917701dedbe186254e9cd7c6016e
rtoy/ansi-cl-tests
apropos.lsp
;-*- Mode: Lisp -*- Author : Created : Sun Dec 12 16:17:47 2004 ;;;; Contains: Tests for APROPOS (in-package :cl-test) (deftest apropos.1 (loop for n from 10 for x = (coerce (loop repeat n collect (random-from-seq +standard-chars+)) 'string) unless (apropos-list x) return (wit...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/apropos.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for APROPOS Error tests
Author : Created : Sun Dec 12 16:17:47 2004 (in-package :cl-test) (deftest apropos.1 (loop for n from 10 for x = (coerce (loop repeat n collect (random-from-seq +standard-chars+)) 'string) unless (apropos-list x) return (with-output-to-string (*standard-output*) ...
3faa401df804feab636e093f7b459302192530237aa7e1b8d67fe3e1961d080e
opencog/opencog
helpers.scm
(use-modules (srfi srfi-1)) ; For 'every' ; ======================================================================= ; Helper functions ; ======================================================================= ; ----------------------------------------------------------------------- ; set-values! -- Helpful macro for ...
null
https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/nlp/microplanning/helpers.scm
scheme
For 'every' ======================================================================= Helper functions ======================================================================= ----------------------------------------------------------------------- set-values! -- Helpful macro for storing multiple return values The...
( set - values ! ( a b ) ( values 5 7 ) ) resulting a = 5 , b = 7 (define-syntax set-values! (syntax-rules () ((_ () exp) (values) ) ((_ (v1 . rest) exp) (begin (set! v1 (call-with-values (lambda () exp) list)) (set-values! rest (apply values (cdr v1))) (set! v1 (car v1)) ) ) ) ) ...
9d2745b55701330bd718cc5d12748c1cf683d44f00c06e33dd0388910b230413
8c6794b6/haskell-sc-scratch
Pedestrians.hs
------------------------------------------------------------------------------ -- | -- Module : $Header$ CopyRight : ( c ) 8c6794b6 -- License : BSD3 Maintainer : -- Stability : unstable -- Portability : portable -- -- Pedestrian sounds. Corresponding url for this module is: -- -- <> -- module Des...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/designing-sound/src/DesigningSound/Pedestrians.hs
haskell
---------------------------------------------------------------------------- | Module : $Header$ License : BSD3 Stability : unstable Portability : portable Pedestrian sounds. Corresponding url for this module is: <>
CopyRight : ( c ) 8c6794b6 Maintainer : module DesigningSound.Pedestrians where import Sound.SC3 pedestrian :: UGen pedestrian = out 0 $ sig * pls where sig = sinOsc ar 2500 0 * 0.2 pls = lfPulse ar 5 0 0.5
aff2479f64c93cdac831190ca491a86f0b9fb3be8649fa7077993594ee125f7f
slyrus/abcl
with-output-to-string.lisp
;;; with-output-to-string.lisp ;;; Copyright ( C ) 2003 - 2005 $ Id$ ;;; ;;; 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 2 of the License , or ( at your option ) any la...
null
https://raw.githubusercontent.com/slyrus/abcl/881f733fdbf4b722865318a7d2abe2ff8fdad96e/src/org/armedbear/lisp/with-output-to-string.lisp
lisp
with-output-to-string.lisp This program is free software; you can redistribute it and/or either version 2 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 GNU General Pub...
Copyright ( C ) 2003 - 2005 $ Id$ modify it under the terms of the GNU General Public License of the License , or ( at your option ) any later version . You should have received a copy of the GNU General Public License Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA . (...
e3b535b2aee1643a042e521933920bc918495c8b19d2bd3452c0d5de20e3a131
byteally/webapi
main.hs
# LANGUAGE TypeFamilies , KindSignatures , MultiParamTypeClasses , DataKinds , FlexibleContexts , GADTs , TypeOperators , PolyKinds , UndecidableInstances , FlexibleInstances , DefaultSignatures , ScopedTypeVariables , ConstraintKinds , TemplateHaskell , OverloadedStrings , DeriveGeneric # module Main where import qua...
null
https://raw.githubusercontent.com/byteally/webapi/8d712d0ae786475b177beacee32dc40db320af4c/webapi/tests/main.hs
haskell
, pFloat :: Float , pDouble :: Double , pUTCTime :: UTCTime , pVector :: Vector Text , pByteString :: ByteString <*> arbitrary <*> arbitrary <*> elements [ <*> arbitrary <*> arbitrary <*> arbitrary return ()
# LANGUAGE TypeFamilies , KindSignatures , MultiParamTypeClasses , DataKinds , FlexibleContexts , GADTs , TypeOperators , PolyKinds , UndecidableInstances , FlexibleInstances , DefaultSignatures , ScopedTypeVariables , ConstraintKinds , TemplateHaskell , OverloadedStrings , DeriveGeneric # module Main where import qua...
0fa7b3ed1a31121e4c4a1dd000ddbd44136f3ab1f44324687052de886d6c265f
Hans-Halverson/myte
mir_adt_layout_builder.ml
open Basic_collections open Mir_adt_layout open Mir_builders open Mir_emit_utils open Mir_type open Mir_type_args_hashtbl module Ecx = Mir_emit_context let get_type_node_properties ~(ecx : Ecx.t) decl_node = let { Ast.TypeDeclaration.name = { Ast.Identifier.loc; _ } as id; _ } = decl_node in let binding = Bindings...
null
https://raw.githubusercontent.com/Hans-Halverson/myte/ac873f41337470c3366844d56a40eda3d03fb7e9/src/mir/mir_adt_layout_builder.ml
ocaml
Collect variants and sort by order they are defined in source Assign integer tags to each variant, of the smallest possible integer type Find field locs for all record variants Build templates for all data variants
open Basic_collections open Mir_adt_layout open Mir_builders open Mir_emit_utils open Mir_type open Mir_type_args_hashtbl module Ecx = Mir_emit_context let get_type_node_properties ~(ecx : Ecx.t) decl_node = let { Ast.TypeDeclaration.name = { Ast.Identifier.loc; _ } as id; _ } = decl_node in let binding = Bindings...
00251d1829ace43629a9f05d0335a1eae07e8c66c4131452f094551261a370ea
racket/compatibility
integer-set.rkt
#lang racket/base ;; deprecated library, see data/integer-set (require data/integer-set) (provide (except-out (all-from-out data/integer-set) subtract symmetric-difference count) (rename-out [subtract difference] [symmetric-d...
null
https://raw.githubusercontent.com/racket/compatibility/492030dac6f095045ce8a13dca75204dd5f34e32/compatibility-lib/mzlib/integer-set.rkt
racket
deprecated library, see data/integer-set
#lang racket/base (require data/integer-set) (provide (except-out (all-from-out data/integer-set) subtract symmetric-difference count) (rename-out [subtract difference] [symmetric-difference xor] [count c...
cf457666d1e75b50fc35c06daeb08f62d23c482ce47fdb14b1a2344f3cb727a7
ztellman/automat
eval.clj
(ns automat.compiler.eval (:refer-clojure :exclude [find compile]) (:require [proteus] [primitive-math :as p] [potemkin :refer :all] [automat.fsm :as fsm] [automat.compiler.core :as core]) (:import [automat.compiler.core ICompiledAutomaton CompiledAutomatonState])) (defn- inputs...
null
https://raw.githubusercontent.com/ztellman/automat/eacbb36184e26f633da5018e28af5755acb50123/src/automat/compiler/eval.clj
clojure
end of the line, return the state update value recur to next state, or return accepted state default value
(ns automat.compiler.eval (:refer-clojure :exclude [find compile]) (:require [proteus] [primitive-math :as p] [potemkin :refer :all] [automat.fsm :as fsm] [automat.compiler.core :as core]) (:import [automat.compiler.core ICompiledAutomaton CompiledAutomatonState])) (defn- inputs...
9c73e3180aa9425971240477c0a4ff6db7a6877a67bc4415c3a89aa376be69dd
mirage/irmin
node.mli
* Copyright ( c ) 2013 - 2022 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
null
https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin-git/node.mli
ocaml
* Copyright ( c ) 2013 - 2022 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
2b202de79f31973baed616b709d9929bbae624dc440ce869a6627a2d2e9bb8a9
MaartenFaddegon/Hoed
StackSet.hs
# LANGUAGE PatternGuards , DeriveGeneric , TypeSynonymInstances , FlexibleInstances # ----------------------------------------------------------------------------- -- | Module : XMonad . StackSet Copyright : ( c ) 2007 -- License : BSD3-style (see LICENSE) -- -- Maintainer : -- Stability :...
null
https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/examples/XMonad4__using_properties/XMonad/StackSet.hs
haskell
--------------------------------------------------------------------------- | License : BSD3-style (see LICENSE) Maintainer : Stability : experimental * Introduction $intro $zipper ** Master and Focus $focus * Construction $construction * Operations on the current stack $stackOperations $mo...
# LANGUAGE PatternGuards , DeriveGeneric , TypeSynonymInstances , FlexibleInstances # Module : XMonad . StackSet Copyright : ( c ) 2007 Portability : portable , 98 module XMonad.StackSet ( * * The * * Xinerama support $ xinerama StackSet(..), Workspace(..), Screen(..), Stack...
b063c5127663e52687d5939208ad3918337eef6b3957c1c11fbad63cd756af84
mfoemmel/erlang-otp
egd_font.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/percept/src/egd_font.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(egd_font). -export([load/1, size...
5d944460fd82f67b88e0d188b52b6664d9c159008d96bbd34a19705aa4325206
shortishly/pgmp
pgmp_calendar.erl
Copyright ( c ) 2022 < > %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software distributed under...
null
https://raw.githubusercontent.com/shortishly/pgmp/8176188fe27e5f7048f124e6e8ba6a2b8373d41e/src/pgmp_calendar.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissi...
Copyright ( c ) 2022 < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(pgmp_calendar). -export([decode/1]). -export([encode/1]). -export([epoch/1]). -export([epoch_date/1]). As microseconds since midnigh...
fa481d428c462f7330be3eacaef947e34c434bce91f19282c977ac8cc6381f05
funcool/cats
maybe.cljc
Copyright ( c ) 2014 - 2016 < > Copyright ( c ) 2014 - 2016 < > ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions ;; are met: ;; 1 . Redistributions of source code must retain the above copyr...
null
https://raw.githubusercontent.com/funcool/cats/120c8f99afff9d9d92f4f690392a1ce1dc68e0b6/src/cats/monad/maybe.cljc
clojure
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer in the document...
Copyright ( c ) 2014 - 2016 < > Copyright ( c ) 2014 - 2016 < > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS OR INCIDENTAL , SPECIAL , EXEMPL...