_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 |
|---|---|---|---|---|---|---|---|---|
523d1a3e6a274d7d32371c5c2ccecc9ecb0fddcd9ad747cee5e8fc22a3a6b610 | chebert/schemeish | trees.lisp | (in-package #:schemeish.backend)
(install-syntax!)
;;; Tree
(export
(define (flatten tree)
(cond
((null? tree) ())
((pair? tree) (append (flatten (car tree)) (flatten (cdr tree))))
(t (list tree)))))
(uninstall-syntax!)
| null | https://raw.githubusercontent.com/chebert/schemeish/93ea08b17e6d8876f086e1a34a21b538174b2c39/src/trees.lisp | lisp | Tree | (in-package #:schemeish.backend)
(install-syntax!)
(export
(define (flatten tree)
(cond
((null? tree) ())
((pair? tree) (append (flatten (car tree)) (flatten (cdr tree))))
(t (list tree)))))
(uninstall-syntax!)
|
764a1be45b925f505cbdbb0752f4bdd401182162fca0976e6b01539447fa1b67 | garrigue/lablgtk | gEdit.ml | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
and/or ... | null | https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/src/gEdit.ml | ocaml | ************************************************************************
Lablgtk
This program is free software; you can redistribute it
comes with the library. ... | and/or modify it under the terms of the GNU Library General
Public License as published by the Free Software Foundation
version 2 , with the exception described in file COPYING which
GNU Library General Public License for more details .
You should have r... |
b2d9b1d7a7d4bd3406fa7b9e8e142228e701ef675ae94d7a2272634bd243ee5c | lichenscript/lichenscript | utils.ml | open Core_kernel
open Js_of_ocaml
open Lichenscript_parsing
let parse_error_to_diagnostic err =
let err_content = Format.asprintf "%a" Lichenscript_parsing.Parse_error.PP.error err in
Js_helper.mk_diagnostic ~loc:err.perr_loc Js_helper.Error err_content
let parse_errors_to_js_array (raw_errors: Parse_error.t list... | null | https://raw.githubusercontent.com/lichenscript/lichenscript/67ec4dd882412d5c6a11c577fc77efa84c520452/web/utils.ml | ocaml | open Core_kernel
open Js_of_ocaml
open Lichenscript_parsing
let parse_error_to_diagnostic err =
let err_content = Format.asprintf "%a" Lichenscript_parsing.Parse_error.PP.error err in
Js_helper.mk_diagnostic ~loc:err.perr_loc Js_helper.Error err_content
let parse_errors_to_js_array (raw_errors: Parse_error.t list... | |
425a7e9a1c4c0ef747a22def8d13d97d2561cef7967a742dcdf6f5a12bfc9fae | dgiot/dgiot | dgiot_parse_hook.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy... | null | https://raw.githubusercontent.com/dgiot/dgiot/4305eaa059d6bb63fadd5526d3c4cc8cf76a3239/apps/dgiot_parse/src/dgiot_parse_hook.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(dgiot_parse_hook).
-author("kenneth").
-include("dgiot_parse.hrl").
-include_lib("dgio... |
9bd93caec93b67725f3b022d10a6a9dbf9f0bbe42041319a69ef55df485622d8 | mfoemmel/erlang-otp | pman_process.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1997 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/pman/src/pman_process.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1997 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
Purpose : A front - end to the : ( ) fu... |
0b2b908f760b70acde24c292153dd282349f86c1eb8d652db09a96295fec5342 | arttuka/reagent-material-ui | tab_context.cljs | (ns reagent-mui.lab.tab-context
"Imports @mui/lab/TabContext as a Reagent component.
Original documentation is at -ui/api/tab-context/ ."
(:require [reagent.core :as r]
["@mui/lab/TabContext" :as MuiTabContext]))
(def tab-context (r/adapt-react-class (.-default MuiTabContext)))
| null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/lab/tab_context.cljs | clojure | (ns reagent-mui.lab.tab-context
"Imports @mui/lab/TabContext as a Reagent component.
Original documentation is at -ui/api/tab-context/ ."
(:require [reagent.core :as r]
["@mui/lab/TabContext" :as MuiTabContext]))
(def tab-context (r/adapt-react-class (.-default MuiTabContext)))
| |
2a4fee0d5b2712b160b0c25c5971779e2aca075bb9f8ef4537630503a842291f | bluelisp/hemlock | struct-ed.lisp | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
#+CMU (ext:file-comment
"$Header: /home/david/ph... | null | https://raw.githubusercontent.com/bluelisp/hemlock/47e16ba731a0cf4ffd7fb2110e17c764ae757170/unused/struct-ed.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
**********************************************************************
**********************************************************************
The server-info structure holds information about the connection to a
particular eval server. For now, we don't separate the ... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
#+CMU (ext:file-comment
"$Header: /home/david/phemlock/cvsroot/phemlock/unused/struct-ed.lisp,v 1.1 2004-07-09 13:39:14 gbaumann Exp $")
Structures used by constucts in the HEM... |
5995962f156ccc913e7dafbaf877c17146fa2d8c021a179a374e834f17788ed1 | chetmurthy/pa_ppx | uncaught_exn.ml |
let%expect_test "Expectation with uncaught expectation" =
Printexc.record_backtrace false;
ignore (assert false);
[%expect.unreachable]
[@@expect.uncaught_exn {|
"Assert_failure uncaught_exn.ml:10:9" |}]
;;
| null | https://raw.githubusercontent.com/chetmurthy/pa_ppx/7c662fcf4897c978ae8a5ea230af0e8b2fa5858b/tests-inline/uncaught_exn.ml | ocaml |
let%expect_test "Expectation with uncaught expectation" =
Printexc.record_backtrace false;
ignore (assert false);
[%expect.unreachable]
[@@expect.uncaught_exn {|
"Assert_failure uncaught_exn.ml:10:9" |}]
;;
| |
9764f3b6b228da530bc19433299f24e47e0fe7231c5f4c0d26c046fdeada9353 | sshirokov/CLSQL | foreign-resources.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
This file is part of CLSQL .
;;;;
CLSQL users are granted the rights to distribute and use this software
as governed by the terms of the Li... | null | https://raw.githubusercontent.com/sshirokov/CLSQL/c680432aea0177677ae2ee7b810a7404f7a05cab/db-db2/foreign-resources.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
*************************************************************************
FILE IDENTIFICATION
(), also known as the LLGPL.
************************************************************************* | This file is part of CLSQL .
CLSQL users are granted the rights to distribute and use this software
as governed by the terms of the Lisp Lesser GNU Public License
(in-package #:clsql-db2)
(defparameter *foreign-resource-hash* (make-hash-table :test #'equal))
(defstruct (foreign-resource)
(type (error "Missin... |
914b5316b7c2fa34dcc234e035d0cc47ac2f8277506740ce3970ccca701ca047 | replikativ/datahike | java_bindings_test.clj | (ns datahike.test.java-bindings-test
(:require
[clojure.test :refer [is deftest]]))
(deftest test-java-bindings
(is (datahike.java.DatahikeTest/run)))
| null | https://raw.githubusercontent.com/replikativ/datahike/408cb0f538a837267e44b098df895fa00348fe10/test/datahike/test/java_bindings_test.clj | clojure | (ns datahike.test.java-bindings-test
(:require
[clojure.test :refer [is deftest]]))
(deftest test-java-bindings
(is (datahike.java.DatahikeTest/run)))
| |
37bee42067cb330f89f6e78075d32cb9902fb402f3f785b415eaab6c0ed8b291 | septract/jstar-old | support_syntax.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This file is part of jStar
src / parsing / support_syntax.ml
Release
$ Release$
Version
$ Rev$
$ Copyright$
jStar is distributed under a BSD license , s... | null | https://raw.githubusercontent.com/septract/jstar-old/c3b4fc6c1efc098efcdb864edbf0c666130f5fe5/src/parsing/support_syntax.ml | ocaml | ddino: many other cases should be filled in
constant name for "this" object | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This file is part of jStar
src / parsing / support_syntax.ml
Release
$ Release$
Version
$ Rev$
$ Copyright$
jStar is distributed under a BSD license , s... |
facc8efe0a5af68f8fd0b0b2e21b73363897f7b38f82382c9424efe065b6314c | alesaccoia/festival_flinger | ogi_flinger.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<--OHSU-->;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
Oregon Health & Science University ; ;
Division of Biomedical Computer Science ; ;
... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/ogi/ogi_flinger.scm | scheme | <--OHSU-->;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;
;
;
;
;
;;
;
release of the Festival TTS system. ;;
... |
(require 'ogi/ogi_kddurtreeZ_wb)
(defvar sing_hooks (list utt.synth utt.play)
"sing_hooks
Function or list of functions to be called during synthesis.
The function Flinger.sing (src in C++) applies this hook to the utterance.
This typically contains the utt.synth function and utt.play.")
(defvar lyrictoken_to_... |
9ac2010851cbc9c837e96bbcfa2ccd2385c6f2a01311fd42bca5787d0daa4baa | Elzair/nazghul | abe.scm | ;;----------------------------------------------------------------------------
;; Constants
;;----------------------------------------------------------------------------
(define abe-lvl 3)
(define abe-species sp_human)
(define abe-occ nil)
;;----------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/abe.scm | scheme | ----------------------------------------------------------------------------
Constants
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Schedule
------------------------------------------------------------------... | (define abe-lvl 3)
(define abe-species sp_human)
(define abe-occ nil)
In Green Tower
(define abe-bed gt-abe-bed)
(define abe-mealplace gt-ws-tbl2)
(define abe-workplace gt-ruins)
(define abe-leisureplace gt-ws-hall)
(kern-mk-sched 'sch_abe
(list 0 0 abe-bed "sleeping")
(list 7... |
b9e56c263c8915bcdc5402d8f9bff8deb989cc90cf6465a0182d0663f3b2ebc4 | rtoy/ansi-cl-tests | eval-when.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Apr 6 17:00:30 2003
Contains : Tests for EVAL - WHEN
The following test was suggested by ,
;;; so I've created this file to hold it.
(in-package :cl-test)
(defvar *eval-when.1-collector*)
(deftest eval-when.1
(let ((forms nil) all (ff "generated-e... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/eval-when.lsp | lisp | -*- Mode: Lisp -*-
so I've created this file to hold it. | Author :
Created : Sun Apr 6 17:00:30 2003
Contains : Tests for EVAL - WHEN
The following test was suggested by ,
(in-package :cl-test)
(defvar *eval-when.1-collector*)
(deftest eval-when.1
(let ((forms nil) all (ff "generated-eval-when-test-file.lisp"))
(dolist (c '(nil (:compile-toplevel... |
8c241858be9f9c1c1ac2073480ed7c49857df7239b1efbfdae908416a03e1f6c | soegaard/sketching | pointilism.rkt | #lang sketching
; -docs/blob/master/content/examples/Basics/Image/Pointillism/Pointillism.pde
; Pointillism.
Original Processing example by .
; Mouse horizontal location controls size of dots.
; Creates a simple pointillist effect using ellipses colored
; according to pixels in an image.
(define img (load-ima... | null | https://raw.githubusercontent.com/soegaard/sketching/94e114ac6e92ede3b85481df755b673be24b226e/sketching-doc/sketching-doc/manual-examples/basics/image/pointilism.rkt | racket | -docs/blob/master/content/examples/Basics/Image/Pointillism/Pointillism.pde
Pointillism.
Mouse horizontal location controls size of dots.
Creates a simple pointillist effect using ellipses colored
according to pixels in an image. | #lang sketching
Original Processing example by .
(define img (load-image "moonwalk.jpg"))
(define small-point 4)
(define large-point 40)
(define (setup)
(size 640 360)
(frame-rate 120)
(image-mode 'center)
(no-stroke)
(background 255))
(define (draw)
(define radius (remap mouse-x 0 width small-poin... |
a5aeb98e68f9126c63cb07196578c94c5c5b832f358028f5ab68d374317279dc | kupl/LearnML | original.ml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec check (e : lambda) : bool =
let rec checkp ((va : string), (ex : lambda)) : bool =
match ex with
| V va2 -> if va = va2 then true else false
| P (va2, ex2) -> (
match ex2 with
| C (ex3, ex4) ->... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub74/original.ml | ocaml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec check (e : lambda) : bool =
let rec checkp ((va : string), (ex : lambda)) : bool =
match ex with
| V va2 -> if va = va2 then true else false
| P (va2, ex2) -> (
match ex2 with
| C (ex3, ex4) ->... | |
355ee04c5cf34d4addd844a981cc7940cce1e1bd4d9313e8dd4d51d307002c15 | input-output-hk/plutus | Normal.hs | # LANGUAGE DuplicateRecordFields #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE RankNTypes #-}
-- | This module makes sure types are normalized inside programs.
module PlutusCore.Check.Normal
( checkProgram
, checkTerm
, isNormalType
, NormCheckError (..)
) where
import PlutusPrelud... | null | https://raw.githubusercontent.com/input-output-hk/plutus/1f31e640e8a258185db01fa899da63f9018c0e85/plutus-core/plutus-core/src/PlutusCore/Check/Normal.hs | haskell | # LANGUAGE RankNTypes #
| This module makes sure types are normalized inside programs.
| Ensure that all types in the 'Program' are normalized.
| Ensure that all types in the 'Term' are normalized.
See Note [PLC types and universes]. | # LANGUAGE DuplicateRecordFields #
# LANGUAGE OverloadedStrings #
module PlutusCore.Check.Normal
( checkProgram
, checkTerm
, isNormalType
, NormCheckError (..)
) where
import PlutusPrelude
import PlutusCore.Core
import PlutusCore.Error
import Control.Monad.Except
checkProgram
:: (AsNo... |
c64b7ae26c8af41bd94c287e06459e8022029354638ccd2bac7e8bcc1c0266b6 | xvw/preface | xml_stax_writer.ml | module Xml = struct
type xml =
| PCData of string
| Tag of string * xml
| Seq of xml * xml
| Empty
end
module Stax = struct
type token =
| Text of string
| Open of string
| Close of string
let pp ppf = function
| Text s -> Format.fprintf ppf "text %s" s
| Open s -> Format.fpr... | null | https://raw.githubusercontent.com/xvw/preface/89af07e80f2e7458a1381ec22aa85036b68e6e8a/test/preface_examples_test/xml_stax_writer.ml | ocaml | module Xml = struct
type xml =
| PCData of string
| Tag of string * xml
| Seq of xml * xml
| Empty
end
module Stax = struct
type token =
| Text of string
| Open of string
| Close of string
let pp ppf = function
| Text s -> Format.fprintf ppf "text %s" s
| Open s -> Format.fpr... | |
8227e2b94b9cacf6b7fd88cbc576551a039200fe7d05af021000402d5c78e0cc | restyled-io/restyled.io | AuthenticationSpec.hs | # OPTIONS_GHC -fno - warn - orphans #
module Restyled.AuthenticationSpec
( spec
) where
import Restyled.Test
import qualified Data.Text as T
import qualified Prelude as Unsafe
import Restyled.Authentication
import Restyled.Test.Graphula
import Restyled.Yesod
instance Eq (AuthenticationResult App) where
... | null | https://raw.githubusercontent.com/restyled-io/restyled.io/e3208b62dfea0916b9760cf8dd73abc7c5f080bb/test/Restyled/AuthenticationSpec.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Restyled.AuthenticationSpec
( spec
) where
import Restyled.Test
import qualified Data.Text as T
import qualified Prelude as Unsafe
import Restyled.Authentication
import Restyled.Test.Graphula
import Restyled.Yesod
instance Eq (AuthenticationResult App) where
... | |
64c4e93958b4d8f8736bb7d1eb3cd5f6ecd14b5aca6e1d248ac48e3292a8ad1a | haskell-mafia/mafia | Dependencies.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Test.Mafia.Cabal.Dependencies where
import Test.Mafia.Tripping (tripping)
import Mafia.Cabal.Dependencies
import Mafia.Cabal.Types
import Mafia.P
import System.IO (... | null | https://raw.githubusercontent.com/haskell-mafia/mafia/529440246ee571bf1473615e6218f52cd1e990ae/test/Test/Mafia/Cabal/Dependencies.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
module Test.Mafia.Cabal.Dependencies where
import Test.Mafia.Tripping (tripping)
import Mafia.Cabal.Dependencies
import Mafia.Cabal.Types
import Mafia.P
import System.IO (IO)
import Test.Mafia.Ar... |
006e49cf20b47ffc52b06f3bd2b876567a7d0ed402aece9fe36146d96b86521d | ruhler/smten | y2tests.hs |
# LANGUAGE NoImplicitPrelude #
import Smten.Compiled.Smten.Tests.Yices2
| null | https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-lib/y2tests.hs | haskell |
# LANGUAGE NoImplicitPrelude #
import Smten.Compiled.Smten.Tests.Yices2
| |
676a8efe3bfbabc877ed8654d55ec5567fbf59dbe1eb428bbebbed53f30772c6 | craigfe/ocaml-partial-functions-perf | main.ml | let ( = ) = Int.equal
external id : 'a -> 'a = "%identity"
module Container = struct
type 'a t = int * 'a
let find_opt (k, v) k' = if k = k' then Some v else None
let find_exn =
let exn = Invalid_argument "find_exn'" in
fun (k, v) k' -> if k = k' then v else raise exn
let find_and_call (k, v) k' ~s... | null | https://raw.githubusercontent.com/craigfe/ocaml-partial-functions-perf/f72de8ddb9dbb110821368665627d0ac791a556b/main.ml | ocaml | let ( = ) = Int.equal
external id : 'a -> 'a = "%identity"
module Container = struct
type 'a t = int * 'a
let find_opt (k, v) k' = if k = k' then Some v else None
let find_exn =
let exn = Invalid_argument "find_exn'" in
fun (k, v) k' -> if k = k' then v else raise exn
let find_and_call (k, v) k' ~s... | |
2578ba1ddeda89aff2336e73a18c6615ce484cb5a7486bd565175c09bd05c51f | psholtz/MIT-SICP | exercise2-53.scm | ;;
Exercise 2.53
;;
;; What would the interpreter print in response to evaluating each of the following expressions:
;;
(list 'a 'b 'c)
;; ==> (a b c)
(list (list 'george))
;; ==> ((george))
(cdr '((x1 x2) (y1 y2)))
;; ==> ((y1 y2))
(cadr '((x1 x2) (y1 y2)))
;; ==> (y1 y2)
(pair? (car '(a short list)))
;; ==> #f... | null | https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-2.3/mit-scheme/exercise2-53.scm | scheme |
What would the interpreter print in response to evaluating each of the following expressions:
==> (a b c)
==> ((george))
==> ((y1 y2))
==> (y1 y2)
==> #f
==> #f
==> (red shoes blue socks) | Exercise 2.53
(list 'a 'b 'c)
(list (list 'george))
(cdr '((x1 x2) (y1 y2)))
(cadr '((x1 x2) (y1 y2)))
(pair? (car '(a short list)))
(memq 'red '((red shoes) (blue socks)))
(memq 'red '(red shoes blue socks)) |
b046ef2af89633762d08081b79591643f4d7e73019dcbab522a1654d1732c4e3 | OCamlPro/ocp-build | terminfo.ml | (**************************************************************************)
(* *)
(* Typerex Tools *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-pp/compat/4.00.0/terminfo.ml | ocaml | ************************************************************************
Typerex Tools
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU General Public License version 3 described in the file
$ I d : terminfo.ml 11156 2011 - 07 - 27 14:17:02Z doligez $
Basic interface to the terminfo database
type status =
| Uninitialised
| Bad_term
| Good_term of... |
20ce7d60452274620983fdc41f66b623ed918dbb656449789f6a859518e600f9 | janestreet/async_ssl | ffi_stubgen.ml | module Ffi_bindings = Async_ssl_bindings.Ffi_bindings
let prefix = "async_ssl_stub"
let prologue =
"\n\
#include <openssl/ssl.h>\n\
#include <openssl/err.h>\n\
#include <openssl/conf.h>\n\n\
#include \"../bindings/openssl_helpers.h\"\n"
;;
let () =
let generate_ml, generate_c = ref false, ref false i... | null | https://raw.githubusercontent.com/janestreet/async_ssl/9989be181891515d6e1a1c8878d543b0c4614056/stubgen/ffi_stubgen.ml | ocaml | module Ffi_bindings = Async_ssl_bindings.Ffi_bindings
let prefix = "async_ssl_stub"
let prologue =
"\n\
#include <openssl/ssl.h>\n\
#include <openssl/err.h>\n\
#include <openssl/conf.h>\n\n\
#include \"../bindings/openssl_helpers.h\"\n"
;;
let () =
let generate_ml, generate_c = ref false, ref false i... | |
d17e05e0d57d57c999f7ab175f811daa2fe7b57f08ae1ee48c55f6823bb8c370 | GillianPlatform/Gillian | logging_constants.ml | * @canonical . Logging . Logging_constants
(** Allowed strings for the [type_] field of a report *)
module Content_type = struct
let debug = "debug"
let phase = "phase"
let proc_init = "proc_init"
let cmd = "cmd"
let cmd_result = "cmd_result"
let cmd_step = "cmd_step" (* TODO: Remove *)
let unify = "uni... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/e649de29d6eb34e78b89d453ae53061f3b9cb40f/GillianCore/logging/logging_constants.ml | ocaml | * Allowed strings for the [type_] field of a report
TODO: Remove | * @canonical . Logging . Logging_constants
module Content_type = struct
let debug = "debug"
let phase = "phase"
let proc_init = "proc_init"
let cmd = "cmd"
let cmd_result = "cmd_result"
let unify = "unify"
let unify_case = "unify_case"
let unify_result = "unify_result"
let assertion = "assertion"
... |
76c5bee038eba29bbdf080d77d725575e014ca0013e6caffdbd0e7c9221565d5 | gsakkas/rite | 3350.ml |
let rec clone x n = if n > 0 then x :: (clone x (n - 1)) else [];;
let padZero l1 l2 =
if (List.length l1) < (List.length l2)
then ((List.append (clone 0 ((List.length l2) - (List.length l1))) l1), l2)
else (l1, (List.append (clone 0 ((List.length l1) - (List.length l2))) l2));;
let rec removeZero l =
match ... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/3350.ml | ocaml |
let rec clone x n = if n > 0 then x :: (clone x (n - 1)) else [];;
let padZero l1 l2 =
if (List.length l1) < (List.length l2)
then ((List.append (clone 0 ((List.length l2) - (List.length l1))) l1), l2)
else (l1, (List.append (clone 0 ((List.length l1) - (List.length l2))) l2));;
let rec removeZero l =
match ... | |
b7dc44c7605b564e203750bfdcfe5874c409743bfca432dae910335cec8298e1 | metabase/metabase | field_values.clj | (ns metabase-enterprise.sandbox.models.params.field-values
(:require
[metabase-enterprise.sandbox.api.table :as table]
[metabase-enterprise.sandbox.models.group-table-access-policy :refer [GroupTableAccessPolicy]]
[metabase-enterprise.sandbox.query-processor.middleware.row-level-restrictions :as row-level-re... | null | https://raw.githubusercontent.com/metabase/metabase/5dfccada15d39b156fcab631791700857ff17f69/enterprise/backend/src/metabase_enterprise/sandbox/models/params/field_values.clj | clojure | slight optimization: for the `field-id->field-values` version we can batched hydrate `:table` to avoid having to
make a bunch of calls to fetch Table. For `get-or-create-field-values` we don't hydrate `:table` so we can fall
back to fetching it manually with `field/table`
see docs in [[metabase.models.permissions]]... | (ns metabase-enterprise.sandbox.models.params.field-values
(:require
[metabase-enterprise.sandbox.api.table :as table]
[metabase-enterprise.sandbox.models.group-table-access-policy :refer [GroupTableAccessPolicy]]
[metabase-enterprise.sandbox.query-processor.middleware.row-level-restrictions :as row-level-re... |
207a30cdf7021a945bf477571d73879bfba2b0beb3112672a9262f7a79b7bb5c | cyga/real-world-haskell | hj1.hs | -- file: ch19/hj1.hs
import Control.OldException
catchIt :: Exception -> Maybe ()
catchIt (ArithException DivideByZero) = Just ()
catchIt _ = Nothing
handler :: () -> IO ()
handler _ = putStrLn "Caught error: divide by zero"
safePrint :: Integer -> IO ()
safePrint x = handleJust catchIt handler (print x)
| null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch19/hj1.hs | haskell | file: ch19/hj1.hs | import Control.OldException
catchIt :: Exception -> Maybe ()
catchIt (ArithException DivideByZero) = Just ()
catchIt _ = Nothing
handler :: () -> IO ()
handler _ = putStrLn "Caught error: divide by zero"
safePrint :: Integer -> IO ()
safePrint x = handleJust catchIt handler (print x)
|
3c719228d7653f642a3673fe633fa50aefcd564a2a170208232d5a5247d993ac | monadbobo/ocaml-core | sys_utils.mli | open Core.Std
(** Various system utility functions. *)
(** Get the default editor (program) for this user.
This functions checks the EDITOR and VISUAL environment variables and then
looks into a hard coded list of editors.
*)
val get_editor : unit -> string option
val get_editor_exn : unit -> string
(** Ana... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib/sys_utils.mli | ocaml | * Various system utility functions.
* Get the default editor (program) for this user.
This functions checks the EDITOR and VISUAL environment variables and then
looks into a hard coded list of editors.
* Analogous to [get_editor], defaulting to a list including less and more.
*
[checked_edit ~check file]
... | open Core.Std
val get_editor : unit -> string option
val get_editor_exn : unit -> string
val get_pager : unit -> string option
* [ page_contents ? pager ? ] will show str in a pager . The optional
[ tmp_name ] parameter gives the temporary file prefix . The temporary file is removed
after running .
... |
549b41cf80706bfc54f7966860487ada75d81833f6b68adf68648936e39310a2 | apibot-org/apibot | handler.clj | (ns apibot.handler
(:require
[apibot.env :refer [defaults]]
[apibot.layout :refer [error-page]]
[apibot.middleware :as middleware]
[apibot.routes.executions :refer [api-executions]]
[apibot.routes.graphs :refer [api-graphs]]
[apibot.routes.projects :refer [api-projects]]
[apibot.routes.use... | null | https://raw.githubusercontent.com/apibot-org/apibot/26c77c688980549a8deceeeb39f01108be016435/src/clj/apibot/handler.clj | clojure | (ns apibot.handler
(:require
[apibot.env :refer [defaults]]
[apibot.layout :refer [error-page]]
[apibot.middleware :as middleware]
[apibot.routes.executions :refer [api-executions]]
[apibot.routes.graphs :refer [api-graphs]]
[apibot.routes.projects :refer [api-projects]]
[apibot.routes.use... | |
5c9a92e8f364f7598997233bfa0dde195139e849498bfd37935056c1235fb9ed | ZHaskell/z-data | Base.hs | |
Module : Z.Data . JSON.Base
Description : Fast JSON serialization / deserialization
Copyright : ( c ) , 2019
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
This module provides ' Converter ' to convert ' Value ' to haskell data types , and vario... | null | https://raw.githubusercontent.com/ZHaskell/z-data/5060f8a6796944eb86f37592cf136d8e9b10b5ec/Z/Data/JSON/Base.hs | haskell | * JSON Class
* Encode & Decode
* parse into JSON Value
* Generic functions
* Helper for manually writing instance.
------------------------------------------------------------------------------
| Type class for encode & decode JSON.
------------------------------------------------------------------------------
... | |
Module : Z.Data . JSON.Base
Description : Fast JSON serialization / deserialization
Copyright : ( c ) , 2019
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
This module provides ' Converter ' to convert ' Value ' to haskell data types , and vario... |
98c0c9123cab9f0810e6a5e85601c3ac2ccc8f7f2d485d1b7040fb0e362173f6 | dyoo/whalesong | testing.rkt | #lang planet dyoo/whalesong
(provide test test-values Section record-error arity-test err/rt-test disable
exn:application:mismatch? exn:application:type? exn:application:arity?
report-errs type? arity?)
(require (for-syntax racket/base))
(define number-of-tests 0)
(define number-of-error-tests 0)
(defi... | null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/tests/older-tests/mz-tests/testing.rkt | racket | (flush-output p))
(flush-output)
(make-keyword-procedure test/kw test)))
(void)
Just check that all are consistent for now.
This should be improved.
err/rt-test currently a stub that doesn't do anything.
(define-syntax err/rt-test
(printf "took ~s milliseconds\n" (- (current-inexact-milliseconds) start-time))) | #lang planet dyoo/whalesong
(provide test test-values Section record-error arity-test err/rt-test disable
exn:application:mismatch? exn:application:type? exn:application:arity?
report-errs type? arity?)
(require (for-syntax racket/base))
(define number-of-tests 0)
(define number-of-error-tests 0)
(defi... |
cd0afeacb1e7218a0f64e108b6cecefd71c585141f2ae3ae3648e4b99a0781d5 | haskell/statistics | Orphanage.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - orphans #
-- |
-- Orphan instances for common data types
module Tests.Orphanage where
import Control.Applicative
import Statistics.Distribution.Beta (BetaDistribution, betaDistr)
import Statistics.Distribution.... | null | https://raw.githubusercontent.com/haskell/statistics/ae1483e1d59b10ae2eec16b194760fa024eb76b0/tests/Tests/Orphanage.hs | haskell | # LANGUAGE FlexibleContexts #
|
Orphan instances for common data types
--------------------------------------------------------------
Arbitrary instances for ditributions
--------------------------------------------------------------
can't choose sigma too big, otherwise goes outside of double-float limit | # LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - orphans #
module Tests.Orphanage where
import Control.Applicative
import Statistics.Distribution.Beta (BetaDistribution, betaDistr)
import Statistics.Distribution.Binomial (BinomialDistribution, binomial)
import Statistics.Distribution.Cauc... |
6797bb5f4e7004affcac6e9cac864c73c3dfe7b8a336c033adb0364640a90294 | acowley/concurrent-machines | Scatter.hs | # LANGUAGE FlexibleContexts , GADTs , TupleSections , RankNTypes ,
ScopedTypeVariables #
ScopedTypeVariables #-}
-- | Routing for splitting and merging processing pipelines.
module Data.Machine.Concurrent.Scatter (
scatter, mergeSum, splitSum, splitProd
) where
import Control.Arrow ((***... | null | https://raw.githubusercontent.com/acowley/concurrent-machines/6504e0abc2bc3edc0d519d947c997ffa8a7a1fd9/src/Data/Machine/Concurrent/Scatter.hs | haskell | | Routing for splitting and merging processing pipelines.
| Produces values from whichever source 'MachineT' yields
first. This operation may also be viewed as a /gather/ operation in
that all values produced by the given machines are interleaved when
machine will await an input when any constituent machine awaits... | # LANGUAGE FlexibleContexts , GADTs , TupleSections , RankNTypes ,
ScopedTypeVariables #
ScopedTypeVariables #-}
module Data.Machine.Concurrent.Scatter (
scatter, mergeSum, splitSum, splitProd
) where
import Control.Arrow ((***))
import Control.Concurrent.Async (Async, waitAny)
import Co... |
65ae743a285ff8c75c1d4d1661abebdef6caa5f6c0a0d646ebcb0986ee4d41ce | ret/specifica | Test.hs | import Language.TLAPlus.Eval(evalENoFail, evalSpecNoFail)
import Language.TLAPlus.Quasiquote(tla_v, tla_e, tla_s)
import Test.Tasty (defaultMain, TestTree, testGroup)
import Test.Tasty.HUnit
main = defaultMain tests
tests = testGroup "All" [
testGroup "Basic" [setTests, op... | null | https://raw.githubusercontent.com/ret/specifica/72f077cfd23f61f3fbd641cc7a6e7e02b516a441/tlaplus-tests/tests/Test.hs | haskell | --
--
--
--
--
--
--
--
--
--
--
--
--
--
dummy, this is only about parsing the spec body
helpers | import Language.TLAPlus.Eval(evalENoFail, evalSpecNoFail)
import Language.TLAPlus.Quasiquote(tla_v, tla_e, tla_s)
import Test.Tasty (defaultMain, TestTree, testGroup)
import Test.Tasty.HUnit
main = defaultMain tests
tests = testGroup "All" [
testGroup "Basic" [setTests, op... |
f345c7338905e69beeb7ad21f3493d06fd353fcca27e57b8294bea90e59ed851 | ragkousism/Guix-on-Hurd | mpd.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 , 2015 >
Copyright © 2014 < >
Copyright © 2014 < >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or m... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/mpd.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 © 2014 , 2015 >
Copyright © 2014 < >
Copyright © 2014 < >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2016 < >
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 . ... |
7d85d56d7ec83c6e477af18368c946fb71f0aec12b0436ea079795b41102a970 | MaartenFaddegon/Hoed | HeadOnEmpty.hs | import Debug.Hoed
main = printO x
x :: Int
x = observe "f" ({-# SCC "f" #-} h head xs)
xs :: [Int]
xs = observe "xs" ({-# SCC "xs" #-} [])
h :: ([Int] -> Int) -> [Int] -> Int
h = observe "h" (\a' is' -> {-# SCC "h" #-} a' is')
| null | https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/examples/HeadOnEmpty.hs | haskell | # SCC "f" #
# SCC "xs" #
# SCC "h" # | import Debug.Hoed
main = printO x
x :: Int
xs :: [Int]
h :: ([Int] -> Int) -> [Int] -> Int
|
b6c89c857b6f9b3133c21fee2085e1c85f06d8279bdbe7d0a582634ce91916ab | DavidAlphaFox/RabbitMQ | rabbit_amqp1_0_test.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-amqp1.0/test/src/rabbit_amqp1_0_test.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
| The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
a1b35e55e22dc6c96109f0c15fb288c1e56bb0970bc8933f0bbe8beba4b88668 | haskell/win32 | Utils.hs | |
Module : System . Win32.Utils
Copyright : 2009 Balazs Komuves , 2013 shelarcy
License : BSD - style
Maintainer :
Stability : Provisional
Portability : Non - portable ( Win32 API )
Utilities for calling Win32 API
Module : Syste... | null | https://raw.githubusercontent.com/haskell/win32/e6c0c0f44f6dfc2f8255fc4a5017f4ab67cd0242/System/Win32/Utils.hs | haskell | * Maybe values
* Format picture translation
| Support for API calls that are passed a fixed-size buffer and tell
you via the return value if the buffer was too small. In that
case, we extend the buffer size and try again.
# INLINE try #
| Support for API calls that return the required size, in characters
... | |
Module : System . Win32.Utils
Copyright : 2009 Balazs Komuves , 2013 shelarcy
License : BSD - style
Maintainer :
Stability : Provisional
Portability : Non - portable ( Win32 API )
Utilities for calling Win32 API
Module : Syste... |
3edb38586d3b85623d628f72980031ef156d13d45f934813d3ee54a7077b5e4e | SahilKang/cl-rdkafka | conditions.lisp | Copyright ( C ) 2018 - 2020 < >
;;;
;;; This file is part of cl-rdkafka.
;;;
;;; cl-rdkafka 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 l... | null | https://raw.githubusercontent.com/SahilKang/cl-rdkafka/4d0b6f7f9b102769cb91a020e4e192a2ea066e0b/src/high-level/conditions.lisp | lisp |
This file is part of cl-rdkafka.
cl-rdkafka is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-rdkafka 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 PURPOS... | Copyright ( C ) 2018 - 2020 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package #:cl-rdkafka)
(define-condition kafka-error (error)
((desc... |
abd4490afc9b087750e959e016ddf50e8994ba091fdfbf05bbd6a66eb97ff1ed | c-cube/trustee | logger.mli |
(** Log reporter *)
type t
val create : unit -> t
val as_reporter : t -> Logs.reporter
val log_to_chan : t -> out_channel -> unit
val setup_logs : ?files:string list -> debug:bool -> unit -> unit
(** Setup reporter and debug level for {!Logs} *)
val setup_trustee : unit -> unit
(** Installer logger as the main l... | null | https://raw.githubusercontent.com/c-cube/trustee/499cc5df22c3c261120ad9b72879797ddb5a081e/src/itp/logger.mli | ocaml | * Log reporter
* Setup reporter and debug level for {!Logs}
* Installer logger as the main logger for Trustee |
type t
val create : unit -> t
val as_reporter : t -> Logs.reporter
val log_to_chan : t -> out_channel -> unit
val setup_logs : ?files:string list -> debug:bool -> unit -> unit
val setup_trustee : unit -> unit
|
ee047e474c6092895e381cd0adb195d701a7a1e9c1038115b1748395cc733a3b | wdebeaum/DeepSemLex | tastable.lisp | ;;;;
;;;; W::tastable
;;;;
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(W::tastable
(wordfeats (W::morph (:FORMS (-LY))))
(SENSES
((meta-data :origin trips :entry-date 20090915 :change-date nil :comments nil)
(lf-parent ont::sensory-property-val) ;tasteful-val)
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/tastable.lisp | lisp |
W::tastable
tasteful-val) |
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(W::tastable
(wordfeats (W::morph (:FORMS (-LY))))
(SENSES
((meta-data :origin trips :entry-date 20090915 :change-date nil :comments nil)
)
)
)
))
|
6c7c167c67eb798ede6888b5672888dd162c76ed2ac5296c627931f8567937e4 | okuoku/nausicaa | test-email-addresses-data.sps | -*- coding : utf-8 - unix -*-
;;;
Part of : / Scheme
;;;Contents: tests for the email addresses data types
Date : Thu Jul 30 , 2009
;;;
;;;Abstract
;;;
;;;
;;;
Copyright ( c ) 2009 , 2010 , 2011 < >
;;;
;;;This program is free software: you can redistribute it and/or modify
;;;it under the terms of the GNU Gene... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/tests/test-email-addresses-data.sps | scheme |
Contents: tests for the email addresses data types
Abstract
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
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT AN... | -*- coding : utf-8 - unix -*-
Part of : / Scheme
Date : Thu Jul 30 , 2009
Copyright ( c ) 2009 , 2010 , 2011 < >
the Free Software Foundation , either version 3 of the License , or ( at
General Public License for more details .
You should have received a copy of the GNU General Public License
(import (... |
542f41386bf2b67ba46fe2a1e6eb4b7297ffb20a7fed31614969e469cf6fed3e | jship/monad-logger-aeson | MetadataNoThreadContextNo.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module TestCase.LogInfoN.MetadataNoThreadContextNo
( testCase
) where
import Control.Monad.Logger.Aeson (Loc(..), LogLevel(..), LoggedMessage(..), logInfoN)
import Data.Aeson.QQ.Simple (aesonQQ)
import Data.Time (UTCTime(..))
i... | null | https://raw.githubusercontent.com/jship/monad-logger-aeson/209a4f8cea11ac25721d5fe06783e4ce461c1d70/monad-logger-aeson/test-suite/TestCase/LogInfoN/MetadataNoThreadContextNo.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NamedFieldPuns #
# LANGUAGE QuasiQuotes #
module TestCase.LogInfoN.MetadataNoThreadContextNo
( testCase
) where
import Control.Monad.Logger.Aeson (Loc(..), LogLevel(..), LoggedMessage(..), logInfoN)
import Data.Aeson.QQ.Simple (aesonQQ)
import Data.Time (UTCTime(..))
import TestCase (TestCase(..))
impor... |
1839362ec3b4d3de4db20087a6d9e23b35406fcf55da8c4705d8d56edfa1b63b | modular-macros/ocaml-macros | pr7228.ml | type t = A of {mutable x: int};;
fun (A r) -> r.x <- 42;;
[%%expect{|
type t = A of { mutable x : int; }
- : t -> unit = <fun>
|}];;
(* Check that mutability is blocked for inline records on private types *)
type t = private A of {mutable x: int};;
fun (A r) -> r.x <- 42;;
[%%expect{|
type t = private A of { mutable x... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/typing-misc/pr7228.ml | ocaml | Check that mutability is blocked for inline records on private types | type t = A of {mutable x: int};;
fun (A r) -> r.x <- 42;;
[%%expect{|
type t = A of { mutable x : int; }
- : t -> unit = <fun>
|}];;
type t = private A of {mutable x: int};;
fun (A r) -> r.x <- 42;;
[%%expect{|
type t = private A of { mutable x : int; }
Line _, characters 15-16:
Error: Cannot assign field x of the pri... |
6652c5fe14a53fcd04dfe11d296a368a126b10b288d388b2826b25d5fbfff4d3 | janestreet/memtrace_viewer | range.ml | open! Core
open Range_intf
module Bound = struct
type 'a t =
| No_bound
| Open of 'a
| Closed of 'a
[@@deriving sexp, bin_io, equal, quickcheck]
end
type 'a t =
{ lower_bound : 'a Bound.t
; upper_bound : 'a Bound.t
}
module Or_empty = struct
type nonrec 'a t =
| Non_empty of 'a t
| Em... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer/280d57dd520ed755497169e46b5fd0b11401d482/common/range.ml | ocaml | open! Core
open Range_intf
module Bound = struct
type 'a t =
| No_bound
| Open of 'a
| Closed of 'a
[@@deriving sexp, bin_io, equal, quickcheck]
end
type 'a t =
{ lower_bound : 'a Bound.t
; upper_bound : 'a Bound.t
}
module Or_empty = struct
type nonrec 'a t =
| Non_empty of 'a t
| Em... | |
1a0232ffdcedd54399d9c3ce8fa0cd822e27e790b730f47051800e5735f66f51 | Vigilans/hscc | Analysis.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
For MonadState s ( IRBuilderT m ) instance
# LANGUAGE DefaultSignatures #
{-# LANGUAGE GADTs #-}
module Language.C.Semantic.Analysis where
import Language.C.Program
import Language.C.Syntax
import Language.C.Sy... | null | https://raw.githubusercontent.com/Vigilans/hscc/d612c54f9263d90fb01673aea1820a62fdf62551/src/Language/C/Semantic/Analysis.hs | haskell | # LANGUAGE GADTs #
The order of current statement in current block
Analysis launcher
analyseExtDecl :: (Monad m) => ExternalDeclaration -> ProgramAnalysis a
Like rust, use the last expression as return value
Expression will analysed with a type
a = analyseStatement (_ :: StatementF a -> ProgramAnalysis a) | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
For MonadState s ( IRBuilderT m ) instance
# LANGUAGE DefaultSignatures #
module Language.C.Semantic.Analysis where
import Language.C.Program
import Language.C.Syntax
import Language.C.Syntax.Utils (bool, int)
... |
fb631c9f37c7b500466f028ce792d9ada757dbac93b3a95fb6a4458a5dfe16b5 | jepsen-io/maelstrom | multi_key_txn.clj | #!/usr/bin/env bb
(deps/add-deps
'{:deps {slingshot/slingshot {:mvn/version "0.12.2"}}})
(ns maelstrom.demo.txn
"A little more complex list-append transactional service backed by a single
record in lin-kv, which points to immutable thunks stored in lww-kv."
(:require [cheshire.core :as json]
[slin... | null | https://raw.githubusercontent.com/jepsen-io/maelstrom/317de2c3b758af954d991d7cabcb01d9c31e5b7f/demo/clojure/multi_key_txn.clj | clojure | Send these back to the client as error messages
And send a general-purpose error message back to the client
Txn workload stuff
Not found
Key doesn't have a value; no need to load
Ah, good, we have this cached
When it arrives, cache it
Fire off saves in parallel
Cache as a side effect
Block for those saves, ca... | #!/usr/bin/env bb
(deps/add-deps
'{:deps {slingshot/slingshot {:mvn/version "0.12.2"}}})
(ns maelstrom.demo.txn
"A little more complex list-append transactional service backed by a single
record in lin-kv, which points to immutable thunks stored in lww-kv."
(:require [cheshire.core :as json]
[slin... |
7ebdf9d963a7e83662a59e8a773ff7bf84af939d00ded81f17d34291e3f17868 | ixy-languages/ixy.ml | ixy_pci.mli | open Ixy_memory
type hw =
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
(** Type of register files (also called [hw] in the linux ixgbe driver). *)
type pci_config =
{ vendor : int
; device_id : int
; class_code : int
; subclass : int
; prog_if : int
}
(** Type of the PCIe conf... | null | https://raw.githubusercontent.com/ixy-languages/ixy.ml/e79dcc4a19afd8e531346c27624c54224f942dc9/lib/ixy_pci.mli | ocaml | * Type of register files (also called [hw] in the linux ixgbe driver).
* Type of the PCIe configuration space.
* Type of PCIe devices.
* [map_resource t] maps [t]'s register file.
* [get_config t] returns the PCIe configuration space for [t].
* [pkt_buf_alloc mempool] attempts to allocate a single packet buffer in... | open Ixy_memory
type hw =
(char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
type pci_config =
{ vendor : int
; device_id : int
; class_code : int
; subclass : int
; prog_if : int
}
val vendor_intel : int
* Intel 's vendor ID ( [ 0x8086 ] in little endian ) .
module type S = sig
... |
9cd7c15fb23aa0fc7e82d375552dc199cb69963c90e7e6898e1d12958e0d29c1 | mishadoff/evolville | movement.clj | (ns evolville.movement
(:require [evolville.world :as w]
[evolville.math :as m]))
(defn- overflow-x [world x]
(cond (> x (w/width world)) (overflow-x world (- x (w/width world)))
(< x 0) (overflow-x world (+ x (w/width world)))
:else x))
(defn- overflow-y [world y]
(cond (> y (w/heig... | null | https://raw.githubusercontent.com/mishadoff/evolville/f37e7478ae6373a3b431741bd1ecaac42ea5d9f0/src/evolville/movement.clj | clojure | (ns evolville.movement
(:require [evolville.world :as w]
[evolville.math :as m]))
(defn- overflow-x [world x]
(cond (> x (w/width world)) (overflow-x world (- x (w/width world)))
(< x 0) (overflow-x world (+ x (w/width world)))
:else x))
(defn- overflow-y [world y]
(cond (> y (w/heig... | |
e30c57ad06eed2cd4aed2cebf8ef28c9d5be4e94f320df30ff50a11cb4cf7791 | restyled-io/restyler | Interpreter.hs | module Restyler.Config.Interpreter
( Interpreter(..)
, readInterpreter
) where
import Restyler.Prelude
import Data.Aeson
import qualified Data.List.NonEmpty as NE
import qualified Data.Text as T
import System.FilePath (takeFileName)
data Interpreter
= Sh
| Bash
| Python
| Ruby
derivin... | null | https://raw.githubusercontent.com/restyled-io/restyler/3da7d1cb62ec078c03794d4a2c5fbeb5c26fd005/src/Restyler/Config/Interpreter.hs | haskell | N.B. this may not always work, but it works for now | module Restyler.Config.Interpreter
( Interpreter(..)
, readInterpreter
) where
import Restyler.Prelude
import Data.Aeson
import qualified Data.List.NonEmpty as NE
import qualified Data.Text as T
import System.FilePath (takeFileName)
data Interpreter
= Sh
| Bash
| Python
| Ruby
derivin... |
c97771eb6dfcebc3ffb2fb6c4231a9eeece81d9dab4ccd4dc382c3b4b274db38 | takikawa/racket-ppa | info.rkt | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("errortrace-lib" "errortrace-doc"))) (define implies (quote ("errortrace-lib" "errortrace-doc"))) (define pkg-desc "Instrumentation tools for debugging") (define pkg-authors (quote (mflatt robby florence))) (define version... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/26d6ae74a1b19258c9789b7c14c074d867a4b56b/share/pkgs/errortrace/info.rkt | racket | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("errortrace-lib" "errortrace-doc"))) (define implies (quote ("errortrace-lib" "errortrace-doc"))) (define pkg-desc "Instrumentation tools for debugging") (define pkg-authors (quote (mflatt robby florence))) (define version... | |
7ad1470c7900791f9e52a62818b8e8fa614772fa4d02fc2d9da6e2e77a5b7095 | oofp/Beseder | Console.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies ... | null | https://raw.githubusercontent.com/oofp/Beseder/a0f5c5e3138938b6fa18811d646535ee6df1a4f4/src/Beseder/Resources/Comm/Impl/Console.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeSynonymInstances # | # LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE PartialTypeSignatures #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE RecordWildCards #
mo... |
6064aca49a243c8ad047155647c2bf24fcf12ec817e3fe00549cc4d86db19f6e | NetComposer/nkservice | nkservice_callbacks.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2015 . All Rights Reserved .
%%
This file is provided to you 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... | null | https://raw.githubusercontent.com/NetComposer/nkservice/affbd5b9c914e2c8775dd45733a0b5c15d784e34/src/nkservice_callbacks.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2015 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(nkservice_callbacks)... |
b54ab7aa3d54cc012e29de1c120d290f7fb692801274ddb0f64a1044a3754ec0 | fogus/tathata | tathata.clj | Copyright ( c ) and . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound ... | null | https://raw.githubusercontent.com/fogus/tathata/b0d7c63cded76db8b4672f27d8616474464387f8/src/clj/fogus/kernel/tathata.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) and . All rights reserved .
(ns fogus.kernel.tathata
"This is the public API for Tathata. The API is designed to
present the smallest possible set of functions for dealing with
pods including:
- An operation to mutate an ephemeral object contained in a pod.
- An operation to fetc... |
b71d8c6dd2a54696d3f154fc224b5610ac2afd4ee99fb18b885eb035f571b77b | c4-project/c4f | io.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/utils/src/io.mli | ocaml | * Various input/output helpers, mostly used for testing.
* [print_bool b] prints the truth value of [b] to stdout.
* [prn pp x] prints [x] to stdout using [pp], followed by a hard newline. | 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... |
557a8d3f3373f3eb5132322198d002f7219234f90709b77310fb734f55d2a477 | motoshira/lib_for_competitive_programming | sqrt-tree.lisp | (defpackage sqrt-tree
(:use :cl)
(:nicknames :st)
(:export #:build
#:fold
#:update
#:range-update
#:dump))
(in-package #:st)
(defstruct (sqrt-tree (:conc-name st-)
(:constructor %make-st))
(main nil :type (simple-array fixnum (*)))
(op-acc ni... | null | https://raw.githubusercontent.com/motoshira/lib_for_competitive_programming/fedd775b69aaaab77c94f0db863dcf24e2c601e1/experimental/sqrt-tree.lisp | lisp | 初期値でなければ伝搬する
伝搬済みのはずなのでmainをみればOK | (defpackage sqrt-tree
(:use :cl)
(:nicknames :st)
(:export #:build
#:fold
#:update
#:range-update
#:dump))
(in-package #:st)
(defstruct (sqrt-tree (:conc-name st-)
(:constructor %make-st))
(main nil :type (simple-array fixnum (*)))
(op-acc ni... |
0e5c4ae6a2c92a328db422eb4363d4951aa3d0382c03595e1f6310d7d2845239 | reifyhealth/lein-git-down | foo.clj | (ns foo)
(defn bar
[x]
(println "Hello," x))
| null | https://raw.githubusercontent.com/reifyhealth/lein-git-down/1871690560ec501790356e0c50fcd681036802c3/test-project/src/foo.clj | clojure | (ns foo)
(defn bar
[x]
(println "Hello," x))
| |
a54e315c282855f1809ddfa4a803e9a03a322f14f53d2d5a61b7787754c5aac8 | dgiot/dgiot | dgiot_tdengine_select.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy... | null | https://raw.githubusercontent.com/dgiot/dgiot/64c3c6ef3e99581ded7e676fcbe60c270f3b0a87/apps/dgiot_tdengine/src/utils/dgiot_tdengine_select.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(dgiot_tdengine_select).
-author("jonliu").
-include("dgiot_tdengine.hrl").
-include_li... |
0556340ed6e49ba5a92d929020a3108871824d9e1a5703ddd6fa8e0e1fba7800 | uxbox/uxbox-old | streams_test.cljs | (ns uxbox.test.streams-test
(:require [cljs.test :as t]
[cats.core :as m]
[uxbox.streams :as s]))
(enable-console-print!)
;; --- helpers for testing
(def no-op (fn [& args]))
(defmacro with-timeout
[ms & body]
`(js/setTimeout
(fn []
(do
~@body))
~ms))
(defn drain... | null | https://raw.githubusercontent.com/uxbox/uxbox-old/9c3c3c406a6c629717cfc40e3da2f96df3bdebf7/test/frontend/uxbox/test/streams_test.cljs | clojure | --- helpers for testing
---
event stream
- TODO: startWith
open valve
push values onto stream
close valve
push some more
reopen valve
end
push values onto stream
open switch
push some more
end
- bufferWithTime
- bufferWithCount
- bufferWithTimeOrCount
- toProperty
property
bus
- filter (pred, prope... | (ns uxbox.test.streams-test
(:require [cljs.test :as t]
[cats.core :as m]
[uxbox.streams :as s]))
(enable-console-print!)
(def no-op (fn [& args]))
(defmacro with-timeout
[ms & body]
`(js/setTimeout
(fn []
(do
~@body))
~ms))
(defn drain!
([obs cb]
(drain! ob... |
c876f3ea3033c508040d8e8b149d632fdcc674a583f7760febfdf8ccfef087d1 | ajtulloch/freelearning | CUDA.hs | module CUDA where
import Foreign.CUDA
import Foreign.CUDA.Cublas
import Foreign.CUDA.Driver.Device
x = do
h <- Foreign.CUDA.count
print h
initialise []
handle <- create
destroy handle
| null | https://raw.githubusercontent.com/ajtulloch/freelearning/b89d481735b6bf43f3bc90cea1985b4c6ff4fd8e/CUDA.hs | haskell | module CUDA where
import Foreign.CUDA
import Foreign.CUDA.Cublas
import Foreign.CUDA.Driver.Device
x = do
h <- Foreign.CUDA.count
print h
initialise []
handle <- create
destroy handle
| |
179a5ca033f80b84797dc25bab0ff8d1a63c3527d08135e481dfcb69d7e20135 | ygrek/mldonkey | commonClient.mli | type 'a client_impl = {
mutable impl_client_type : CommonTypes.client_type;
mutable impl_client_state : CommonTypes.host_state;
mutable impl_client_update : int;
mutable impl_client_slot : CommonTypes.slot_kind;
mutable impl_client_upload : CommonTypes.file option;
mutable impl_client_num : int;... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/daemon/common/commonClient.mli | ocaml | type 'a client_impl = {
mutable impl_client_type : CommonTypes.client_type;
mutable impl_client_state : CommonTypes.host_state;
mutable impl_client_update : int;
mutable impl_client_slot : CommonTypes.slot_kind;
mutable impl_client_upload : CommonTypes.file option;
mutable impl_client_num : int;... | |
fdbd4ffae86fc4572ec651026cc942ab1fe6369e16173609943f1832bb47bb4f | michaelmelanson/erlyweb | erlyweb_util.erl | %%
%% @doc This module contains a few utility functions useful
for ErlyWeb apps .
%%
@author < > [ ) ]
@copyright Yariv Sadan 2006 - 2007
For license information see LICENSE.txt
-module(erlyweb_util).
-author("Yariv Sadan (, ").
-export([log/5, create_app/2, create_component/3,
get_url_prefix/1,
get_... | null | https://raw.githubusercontent.com/michaelmelanson/erlyweb/997df18b70459bfaaf8c3ab70ab4f54907045d0f/src/erlyweb/erlyweb_util.erl | erlang |
@doc This module contains a few utility functions useful
@hidden
@hidden
\" align=\"right\">\n"
@hidden
Remove empty filenames from the list.
@doc Get the of the arg's appmoddata value up to the
first '?' symbol.
@doc Get the cookie's value from the arg.
@equiv yaws_api:find_cookie_val(Name, yaws_headers:c... | for ErlyWeb apps .
@author < > [ ) ]
@copyright Yariv Sadan 2006 - 2007
For license information see LICENSE.txt
-module(erlyweb_util).
-author("Yariv Sadan (, ").
-export([log/5, create_app/2, create_component/3,
get_url_prefix/1,
get_cookie/2, indexify/2]).
-define(Debug(Msg, Params), log(?MODULE, ... |
c8fd01095b8280cf3f4631ff37f28ea3d0522741b8a54b001ca83e2268b6440f | tjknoth/resyn | Pretty.hs | # LANGUAGE FlexibleInstances , UndecidableInstances , FlexibleContexts #
module Synquid.Pretty (
-- * Interface
Pretty (..),
Doc,
renderPretty,
putDoc,
-- * Basic documents
empty,
isEmpty,
text,
linebreak,
semi,
lbrace, rbrace,
-- * Combinators
option,
optionMaybe,
(<... | null | https://raw.githubusercontent.com/tjknoth/resyn/54ff304c635f26b4b498b82be267923a65e0662d/src/Synquid/Pretty.hs | haskell | * Interface
* Basic documents
* Combinators
* Enclosing
* Indentation
* Structures
* Programs
* Counting
* Syntax Highlighting
* Miscellaneous
| Is document empty?
| Separate by spaces
| Separate by new lines
| Separate by commas
| Enclose in spaces
| Conditionally enclose in parentheses
... | # LANGUAGE FlexibleInstances , UndecidableInstances , FlexibleContexts #
module Synquid.Pretty (
Pretty (..),
Doc,
renderPretty,
putDoc,
empty,
isEmpty,
text,
linebreak,
semi,
lbrace, rbrace,
option,
optionMaybe,
(<+>), ($+$), (<>), (</>),
hcat,
vcat,
hsep,
vsep,
... |
892346f2005c7e73ec3f8664fb194f7f704a7242076a3a7593ba0e6fc77a0501 | electric-sql/vaxine | append_SUITE.erl | %% -------------------------------------------------------------------
%%
Copyright < 2013 - 2018 > <
Technische Universität Kaiserslautern , Germany
, France
Universidade NOVA de Lisboa , Portugal
Université catholique de Louvain ( UCL ) , Belgique
, Portugal
%% >
%%
This file is provided... | null | https://raw.githubusercontent.com/electric-sql/vaxine/872a83ea8d4935a52c7b850bb17ab099ee9c346b/apps/antidote/test/multidc/append_SUITE.erl | erlang | -------------------------------------------------------------------
>
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either expressed or implied. See the License for the
specific language governing perm... | Copyright < 2013 - 2018 > <
Technische Universität Kaiserslautern , Germany
, France
Universidade NOVA de Lisboa , Portugal
Université catholique de Louvain ( UCL ) , Belgique
, Portugal
This file is provided to you under the Apache License ,
except in compliance with the License . You... |
81aa20c59d66656c0afafa38ddf9f996460933d3bc08c19b24977d4e653c811b | snowleopard/alga | Class.hs | -----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Class
Copyright : ( c ) 2016 - 2022
License : MIT ( see the file LICENSE )
-- Maintainer :
-- Stability : experimental
--
-- __Alga__ is a library for algebraic construction and manipulation of... | null | https://raw.githubusercontent.com/snowleopard/alga/399b5dc538a2496b67f9322dc7247e06a4ec326b/src/Algebra/Graph/Class.hs | haskell | ---------------------------------------------------------------------------
|
Module : Algebra.Graph.Class
Maintainer :
Stability : experimental
__Alga__ is a library for algebraic construction and manipulation of graphs
motivation behind the library, the underlying theory, and implementation details.
Th... | Copyright : ( c ) 2016 - 2022
License : MIT ( see the file LICENSE )
in Haskell . See < -paper this paper > for the
" Algebra . Graph . Graph " or " Algebra . Graph . AdjacencyMap " .
module Algebra.Graph.Class (
Graph (..),
* graphs
Undirected,
Reflexive,
Transitive,
Preorder... |
38b789facebdf37e1500a54d5a461c8a7ad6cb7ef9737451a4bada32c0b893ee | CryptoKami/cryptokami-core | APISpec.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module APISpec where
import Universum
import qualified ... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/wallet-new/test/APISpec.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
Instances to allow use of `servant-quickcheck`.
queries.
RESTful-abiding predicates
twice should return the same result.
| Checks that every request which is not a 204 No Content
does not have an empty body, but it always returns something.
... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module APISpec where
import Universum
import qualified Control.Concurrent.STM as STM
import Data.Default (def)
import ... |
0ddd945ba45c206d18574922644acfa8859276fb45dafd54a1682c2eab5e0f87 | footprintanalytics/footprint-web | persist_refresh.clj | (ns metabase.task.persist-refresh
(:require [clojure.string :as str]
[clojure.tools.logging :as log]
[clojurewerkz.quartzite.conversion :as qc]
[clojurewerkz.quartzite.jobs :as jobs]
[clojurewerkz.quartzite.schedule.cron :as cron]
[clojurewerkz.quartzite.tri... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/task/persist_refresh.clj | clojure | Since this could be long running, double check state just before refreshing
Since this could be long running, double check state just before deleting
prune job happens soon after setting state.
other errors?
ensure we clean up marked for deletion | (ns metabase.task.persist-refresh
(:require [clojure.string :as str]
[clojure.tools.logging :as log]
[clojurewerkz.quartzite.conversion :as qc]
[clojurewerkz.quartzite.jobs :as jobs]
[clojurewerkz.quartzite.schedule.cron :as cron]
[clojurewerkz.quartzite.tri... |
799869f4e001b80c86a806e28f2ad2ce3612f8ac19b980d202d70e6d6bc6c02d | kindista/kindista | metric-system.lisp | Copyright 2012 - 2021 CommonGoods Network , Inc.
;;;
This file is part of Kindista .
;;;
Kindista is free software : you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
;;; (at you... | null | https://raw.githubusercontent.com/kindista/kindista/b67cd5975247f633c74a9299539de7b66d202011/src/analytics/metric-system.lisp | lisp |
(at your option) any later version.
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
License for more details.
run stop and start on the metric-system after adding a new metric
e.g. (stop (acceptor-metric-system *acceptor*)) | Copyright 2012 - 2021 CommonGoods Network , Inc.
This file is part of Kindista .
Kindista is free software : you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
Kindista is distr... |
ff025d95618352bc35b23d09c493b8ed04f2b5eee05a38b50cbd560d7dabc7cc | jwaldmann/haskell-obdd | Weight.hs |
The maximal number of non - attacking knights on an n×n chessboard
( i.e. , independence numbers for the n×n knight graphs )
The maximal number of non-attacking knights on an n×n chessboard
(i.e., independence numbers for the n×n knight graphs)
-}
import Prelude hiding ((&&),(||),not,and,or)
import OBD... | null | https://raw.githubusercontent.com/jwaldmann/haskell-obdd/537f710bc3eb6d06370659fd8c79f4da94554aeb/examples/Weight.hs | haskell |
The maximal number of non - attacking knights on an n×n chessboard
( i.e. , independence numbers for the n×n knight graphs )
The maximal number of non-attacking knights on an n×n chessboard
(i.e., independence numbers for the n×n knight graphs)
-}
import Prelude hiding ((&&),(||),not,and,or)
import OBD... | |
82fa8ad27880d159e59be657ea9fd9aa3dedf6f50e1def3559a102b6a373da6e | hiroshi-unno/coar | invPrinter.ml | open Core
open Common.Ext
open Ast
open Ast.LogicOld
type mode = SyGuS_IF1 | SyGuS_IF2
let mode = SyGuS_IF1
let str_of_sort = function
| T_int.SInt -> "Int"
| T_bool.SBool -> "Bool"
| s -> failwith (Term.str_of_sort s ^ " not supported")
let rec str_of_formula phi = let open Formula in
match phi with
| At... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/SyGuS/invPrinter.ml | ocaml | open Core
open Common.Ext
open Ast
open Ast.LogicOld
type mode = SyGuS_IF1 | SyGuS_IF2
let mode = SyGuS_IF1
let str_of_sort = function
| T_int.SInt -> "Int"
| T_bool.SBool -> "Bool"
| s -> failwith (Term.str_of_sort s ^ " not supported")
let rec str_of_formula phi = let open Formula in
match phi with
| At... | |
2119151f6792ddb9fbfe95055b252face266c91d57aee583288099db33d40dfc | TheLortex/mirage-monorepo | switch.ml | type t = {
id : Ctf.id;
mutable fibers : int; (* Total, including daemon_fibers and the main function *)
mutable daemon_fibers : int;
mutable exs : (exn * Printexc.raw_backtrace) option;
on_release : (unit -> unit) Lwt_dllist.t;
waiter : unit Waiters.t; (* The main [top]/[sub] function ... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/0c29acffaf08dc0008097d36225a14960769f132/duniverse/eio/lib_eio/core/switch.ml | ocaml | Total, including daemon_fibers and the main function
The main [top]/[sub] function may wait here for fibers to finish.
Check switch belongs to this domain (and isn't finished). It's OK if it's cancelling.
Check isn't cancelled (or finished).
Note: raises if [t] is finished or called from wrong domain.
Wait f... | type t = {
id : Ctf.id;
mutable daemon_fibers : int;
mutable exs : (exn * Printexc.raw_backtrace) option;
on_release : (unit -> unit) Lwt_dllist.t;
cancel : Cancel.t;
}
type hook =
| Null
| Hook : Domain.id * 'a Lwt_dllist.node -> hook
let null_hook = Null
let remove_hook = function
| Null -> ()
| ... |
dd4be1e9e446150d2f9f59f602891ab9e3b79e2bc27674d70932903eae72c28f | swannodette/hello-cljsc | project.clj | (defproject hello-cljsc "0.1.0-SNAPSHOT"
:description "Hello ClojureScript Compiler"
:url "-cljsc"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2411"]])
| null | https://raw.githubusercontent.com/swannodette/hello-cljsc/2cbcb979040492149b843b0479e096ab98e2a181/project.clj | clojure | (defproject hello-cljsc "0.1.0-SNAPSHOT"
:description "Hello ClojureScript Compiler"
:url "-cljsc"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2411"]])
| |
9fbd98208664f570ec41fd749d2d2b8864f0f2687ebf3a81cab72ab6fec6ab39 | NorfairKing/validity | InstanceSpec.hs | # LANGUAGE NegativeLiterals #
# LANGUAGE ScopedTypeVariables #
module Data.InstanceSpec
( spec,
)
where
import Control.Monad
import Data.Data
import Data.Fixed
import Data.GenValidity
import Data.Int
import Data.List.NonEmpty (NonEmpty)
import Data.Ratio
import Data.Word
import Numeric.Natural
import Test.Hspec
i... | null | https://raw.githubusercontent.com/NorfairKing/validity/8373ac5f0f02ad66f1b83c9bf572290430e84062/genvalidity/test/Data/InstanceSpec.hs | haskell | Regression tests
threeTupleTests (Proxy :: Proxy (Ratio Integer))
threeTupleTests (Proxy :: Proxy (Ratio Int)) | # LANGUAGE NegativeLiterals #
# LANGUAGE ScopedTypeVariables #
module Data.InstanceSpec
( spec,
)
where
import Control.Monad
import Data.Data
import Data.Fixed
import Data.GenValidity
import Data.Int
import Data.List.NonEmpty (NonEmpty)
import Data.Ratio
import Data.Word
import Numeric.Natural
import Test.Hspec
i... |
6f1e3e71de6038d99f089cb7d8768e8992338fc2db4536df94424101c6cc3813 | ocaml-ppx/ocamlformat | Multimap.ml | (**************************************************************************)
(* *)
(* OCamlFormat *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/lib/Multimap.ml | ocaml | ************************************************************************
OCamlFormat
... | Copyright ( c ) Facebook , Inc. and its affiliates .
This source code is licensed under the MIT license found in
type ('key, 'value, 'cmp) t = ('key, 'value list, 'cmp) Map.t
module M (K : sig
type t
type comparator_witness
end) =
struct
type nonrec 'v t = (K.t, 'v, K.com... |
f5ec383a68591721a6a6c2d80038dc1b605abf2d70f70e8649ad3c451bb9d54e | binsec/haunted | smt_bitvectors.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/static/types/smt_bitvectors.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
fb335df951cffa31706aa330cf1c9934f5e03f8652cd63349117dca05fbbc7ae | travitch/datalog | AncestorTest.hs | {-# LANGUAGE OverloadedStrings #-}
module Main ( main ) where
import Data.Set ( fromList )
import Data.Text ( Text )
import Test.Framework ( defaultMain, testGroup, Test )
import Test.Framework.Providers.HUnit
import Test.HUnit hiding ( Test )
import Database.Datalog
main :: IO ()
main = defaultMain tests
tests :: ... | null | https://raw.githubusercontent.com/travitch/datalog/8b3c37f1887c42d28a158285b8570e27480a0a56/tests/AncestorTest.hs | haskell | # LANGUAGE OverloadedStrings # | module Main ( main ) where
import Data.Set ( fromList )
import Data.Text ( Text )
import Test.Framework ( defaultMain, testGroup, Test )
import Test.Framework.Providers.HUnit
import Test.HUnit hiding ( Test )
import Database.Datalog
main :: IO ()
main = defaultMain tests
tests :: [Test]
tests = [ testGroup "t1" [ t... |
6af792f5422eb33d429cf4aa69e5ef31ef2271ee13d5f55f81c3f1d64cc94f42 | janestreet/bonsai | room.mli | open! Core
include String_id.S
| null | https://raw.githubusercontent.com/janestreet/bonsai/761d04847d5f947318b64c0a46dffa17ad413536/examples/open_source/rpc_chat/common/room.mli | ocaml | open! Core
include String_id.S
| |
435138533927e128378b9c3b3919a71c71fd9fc4c84a957ae44fa91283f42f44 | brendanhay/gogol | List.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-resourcemanager/gen/Gogol/ResourceManager/Cloudresourcemanager/Projects/List.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
/See:/ <-manager Cloud Resource Manager API Reference> for @cloudresourcemanager.projects.list@.
* Resource
** Constructing a Request
'CloudresourcemanagerProjectsList' request conforms to.
/See:/ 'newCloudresourcemanagerPro... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
f293d5726387831f85381256a0feb2a2f4d439c89b8f9a28950d1aa6f31ea481 | eighttrigrams/defn-over-http | core.cljc | (ns net.eighttrigrams.defn-over-http.core)
(defmacro defn-over-http
([fname]
`(defn-over-http ~fname ~(symbol 'config)))
([fname & {:as cfg}]
(let [config (gensym)
args (gensym)
handle-error (gensym)
request (gensym)
reader (gensym)
w... | null | https://raw.githubusercontent.com/eighttrigrams/defn-over-http/1174369434d4b3d7128d13b8810dabf5cffb9538/src/lib/cljc/net/eighttrigrams/defn_over_http/core.cljc | clojure | (ns net.eighttrigrams.defn-over-http.core)
(defmacro defn-over-http
([fname]
`(defn-over-http ~fname ~(symbol 'config)))
([fname & {:as cfg}]
(let [config (gensym)
args (gensym)
handle-error (gensym)
request (gensym)
reader (gensym)
w... | |
475d42254c3749cc21e0f843f5d255a2509f8567a5b6fba34b3c71d9c65a851a | ocaml-batteries-team/batteries-included | batLogger.ml | -*- Mode : ; indent - tabs - mode : nil -*-
(******************************************************************************)
Copyright ( c ) 2009 , Metaweb Technologies , Inc.
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted ... | null | https://raw.githubusercontent.com/ocaml-batteries-team/batteries-included/f143ef5ec583d87d538b8f06f06d046d64555e90/src/batLogger.ml | ocaml | ****************************************************************************
****************************************************************************
* log utilities
****************************************************************************
* log modules
*********************************************************... | -*- Mode : ; indent - tabs - mode : nil -*-
Copyright ( c ) 2009 , Metaweb Technologies , Inc.
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions
* are met :
* * Redistributions... |
5af7b798ff77af90cfc1ed41e217c057d813af1e8f42eeec6444ba4fdc2714b6 | jwiegley/notes | Task.hs | waitOnTaskStatus :: TaskStatus s
=> TaskId s -> Bool -> SessionManager s -> STM (Maybe s)
waitOnTaskStatus tid anyNonReady mgr = do
mstatus <- getTaskStatus tid mgr
forM_ mstatus $ \status -> case taskState status of
TaskReady -> retry
TaskStarting -> retry
TaskRunnin... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/gists/6127399/Task.hs | haskell | waitOnTaskStatus :: TaskStatus s
=> TaskId s -> Bool -> SessionManager s -> STM (Maybe s)
waitOnTaskStatus tid anyNonReady mgr = do
mstatus <- getTaskStatus tid mgr
forM_ mstatus $ \status -> case taskState status of
TaskReady -> retry
TaskStarting -> retry
TaskRunnin... | |
8206ae622580c97af2162cee6bda17fa0fe91f289cb76ecdb7827056f84003d3 | GrammaTech/sel | std-api.lisp | std-api.lisp --- Standard RESTful interface over SEL .
;;;
Standard Rest API for Software Evolution Library
;;;
The Standard Rest API for Software Evolution Library is implemented as a web
;;; service which may be accessed through HTTP requests.
;;;
;;; It attempts to conform to principals described here:
;;; @ur... | null | https://raw.githubusercontent.com/GrammaTech/sel/a59174c02a454e8d588614e221cf281260cf12f8/rest/std-api.lisp | lisp |
service which may be accessed through HTTP requests.
It attempts to conform to principals described here:
@uref{,
@subsubsection Dependencies
file for a full description.
@subsubsection Dependencies
file for a full description and how to start a rest server. In addition,
this file is built from the sessio... | std-api.lisp --- Standard RESTful interface over SEL .
Standard Rest API for Software Evolution Library
The Standard Rest API for Software Evolution Library is implemented as a web
Representational State Transfer }
The Rest API leverages a number of Common Lisp components , which
are open - source and gener... |
9face181abfd4d353266dd91cd60bd9ce8471924e6a72e101095f5829baea4cb | babashka/babashka | pprint_test.clj | (ns babashka.pprint-test
(:require
[babashka.test-utils :as test-utils]
[clojure.string :as str]
[clojure.test :as test :refer [deftest is]]))
(defn bb [& args]
(str/trim (apply test-utils/bb (map str args))))
(deftest print-length-test
(is (= "(0 1 2 3 4 5 6 7 8 9 ...)"
(bb "-e" "(set! *print... | null | https://raw.githubusercontent.com/babashka/babashka/77768cec6772ea6a0de00dbe9bc114c28844387a/test/babashka/pprint_test.clj | clojure | (ns babashka.pprint-test
(:require
[babashka.test-utils :as test-utils]
[clojure.string :as str]
[clojure.test :as test :refer [deftest is]]))
(defn bb [& args]
(str/trim (apply test-utils/bb (map str args))))
(deftest print-length-test
(is (= "(0 1 2 3 4 5 6 7 8 9 ...)"
(bb "-e" "(set! *print... | |
6314009b8295b30d74c316fef76fcf5a00e90816643ab23d0ed009caf9570b14 | mukul-rathi/bolt | ir_gen_operators.mli | (** Generates the serialisable IR representation of the operators *)
val ir_gen_un_op : Ast.Ast_types.un_op -> Frontend_ir.un_op
val ir_gen_bin_op : Ast.Ast_types.bin_op -> Frontend_ir.bin_op
| null | https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/src/frontend/ir_gen/ir_gen_operators.mli | ocaml | * Generates the serialisable IR representation of the operators |
val ir_gen_un_op : Ast.Ast_types.un_op -> Frontend_ir.un_op
val ir_gen_bin_op : Ast.Ast_types.bin_op -> Frontend_ir.bin_op
|
2f4d63c8b55f469cdca71384787360c38f513b1cd572baed805151370d3047d9 | jfischoff/hasql-queue | AtMostOnce.hs | module Hasql.Queue.High.AtMostOnce where
import qualified Hasql.Queue.High.ExactlyOnce as H
import qualified Hasql.Queue.Internal as I
import Hasql.Connection
import qualified Hasql.Encoders as E
import qualified Hasql.Decoders as D
{-|Enqueue a payload.
-}
enqueue :: Connection
-- ^ Connection
... | null | https://raw.githubusercontent.com/jfischoff/hasql-queue/49f4cba713bedf6ce907cc89794f2567befed396/src/Hasql/Queue/High/AtMostOnce.hs | haskell | |Enqueue a payload.
^ Connection
^ Payload encoder
^ List of payloads to enqueue
^ Connection
^ Payload decoder
^ Element count | module Hasql.Queue.High.AtMostOnce where
import qualified Hasql.Queue.High.ExactlyOnce as H
import qualified Hasql.Queue.Internal as I
import Hasql.Connection
import qualified Hasql.Encoders as E
import qualified Hasql.Decoders as D
enqueue :: Connection
-> E.Value a
-> [a]
-> IO ()
e... |
70ce46b101a5ff109cc1f3fdc59e45d3225e79face0c77b624f3d1f300247b86 | poscat0x04/telegram-types | KeyboardButton.hs | # LANGUAGE StandaloneDeriving #
module Web.Telegram.Types.Internal.KeyboardButton where
import Common
import Web.Telegram.Types.Internal.KeyboardButtonPollType
-- | One button of the reply keyboard
data KeyboardButton = KeyboardButton
{ -- | Text of the button. If no addons are used, it will
-- be sent as a ... | null | https://raw.githubusercontent.com/poscat0x04/telegram-types/c09ccc81cff10399538894cf2d1273022c797e18/src/Web/Telegram/Types/Internal/KeyboardButton.hs | haskell | | One button of the reply keyboard
| Text of the button. If no addons are used, it will
be sent as a message when the button is pressed
| If True, the user's phone number will be sent as a contact when
the button is pressed. Available in private chats only
| If True, the user's current location will be sent w... | # LANGUAGE StandaloneDeriving #
module Web.Telegram.Types.Internal.KeyboardButton where
import Common
import Web.Telegram.Types.Internal.KeyboardButtonPollType
data KeyboardButton = KeyboardButton
text :: NoFlatten Text,
addon :: Maybe KeyboardButtonAddon
}
deriving stock (Show, Eq, Generic)
deriving vi... |
29bc8bbf6e83267c49cfe6af8c9abd9c96e38a938fe0f13da676d015cf206600 | aiya000/haskell-examples | RecursiveTypeDeriving.hs | data A = A A
deriving Show
main :: IO ()
main = return ()
| null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Room/Experiment/RecursiveTypeDeriving.hs | haskell | data A = A A
deriving Show
main :: IO ()
main = return ()
| |
aeb5c4d0be97500b908ea88c45cd9110ea5a4efd62885157b16ddc308d633b09 | mbj/stratosphere | ChallengeActionProperty.hs | module Stratosphere.WAFv2.WebACL.ChallengeActionProperty (
module Exports, ChallengeActionProperty(..),
mkChallengeActionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.WAFv2.WebACL.... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/wafv2/gen/Stratosphere/WAFv2/WebACL/ChallengeActionProperty.hs | haskell | # SOURCE # | module Stratosphere.WAFv2.WebACL.ChallengeActionProperty (
module Exports, ChallengeActionProperty(..),
mkChallengeActionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
data Chal... |
90e4bb0c1e637313a0543b7db7007d86c2b8ac548662de08ba629b76ed57201a | Metaxal/bazaar | msg-error.rkt | #lang racket/base
(require (only-in racket/gui/base message-box))
(provide (all-defined-out))
;; Exception handler for exn:mesg-error
(define (msg-error-box e)
(message-box "Error" (exn-message e)
#f '(ok stop)))
Syntactic salt for msg - error
(define-syntax-rule (with-error-to-msg-box body ...)
... | null | https://raw.githubusercontent.com/Metaxal/bazaar/8432d3c5398225a4bfb5ed5c25a1beffa06409ec/gui/msg-error.rkt | racket | Exception handler for exn:mesg-error
Examples | #lang racket/base
(require (only-in racket/gui/base message-box))
(provide (all-defined-out))
(define (msg-error-box e)
(message-box "Error" (exn-message e)
#f '(ok stop)))
Syntactic salt for msg - error
(define-syntax-rule (with-error-to-msg-box body ...)
(with-handlers ([exn:fail? msg-error-b... |
0ccb1203d9acf539f6752644d5f831303be62631da003477979acce0bd597abb | MinaProtocol/mina | pasta_bindings_backend.ml | (* Empty module.
Linking against the library generated by this module links the native rust
bindings library. This should only be used for native, statically linked
executables.
*)
| null | https://raw.githubusercontent.com/MinaProtocol/mina/0655465af11fad293e58c74b9fc3da009d24139e/src/lib/crypto/kimchi_bindings/stubs/pasta_bindings_backend.ml | ocaml | Empty module.
Linking against the library generated by this module links the native rust
bindings library. This should only be used for native, statically linked
executables.
| |
e23a6b8d8371c60b1a93fffc3de8708f65bfe03461282b85993dfc96720e0d7b | d-plaindoux/transept | transept_genlex.mli | module Lexeme = Lexeme
module Lexer = Lexer
module PrettyPrinter = Pp
| null | https://raw.githubusercontent.com/d-plaindoux/transept/8567803721f6c3f5d876131b15cb301cb5b084a4/lib/transept_genlex/transept_genlex.mli | ocaml | module Lexeme = Lexeme
module Lexer = Lexer
module PrettyPrinter = Pp
| |
2fde17c18d33d0f037e6dbf29f6897d69ba89df1f1887ab138bd45e5d8c2cc32 | acl2/acl2 | natives.lisp | Java Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "ACL2")
(include-book "../atj" :ttags ((:open-output-ch... | null | https://raw.githubusercontent.com/acl2/acl2/ea7775109f327f8cbe432c2d4a38714f5fb84abe/books/kestrel/java/atj/tests/natives.lisp | lisp |
For now we only have tests for well-guarded calls of these functions,
which arises if we wrap the ill-guarded calls to test
with (WITH-GUARD-CHECKING :NONE ...);
thus, in particular, we have no tests for BAD-ATOM<=,
because all its calls with constructible ACL2 values are ill-guarded.
We also do not have tes... | Java Library
Copyright ( C ) 2023 Kestrel Institute ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "ACL2")
(include-book "../atj" :ttags ((:open-output-channel!) (:oslib) (:quicklisp) :quicklisp.osicat))
(include-book "std/strings/cat-base"... |
d5428a01b9ad646c6201a32ac74db621fde3ab9e019237a9c72fa1c9cfc41de7 | samrushing/irken-compiler | t_datatype3.scm |
(datatype goto
(:nil)
(:cons int int (goto)))
(let ((x (goto:cons 1 1 (goto:cons 2 2 (goto:cons 3 3 (goto:nil))))))
x)
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_datatype3.scm | scheme |
(datatype goto
(:nil)
(:cons int int (goto)))
(let ((x (goto:cons 1 1 (goto:cons 2 2 (goto:cons 3 3 (goto:nil))))))
x)
| |
25cf2ead3a2a07facdb641e7dd7ff2629f3ee97730660178df4a88c57acb8bef | 2600hz/community-scripts | string_invalid_hex_char.erl | {error,{44,"lexical error: invalid (non-hex) character occurs after '\\u' inside string.\n"}}.
| null | https://raw.githubusercontent.com/2600hz/community-scripts/b0b81342bf02300fcdbda99e4cecc1ee93823c70/CloneTools/lib/ejson-0.1.0/t/cases/string_invalid_hex_char.erl | erlang | {error,{44,"lexical error: invalid (non-hex) character occurs after '\\u' inside string.\n"}}.
| |
38077db869784a660a4d36f818433d881ef761508b2a574da301ea51f3debdb6 | ghc/packages-dph | Solver.hs |
-- | Naive n^2 computation of accelerations.
module Solver.VectorNaive.Solver
(calcAccels)
where
import Common.Body
import Data.Vector.Unboxed (Vector)
import qualified Data.Vector.Unboxed as V
-- | Calculate accelerations on these point in a naive O(n^2) way
calcAccels :: Double -> Vector MassPoint -> Vector Accel... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-examples/examples/real/NBody/Solver/VectorNaive/Solver.hs | haskell | | Naive n^2 computation of accelerations.
| Calculate accelerations on these point in a naive O(n^2) way |
module Solver.VectorNaive.Solver
(calcAccels)
where
import Common.Body
import Data.Vector.Unboxed (Vector)
import qualified Data.Vector.Unboxed as V
calcAccels :: Double -> Vector MassPoint -> Vector Accel
calcAccels epsilon mps
= V.map (calcAccel epsilon mps) mps
calcAccel :: Double -> Vector MassPoint -> MassPo... |
cedc49e3dc6f3449834c8f570dce2cff15502ba5595fa790b251724e96e6ae96 | ocaml-multicore/tezos | default_parameters.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_parameters/default_parameters.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2021 Nomadic Labs < >
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 " , WITH... |
e7144208ece4dcde160aae3ba40e3d7e97bf3d914faa60c863a6fff400e7ef3f | incoherentsoftware/defect-process | Types.hs | module Level.Room.SpringLauncher.Types
( SpringLauncherSprites(..)
, SpringLauncher(..)
) where
import Configs.All.Level
import Msg.Types
import Util
import Window.Graphics
data SpringLauncherSprites = SpringLauncherSprites
{ _idle :: Sprite
, _activate :: Sprite
}
data SpringLauncher = S... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Level/Room/SpringLauncher/Types.hs | haskell | module Level.Room.SpringLauncher.Types
( SpringLauncherSprites(..)
, SpringLauncher(..)
) where
import Configs.All.Level
import Msg.Types
import Util
import Window.Graphics
data SpringLauncherSprites = SpringLauncherSprites
{ _idle :: Sprite
, _activate :: Sprite
}
data SpringLauncher = S... | |
0bc29d29523dc70a8d530d090b2b169d209957199c0c7a8cf7d39eb598fab269 | jmct/IterativeCompiler | LambdaLift.hs | module LambdaLift (lambdaLift, freeVars, rename, collectSCs) where
import Language
import Parser
import Control.Applicative hiding (empty)
import Control.Monad
import Control.Monad.Writer.Strict
import Data.Set as S hiding (map, foldl', partition)
import Data.List (foldl', partition)
import qualified Data.Map as M
imp... | null | https://raw.githubusercontent.com/jmct/IterativeCompiler/8e97fc63b5b8cfb9b9b380423f378784cbee6fe5/frontend/LambdaLift.hs | haskell | Find the free variables in each expression and annotate the
AST
Get the body expression from the list of bindings for a Let
Determine the free variables of an expression
Take all lambda abstractions and make them into let-bindings
Give each variable a unique name | module LambdaLift (lambdaLift, freeVars, rename, collectSCs) where
import Language
import Parser
import Control.Applicative hiding (empty)
import Control.Monad
import Control.Monad.Writer.Strict
import Data.Set as S hiding (map, foldl', partition)
import Data.List (foldl', partition)
import qualified Data.Map as M
imp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.