_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
56aa55e025f0a177a4dff1cfe1d4eb2017bee1d1ed0ae654f15bf5205bff565e
lehins/hip
Internal.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # -- | -- Module : Graphics.Image.Internal ...
null
https://raw.githubusercontent.com/lehins/hip/11bb2b9d306b95603386625098243e911c2a2f49/hip/src/Graphics/Image/Internal.hs
haskell
# LANGUAGE BangPatterns # | Module : Graphics.Image.Internal License : BSD3 Stability : experimental Portability : non-portable | Main data type of the library It is not a newtype in order to make sure that the fusion mechanism works properly # INLINE [~1] (==) # # INLINE [~1] (+) # # INLINE [~1] (-)...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # Copyright : ( c ) 2016 - 2022 Maintainer : < > module Graphics.I...
c265f29033cc516974f00ca55a888f01e7aa111f7ab6afaef950a3b81fe3ebb5
AlexKnauth/music
scale.rkt
#lang agile (require "../note/note.rkt") (module+ test (require rackunit)) ;; ------------------------------------------------------------------------ (provide scale with-scale (rename-out [get-current-scale current-scale])) ;; A Scale is a (scale Note ScaleKind) (struct scale [root kind] #:tran...
null
https://raw.githubusercontent.com/AlexKnauth/music/1054ba29207a1ae49795f3c29a9cd86ec87b2d3b/music/data/scale/scale.rkt
racket
------------------------------------------------------------------------ A Scale is a (scale Note ScaleKind) call-with-scale : Scale [-> X] -> X ------------------------------------------------------------------------ ------------------------------------------------------------------------ scale-kind-mode-of : Sc...
#lang agile (require "../note/note.rkt") (module+ test (require rackunit)) (provide scale with-scale (rename-out [get-current-scale current-scale])) (struct scale [root kind] #:transparent) current - scale : [ [ Maybe Scale ] ] (define current-scale (make-parameter #f)) (define (call-with-s...
f022b00c08acd4586c9ce2b521c2a2e2b742b1912e65076a8a70438e6cd54c3e
SahilKang/cl-avro
union.lisp
Copyright 2021 Google LLC ;;; ;;; This file is part of cl-avro. ;;; ;;; cl-avro is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at your option) any later version. ;...
null
https://raw.githubusercontent.com/SahilKang/cl-avro/70fcaa32514cfb59b75812b2eab45ed24cce9d27/test/complex/union.lisp
lisp
This file is part of cl-avro. cl-avro is free software: you can redistribute it and/or modify (at your option) any later version. cl-avro 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 t...
Copyright 2021 Google LLC it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (in-package #:cl-user) (defpackage #:cl-avro/test/union (:use #:cl #:1am) (:lo...
df890cb3be26198e69ae18ffce1a5b2a679dac5830aa8a7b591633870bf9a0e4
noinia/hgeometry
Interval.hs
-------------------------------------------------------------------------------- -- | -- Module : Geometry.Interval Copyright : ( C ) -- License : see the LICENSE file Maintainer : -------------------------------------------------------------------------------- module Geometry.Interval( * ...
null
https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/src/Geometry/Interval.hs
haskell
------------------------------------------------------------------------------ | Module : Geometry.Interval License : see the LICENSE file ------------------------------------------------------------------------------ * querying the start and end of intervals * Working with intervals -------------------...
Copyright : ( C ) Maintainer : module Geometry.Interval( * 1 dimensional Intervals Interval (Interval, OpenInterval,ClosedInterval) , fromRange, toRange , _Range , HasStart(..), HasE...
99355daea56885ffb82984ca6737f847c5aa59dadf7582c024f9bf46c4227ec2
den1k/vimsical
datomic_test.clj
(ns vimsical.backend.components.datomic-test (:require [clojure.test :as t] [orchestra.spec.test :as st] [vimsical.backend.components.datomic :as sut] [vimsical.backend.components.datomic.fixture :refer [datomic *datomic*]])) (st/instrument) (t/use-fixtures :each datomic) (t/deftest connection-test (...
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/test/backend/vimsical/backend/components/datomic_test.clj
clojure
(ns vimsical.backend.components.datomic-test (:require [clojure.test :as t] [orchestra.spec.test :as st] [vimsical.backend.components.datomic :as sut] [vimsical.backend.components.datomic.fixture :refer [datomic *datomic*]])) (st/instrument) (t/use-fixtures :each datomic) (t/deftest connection-test (...
941de65b69c107c202d73d191f1a99c0c42ae0a1d7a0bfabc5fb365679c8f409
francescoc/erlangprogramming
index2.erl
%% Code from %% Erlang Programming and O'Reilly , 2008 %% / / ( c ) and -module(index2). -export([processFile/2,test1/0,test2/0,test3/0,accumulate/1]). -define(Punctuation,"(\\ |\\,|\\.|\\;|\\:|\\t|\\n|\\(|\\))+"). % Processing text: helper functions. % Note how the "\" in the regexp st...
null
https://raw.githubusercontent.com/francescoc/erlangprogramming/b4c39cbebe6599f23eb9d1a052316baf75e40a47/chapter10/index2.erl
erlang
Code from Erlang Programming / Processing text: helper functions. Note how the "\" in the regexp string have themselves to be quoted. Variant of text.erl, replacing list construction with side-effects on an ETS. It's aparent from this that keys can be anything, and not just atoms. Also worth noting tha...
and O'Reilly , 2008 / ( c ) and -module(index2). -export([processFile/2,test1/0,test2/0,test3/0,accumulate/1]). -define(Punctuation,"(\\ |\\,|\\.|\\;|\\:|\\t|\\n|\\(|\\))+"). Short words ( less than three characters ) are stripped too , and example file Text.txt . The size is ...
b06495ac6734251e60056a66762beffe45375aeb6aa694584c5cdc1fc20ee5e8
Copilot-Language/copilot
Counter.hs
Copyright © 2019 National Institute of Aerospace / Galois , Inc. -- | Example showing an implementation of a resettable counter. # LANGUAGE RebindableSyntax # module Main where import Language.Copilot import Copilot.Compile.C99 -- A resettable counter counter :: Stream Bool -> Stream Bool -> Stream Int32 counter...
null
https://raw.githubusercontent.com/Copilot-Language/copilot/17a9b45eea4e95a465d6e773c6fbcf9bf810b6cc/copilot/examples/Counter.hs
haskell
| Example showing an implementation of a resettable counter. A resettable counter
Copyright © 2019 National Institute of Aerospace / Galois , Inc. # LANGUAGE RebindableSyntax # module Main where import Language.Copilot import Copilot.Compile.C99 counter :: Stream Bool -> Stream Bool -> Stream Int32 counter inc reset = cnt where cnt = if reset then 0 else if inc then z + 1 ...
735227765d32fe5249eaeb6bb27986b525e3019778d5367c2df407c057c09599
clojure-interop/aws-api
AbstractAmazonElasticLoadBalancing.clj
(ns com.amazonaws.services.elasticloadbalancingv2.AbstractAmazonElasticLoadBalancing "Abstract implementation of AmazonElasticLoadBalancing. Convenient method forms pass through to the corresponding overload that takes a request object, which throws an UnsupportedOperationException." (:refer-clojure :only [requir...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.elasticloadbalancingv2/src/com/amazonaws/services/elasticloadbalancingv2/AbstractAmazonElasticLoadBalancing.clj
clojure
(ns com.amazonaws.services.elasticloadbalancingv2.AbstractAmazonElasticLoadBalancing "Abstract implementation of AmazonElasticLoadBalancing. Convenient method forms pass through to the corresponding overload that takes a request object, which throws an UnsupportedOperationException." (:refer-clojure :only [requir...
b07be467b58487c43abbefd806f65aa3934e5b37760450a184313d4f4ab478e0
erlangonrails/devdb
cs_replica_stabilization_SUITE.erl
Copyright 2008 fuer Informationstechnik Berlin % 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 writi...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/test/cs_replica_stabilization_SUITE.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 go...
Copyright 2008 fuer Informationstechnik Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , Author : < > Created : 22 Feb 2008 by < > -module(cs_replica_stabilization_SUITE). -author(''). -vsn('$...
094f516a8e8f43771234523689384c36ec873cc28bcf18e25264be8fcbb08858
caradoc-org/caradoc
pdftypes.ml
(*****************************************************************************) (* Caradoc: a PDF parser and validator *) Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 (* ...
null
https://raw.githubusercontent.com/caradoc-org/caradoc/100f53bc55ef682049e10fabf24869bc019dc6ce/src/type/pdftypes.ml
ocaml
*************************************************************************** Caradoc: a PDF parser and validator This program is free software; you can redistribute it and/or modify ...
Copyright ( C ) 2015 ANSSI Copyright ( C ) 2015 - 2017 it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation . You should have rece...
c70969e9f118e2dfdbd2754553ebd1d4f5d52e976c800f85cc5437ff07211774
stuartsierra/stacktrace.raw
clj_stacktrace.clj
(in-ns 'clj-stacktrace.repl) (defn pst-on "Originally clj-stacktrace.repl/pst-on, overridden by com.stuartsierra.stacktrace.raw Prints a full stack trace of Throwable to the writer." [^java.io.Writer writer _ ^Throwable e] (let [w (java.io.PrintWriter. writer)] (.printStackTrace e w) (.flush w)))
null
https://raw.githubusercontent.com/stuartsierra/stacktrace.raw/beb6d09e62702ba90694bb1c34c55f82919f5613/src/com/stuartsierra/stacktrace/override/clj_stacktrace.clj
clojure
(in-ns 'clj-stacktrace.repl) (defn pst-on "Originally clj-stacktrace.repl/pst-on, overridden by com.stuartsierra.stacktrace.raw Prints a full stack trace of Throwable to the writer." [^java.io.Writer writer _ ^Throwable e] (let [w (java.io.PrintWriter. writer)] (.printStackTrace e w) (.flush w)))
a2b55700bd052967a4c9ddc552e521654a9dc7cb99df4430210cf9c42e248ba5
stylewarning/quickutil
trees.lisp
(in-package #:quickutil-utilities.utilities) (defutil map-tree (:version (1 . 0) :category trees) "Map `function` to each of the leave of `tree`." #>%%%> (defun map-tree (function tree) %%DOC (check-type tree cons) (labels ((rec (tree) (cond ((null t...
null
https://raw.githubusercontent.com/stylewarning/quickutil/5adb3463d99095145325c4013117bd08a8f6cac2/quickutil-utilities/utilities/trees.lisp
lisp
(in-package #:quickutil-utilities.utilities) (defutil map-tree (:version (1 . 0) :category trees) "Map `function` to each of the leave of `tree`." #>%%%> (defun map-tree (function tree) %%DOC (check-type tree cons) (labels ((rec (tree) (cond ((null t...
c7cc6c64c2cb2b6fc3eabeb00872c59bf610cf1a0da6ec6ca42135390e97a177
xapi-project/xen-api
datamodel_diagnostics.ml
open Datamodel_common let gc_compact = call ~name:"gc_compact" ~in_product_since:Datamodel_types.rel_stockholm ~doc:"Perform a full major collection and compact the heap on a host" ~hide_from_docs:true ~params:[(Ref _host, "host", "The host to perform GC")] ~errs:[] ~allowed_roles:Datamodel_roles._R_...
null
https://raw.githubusercontent.com/xapi-project/xen-api/4ec6be956b1181619e12b5cd14c70973ef85cb4d/ocaml/idl/datamodel_diagnostics.ml
ocaml
open Datamodel_common let gc_compact = call ~name:"gc_compact" ~in_product_since:Datamodel_types.rel_stockholm ~doc:"Perform a full major collection and compact the heap on a host" ~hide_from_docs:true ~params:[(Ref _host, "host", "The host to perform GC")] ~errs:[] ~allowed_roles:Datamodel_roles._R_...
b1a302880c59ab676f5b22cde5872e7cc61f1051f28fd3c5f0b6b5d4679aa5eb
well-typed/large-records
R000.hs
#if PROFILE_CORESIZE {-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-} #endif #if PROFILE_TIMING {-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} #endif module Experiment.ApLet.Sized.R000 where
null
https://raw.githubusercontent.com/well-typed/large-records/551f265845fbe56346988a6b484dca40ef380609/large-records-benchmarks/bench/typelet/Experiment/ApLet/Sized/R000.hs
haskell
# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl # # OPTIONS_GHC -ddump-to-file -ddump-timings #
#if PROFILE_CORESIZE #endif #if PROFILE_TIMING #endif module Experiment.ApLet.Sized.R000 where
aa45b132ad7c57582dfdfde2be434a8d0ac6ea8e2685e45a5a7fc9d5c08209d0
Mishio595/disml
activity.ml
open Core type t = { name: string; kind: int [@key "type"]; url: string option [@default None]; } [@@deriving sexp, yojson { strict = false; exn = true }]
null
https://raw.githubusercontent.com/Mishio595/disml/cbb1e47a6d358eace03790c07a1b85641f4ca366/lib/models/user/activity.ml
ocaml
open Core type t = { name: string; kind: int [@key "type"]; url: string option [@default None]; } [@@deriving sexp, yojson { strict = false; exn = true }]
af56028b36af5627a348b42fe7ce22945ca2925e2b2ea50a466b25d623c70f52
emhoracek/smooch
ParseCel.hs
| Module : ParseCel Description : Parse old- and new - style KiSS cels Copyright : ( c ) , 2015 - 2017 Huggable Monad , 2017 License : GPL-3 Maintainer : Stability : experimental Portability : POSIX This module provides functions for parsing old- and new - styl...
null
https://raw.githubusercontent.com/emhoracek/smooch/e718696b70bd2fcb0993652a24e97339cead783b/app/src/ParseCel.hs
haskell
# LANGUAGE OverloadedStrings # * API * API | Cel pixels. >>> fmap fst <$> runExceptT (parseCel celData) Right [128,255,17,23,0,0,40,56,103,11,0,0,0,90,159,238] | Return 'True' if the cel is new-style (starts with @KiSS@). Right 7 ^ Index of desired pixel. | Return the number of cel pixels. Under normal c...
| Module : ParseCel Description : Parse old- and new - style KiSS cels Copyright : ( c ) , 2015 - 2017 Huggable Monad , 2017 License : GPL-3 Maintainer : Stability : experimental Portability : POSIX This module provides functions for parsing old- and new - styl...
58bd08b22b71076cfe44d19d8bed9e374cf4d3032a69ff820bbf6afde4e31293
techascent/tech.datatype
const.clj
(ns tech.v2.datatype.iterable.const (:require [tech.v2.datatype.protocols :as dtype-proto] [tech.v2.datatype.casting :as casting] [tech.v2.datatype.typecast :as typecast] [tech.v2.datatype.nio-access :as access])) (defmacro make-const-iter [datatype] (let [host-type (casting...
null
https://raw.githubusercontent.com/techascent/tech.datatype/8cc83d771d9621d580fd5d4d0625005bd7ab0e0c/src/tech/v2/datatype/iterable/const.clj
clojure
(ns tech.v2.datatype.iterable.const (:require [tech.v2.datatype.protocols :as dtype-proto] [tech.v2.datatype.casting :as casting] [tech.v2.datatype.typecast :as typecast] [tech.v2.datatype.nio-access :as access])) (defmacro make-const-iter [datatype] (let [host-type (casting...
0299e102c8585b4887a9e1aaebf6e53e3d614ce4a9c708750959018fd7e4fc30
pascal-knodel/haskell-craft
E'3'16.hs
-- -- -- ----------------- Exercise 3.16 . ----------------- -- -- -- module E'3'16 where upperLowerCaseOffset :: Int upperLowerCaseOffset = ( fromEnum 'a' ) - ( fromEnum 'A' ) isLower :: Char -> Bool isLower aChar | aChar >= 'a' && aChar <= 'z' = True | otherwise = False toUp...
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/Chapter%203/E'3'16.hs
haskell
--------------- --------------- GHCi> toUpper '1' toUpper 'a' '1' 'A'
Exercise 3.16 . module E'3'16 where upperLowerCaseOffset :: Int upperLowerCaseOffset = ( fromEnum 'a' ) - ( fromEnum 'A' ) isLower :: Char -> Bool isLower aChar | aChar >= 'a' && aChar <= 'z' = True | otherwise = False toUpper :: Char -> Char toUpper aChar | isLower aChar ...
479d224743d3901140c384b8f9e8c6cb6394995c3af7769d5556d7cffa6f1114
markus-git/hardware-edsl
Expression.hs
module Language.Embedded.Hardware.Expression ( HExp , HType , Bit , Bits , bitFromInteger , bitToInteger , module Language.Embedded.Hardware.Expression.Frontend ) where import Language.Embedded.Hardware.Expression.Syntax (HExp, HType) import Language.Embedded.Hardware.Expression.Frontend import Languag...
null
https://raw.githubusercontent.com/markus-git/hardware-edsl/d0fde93ff57a8f5c2c37e273ff3a1d2a761fc5eb/src/Language/Embedded/Hardware/Expression.hs
haskell
module Language.Embedded.Hardware.Expression ( HExp , HType , Bit , Bits , bitFromInteger , bitToInteger , module Language.Embedded.Hardware.Expression.Frontend ) where import Language.Embedded.Hardware.Expression.Syntax (HExp, HType) import Language.Embedded.Hardware.Expression.Frontend import Languag...
a98b11a0e75b1b60fff9b0005d82fc6e9c8fa92f20ca151f3ac92ccf92cd82ab
well-typed-lightbulbs/ocaml-esp32
printlinear.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/asmcomp/printlinear.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Format open Linear val instr: formatter -> instruction -> unit val fundecl: formatter -> fundecl -...
b209b4f24ad9781b90a6165b597f519f828dc03be500c5f6011a77ce9117c078
i-am-tom/holmes
Fractional.hs
# LANGUAGE DefaultSignatures # # LANGUAGE KindSignatures # | Module : Data . JoinSemilattice . Class . Fractional Description : Relationships between values and their ( floating / fractional ) product . Copyright : ( c ) , 2020 License : MIT Module : Data.JoinSemilattice.Class.Fractional...
null
https://raw.githubusercontent.com/i-am-tom/holmes/ecbb6da0c7a73f839ea2c4d00cdb902fe7080981/src/Data/JoinSemilattice/Class/Fractional.hs
haskell
relationship.
# LANGUAGE DefaultSignatures # # LANGUAGE KindSignatures # | Module : Data . JoinSemilattice . Class . Fractional Description : Relationships between values and their ( floating / fractional ) product . Copyright : ( c ) , 2020 License : MIT Module : Data.JoinSemilattice.Class.Fractional...
7c2eb907fdc29f0ddf4b2022b6b67e37324f7847127dd41d5d9d1a3a8a55ce23
johnlawrenceaspden/hobby-code
typeerror.clj
;; I have twice recently been bitten by this: ;; You have a collection of things (require 'clojure.string) (def coll (clojure.string/split ";; I have twice recently been bitten by this: You have a collection of things" #"\s+")) ;; On which there is some function ( 2 1 4 5 8 4 6 2 5 3 4 1 10 2 6 ) ;; And you'd like...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/typeerror.clj
clojure
I have twice recently been bitten by this: You have a collection of things On which there is some function And you'd like to get the elements with the smallest values And so you end up writing ("I" "a" ";;") And this works absolutely peachily And so you end up using it in other functions #'user/afunc ("I" "a"...
(require 'clojure.string) (def coll (clojure.string/split ";; I have twice recently been bitten by this: You have a collection of things" #"\s+")) ( 2 1 4 5 8 4 6 2 5 3 4 1 10 2 6 ) (defn take-n-smallest [n f coll] (map second (take n (sort (map (fn[s] [(f s) s]) coll))))) (defn afunc [coll] (defn...
90afcc9d032d8a64edd05de40e4a20e4df11830341f252db03dffca31d3ad3bc
DerekCuevas/interview-cake-clj
project.clj
(defproject reverse-linked-list "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]] :main ^:skip-aot reverse-linked-list.core :target-path "target/%s" :profiles {:uberjar {:aot...
null
https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/reverse-linked-list/project.clj
clojure
(defproject reverse-linked-list "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]] :main ^:skip-aot reverse-linked-list.core :target-path "target/%s" :profiles {:uberjar {:aot...
80dd06655e53c5f9473036e661e9618259ebfef2269deab260ab0df3534c3df0
simmsb/calamity
Tellable.hs
-- | Things that are messageable module Calamity.Types.Tellable ( ToMessage (..), Tellable (..), TMention (..), tell, reply, runToMessage, ) where import Calamity.Client.Types import Calamity.HTTP.Channel ( AllowedMentions, ChannelRequest (CreateMessage), CreateMessageAttachment, CreateMessageOptio...
null
https://raw.githubusercontent.com/simmsb/calamity/be310255b446e87e7432673de1fbc67ef46de3ae/calamity/Calamity/Types/Tellable.hs
haskell
| Things that are messageable | A wrapper type for allowing mentions | Things that can be used to send a message Can be used to compose text, embeds, and files. /e.g./ @ 'intoMsg' @'L.Text' "A message" '<>' 'intoMsg' @'Embed' ('def' '&' #description '?~' "Embed description") @ | Turn @a@ into a 'CreateMessag...
module Calamity.Types.Tellable ( ToMessage (..), Tellable (..), TMention (..), tell, reply, runToMessage, ) where import Calamity.Client.Types import Calamity.HTTP.Channel ( AllowedMentions, ChannelRequest (CreateMessage), CreateMessageAttachment, CreateMessageOptions, ) import Calamity.HTTP.Inter...
0b44c036e3b0141bd00b42935685f7c88c5f56579d377893536eab22aaaa949b
MyDataFlow/ttalk-server
ecoveralls.erl
Copyright ( c ) 2014 , < > % % Permission to use, copy, modify, and/or 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 THE AUTHOR DISCLAIMS ALL WARR...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/ecoveralls/src/ecoveralls.erl
erlang
Permission to use, copy, modify, and/or 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. WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT...
Copyright ( c ) 2014 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN ACTION OF CONTRACT , -module(ecoveralls). -ifdef(TEST). -incl...
3a21b87c10b6e2d56ababca4b7992cf0873038612baee4c40be6afe3a8c39519
florence/cover
file-utils.rkt
#lang racket/base (provide ->relative ->absolute) (require racket/list racket/path) (define (->relative path) (build-path (find-relative-path (simple-form-path (current-directory)) (simple-form-path path)))) (define (->absolute path) (if (absolute-path? path) (path->string (simple-form-path path)) ...
null
https://raw.githubusercontent.com/florence/cover/bc17e4e22d47b1da91ddaa5eafefe28f4675e85c/cover-lib/cover/private/file-utils.rkt
racket
#lang racket/base (provide ->relative ->absolute) (require racket/list racket/path) (define (->relative path) (build-path (find-relative-path (simple-form-path (current-directory)) (simple-form-path path)))) (define (->absolute path) (if (absolute-path? path) (path->string (simple-form-path path)) ...
7ac2c6b4e1cec0dba3a798f0b3ed5cafe88531017a7357f8a555023d8f4cc1e4
cwtsteven/TSD
planets.ml
open Tsd open List type planet = { id : int; mass : float; pos : float * float * float; speed : float * float * float; } (* Constants *) let g = 6.67 let dt = 0.1 let size_x = 1280 let size_y = 720 (* Auxiliary functions *) let random_speed () = ((Random.float 100.0) -. 50.0, (Random.f...
null
https://raw.githubusercontent.com/cwtsteven/TSD/32bd2cbca6d445ff6b0caecdbb2775de61fdfc6d/examples/planets.ml
ocaml
Constants Auxiliary functions --------------------------------------------------------------------- Console window --------------------------------------------------------------------- planet definition
open Tsd open List type planet = { id : int; mass : float; pos : float * float * float; speed : float * float * float; } let g = 6.67 let dt = 0.1 let size_x = 1280 let size_y = 720 let random_speed () = ((Random.float 100.0) -. 50.0, (Random.float 100.0) -. 50.0, (Random.float 100....
b41236dc82369d59ab4a1dd6e02d8d9b8b5ed67314896908ea16667d6e43fb0c
hexlet-codebattle/battle_asserts
max_abs_elem.clj
(ns battle-asserts.issues.max-abs-elem (:require [clojure.test.check.generators :as gen])) (def level :elementary) (def tags ["collections"]) (def description {:en "Find the maximum absolute value of an array." :ru "Найдите максимальное по модулю число в массиве."}) (def signature {:input [{:argument-name ...
null
https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/cf62af2bfc16dc1b570f8b78170a34cd97af3a2a/src/battle_asserts/issues/max_abs_elem.clj
clojure
(ns battle-asserts.issues.max-abs-elem (:require [clojure.test.check.generators :as gen])) (def level :elementary) (def tags ["collections"]) (def description {:en "Find the maximum absolute value of an array." :ru "Найдите максимальное по модулю число в массиве."}) (def signature {:input [{:argument-name ...
0347bbe8af018bf71bcceadaae06750f5e97f337dd2769317aa0c7d8fb284661
ariesteam/aries
spantest.clj
Copyright 2011 The ARIES Consortium ( ) ;;; ;;; This file is part of ARIES. ;;; ;;; ARIES is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , ;;; or (at your option)...
null
https://raw.githubusercontent.com/ariesteam/aries/b3fafd4640f4e7950fff3791bc4ea4c06ee4dcdf/plugins/org.integratedmodelling.aries.core/bindings/clojure/applications/spantest.clj
clojure
This file is part of ARIES. ARIES is free software: you can redistribute it and/or modify or (at your option) any later version. ARIES 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. ...
Copyright 2011 The ARIES Consortium ( ) it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , You should have received a copy of the GNU General Public License (ns applications.spantest) (refer 'clj-span.aries-span-bri...
20ba4584d8ba1f7abd5353105663e6972c1c2f4d1876cd80ddb55cae3557af04
discus-lang/ddc
TransformUpX.hs
-- | General purpose tree walking boilerplate. module DDC.Core.Flow.Transform.TransformUpX ( TransformUpMX(..) , transformUpX , transformUpX' -- * Via the Simple AST , transformSimpleUpMX , transformSimpleUpX , transformSimpleUpX') where import DDC.Core.Exp.An...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core-flow/DDC/Core/Flow/Transform/TransformUpX.hs
haskell
| General purpose tree walking boilerplate. * Via the Simple AST Simple --------------------------------------------------------------------- the worker should return `Nothing` if the provided expression is unchanged. ^ The worker function is given the current kind and type environments. ^ Initial type ...
module DDC.Core.Flow.Transform.TransformUpX ( TransformUpMX(..) , transformUpX , transformUpX' , transformSimpleUpMX , transformSimpleUpX , transformSimpleUpX') where import DDC.Core.Exp.Annot import DDC.Core.Transform.TransformUpX import DDC.Core.Flow.Transform.Annot...
c7990a44bbd0617e1a6e83f977de0f0371b33a81f87ffe9eb875bf21db1f9b34
input-output-hk/project-icarus-importer
Util.hs
-- | Module for small utility functions. module Cardano.Wallet.Util ( -- * String manipulation headToLower , stripFieldPrefix , mkJsonKey -- * Time , defaultApiTimeLocale , apiTimeFormat , parseApiUtcTime , showApiUtcTime ) where import ...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/src/Cardano/Wallet/Util.hs
haskell
| Module for small utility functions. * String manipulation * Time * String manipulation utils * Time Note: there is more neat support of time formats in time-1.9, current LTS-9.1. | Parse UTC time from API. | Encode UTC time for API.
module Cardano.Wallet.Util headToLower , stripFieldPrefix , mkJsonKey , defaultApiTimeLocale , apiTimeFormat , parseApiUtcTime , showApiUtcTime ) where import Universum import Data.Char (isUpper, toLower) import qualified Data.Text.Builda...
f6fc35b4b318f59d41e7688a784945ffb619218f189b806a1ae2a70628756d70
ConsumerDataStandardsAustralia/validation-prototype
FloorType.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} module AuPost.PAF.FloorType ( module AuPost.PAF.FloorType ) where import Control.Lens (Prism', prism, ( # )) import Data.Text (Text) import Waargonaut.Decode (Decoder) import qualified Wa...
null
https://raw.githubusercontent.com/ConsumerDataStandardsAustralia/validation-prototype/ff63338b77339ee49fa3e0be5bb9d7f74e50c28b/consumer-data-au-api-types/src/AuPost/PAF/FloorType.hs
haskell
# LANGUAGE OverloadedStrings # ^ Basement B ^ Ground Floor G ^ Level L
# LANGUAGE LambdaCase # module AuPost.PAF.FloorType ( module AuPost.PAF.FloorType ) where import Control.Lens (Prism', prism, ( # )) import Data.Text (Text) import Waargonaut.Decode (Decoder) import qualified Waargonaut.Decode as D import q...
da870654550c65570e22aaca56aa085b786c37dab00c960b2d3dd638cfe7df8b
uw-unsat/serval
logical-arithmetic-register.rkt
#lang rosette (require "common.rkt") (provide orr-register orrs-register mov-register movs-register lsl-immediate lsr-immediate asr-immediate ror-immediate) (define (decode S Rn Rd imm5 stype Rm) (define d Rd) (define n Rn) (define m Rm) (define setflags (bveq S (bv #b1 1))) (define-values (...
null
https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/serval/arm32/interp/logical-arithmetic-register.rkt
racket
PSTATE.V aliases
#lang rosette (require "common.rkt") (provide orr-register orrs-register mov-register movs-register lsl-immediate lsr-immediate asr-immediate ror-immediate) (define (decode S Rn Rd imm5 stype Rm) (define d Rd) (define n Rn) (define m Rm) (define setflags (bveq S (bv #b1 1))) (define-values (...
f9080d18289a4f56ab03f246d8ac7239a76be2b17b8fd78c2ebbb378015868f3
Apress/common-lisp-condition-system
ansi-test-support.lisp
;;;; t/ansi-test-support.lisp (in-package #:portable-condition-system/test) (defmacro expand-in-current-env (macro-form &environment env) (macroexpand macro-form env)) (defmacro signals-type-error (var datum-form form &key (safety 3) (inline nil)) (let ((lambda-form `(lambda (,var) (declar...
null
https://raw.githubusercontent.com/Apress/common-lisp-condition-system/7f4533e20d6397a59ca5bbfdc139b3389a135c34/Sources%20-%20PCS/t/ansi-test-support.lisp
lisp
t/ansi-test-support.lisp
(in-package #:portable-condition-system/test) (defmacro expand-in-current-env (macro-form &environment env) (macroexpand macro-form env)) (defmacro signals-type-error (var datum-form form &key (safety 3) (inline nil)) (let ((lambda-form `(lambda (,var) (declare (optimize (safety ,safety)))...
7e4d21cddf113353f02699e2c847be58a8aa1923b9e8922f26146fb4122a5a3f
expipiplus1/exact-real
Internal.hs
# LANGUAGE DataKinds # {-# LANGUAGE BangPatterns #-} # LANGUAGE KindSignatures # # LANGUAGE MagicHash # {-# LANGUAGE MultiWayIf #-} # LANGUAGE PostfixOperators # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE BangPatterns #-} ----------------------------------------------------------------------------- -- | This module...
null
https://raw.githubusercontent.com/expipiplus1/exact-real/c4308efc37c53e266fee348a80fdfbabb18822be/src/Data/CReal/Internal.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE MultiWayIf # # LANGUAGE BangPatterns # --------------------------------------------------------------------------- | This module exports a bunch of utilities for working inside the CReal datatype. One should be careful to maintain the CReal invariant when using these functions --...
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE MagicHash # # LANGUAGE PostfixOperators # # LANGUAGE ScopedTypeVariables # module Data.CReal.Internal ( CReal(..) , Cache(..) , atPrecision , crealPrecision , plusInteger , mulBounded , (.*.) , mulBoundedL , (.*) , (*.) , recipBou...
8c51926530e8d2e1c42be72e1f97fea47f4ad68e10aaaa753560abd8539f9ead
ThoughtWorksInc/DeepDarkFantasy
Sum.hs
# LANGUAGE NoMonomorphismRestriction # module DDF.Sum (module DDF.Sum, module DDF.DBI) where import DDF.DBI class DBI r => Sum r where left :: r h (a -> Either a b) right :: r h (b -> Either a b) sumMatch :: r h ((a -> c) -> (b -> c) -> Either a b -> c) sumMatch1 = app1 sumMatch sumMatch2 = app2 sumMatch sumM...
null
https://raw.githubusercontent.com/ThoughtWorksInc/DeepDarkFantasy/4c569aefc03a2bcfb6113b65367201d30077f2b6/DDF/Sum.hs
haskell
# LANGUAGE NoMonomorphismRestriction # module DDF.Sum (module DDF.Sum, module DDF.DBI) where import DDF.DBI class DBI r => Sum r where left :: r h (a -> Either a b) right :: r h (b -> Either a b) sumMatch :: r h ((a -> c) -> (b -> c) -> Either a b -> c) sumMatch1 = app1 sumMatch sumMatch2 = app2 sumMatch sumM...
c96d8f3af6ce4bc96df4df78e330e16ecf62cef873abee6ba92da1d7af1c3669
quchen/prettyprinter
Internal.hs
module Data.Text.Prettyprint.Doc.Internal {-# DEPRECATED "Use \"Prettyprinter.Internal\" instead." #-} ( module Prettyprinter.Internal ) where import Prettyprinter.Internal
null
https://raw.githubusercontent.com/quchen/prettyprinter/880f41eac31edfac71d2d66d338e6cfdae4f3715/prettyprinter/src/Data/Text/Prettyprint/Doc/Internal.hs
haskell
# DEPRECATED "Use \"Prettyprinter.Internal\" instead." #
module Prettyprinter.Internal ) where import Prettyprinter.Internal
19a4a5e04a575a00fefa6150d1013a907abf45f7cfecf35eb4b668a8204349b1
Bogdanp/racket-http-easy
reflect.rkt
#lang racket/base (require (for-syntax racket/base racket/path setup/getinfo)) (provide lib-version) (begin-for-syntax (define this-path (simplify-path (build-path (path-only (syntax-source #'here)) 'up 'up))) (define info-ref (get-info/full this-path))) (define-syntax...
null
https://raw.githubusercontent.com/Bogdanp/racket-http-easy/630a982a282a51fd7fd85dc5e2f3f581c564b5e4/http-easy-lib/http-easy/private/reflect.rkt
racket
#lang racket/base (require (for-syntax racket/base racket/path setup/getinfo)) (provide lib-version) (begin-for-syntax (define this-path (simplify-path (build-path (path-only (syntax-source #'here)) 'up 'up))) (define info-ref (get-info/full this-path))) (define-syntax...
fdd9d79dbbf60b8dfb25c0b5fe797b592c2f9a9e4e6e9678a72c3cedea6a1d73
BumblebeeBat/FlyingFox
fork_slash_tx.erl
-module(fork_slash_tx). -export([doit/7, slasher/3]). -record(fork_slash_tx, {acc = 0, nonce = 0, sign_tx = 0, number = 0}).%number is a block that the transgressor signed over on the main chain. That is the signature who's deposit will be slashed. slasher(Acc, SignTx, N) -> A = block_tree:account(Acc), #fork_...
null
https://raw.githubusercontent.com/BumblebeeBat/FlyingFox/0fa039cd2394b08b1a85559f9392086c6be47fa6/src/consensus/txs/fork_slash_tx.erl
erlang
number is a block that the transgressor signed over on the main chain. That is the signature who's deposit will be slashed. This is the block on a different chain they signed on. This is the block on the blockchain that they signed over. ???
-module(fork_slash_tx). -export([doit/7, slasher/3]). slasher(Acc, SignTx, N) -> A = block_tree:account(Acc), #fork_slash_tx{acc = Acc, nonce = accounts:nonce(A) + 1, sign_tx = SignTx, number = N}. doit(Tx, ParentKey, Channels, Accounts, TotalCoins, Secrets, NewHeight) -> SignedST = Tx#fork_slash_tx.s...
815dd23409d12de10cace5ee55cffe7cdbe1eb7aa661314a02204eedff593a9f
fredrikt/yxa
sipsocket.erl
%%%------------------------------------------------------------------- %%% File : sipsocket.erl @author < > %%% @doc Transport layer processes supervisor, and sipsocket %%% interface functions. %%% @since 21 Mar 2004 by < > %%% @end %%%-------------------------------------------------...
null
https://raw.githubusercontent.com/fredrikt/yxa/85da46a999d083e6f00b5f156a634ca9be65645b/src/transportlayer/sipsocket.erl
erlang
------------------------------------------------------------------- File : sipsocket.erl @doc Transport layer processes supervisor, and sipsocket interface functions. @end ------------------------------------------------------------------- ---------------------------------------------------------...
@author < > @since 21 Mar 2004 by < > -module(sipsocket). -behaviour(supervisor). -export([send/5, get_socket/1, get_specific_socket/1, get_raw_socket/1, get_remote_peer/1, viastr2proto/1, proto2viastr/1, is_good_socket/1, is_reliable_transport/1, default_port/2, get_listenpor...
3dd0fb5e1d198857a7aeda318ad75cb2f37b3bd550ce2eacdd6eb1f5c8d104e0
kupl/LearnML
patch.ml
type btree = Empty | Node of (int * btree * btree) let rec mem (n : int) (tree : btree) : bool = match tree with | Empty -> false | Node (x, y, z) -> if n = x then true else if mem n y = true then mem n y else mem n z
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/mem/sub14/patch.ml
ocaml
type btree = Empty | Node of (int * btree * btree) let rec mem (n : int) (tree : btree) : bool = match tree with | Empty -> false | Node (x, y, z) -> if n = x then true else if mem n y = true then mem n y else mem n z
20ceb39d3218c6133f044cb7e605d8a7d7041a2d16d45ca9b4d175b30274942e
ghl3/dataframe
util.clj
(ns dataframe.util) (defn zip "Take a number of iterables and return a single iterable over vectors, each containing the ith element of each input iterable (ordered by the order of the input iterables). If the input iterables are not of the same length, the returned iterable is as long as the shortest ...
null
https://raw.githubusercontent.com/ghl3/dataframe/31212c14669e31797ec13cde650a61fd97dbe6d2/src/dataframe/util.clj
clojure
(ns dataframe.util) (defn zip "Take a number of iterables and return a single iterable over vectors, each containing the ith element of each input iterable (ordered by the order of the input iterables). If the input iterables are not of the same length, the returned iterable is as long as the shortest ...
7344e36bf21f9cc1b3462bddf997c3b83bb1ae90603850a4113e7114dc32d0b7
NorfairKing/smos
Changelog.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # module Smos.Docs.Site.Handler.Changelog ( getChangelogR, getChangelogUnreleasedR, getChangelogLatestR, getChangelogAllR, getChangelogReleaseR, ) where import Data.List import ...
null
https://raw.githubusercontent.com/NorfairKing/smos/3bb953f467d83aacec1ce1dd59b687c87258559e/smos-docs-site/src/Smos/Docs/Site/Handler/Changelog.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # module Smos.Docs.Site.Handler.Changelog ( getChangelogR, getChangelogUnreleasedR, getChangelogLatestR, getChangelogAllR, getChangelogReleaseR, ) where import Data.List import qualified Data.Map as M import Data...
3da1f93de0fc3d26b6c74ab588eee4c7ac1ca374c0c568ea8263467e5d42b4ce
unison-code/unison
RemoveUselessVirtuals.hs
| Copyright : Copyright ( c ) 2016 , RISE SICS AB License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2016, RISE SICS AB License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > This file is part of Unison , see -code.github.io ...
null
https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Tools/Import/RemoveUselessVirtuals.hs
haskell
| Copyright : Copyright ( c ) 2016 , RISE SICS AB License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2016, RISE SICS AB License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > This file is part of Unison , see -code.github.io ...
c9082771cc20a8a58feb62d8818fb9b9939f9c45b9c4a49548bf69fb262bd13d
gebi/jungerl
edit_text.erl
%%%---------------------------------------------------------------------- %%% File : edit_text.erl Author : < > %%% Purpose : Text data structure with markers and undo Created : 2 Oct 2001 by < > %%%---------------------------------------------------------------------- -module(edit_text). -author('')....
null
https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/ermacs/src/edit_text.erl
erlang
---------------------------------------------------------------------- File : edit_text.erl Purpose : Text data structure with markers and undo ---------------------------------------------------------------------- ---------------------------------------------------------------------- new ----------------------...
Author : < > Created : 2 Oct 2001 by < > -module(edit_text). -author(''). -export([new/0, new/1, replace/4, add_mark/4, move_mark/3, mark_pos/2, undo/2, cord/1, walk_backward/3, walk_forward/3]). -record(text, {cord, marks=[], undo=[], running_undo=[]}). -record(mark, {name, pos, direction}). new...
581157485278d5211e6844cdad99d8b5264ad6ca2bbb051f973d08bd27b35a72
phantomics/seed
extension.lisp
;;;; extension.lisp (in-package #:seed.modulate) (export 'modes-atom-base)
null
https://raw.githubusercontent.com/phantomics/seed/f128969c671c078543574395d6b23a1a5f2723f8/seed.modes.atom.base/extension.lisp
lisp
extension.lisp
(in-package #:seed.modulate) (export 'modes-atom-base)
e4ba6af4e0012468b93ecb056c8805bc54a8820bd7514328f0723df59de41aa7
songyahui/AlgebraicEffect
test5.ml
effect Foo : (unit -> unit) effect Goo : (unit -> unit) effect Foo1 : (unit -> unit) effect Goo1 : (unit -> unit) effect Foo0 : (unit -> unit) effect Foo1 : (unit -> unit) effect Foo2 : (unit -> unit) effect Foo3 : (unit -> unit) effect Foo4 : (unit -> unit) effect Foo5 : (unit -> unit) effect Foo6 : (unit -> unit) ef...
null
https://raw.githubusercontent.com/songyahui/AlgebraicEffect/27688952b598a101a27523be796e8011d70b02de/src/evaluation/test5.ml
ocaml
@ requires (true, emp, ()) @ @ ensures (true, (_)^*, ()) @ @ ensures (true, (Foo!).(Goo!).Goo?(), ()) @ @ requires (true, emp, ()) @ @ ensures (true, (Goo), ()) @ @ ensures (true, (Goo)^*, ()) @
effect Foo : (unit -> unit) effect Goo : (unit -> unit) effect Foo1 : (unit -> unit) effect Goo1 : (unit -> unit) effect Foo0 : (unit -> unit) effect Foo1 : (unit -> unit) effect Foo2 : (unit -> unit) effect Foo3 : (unit -> unit) effect Foo4 : (unit -> unit) effect Foo5 : (unit -> unit) effect Foo6 : (unit -> unit) ef...
fe88b2b735d1f37cc49a893beae303310f8627716d4fd06dd3fb9376d6483a45
rm-hull/project-euler
misc.clj
(ns util.misc (:use [util.primes])) (def integers (iterate inc 1)) (def squares (->> integers (filter odd?) (reductions +))) (defn is-square? [n] (let [sqrt (Math/sqrt n)] (== sqrt (int sqrt)))) (defn triangle [^long n] (quot (* n (inc n)) 2)) (defn square [^long n] (* n n)) (defn pentagon [^long n] (quot...
null
https://raw.githubusercontent.com/rm-hull/project-euler/04e689e87a1844cfd83229bb4628051e3ac6a325/src/util/misc.clj
clojure
(map char-to-int (str n)))
(ns util.misc (:use [util.primes])) (def integers (iterate inc 1)) (def squares (->> integers (filter odd?) (reductions +))) (defn is-square? [n] (let [sqrt (Math/sqrt n)] (== sqrt (int sqrt)))) (defn triangle [^long n] (quot (* n (inc n)) 2)) (defn square [^long n] (* n n)) (defn pentagon [^long n] (quot...
9e71631d8069d726b2546cbf61885cb590e0062300ae10ecb97a2b32c353db43
mbj/stratosphere
AppImageConfig.hs
module Stratosphere.SageMaker.AppImageConfig ( module Exports, AppImageConfig(..), mkAppImageConfig ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.SageMaker.AppImageConfig.KernelGatewayImageConfigPr...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/AppImageConfig.hs
haskell
# SOURCE #
module Stratosphere.SageMaker.AppImageConfig ( module Exports, AppImageConfig(..), mkAppImageConfig ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Tag import Stratosphere.Val...
04c7a5cd457c4466cacc75a23832a0f6d4935d5803f82ee25fe8b5e268a9cb57
replikativ/konserve
create.clj
(ns benchmark.measure.create (:require [benchmark.common :refer [setup-store statistics timed plots benchmark fs-store-path]] [benchmark.plot :refer [plot bar]] [clojure.core.async :refer [<!!]] [konserve.filestore :refer [new-fs-store]] [konserve.memory :refer [new-mem...
null
https://raw.githubusercontent.com/replikativ/konserve/da09c0fcc066d0e13d6eded673a83382bb9f9e33/benchmark/src/benchmark/measure/create.clj
clojure
(ns benchmark.measure.create (:require [benchmark.common :refer [setup-store statistics timed plots benchmark fs-store-path]] [benchmark.plot :refer [plot bar]] [clojure.core.async :refer [<!!]] [konserve.filestore :refer [new-fs-store]] [konserve.memory :refer [new-mem...
40c40c9f3ea9befa0025a23f7ab2272c742ff9161bc1424107eeae1f40b04548
prg-titech/baccaml
shuffle.ml
;; let rec foo a b c d e f = print_int a; print_int b; print_int c; print_int d; print_int e; print_int f in let rec bar a b c d e f = foo b a d e f c in bar 1 2 3 4 5 6
null
https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/etc/example/shuffle.ml
ocaml
;; let rec foo a b c d e f = print_int a; print_int b; print_int c; print_int d; print_int e; print_int f in let rec bar a b c d e f = foo b a d e f c in bar 1 2 3 4 5 6
9b003e025916e9653137b8ec5fc5f371340c05cb9c88eabcfa87960c4d99fe27
ghcjs/ghcjs
Main.hs
import System.Environment import Data.Maybe suCC :: Int -> Int suCC x = x + 1 isdivs :: Int -> Int -> Bool isdivs n x = mod x n /= 0 the_filter :: [Int] -> [Int] the_filter (n:ns) = filter (isdivs n) ns primes :: [Int] primes = map head (iterate the_filter (iterate suCC 2)) main = do as <- getArgs let a...
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/nofib/imaginary/primes/Main.hs
haskell
import System.Environment import Data.Maybe suCC :: Int -> Int suCC x = x + 1 isdivs :: Int -> Int -> Bool isdivs n x = mod x n /= 0 the_filter :: [Int] -> [Int] the_filter (n:ns) = filter (isdivs n) ns primes :: [Int] primes = map head (iterate the_filter (iterate suCC 2)) main = do as <- getArgs let a...
f1a765b310f93920c00f586dab87ffd57ad887177d45de957a60c54fbedb6bb8
TrustInSoft/tis-kernel
input.mli
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/qed/top/input.mli
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2015 ...
6d4aba1d925cbc816c51a365ae5693fdfb92dee6b38784f868172d83d8c3122b
ocaml-ppx/ocamlformat
array.ml
[| 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 |] let f = function | [| 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222...
null
https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/test/passing/tests/array.ml
ocaml
[| 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 |] let f = function | [| 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222222 ; 1222...
745fa08fd092265c8fedabc5fd3367f81b35857ae50e62e5f521bfb0c0e243dc
goblint/analyzer
cilCfg.ml
open GobConfig open GoblintCil class allBBVisitor = object (* puts every instruction into its own basic block *) inherit nopCilVisitor method! vstmt s = match s.skind with | Instr(il) -> let list_of_stmts = List.map (fun one_inst -> mkStmtOneInstr one_inst) il in let block = mkBlock lis...
null
https://raw.githubusercontent.com/goblint/analyzer/90b9e560dd38e20ca5058e143b5a1ba2fff5970b/src/util/cilCfg.ml
ocaml
puts every instruction into its own basic block The analyzer keeps values only for blocks. So if you want a value for every program point, each instruction needs to be in its own block. end_basic_blocks does that. After adding support for VLAs, there ar...
open GobConfig open GoblintCil inherit nopCilVisitor method! vstmt s = match s.skind with | Instr(il) -> let list_of_stmts = List.map (fun one_inst -> mkStmtOneInstr one_inst) il in let block = mkBlock list_of_stmts in ChangeDoChildrenPost(s, (fun _ -> s.skind <- Block(block); s))...
f2ff32f91f2f162c381b3e8858f8e1826f851f4a8460de12f094742b26dbb2be
gebi/jungerl
simple_top.erl
%%%------------------------------------------------------------------- File : simple_top.erl Author : Mats < locmacr@mwlx084 > %%% Description : %%% Created : 11 Aug 2005 by Mats < locmacr@mwlx084 > %%%------------------------------------------------------------------- -module(simple_top). -export([asse...
null
https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/gtkNode/examples/simple/simple_top.erl
erlang
------------------------------------------------------------------- Description : -------------------------------------------------------------------
File : simple_top.erl Author : Mats < locmacr@mwlx084 > Created : 11 Aug 2005 by Mats < locmacr@mwlx084 > -module(simple_top). -export([assert/1,stop/0]). -import(lists,[flatten/1,sublist/2,sort/2]). -record(st, {ref,client,old_data=[], rows=20,tick=2000,key=reds,tags=[reg,mem,msgq,reds]}). asser...
e4141e95ab2a0e3b9d1400d8730973b02eb7417bf6dd02727bebe6ad2c6c7aeb
txyyss/Project-Euler
Euler139.hs
Pythagorean tiles module Euler139 where primitivePythagoreanTri :: Int -> [Int] primitivePythagoreanTri limit = [sum | m <- [1..maxM], n <- [1..(m-1)], gcd m n == 1, even m || even n, let sum = 2 * m * (m + n),sum <= limit, ...
null
https://raw.githubusercontent.com/txyyss/Project-Euler/d2f41dad429013868445c1c9c1c270b951550ee9/Euler139.hs
haskell
Pythagorean tiles module Euler139 where primitivePythagoreanTri :: Int -> [Int] primitivePythagoreanTri limit = [sum | m <- [1..maxM], n <- [1..(m-1)], gcd m n == 1, even m || even n, let sum = 2 * m * (m + n),sum <= limit, ...
8910244e7a0fd444ab272564db714a222a02d48d1551da2db08c62c62cb76a13
well-typed-lightbulbs/ocaml-esp32
consistbl.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/utils/consistbl.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 2002 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the Consistency tables : for checking consistency of module CRCs open Misc module Make (Module_name : sig...
3f52b8df3d590348bd7a989a057af8ce03c368a15102a1d38583831e960d5ca6
rtoy/ansi-cl-tests
defgeneric-method-combination-append.lsp
;-*- Mode: Lisp -*- Author : Created : Sat May 24 21:31:55 2003 Contains : Tests of with : method - combination (in-package :cl-test) (declaim (special *x*)) (compile-and-load "defgeneric-method-combination-aux.lsp") (deftest defgeneric-method-combination.append.1 (let ((*x* nil) (fn ...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/defgeneric-method-combination-append.lsp
lisp
-*- Mode: Lisp -*-
Author : Created : Sat May 24 21:31:55 2003 Contains : Tests of with : method - combination (in-package :cl-test) (declaim (special *x*)) (compile-and-load "defgeneric-method-combination-aux.lsp") (deftest defgeneric-method-combination.append.1 (let ((*x* nil) (fn (eval '(defgeneri...
55f9996abf3474e868eca813122cc1e4d6530e070ee3bf141544cac4546f8790
jaked/ooauth
client.ml
(* works against the term.ie test server *) module OC = Oauth_client.Make(Oauth_netclient_http_client) let rsa_key = input_value (open_in "private_key.ocaml") let oauth_signature_method = `Rsa_sha1 rsa_key let http_method = `Post let url s = "" ^ s ;; let (oauth_token, oauth_token_secret) = OC.fetch_request_toke...
null
https://raw.githubusercontent.com/jaked/ooauth/8fa9d19570c7c5dea1036b5e9f5bbd945e51166d/examples/term.ie/client.ml
ocaml
works against the term.ie test server
module OC = Oauth_client.Make(Oauth_netclient_http_client) let rsa_key = input_value (open_in "private_key.ocaml") let oauth_signature_method = `Rsa_sha1 rsa_key let http_method = `Post let url s = "" ^ s ;; let (oauth_token, oauth_token_secret) = OC.fetch_request_token ~http_method ~url:(url "/request_token...
448d9443d4f7453d1e8cefa2dd523cf7be4b6312bdca8894daced373fe7a49f4
couchbase/couchdb
couch_task_status.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/couchbase/couchdb/8a75fd2faa89f95158de1776354ceccf3e762753/src/couchdb/couch_task_status.erl
erlang
use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(couch_task_status). -behaviour(gen_server). update their status properties via update/1 . The status of a task is a list of properties . Each p...
646bed57887f6a2601ad13b394c7d28e1699124954e8c56e3b7f378ca96a5a80
ekataglobal/github-changelog
spec.clj
(ns github-changelog.spec (:require [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [clojure.string :as str]) (:import java.net.URL)) (s/def ::non-blank-string (s/and string? (complement str/blank?))) (defn url? [x] (try (doto (URL. x) (.toURI)) true (catch ...
null
https://raw.githubusercontent.com/ekataglobal/github-changelog/29dcaab03407c69584549a79ed449bdddebc1e16/src/github_changelog/spec.clj
clojure
(ns github-changelog.spec (:require [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [clojure.string :as str]) (:import java.net.URL)) (s/def ::non-blank-string (s/and string? (complement str/blank?))) (defn url? [x] (try (doto (URL. x) (.toURI)) true (catch ...
36ec5e67e40c98eaf1d94b306a35889b93f76b171989d24d51a319cb40f82c47
incoherentsoftware/defect-process
SpikeBarrage.hs
module Player.Gun.All.SpikeGun.SpikeBarrage ( mkSpikeBarrage ) where import Control.Monad.IO.Class (MonadIO) import Collision import Configs import Configs.All.PlayerGun.SpikeGun import Constants import Id import Msg import Player import Player.Gun.All.SpikeGun.Data import Player.Gun.All.SpikeGun.Spike import...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/61ee16c917b6da8f0ebd84b0bbebc7e3fe8bce27/src/Player/Gun/All/SpikeGun/SpikeBarrage.hs
haskell
module Player.Gun.All.SpikeGun.SpikeBarrage ( mkSpikeBarrage ) where import Control.Monad.IO.Class (MonadIO) import Collision import Configs import Configs.All.PlayerGun.SpikeGun import Constants import Id import Msg import Player import Player.Gun.All.SpikeGun.Data import Player.Gun.All.SpikeGun.Spike import...
c6f36967175fc2d5ace6faf972460a679ccf660abb72490c13502fa7315415f9
Clozure/ccl-tests
and.lsp
;-*- Mode: Lisp -*- Author : Created : Fri Oct 18 07:23:48 2002 ;;;; Contains: Tests for AND (in-package :cl-test) (deftest and.1 (and) t) (deftest and.2 (and nil) nil) (deftest and.3 (and 'a) a) (deftest and.4 (and (values 'a 'b 'c)) a b c) (deftest and.5 (and (values))) (deftest ...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/and.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for AND Test that explicit calls to macroexpand in subforms are done in the correct environment Error tests
Author : Created : Fri Oct 18 07:23:48 2002 (in-package :cl-test) (deftest and.1 (and) t) (deftest and.2 (and nil) nil) (deftest and.3 (and 'a) a) (deftest and.4 (and (values 'a 'b 'c)) a b c) (deftest and.5 (and (values))) (deftest and.6 (and (values t nil) 'a) a) (deftest and.7 ...
721d7ee607be76b4ded246d7d378c774475f2eb9da6ab84acbc8aa7611599ce0
aaronallen8455/inventory
Output.hs
# LANGUAGE CPP # module GHC.Output ( module X , Mode(..) ) where #if __GLASGOW_HASKELL__ >= 900 import GHC.Utils.Outputable as X import GHC.Utils.Ppr (Mode(..)) import GHC.Utils.Ppr.Colour as X #else import Outputable as X import PprColour as X import ...
null
https://raw.githubusercontent.com/aaronallen8455/inventory/e16244f2c3b920ec0caffc4b81d236219b78bd91/src/GHC/Output.hs
haskell
# LANGUAGE CPP # module GHC.Output ( module X , Mode(..) ) where #if __GLASGOW_HASKELL__ >= 900 import GHC.Utils.Outputable as X import GHC.Utils.Ppr (Mode(..)) import GHC.Utils.Ppr.Colour as X #else import Outputable as X import PprColour as X import ...
895c417dae2043bf591328475c27f7e20f8a019d62c3afe30d33b568498800f6
sharplispers/ops5
package.lisp
package.lisp (defpackage #:ops (:use #:cl) (:shadow #:remove #:write) (:export #:remove #:write #:make #:modify #:crlf #:--> #:literalize #:p #:vector-attribute #:strategy #:match ...
null
https://raw.githubusercontent.com/sharplispers/ops5/77f9ca949624be91f98a0d265a30a8c8626ebbf9/package.lisp
lisp
package.lisp (defpackage #:ops (:use #:cl) (:shadow #:remove #:write) (:export #:remove #:write #:make #:modify #:crlf #:--> #:literalize #:p #:vector-attribute #:strategy #:match ...
4f2a387643da7996b1cc021283a9fb3a79972d6140d32e90f0ff767994528157
Lysxia/twentyseven
Loops.hs
-- | Traversing mutable vectors. module Data.Vector.Generic.Mutable.Loops where import Control.Monad.Primitive import Data.Vector.Generic.Mutable as MG type Loop m v a = v (PrimState m) a -> (a -> m ()) -> m () type ILoop m v a = v (PrimState m) a -> (Int -> a -> m ()) -> m () {-# INLINE iForM_ #-} iForM_ :: (MG.MVe...
null
https://raw.githubusercontent.com/Lysxia/twentyseven/bfcd3ddcf938bc6db933a364d331877b0fd1257e/src/Data/Vector/Generic/Mutable/Loops.hs
haskell
| Traversing mutable vectors. # INLINE iForM_ # # INLINE forM_ # @forM_ [0 .. n-1]@ somehow runs out of memory
module Data.Vector.Generic.Mutable.Loops where import Control.Monad.Primitive import Data.Vector.Generic.Mutable as MG type Loop m v a = v (PrimState m) a -> (a -> m ()) -> m () type ILoop m v a = v (PrimState m) a -> (Int -> a -> m ()) -> m () iForM_ :: (MG.MVector v a, PrimMonad m) => ILoop m v a iForM_ v f = for'...
1ac67d9df2f44c50e1387e05e6000a040bdc37ddd1cd694abd692123cba77b6e
gmartinezramirez/USACH-Paradigmas-Programacion
TDA_lista_de_compras.rkt
#lang racket TDA lista de compras Lista de compras que se compone articulo se compone de un nombre y un precio ;(define lista-de-compras ( list articulo1 articulo2 articulo3 ) ;; TDA Articulo Constructor ;; Dom: nombre <str>, precio <number> ;; Rec: articulo (define articulo (lambda (nombre precio) ...
null
https://raw.githubusercontent.com/gmartinezramirez/USACH-Paradigmas-Programacion/44c0f40342d5e8fdd0a0d15cffc1a56df9742aa3/2021-01/01-FP/01-TDA/TDA_lista_de_compras.rkt
racket
(define lista-de-compras TDA Articulo Dom: nombre <str>, precio <number> Rec: articulo car (cdr (2 3 4 5 6)) car (3 4 5 6) Capa modificador Hack: ocupar la funcion reverse null? null
#lang racket TDA lista de compras Lista de compras que se compone articulo se compone de un nombre y un precio ( list articulo1 articulo2 articulo3 ) Constructor (define articulo (lambda (nombre precio) (list nombre precio))) (define articulo-1 (articulo "mi articulo 1" 100)) (define articulo-2 ...
30070d07e688ec135f61b02071713c1d5863d7c5a50ccb632b97bed00ea198f4
alexkehayias/chocolatier
events_test.cljs
(ns chocolatier.engine.events-test (:require [devcards.core :as dc :refer-macros [defcard deftest dom-node]] [cljs.test :refer-macros [is testing run-tests]] [chocolatier.engine.events :as ev])) (defcard "# Event System Tests") (deftest test-get-events (testing "Test getting events from th...
null
https://raw.githubusercontent.com/alexkehayias/chocolatier/6b77c1dbf10ef7ff83d0b5a2ebb9fda39edcde5a/test/cljs/chocolatier/engine/events_test.cljs
clojure
JS arrays are never equivalent when using = so we must
(ns chocolatier.engine.events-test (:require [devcards.core :as dc :refer-macros [defcard deftest dom-node]] [cljs.test :refer-macros [is testing run-tests]] [chocolatier.engine.events :as ev])) (defcard "# Event System Tests") (deftest test-get-events (testing "Test getting events from th...
6f5ef4ee7004bfad08bb06d8640e9f393a914ac947f1fae9291bd0948b31299c
viglioni/stocks
root_test.clj
(ns stocks.service.root-test (:require [clojure.test :refer :all] [stocks.web :refer :all] [ring.mock.request :as mock])) (deftest hello-world (is (= (app (mock/request :get "/")) {:status 200 :headers {"Content-Type" "application/octet-stream"} :body "Hello...
null
https://raw.githubusercontent.com/viglioni/stocks/239193c2af279c4d5d677a698258135ed0af3fb6/test/stocks/service/root_test.clj
clojure
(ns stocks.service.root-test (:require [clojure.test :refer :all] [stocks.web :refer :all] [ring.mock.request :as mock])) (deftest hello-world (is (= (app (mock/request :get "/")) {:status 200 :headers {"Content-Type" "application/octet-stream"} :body "Hello...
22caf781312076704abd9216c71538265051240ffbea8c4116a0e0efb78d8031
fpco/ide-backend
Utils.hs
----------------------------------------------------------------------------- -- | -- Module : Distribution.PackageDescription.Utils -- -- Maintainer : -- Portability : portable -- -- Common utils used by modules under Distribution.PackageDescription.*. module Distribution.PackageDescription.Utils ( cabalB...
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.22.0.0/Distribution/PackageDescription/Utils.hs
haskell
--------------------------------------------------------------------------- | Module : Distribution.PackageDescription.Utils Maintainer : Portability : portable Common utils used by modules under Distribution.PackageDescription.*. -----------------------------------------------------------------------...
module Distribution.PackageDescription.Utils ( cabalBug, userBug ) where userBug :: String -> a userBug msg = error $ msg ++ ". This is a bug in your .cabal file." cabalBug :: String -> a cabalBug msg = error $ msg ++ ". This is possibly a bug in Cabal.\n" ++ "Please report it to the developers: ...
4ccb8eec9438013d20de3d366dacc1659616e6f6138bf978cf87737a88fcb287
andreas/ppx_graphql
variables_test.ml
open Test_helper let suite : (string * [>`Quick] * (unit -> unit)) list = [ ("nullable", `Quick, fun () -> let _, mk_variables, _ = [%graphql {| query Foo($int: Int, $string: String, $bool: Boolean, $float: Float, $id: ID, $enum: COLOR) { non_nullable_int } |}] in let variables ...
null
https://raw.githubusercontent.com/andreas/ppx_graphql/2d185501ce812a241ce3a8bb42b3a531a3366eee/test/variables_test.ml
ocaml
open Test_helper let suite : (string * [>`Quick] * (unit -> unit)) list = [ ("nullable", `Quick, fun () -> let _, mk_variables, _ = [%graphql {| query Foo($int: Int, $string: String, $bool: Boolean, $float: Float, $id: ID, $enum: COLOR) { non_nullable_int } |}] in let variables ...
c251b1e722a0d2d21cb7a861a711c10cbbd338c4148ab93d1685e898cf4895be
blynn/compiler
reply-native.hs
main :: IO () main = loop =<< initialState loop st@(mos, (libStart, lib)) = do putStr "> " getLine >>= maybe (putChar '\n') repl where repl s = case readInput mos s of Left err -> putStrLn err >> loop st Right good -> case good of Left frag -> loop =<< addTyped st frag Right expr -> exec lib...
null
https://raw.githubusercontent.com/blynn/compiler/a459e11fea0b726e0fbde5f3224856caddfa4503/inn/reply-native.hs
haskell
main :: IO () main = loop =<< initialState loop st@(mos, (libStart, lib)) = do putStr "> " getLine >>= maybe (putChar '\n') repl where repl s = case readInput mos s of Left err -> putStrLn err >> loop st Right good -> case good of Left frag -> loop =<< addTyped st frag Right expr -> exec lib...
61b78946d3bf14079357708a2c1d0d6aedd93eae646a073d282d864689a2070c
ParaPhraseAGH/erlang-mas
mas_hybrid_island.erl
@author jstypka < > %% @version 1.0 %% @doc This module handles the logic of a single island in hybrid model -module(mas_hybrid_island). -export([start/2, close/1, sendAgent/2]). -include ("mas.hrl"). -type agent() :: mas:agent(). -type sim_params() :: mas:sim_params(). %% =======================================...
null
https://raw.githubusercontent.com/ParaPhraseAGH/erlang-mas/e53ac7ace59b50696bd5e89a1e710d88213e2b1d/src/hybrid/mas_hybrid_island.erl
erlang
@version 1.0 @doc This module handles the logic of a single island in hybrid model ==================================================================== API functions ==================================================================== @doc Generates initial data and starts the computation @doc Asynchronusly send...
@author jstypka < > -module(mas_hybrid_island). -export([start/2, close/1, sendAgent/2]). -include ("mas.hrl"). -type agent() :: mas:agent(). -type sim_params() :: mas:sim_params(). -spec start(sim_params(), config()) -> no_return(). start(SP, Cf) -> mas_misc_util:seed_random(), Agents = mas_misc_util:ge...
ac94bd59136a8c75855b688188c2d8054e8baa422ff9d6c4cd84bec3d85bb390
ucsd-progsys/dsolve
rbtree.ml
type key == int and 'a entry == int * 'a and answer == key option ;; sort color == {a:int | 0 <= a <= 1};; type order = LESS | EQUAL | GREATER;; datatype 'a dict with (color, nat, nat, nat) = Empty(0, 0, 0, 0) | {cl:color}{cr:color}{bh:nat}{sl:nat}{sr:nat} Black(0, bh+1, 0, sl+sr+1) of 'a entry * 'a dict(cl, bh,...
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/xiog/DML/rbtree.ml
ocaml
val ins : 'a dict -> 'a dict inserts entry ins (Black _) or ins (Empty) will be red/black tree ins preserves black height re-color re-color
type key == int and 'a entry == int * 'a and answer == key option ;; sort color == {a:int | 0 <= a <= 1};; type order = LESS | EQUAL | GREATER;; datatype 'a dict with (color, nat, nat, nat) = Empty(0, 0, 0, 0) | {cl:color}{cr:color}{bh:nat}{sl:nat}{sr:nat} Black(0, bh+1, 0, sl+sr+1) of 'a entry * 'a dict(cl, bh,...
94dfbc1ad43044ab83f4afb26d2a62e35272a69d4b480396b0a9db746ac5fbcf
ocaml-multicore/tezos
nonce.ml
(**************************************************************************) (* *) Copyright ( c ) 2014 - 2018 . Dynamic Ledger Solutions , Inc. < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_protocol/test/helpers/nonce.ml
ocaml
************************************************************************ All rights reserved.No warranty, explicit or implicit, provided. ...
Copyright ( c ) 2014 - 2018 . Dynamic Ledger Solutions , Inc. < > open Protocol module Table = Hashtbl.Make (struct type t = Nonce_hash.t let hash h = Int32.to_int (TzEndian.get_int32 (Nonce_hash.to_bytes h) 0) let equal = Nonce_hash.equal ...
96b9434fb4d40847fefca287a3e379638c86efdf796bb891afeb2fffe1a41db8
freuk/obandit
pkg.ml
#!/usr/bin/env ocaml #use "topfind" #require "topkg" open Topkg let () = Pkg.describe ~distrib:(Pkg.distrib ()) "obandit" @@ fun c -> Ok [ Pkg.mllib "src/obandit.mllib"; Pkg.bin "src-bin/cli" ~dst:"obandit"; ]
null
https://raw.githubusercontent.com/freuk/obandit/0d8222c9e8dbb4b7f324290121bc45892620c783/pkg/pkg.ml
ocaml
#!/usr/bin/env ocaml #use "topfind" #require "topkg" open Topkg let () = Pkg.describe ~distrib:(Pkg.distrib ()) "obandit" @@ fun c -> Ok [ Pkg.mllib "src/obandit.mllib"; Pkg.bin "src-bin/cli" ~dst:"obandit"; ]
444542839ee233e7fc99869423c01b2c766f892938f8f94cef0b9195e3bdb536
fossas/fossa-cli
ProjectAssetsJson.hs
# LANGUAGE RecordWildCards # module Strategy.NuGet.ProjectAssetsJson ( discover, findProjects, getDeps, mkProject, buildGraph, ProjectAssetsJson (..), -- * for testing approxEql, FrameworkName (..), ) where import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject'), analyzeProject) import Con...
null
https://raw.githubusercontent.com/fossas/fossa-cli/187f19afec2133466d1998c89fc7f1c77107c2b0/src/Strategy/NuGet/ProjectAssetsJson.hs
haskell
* for testing Note: This is because, target framework has different identifier scheme (long form, short form). We could not find exact framework, fallback to equivalent match. Reference:
# LANGUAGE RecordWildCards # module Strategy.NuGet.ProjectAssetsJson ( discover, findProjects, getDeps, mkProject, buildGraph, ProjectAssetsJson (..), approxEql, FrameworkName (..), ) where import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject'), analyzeProject) import Control.Effect.Diagnos...
6f7bbf5c916081ddf9370dde8fc8de029d648eb7a61fe90b5db3fcf8b9077b94
grin-compiler/grin
SyntaxDefs.hs
# LANGUAGE DeriveDataTypeable , DeriveGeneric , StandaloneDeriving , LambdaCase # module Grin.SyntaxDefs where import Data.Text (Text, unpack) import Control.DeepSeq import GHC.Generics (Generic) import Data.Data import Data.String import Text.Printf import Lens.Micro.Platform Names are stored in NM form when we ...
null
https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/Grin/SyntaxDefs.hs
haskell
when we seralize the Exp missing parameter count
# LANGUAGE DeriveDataTypeable , DeriveGeneric , StandaloneDeriving , LambdaCase # module Grin.SyntaxDefs where import Data.Text (Text, unpack) import Control.DeepSeq import GHC.Generics (Generic) import Data.Data import Data.String import Text.Printf import Lens.Micro.Platform Names are stored in NM form when we ...
2ccd430c7762a892141d5554d1ecabe818cb51efd789b042b3d97d264640bb89
BinaryAnalysisPlatform/bap
monads_monad.mli
open Core_kernel[@@warning "-D"] module Types = Monads_types module Monoid = Monads_monoid module type Basic = Types.Monad.Basic module type Basic2 = Types.Monad.Basic2 module Syntax = Types.Monad.Syntax module type S = Types.Monad.S module type S2 = Types.Monad.S2 module type Core = Types.Monad.Core module type Cor...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/monads/monads_monad.mli
ocaml
open Core_kernel[@@warning "-D"] module Types = Monads_types module Monoid = Monads_monoid module type Basic = Types.Monad.Basic module type Basic2 = Types.Monad.Basic2 module Syntax = Types.Monad.Syntax module type S = Types.Monad.S module type S2 = Types.Monad.S2 module type Core = Types.Monad.Core module type Cor...
08585735ee7e48c74461a1ec4bc7f3b0b4291d3ff80a4cfa1472b1368e962849
tcsprojects/mlsolver
modelcheckinggamesregistry.mli
open Tcsmetaformula;; open Tcsmessage;; open Tcsgames;; type modelchecking_answer = ModelSatisfiesFormula | ModelFalsifiesFormula type modelchecking_procedure = formula_expr -> in_channel -> string array -> (* options *) (MessageChannel.message_channel * (* general information *) MessageChannel.me...
null
https://raw.githubusercontent.com/tcsprojects/mlsolver/fdd1d7550aa57a42886160ae1e8336c1111b7d94/src/automata/modelcheckinggamesregistry.mli
ocaml
options general information formula information construction information the game final stats output function answer function
open Tcsmetaformula;; open Tcsmessage;; open Tcsgames;; type modelchecking_answer = ModelSatisfiesFormula | ModelFalsifiesFormula type modelchecking_procedure = formula_expr -> in_channel -> val register_modelchecking_procedure: modelchecking_procedure -> string -> string -> unit val mem_modelcheck...
08c69e930a44ce12e5fb305dd73d3c656f38c3a96ad638435df284a53f584db1
CryptoKami/cryptokami-core
Merkle.hs
# LANGUAGE NamedFieldPuns # -- | Merkle tree implementation. -- -- See <>. module Pos.Merkle ( MerkleRoot(..) , MerkleTree (..) , mtRoot , mkMerkleTree , MerkleNode (..) , mkBranch , mkLeaf ) where import Universum import Data.Bits (Bits (....
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/core/Pos/Merkle.hs
haskell
| Merkle tree implementation. See <>. | Data type for root of merkle tree. | Smart constructor for 'MerkleTree'. | Returns root of merkle tree. ------ ------
# LANGUAGE NamedFieldPuns # module Pos.Merkle ( MerkleRoot(..) , MerkleTree (..) , mtRoot , mkMerkleTree , MerkleNode (..) , mkBranch , mkLeaf ) where import Universum import Data.Bits (Bits (..)) import Data.ByteArray (ByteArrayA...
8f42cf074478772740eb3f1b98e6dddf7e953cfd4290ee5d74374f4ce3a82c6d
mauny/the-functional-approach-to-programming
pavages2_pictures.ml
#open "../Util/prelude";; #directory "../MLGRAPH.DIR";; #open "MLgraph";; #open "complex";; #open "permutations";; #open "pavages2";; #infix "ctrans";; (* +p1_gen+ *) type p1_gen = TA | TB | Ta | Tb;; (* +p1_gen+ *) (* +p1_group+ *) let p1_op = fun TA -> (fun [] -> [TA] | (((TA|TB...
null
https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/Geom/pavages2_pictures.ml
ocaml
+p1_gen+ +p1_gen+ +p1_group+ +p1_group+ +motif1+ +motif1+ +p1_transfo+ +p1_transfo+ +pavage6_prep+ +pavage6_prep+ +pavage6_prep2+ +pavage6_prep2+ +pavage6+ +pavage6+ +p2_gen+ +p2_gen+ +p2_group+ +p2_group+ +motif2+ +motif2+ +p2_transfo+ +p2_transfo+ +pavage7_prep+ +pavage7...
#open "../Util/prelude";; #directory "../MLGRAPH.DIR";; #open "MLgraph";; #open "complex";; #open "permutations";; #open "pavages2";; #infix "ctrans";; type p1_gen = TA | TB | Ta | Tb;; let p1_op = fun TA -> (fun [] -> [TA] | (((TA|TB|Tb)::tl) as tl') -> TA::tl' ...
5fe9df0a94a959be34bfc3773bc3df7cbf4ff187e1fd2bfb76105d02153af3b1
haslab/HAAP
Rank.hs
HAAP : Haskell Automated Assessment Platform This module provides the @Rank@ plugin to generate rankings . HAAP: Haskell Automated Assessment Platform This module provides the @Rank@ plugin to generate rankings. -} # LANGUAGE TypeOperators , DeriveDataTypeable , DeriveGeneric , UndecidableInstances , FlexibleC...
null
https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/src/HAAP/Test/Rank.hs
haskell
HAAP : Haskell Automated Assessment Platform This module provides the @Rank@ plugin to generate rankings . HAAP: Haskell Automated Assessment Platform This module provides the @Rank@ plugin to generate rankings. -} # LANGUAGE TypeOperators , DeriveDataTypeable , DeriveGeneric , UndecidableInstances , FlexibleC...
f5a7b9757cb0c5b9409c1528861ae6ee2ae60d76640fdcb7e970b21475dfbd87
Elzair/nazghul
landslide.scm
;; landslide -- shake the map, drop some boulders, and damage any non-flying, ;; non-phasing beings that get hit. (define (drop-rock-on kbeing) (cond ((and (not (can-fly? kbeing)) (not (can-phase? kbeing))) (kern-log-msg (kern-obj-get-name kbeing) " hit by falling rock!")...
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/template/lib/landslide.scm
scheme
landslide -- shake the map, drop some boulders, and damage any non-flying, non-phasing beings that get hit.
(define (drop-rock-on kbeing) (cond ((and (not (can-fly? kbeing)) (not (can-phase? kbeing))) (kern-log-msg (kern-obj-get-name kbeing) " hit by falling rock!") (kern-obj-apply-damage kbeing "hit" (ke...
0dc6e96ad1cc20d8fbe83a6332366c160199589674a930957c9128543d1e483a
MinaProtocol/mina
currency.mli
[%%import "/src/config.mlh"] type uint64 = Unsigned.uint64 (** Here, we simply include the full expected signature, while clarifying that the types are those defined in {!Mina_wire_types} *) include Intf.Full with type Fee.Stable.V1.t = Mina_wire_types.Currency.Fee.V1.t and type Amount.Stable.V1.t = Mi...
null
https://raw.githubusercontent.com/MinaProtocol/mina/7a380064e215dc6aa152b76a7c3254949e383b1f/src/lib/currency/currency.mli
ocaml
* Here, we simply include the full expected signature, while clarifying that the types are those defined in {!Mina_wire_types}
[%%import "/src/config.mlh"] type uint64 = Unsigned.uint64 include Intf.Full with type Fee.Stable.V1.t = Mina_wire_types.Currency.Fee.V1.t and type Amount.Stable.V1.t = Mina_wire_types.Currency.Amount.V1.t and type Balance.Stable.V1.t = Mina_wire_types.Currency.Balance.V1.t
e9450e9827cec2ecc258266067f45478510af3c0e469ec2eb13ec35832a7427a
stan-dev/stanc3
Info.mli
* Implementation of the [ --info ] option which outputs on the standard output a JSON object containing information about the model . The JSON object has a field [ inputs ] , [ parameters ] , [ transformed parameters ] , and [ generated quantities ] containing a dictionary where each entry correspo...
null
https://raw.githubusercontent.com/stan-dev/stanc3/69b60a1054f0cce0c09efac198775901e72c0f8d/src/frontend/Info.mli
ocaml
* Implementation of the [ --info ] option which outputs on the standard output a JSON object containing information about the model . The JSON object has a field [ inputs ] , [ parameters ] , [ transformed parameters ] , and [ generated quantities ] containing a dictionary where each entry correspo...
041deeb66df9e97ad39f8e05ad1b154b4d68d125a1611c0eb468125ce9bc6296
zxymike93/SICP
222.rkt
#lang sicp (define square (lambda (x) (* x x))) 第一个版本 ;(define (square-list items) ; (define (iter things answer) ; (if (null? things) ; answer ; (iter (cdr things) ; (cons (square (car things)) ; answer)))) ; (iter items nil)) ;; 通过模拟估值过程可以解释为什么列表会调转 ( square -...
null
https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/chapter2/222.rkt
racket
(define (square-list items) (define (iter things answer) (if (null? things) answer (iter (cdr things) (cons (square (car things)) answer)))) (iter items nil)) 通过模拟估值过程可以解释为什么列表会调转 (iter (1 2 3 4) nil) (define (square-list items) (define (iter things answer) ...
#lang sicp (define square (lambda (x) (* x x))) 第一个版本 ( square - list ( list 1 2 3 4 ) ) ( iter ( 2 3 4 ) ( 1 ) ) ( iter ( 3 4 ) ( 4 1 ) ) ( iter ( 4 ) ( 9 4 1 ) ) ( iter ( ) ( 16 9 4 1 ) ) ( 16 9 4 1 ) ( square - list ( list 1 2 3 4 ) ) ( iter ( cdr ( 2 3 4 ) ) ( cons ( nil 1 ) 4 ) ) ( iter ( cdr ( 3 4 ) )...
4d1f766e89017d83a66aa20547c41d32c6a4cecf6cd3fca85d69c57e06e31adc
bendudson/py4cl
package.lisp
package.lisp (defpackage #:py4cl (:use #:cl) (:export ; python-process #:*python-command* ; The executable to run (string) #:python-start #:python-stop #:python-alive-p #:python-start-if-not-alive #:python-version-info #:python-interrupt) (:export ; callpython #:python-error #:pyth...
null
https://raw.githubusercontent.com/bendudson/py4cl/601ed206a43beb8504015be464c45be98dc856d0/src/package.lisp
lisp
python-process The executable to run (string) callpython import-export lisp-classes config
package.lisp (defpackage #:py4cl (:use #:cl) #:python-start #:python-stop #:python-alive-p #:python-start-if-not-alive #:python-version-info #:python-interrupt) #:python-error #:python-eval #:python-exec #:python-call #:python-call-async #:python-method #:python-generator ...
b165973c1eda96c202df33d800400c800a7dbc8735100b99f845a013b4a5d5c2
aptmcl/rosetta
robot-com.rkt
#lang typed/racket/base/no-check (require (for-syntax racket/base racket/list)) (require racket/function racket/string racket/match racket/port racket/file racket/list) (require (except-in math random-integer permutations) "../base/typed-com.rkt" "../base/utils.rkt" "../base/coord.rk...
null
https://raw.githubusercontent.com/aptmcl/rosetta/1b81b10b0c8eb77d92d6b5ea86d0eb940add0888/robot/robot-com.rkt
racket
To simplify type checking Several types must be treated just as Com-Objects #'Com-Object)) initialization PROPERTIES (def-ro-property (data IRobotLabel) IRobotBarSectionData) Angle of rotation COM METHODS Stress I_PT_FRAME_2D, I_PT_SHELL, etc Labels Node support Nodes We should check that the families are the same. Wh...
#lang typed/racket/base/no-check (require (for-syntax racket/base racket/list)) (require racket/function racket/string racket/match racket/port racket/file racket/list) (require (except-in math random-integer permutations) "../base/typed-com.rkt" "../base/utils.rkt" "../base/coord.rk...
f84152da3f527cc58cf7584d094860b6fccae319ad59d33b75158bb97fe3d524
exercism/babashka
project.clj
(defproject say "0.1.0-SNAPSHOT" :description "say exercise." :url "" :dependencies [[org.clojure/clojure "1.10.0"]])
null
https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/say/project.clj
clojure
(defproject say "0.1.0-SNAPSHOT" :description "say exercise." :url "" :dependencies [[org.clojure/clojure "1.10.0"]])
aee4500bd6e8baa65e59ce98b25b508b1f32e1cb3e4fc2565eb4f91432ded47b
clojure-interop/google-cloud-clients
SpannerRpc$StreamingCall.clj
(ns com.google.cloud.spanner.spi.v1.SpannerRpc$StreamingCall "Handle for cancellation of a streaming read or query call." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.spanner.spi.v1 SpannerRpc$StreamingCall])) (defn request "Requests more messages from the stream. We disable the ...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/spi/v1/SpannerRpc%24StreamingCall.clj
clojure
(ns com.google.cloud.spanner.spi.v1.SpannerRpc$StreamingCall "Handle for cancellation of a streaming read or query call." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.spanner.spi.v1 SpannerRpc$StreamingCall])) (defn request "Requests more messages from the stream. We disable the ...
3fd19ed28b633804d22fbcdf8c8279bbcc5f3b66f82a346c8ec73820a6da279d
janestreet/bonsai
proc.ml
open! Core open! Import module Result_spec = struct include Bonsai_test.Result_spec let vdom (type result) ?filter_printed_attributes ?(censor_paths = true) ?(censor_hash = true) get_vdom = (module struct type t = result include No_incoming let v...
null
https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/web_test/proc.ml
ocaml
open! Core open! Import module Result_spec = struct include Bonsai_test.Result_spec let vdom (type result) ?filter_printed_attributes ?(censor_paths = true) ?(censor_hash = true) get_vdom = (module struct type t = result include No_incoming let v...
b0bc94aa6e20eeb2918f405f792f4150f192bcaccaefa17e5cf241534fff5e54
ivanjovanovic/sicp
e-3.32.scm
Exercise 3.32 . ; ; The procedures to be run during each time ; segment of the agenda are kept in a queue. Thus, the procedures ; for each segment are called in the order in which they were added to the agenda ( first in , first out ) . Explain why this ; order must be used. In particular, trace the behavior of an ...
null
https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/3.3/e-3.32.scm
scheme
The procedures to be run during each time segment of the agenda are kept in a queue. Thus, the procedures for each segment are called in the order in which they were order must be used. In particular, trace the behavior of an segment and say how the behavior would differ if we stored a segment's procedures in an...
Exercise 3.32 . added to the agenda ( first in , first out ) . Explain why this and - gate whose inputs change from 0,1 to 1,0 in the same procedures only at the front ( last in , first out ) . If we look at the implementation more closely , and gate ads one action per the input signal , these two actions ...
06130b2c89834d8d3b9ca1dcdd367dc1bd317153c885f5bcf68a6690fe6773f8
GrantMatejka/rasm
arithmetic_nested.rkt
(module nested_arithmetic racket (provide add1 sub1 mul1 div1 add2 sub2 mul2 div2 add3 sub3 mul3 div3) (define add1 (+ 41234 (+ (+ 4508 5000) 10))) (define add2 (+ (+ 4.5 6.7) (+ 10.2 78.3))) (define add3 (+ (+ 6.7 4.5) (+ 4 50))) (define sub1 (- 123435 (- (- 35 7) 3))) (define sub2 (-...
null
https://raw.githubusercontent.com/GrantMatejka/rasm/18fcd0c33b55462ca175a7c6ed76545832c60370/examples/arithmetic_nested.rkt
racket
(module nested_arithmetic racket (provide add1 sub1 mul1 div1 add2 sub2 mul2 div2 add3 sub3 mul3 div3) (define add1 (+ 41234 (+ (+ 4508 5000) 10))) (define add2 (+ (+ 4.5 6.7) (+ 10.2 78.3))) (define add3 (+ (+ 6.7 4.5) (+ 4 50))) (define sub1 (- 123435 (- (- 35 7) 3))) (define sub2 (-...
fd54893ba768c712ce7c521307f3a65aece094c9915cb89396578ae1b21cd5f9
ekmett/lens
Instances.hs
----------------------------------------------------------------------------- -- | -- Module : Control.Lens.Internal.Instances Copyright : ( C ) 2012 - 2016 -- License : BSD-style (see the file LICENSE) Maintainer : < > -- Stability : experimental -- Portability : non-portable -- This...
null
https://raw.githubusercontent.com/ekmett/lens/a26281a49e85af46821964d8f7455b82cfd4251d/src/Control/Lens/Internal/Instances.hs
haskell
--------------------------------------------------------------------------- | Module : Control.Lens.Internal.Instances License : BSD-style (see the file LICENSE) Stability : experimental Portability : non-portable --------------------------------------------------------------------------
Copyright : ( C ) 2012 - 2016 Maintainer : < > This module includes orphan instances for @(,)@ , ' Either ' and ' Const ' that should be supplied by base . These have moved to @semigroupoids@ as of 4.2 . module Control.Lens.Internal.Instances () where import Data.Orphans () import Data.Traversabl...
ed349dfa4b10267b3ecbaeb19a7956dd13f2ddee723781421180bedffba7ff8a
lispnik/iup
packages.lisp
(defpackage #:iup (:use #:common-lisp #:alexandria) (:export #:open #:close #:image-lib-open #:main-loop #:loop-step #:loop-step-wait #:main-loop-level #:flush #:exit-loop #:record-input #:play-input #:update #:update-children #:redraw #:refresh #:refresh-...
null
https://raw.githubusercontent.com/lispnik/iup/f8e5f090bae47bf8f91ac6fed41ec3bc01061186/iup/packages.lisp
lisp
set-callback get-callback set-function get-function get-handle set-handle get-all-names get-all-dialogs get-name
(defpackage #:iup (:use #:common-lisp #:alexandria) (:export #:open #:close #:image-lib-open #:main-loop #:loop-step #:loop-step-wait #:main-loop-level #:flush #:exit-loop #:record-input #:play-input #:update #:update-children #:redraw #:refresh #:refresh-...
dc10f51f70388d938b3566653cc9589ef1d72b765118c78fd203a1d1f8feb057
dbuenzli/hyperbib
year_html.mli
--------------------------------------------------------------------------- Copyright ( c ) 2021 University of Bern . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
null
https://raw.githubusercontent.com/dbuenzli/hyperbib/04a09ae1036c68a45114c080206364fecb64b7f6/src/html/year_html.mli
ocaml
* Year renderings.
--------------------------------------------------------------------------- Copyright ( c ) 2021 University of Bern . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
d7d26581f76c781e409c73a912c9770ae4809f593c2076385d9a2881a4fa1b0b
patricoferris/ocaml-virtualization
create.ml
open Cmdliner let ( let+ ) t f = Term.(const f $ t) let ( and+ ) a b = Term.(const (fun x y -> (x, y)) $ a $ b) let cpus_term = let i = Arg.info [ "cpus" ] ~doc:"Number of CPUS for the virtual machine" ~docv:"CPUS" in Arg.(value (opt int 2 i)) let memory_term = let i = Arg.info [ "memory" ] ~d...
null
https://raw.githubusercontent.com/patricoferris/ocaml-virtualization/d4a49f36a2e7a1681cad88f6e58c29644f48e89a/src/bin/create.ml
ocaml
open Cmdliner let ( let+ ) t f = Term.(const f $ t) let ( and+ ) a b = Term.(const (fun x y -> (x, y)) $ a $ b) let cpus_term = let i = Arg.info [ "cpus" ] ~doc:"Number of CPUS for the virtual machine" ~docv:"CPUS" in Arg.(value (opt int 2 i)) let memory_term = let i = Arg.info [ "memory" ] ~d...
e9733589bcd8d6174f1df30f58bbea387cbe12cf763bafc0d25924545518e574
rescript-lang/rescript-compiler
belt_internals.mli
(** Since [others] depend on this file, its public mli files **should not export types** introduced here, otherwise it would cause conflicts here. If the type exported here is also exported in modules from others, you will get a type not equivalent. Types defined here but should not export: - r...
null
https://raw.githubusercontent.com/rescript-lang/rescript-compiler/45d8bbdb515ae6b3cfc35f8363b13635d66a4be6/jscomp/others/belt_internals.mli
ocaml
* Since [others] depend on this file, its public mli files **should not export types** introduced here, otherwise it would cause conflicts here. If the type exported here is also exported in modules from others, you will get a type not equivalent. Types defined here but should not export: - ref...
external (^) : string -> string -> string = "#string_append" external ( = ) : 'a -> 'a -> bool = "%equal" external ( <> ) : 'a -> 'a -> bool = "%notequal" external ( == ) : 'a -> 'a -> bool = "%eq" external ( != ) : 'a -> 'a -> bool = "%noteq" external ( < ) : 'a -> 'a -> bool = "%lessthan" external ( > ) : 'a -> 'a -...