_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
1dfd40552c1644192ed133f090f3657a7f37abdbd67a6626c2416a08aea9ce19
crategus/cl-cffi-gtk
button-image.lisp
Example Simple Button ( 2021 - 5 - 19 ) (in-package :gtk-example) (defun image-label-box (filename text) (let ((box (make-instance 'gtk-box :orientation :horizontal :border-width 3)) (label (make-instance 'gtk-label :hex...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/b613a266a5f8e7f477b66a33d4df84fbed3dc7bc/demo/gtk-example/button-image.lisp
lisp
Example Simple Button ( 2021 - 5 - 19 ) (in-package :gtk-example) (defun image-label-box (filename text) (let ((box (make-instance 'gtk-box :orientation :horizontal :border-width 3)) (label (make-instance 'gtk-label :hex...
2076d1a87ca946743d576070c178fbb9959eb477692fc193c4177abde153dd3b
binaryage/chromex
music_manager_private.clj
(ns chromex.app.music-manager-private "musicManagerPrivate. * available since Chrome 36" (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer [gen-wrap-helper]] [chromex.callgen :refer [gen-call-helper gen-tap-all-events-call]])) (declare api-...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps_private/chromex/app/music_manager_private.clj
clojure
-- convenience ------------------------------------------------------------------------------------------------------------ --------------------------------------------------------------------------------------------------------------------------- -- API TABLE --------------------------------------------------------...
(ns chromex.app.music-manager-private "musicManagerPrivate. * available since Chrome 36" (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer [gen-wrap-helper]] [chromex.callgen :refer [gen-call-helper gen-tap-all-events-call]])) (declare api-...
d0d5299e869c91b05f5f707123dd3be6f9ec67466d59c16896a7dc7d10a64e7f
sigscale/snmp-collector
snmp_collector_manager_sup_sup.erl
%%% snmp_collector_manager_sup_sup.erl %%% vim: ts=3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2016 - 2020 SigScale Global Inc. %%% @end Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% you may not use this file except in compliance with the License. %%%...
null
https://raw.githubusercontent.com/sigscale/snmp-collector/cb6b95ed331abd6f258d8ea55bf34c57f2992444/src/snmp_collector_manager_sup_sup.erl
erlang
snmp_collector_manager_sup_sup.erl vim: ts=3 @end 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...
2016 - 2020 SigScale Global Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(snmp_collector_manager_sup_sup). -copyright('Copyright (c) 2016 - 2020 SigScale Global Inc.'). -behaviour(supervisor). -export([ini...
4518e787f66770999b2673341b5764f499cfc3e63f3509b6efe00b4bc039e5aa
argonaut-io/argonaut-hs
TestTemplates.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Data.Argonaut.TestTemplates where import Control.Monad.Identity import Data.Argonaut import Data.Traversable import Test.Hspec import Test.QuickCheck import Language.Haskell.TH buildEncodeDecodeTest :: [Name] -> Q Exp buildEncodeDecodeTest names ...
null
https://raw.githubusercontent.com/argonaut-io/argonaut-hs/41bfd798fce9178951abff1536ca290dee23a2cc/test/Data/Argonaut/TestTemplates.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Data.Argonaut.TestTemplates where import Control.Monad.Identity import Data.Argonaut import Data.Traversable import Test.Hspec import Test.QuickCheck import Language.Haskell.TH buildEncodeDecodeTest :: [Name] -> Q Exp buildEncodeDecodeTest names = join $ fmap (\doStatements -> [|d...
0610e1eaee2ddb8bf3c2bfb1c079ac27d47ee962efcbb3f346472257072ce226
ChrisLane/custom-lang-compiler
template.ml
let codegenx86_prefix = " .LC0: .string \"%d\\n\" .globl print .type print, @function print: pushq %rbp movq %rsp, %rbp subq $16, %rsp movl %edi, -4(%rbp) movl -4(%rbp), %eax movl %eax, %esi leaq .LC0(%rip), %rdi movl $0, %eax call printf@PLT leave ret // Begin injected program " let codegenx86_suffix =...
null
https://raw.githubusercontent.com/ChrisLane/custom-lang-compiler/b4ee1b2c5842b4029179763d49c40c379bd80354/src/main/template.ml
ocaml
let codegenx86_prefix = " .LC0: .string \"%d\\n\" .globl print .type print, @function print: pushq %rbp movq %rsp, %rbp subq $16, %rsp movl %edi, -4(%rbp) movl -4(%rbp), %eax movl %eax, %esi leaq .LC0(%rip), %rdi movl $0, %eax call printf@PLT leave ret // Begin injected program " let codegenx86_suffix =...
74b5953d48c1cc01bea9c31a244c57a7b7c69c724a9f048bce68d30053b49484
MLstate/opalang
pass_OpaDocApi.ml
Copyright © 2011 , 2012 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/opa/pass_OpaDocApi.ml
ocaml
depends in base refactoring in progress shorthands type alias for clarty traversed directive for finding fields of a module from a toplevel value to add doc type api directives * Merge access directive * extract annotation type of top-level values and type of their eventual fields (if the final ...
Copyright © 2011 , 2012 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
915b77331304aa81f30bd366bb12d8fd1597b89d548b0b3beaec340070244d8f
iamFIREcracker/adventofcode
day11.lisp
(defpackage :aoc/2015/11 #.cl-user::*aoc-use*) (in-package :aoc/2015/11) (defun next-char (ch) (if (char= ch #\z) #\a (code-char (1+ (char-code ch))))) (defun next-password (password) (labels ((recur (password &aux (ch (first password)) (ch-next (next-char ch))) (cond ((cha...
null
https://raw.githubusercontent.com/iamFIREcracker/adventofcode/c395df5e15657f0b9be6ec555e68dc777b0eb7ab/src/2015/day11.lisp
lisp
(defpackage :aoc/2015/11 #.cl-user::*aoc-use*) (in-package :aoc/2015/11) (defun next-char (ch) (if (char= ch #\z) #\a (code-char (1+ (char-code ch))))) (defun next-password (password) (labels ((recur (password &aux (ch (first password)) (ch-next (next-char ch))) (cond ((cha...
fd2abd5752516b34d2983fd8613693259f3911cf776d1b878471dd85b1537fbc
domainlanguage/time-count
d_composing_operations.clj
(ns time-count.explainer.d-composing-operations (:require [time-count.core :refer :all] [time-count.allens-algebra :refer [relation]] [time-count.iso8601 :refer [from-iso t-> t->>]] [midje.sweet :refer :all])) (fact "Two special threading macros let us use the concise and readable...
null
https://raw.githubusercontent.com/domainlanguage/time-count/f2d26a1e5fe1a137f5d1a01be295dde0385cc31e/explainers/time_count/explainer/d_composing_operations.clj
clojure
This may be mostly for tests and demos. Perhaps it will be used in some apps for data interchange. A more complex eom could preserve nesting and find last interval of same scale, etc. compose different payment terms
(ns time-count.explainer.d-composing-operations (:require [time-count.core :refer :all] [time-count.allens-algebra :refer [relation]] [time-count.iso8601 :refer [from-iso t-> t->>]] [midje.sweet :refer :all])) (fact "Two special threading macros let us use the concise and readable...
c8b64852af9218a3d539945b8528a09e2ceed8f98bb14362bd9997eb9018c8e1
deepmarker/xxh
xxh.ml
open Stdint external hash32 : bytes -> uint32 -> uint32 = "xxh32_stubs" external hash32_string : string -> uint32 -> uint32 = "xxh32_stubs" external hash32_ba : Base_bigstring.t -> uint32 -> uint32 = "xxh32_ba_stubs" external hash64 : bytes -> uint64 -> uint64 = "xxh64_stubs" external hash64_string : string -> uint64 ...
null
https://raw.githubusercontent.com/deepmarker/xxh/2d66ed30ce712e94502271585a8c23841ae22327/lib/xxh.ml
ocaml
open Stdint external hash32 : bytes -> uint32 -> uint32 = "xxh32_stubs" external hash32_string : string -> uint32 -> uint32 = "xxh32_stubs" external hash32_ba : Base_bigstring.t -> uint32 -> uint32 = "xxh32_ba_stubs" external hash64 : bytes -> uint64 -> uint64 = "xxh64_stubs" external hash64_string : string -> uint64 ...
ed692cf55e22d8cb3d5b2e981ff265bb9f67d4031add9ab5ccd40acd5e6d92a4
cl-axon/cl-aima
wumpus.lisp
-*- Mode : Lisp ; Syntax : Common - Lisp ; -*- Author : ;;;; Agents for the wumpus world (defstructure (wumpus-agent (:include agent (body (make-wumpus-agent-body)))) "The default wumpus agent gets an arrow.") (defstructure (random-wumpus-agent (:include wumpus-agent (program #'(lambda (percept) (dec...
null
https://raw.githubusercontent.com/cl-axon/cl-aima/1e6915fa9f3e5f2c6fd75952d674ebec53558d04/agents/agents/wumpus.lisp
lisp
Syntax : Common - Lisp ; -*- Author : Agents for the wumpus world
(defstructure (wumpus-agent (:include agent (body (make-wumpus-agent-body)))) "The default wumpus agent gets an arrow.") (defstructure (random-wumpus-agent (:include wumpus-agent (program #'(lambda (percept) (declare (ignore percept)) (random-element '(forward (turn right) (turn left) shoot grab ...
b7dddaac91e1d8717fbfca5ba065c3bca59cf1f92258cdd8c74344096bb1624b
ghilesZ/apronext
domain.ml
* This file is an extension for the Abstract1 module from the apron Library . It is not meant to be used as it is but through the instanciated modules Abox , and Aoct Library. It is not meant to be used as it is but through the instanciated modules Abox, Apol and Aoct *) open Apron (** Abstract d...
null
https://raw.githubusercontent.com/ghilesZ/apronext/e0850868a6e27cd7fca9fb5d91a3e00eaa072221/src/domain.ml
ocaml
* Abstract domain signature used by the following functor * Abstract element type * functor that hides the use of managers. It also adds few utilities to the Abstract1 module * Set-theoritic operations * predicates * constraint satisfaction and filter * of and to constraints/generator * Environment and varia...
* This file is an extension for the Abstract1 module from the apron Library . It is not meant to be used as it is but through the instanciated modules Abox , and Aoct Library. It is not meant to be used as it is but through the instanciated modules Abox, Apol and Aoct *) open Apron module type AD...
5d092c857877c13302af7d1f483c6c1c7028e9f134738dbf767615bb0c09e3ee
xh4/web-toolkit
primitives.lisp
;;;; Primitive parsers and combinators—axioms, so to speak. (in-package :maxpc) (defun ?end () "*Description:* {?end} matches the end of input. *Examples:* #code# (parse '() (?end)) → NIL, T, T (parse '(a) (?end)) → NIL, NIL, NIL #" (lambda (input) (when (input-empty-p input) input...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/maxpc-20171130-git/primitives.lisp
lisp
Primitive parsers and combinators—axioms, so to speak. Set union Set intersection Set difference
(in-package :maxpc) (defun ?end () "*Description:* {?end} matches the end of input. *Examples:* #code# (parse '() (?end)) → NIL, T, T (parse '(a) (?end)) → NIL, NIL, NIL #" (lambda (input) (when (input-empty-p input) input))) (defun =element () "*Description:* {=element} mat...
9398d747cfefa051faf3b98b8e59a44dacb8ee165d49f8e8e36bc247049c5a8d
REMath/mit_16.399
pretty_Print.mli
(* pretty_Print.mli *) open Abstract_Syntax val print_Aexp : aexp -> unit val print_Bexp : bexp -> unit val pretty_print : com -> unit
null
https://raw.githubusercontent.com/REMath/mit_16.399/3f395d6a9dfa1ed232d307c3c542df3dbd5b614a/project/Initialization-Simple-Sign/pretty_Print.mli
ocaml
pretty_Print.mli
open Abstract_Syntax val print_Aexp : aexp -> unit val print_Bexp : bexp -> unit val pretty_print : com -> unit
a26acd79f422640c718a2d7755de94f2900edd5d57c86d751b5f47310bbecea1
eugenehr/erlyconv
cp1252.erl
%% THIS FILE WAS AUTOMATICALLY GENERATED BY gen_src.pl FROM mappings / MICSFT / WINDOWS / CP1252.TXT AT 2016 - 08 - 19 -module(cp1252). -vsn(20160819). -export([to_unicode/1, from_unicode/1]). %% Public functions to_unicode(16#80) -> 16#20AC; to_unicode(16#82) -> 16#201A; to_unicode(16#83) -> 16#0192; to_unicode(16#...
null
https://raw.githubusercontent.com/eugenehr/erlyconv/ecdcd7db8f785c9638cd1ebad37ccd426c050cdf/src/cp1252.erl
erlang
THIS FILE WAS AUTOMATICALLY GENERATED BY gen_src.pl Public functions Private functions
FROM mappings / MICSFT / WINDOWS / CP1252.TXT AT 2016 - 08 - 19 -module(cp1252). -vsn(20160819). -export([to_unicode/1, from_unicode/1]). to_unicode(16#80) -> 16#20AC; to_unicode(16#82) -> 16#201A; to_unicode(16#83) -> 16#0192; to_unicode(16#84) -> 16#201E; to_unicode(16#85) -> 16#2026; to_unicode(16#86) -> 16#2020;...
06c18ad50d505feb74ba452bfadd2134f5743624d5db4a8efcfd13f0ba8ca07f
TristanCacqueray/ki-effectful
Ki.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ImportQualifiedPost # # LANGUAGE KindSignatures # {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Effectful.Ki ( -- * Effect StructuredConcurrency, -- * Handlers runStr...
null
https://raw.githubusercontent.com/TristanCacqueray/ki-effectful/6e868a208ca3f0e650bfab3d0ce2d95570a2ad19/src/Effectful/Ki.hs
haskell
# LANGUAGE RankNTypes # * Effect * Handlers * Core API * Extended API ** Thread options | Run the 'StructuredConcurrency' effect.
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ImportQualifiedPost # # LANGUAGE KindSignatures # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Effectful.Ki ( StructuredConcurrency, runStructuredConcurrency, Scope, Thread, scoped, fo...
51bd3bf1229f308e9614c50d4cd0f238d3afa34b7f325782e1671bf6b3fcb181
racket/racket7
symbol.rkt
#lang racket/base (require "../port/string-output.rkt" "../string/number.rkt" "write-with-max.rkt" "parameter.rkt" "config.rkt") (provide print-symbol symbol->print-string) (define (print-symbol sym o max-length config #:for-keyword? [for-keyword? #f]...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/io/print/symbol.rkt
racket
protect against a symbol looking like a number Need to use backslashes for quoting Can use bars for quoting:
#lang racket/base (require "../port/string-output.rkt" "../string/number.rkt" "write-with-max.rkt" "parameter.rkt" "config.rkt") (provide print-symbol symbol->print-string) (define (print-symbol sym o max-length config #:for-keyword? [for-keyword? #f]...
78079d66e3aa43bc3082f271407e2cde69c1befc79567476b2516c7917eb0478
inaka/apns4erl
apns.erl
%%% @doc Main module for apns4erl API. Use this one from your own applications. %%% Copyright 2017 Erlang Solutions Ltd. %%% 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 %%% %%% ...
null
https://raw.githubusercontent.com/inaka/apns4erl/da61decc9750e0ed2be3528f634fadfeec81ee21/src/apns.erl
erlang
@doc Main module for apns4erl API. Use this one from your own applications. 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...
Copyright 2017 Erlang Solutions Ltd. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , < > -module(apns). -author("Felipe Ripoll <>"). -export([ start/0 , stop/0 , connect/1 , connect/2 ,...
7a8f93dcdbbccf45ea1e6bae85e23f6470ed9caa47c896d44be7db6618c47a14
tommaisey/aeon
pan-b2.help.scm
;; (pan-b2 in azimuth gain) 2D Ambisonic B - format panner . Encode a mono signal to two ;; dimensional ambisonic B-format. The azimuth parameter is the position around the circle from -1 to +1 . -1 is behind , -0.5 is left , 0 is forward , +0.5 is right , +1 is behind . (let* ((p (pink-noise ar)) (...
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/panners/pan-b2.help.scm
scheme
(pan-b2 in azimuth gain) dimensional ambisonic B-format. The azimuth parameter is the
2D Ambisonic B - format panner . Encode a mono signal to two position around the circle from -1 to +1 . -1 is behind , -0.5 is left , 0 is forward , +0.5 is right , +1 is behind . (let* ((p (pink-noise ar)) (encoded (pan-b2 p (mouse-x kr -1 1 0 0.1) 0.1)) (decoded (decode-b2 4 (mce-chann...
59392905af2a30fab726c655188fabf6e0273fbf59ddde9b3c76f73db7ca10ac
rbkmoney/fistful-server
ff_destination_handler.erl
-module(ff_destination_handler). -behaviour(ff_woody_wrapper). -include_lib("fistful_proto/include/ff_proto_destination_thrift.hrl"). %% ff_woody_wrapper callbacks -export([handle_function/3]). %% %% ff_woody_wrapper callbacks %% -spec handle_function(woody:func(), woody:args(), woody:options()) -> {ok, woody:resul...
null
https://raw.githubusercontent.com/rbkmoney/fistful-server/60b964d0e07f911c841903bc61d8d9fb20a32658/apps/ff_server/src/ff_destination_handler.erl
erlang
ff_woody_wrapper callbacks ff_woody_wrapper callbacks Internals
-module(ff_destination_handler). -behaviour(ff_woody_wrapper). -include_lib("fistful_proto/include/ff_proto_destination_thrift.hrl"). -export([handle_function/3]). -spec handle_function(woody:func(), woody:args(), woody:options()) -> {ok, woody:result()} | no_return(). handle_function(Func, Args, Opts) -> scope...
06bf6bb9bc40d0ad20cae849422a24fa0f77d66458c8da37e21ef51a16a25789
fumieval/rhythm-game-tutorial
tutorial-active.hs
# LANGUAGE Rank2Types , ViewPatterns , FlexibleContexts # import Call hiding (new') import Audiovisual.Deck as Deck import Control.Lens import Control.Monad.State.Strict import Data.Foldable (foldMap) import qualified Data.Set as Set import Data.Set (Set) import System.IO.Unsafe import Data.List import Data.List.Split ...
null
https://raw.githubusercontent.com/fumieval/rhythm-game-tutorial/10c36f9594e562dc086b23aee641c6b0f7c5e53c/src/tutorial-active.hs
haskell
Discard the other events ^ timings ^ life span ^ the current time ^ phase before the limit criterion The song is over
# LANGUAGE Rank2Types , ViewPatterns , FlexibleContexts # import Call hiding (new') import Audiovisual.Deck as Deck import Control.Lens import Control.Monad.State.Strict import Data.Foldable (foldMap) import qualified Data.Set as Set import Data.Set (Set) import System.IO.Unsafe import Data.List import Data.List.Split ...
2d1d21eb3f05fffde45f88b9b9fd4c7d2f5a77c4888055cc5dc6243131fbd705
Frama-C/Frama-C-snapshot
temporary_location.ml
open Cil_types class vis = object(_) inherit Visitor.frama_c_inplace method! vvrbl vi = Kernel.result "%s -> %a" vi.vname Printer.pp_location vi.vdecl; Cil.DoChildren end let main () = Ast.compute (); Cil.visitCilFile (new vis :> Cil.cilVisitor) (Ast.get ()) let () = Db.Main.extend main
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/syntax/temporary_location.ml
ocaml
open Cil_types class vis = object(_) inherit Visitor.frama_c_inplace method! vvrbl vi = Kernel.result "%s -> %a" vi.vname Printer.pp_location vi.vdecl; Cil.DoChildren end let main () = Ast.compute (); Cil.visitCilFile (new vis :> Cil.cilVisitor) (Ast.get ()) let () = Db.Main.extend main
aeaab177e8635e6b277a18ca978b3e2716f28b2f8863488925da72bcb0518266
gafiatulin/codewars
Addition.hs
-- Functional Addition -- module Codewars.Kata.Addition where add n = (n+)
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/Addition.hs
haskell
Functional Addition
module Codewars.Kata.Addition where add n = (n+)
e8260e631048a6b97f2a1545a8d7b0ced78ae9006f739752d4e64daaaf0d2861
smimram/monadic-synth
formal.ml
(** Formal streams. *) (** Types. *) module T = struct (** A type. *) type _ t = | Float : float t | Pair : 'a t * 'b t -> ('a * 'b) t | Unit : unit t type ex_t = Ex : 'a t -> ex_t (** Proofs of type equlaity. *) type (_, _) eq = Refl : ('a, 'a) eq * Decide whether two types are equal . let ...
null
https://raw.githubusercontent.com/smimram/monadic-synth/db438e66ae9502f1a1343fb2acfa9736f245ead6/src/formal.ml
ocaml
* Formal streams. * Types. * A type. * Proofs of type equlaity. * Expressions. * A formal expression. * A typed formal expression. aka "existential wrapper" * A typing environment. * A state. * Compute the value of an evaluated expression. * Evaluate an expression. TODO: simplifications such as adding 0. ...
module T = struct type _ t = | Float : float t | Pair : 'a t * 'b t -> ('a * 'b) t | Unit : unit t type ex_t = Ex : 'a t -> ex_t type (_, _) eq = Refl : ('a, 'a) eq * Decide whether two types are equal . let rec decide : type a b . a t -> b t -> (a, b) eq option = fun x y -> match x, y with ...
b95a4ef46b2aa69bfae4aa9817b905fc9007bbc9a9dffe48839c1b1a8a0bce5f
thierry-martinez/clangml
clang__utils.mli
[%%metapackage "metapp"] [%%metadir "config/.clangml_config.objs/byte"] [%%metaload "config/clangml_config.cmxs"] open Clang__bindings open Clang__types val string_of_language : language -> string val language_of_string : string -> language val language_of_string_opt : string -> language option val suffix_of_lang...
null
https://raw.githubusercontent.com/thierry-martinez/clangml/d9501e74ea48d066eeba147fdcf9aeb3408c778f/clangml/clang__utils.mli
ocaml
* Compatibility wrapper for [parse_translation_unit2]. In case of error, [Error Failure] will be returned. * [iter_children f cur] calls [f] over all the direct child nodes of [cur]. * [iter_decl_attributes f cur] calls [f] over all the attributes of the declaration [cur]. * [iter_decl_attributes f c...
[%%metapackage "metapp"] [%%metadir "config/.clangml_config.objs/byte"] [%%metaload "config/clangml_config.cmxs"] open Clang__bindings open Clang__types val string_of_language : language -> string val language_of_string : string -> language val language_of_string_opt : string -> language option val suffix_of_lang...
5c70e403b759427c90b8358a35207c6a366e24e974a9c4fef96ec79b013fc3cc
shanecelis/emacsy
srfi-64.scm
Copyright ( c ) 2012 Copyright ( c ) 2005 , 2006 , 2007 Per Bothner ;; ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;; restriction, including without limitation the ri...
null
https://raw.githubusercontent.com/shanecelis/emacsy/fd1ff6a439a202bd645711cf9dbff9da111d40f7/support/scheme/srfi/srfi-64.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do so, subject to the following conditions: ...
Copyright ( c ) 2012 Copyright ( c ) 2005 , 2006 , 2007 Per Bothner files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WAR...
0151c472f86cb3bb32029b30398683d70eef660f9667b2597a0c9937619f9587
c-cube/iter
test_sexpr.ml
* { 2 Test iterators } (** print a list of items using the printing function *) let pp_list ?(sep = ", ") pp_item formatter l = Iter.pp_seq ~sep pp_item formatter (Iter.of_list l) (** Set of integers *) module ISet = Set.Make (struct type t = int let compare = compare end) let iset = (module ISet : Set.S with...
null
https://raw.githubusercontent.com/c-cube/iter/29ece562e2a1d4e62ca286ffd5af356851ab5bf5/examples/test_sexpr.ml
ocaml
* print a list of items using the printing function * Set of integers lists iterator, persistent, etc maps sum sexpr sexpr parsing/printing
* { 2 Test iterators } let pp_list ?(sep = ", ") pp_item formatter l = Iter.pp_seq ~sep pp_item formatter (Iter.of_list l) module ISet = Set.Make (struct type t = int let compare = compare end) let iset = (module ISet : Set.S with type elt = int and type t = ISet.t) module OrderedString = struct type t = s...
d35ef6a890012577aff4c794ad5e7ba88f8ee8bac59f3660af2fbfcbf5b4b245
guicho271828/alien
3-heuristic-common.lisp
(in-package :strips) (named-readtables:in-readtable :fare-quasiquote) ;;; heuristics (deftype scalar () "integer used to store g-value, h-value etc." `(unsigned-byte 16)) (deftype evaluator () '(function (state-id) scalar)) (deftype heuristics () '(function (state) scalar)) (deftype g-list () '(array sta...
null
https://raw.githubusercontent.com/guicho271828/alien/6987d034426b8928adf67f498dc6cb06fd7f923e/search/old/3-heuristic-common.lisp
lisp
heuristics
(in-package :strips) (named-readtables:in-readtable :fare-quasiquote) (deftype scalar () "integer used to store g-value, h-value etc." `(unsigned-byte 16)) (deftype evaluator () '(function (state-id) scalar)) (deftype heuristics () '(function (state) scalar)) (deftype g-list () '(array state-id)) (ftype...
30ebee6fd1261f374609c71328a426615d925e1a70b7fb97ff76347f83a44610
tweag/ormolu
op-chain-r-eq-colon-2-out.hs
Right chain , : case , 2 operators with p(a ) = = p (: ) k :: Int k = 1 ++ 2 ++ 3 ++ 4 : 5 ++ 6 ++ 7 ++ 8
null
https://raw.githubusercontent.com/tweag/ormolu/1f63136d047205f95b7d3c0f6aa34c34bb29ac7f/data/examples/declaration/value/function/infix/op-chain-r-eq-colon-2-out.hs
haskell
Right chain , : case , 2 operators with p(a ) = = p (: ) k :: Int k = 1 ++ 2 ++ 3 ++ 4 : 5 ++ 6 ++ 7 ++ 8
e45f0d8515c0989b1c2144009f09b00ce1006c847cb00668e362e68072b57759
qfpl/ban-instance
Ban.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeOperators #-} | Module : Language . Haskell . Instance . Ban Description : Declare that a typeclass instance should never exist . Copyright : ( c ) 2017 , Commonwealth Scientific and Industrial...
null
https://raw.githubusercontent.com/qfpl/ban-instance/fa47713251ba76ceaef92407c2ed3a6acf635182/src/Language/Haskell/Instance/Ban.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # TODO: Overlappable instances? | Ban an instance of a typeclass; code which tries to use the banned instance will fail at compile time. This works by generating an instance that depends on a custom type error: @ ... @ Use it like this: @ @ ^ The i...
# LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # | Module : Language . Haskell . Instance . Ban Description : Declare that a typeclass instance should never exist . Copyright : ( c ) 2017 , Commonwealth Scientific and Industrial Research Organisation License : : Stability : e...
864669d9523defe86d8bb7ac45373a498abbaa1af497a671e0aa93fbbdc2303d
mzp/coq-ide-for-ios
extraction.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/CoqIDE/coq-8.2pl2/plugins/extraction/extraction.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i i A set of all fixpoint functions...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : extraction.ml 13795...
d209d0b66ed9ffba35d15f978900a7ef9bfe5ea1070d4826118c9d78789fc032
screenshotbot/screenshotbot-oss
all.lisp
;;;; Copyright 2018-Present Modern Interpreters Inc. ;;;; This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (pkg:define-package :screenshotbot/slack (:use #:cl #:alexandria) (:u...
null
https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/053a95a8ac234b20b12d4182dccc3065e594ee53/src/screenshotbot/slack/all.lisp
lisp
Copyright 2018-Present Modern Interpreters Inc.
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (pkg:define-package :screenshotbot/slack (:use #:cl #:alexandria) (:use-reexport #:screenshotbot/slack/plugin))
a116df1215f230331a05e6c586eb381a82f26dabfa5c71aaff40f2b17da50803
emgrasmeder/clojenetics
utils_test.clj
(ns clojenetics.logics.utils-test (:require [clojure.test :refer :all] [clojenetics.logics.utils :as utils] [clojenetics.logics.setters :as setters]))
null
https://raw.githubusercontent.com/emgrasmeder/clojenetics/6eb1986895e30c64b49ef6ea2b91db475a3f97a7/test/clojenetics/logics/utils_test.clj
clojure
(ns clojenetics.logics.utils-test (:require [clojure.test :refer :all] [clojenetics.logics.utils :as utils] [clojenetics.logics.setters :as setters]))
60a59761e4fb87ab6588dc29775101c5b5eec650f293f87b168ced0971aa7039
oconn/re-frame-notifier
events.cljs
(ns re-frame-notifier.events (:require [re-frame.core :refer [reg-event-fx reg-fx]] [re-frame-notifier.helpers :refer [random-id pluralize-keyword keywordize-str]])) (defn- loc...
null
https://raw.githubusercontent.com/oconn/re-frame-notifier/bcc4b9e4529f640292d6e218e784b37f2204dc48/src/cljs/re_frame_notifier/events.cljs
clojure
(ns re-frame-notifier.events (:require [re-frame.core :refer [reg-event-fx reg-fx]] [re-frame-notifier.helpers :refer [random-id pluralize-keyword keywordize-str]])) (defn- loc...
f5fe34876c7b70e48ab498982bcda257508fe356e3b9f731f22dc73e075dd1d6
clj-kondo/clj-kondo
nested_namespaced_maps.clj
(ns nested-namespaced-maps (:require [clojure.test :as it])) (defn test-fn [map] (println #::it {:a #::it {}})) (test-fn #::it{:a 1}) ;; correct (test-fn #::it{:a 1} 1) ;; invalid #::it{:a 1 :a 2}
null
https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/corpus/nested_namespaced_maps.clj
clojure
correct invalid
(ns nested-namespaced-maps (:require [clojure.test :as it])) (defn test-fn [map] (println #::it {:a #::it {}})) #::it{:a 1 :a 2}
3275d49c642f766cfc0efa6eba1e382a13a6f8e5e87d36e709031c70c39ef97a
grin-compiler/ghc-wpc-sample-programs
StyleReader.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE Arrows #-} # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # | Module : Text . Pandoc . Readers . Odt . StyleReader Copyright : Copyright ( C ) 2015 License : GNU GPL , version 2 or above Maintainer : < > St...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/Readers/Odt/StyleReader.hs
haskell
# LANGUAGE CPP # # LANGUAGE Arrows # ------------------------------------------------------------------------------ Reader for font declarations and font pitches ------------------------------------------------------------------------------ In these cases, the pitch can help deciding as what to d...
# LANGUAGE RecordWildCards # # LANGUAGE TupleSections # | Module : Text . Pandoc . Readers . Odt . StyleReader Copyright : Copyright ( C ) 2015 License : GNU GPL , version 2 or above Maintainer : < > Stability : alpha Portability : portable Reader for the s...
7d78be802e3d98af77a33cbdab3426a09a432490cfb6465b48692e4f7b3c9efd
tamarit/edd
sum_digits_ok.erl
-module(sum_digits_ok). -compile([export_all]). sum_digits(N) -> sum_digits(N,10). sum_digits(N,B) -> sum_digits(N,B,0). sum_digits(0,_,Acc) -> Acc; sum_digits(N,B,Acc) when N < B -> Acc+N; sum_digits(N,B,Acc) -> sum_digits(N div B, B, Acc + (N rem B)).
null
https://raw.githubusercontent.com/tamarit/edd/867f287efe951bec6a8213743a218b86e4f5bbf7/examples/Unified_Framework/sum_digits/sum_digits_ok.erl
erlang
-module(sum_digits_ok). -compile([export_all]). sum_digits(N) -> sum_digits(N,10). sum_digits(N,B) -> sum_digits(N,B,0). sum_digits(0,_,Acc) -> Acc; sum_digits(N,B,Acc) when N < B -> Acc+N; sum_digits(N,B,Acc) -> sum_digits(N div B, B, Acc + (N rem B)).
2d4b71b73b76253a174c76b638e473fccfed0b78f6e08066a77b8ef5a67b16eb
garrigue/labltk
jg_multibox.ml
(*************************************************************************) (* *) (* OCaml LablTk library *) (* *) ,...
null
https://raw.githubusercontent.com/garrigue/labltk/c7f50b4faed57f1ac03cb3c9aedc35b10d36bdb6/browser/jg_multibox.ml
ocaml
*********************************************************************** OCaml LablTk library ...
, Kyoto University RIMS Copyright 1999 Institut National de Recherche en Informatique et en Automatique and Kyoto University . All rights reserved . This file is distributed under the terms of the GNU Library $ Id$ open StdLabels let rec gen_l...
a4f5bb253bd2112c22c4e3066e9d3dddec2cc1d5e783afc5685827ae16ad71ee
input-output-hk/cardano-wallet-legacy
Active.hs
# LANGUAGE LambdaCase # module Cardano.Wallet.WalletLayer.Kernel.Active ( pay , estimateFees , createUnsignedTx , submitSignedTx , redeemAda ) where import qualified Serokell.Util.Base16 as B16 import Universum import Data.Coerce (coerce) import qualified Data.List.NonEmpty as NE im...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/src/Cardano/Wallet/WalletLayer/Kernel/Active.hs
haskell
| Generates a new transaction @and submit it as pending@. Pay the payees | Verifies that the `NetworkMagic` of each payee address matches the | Estimates the fees for a payment. | Creates a raw transaction. transaction which will be signed and submitted to the blockchain later. It returns a transaction and a ...
# LANGUAGE LambdaCase # module Cardano.Wallet.WalletLayer.Kernel.Active ( pay , estimateFees , createUnsignedTx , submitSignedTx , redeemAda ) where import qualified Serokell.Util.Base16 as B16 import Universum import Data.Coerce (coerce) import qualified Data.List.NonEmpty as NE im...
1254eb3422e412befaf3580f3a6927d2ac0d652cc8af6bcf8477106cc03e2479
ndmitchell/supero
Evens.hs
module Main where : : Int - > Int - > Bool = mod x n /= 0 the_filter :: [Int] -> [Int] the_filter ns = case ns of (n:ns) -> filter (isdivs n) ns [] -> error "the_filter" evens :: [Int] evens = the_filter (iterate suCC 2) main x = evens !! x filter f x = case x of [] -> [] x:xs -> case f x of ...
null
https://raw.githubusercontent.com/ndmitchell/supero/a8b16ea90862e2c021bb139d7a7e9a83700b43b2/supero3/samples/simple/Evens.hs
haskell
module Main where : : Int - > Int - > Bool = mod x n /= 0 the_filter :: [Int] -> [Int] the_filter ns = case ns of (n:ns) -> filter (isdivs n) ns [] -> error "the_filter" evens :: [Int] evens = the_filter (iterate suCC 2) main x = evens !! x filter f x = case x of [] -> [] x:xs -> case f x of ...
a39c2c45b56c4926171c94e27a695e125099f9a21b6e946099223e2545a29619
Opetushallitus/ataru
form_tools.cljs
(ns ataru.hakija.form-tools (:require [clojure.zip :as z])) (defn- questions->zipper [questions] (let [root-node {:children questions}] (z/zipper map? :children #(assoc %1 :children %2) root-node))) (defn- zipper->questions [zipper] (:children (z/root zipper))) (defn- conditional-replace [zipper pred...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/3ea053206f9a7cc11b9f2d56b888f18cdc94e686/src/cljs/ataru/hakija/form_tools.cljs
clojure
(ns ataru.hakija.form-tools (:require [clojure.zip :as z])) (defn- questions->zipper [questions] (let [root-node {:children questions}] (z/zipper map? :children #(assoc %1 :children %2) root-node))) (defn- zipper->questions [zipper] (:children (z/root zipper))) (defn- conditional-replace [zipper pred...
775927cb4883615fda688eccbf74e81236fbba656287a21fc8561e3bea1d3490
rrnewton/haskell-lockfree
Reference.hs
{-# LANGUAGE BangPatterns #-} -- | This reference version is implemented with atomicModifyIORef and can be a useful fallback if one of the other implementations needs to be debugged for a given -- architecture. module Data.Atomics.Counter.Reference (AtomicCounter, CTicket, newCounter, readCount...
null
https://raw.githubusercontent.com/rrnewton/haskell-lockfree/87122157cbbc96954fcc575b4b110003d3e5c2f8/atomic-primops/benchmarking/Reference.hs
haskell
# LANGUAGE BangPatterns # | This reference version is implemented with atomicModifyIORef and can be a useful architecture. ------------------------------------------------------------------------------ | Create a new counter initialized to the given value. | Try repeatedly until we successfully increment the counte...
fallback if one of the other implementations needs to be debugged for a given module Data.Atomics.Counter.Reference (AtomicCounter, CTicket, newCounter, readCounterForCAS, readCounter, peekCTicket, writeCounter, casCounter, incrCounter, incrCounter_) where import Control.Monad (...
dccedba001c9e27375bcefa12a0c2077b9934a7d0a649aa9c5882da39b678c76
geoffder/dometyl-keyboard
columns.mli
open! OCADml open! OSCADml type t = (Column.t IMap.t[@cad.d3]) [@@deriving cad] val key : t -> int -> int -> Key.t option val key_exn : t -> int -> int -> Key.t val to_scad : t -> Scad.d3
null
https://raw.githubusercontent.com/geoffder/dometyl-keyboard/5efa847361e0ceb80de5b03dd28a702d6b42412d/lib/columns.mli
ocaml
open! OCADml open! OSCADml type t = (Column.t IMap.t[@cad.d3]) [@@deriving cad] val key : t -> int -> int -> Key.t option val key_exn : t -> int -> int -> Key.t val to_scad : t -> Scad.d3
c1183a639e2e3758a87ce90f25fc8ef4c5a788242936d7506ad8a0e7562ddd3b
MagnusS/okra
item.mli
* Copyright ( c ) 2021 * Copyright ( c ) 2021 < > * * 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 P...
null
https://raw.githubusercontent.com/MagnusS/okra/f0f027a1459a49ae40fe192100f54cb6ec5efdcb/src/item.mli
ocaml
* Copyright ( c ) 2021 * Copyright ( c ) 2021 < > * * 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 P...
30d8494d52d44662fffafc4ede66bb857a279272b6a8b8a81d21f2f48f21d9b4
inhabitedtype/ocaml-aws
test_lwt.ml
open Aws_route53_test module T = TestSuite (struct type 'a m = 'a Lwt.t let run_request = Aws_lwt.Runtime.run_request let un_m = Lwt_main.run end)
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/route53/lib_test/test_lwt.ml
ocaml
open Aws_route53_test module T = TestSuite (struct type 'a m = 'a Lwt.t let run_request = Aws_lwt.Runtime.run_request let un_m = Lwt_main.run end)
e989a5285ecc24714620470875417388ddfcff403e21b0af132a51684b256624
erlang/corba
StackModule_Stack_impl.erl
%%-------------------------------------------------------------------- %% %% %CopyrightBegin% %% Copyright Ericsson AB 1997 - 2016 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain ...
null
https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/orber/examples/Stack/StackModule_Stack_impl.erl
erlang
-------------------------------------------------------------------- %CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY...
Copyright Ericsson AB 1997 - 2016 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , StackModule_Stack_impl example file . -module('StackModule_Stack_impl'). -include_lib("orber/include/corba.hrl"). ...
9f4fff39af319cfb7d7e6d3ee6e6bedfd941484c0a0c73e0ff834fb49fa062b0
craff/pacomb
bench.ml
let create () = (* when bench are created, no more compaction to keep it manual *) Gc.(set { (get ()) with max_overhead = 1_000_000 }); ref [] let parse_string bench gram blank s = let _ = Grammar.compile gram in let _ = Gc.compact () in let size = String.length s in let t0 = Unix.gettimeofday () in l...
null
https://raw.githubusercontent.com/craff/pacomb/3e83f56bc483f6b9c495ae91d773aa9b484eb321/lib/bench.ml
ocaml
when bench are created, no more compaction to keep it manual Parsing.clear_parser () does not seem to work! we fork again!
let create () = Gc.(set { (get ()) with max_overhead = 1_000_000 }); ref [] let parse_string bench gram blank s = let _ = Grammar.compile gram in let _ = Gc.compact () in let size = String.length s in let t0 = Unix.gettimeofday () in let r = Grammar.parse_string gram blank s in let t1 = Unix.gettimeof...
58cfeca693f181a02a99b34f99001ea3acd13e617f1a91cf94001a269fdc915c
pimlu/fractran
Browser.hs
import Asterius.Types import BrowserApi hsRunDynamic :: Int -> JSString -> JSString -> IO JSString hsRunDynamic k fractions input = fmap toJSString res where res = runDynamic k (fromJSString fractions) (fromJSString input) foreign export javascript "hsRunDynamic" hsRunDynamic :: Int -> JSString -> JSString -> IO J...
null
https://raw.githubusercontent.com/pimlu/fractran/81d9c3e50a38e2788b80fb9b538561a9e66395f3/src/Browser.hs
haskell
import Asterius.Types import BrowserApi hsRunDynamic :: Int -> JSString -> JSString -> IO JSString hsRunDynamic k fractions input = fmap toJSString res where res = runDynamic k (fromJSString fractions) (fromJSString input) foreign export javascript "hsRunDynamic" hsRunDynamic :: Int -> JSString -> JSString -> IO J...
3b47de9cb2dbe6fe08b4bfe551a4608b9e20b860d913cf4259eae6e9681a1578
tnelson/Margrave
verification.scm
;; To load Margrave. You might have to change the path to where you have installed . (load-relative "../../code/Margrave.scm") To include 's functions in this namespace . (require margrave) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Properties ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/tnelson/Margrave/24192875df8d1092fab5caa0b9cf0d8de57f4787/old-xacml/verification.scm
scheme
To load Margrave. Properties Pr_1 Policy -> bool This is implimented by ensuring the no request falls into both the set of and command Assign and the set of requests that are permited. This produces all the counter-examples to Pr_1. If none exist (the property holds), Pr_2 Policy -> bool This is imp...
You might have to change the path to where you have installed . (load-relative "../../code/Margrave.scm") To include 's functions in this namespace . (require margrave) " There do not exist members of Student who can Assign ExternalGrades . " requests that include the role Student , resource - class Extern...
3622bd8d210d547be0b7414604b80b1f168f16181bc0a687c19c34a6e2161ea1
LeventErkok/sbv
ArithSolver.hs
----------------------------------------------------------------------------- -- | -- Module : TestSuite.Basics.ArithSolver Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- -- Test suite for basic non-concrete arithmetic, i.e., testing all basic arithmetic reasoning using an...
null
https://raw.githubusercontent.com/LeventErkok/sbv/45c6f3acaafb42715eb24995813150e5e23d0971/SBVTestSuite/TestSuite/Basics/ArithSolver.hs
haskell
--------------------------------------------------------------------------- | Module : TestSuite.Basics.ArithSolver License : BSD3 Maintainer: Stability : experimental Test suite for basic non-concrete arithmetic, i.e., testing all constant folding. --------------------------------------------------------...
Copyright : ( c ) basic arithmetic reasoning using an SMT solver without any # LANGUAGE ScopedTypeVariables # module TestSuite.Basics.ArithSolver(tests) where import Data.SBV.Internals hiding (free, free_) import Utils.SBVTestFramework import Data.List (genericIndex, isInfixOf, isPrefixOf, isSuffixOf, generi...
57e7956bb28d84da972f40e944d0029615fb2eff9ea7907683be6bd2ffc25aa9
avsm/mirage-duniverse
src_pos.ml
for lexing positions : - lnum starts from 1 - cnum starts from 0 - pos_bol is the position of the first character of the line for absolute pos : - row starts from 1 - col starts from 1 for relative pos , obviously 0 means same position - lnum starts from 1 - cnum starts fr...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/sexplib/src/src_pos.ml
ocaml
operations that make sense for both absolute and relative positions
for lexing positions : - lnum starts from 1 - cnum starts from 0 - pos_bol is the position of the first character of the line for absolute pos : - row starts from 1 - col starts from 1 for relative pos , obviously 0 means same position - lnum starts from 1 - cnum starts fr...
f590065bdf74e3ad8db6f5b233bd52e7b92b1f3957e1a125edf5ed7dca826993
jlollis/sicp-solutions
1.09.scm
#lang sicp Exercise 1.9 : Each of the following two procedures defines a method for adding two positive integers in terms of the procedures inc , which increments its argument by 1 , and dec , which decrements its argument by 1 . ; (define (+ a b) ; (if (= a 0) ; b ; (inc (+ (dec a ) b)))) ; (define ...
null
https://raw.githubusercontent.com/jlollis/sicp-solutions/7b03befcfe82e26a7fb28d94bc99292bc484f9dd/Chapter%201%20Exercises/1.09.scm
scheme
(define (+ a b) (if (= a 0) b (inc (+ (dec a ) b)))) (define (+ a b) (if (= a 0) b (+ (dec a) (inc b)))) Using the substitution model, illustrate the process generated by each procedure in evaluating (+ 4 5). Are these processes iterative or recursive? Recursive: (+ 4 5) (inc (+ 3 5...
#lang sicp Exercise 1.9 : Each of the following two procedures defines a method for adding two positive integers in terms of the procedures inc , which increments its argument by 1 , and dec , which decrements its argument by 1 . (define (+ a b) (if (= a 0) b (inc (+ (dec a) b)))) ( inc ( inc (...
bb31dcfa2e24ce536e10255a48e63bb6c6ca357b84d5b07c4979e74a89c93b88
goldfirere/video-resources
Set.hs
module Set ( Set, empty, unit, union, inSet, delete ) where newtype Set a -- kept abstract = Elements [a] -- INVARIANTS: 1 ) in increasing order according to ` a ` 's instance -- 2) no duplicates deriving Show -- for debugging only empty :: Set a empty = Elements [] unit :: a -> Set a unit x =...
null
https://raw.githubusercontent.com/goldfirere/video-resources/8bc06dd701f308564c13ac1b802f8812158636d0/2020-12-21-roles-abstraction/Set.hs
haskell
kept abstract INVARIANTS: 2) no duplicates for debugging only don't prepend 'a'; it might have *another* dup
module Set ( Set, empty, unit, union, inSet, delete ) where = Elements [a] 1 ) in increasing order according to ` a ` 's instance empty :: Set a empty = Elements [] unit :: a -> Set a unit x = Elements [x] union :: Ord a => Set a -> Set a -> Set a union (Elements xs) (Elements ys) = Elements (merge xs ys...
dce7a872191369c5fd4846de85a29628a989e97482032f10282475b1ebe33f9d
jeremyschlatter/chime
Common.hs
module Common (module Common, module BasePrelude) where import BasePrelude hiding (map) bind :: Monad m => m a -> (a -> m b) -> m b bind = (>>=) map :: Functor f => (a -> b) -> f a -> f b map = fmap (.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d (.:) = (.) . (.) infixr 8 .: (<%>) :: (Traversable t, Applicative f...
null
https://raw.githubusercontent.com/jeremyschlatter/chime/bef98bbf4010f52e183b1282f54eb6be44097470/src/Common.hs
haskell
# WARNING unfinished "This code is unfinished" #
module Common (module Common, module BasePrelude) where import BasePrelude hiding (map) bind :: Monad m => m a -> (a -> m b) -> m b bind = (>>=) map :: Functor f => (a -> b) -> f a -> f b map = fmap (.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d (.:) = (.) . (.) infixr 8 .: (<%>) :: (Traversable t, Applicative f...
f9a546a746a13f870fb555120b8e32daf5f46648d9cac9f20828f2ce7bb78e1f
HuwCampbell/orc-haskell
Integers.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DoAndIfThenElse #-} # LANGUAGE NoImplicitPrelude # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE LambdaCase # # LANGUAGE PatternGuards # # LANGUAGE ForeignFunctionInterface...
null
https://raw.githubusercontent.com/HuwCampbell/orc-haskell/259649bc5fa5c6d8bd850fdad0517af6c028e00e/src/Orc/Serial/Binary/Internal/Integers.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE CPP # # LANGUAGE DoAndIfThenElse # # LANGUAGE ScopedTypeVariables # getLabelledSet = do readSoFar <- Get.bytesRead remaining <- Get.remaining | Fixup a nanoseconds. The specification appears to be incorrect in specifying how...
# LANGUAGE NoImplicitPrelude # # LANGUAGE LambdaCase # # LANGUAGE PatternGuards # # LANGUAGE ForeignFunctionInterface # # LANGUAGE FlexibleContexts # # LANGUAGE TypeApplications # module Orc.Serial.Binary.Internal.Integers ( decodeIntegerRLEv1 , decodeBase128V...
27f15489c8ed4acace6d308e3fa7ed95694dda5fb6734bf4356e77b9179c624e
pjones/playlists
doctest.hs
This file is part of the package playlists . It is subject to the license terms in the LICENSE file found in the top - level directory of this distribution and at git . No part of playlists package , including this file , may be copied , modified , propagated , or distributed except according to the terms c...
null
https://raw.githubusercontent.com/pjones/playlists/35e4a91e599eac4a1c6f24500d120692e709fd1f/test/doctest.hs
haskell
| Wrapper around doctest to make sure examples in the source code work. Totally stupid right now. Will search the directory later. @ $ find src -type f -name '*.hs' @ cabal directly though. | Check the docs.
This file is part of the package playlists . It is subject to the license terms in the LICENSE file found in the top - level directory of this distribution and at git . No part of playlists package , including this file , may be copied , modified , propagated , or distributed except according to the terms c...
b28c975ff1a71720e32ed837d98a2a72e4dd7bc0c2bd5e0a9fe835e7a7dc5dcc
adrieng/melitte
Position.mli
(** Extension of standard library's positions. *) * { 2 Extended lexing positions } (** Abstract type for pairs of positions in the lexing stream. *) type t type position = t (** Decoration of a value with a position. *) type 'a located = { value : 'a; position : t; } (** [value dv] returns t...
null
https://raw.githubusercontent.com/adrieng/melitte/be2ecb3971c60f0ccf301330d61a8e56447ce636/src/Position.mli
ocaml
* Extension of standard library's positions. * Abstract type for pairs of positions in the lexing stream. * Decoration of a value with a position. * [value dv] returns the raw value that underlies the decorated value [dv]. * [position dv] returns the position that decorates the decorated value [dv]. * [des...
* { 2 Extended lexing positions } type t type position = t type 'a located = { value : 'a; position : t; } val value: 'a located -> 'a val position: 'a located -> t val destruct: 'a located -> 'a * t val located : ('a -> 'b) -> 'a located -> 'b val with_pos : t -> 'a -> 'a located * [ wi...
269b572a2a11c9b9288e2f98d82bb584ac84a33ce1a99cf64dca8a325f1149d9
mikera/orculje
plan.clj
(ns mikera.orculje.plan "Namespace for orculja planning engine." (:require [clojure.core.logic :as lg :refer [run* run membero unify fail succeed conde conso project]]) (:require [mikera.orculje.core :as orc])) (def actions '[{:desc "Navigate" :pre () :p...
null
https://raw.githubusercontent.com/mikera/orculje/4c7f9af78f9a8744e1ab3aef3ded151306883083/src/main/clojure/mikera/orculje/plan.clj
clojure
"Non-relational - check if a precondition holds in a given game." ([game precond] (conde [(lg/== [:location ] precond) ()])))
(ns mikera.orculje.plan "Namespace for orculja planning engine." (:require [clojure.core.logic :as lg :refer [run* run membero unify fail succeed conde conso project]]) (:require [mikera.orculje.core :as orc])) (def actions '[{:desc "Navigate" :pre () :p...
8555f3cc9b8786ad49a2c420e0cefd34ee637ac972156ac1ea950300c5948833
NoobsEnslaver/scheme_book
getting_started.scm
-*- coding : utf-8 ; -*- "Hi Mom!" → "Hi Mom!" "hello" → "hello" 42 → 42 22/7 → 22/7 3.141592653 → 3.141592653 + → #<procedure> (+ 76 31) → 107 (* -12 10) → -120 '(a b c d) → (a b c d) (car '(a b c)) → a (cdr '(a b c)) → (b c) (cons 'a '(b c)) → (a b c) (cons (car '(a b c)) (cdr '(d e f))) → (a e f) (define ...
null
https://raw.githubusercontent.com/NoobsEnslaver/scheme_book/48091a6f6afd08fa8e0a2b1d12a0df4e5e785cdb/src/scheme/getting_started.scm
scheme
-*-
"Hi Mom!" → "Hi Mom!" "hello" → "hello" 42 → 42 22/7 → 22/7 3.141592653 → 3.141592653 + → #<procedure> (+ 76 31) → 107 (* -12 10) → -120 '(a b c d) → (a b c d) (car '(a b c)) → a (cdr '(a b c)) → (b c) (cons 'a '(b c)) → (a b c) (cons (car '(a b c)) (cdr '(d e f))) → (a e f) (define square (lambda (n) (*...
91693ca8617e135cc2fb818b7ff36c748a9c26d22250f012892c1ecff4449fba
xapi-project/xen-api
rrdd_server.mli
val has_vm_rrd : string -> bool val push_rrd_local : string -> int -> unit val push_rrd_remote : string -> string -> unit val remove_rrd : string -> unit val migrate_rrd : string option -> string -> string -> string -> unit val send_host_rrd_to_master : string -> unit val backup_rrds : string option -> unit -> un...
null
https://raw.githubusercontent.com/xapi-project/xen-api/20b0574fa0f60c72b5a8eeafbc84bb485ebb6c22/ocaml/xcp-rrdd/bin/rrdd/rrdd_server.mli
ocaml
val has_vm_rrd : string -> bool val push_rrd_local : string -> int -> unit val push_rrd_remote : string -> string -> unit val remove_rrd : string -> unit val migrate_rrd : string option -> string -> string -> string -> unit val send_host_rrd_to_master : string -> unit val backup_rrds : string option -> unit -> un...
0da35db07d3339d922050eb635c441851bc8a832fee22b606e244b66fae09870
vinted/kafka-elasticsearch-tool
stdout.clj
(ns sink.stdout (:require [jsonista.core :as json]) (:import (java.io BufferedWriter PrintWriter))) (defn store! "JSON encodes each record and writes it to stdout." [records opts] (let [^PrintWriter writer (PrintWriter. (BufferedWriter. *out* (* 1024 8192)))] (doseq [record records] (.println write...
null
https://raw.githubusercontent.com/vinted/kafka-elasticsearch-tool/d7edb0a064a20d636bdfdaae4a6c32c23f360b99/src/sink/stdout.clj
clojure
(ns sink.stdout (:require [jsonista.core :as json]) (:import (java.io BufferedWriter PrintWriter))) (defn store! "JSON encodes each record and writes it to stdout." [records opts] (let [^PrintWriter writer (PrintWriter. (BufferedWriter. *out* (* 1024 8192)))] (doseq [record records] (.println write...
c1cbf675fcaaf92afcf95bf95ed5ca80880ffce41d2ecabec0d123e149cabae2
xsc/claro
transform.cljc
(ns claro.middleware.transform "Generic middlewares to transform resolution results." (:require [claro.engine.core :as engine] [claro.runtime.impl :as impl])) # # Transform Logic (defn- transform! [predicate transform-fn result] (->> (for [[resolvable resolved] result] [resolvable (if (...
null
https://raw.githubusercontent.com/xsc/claro/16db75b7a775a14f3b656362e8ee4f65dd8b0d49/src/claro/middleware/transform.cljc
clojure
## Middlewares
(ns claro.middleware.transform "Generic middlewares to transform resolution results." (:require [claro.engine.core :as engine] [claro.runtime.impl :as impl])) # # Transform Logic (defn- transform! [predicate transform-fn result] (->> (for [[resolvable resolved] result] [resolvable (if (...
0acc2455d36c98e584d35714767c188b7e59d90a16f8e30c5d775d367b1ec492
ahungry/ahungry-fleece
arm-vm.lisp
(in-package "af.contrib.sb-rotate-byte") (define-vop (%32bit-rotate-byte/c) (:policy :fast-safe) (:translate %unsigned-32-rotate-byte) (:note "inline 32-bit constant rotation") (:info count) (:args (integer :scs (sb-vm::unsigned-reg) :target res)) (:arg-types (:constant (integer -31 31)) sb-vm::unsigned-by...
null
https://raw.githubusercontent.com/ahungry/ahungry-fleece/1cef1d3a3aa9cffe9f06b7632006565bbc986814/contrib/sb-rotate-byte/arm-vm.lisp
lisp
the 0 case is an identity operation and should be DEFTRANSFORMed away.
(in-package "af.contrib.sb-rotate-byte") (define-vop (%32bit-rotate-byte/c) (:policy :fast-safe) (:translate %unsigned-32-rotate-byte) (:note "inline 32-bit constant rotation") (:info count) (:args (integer :scs (sb-vm::unsigned-reg) :target res)) (:arg-types (:constant (integer -31 31)) sb-vm::unsigned-by...
36bfbe015f77273f52026085de57ff0e4c99b8e1881fb90a291ab3a2c724b5b7
pinterface/burgled-batteries
refcnts.lisp
(in-package #:python-cffi.test) (addtest (burgled-batteries) refcnt-same-after-translation (python.cffi:with-refcnt-barrier (loop :for (object code) :in `((,python.cffi:+None+ "None") (,python.cffi:+True+ "True") (,python.cffi:+False+ "Fal...
null
https://raw.githubusercontent.com/pinterface/burgled-batteries/8ae3815a52fde36e68e54322cd7da2c42ec09f5c/t/refcnts.lisp
lisp
CPython implements small numbers as shared references. unknown translations tests. unknown translations with stolen references
(in-package #:python-cffi.test) (addtest (burgled-batteries) refcnt-same-after-translation (python.cffi:with-refcnt-barrier (loop :for (object code) :in `((,python.cffi:+None+ "None") (,python.cffi:+True+ "True") (,python.cffi:+False+ "Fal...
15a90e5f481bfeb3e719f7dfbe2946e5bf602d19e88c1a22e42855acc5673469
kototama/picobit
comp.scm
File : " comp.scm " , Time - stamp : < 2009 - 08 - 21 23:41:38 feeley > Copyright ( C ) 2004 - 2009 by and All Rights Reserved . (define gen-instruction (lambda (instr nb-pop nb-push ctx) (let* ((env (context-env ctx)) (stk (stack-extend #f ...
null
https://raw.githubusercontent.com/kototama/picobit/8bdfc092266803bc6b1151177a7e668c9b050bea/comp.scm
scheme
(pp (list var: var local: (stack-slots (env-local (context-env ctx))) (env-closed (context-env ctx)))) ----------------------------------------------------------------------------- (call? node) ----------------------------------------------------------------------------- globals that obey the follow...
File : " comp.scm " , Time - stamp : < 2009 - 08 - 21 23:41:38 feeley > Copyright ( C ) 2004 - 2009 by and All Rights Reserved . (define gen-instruction (lambda (instr nb-pop nb-push ctx) (let* ((env (context-env ctx)) (stk (stack-extend #f ...
383aece2d522c34c0b08a564785452ea831d7b1d752caf1652d58be07d0f19d4
vikram/lisplibraries
swank-fuzzy.lisp
;;; swank-fuzzy.lisp --- fuzzy symbol completion ;; Authors : < > < > ;; and others ;; ;; License: Public Domain ;; (in-package :swank) (eval-when (:compile-toplevel :load-toplevel :execute) (swank-require :swank-c-p-c)) ;;; For nomenclature of the fuzzy completion section, please re...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/slime/contrib/swank-fuzzy.lisp
lisp
swank-fuzzy.lisp --- fuzzy symbol completion and others License: Public Domain For nomenclature of the fuzzy completion section, please read through the following docstring. that purpose, to be able to distinguish between "no time limit alltogether" and "current time limit already exhausted." So we'v...
Authors : < > < > (in-package :swank) (eval-when (:compile-toplevel :load-toplevel :execute) (swank-require :swank-c-p-c)) (defslimefun fuzzy-completions (string default-package-name &key limit time-limit-in-msec) "Returns a list of two values: An (optionally limited to LIMIT best results...
25654eb00e359668feb0465608c55b14b5a09c0b3fbe75dc483fe58ec2a8216b
borkdude/advent-of-cljc
dfuenzalida.cljc
(ns aoc.y2017.d17.dfuenzalida (:refer-clojure :exclude [read-string format]) (:require [aoc.utils :as u :refer [deftest read-string format]] [aoc.y2017.d17.data :refer [input answer-1 answer-2]] [clojure.test :as t :refer [is testing]])) (defn iter-spinlock [state steps pos n] (if (pos? n) (let [i ...
null
https://raw.githubusercontent.com/borkdude/advent-of-cljc/17c8abb876b95ab01eee418f1da2e402e845c596/src/aoc/y2017/d17/dfuenzalida.cljc
clojure
Scratch
(ns aoc.y2017.d17.dfuenzalida (:refer-clojure :exclude [read-string format]) (:require [aoc.utils :as u :refer [deftest read-string format]] [aoc.y2017.d17.data :refer [input answer-1 answer-2]] [clojure.test :as t :refer [is testing]])) (defn iter-spinlock [state steps pos n] (if (pos? n) (let [i ...
72f5e511e338e74acbda927d1ad0e904d82fd53ec145033a2eb3ef61613d1fa5
google/ghc-source-gen
Pat.hs
module GHC.Hs.Pat (module HsPat) where import HsPat
null
https://raw.githubusercontent.com/google/ghc-source-gen/756d4cdc82f0aa86a8fd703fbc08b285ff3995ff/compat/GHC/Hs/Pat.hs
haskell
module GHC.Hs.Pat (module HsPat) where import HsPat
c525e7ef2ff655f955b726615f06051bb06d772eaced38d5533c933a6da7ebfa
DSTOQ/haskell-stellar-sdk
Extended.hs
module Hedgehog.Gen.Extended ( module Hedgehog.Gen , expWord32 , expWord64 , expInt32 , expInt64 , either ) where import Protolude hiding (either) import Hedgehog import Hedgehog.Gen import qualified Hedgehog.Range as Range either :: MonadGen m => m a -> m b -> m (Eit...
null
https://raw.githubusercontent.com/DSTOQ/haskell-stellar-sdk/82a76c2f951a2aaabdc38092fdc89044b278c53d/generators/src/Hedgehog/Gen/Extended.hs
haskell
module Hedgehog.Gen.Extended ( module Hedgehog.Gen , expWord32 , expWord64 , expInt32 , expInt64 , either ) where import Protolude hiding (either) import Hedgehog import Hedgehog.Gen import qualified Hedgehog.Range as Range either :: MonadGen m => m a -> m b -> m (Eit...
eab92e9ccf907e8e5bafbe37c65ef77de0d63679456b625cb26ec2e9cfc2692a
liqd/aula
AdminSpec.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE TypeOperators #-} # OPTIONS_GHC -Wall -Werror -fno - warn - orphans # module Frontend.Page...
null
https://raw.githubusercontent.com/liqd/aula/f96dbf85cd80d0b445e7d198c9b2866bed9c4e3d/tests/Frontend/Page/AdminSpec.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE OverloadedStrings # # LANGUAGE TypeOperators # | Unpack a zip archive, read the only file contained therein, and call argument on the body. the status quo either, and as long as the admin uses the UI, this shouldn't ever happen.) missing test: test empty event log...
# LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # OPTIONS_GHC -Wall -Werror -fno - warn - orphans # module Frontend.Page.AdminSpec where import System.IO (hClose) import System.IO.Temp (withSystemTempFile) import qualified Data.B...
71013dc65e54515004485e30a33fa043d2ce4b89d88365b94cffc9638bd4a262
cgoldammer/haskell-chess
StockfishTest.hs
module StockfishTest (stockfishTests) where import Test.HUnit import qualified Data.Set as S import Data.Attoparsec.Text hiding (take, D, takeWhile) import Data.Attoparsec.Combinator import qualified Data.Attoparsec.ByteString.Char8 as C import qualified Data.Text as Te import Control.Monad import Data.Maybe import Da...
null
https://raw.githubusercontent.com/cgoldammer/haskell-chess/86dce1d93754b1bee0736540d8acd14107582116/test/StockfishTest.hs
haskell
The evaluation for the positions is in the expected range.
module StockfishTest (stockfishTests) where import Test.HUnit import qualified Data.Set as S import Data.Attoparsec.Text hiding (take, D, takeWhile) import Data.Attoparsec.Combinator import qualified Data.Attoparsec.ByteString.Char8 as C import qualified Data.Text as Te import Control.Monad import Data.Maybe import Da...
ac796578dc9b5cf947b77467d33649d0c2e5bc50d08f9e9173df8fac0267bf0a
CGenie/ray-tracer
formatters.ml
(* formatters.ml *) (** Formatting functions for [gg]/[vg]. *) open Tracing_types let format_v2 v = Printf.sprintf "(%f, %f)" (Gg.V2.x v) (Gg.V2.y v) let format_v3 v = Printf.sprintf "(%f, %f, %f)" (Gg.V3.x v) (Gg.V3.y v) (Gg.V3.z v) let format_v4 v = Printf.sprintf "(%f, %f, %f, %f)" (Gg.V4.x v) (Gg.V4.y v) (Gg.V4.z...
null
https://raw.githubusercontent.com/CGenie/ray-tracer/37a7918c38497fe5d9b52ba0795f209c1c06fa9b/02-tracing/lib/formatters.ml
ocaml
formatters.ml * Formatting functions for [gg]/[vg].
open Tracing_types let format_v2 v = Printf.sprintf "(%f, %f)" (Gg.V2.x v) (Gg.V2.y v) let format_v3 v = Printf.sprintf "(%f, %f, %f)" (Gg.V3.x v) (Gg.V3.y v) (Gg.V3.z v) let format_v4 v = Printf.sprintf "(%f, %f, %f, %f)" (Gg.V4.x v) (Gg.V4.y v) (Gg.V4.z v) (Gg.V4.w v) let format_p2 v = Printf.sprintf "(%f, %f)" (Gg...
93802a1f1731812d1d5fcbd149b791ef8388caa50ebd0dada9cd073bbfb59fc6
janestreet/file_path
test_file_path.mli
include File_path.S
null
https://raw.githubusercontent.com/janestreet/file_path/51ccd4268cab0ef3eea0b708a7d46803cf567f34/test/test_file_path.mli
ocaml
include File_path.S
88ed14ef63a5f54bacd896406d3615ab86c3e0686b13e98c4cfea2cdb950c421
mlabs-haskell/ogmios-datum-cache
Byron.hs
module Block.Types.Byron ( Block (..), ) where -- This module is intended to be imported qualified import Data.Aeson (FromJSON (parseJSON), withObject, (.:)) import Data.Int (Int64) import Data.Text (Text) data Block = Block { slot :: Int64 , headerHash :: Text } deriving stock (Eq, Show) instance FromJSO...
null
https://raw.githubusercontent.com/mlabs-haskell/ogmios-datum-cache/85e030ae914abcffba4a7c261d9cd81f98b2168c/src/Block/Types/Byron.hs
haskell
This module is intended to be imported qualified
module Block.Types.Byron ( Block (..), ) where import Data.Aeson (FromJSON (parseJSON), withObject, (.:)) import Data.Int (Int64) import Data.Text (Text) data Block = Block { slot :: Int64 , headerHash :: Text } deriving stock (Eq, Show) instance FromJSON Block where parseJSON = withObject "Block" $ \o ...
c4df4f002166403dfc09ea9042e9616de2ae25ada8cde643e4d7c65528e5906e
mzp/coq-ruby
configwin_types.ml
(*********************************************************************************) Cameleon (* *) Copyright ( C ) 2005 Institut National de Recherche en Informatiqu...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/ide/utils/configwin_types.ml
ocaml
******************************************************************************* en Automatique. All rights reserved. ...
Cameleon Copyright ( C ) 2005 Institut National de Recherche en Informatique et it under the terms of the GNU Library General Public License as published by the Free Software Foundation ; either version 2 of the ...
6fa1bde807ea9ce0926f5ce91b59a45b14b8af1454249937d891344db4b946c0
jonathanknowles/haskell-calculator
Main.hs
# LANGUAGE NoImplicitPrelude # import qualified Calculator.GUI as G main = G.main
null
https://raw.githubusercontent.com/jonathanknowles/haskell-calculator/fa0dffc5be142576a6f9f09b55496d7855ce9749/source/gui/Main.hs
haskell
# LANGUAGE NoImplicitPrelude # import qualified Calculator.GUI as G main = G.main
60e4ba933824d43a39eb98f248be280d8a80aa6fe1ff221b1ec7eeda9564a7f9
practicalli/clojure-through-code
destructuring.clj
(ns clojure-through-code.destructuring) ;; A simple example of destructuring is assigning the values of a collection, in this case a vector. (def co-ordinates [3 8]) (let [[x y] co-ordinates] (str "x: " x "y: " y)) = > " x : 3y : 8 " ;; Sometimes we do not need all the information, so we can just use the eleme...
null
https://raw.githubusercontent.com/practicalli/clojure-through-code/82834cdab6b5315aea630386c851200f98d5e48f/src/clojure_through_code/destructuring.clj
clojure
A simple example of destructuring is assigning the values of a collection, in this case a vector. Sometimes we do not need all the information, so we can just use the elements we need. => "The next item to get is: oranges"
(ns clojure-through-code.destructuring) (def co-ordinates [3 8]) (let [[x y] co-ordinates] (str "x: " x "y: " y)) = > " x : 3y : 8 " (def three-dee-co-ordinates [2 7 4]) (let [[x y] three-dee-co-ordinates] (str "I only need the 2D co-ordinates, X: " x " and Y: " y )) = > " I only need the 2D co - ordinate...
8a59263ffabe09a850b0dd2c9c7769aaf25421f5abe3855675ca117548d0b46a
fukamachi/cl-project
io.lisp
(in-package :cl-user) (defpackage cl-project.io (:use #:cl #:cl-project.specials) (:import-from #:cl-emb #:execute-emb) (:export #:copy-file-to-file)) (in-package :cl-project.io) (defun copy-file-to-file (source-path target-path) "Copy a file `source-path` to the `target-path`." (form...
null
https://raw.githubusercontent.com/fukamachi/cl-project/151107014e534fc4666222d57fec2cc8549c8814/src/io.lisp
lisp
(in-package :cl-user) (defpackage cl-project.io (:use #:cl #:cl-project.specials) (:import-from #:cl-emb #:execute-emb) (:export #:copy-file-to-file)) (in-package :cl-project.io) (defun copy-file-to-file (source-path target-path) "Copy a file `source-path` to the `target-path`." (form...
6e31d180649d3c883a26061d9a0c47c59435a673081fa5290fa85f5038f6c3fb
bscarlet/llvm-general
PassManager.hs
-- | A 'PassManager' holds collection of passes, to be run on 'Module's. Build one with ' withPassManager ' : -- -- * using 'CuratedPassSetSpec' if you want optimization but not to play with your compiler -- -- * using 'PassSetSpec' if you do want to play with your compiler module LLVM.General.PassManager ( Pass...
null
https://raw.githubusercontent.com/bscarlet/llvm-general/61fd03639063283e7dc617698265cc883baf0eec/llvm-general/src/LLVM/General/PassManager.hs
haskell
| A 'PassManager' holds collection of passes, to be run on 'Module's. * using 'CuratedPassSetSpec' if you want optimization but not to play with your compiler * using 'PassSetSpec' if you do want to play with your compiler
Build one with ' withPassManager ' : module LLVM.General.PassManager ( PassManager, PassSetSpec(..), defaultPassSetSpec, defaultCuratedPassSetSpec, withPassManager, runPassManager ) where import LLVM.General.Internal.PassManager
0db987407ec2fbf98b3367ff6fb26372cb2a785f8099954c0170e6462cd345aa
kayceesrk/ocaml5-tutorial
prod_cons_nb.ml
let n = try int_of_string Sys.argv.(1) with _ -> 10 module Atomic_stack : sig type 'a t val make : unit -> 'a t val push : 'a t -> 'a -> unit val pop : 'a t -> 'a option end = struct type 'a t = 'a list Atomic.t let make () = Atomic.make [] let rec push r v = failwith "not implemented" let rec pop ...
null
https://raw.githubusercontent.com/kayceesrk/ocaml5-tutorial/36989cd5ffe42d7fc0b2710443b612f27bc9af5d/src/prod_cons_nb.ml
ocaml
let n = try int_of_string Sys.argv.(1) with _ -> 10 module Atomic_stack : sig type 'a t val make : unit -> 'a t val push : 'a t -> 'a -> unit val pop : 'a t -> 'a option end = struct type 'a t = 'a list Atomic.t let make () = Atomic.make [] let rec push r v = failwith "not implemented" let rec pop ...
ae9b758350de5512ea6a6a2ef0d35445abf193753fcd0b9d71a2de218f8de93a
scarvalhojr/haskellbook
section10.6.hs
import Data.Time data DatabaseItem = DbString String | DbNumber Integer | DbDate UTCTime deriving (Eq, Ord, Show) theDatabase :: [DatabaseItem] theDatabase = [ DbDate (UTCTime (fromGregorian 1911 5 1) (secondsToDiffTime 34123)), ...
null
https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter10/section10.6.hs
haskell
import Data.Time data DatabaseItem = DbString String | DbNumber Integer | DbDate UTCTime deriving (Eq, Ord, Show) theDatabase :: [DatabaseItem] theDatabase = [ DbDate (UTCTime (fromGregorian 1911 5 1) (secondsToDiffTime 34123)), ...
b3566fb19e37b0563c16cbed9d8ef28a454559fdee04835c16a7148d727b824c
alpacaaa/quad-ci
Spec.hs
module Main where import qualified Agent import qualified Control.Concurrent.Async as Async import Core import qualified Data.Aeson as Aeson import qualified Data.Yaml as Yaml import qualified Docker import qualified JobHandler import qualified JobHandler.Memory import qualified Network.HTTP.Simple as HTTP import RIO ...
null
https://raw.githubusercontent.com/alpacaaa/quad-ci/99175d3d0da5c03de22e3b20ae3b6ded79e40b57/test/Spec.hs
haskell
Not found Helper functions
module Main where import qualified Agent import qualified Control.Concurrent.Async as Async import Core import qualified Data.Aeson as Aeson import qualified Data.Yaml as Yaml import qualified Docker import qualified JobHandler import qualified JobHandler.Memory import qualified Network.HTTP.Simple as HTTP import RIO ...
d8f1f483feb5d612543b10041195de3c2987aecc23b42c0eb9c1914f7a3cb441
geophf/1HaskellADay
Solution.hs
module Y2018.M10.D15.Solution where - You have a set of assets on your iPod , a piece of hardware older than your daughters , let 's say , hypothetically , and you have a sets of assets on your thumbdrives . You want to move the assets off your iPod before the needle wrecks your hard drive . I 'm not kidding ....
null
https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M10/D15/Solution.hs
haskell
} }
module Y2018.M10.D15.Solution where - You have a set of assets on your iPod , a piece of hardware older than your daughters , let 's say , hypothetically , and you have a sets of assets on your thumbdrives . You want to move the assets off your iPod before the needle wrecks your hard drive . I 'm not kidding ....
2399b80f4e2b1e92594d4e0e7c4fdb294536672a0b5fd8c2115b909fae55c87e
emqx/emqx-management
emqx_mgmt_api_pubsub.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the L...
null
https://raw.githubusercontent.com/emqx/emqx-management/3e5600ca340612177ea39d00f7203816cf8ffddb/src/emqx_mgmt_api_pubsub.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 ...
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_mgmt_api_pubsub). -include_lib("emqx/include/emqx.hrl"). -include_lib("emqx/include/emqx_...
d02704f5b4cca99706d7ef1b3170a4043e7ff43cc0b3392dc578b27d3dfd3210
silky/fashion
Main.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} {-# LANGUAGE NoMonomorphismRestriction #-} # LANGUAGE ScopedTypeVariables # module Main where import Control.Monad import Diagrams.Prelude import Diagrams.Backend.Cairo.CmdLine import Nvds.Designs.SunMountainScape main :: I...
null
https://raw.githubusercontent.com/silky/fashion/2b01d1e5c385fe99e8e54f5828114551e9c8e309/Sun-Mountain-Scape/src/Main.hs
haskell
# LANGUAGE GADTs # # LANGUAGE NoMonomorphismRestriction #
# LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # module Main where import Control.Monad import Diagrams.Prelude import Diagrams.Backend.Cairo.CmdLine import Nvds.Designs.SunMountainScape main :: IO () main = mainWith (frame 0.2 <$> d) >> putStrLn "Done!"
e3921eb01d2f7b802146c009cb9f3483a4c0803455b42a042d766c479baa614d
clojurewerkz/statistiker
correlation.clj
(ns clojurewerkz.statistiker.correlation (:import [org.apache.commons.math3.stat.correlation PearsonsCorrelation]) (:require [clojure.math.combinatorics :as combo] [clojurewerkz.statistiker.transform.fft :as fft] [clojurewerkz.statistiker.statistics :as s] )) (def...
null
https://raw.githubusercontent.com/clojurewerkz/statistiker/f056f68c975cf3d6e0f1c8212aef9114d4eb657c/src/clj/clojurewerkz/statistiker/correlation.clj
clojure
(ns clojurewerkz.statistiker.correlation (:import [org.apache.commons.math3.stat.correlation PearsonsCorrelation]) (:require [clojure.math.combinatorics :as combo] [clojurewerkz.statistiker.transform.fft :as fft] [clojurewerkz.statistiker.statistics :as s] )) (def...
9c6ba1b65ad473682950bbdaf9cc94f8f8e13523463dce5afcdc9252267176ac
wies/grasshopper
logging.ml
open Logger let _ = Logger.init [("Prover", WARN); ("Main", DEBUG); ("SmtLib", DEBUG)] dbg_formatter let main_log = make_log "Main" let prover_log = make_log "Prover" let smtlib_log = make_log "SmtLib"
null
https://raw.githubusercontent.com/wies/grasshopper/108473b0a678f0d93fffec6da2ad6bcdce5bddb9/src/util/logging.ml
ocaml
open Logger let _ = Logger.init [("Prover", WARN); ("Main", DEBUG); ("SmtLib", DEBUG)] dbg_formatter let main_log = make_log "Main" let prover_log = make_log "Prover" let smtlib_log = make_log "SmtLib"
6b67d0ea3bebd84c5aaa342fc5b4c2b1f4eedc7aa404d38172dbe8c149e4d9d2
haskell/unix
FileStatus.hs
GHC trac # 2969 # OPTIONS_GHC -fno - warn - missing - signatures # module FileStatus (main) where import System.Posix.Files import System.Posix.Directory import System.Posix.IO import Control.Exception as E import Control.Monad import Test.Tasty.HUnit main = do cleanup fs <- testRegular ds <- testDir tes...
null
https://raw.githubusercontent.com/haskell/unix/4291a5bf644449b57bb1d6e8c75ef582c09a8803/tests/FileStatus.hs
haskell
we need to retrieve it again as creating the link causes it to change! isBlockDevice isCharacterDevice isNamedPipe isRegularFile isDirectory isSymbolicLink isSocket status for a file should match when accessed via a link
GHC trac # 2969 # OPTIONS_GHC -fno - warn - missing - signatures # module FileStatus (main) where import System.Posix.Files import System.Posix.Directory import System.Posix.IO import Control.Exception as E import Control.Monad import Test.Tasty.HUnit main = do cleanup fs <- testRegular ds <- testDir tes...
83e09f65db0d3354dc4f0f4a2f248b7db5c38ab27191a640a5ba34538474127f
jonsterling/dreamtt
Reader.ml
(** The operations of a reader monad *) module type Ops = sig type 'a m type local val read : local m val locally : (local -> local) -> 'a m -> 'a m end (** The reader monad transformer interface. *) module type T = sig include Monad.Trans include Ops with type 'a m := 'a m val read : local m val loc...
null
https://raw.githubusercontent.com/jonsterling/dreamtt/aa30a57ca869e91a295e586773a892c6601b5ddb/basis/Reader.ml
ocaml
* The operations of a reader monad * The reader monad transformer interface.
module type Ops = sig type 'a m type local val read : local m val locally : (local -> local) -> 'a m -> 'a m end module type T = sig include Monad.Trans include Ops with type 'a m := 'a m val read : local m val locally : (local -> local) -> 'a m -> 'a m val reader : (local -> 'a n) -> 'a m val r...
911e888afed809916ae1ec3541ea8dcd126cec9ccca06df77b386f8fd4e37819
metaocaml/ber-metaocaml
disambiguate_principality.ml
(* TEST * expect *) (*** Record ***) (* Expressions *) module M = struct type r = { lbl : int } end ;; [%%expect{| module M : sig type r = { lbl : int; } end |}] let before_a : M.r = { lbl = 3 } ;; [%%expect{| val before_a : M.r = {M.lbl = 3} |}] let a = let x = ({ M.lbl = 3 } : M.r) in x.lbl ;; [%%expe...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-misc/disambiguate_principality.ml
ocaml
TEST * expect ** Record ** Expressions Patterns ** Constructors ** Expressions Patterns
module M = struct type r = { lbl : int } end ;; [%%expect{| module M : sig type r = { lbl : int; } end |}] let before_a : M.r = { lbl = 3 } ;; [%%expect{| val before_a : M.r = {M.lbl = 3} |}] let a = let x = ({ M.lbl = 3 } : M.r) in x.lbl ;; [%%expect{| val a : int = 3 |}] let after_a = let x = ({ M.lbl...
5a4ca52eb782861f27a8b0b3b8dff769e87744138dd31a9e9073d982364de6ae
DaniruKun/spacex-iss-docking-sim-autopilot
core.clj
(ns iss-sim-auto-docking.core (:require [etaoin.api :refer :all] [iss-sim-auto-docking.dragon :as dragon] [iss-sim-auto-docking.telemetry :as tel]) (:gen-class)) (def sim-website-url "-sim.spacex.com") ;; Button selectors (def begin-button {:id :begin-button}) (def success {:css "#success > h2"}) (defn ...
null
https://raw.githubusercontent.com/DaniruKun/spacex-iss-docking-sim-autopilot/090fd29deead016efe399e5957715dce24a4f2c1/src/iss_sim_auto_docking/core.clj
clojure
Button selectors Setup the simulator concurrent futures for each control axis TODO: Replace with core.async channels concurrent futures for each translation axis besides approach axis x start actual approach to docking port
(ns iss-sim-auto-docking.core (:require [etaoin.api :refer :all] [iss-sim-auto-docking.dragon :as dragon] [iss-sim-auto-docking.telemetry :as tel]) (:gen-class)) (def sim-website-url "-sim.spacex.com") (def begin-button {:id :begin-button}) (def success {:css "#success > h2"}) (defn setup-sim "Setup t...
177144332625c033a4951d0fb9e7283eff720e76afa81fc6b7086abdf11800ea
haskell/hackage-server
State.hs
# LANGUAGE DeriveDataTypeable , TypeFamilies , TemplateHaskell , BangPatterns # module Distribution.Server.Features.Core.State ( -- * DB state PackagesState(..) , initialPackagesState , mkPackageInfo -- * DB transactions -- NOTE : Explictly not exported : legacy transactions ' AddPackage'(2 ) and...
null
https://raw.githubusercontent.com/haskell/hackage-server/1543b15b6f4b96d732b5b352f9991b421f6a7316/src/Distribution/Server/Features/Core/State.hs
haskell
* DB state * DB transactions -------------------------------- Index of metadata and tarballs for the moment the update log is a 'Either', to help with the transition we can change that later transient type used for migration which holds the fields for 'ExtraEntry' carried over from 'PackagesState_v1' TODO: | In...
# LANGUAGE DeriveDataTypeable , TypeFamilies , TemplateHaskell , BangPatterns # module Distribution.Server.Features.Core.State ( PackagesState(..) , initialPackagesState , mkPackageInfo NOTE : Explictly not exported : legacy transactions ' AddPackage'(2 ) and ' AddPackageRevision ' ( see ' ' and ' AddPack...
eb6ea838db2c3b5f2f2e9e35dd100a1d22b9a47ccaa093fe071096d3c6b09236
erlang/sourcer
sourcer_edoc.erl
-module(sourcer_edoc). -export([files/2]). files(Files, Options) -> try sourcer_log : logp(Files ) , sourcer_log : logp(Options ) , [begin sourcer_log : ) , edoc:files([F], Options) end || F<-Files] catch _:Err -> {error, Err} end.
null
https://raw.githubusercontent.com/erlang/sourcer/27ea9c63998b9e694eb7b654dd05b831b989e69e/apps/sourcer/src2/sourcer_edoc.erl
erlang
-module(sourcer_edoc). -export([files/2]). files(Files, Options) -> try sourcer_log : logp(Files ) , sourcer_log : logp(Options ) , [begin sourcer_log : ) , edoc:files([F], Options) end || F<-Files] catch _:Err -> {error, Err} end.
bf6ed49a19245db818478f03ee7787a2336df27a10a6c0b300b4ff5e2b5145db
spurious/sagittarius-scheme-mirror
chat-server.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; example/websocket/chat-server.scm - WebSocket chat server ;;; Copyright ( c ) 2010 - 2016 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/example/websocket/chat-server.scm
scheme
coding : utf-8 ; -*- example/websocket/chat-server.scm - WebSocket chat server 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 copyright ...
Copyright ( c ) 2010 - 2016 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING #!read-macro=sagittarius/bv-string #!read-ma...
975e3ce7ff5fd0e57b3b4b020692fd5dcb9a289b28ed2e0a4199622a13d74519
hercules-ci/hercules-ci-agent
BuildSpec.hs
# LANGUAGE BlockArguments # # LANGUAGE NumericUnderscores # module BuildSpec where import Control.Concurrent.STM.TVar (readTVar) import Data.Aeson qualified as A import Data.Map qualified as M import Data.Text qualified as T import Data.UUID.V4 qualified as UUID import Hercules.API.Agent.Build.BuildEvent qualified as...
null
https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/2063a731d51041bc5922a16f88a2bcc39cf8f6a2/tests/agent-test/src/BuildSpec.hs
haskell
this is a bit of a stretch but hey Setup: put the drv in the agent's store Test: build it Setup: put the drv in the agent's store unsafePerformIO do for_ (reverse entries) print pure pass
# LANGUAGE BlockArguments # # LANGUAGE NumericUnderscores # module BuildSpec where import Control.Concurrent.STM.TVar (readTVar) import Data.Aeson qualified as A import Data.Map qualified as M import Data.Text qualified as T import Data.UUID.V4 qualified as UUID import Hercules.API.Agent.Build.BuildEvent qualified as...
dd4830d94825057176124ef189973a7e2f7f2fe2023891325575d4ed353efea8
mdippery/stackim
core.clj
(ns stackim.core (:gen-class) (:require [clojure.string :as str] [compojure.core :refer :all] [compojure.route :as route] [org.httpkit.server :as http] [ring.middleware.params :as ring] [selmer.parser :as selmer] [stackim.db :as db] ...
null
https://raw.githubusercontent.com/mdippery/stackim/da95fb5f7f9f299301574b27ecb6a496673f58aa/src/stackim/core.clj
clojure
(ns stackim.core (:gen-class) (:require [clojure.string :as str] [compojure.core :refer :all] [compojure.route :as route] [org.httpkit.server :as http] [ring.middleware.params :as ring] [selmer.parser :as selmer] [stackim.db :as db] ...
c0acf1d9d52daeaa29422f92e8cd55aeac7e29d1151c1a61d83704a78ea9743b
ailisp/Graphic-Forms
layout-classes.lisp
(in-package :graphic-forms.uitoolkit.widgets) (defclass layout-manager () ((style :accessor style-of :initarg :style :initform nil) (left-margin :accessor left-margin-of :initarg :left-margin :initform 0) (top-margin :accessor top-margin-of :initarg :top-margin :initform 0) ...
null
https://raw.githubusercontent.com/ailisp/Graphic-Forms/1e0723d07e1e4e02b8ae375db8f3d65d1b444f11/src/uitoolkit/widgets/layout-classes.lisp
lisp
(in-package :graphic-forms.uitoolkit.widgets) (defclass layout-manager () ((style :accessor style-of :initarg :style :initform nil) (left-margin :accessor left-margin-of :initarg :left-margin :initform 0) (top-margin :accessor top-margin-of :initarg :top-margin :initform 0) ...
c535b9de411bc6443e9d2dd6e2723e070927cde0f55bbb3012595a2c3e5bad2d
manuel-serrano/hop
main.scm
;*=====================================================================*/ * serrano / prgm / project / hop / hop / hopsh / main.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/hopsh/main.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The HOPSH entry point */ *===========================...
* serrano / prgm / project / hop / hop / hopsh / main.scm * / * Author : * / * Creation : Fri Nov 12 13:30:13 2004 * / * Last change : We d Apr 17 08:02:57 2019 ( serrano ) * / * Cop...
b39afd536fa5a28544c17e3987a240378bf8c119c2789b58210f364b7e0d650d
input-output-hk/plutus
Quote.hs
{-# LANGUAGE DefaultSignatures #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # -- just for the type equality constraint # LANGUAGE GADTs # module PlutusCore.Quote ( runQuoteT , runQuote , freshUnique , freshName , f...
null
https://raw.githubusercontent.com/input-output-hk/plutus/716e78f1fe5cee18de44c7efb564813369f8dd53/plutus-core/plutus-core/src/PlutusCore/Quote.hs
haskell
# LANGUAGE DefaultSignatures # just for the type equality constraint | The state contains the "next" 'Unique' that should be used for a name terms using quasiquotation, fresh-name generation, and parsing. | A monad that allows lifting of quoted expressions. This means we don't have to implement it when we're w...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # # LANGUAGE GADTs # module PlutusCore.Quote ( runQuoteT , runQuote , freshUnique , freshName , freshTyName , freshenName , freshenTyName , QuoteT (..) , Quote ...
e74a999834d33939770a9089e11952c16bad5a6b8f0e86d3d9e10e73d2ad52a2
khibino/haskell-relational-record
Model.hs
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE DeriveGeneric # # LANGUAGE DataKinds # module Model where import GHC.Generics (Generic) import Data.Int (Int32, Int64) import Database.Relational (defaultConfig) import Data...
null
https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-query/test/Model.hs
haskell
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE TemplateHaskell # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE DeriveGeneric # # LANGUAGE DataKinds # module Model where import GHC.Generics (Generic) import Data.Int (Int32, Int64) import Database.Relational (defaultConfig) import Data...
f7c41e05e55287e80a40f5fab31775b353c27b8fddb4d87d5973759bc60c217c
GaloisInc/halvm-web
Backend.hs
module Backend(Backend(..), handleErr, sendAll) where import Control.Exception(SomeException, handle) import qualified Data.ByteString as S import qualified Data.ByteString.Lazy as L import Data.Word(Word16) data Backend lsock sock = Backend { listen :: Word16 -> IO ls...
null
https://raw.githubusercontent.com/GaloisInc/halvm-web/a01a84433df76caaa4edea6305797ccf588138c2/src/Backend.hs
haskell
module Backend(Backend(..), handleErr, sendAll) where import Control.Exception(SomeException, handle) import qualified Data.ByteString as S import qualified Data.ByteString.Lazy as L import Data.Word(Word16) data Backend lsock sock = Backend { listen :: Word16 -> IO ls...