_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 |
|---|---|---|---|---|---|---|---|---|
7a732124eb4f71ed88630ccbcc1c6cb885c94063a98919dc8713fd786c3b1284 | mirage/ocaml-9p | server9p_unix.ml |
* Copyright ( C ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/ocaml-9p/b72ccf01d3c8d7942e7ba8daefda08bf08c902b1/unix/server9p_unix.ml | ocaml |
* Copyright ( C ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | |
eb8b0f4b76a837bbfa638dccf2b2eebbaffedbb075f6bc797cfcbf5d3a427a09 | rowangithub/DOrder | cpredmine.mli | (* Mine interesting predciates from test data *)
(*fun synthesize flag pos_samples dranges tbl enforces*)
val synthesize : int -> Path.t -> (string * int) list list ->
int list -> int list -> (string, Path.t) Hashtbl.t -> string list -> (Predicate.t) list
val synthesize_octagon : Path.t -> (string * int) list lis... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/liquid/cpredmine.mli | ocaml | Mine interesting predciates from test data
fun synthesize flag pos_samples dranges tbl enforces |
val synthesize : int -> Path.t -> (string * int) list list ->
int list -> int list -> (string, Path.t) Hashtbl.t -> string list -> (Predicate.t) list
val synthesize_octagon : Path.t -> (string * int) list list ->
int list -> int list -> (string, Path.t) Hashtbl.t -> string list -> (Predicate.t) list
val synt... |
5b32e818d3774c6baeaad7bd212bdb88e365d1cb3c97be7f2f5061f20e7aa1e1 | wdebeaum/step | vowel.lisp | ;;;;
;;;; W::vowel
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:tags (:base500)
:words (
(W::vowel
(SENSES
((LF-PARENT ONT::linguistic-component) ;linguistic-object)
(EXAMPLE "If the language uses vowels above and below characters, Mail places the vowels correctly")
(meta-data :origin tas... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/vowel.lisp | lisp |
W::vowel
linguistic-object) |
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:tags (:base500)
:words (
(W::vowel
(SENSES
(EXAMPLE "If the language uses vowels above and below characters, Mail places the vowels correctly")
(meta-data :origin task-learning :entry-date 20050831 :change-date nil :wn ("vowel%1:10:01") :comments nil)
... |
cd65e25c2c80dd56a6d195ae226166af51b13dfd4942d32cf6cf7c024f0fa87e | rubenbarroso/EOPL | 2_7b.scm | ;Now let's implement lexical-address of exercise 1.31 using abstract syntax
(load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/2-2-1.scm")
;The data type definition, without number literals:
(define-da... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/chapter2/2_7b.scm | scheme | Now let's implement lexical-address of exercise 1.31 using abstract syntax
The data type definition, without number literals:
> (unparse-expression '(if-exp (lex-info a : 0 0)
(if a b c)
This doesn't make much sense. Did the authors meant to implement unlexical-address?
Besides, the lex-info variant does not take into ... |
(load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/2-2-1.scm")
(define-datatype expression expression?
(lex-info
(id symbol?)
(sep (lambda (sep) (... |
6a343dbad804a0128dfb3354d112520e33449c9394bbfce2e9b7c80fd7333ef7 | janegca/htdp2e | Exercise-147-CheckedWages.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname Exercise-147-CheckedWages) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/02-ArbitrarilyLargeData/Exercise-147-CheckedWages.rkt | racket | about the language level of this file in a form that our tools can easily process.
company against fraud, the function should check that no item of the input
immediately signal an error. How do we have to change the function in figure
-- constants
List-of-numbers -> List-of-numbers
Number -> Number | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname Exercise-147-CheckedWages) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repe... |
fd9f7dfce4d13284c11d1abc19213d85016b0ed00d02be944cb21cbd902394d4 | 3b/3bgl-misc | scene.lisp | (in-package #:scenegraph)
asset data , render state , etc that do n't go directly in scenegraph
;;; (managed by separate 'manager' classes)
(defclass texture ()
;; represents a single texture image
()
)
(defclass mesh ()
()
)
scene wrapper , contains scenegraph tree(s ) and cached render st... | null | https://raw.githubusercontent.com/3b/3bgl-misc/e3bf2781d603feb6b44e5c4ec20f06225648ffd9/scenegraph/scene.lisp | lisp | (managed by separate 'manager' classes)
represents a single texture image
internal state (render tree, dirty flags, etc
scenegraph tree
separate from PROPERTIES for faster access?
or maybe anim-controller?
operations
add/remove child
add/remove attachment
modify tranform
| (in-package #:scenegraph)
asset data , render state , etc that do n't go directly in scenegraph
(defclass texture ()
()
)
(defclass mesh ()
()
)
scene wrapper , contains scenegraph tree(s ) and cached render state
(defclass scene ()
list ? of node trees ( ex . world , hud , disjoint sectio... |
f7c2fcd6da74b0b4dee9d2268150c65a2702eb61dbffa5408d905b2978011b76 | Glue42/gateway-modules | filters.cljc | (ns gateway.metrics.filters
(:require [gateway.common.filters :as f]))
(defn arg-blacklisted?
[arg-filters arg]
(reduce
(fn [result f] result
(if (f/value-matches? f arg)
(reduced true)
result))
false
(:blacklist arg-filters)))
(defn arg-whitelisted?
[arg-filters arg]
(if-l... | null | https://raw.githubusercontent.com/Glue42/gateway-modules/be48a132134b5f9f41fd6a6067800da6be5e6eca/common/src/gateway/metrics/filters.cljc | clojure | (ns gateway.metrics.filters
(:require [gateway.common.filters :as f]))
(defn arg-blacklisted?
[arg-filters arg]
(reduce
(fn [result f] result
(if (f/value-matches? f arg)
(reduced true)
result))
false
(:blacklist arg-filters)))
(defn arg-whitelisted?
[arg-filters arg]
(if-l... | |
971e1102d12306baf01e3affd9d7afbf0e910958722ceb6d0a6d759da1986d51 | thheller/shadow-cljsjs | fr.cljs | (ns cljsjs.moment.locale.fr
(:require ["moment/locale/fr"]))
| null | https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/moment/locale/fr.cljs | clojure | (ns cljsjs.moment.locale.fr
(:require ["moment/locale/fr"]))
| |
d4b6f29085c398b79de768a0494875eed1705dffee90b7d2b5eee9ed8b801a9c | ghc/testsuite | tcfail196.hs | {-# LANGUAGE RankNTypes #-}
module ShouldFail where
bar :: Num (forall a. a) => Int -> Int
bar = error "urk"
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail196.hs | haskell | # LANGUAGE RankNTypes # |
module ShouldFail where
bar :: Num (forall a. a) => Int -> Int
bar = error "urk"
|
9f1ec2499842c259e670a1bdc1de4b0e160b32aa3a842d4a29cfd1b5da499fec | kit-ty-kate/visitors | expr02.ml | type expr =
| EConst of int
| EAdd of expr * expr
[@@deriving visitors { variety = "iter2"; concrete = true }]
| null | https://raw.githubusercontent.com/kit-ty-kate/visitors/fc53cc486178781e0b1e581eced98e07facb7d29/test/expr02.ml | ocaml | type expr =
| EConst of int
| EAdd of expr * expr
[@@deriving visitors { variety = "iter2"; concrete = true }]
| |
b4a36b582ab70ae7cca6f4d4790cb6b52ebb3be9426635976ebf800689cba390 | rmloveland/scheme48-0.53 | describe.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
(define (describe x)
(if (and (stob? x)
(< (stob-type x) least-b-vector-type))
(let ((tag (string-append (number->string x) ": "))
(len (bytes->cells (stob-length-in-bytes x))))
(do ((i -1 (+ i 1)))
((= i len))
(describe-1 (stob-r... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/debug/describe.scm | scheme | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
(define (describe x)
(if (and (stob? x)
(< (stob-type x) least-b-vector-type))
(let ((tag (string-append (number->string x) ": "))
(len (bytes->cells (stob-length-in-bytes x))))
(do ((i -1 (+ i 1)))
((= i len))
(describe-1 (stob-r... | |
0ae9f65351bf3000e0bc09de8e88b3763142097c92d5b7c49c5469847c851b62 | gregr/icfp2017-artifact-auas7pp | intro-examples.scm | (load "mk/test-check.scm")
(load "mk/mk.scm")
(test 'unification
(run* (q)
(fresh (x y)
(== (cons 3 4) (cons x y))
;; All of these expressions are equivalent.
(== q (quasiquote (3 ((unquote x) . y) 4)))
(== q `(3 (,x . y) 4))
(== q (list 3 (cons x (quote y)) 4))
(== q (cons 3 ... | null | https://raw.githubusercontent.com/gregr/icfp2017-artifact-auas7pp/98de885bd1cb9eef53c8ac3d85720b56122ca541/src/intro-examples.scm | scheme | All of these expressions are equivalent. | (load "mk/test-check.scm")
(load "mk/mk.scm")
(test 'unification
(run* (q)
(fresh (x y)
(== (cons 3 4) (cons x y))
(== q (quasiquote (3 ((unquote x) . y) 4)))
(== q `(3 (,x . y) 4))
(== q (list 3 (cons x (quote y)) 4))
(== q (cons 3 (cons (cons x 'y) (cons 4 '()))))))
'(((3 (3 . y... |
db3b5ed085d5fc1599b10c384811b1cfc5e3101e86b44a6c850bba381ba73249 | rabbitmq/rabbitmq-tracing | rabbit_tracing_mgmt.erl | 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 /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_tracing_mgmt).
-behaviour(rabbit_... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-tracing/85af9285bef54c1689757b3161035b21389dca2d/src/rabbit_tracing_mgmt.erl | erlang | 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 /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_tracing_mgmt).
-behaviour(rabbit_mgmt_e... | |
b367f73dcd7e03da66efe23843a65a13de7b8597c623f398f08b9baef0d03c6e | ocaml-multicore/tezos | test_combined_operations.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_protocol/test/test_combined_operations.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETH... |
fb6edd0f3e635af136201140670ee3ff7acfffab3d7904e50e9b6a39ee42d761 | videlalvaro/rmq_patterns | amqp_control_bus.erl | -module(amqp_control_bus).
-behaviour(gen_server).
-include("amqp_client.hrl").
-include("rmq_patterns.hrl").
-export([init/1, terminate/2, code_change/3, handle_call/3,
handle_cast/2, handle_info/2]).
-export([start/1, start_link/1]).
-export([stop/1]).
-export([start_demo/0, start_demo/1, detour_msg/5, c... | null | https://raw.githubusercontent.com/videlalvaro/rmq_patterns/5929b2282a05d55724dd3e33da6ea69105e7de13/src/amqp_control_bus.erl | erlang | --------------------------------------------------------------------------
API
--------------------------------------------------------------------------
amqp_control_bus:detour_msg(C, <<"detour_step_detour">>, <<"#">>, <<"detour_step_final">>, <<"">>).
amqp_control_bus:detour_msg(C, <<"detour_step_detour">>, <<"#">... | -module(amqp_control_bus).
-behaviour(gen_server).
-include("amqp_client.hrl").
-include("rmq_patterns.hrl").
-export([init/1, terminate/2, code_change/3, handle_call/3,
handle_cast/2, handle_info/2]).
-export([start/1, start_link/1]).
-export([stop/1]).
-export([start_demo/0, start_demo/1, detour_msg/5, c... |
3d0a380a1c164bd6f127cd36442bb4c74cc8080e39c05940a43fa3074945a2bd | FundingCircle/jackdaw | write_test.clj | (ns jackdaw.test.commands.write-test
(:require
[jackdaw.test.commands.write :as write]
[jackdaw.test.transports :as trns]
[jackdaw.test.transports.kafka]
[jackdaw.test.serde :as serde]
[clojure.test :refer [deftest is testing]])
(:import
[clojure.lang ExceptionInfo]))
(set! *warn-on-reflection* ... | null | https://raw.githubusercontent.com/FundingCircle/jackdaw/e0c66d386277282219e070cfbd0fe2ffa3c9dca5/test/jackdaw/test/commands/write_test.clj | clojure | (ns jackdaw.test.commands.write-test
(:require
[jackdaw.test.commands.write :as write]
[jackdaw.test.transports :as trns]
[jackdaw.test.transports.kafka]
[jackdaw.test.serde :as serde]
[clojure.test :refer [deftest is testing]])
(:import
[clojure.lang ExceptionInfo]))
(set! *warn-on-reflection* ... | |
0a2f87c65c26ee7ec655728b0a4f6744a93689defb2e1aca8e8b026cf9c94bf9 | plumatic/grab-bag | config.clj | {:machine {:groups ["woven" "grabbag-catch-all-6"]
:tags {:owner "grabbag-corp"}}
:service {:jvm-opts "-Xmx2g -Xms2g"}
:parameters {:forward-ports {6666 :swank-port}
:hour-to-revive-instances 8
:should-revive-instances? false}
:envs {:prod {:parameters {:swank-port 6348
... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/service/monitoring/src/monitoring/config.clj | clojure | {:machine {:groups ["woven" "grabbag-catch-all-6"]
:tags {:owner "grabbag-corp"}}
:service {:jvm-opts "-Xmx2g -Xms2g"}
:parameters {:forward-ports {6666 :swank-port}
:hour-to-revive-instances 8
:should-revive-instances? false}
:envs {:prod {:parameters {:swank-port 6348
... | |
88ec829672daf0df7bf13bc752b36e47888b163572d0f004fdff256ea20e69d3 | grin-compiler/grin | Base.hs | # LANGUAGE LambdaCase , TupleSections , DataKinds , RecursiveDo , RecordWildCards , OverloadedStrings , TemplateHaskell #
module Reducer.LLVM.Base where
import Text.Printf
import Control.Monad as M
import Control.Monad.State
import Data.Functor.Foldable as Foldable
import Lens.Micro.Platform
import Data.Word
import ... | null | https://raw.githubusercontent.com/grin-compiler/grin/e27f901f29b0a5f54aa8c08af339b5eb818d37b6/grin/src/Reducer/LLVM/Base.hs | haskell | Def state ; order -> basic block
Def state
Def state
Def state
Def state
Def state
Grin String Literal -> AST.Name
Tagged union
utils | # LANGUAGE LambdaCase , TupleSections , DataKinds , RecursiveDo , RecordWildCards , OverloadedStrings , TemplateHaskell #
module Reducer.LLVM.Base where
import Text.Printf
import Control.Monad as M
import Control.Monad.State
import Data.Functor.Foldable as Foldable
import Lens.Micro.Platform
import Data.Word
import ... |
96ccc4d174224b8f4a187ab249c7aff34de2841eaa296e2016e02da2f51203e3 | tsani/comp-302-review | review-problems.ml | Author :
This is the master list of practice problems .
I made it by looking at everything done in class , and thinking of
potential extensions to class problems .
DO THESE PROBLEMS ON PAPER .
Do not use LearnOCaml !
On the exam , you do not have a compiler to check your types , an... | null | https://raw.githubusercontent.com/tsani/comp-302-review/96f1426d2d3eeea280f1e71eb68b783a4160f043/review-problems.ml | ocaml | Define our own list type. Now we will implement many functions
on lists using our own type, in order to familiarize ourselves with
pattern matching syntax.
According to the description above, `fold_right f l e` takes a
list
l = `Cons (x1, (Cons (x2, Cons (x3, Nil))))` for example
and compu... | Author :
This is the master list of practice problems .
I made it by looking at everything done in class , and thinking of
potential extensions to class problems .
DO THESE PROBLEMS ON PAPER .
Do not use LearnOCaml !
On the exam , you do not have a compiler to check your types , an... |
7be1e85a2e808a0e2f858e70187edc8ee8a0514341c33bd7ede457044eece902 | jasonstolaruk/CurryMUD | Talk.hs | # LANGUAGE OverloadedStrings , ViewPatterns , TypeApplications #
module Mud.Threads.Talk ( runTalkAsync
, threadTalk ) where
import Mud.Cmds.Msgs.Misc
import Mud.Cmds.Util.Misc
import Mud.Data.State.MsgQueue
import Mud.Data.State.MudData
import ... | null | https://raw.githubusercontent.com/jasonstolaruk/CurryMUD/f9775fb3ede08610f33f27bb1fb5fc0565e98266/lib/Mud/Threads/Talk.hs | haskell | ==================================================
--- | # LANGUAGE OverloadedStrings , ViewPatterns , TypeApplications #
module Mud.Threads.Talk ( runTalkAsync
, threadTalk ) where
import Mud.Cmds.Msgs.Misc
import Mud.Cmds.Util.Misc
import Mud.Data.State.MsgQueue
import Mud.Data.State.MudData
import ... |
9bcfbf71dba22a0c868c22aebfd05521e7d753000c372e4a6b3c62c92f1e3980 | grayswandyr/electrod | Fmtc.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* electrod - a model finder for relational first - order linear temporal logic
*
* Copyright ( C ) 2016 - 2020 ONERA
* Authors : ( ONERA ) , ( ONERA... | null | https://raw.githubusercontent.com/grayswandyr/electrod/eb0b02eafb34b6c921f99716cb5e90c946aae51b/src/Fmtc.mli | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* electrod - a model finder for relational first - order linear temporal logic
*
* Copyright ( C ) 2016 - 2020 ONERA
* Authors : ( ONERA ) , ( ONERA... | |
74aded6a543ce31ff003c8ebf812c1c4c8058220a22fe7bf69faec9e13c0afe2 | zzkt/osc | osc.lisp | ;;; -*- mode: lisp -*-
;;;
;;; an implementation of the OSC (Open Sound Control) protocol
;;;
copyright ( C ) 2004 FoAM vzw .
;;;
;;; You are granted the rights to distribute and use this software
under the terms of the Lisp Lesser GNU Public License , known
;;; as the LLGPL. The LLGPL consists of a preamble and th... | null | https://raw.githubusercontent.com/zzkt/osc/9f0a9d3da310a3a0f654f48af0203816f3f371ad/osc.lisp | lisp | -*- mode: lisp -*-
an implementation of the OSC (Open Sound Control) protocol
You are granted the rights to distribute and use this software
as the LLGPL. The LLGPL consists of a preamble and the LGPL.
Where these conflict, the preamble takes precedence. The LLGPL
is available online at
and is distributed wi... | copyright ( C ) 2004 FoAM vzw .
under the terms of the Lisp Lesser GNU Public License , known
nik < >
dependent on sbcl , cmucl or openmcl for float encoding , other suggestions
this is a partial implementation of the OSC protocol which is used
musicians . eg . sc3 , / pd , reaktor / traktorska etc+ ... |
999872ba2eed67167f0725e8de9b87eb881e5e94b20031c178295fb18c837eda | ayato-p/mokuhan | platform.cljs | (ns org.panchromatic.mokuhan.walker.platform
(:require [goog.array :as ary]
[goog.object :as o]
[org.panchromatic.mokuhan.walker.protocol :as proto]))
(defn- traverse-map [m [p & path]]
(let [p (cond-> p (not (string? p)) str)]
(-> (if (= p ".")
m
(reduce (fn [_ k]
... | null | https://raw.githubusercontent.com/ayato-p/mokuhan/8f6de17b5c4a3712aa83ba4f37234de86f3c630b/src/org/panchromatic/mokuhan/walker/platform.cljs | clojure | (ns org.panchromatic.mokuhan.walker.platform
(:require [goog.array :as ary]
[goog.object :as o]
[org.panchromatic.mokuhan.walker.protocol :as proto]))
(defn- traverse-map [m [p & path]]
(let [p (cond-> p (not (string? p)) str)]
(-> (if (= p ".")
m
(reduce (fn [_ k]
... | |
3741b008b3dc1cfa2af3303e663c04ae494093ca5427b8cfb051b77456d3313d | ocaml-flambda/ocaml-jst | topmain.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/toplevel/byte/topmain.ml | 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 Trace
external current_environment: unit -> Obj.t = "caml_get_current_environment"
let tracing_f... |
051c3e2ffbaafe885a4863a6aec57eb2e5b34a28b512624f5ff59b2a9d1c8001 | GaloisInc/daedalus | Monad.hs | # Language BlockArguments , OverloadedStrings ,
{-# Language NamedFieldPuns #-}
# Language TypeFamilies , GeneralizedNewtypeDeriving , StandaloneDeriving , DeriveFunctor #
# Language MultiParamTypeClasses #
{-# Language RankNTypes #-}
module Daedalus.Type.Monad
(
-- * Typechking a module
MTypeM, runMTypeM,... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/4ab639bc3c0513458157061c0865a3f72cb6758f/src/Daedalus/Type/Monad.hs | haskell | # Language NamedFieldPuns #
# Language RankNTypes #
* Typechking a module
* Typechecking a group of declarations
* Typechecking a single declartion
* Error reporting
* Local Environemnt
* Rule Environemnt
* Local type variables
* Name generation
* Type definitions
* Contexts
* Unification variables
* Constr... | # Language BlockArguments , OverloadedStrings ,
# Language TypeFamilies , GeneralizedNewtypeDeriving , StandaloneDeriving , DeriveFunctor #
# Language MultiParamTypeClasses #
module Daedalus.Type.Monad
(
MTypeM, runMTypeM, MTCMonad, TCConfig(..)
, STypeM, runSTypeM, STCMonad
, TypeM, runTypeM
, TypeEr... |
661064d83cae94c75bd0909deb8fb5600ac6d6a6f122a5096692cea5c549ea89 | lispm/measures | additional-unit-defs.lisp | (in-package "MEASURES")
(defun f-to-c (x) (* 5/9 (- x 32)))
(defun c-to-f (x) (+ 32 (* 9/5 x)))
(defun k-to-c (x) (- x 27316/100))
(defun c-to-k (x) (+ x 27316/100))
(defspecial-measure temperature "C"
:units (("F" f-to-c c-to-f)
("K" k-to-c c-to-k)
("oC" identity identity)
("oF" f-to-c c-to-f)
("oK" k... | null | https://raw.githubusercontent.com/lispm/measures/84f9d746d754f0bd0c96fb1cb8602cd42904b080/source/additional-unit-defs.lisp | lisp | (in-package "MEASURES")
(defun f-to-c (x) (* 5/9 (- x 32)))
(defun c-to-f (x) (+ 32 (* 9/5 x)))
(defun k-to-c (x) (- x 27316/100))
(defun c-to-k (x) (+ x 27316/100))
(defspecial-measure temperature "C"
:units (("F" f-to-c c-to-f)
("K" k-to-c c-to-k)
("oC" identity identity)
("oF" f-to-c c-to-f)
("oK" k... | |
e8d9087f217aac8fb69258777781ccfd82de86e50c6ecc2250621528cb2f8d4f | informatimago/lisp | set.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : set.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Defines an abstract SET class API.
;;;;
<... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/common-lisp/cesarum/set.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Defines an abstract SET class API.
LEGAL
This program is free software: you can redistribute it and/or modify
(at your option) any lat... | FILE : set.lisp
USER - INTERFACE :
< PJB > < >
MODIFICATIONS
2013 - 05 - 08 < PJB > Created .
AGPL3
Copyright 2013 - 2016
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License... |
452a454f5599b3b5ec321c85e0d398563fb14f1c19c67433bc31aad5d0b7568e | TerrorJack/ghc-alter | Caliburn.hs | module Language.Haskell.GHC.Alter.Caliburn where
import Language.Haskell.GHC.Alter.Compiler
initCompiler :: IO Compiler
initCompiler = pure defaultCompiler
| null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/src/Language/Haskell/GHC/Alter/Caliburn.hs | haskell | module Language.Haskell.GHC.Alter.Caliburn where
import Language.Haskell.GHC.Alter.Compiler
initCompiler :: IO Compiler
initCompiler = pure defaultCompiler
| |
63a9098b5c5a8378c3c059cf514b0b21de570cd95b5e612b2a2f9a7056da96f6 | ekmett/transformers-compat | Sum.hs | # LANGUAGE CPP #
#ifndef HASKELL98
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# if __GLASGOW_HASKELL__ >= 702
# LANGUAGE... | null | https://raw.githubusercontent.com/ekmett/transformers-compat/75c84857869add7b818e43b493e5a7364cb70c33/0.3/Data/Functor/Sum.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE EmptyDataDecls #
|
Module : Data.Functor.Sum
License : BSD-style (see the file LICENSE)
Maintainer :
Stability : experimental
Portability : portable
Sums, lifted to functors.
| Lifted sum of functors.
Generic(1) instances for Sum | # LANGUAGE CPP #
#ifndef HASKELL98
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# if __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
# endif
# if __GLASGOW_HASKELL__ >= 706
# LANGUAGE Po... |
efaa309dfb8f27c326ea52761a1a16c5996ddcbe06f00b161f59bb4c90b25320 | AndrasKovacs/ELTE-func-lang | Gy07_pre.hs | # language InstanceSigs , DeriveFunctor , , DeriveTraversable #
# options_ghc -Wincomplete - patterns #
module Gy07 where
import Control.Monad
import Debug.Trace
State
newtype State s a = State {runState :: s -> (a, s)} deriving Functor
instance Applicative (State s) where
pure = return
(<*>) = ap
instan... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/96eceb9f111d50d159c37ba581bb2770ca544a91/2021-22-2/gyak_3/Gy07_pre.hs | haskell | Add an element to the top of the stack by extending the state list!
Remove and return the top element of the stack if it is not empty!
∙
/ \
/ \
/ \
∙ \
/ \ \
/ \ \
"the" "cake" ∙
/ \
... | # language InstanceSigs , DeriveFunctor , , DeriveTraversable #
# options_ghc -Wincomplete - patterns #
module Gy07 where
import Control.Monad
import Debug.Trace
State
newtype State s a = State {runState :: s -> (a, s)} deriving Functor
instance Applicative (State s) where
pure = return
(<*>) = ap
instan... |
0c1c232c5853be6d517ae3bafa5fa55bca65179116efdb086dc9d5e4f3f11c76 | Ericson2314/lighthouse | GenApply.hs | {-# OPTIONS -cpp -fglasgow-exts #-}
# OPTIONS -w #
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
-- #Warnings
-- for details
module Main(main) where
#include "../../includes/ghcconfig.h"
#includ... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/utils/genapply/GenApply.hs | haskell | # OPTIONS -cpp -fglasgow-exts #
The above warning supression flag is a temporary kludge.
While working on this module you are encouraged to remove it and fix
any warnings in the module. See
#Warnings
for details
Needed for TAG_BITS
-----------------------------------------------------------------------------... | # OPTIONS -w #
module Main(main) where
#include "../../includes/ghcconfig.h"
#include "../../includes/MachRegs.h"
#include "../../includes/Constants.h"
#include "../../includes/MachDeps.h"
import Text.PrettyPrint
import Data.Word
import Data.Bits
import Data.List ( intersperse )
import System.Exit
import System.Envi... |
c5fed98d0186c60e6f98e975130508065d969ea4795943c632d8cebdfb0ee9fc | elldritch/hipsterfy | Spotify.hs | module Hipsterfy.Spotify
( SpotifyUser (..),
SpotifyUserID (..),
getSpotifyUser,
SpotifyArtist (..),
SpotifyArtistID (..),
getFollowedSpotifyArtists,
getSpotifyArtistsOfSavedTracks,
getSpotifyArtistsOfSavedAlbums,
SpotifyArtistInsights (..),
getSpotifyArtistInsights,
)
where
imp... | null | https://raw.githubusercontent.com/elldritch/hipsterfy/7d455697c1146d89fc6b2f78effe6694efe69120/src/Hipsterfy/Spotify.hs | haskell | Loading followed artists. | module Hipsterfy.Spotify
( SpotifyUser (..),
SpotifyUserID (..),
getSpotifyUser,
SpotifyArtist (..),
SpotifyArtistID (..),
getFollowedSpotifyArtists,
getSpotifyArtistsOfSavedTracks,
getSpotifyArtistsOfSavedAlbums,
SpotifyArtistInsights (..),
getSpotifyArtistInsights,
)
where
imp... |
df86439c23282eea6efedd0e281fcea451120764799b5af187ea77c478ba26d5 | heraldry/heraldicon | fretty.cljs | (ns heraldicon.heraldry.field.type.fretty
(:require
[heraldicon.context :as c]
[heraldicon.heraldry.field.interface :as field.interface]
[heraldicon.heraldry.tincture :as tincture]
[heraldicon.interface :as interface]
[heraldicon.math.vector :as v]
[heraldicon.render.outline :as outline]
[heraldi... | null | https://raw.githubusercontent.com/heraldry/heraldicon/71126cfd7ba342dea0d1bb849be92cbe5290a6fd/src/heraldicon/heraldry/field/type/fretty.cljs | clojure | -|-
|-|
-|-
-|-
|-|
-|- | (ns heraldicon.heraldry.field.type.fretty
(:require
[heraldicon.context :as c]
[heraldicon.heraldry.field.interface :as field.interface]
[heraldicon.heraldry.tincture :as tincture]
[heraldicon.interface :as interface]
[heraldicon.math.vector :as v]
[heraldicon.render.outline :as outline]
[heraldi... |
d712e28bdb7999b0adb8cd894c9c2c0c914d06c91aa34a3194b2c302633f9eb7 | r0man/noencore | core_test.cljc | (ns no.en.core-test
(:require [no.en.core :as c #?(:clj :refer :cljs :refer-macros) [prog1 with-retries]]
#?(:clj [clojure.test :refer :all]
:cljs [cljs.test :refer-macros [are is deftest]])))
(deftest test-base64-encode
(is (nil? (c/base64-encode nil)))
(are [s expected]
(= expe... | null | https://raw.githubusercontent.com/r0man/noencore/82a397eacbe155855c499789eddb16bd533f6bbf/test/no/en/core_test.cljc | clojure | (ns no.en.core-test
(:require [no.en.core :as c #?(:clj :refer :cljs :refer-macros) [prog1 with-retries]]
#?(:clj [clojure.test :refer :all]
:cljs [cljs.test :refer-macros [are is deftest]])))
(deftest test-base64-encode
(is (nil? (c/base64-encode nil)))
(are [s expected]
(= expe... | |
cd0a19739e0f8b155e42946cbcac4adce1f49540adeec908379544b967db5cee | haskell/happy | Oracle.hs | {-# LANGUAGE RankNTypes #-}
module Happy.Frontend.ParseMonad.Oracle where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative
#endif
import Control.Monad
import Happy.Frontend.ParseMonad.Class
data PState token =
PS !String
!Int
!(Maybe token)
data Decision token = Consume | PutBack token
type P' ... | null | https://raw.githubusercontent.com/haskell/happy/934763408f8df29180c63d7a2c69be0b84030967/packages/frontend/src/Happy/Frontend/ParseMonad/Oracle.hs | haskell | # LANGUAGE RankNTypes # |
module Happy.Frontend.ParseMonad.Oracle where
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative
#endif
import Control.Monad
import Happy.Frontend.ParseMonad.Class
data PState token =
PS !String
!Int
!(Maybe token)
data Decision token = Consume | PutBack token
type P' token a =
forall r. (a -> ... |
5f55b55e37a487693331cf6240d3562eb461c3ae2de1fbe5ed4d2b86e32e6735 | psholtz/MIT-SICP | exercise2-50.scm | ;;
Exercise 2.50
;;
;; Define the transformation "flip-horiz" which flips painters horizontally, and transformations
that rotate painters counterclockwise by 180 degrees and 270 degrees .
;;
(define (flip-horiz painter)
(transform-painter painter
(make-vect 1.0 0.0) ;; new origin
new end of edge 1
... | null | https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-2.2/mit-scheme/exercise2-50.scm | scheme |
Define the transformation "flip-horiz" which flips painters horizontally, and transformations
new origin
new origin
new origin
procedure, and this procedure uses a different call signature (i.e., seems to
also already defines a procedure calls "flip-horiz" (which seems to work just fine),
and procedures "... | Exercise 2.50
that rotate painters counterclockwise by 180 degrees and 270 degrees .
(define (flip-horiz painter)
(transform-painter painter
new end of edge 1
new end of edge 2
(define (rotate180 painter)
(transform-painter painter
new end of edge 1
new end of edge 2
(define (rotate270 painter)
(tr... |
6157a189c30d0ede45660e748f293d431b86d3d786cf7344bd788676d0f4e2c6 | melange-re/melange | res_ast_conversion.ml | open Import.Ast_406
let concatLongidents l1 l2 =
let parts1 = Longident.flatten l1 in
let parts2 = Longident.flatten l2 in
match List.concat [parts1; parts2] |> Longident.unflatten with
| Some longident -> longident
| None -> l2
(* TODO: support nested open's ? *)
let rec rewritePpatOpen longidentOpen pat =... | null | https://raw.githubusercontent.com/melange-re/melange/d6f41989ec092eea5a623171fe5e54e17fde0d10/jscomp/napkin/res_ast_conversion.ml | ocaml | TODO: support nested open's ?
Color.[Red, Blue, Green] -> [Color.Red, Blue, Green]
Color.(Red, Blue, Green) -> (Color.Red, Blue, Green)
Color.(list[Red, Blue, Green]) -> list[Color.Red, Blue, Green]
Foo.(Bar(a)) -> Foo.Bar(a)
Foo.{x} -> {Foo.x: x}
| (Some {pexp_desc = Pexp_tuple [{pexp_desc = Pexp_tuple _ ... | open Import.Ast_406
let concatLongidents l1 l2 =
let parts1 = Longident.flatten l1 in
let parts2 = Longident.flatten l2 in
match List.concat [parts1; parts2] |> Longident.unflatten with
| Some longident -> longident
| None -> l2
let rec rewritePpatOpen longidentOpen pat =
match pat.Parsetree.ppat_desc wit... |
bedee9f19304ff4e35b2db3f50ab8d94b263aedfdc96ab0e74a16cc041795ac7 | dimitri/pgloader | monitor.lisp | ;;;
;;; Central thread that deals with monitoring
;;;
;;; Manages the logging from a single thread while another bunch of threads
;;; are doing the data processing and loading, and maintain states.
;;;
;;; The public API is the macro with-monitor and the function log-message,
;;; that shares its signature with cl-log:l... | null | https://raw.githubusercontent.com/dimitri/pgloader/3047c9afe141763e9e7ec05b7f2a6aa97cf06801/src/utils/monitor.lisp | lisp |
Central thread that deals with monitoring
Manages the logging from a single thread while another bunch of threads
are doing the data processing and loading, and maintain states.
The public API is the macro with-monitor and the function log-message,
that shares its signature with cl-log:log-message so as to be a... | (in-package :pgloader.monitor)
(defvar *monitoring-kernel* nil
"Internal lparallel kernel to manage the separate monitor thread.")
(defvar *monitoring-queue* nil
"Internal lparallel queue where to send and receive messages from.")
(defvar *monitoring-channel* nil
"Internal lparallel channel.")
(defvar *sectio... |
97133ac5b2b81dbf3d356dfc752a88376982800b24a906ea226305676e39d61e | amperity/vault-clj | api_util.clj | (ns vault.client.api-util
(:require
[cheshire.core :as json]
[clojure.string :as str]
[clojure.tools.logging :as log]
[clojure.walk :as walk]
[org.httpkit.client :as http])
(:import
(clojure.lang
ExceptionInfo)
(java.security
MessageDigest)))
# # API Utilities
(defmacro ... | null | https://raw.githubusercontent.com/amperity/vault-clj/700e6d08ed438342229cb99a78a6864bda0b7fda/src/vault/client/api_util.clj | clojure | Check API path.
Check client authentication.
Call API with standard arguments. | (ns vault.client.api-util
(:require
[cheshire.core :as json]
[clojure.string :as str]
[clojure.tools.logging :as log]
[clojure.walk :as walk]
[org.httpkit.client :as http])
(:import
(clojure.lang
ExceptionInfo)
(java.security
MessageDigest)))
# # API Utilities
(defmacro ... |
061742ac39548cb9b386c0b8b313b8b8536021f73a8223da2f4ee0387d63b1c3 | c4-project/c4f | state.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fuzz/test/state.mli | ocaml | * [state] evaluates to a sample state. | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
bc37e218a356663308ae5bf172dcaddb071b78fc2f9675e92d1c1a6e47f7dc5f | pfdietz/ansi-test | block.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Oct 12 12:30:46 2002
;;;; Contains: Tests of BLOCK
(deftest block.1
(block foo
(return-from foo 1))
1)
(deftest block.2
(block nil
(block foo
(return 'good))
'bad)
good)
(deftest block.3
(block done
(flet ((%f (x) (return-fro... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/data-and-control-flow/block.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of BLOCK
Block has no tagbody
(deftest return.error.1
(signals-error
(block nil
(return 'a 'b))
program-error)
t)
| Author :
Created : Sat Oct 12 12:30:46 2002
(deftest block.1
(block foo
(return-from foo 1))
1)
(deftest block.2
(block nil
(block foo
(return 'good))
'bad)
good)
(deftest block.3
(block done
(flet ((%f (x) (return-from done x)))
(%f 'good))
'bad)
good)
(deft... |
5096d596448d9aa3ee19350566718023b76abcbb08a7576ae5f6df5d6d60f2ff | swarm-game/swarm | App.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
SPDX - License - Identifier : BSD-3 - Clause
--
Main entry point for the Swarm application .
module Swarm.App where
import Brick
import Brick.BChan
import Control.Concurrent (forkIO, threadDelay)
import Control.Lens (view, (%~), (&), (?~))
import Control.Monad.Except
import... | null | https://raw.githubusercontent.com/swarm-game/swarm/affc8668b77b7e85d3d23c182a5159df36d17306/src/Swarm/App.hs | haskell | # LANGUAGE OverloadedStrings #
|
| The definition of the app used by the @brick@ library.
| The main @IO@ computation which initializes the state, sets up
some communication channels, and runs the UI.
game is responsible for figuring out how many steps to take
each frame to achieve the desired speed, regardles... |
SPDX - License - Identifier : BSD-3 - Clause
Main entry point for the Swarm application .
module Swarm.App where
import Brick
import Brick.BChan
import Control.Concurrent (forkIO, threadDelay)
import Control.Lens (view, (%~), (&), (?~))
import Control.Monad.Except
import Data.IORef (newIORef, writeIORef)
import D... |
c9dda295d0474ee45190d4f58cadd8181924e6877c673b7c8e82198703811225 | thowsen/AOC-2021 | a.hs | module Main where
main = solveB . map read . words <$> readFile "inp.txt"
solveB = solveA . format
where format [_,_] = []
format xs = sum (take 3 xs) : format (tail xs)
solveA :: [Int] -> Int
solveA xs = length $ filter (uncurry (>)) (zip (tail xs) xs) | null | https://raw.githubusercontent.com/thowsen/AOC-2021/c957570693f7ceae941a157d0ddef019a1740a37/day1/a.hs | haskell | module Main where
main = solveB . map read . words <$> readFile "inp.txt"
solveB = solveA . format
where format [_,_] = []
format xs = sum (take 3 xs) : format (tail xs)
solveA :: [Int] -> Int
solveA xs = length $ filter (uncurry (>)) (zip (tail xs) xs) | |
a180437b71d779a0be2a0b0d2e3299788e7bd69bd9dd0559a5a730e09a8afea2 | danieljharvey/mimsa | Pretty.hs | # LANGUAGE CPP #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
# OPTIONS_GHC -fwarn - incomplete - patterns #
# OPTIONS_GHC -fwarn - incomplete ... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/6ee0a178003b68f19157a4b7865afbd2b97eed71/vendored/llvm-hs-pretty/src/LLVM/Pretty.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances #
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
<,> does not work :(
-----------------------------------------------------------------------------... | # LANGUAGE CPP #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fwarn - incomplete - patterns #
# OPTIONS_GHC -fwarn - incomplete - uni - patterns #
# LANGUAGE NamedFieldPuns #
module LLVM.Pretty (
ppl... |
5312dc4f90b426c62623e38f026e2ff366b556891595eadc5994ad4f572adcc9 | kadena-io/chainweaver | Foundation.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE T... | null | https://raw.githubusercontent.com/kadena-io/chainweaver/6c36d07334bb2d5796a139fc99aa1a54901494a5/frontend/src/Frontend/Foundation.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE PackageImports #
| Definitions common to the whole frontend.
And commonly used imports.
* Useful types
* Helpers that should really not be here
* Common Foundation
* Re-exports
| Shorthand for Dynamic t (Maybe a).
Usually used for things that might not be loaded y... | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Frontend.Foundation
ReflexValue
, MDyn... |
55e6b2cc67cfb280dfdf6a9d4b99a5d3e2cf516353a58c6d505dfd7543ea5904 | lexi-lambda/hackett | pattern-alias.rkt | #lang racket/base
(provide pattern List)
(require syntax/parse/define
(only-in hackett/private/adt defn)
(only-in hackett/private/prim/type Nil ::)
(only-in hackett/private/kernel #%app)
(for-syntax racket/base
racket/syntax
syntax/parse
... | null | https://raw.githubusercontent.com/lexi-lambda/hackett/e90ace9e4a056ec0a2a267f220cb29b756cbefce/hackett-lib/hackett/private/pattern-alias.rkt | racket | #lang racket/base
(provide pattern List)
(require syntax/parse/define
(only-in hackett/private/adt defn)
(only-in hackett/private/prim/type Nil ::)
(only-in hackett/private/kernel #%app)
(for-syntax racket/base
racket/syntax
syntax/parse
... | |
f4a5c6f2b8edd7bb006810fdc54a3e3c449b96ce33d06d5c625aeb324b03519c | racket/gui | default-procs.rkt | #lang racket/base
(require racket/class
racket/draw/private/color)
(provide special-control-key
special-option-key
any-control+alt-is-altgr
file-creator-and-type
get-panel-background
fill-private-color
luminance)
(define special-control-key? #f)
(define sp... | null | https://raw.githubusercontent.com/racket/gui/1386c815512906250443e50212e0816717cc493b/gui-lib/mred/private/wx/common/default-procs.rkt | racket | from | #lang racket/base
(require racket/class
racket/draw/private/color)
(provide special-control-key
special-option-key
any-control+alt-is-altgr
file-creator-and-type
get-panel-background
fill-private-color
luminance)
(define special-control-key? #f)
(define sp... |
7fb76facb087a695b85efd423b297d0b01efe09d09b4679f8556315e78ae0c5a | 2600hz-archive/whistle | cf_response.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011 , VoIP INC
%%% @doc
%%%
%%% @end
Created : 22 June 2011 by < >
%%%-------------------------------------------------------------------
-module(cf_response).
-include("../callflow.hrl").
-export([handle/2]).
%%--... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/whistle_apps/apps/callflow/src/module/cf_response.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
--------------------------------------------------------------------
@doc
Entry point for this module sends an arbitrary response back to the
call originator.
@end
---... | @author < >
( C ) 2011 , VoIP INC
Created : 22 June 2011 by < >
-module(cf_response).
-include("../callflow.hrl").
-export([handle/2]).
@public
-spec(handle/2 :: (Data :: json_object(), Call :: #cf_call{}) -> no_return()).
handle(Data, #cf_call{cf_pid=CFPid, call_id=CallId, ctrl_q=CtrlQ}) ->
put(c... |
6ae740bfb80876c892b4237f1119eec2f038741296ac069f41caee5ad9ccaf9c | opencog/opencog | mock-interaction-rules.scm | ;
;
mock interaction rules for openpsi dynamics development
; The following change-predicate types have been defined in
; interaction-rule.scm:
;(define changed "changed")
;(define increased "increased")
;(define decreased "decreased")
; ===========================================================================... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/openpsi/dynamics/mock-interaction-rules.scm | scheme |
The following change-predicate types have been defined in
interaction-rule.scm:
(define changed "changed")
(define increased "increased")
(define decreased "decreased")
===========================================================================
new face -> increased arousal
speech giving starts -> increased powe... |
mock interaction rules for openpsi dynamics development
Below are bogus mock OpenPsi interaction rules for dev purposes
(define power->voice
(psi-create-interaction-rule power changed voice-width 1))
(define power->arousal
(psi-create-interaction-rule power changed arousal .1))
(define arousal->voice
(p... |
24d4bc9ff46a09549141f1ce7ed7afdac32c972abb1b76f7533e76975384ee75 | pirapira/coq2rust | backtrace.ml | (***********************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - Rocquencourt & LRI - CNRS - Orsay
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/lib/backtrace.ml | ocaml | *********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
*********************************************************************
is_raise
filename
line number
sta... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - Rocquencourt & LRI - CNRS - Orsay
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
type raw_frame =
type loca... |
a8727bb8c9b3cb364c44f7a4f71b44875c5a7faed4dfc81d7b61fd833965d44b | owlbarn/owl_mask_rcnn | resnet.mli | open CGraph.Graph
val resnet101 : node -> node * node * node * node * node
* [ resnet101 input_layer ] returns 5 nodes from the ResNet101 architecture ,
* * from the most low - level to the most high - level .
** from the most low-level to the most high-level. *)
| null | https://raw.githubusercontent.com/owlbarn/owl_mask_rcnn/838d921401676271f96e867452e21b829aff29ec/src/mrcnn/resnet.mli | ocaml | open CGraph.Graph
val resnet101 : node -> node * node * node * node * node
* [ resnet101 input_layer ] returns 5 nodes from the ResNet101 architecture ,
* * from the most low - level to the most high - level .
** from the most low-level to the most high-level. *)
| |
4f77cce3032b1a5a6188b71e98bcb24aa34ea9ffbdd5e096fcb8814169d4e256 | roehst/tapl-implementations | main.ml | (* Module Main: The main program. Deals with processing the command
line, reading files, building and connecting lexers and parsers, etc.
For most experiments with the implementation, it should not be
necessary to change this file.
*)
open Format
open Support.Pervasive
open Support.Error
open Syntax
ope... | null | https://raw.githubusercontent.com/roehst/tapl-implementations/23c0dc505a8c0b0a797201a7e4e3e5b939dd8fdb/arith/main.ml | ocaml | Module Main: The main program. Deals with processing the command
line, reading files, building and connecting lexers and parsers, etc.
For most experiments with the implementation, it should not be
necessary to change this file.
|
open Format
open Support.Pervasive
open Support.Error
open Syntax
open Core
let searchpath = ref [""]
let argDefs = [
"-I",
Arg.String (fun f -> searchpath := f::!searchpath),
"Append a directory to the search path"]
let parseArgs () =
let inFile = ref (None : string option) in
Arg.parse argDefs
... |
a87ce80719977d8b6f796ce42926a6f7be725f0360445a9a9f99c9c426538b78 | binaryage/chromex | bookmarks.clj | (ns chromex.app.bookmarks
"Use the chrome.bookmarks API to create, organize, and otherwise manipulate bookmarks. Also see Override Pages, which you
can use to create a custom Bookmark Manager page.
* available since Chrome 36
* "
(:refer-clojure :only [defmacro defn apply declare meta let partial])
... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps/chromex/app/bookmarks.clj | clojure | -- properties -------------------------------------------------------------------------------------------------------------
unspecified properties
-- events -----------------------------------------------------------------------------------------------------------------
docs: /#tapping-events
-- convenience -----... | (ns chromex.app.bookmarks
"Use the chrome.bookmarks API to create, organize, and otherwise manipulate bookmarks. Also see Override Pages, which you
can use to create a custom Bookmark Manager page.
* available since Chrome 36
* "
(:refer-clojure :only [defmacro defn apply declare meta let partial])
... |
2cb265df04a742a1e0855f9801c578b51ed2bd45feb8f02bb16441629031800a | patrickt/bracer | Failure.hs | module Language.Bracer.Transformations.Failure where
import Prelude ()
import Overture
import Data.Comp.Derive
data Failure a
= UnsupportedFeature { _failureReason :: String }
| UnimplementedFeature { _failureReason :: String }
| UnmatchedDatum
deriving (Eq, Show, Functor)
smartConstructors ''Failure
| null | https://raw.githubusercontent.com/patrickt/bracer/ebad062d421f7678ddafc442245e361c0423cb1b/Language/Bracer/Transformations/Failure.hs | haskell | module Language.Bracer.Transformations.Failure where
import Prelude ()
import Overture
import Data.Comp.Derive
data Failure a
= UnsupportedFeature { _failureReason :: String }
| UnimplementedFeature { _failureReason :: String }
| UnmatchedDatum
deriving (Eq, Show, Functor)
smartConstructors ''Failure
| |
52a7204378be3862bcda39acc9b8bd47012c3fb6d0aade65898692de0df36340 | hannesm/conex | conex_root.ml | open Conex_utils
open Conex_resource
open Conex_opts
open Conex_mc
module IO = Conex_io
let status _ repodir anchors filename =
msg_to_cmdliner (
let valid = valid anchors in
repo repodir >>= fun io ->
match IO.read_root io filename with
| Error r ->
Logs.err (fun m -> m "%a" IO.pp_r_err r) ... | null | https://raw.githubusercontent.com/hannesm/conex/3a8cd3437e1361461e810347e343153c7086b6b6/app/conex_root.ml | ocaml | open Conex_utils
open Conex_resource
open Conex_opts
open Conex_mc
module IO = Conex_io
let status _ repodir anchors filename =
msg_to_cmdliner (
let valid = valid anchors in
repo repodir >>= fun io ->
match IO.read_root io filename with
| Error r ->
Logs.err (fun m -> m "%a" IO.pp_r_err r) ... | |
81a9521a890089008bf6dd2fd28b80e43f1879c833eac6c1ceefe04193cc005c | PacktWorkshops/The-Clojure-Workshop | project.clj | (defproject packt-clj.reagent-sandbox "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.9.1"
:dependencies [[org.clojure/clojure "1.10.0"]
[org.clojure/clojurescript "1.10.520"]
... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter15/Exercise15.01/project.clj | clojure | The presence of a :figwheel configuration here
will cause figwheel to inject the figwheel client
into your build
:open-urls will pop open your application
started and compiled your application.
Comment this out once it no longer serves you.
-devtools
This next build is a compressed minified build for
productio... | (defproject packt-clj.reagent-sandbox "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.9.1"
:dependencies [[org.clojure/clojure "1.10.0"]
[org.clojure/clojurescript "1.10.520"]
... |
20238273821b937f199a48c2791506890e0e549dd8dae833ff622c68c7aab094 | haroldcarr/learn-haskell-coq-ml-etc | HW03_HC_Golf.hs |
Created : 2014 Jun 01 ( Sun ) 19:54:26 by .
Last Modified : 2014 Jun 04 ( We d ) 08:11:33 by .
Created : 2014 Jun 01 (Sun) 19:54:26 by Harold Carr.
Last Modified : 2014 Jun 04 (Wed) 08:11:33 by Harold Carr.
-}
module HW03_HC_Golf where
import Data.List (tails, unfoldr)
import ... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/course/2014-06-upenn/cis194/src/HW03_HC_Golf.hs | haskell | ----------------------------------------------------------------------------
TODO: skips [] returns the correct value when typed into GHCi after loading this file,
but need to figure out how to get it to accept the following input in test
-----------------------------------------------------------------------... |
Created : 2014 Jun 01 ( Sun ) 19:54:26 by .
Last Modified : 2014 Jun 04 ( We d ) 08:11:33 by .
Created : 2014 Jun 01 (Sun) 19:54:26 by Harold Carr.
Last Modified : 2014 Jun 04 (Wed) 08:11:33 by Harold Carr.
-}
module HW03_HC_Golf where
import Data.List (tails, unfoldr)
import ... |
9c13ba1e1f325e4278dfbeeedc9cd8e8bb6bb8dbde0d5ecdfd677f578e9a7bda | pietervdvn/ALGT | TargetLanguageParser.hs | module TypeSystem.Parser.TargetLanguageParser where
This module interprets a BNF - AST datastructure to parse the target language to a Parsetree
This module interprets a BNF-AST datastructure to parse the target language to a Parsetree
-}
import Utils.Utils
import TypeSystem.Parser.ParsingUtils
import Control.Ar... | null | https://raw.githubusercontent.com/pietervdvn/ALGT/43a2811931be6daf1362f37cb16f99375ca4999e/src/TypeSystem/Parser/TargetLanguageParser.hs | haskell | ---------------------- Syntax: Actually parsed stuff ------------------------- | module TypeSystem.Parser.TargetLanguageParser where
This module interprets a BNF - AST datastructure to parse the target language to a Parsetree
This module interprets a BNF-AST datastructure to parse the target language to a Parsetree
-}
import Utils.Utils
import TypeSystem.Parser.ParsingUtils
import Control.Ar... |
ac9b6ae3b92907485f4e6e97885e3f94df358d4484e1f34c10eaf4bfd90bb56e | Verites/verigraph | TestUtils.hs | module Logic.Ctl.TestUtils where
import Test.QuickCheck
import Logic.Ctl
instance Arbitrary Expr where
arbitrary =
sized (genExpr . (`div` 5))
genExpr :: Int -> Gen Expr
genExpr 0 =
oneof
[ Literal <$> arbitrary
, Atom <$> genIdentifier
]
genExpr n =
let
n' = n - 1
... | null | https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/tests/Logic/Ctl/TestUtils.hs | haskell | module Logic.Ctl.TestUtils where
import Test.QuickCheck
import Logic.Ctl
instance Arbitrary Expr where
arbitrary =
sized (genExpr . (`div` 5))
genExpr :: Int -> Gen Expr
genExpr 0 =
oneof
[ Literal <$> arbitrary
, Atom <$> genIdentifier
]
genExpr n =
let
n' = n - 1
... | |
b2575ee8af846ad653c3e67cc6b6870847df765a7379b762a17217fb77d2691c | haskell-github/github | UpdatePull.hs | module MergePullRequest where
import qualified Github.PullRequests as Github
import Github.Auth
import Github.Data
main :: IO ()
main = do
mergeResult <- Github.updatePullRequest (OAuth "authtoken") "repoOwner" "repoName" 22 EditPullRequest
{ editPullRequestTitle = Just "Brand new title"
, editPullRequestB... | null | https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/samples/Pulls/UpdatePull.hs | haskell | module MergePullRequest where
import qualified Github.PullRequests as Github
import Github.Auth
import Github.Data
main :: IO ()
main = do
mergeResult <- Github.updatePullRequest (OAuth "authtoken") "repoOwner" "repoName" 22 EditPullRequest
{ editPullRequestTitle = Just "Brand new title"
, editPullRequestB... | |
933b11fbdd9f5252523a2c9a66ff4748c492b661f4173a4781ab49b22b07de83 | kind2-mc/kind2 | graph.ml | This file is part of the Kind 2 model checker .
Copyright ( c ) 2020 by the Board of Trustees of the University of Iowa
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 a... | null | https://raw.githubusercontent.com/kind2-mc/kind2/0fe45fb3b2b275b043406de3e220ed2abafc338c/src/utils/graph.ml | ocaml | * The exception raised when an illegal edge is added
* The vertex type
* Get the source [vertex] from an [edge]
* Checks if the [vertex] is the source [vertex]
* Get the target [vertex] from an [edge]
* Checks if the [vertex] is the target [vertex]
* Set of vertices
* Set of edges
* The graph type
* The empty... | This file is part of the Kind 2 model checker .
Copyright ( c ) 2020 by the Board of Trustees of the University of Iowa
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 a... |
9910f46c19686bfd3470d39de9de9efced9279fc1a309338e1345edf7890a869 | slovnicki/pLam | Evaluator.hs | module Evaluator where
import Control.Monad.State
import Data.Char
import Debug.Trace
import Syntax
-------------------------------------------------------------------------------------
evalVar :: String -> Program (Failable Expression)
evalVar a = state $ \e ->
( case lookup a e of
Nothing -> Left $ Undeclar... | null | https://raw.githubusercontent.com/slovnicki/pLam/459589cf08fb53051215442ec7b0669106bbf225/src/Evaluator.hs | haskell | -----------------------------------------------------------------------------------
evalVar ([n] <> showVarHelper i)
----------------------------------------------------------------------------------- | module Evaluator where
import Control.Monad.State
import Data.Char
import Debug.Trace
import Syntax
evalVar :: String -> Program (Failable Expression)
evalVar a = state $ \e ->
( case lookup a e of
Nothing -> Left $ UndeclaredVariable a
Just x -> Right x,
e
)
evalAbs :: LambdaVar -> Expression ->... |
7acff3de7eb5eff81a0fc722187a89ae70c04325b85fb24014635ca4993a40a6 | bondy-io/bondy | bondy_broker_bridge_app.erl | %% =============================================================================
%% bondy_broker_bridge_app.erl -
%%
Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the L... | null | https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy_broker_bridge/src/bondy_broker_bridge_app.erl | erlang | =============================================================================
bondy_broker_bridge_app.erl -
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 WARRAN... | Copyright ( c ) 2016 - 2022 Leapsight . 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(bondy_broker_bridge_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartTyp... |
ca7ea1c06386c7801400746d79b6ed6378f67c63cbfb55852793a9eb794d20f1 | johnlawrenceaspden/hobby-code | overtone.clj | to install overtone
pom.xml with clojars and clojure 1.3 but not contrib, also overtone
$ sudo apt-get install jack-tools ant openjdk-6-jdk fftw3 qjackctl
$ jackd -r -d alsa -r 44100
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
<version>1.3.0</version>
</depe... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/overtone.clj | clojure | to install overtone
pom.xml with clojars and clojure 1.3 but not contrib, also overtone
$ sudo apt-get install jack-tools ant openjdk-6-jdk fftw3 qjackctl
$ jackd -r -d alsa -r 44100
<dependency>
<groupId>org.clojure</groupId>
<artifactId>clojure</artifactId>
<version>1.3.0</version>
</depe... | |
e2b9d4cc32786e7e9c0bd177f4fd584a0ff47d26d4f2b89033728e4f136b938d | RichiH/git-repair | DottedVersion.hs | dotted versions , such as 1.0.1
-
- Copyright 2011 - 2014 < >
-
- License : BSD-2 - clause
-
- Copyright 2011-2014 Joey Hess <>
-
- License: BSD-2-clause
-}
# OPTIONS_GHC -fno - warn - tabs #
module Utility.DottedVersion where
import Common
data DottedVersion = DottedVersion String Integer
... | null | https://raw.githubusercontent.com/RichiH/git-repair/c61b677e7a67a286df34c0629c52aeae9be9299a/Utility/DottedVersion.hs | haskell | number of segments of the version to compare
maximum width of a segment | dotted versions , such as 1.0.1
-
- Copyright 2011 - 2014 < >
-
- License : BSD-2 - clause
-
- Copyright 2011-2014 Joey Hess <>
-
- License: BSD-2-clause
-}
# OPTIONS_GHC -fno - warn - tabs #
module Utility.DottedVersion where
import Common
data DottedVersion = DottedVersion String Integer
... |
11140d2a0e97663f0927406744447d9d1c999f4954407c5f4a4257bb379f33f2 | ocsigen/ocaml-indexeddb | idb_lwt.mli | Copyright ( C ) 2015 , . See the LICENSE file for
details .
details. *)
include Idb_sigs.DB
* Store that uses the standard serialization provided by IndexeDB
( structured clone algorithm ):
-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
This does not work for all OCaml val... | null | https://raw.githubusercontent.com/ocsigen/ocaml-indexeddb/87373b8bfa42b1e403d26aa44709d2c45a99d0da/lib/idb_lwt.mli | ocaml | * Store that uses the Js_of_ocaml [Json] module for serialization
* Functorial interface | Copyright ( C ) 2015 , . See the LICENSE file for
details .
details. *)
include Idb_sigs.DB
* Store that uses the standard serialization provided by IndexeDB
( structured clone algorithm ):
-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
This does not work for all OCaml val... |
972b0f41db620ca37303bd4f0f4880d99f052f161514e6590526e5eddf7ed9c3 | spotify/lyceum | core.clj | ;; $LICENSE
Copyright 2013 - 2014 Spotify AB . All rights reserved .
;;
The contents of this file are 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 requir... | null | https://raw.githubusercontent.com/spotify/lyceum/3ff48939f2d68f9bc0b5d5be9bac74cc9e64b45f/src/lyceum/core.clj | clojure | $LICENSE
you may not use this file except in compliance with the
License. You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing pe... | Copyright 2013 - 2014 Spotify AB . All rights reserved .
The contents of this file are licensed under the Apache License , Version 2.0
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
# Core components essential to lyceum
(ns lyceum.core
(:require [riemann.streams :refer [call-res... |
d5dea2a4160c651c3bba1a8f2478b332e1952723f667af59322a5fefad43db0c | ghc/ghc | Flavour.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE TypeFamilies #
module Oracles.Flavour
( oracles
, askDynGhcPrograms
, askGhcProfiled
) where
import Base
import Flavour
import Settings (flavour)
newtype DynGhcPrograms =
DynGhcPrograms (... | null | https://raw.githubusercontent.com/ghc/ghc/7c813d0688f03c782d3c3a93a8369a48b7e74c8d/hadrian/src/Oracles/Flavour.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveDataTypeable # | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
module Oracles.Flavour
( oracles
, askDynGhcPrograms
, askGhcProfiled
) where
import Base
import Flavour
import Settings (flavour)
newtype DynGhcPrograms =
DynGhcPrograms () deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
type instan... |
961b7d2144722476de1cda79e1c13b9f04d0d608099984260ebce81d1fe08bb9 | bugczw/Introduction-to-Functional-Programming-in-OCaml | W3_S0_3.ml |
THE OPTION TYPE ( 30/30 points )
Optional values are commonly used in OCaml in the return type of partial functions , i.e. functions that may fail on some input . The following questions illustrate such situations .
In the Pervasives module which is loaded automatically , there is a type option with two constru... | null | https://raw.githubusercontent.com/bugczw/Introduction-to-Functional-Programming-in-OCaml/13c4d1f92e7479f8eb10ea5d4c43a598b6676d0f/OCaml_MOOC_W3_ALL/Exercise/W3_S0_3.ml | ocaml |
THE OPTION TYPE ( 30/30 points )
Optional values are commonly used in OCaml in the return type of partial functions , i.e. functions that may fail on some input . The following questions illustrate such situations .
In the Pervasives module which is loaded automatically , there is a type option with two constru... | |
256f2db8e5f99a898c5f0aa7d98634e71577115e0adfd5927c9c7d36181fb009 | 6502/JSLisp | simple-graph.lisp | (import * from gui)
(import * from layout)
(defun simple-graph ()
(let** ((w (window 0 0 0.75 0.75 title: "Simple graph"))
(data (add-widget w (text-area "data")))
(ok (add-widget w (button "OK" #'ok)))
(#'ok ()
(let** ((w (window 0 0 0.75 0.75 title: "Graph"))
... | null | https://raw.githubusercontent.com/6502/JSLisp/9a4aa1a9116f0cfc598ec9f3f30b59d99810a728/examples/simple-graph.lisp | lisp | (import * from gui)
(import * from layout)
(defun simple-graph ()
(let** ((w (window 0 0 0.75 0.75 title: "Simple graph"))
(data (add-widget w (text-area "data")))
(ok (add-widget w (button "OK" #'ok)))
(#'ok ()
(let** ((w (window 0 0 0.75 0.75 title: "Graph"))
... | |
c07215b776d6a03d236aec674ce2e166e2d95f98d7785b233a2685d6fcda0512 | camfort/fortran-src | Machine.hs | | Fortran array representation primitives .
Fortran arrays are homogeneous : every element has the same type . That means a
@REAL(8)@ array must store only @REAL(8)@s , no @REAL(4)@s . We use some type
algebra to obtain correct - by - construction types .
Also , arrays are multi - dimensional . Rather than... | null | https://raw.githubusercontent.com/camfort/fortran-src/43058030e2f6f9e5264b923134da0291e7ae807f/src/Language/Fortran/Repr/Value/Array/Machine.hs | haskell | unwrapping somes gets you kind and length at the same time - I figure because
kind is just a convenience.
can conveniently define kinded array types like so
reifies type info | | Fortran array representation primitives .
Fortran arrays are homogeneous : every element has the same type . That means a
@REAL(8)@ array must store only @REAL(8)@s , no @REAL(4)@s . We use some type
algebra to obtain correct - by - construction types .
Also , arrays are multi - dimensional . Rather than... |
b699b4692aa541678937844212b6edf2480597b59fe539b541fbaadb020c4146 | dbuenzli/logs | logs.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2015 The logs programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/logs/f948d255cde88b5b8a3d0e3ab16120e55d748836/src/logs.ml | ocaml | Reporting levels
Sources
Message tags
Tag definitions
Tag values
Tag sets
Reporters
Log functions
Log result errors
Source specific logging functions | ---------------------------------------------------------------------------
Copyright ( c ) 2015 The logs programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... |
552c3c6284d8a594c75b99c0e287c839abc6ca0afb5a5febf0ae2803976795a3 | pedestal/pedestal | container.clj | Copyright 2014 - 2022 Cognitect , Inc.
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( )
; which can be found in the file epl-v10.html at the root of this distribution.
;
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this... | null | https://raw.githubusercontent.com/pedestal/pedestal/53bfe70143a22cdfd2f0d183023334a199c9e9a2/jetty/src/io/pedestal/http/jetty/container.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright 2014 - 2022 Cognitect , Inc.
Eclipse Public License 1.0 ( )
(ns io.pedestal.http.jetty.container
(:require [io.pedestal.http.container :as container]
[clojure.core.async :as async])
(:import (java.nio.channels ReadableByteChannel)
(java.nio ByteBuffer)
(org.eclipse... |
0e33ada80e244e04f55212750837301f7aa9fc6a95e0d1e0cf96c5376990627c | fccm/glMLite | stroke.ml | Copyright ( c ) , 1994 .
( c ) Copyright 1993 , Silicon Graphics , Inc.
* ALL RIGHTS RESERVED
* Permission to use , copy , modify , and distribute this software for
* any purpose and without fee is hereby granted , provided that the above
* copyright notice appear in all copies and that both the cop... | null | https://raw.githubusercontent.com/fccm/glMLite/c52cd806909581e49d9b660195576c8a932f6d33/RedBook-Samples/stroke.ml | ocaml | stroke.ml
* This program demonstrates some characters of a
* stroke (vector) font. The characters are represented
* by display lists, which are given numbers which
* correspond to the ASCII values of the characters.
* Use of glCallLists() is demonstrated.
drawLetter() interprets the instructions from t... | Copyright ( c ) , 1994 .
( c ) Copyright 1993 , Silicon Graphics , Inc.
* ALL RIGHTS RESERVED
* Permission to use , copy , modify , and distribute this software for
* any purpose and without fee is hereby granted , provided that the above
* copyright notice appear in all copies and that both the cop... |
cf4d9e581aee73048f22795a25188347e73881beb780a699a73314d9403af659 | rd--/hsc3 | sinGrain.help.hs | -- sinGrain
X.sinGrain ar (impulse kr 10 0) 0.1 (range 440 880 (whiteNoiseId 'α' kr)) * 0.1
sinGrain ; mouse control
let x = mouseX kr 0.001 0.2 Linear 0.1
y = mouseX kr 90 600 Linear 0.1
in X.sinGrain ar (dustId 'β' kr 25) x y * 0.1
sinGrain ; ln 2021 - 04 - 13 /
X.sinGrain ar (impulse ar (sinOsc ar (1/6) 0 ... | null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/sinGrain.help.hs | haskell | sinGrain
-- ; drawings | X.sinGrain ar (impulse kr 10 0) 0.1 (range 440 880 (whiteNoiseId 'α' kr)) * 0.1
sinGrain ; mouse control
let x = mouseX kr 0.001 0.2 Linear 0.1
y = mouseX kr 90 600 Linear 0.1
in X.sinGrain ar (dustId 'β' kr 25) x y * 0.1
sinGrain ; ln 2021 - 04 - 13 /
X.sinGrain ar (impulse ar (sinOsc ar (1/6) 0 `in_range` (... |
e05708950a57a35df51020809fdd8e6487e64a6640824ebb3ba394089337b06d | pentlandedge/s4607 | job_ack.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright 2018 Pentland Edge 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
%%
%% -2.0
%%
%% Un... | null | https://raw.githubusercontent.com/pentlandedge/s4607/b3cdae404ac5bd50419f33259dfa62af9d1a8d60/src/job_ack.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... | Copyright 2018 Pentland Edge Ltd.
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
standard .
-module(job_ack).
-export([decode/1, encode/1, new/1, payload_size/1, display/1]).
-export([
g... |
f5a185604d766b74d2209b4200283430ece9d64750ddd3684c20ff41d07187be | lojic/LearningRacket | bob-test.rkt | #lang racket
(require "bob.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(define whatev "Whatever.")
(define chill "Whoa, chill out!")
(define sure "Sure.")
(define fine "Fine. Be that way!")
(define suite
(test-suite
"Tests for the bob exercise"
(test-case "stating ... | null | https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/exercism.io/bob/bob-test.rkt | racket | #lang racket
(require "bob.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(define whatev "Whatever.")
(define chill "Whoa, chill out!")
(define sure "Sure.")
(define fine "Fine. Be that way!")
(define suite
(test-suite
"Tests for the bob exercise"
(test-case "stating ... | |
00f44a5e2eac0ee24ee17b2935ceba46908ebf9fafe2ba8bfe043f90572080a0 | joearms/erlmediaserver | contentdirectory_handler.erl | %% Author: ua
Created : Feb 8 , 2010
%% Description: TODO: Add description to description_handler
-module(contentdirectory_handler).
-export([out/1,handle_request/4]).
-include("/usr/local/lib/yaws/include/yaws_api.hrl").
-import(xmltool, [get_value/2, parse/1]).
-import(handler, [make_response/2, get_soapaction/1,... | null | https://raw.githubusercontent.com/joearms/erlmediaserver/35ef0d8300c50a273ee0122ccce65973af4c3a73/src/contentdirectory_handler.erl | erlang | Author: ua
Description: TODO: Add description to description_handler
error_logger:info_msg("'GET', /service/contentdirectory Result : ", [Result]), | Created : Feb 8 , 2010
-module(contentdirectory_handler).
-export([out/1,handle_request/4]).
-include("/usr/local/lib/yaws/include/yaws_api.hrl").
-import(xmltool, [get_value/2, parse/1]).
-import(handler, [make_response/2, get_soapaction/1, get_path/1, get_soapaction/1]).
out(Arg) ->
error_logger:info_msg("Arg ~... |
5d067fcd54595ae8dc7bcb5289755b636420858cb0e327384067b73e5f6aa42e | SanderSpies/ocaml-gist | date.ml | open Core_kernel
let () = (
let zone = Core_kernel.Time.Zone.of_utc_offset ~hours:2 in
if Date.is_weekday (Date.today ~zone) then
print_endline "A weekday"
else
print_endline "Not a weekday"
)
| null | https://raw.githubusercontent.com/SanderSpies/ocaml-gist/7dc229aebdf51310e8c7dae12df0cb55b5de5a32/test/input_core_kernel/date.ml | ocaml | open Core_kernel
let () = (
let zone = Core_kernel.Time.Zone.of_utc_offset ~hours:2 in
if Date.is_weekday (Date.today ~zone) then
print_endline "A weekday"
else
print_endline "Not a weekday"
)
| |
62c8f09f1ae014bd0ff72d8517fbc0c8a5ab8c728dd237e611de9c419a40982c | riemann/riemann-jvm-profiler | core_test.clj | (ns riemann.jvm-profiler.core-test
(:use [clojure.test :exclude (report)]
[riemann.jvm-profiler]))
(deftest format-prefix-test
(testing "format-prefix"
(is (= (format-prefix "") "")
(is (= (format-prefix "myapp") "myapp ")))))
| null | https://raw.githubusercontent.com/riemann/riemann-jvm-profiler/00a1fc2d21e68bd7395b83d82323b06e858681aa/test/riemann/jvm_profiler/core_test.clj | clojure | (ns riemann.jvm-profiler.core-test
(:use [clojure.test :exclude (report)]
[riemann.jvm-profiler]))
(deftest format-prefix-test
(testing "format-prefix"
(is (= (format-prefix "") "")
(is (= (format-prefix "myapp") "myapp ")))))
| |
600fa89884cba3e71a59ae1dc2b09c83a36c25aaa47846ecc9348dddc74e6987 | dalmatinerdb/dflow | dflow_sup.erl | -module(dflow_sup).
-ifdef(TEST).
-ifdef(EQC).
-include_lib("pulse_otp/include/pulse_otp.hrl").
-endif.
-endif.
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type), {I, {I, start_link, []}, t... | null | https://raw.githubusercontent.com/dalmatinerdb/dflow/61d70b79a24c36bf72608b9fc91e91657eddd012/src/dflow_sup.erl | erlang | API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
===================================================================
Supervisor callback... | -module(dflow_sup).
-ifdef(TEST).
-ifdef(EQC).
-include_lib("pulse_otp/include/pulse_otp.hrl").
-endif.
-endif.
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, temporary, 5000, Type, [I]}).
start_link() ->
supervisor:start_link({local, ?MO... |
959205a4a03892f60fcf5c053b052e33561692b8e15ef040e66580634e2d59e3 | nixeagle/cl-irc | event.lisp | $ Id$
$ URL$
;;;; See LICENSE for licensing information.
(in-package :irc)
(defgeneric irc-message-event (connection message)
(:documentation "Upon receipt of an IRC message from the
connection's stream, irc-message-event will be called with the
message."))
(defmethod irc-message-event (connection (message ir... | null | https://raw.githubusercontent.com/nixeagle/cl-irc/efaea15f2962107ea9b1a2fad5cd9db492b4247b/trunk/event.lisp | lisp | See LICENSE for licensing information.
note: the structure currently does not allow for logging
set-by and time-set: the MODE message handling currently
does not allow that.
start with a new list, replacing the old value later
use package-local symbol to prevent conflicts
replace list
the last argument contains... | $ Id$
$ URL$
(in-package :irc)
(defgeneric irc-message-event (connection message)
(:documentation "Upon receipt of an IRC message from the
connection's stream, irc-message-event will be called with the
message."))
(defmethod irc-message-event (connection (message irc-message))
(declare (ignore connection))
... |
78f2b2736d2c461cce05c64c9cf9470bcd9c91205b86bcb96e6d85e78edfa386 | tisnik/clojure-examples | core.clj | ;
( C ) Copyright 2015 , 2020
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the Eclipse Public License v1.0
; which accompanies this distribution, and is available at
-v10.html
;
; Contributors:
;
(ns webapp8.core
(:gen-class))
... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/webapp8/src/webapp8/core.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
| ( C ) Copyright 2015 , 2020
-v10.html
(ns webapp8.core
(:gen-class))
(require '[ring.adapter.jetty :as jetty])
(require '[ring.middleware.params :as http-params])
(require '[ring.middleware.session :as http-session])
(require '[ring.util.response :as response])
(def html-page
" <... |
11a175dacae0ab617be40e48e2b391802a6f3edc178af81dbd84abe167e48267 | Workiva/eva | error.clj | Copyright 2015 - 2019 Workiva Inc.
;;
;; Licensed under the Eclipse Public License 1.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -1.0.php
;;
;; Unless required by applicable law or agreed to in writing, software
dist... | null | https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/src/eva/query/dialect/pull/error.clj | clojure |
Licensed under the Eclipse Public License 1.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-1.0.php
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre... | Copyright 2015 - 2019 Workiva Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns eva.query.dialect.pull.error
(:require [eva.error :as err]))
(err/deferror syntax-error
:pull/syntax-error
"Invalid pull syntax"
[:expression])
|
d9099b39b464342c9996ecbc2f255f1f9266ac504b4021950a1f8c6d3b993e8e | Verites/verigraph | Compiler.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
module GrLang.Compiler
( compileFile
, compile
, compileDecl
, compileGraph
, compileMorphism
, compileRule
) where
import Control.Monad.Except (ExceptT (..), mapExceptT)
import Control.Monad.State
import ... | null | https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/src/library/GrLang/Compiler.hs | haskell | # LANGUAGE OverloadedStrings #
Interpret the imported path relative to the directory of the current path
Add clones and remove deleted elements to interface graph
Add created elements to the RHS graph
Correct edges that are incident to joined nodes
Given partial components of a graph morphism, complete the morphis... | # LANGUAGE FlexibleContexts #
module GrLang.Compiler
( compileFile
, compile
, compileDecl
, compileGraph
, compileMorphism
, compileRule
) where
import Control.Monad.Except (ExceptT (..), mapExceptT)
import Control.Monad.State
import Data.Either ... |
b59b3b9d856dfcbe49f271226f9bfeece1f83797191b946c5b65c01e824e407e | INRIA/zelus | solvers.sundials.ml | include Odexx
module Sundials_cvode = struct
type t = Nvector_serial.kind Cvode.serial_session
type nvec = Nvector_serial.t
let cmake n = Nvector_serial.make n 0.0
let unvec = Nvector.unwrap
type rhsfn = float -> Zls.carray -> Zls.carray -> unit
type dkyfn = nvec -> float -> int -> unit
let initializ... | null | https://raw.githubusercontent.com/INRIA/zelus/458e1129eb17a6d2e3ab188c4e9b41ab7504bd89/lib/std/solvers/solvers.sundials.ml | ocaml | for some reason, the values in realarray are in the wrong order,
this is a dirty fix for this issue
get interpolated k-th derivatives of the sensitivity
of state variable i at time t
the state vector c is only used to get the number of state vectors to
initialize uS properly | include Odexx
module Sundials_cvode = struct
type t = Nvector_serial.kind Cvode.serial_session
type nvec = Nvector_serial.t
let cmake n = Nvector_serial.make n 0.0
let unvec = Nvector.unwrap
type rhsfn = float -> Zls.carray -> Zls.carray -> unit
type dkyfn = nvec -> float -> int -> unit
let initializ... |
7fa215fda6ea10d6e7e0136318e5bb909f3df0085e60d8edcbbbc65836713fb6 | haskell-suite/haskell-src-exts | AtOperator.hs | # LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
data a :+: b = Proxy
foo = id @(Int :+: Int)
_ @> m = m
| null | https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/AtOperator.hs | haskell | # LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
data a :+: b = Proxy
foo = id @(Int :+: Int)
_ @> m = m
| |
4cb375f9f35556826537a99ac6f70a95004c168621a5df1b0267c52eddf783cd | erlang/otp | snmpa_net_if.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/erlang/otp/d52440f0d27f1d23243308873b28196d9032c5cf/lib/snmp/src/agent/snmpa_net_if.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2004 - 2023 . 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(snmpa_net_if).
-behaviour(snmpa_network_interface).
-export([start_link/4,
info/1,
verbosity/2]).
-exp... |
7b6e63f61a4d5e07b0bc484c054936201358339374aa2c2423b952e08bb430e9 | peerdrive/peerdrive | peerdrive_ifc_vfs_broker.erl | PeerDrive
Copyright ( C ) 2011 < jan DOT kloetzke AT freenet DOT de >
%%
%% This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%% (at your option) any la... | null | https://raw.githubusercontent.com/peerdrive/peerdrive/94389e2536cc9b1a0c168ec56ba3912910eb0c35/server/apps/peerdrive/src/peerdrive_ifc_vfs_broker.erl | erlang |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public... | PeerDrive
Copyright ( C ) 2011 < jan DOT kloetzke AT freenet DOT de >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
-module(peerdrive_ifc_vfs_broke... |
adeab703e09d63b609bbbac0bea76465cae0bd8f1aa12e4f34e913d207bf9088 | GrammaTech/sel | utility.lisp | ;;; utility.lisp - Utility functions shared by the python API cl applications.
(defpackage :software-evolution-library/python/lisp/utility
(:nicknames :sel/py/lisp/utility)
(:use :gt/full
:software-evolution-library/software/parseable
:software-evolution-library/software/tree-sitter
:softwar... | null | https://raw.githubusercontent.com/GrammaTech/sel/6624c42e7633604c972174b9ebd1d5e2a38ca86e/python/lisp/utility.lisp | lisp | utility.lisp - Utility functions shared by the python API cl applications.
(-> cl-to-python-type ((or class symbol string)) string)
Logical operators
Arithmetic operators
Miscellaneous operators
Quote terminals
Python terminals
Javascript terminals
Rust terminals
Typescript terminals
C/C++ terminals
(-> ast... | (defpackage :software-evolution-library/python/lisp/utility
(:nicknames :sel/py/lisp/utility)
(:use :gt/full
:software-evolution-library/software/parseable
:software-evolution-library/software/tree-sitter
:software-evolution-library/software/c
:software-evolution-library/software/cpp... |
3c91cb3dc853e6bfb59cc1a5c2c64c013665c23727284eae041e463f95e786a3 | GaloisInc/daedalus | Map.hs | {-# Language BlockArguments #-}
module Daedalus.Value.Map where
import qualified Data.Map as Map
import Daedalus.Value.Type
import Daedalus.Value.Utils
vMapEmpty :: Value
vMapEmpty = VMap Map.empty
vMapInsert ::
Value {- ^ key -} -> Value {- ^ value -} -> Value {- ^ map -} -> Value
vMapInsert = tracedFun \k v m -... | null | https://raw.githubusercontent.com/GaloisInc/daedalus/3f180d29441960e35386654ec79a2b205bddc157/daedalus-value/src/Daedalus/Value/Map.hs | haskell | # Language BlockArguments #
^ key
^ value
^ map
^ key
^ map
^ key
map | module Daedalus.Value.Map where
import qualified Data.Map as Map
import Daedalus.Value.Type
import Daedalus.Value.Utils
vMapEmpty :: Value
vMapEmpty = VMap Map.empty
vMapInsert ::
vMapInsert = tracedFun \k v m -> VMap (Map.insert k v (valueToMap m))
vMapLookup = tracedFun \k m -> VMaybe (Map.lookup k (valueToMap m... |
fb650bc4fdd7a1966e0673d15d2cb596eb924d008c224113c5770b1a1ad575bf | stepcut/plugins | Main.hs |
import System.Eval.Haskell
main = do i <- eval_ "Just (7 :: Int)"
["Data.Maybe"]
["-fglasgow-exts"]
[]
[] :: IO (Either [String] (Maybe (Maybe Int)))
print i
| null | https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/eval/eval_/Main.hs | haskell |
import System.Eval.Haskell
main = do i <- eval_ "Just (7 :: Int)"
["Data.Maybe"]
["-fglasgow-exts"]
[]
[] :: IO (Either [String] (Maybe (Maybe Int)))
print i
| |
aff045bf70dffcf8053edfef788e9091b93876a76e1fde1340d57ed12ce6d098 | jackfirth/lens | contract.rkt | #lang racket/base
(provide lens/c)
(require racket/contract/base
"gen-lens.rkt"
)
(module+ test
(require rackunit
racket/contract/region
fancy-app
"make-lens.rkt"
))
(define (lens/c target/c view/c)
(rename-contract
(gen-lens/c
[lens-view (or/c... | null | https://raw.githubusercontent.com/jackfirth/lens/733db7744921409b69ddc78ae5b23ffaa6b91e37/lens-common/lens/private/base/contract.rkt | racket | #lang racket/base
(provide lens/c)
(require racket/contract/base
"gen-lens.rkt"
)
(module+ test
(require rackunit
racket/contract/region
fancy-app
"make-lens.rkt"
))
(define (lens/c target/c view/c)
(rename-contract
(gen-lens/c
[lens-view (or/c... | |
c6bcf6e5f0e24597a431f7966cad991bb9de9722b6c505e395adf054791c351c | EFanZh/EOPL-Exercises | exercise-4.25-test.rkt | #lang racket
(require rackunit)
(require "../solutions/exercise-4.25.rkt")
(define (get-output string)
(with-output-to-string
(λ ()
(run string))))
(check-equal? (get-output "var x = 8, y = 3;
print -(x, y)")
"5\n")
(check-equal? (get-output "var ... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-4.25-test.rkt | racket | #lang racket
(require rackunit)
(require "../solutions/exercise-4.25.rkt")
(define (get-output string)
(with-output-to-string
(λ ()
(run string))))
print -(x, y)")
"5\n")
print -(x, y)")
"-5\n")
| |
d49897c0f5f4766043517c0789881864f869012076b026cee1ed3a795b0f48bb | jeapostrophe/racket-langserver | responses.rkt | #lang racket/base
(require json
racket/contract/base)
(define not-given (gensym 'not-given))
;; Constructor for a response object representing success.
(define (success-response id result)
(hasheq 'jsonrpc "2.0"
'id id
'result result))
;; Constructor for a response object representing ... | null | https://raw.githubusercontent.com/jeapostrophe/racket-langserver/1a675e5bac122a4269934cb100e892e00997f304/responses.rkt | racket | Constructor for a response object representing success.
Constructor for a response object representing failure.
Constructor for a response object representing diagnostics. | #lang racket/base
(require json
racket/contract/base)
(define not-given (gensym 'not-given))
(define (success-response id result)
(hasheq 'jsonrpc "2.0"
'id id
'result result))
(define (error-response id code message [data not-given])
(define err (hasheq 'code code
... |
a19c000f66fa1ad8ad29d70e580f2db7e522bb41338ee273c3d800c3259050bb | rurban/clisp | graphics.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
CLX drawing requests
;;;
TEXAS INSTRUMENTS INCORPORATED
;;; P.O. BOX 2909
AUSTIN , TEXAS 78769
;;;
Copyright ( C ) 1987 Texas Instruments Incorporated .
;;;
;;; Permission is granted to any individua... | null | https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/modules/clx/mit-clx/graphics.lisp | lisp | Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
P.O. BOX 2909
Permission is granted to any individual or institution to use, copy, modify,
and distribute this software, provided that this complete copyright and
permission notice is maintained, intact, in all copies and supporting
... |
CLX drawing requests
TEXAS INSTRUMENTS INCORPORATED
AUSTIN , TEXAS 78769
Copyright ( C ) 1987 Texas Instruments Incorporated .
Texas Instruments Incorporated provides this software " as is " without
(in-package :xlib)
(defvar *inhibit-appending* nil)
(defun draw-point (drawable gcontext x y)
... |
aae4db318158962b9cb3afe94ab5d7ab86acf59d560ff91fbc9b599bc8587c18 | dongcarl/guix | diagnostics.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 , 2015 , 2016 , 2017 , 2018 , 2019 , 2020 , 2021 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published b... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/guix/diagnostics.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 , 2014 , 2015 , 2016 , 2017 , 2018 , 2019 , 2020 , 2021 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix diagnostics)
#:use-module (g... |
8f40d174a541ad2479b75c17226efa1e31b12e43a70483932727de3d54785ef4 | expipiplus1/vulkan | ExternalSemaphoreHandleTypeFlagBits.hs | {-# language CPP #-}
-- No documentation found for Chapter "ExternalSemaphoreHandleTypeFlagBits"
module Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits ( pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE_BIT
, ExternalSemaphoreHandleTypeFlags
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/70d8cca16893f8de76c0eb89e79e73f5a455db76/src/Vulkan/Core11/Enums/ExternalSemaphoreHandleTypeFlagBits.hs | haskell | # language CPP #
No documentation found for Chapter "ExternalSemaphoreHandleTypeFlagBits"
| VkExternalSemaphoreHandleTypeFlagBits - Bitmask of valid external
semaphore handle types
= Description
Note
Handles of type 'EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT' generated
Fences at the implementation’s discreti... | module Vulkan.Core11.Enums.ExternalSemaphoreHandleTypeFlagBits ( pattern EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE_BIT
, ExternalSemaphoreHandleTypeFlags
, ExternalSemaphoreHandleTypeFlagBit... |
87a28fbf9ef867a416c460f329e91e8d0e5bce354403962232156c568c831fcb | adamwalker/clash-utils | koggeStone.hs | import Clash.Prelude
import Clash.Arithmetic.CarryLookahead
# ANN topEntity
( Synthesize
{ t_name = " koggeStone "
, t_inputs = [
PortName " carry_in "
, PortName " x "
, PortName " y "
]
, t_output = PortProduct " " [
PortName " carrys " ... | null | https://raw.githubusercontent.com/adamwalker/clash-utils/375c61131e21e9a239b80bdb929ae77f156d056f/formal/carryLookahead/koggeStone.hs | haskell | import Clash.Prelude
import Clash.Arithmetic.CarryLookahead
# ANN topEntity
( Synthesize
{ t_name = " koggeStone "
, t_inputs = [
PortName " carry_in "
, PortName " x "
, PortName " y "
]
, t_output = PortProduct " " [
PortName " carrys " ... | |
4d65c5276efdd7bb7598c001cb0f28978b79b3f521a111267e5cae660f717342 | anmonteiro/aws-lambda-ocaml-runtime | config.ml | ----------------------------------------------------------------------------
* Copyright ( c ) 2018
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... | null | https://raw.githubusercontent.com/anmonteiro/aws-lambda-ocaml-runtime/5d3210e0c6683f390cb5870efe7f774420ad4b22/lib/config.ml | ocaml | ----------------------------------------------------------------------------
* Copyright ( c ) 2018
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.