_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 |
|---|---|---|---|---|---|---|---|---|
0efb22faa3c0f6cef55c15b9c57f7d89363fe3c48a613fbfdd2f3804e382e1f3 | arttuka/reagent-material-ui | alert_title.cljs | (ns reagent-mui.material.alert-title
"Imports @mui/material/AlertTitle as a Reagent component.
Original documentation is at -ui/api/alert-title/ ."
(:require [reagent.core :as r]
["@mui/material/AlertTitle" :as MuiAlertTitle]))
(def alert-title (r/adapt-react-class (.-default MuiAlertTitle)))
| null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/alert_title.cljs | clojure | (ns reagent-mui.material.alert-title
"Imports @mui/material/AlertTitle as a Reagent component.
Original documentation is at -ui/api/alert-title/ ."
(:require [reagent.core :as r]
["@mui/material/AlertTitle" :as MuiAlertTitle]))
(def alert-title (r/adapt-react-class (.-default MuiAlertTitle)))
| |
aeb2ee1d745be24907818e51c472f734103ae1d3e47573677392ce2df6444891 | ahrefs/atd | ast.mli | * Abstract syntax tree ( AST ) representing ATD data
type loc = Lexing.position * Lexing.position
(** A location in the source code. *)
exception Atd_error of string
(** Exception raised by functions of the [atd] library and indicating
errors. *)
type annot = annot_section list
(** An annotation,... | null | https://raw.githubusercontent.com/ahrefs/atd/5903684f7e6af05b6c0a84af6418a1e36ee7f44a/atd/src/ast.mli | ocaml | * A location in the source code.
* Exception raised by functions of the [atd] library and indicating
errors.
* An annotation, consisting of a sequence of sections.
{!Annot} provides utilities for handling annotations.
* An annotation field,
i.e. a key with an optional value within an annotati... | * Abstract syntax tree ( AST ) representing ATD data
type loc = Lexing.position * Lexing.position
exception Atd_error of string
type annot = annot_section list
and annot_section = string * (loc * annot_field list)
* represents a single annotation within edgy brackets .
[ < " foo " bar baz="123 " path.to
... |
58d2e736c1024a6ae0f5899a7932aa0baaa8795f8def7de3947c70f11d611faf | Dean177/reason-standard | Core.ml | module Comparator = struct
type ('a, 'identity) t = ('a, 'identity) Base.Comparator.t
type ('a, 'identity) comparator = ('a, 'identity) t
module type T = sig
type nonrec t
val compare : t -> t -> int
end
module type S = sig
type nonrec t
type identity
val comparator : (t, identity... | null | https://raw.githubusercontent.com/Dean177/reason-standard/74ed165c988eb4a4ea54339e829ff1d59b186d15/native/src/Core.ml | ocaml | let ofBaseComparator (baseComparator : ('a, 'id) Base.Map.comparator) : ('a, 'id) s = Obj.magic baseComparator | module Comparator = struct
type ('a, 'identity) t = ('a, 'identity) Base.Comparator.t
type ('a, 'identity) comparator = ('a, 'identity) t
module type T = sig
type nonrec t
val compare : t -> t -> int
end
module type S = sig
type nonrec t
type identity
val comparator : (t, identity... |
d6f4dcd199e95c99145c5a48fc31143d8819ef05c52862ecb05437bd79ce3ac5 | facebook/flow | tty.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/4cd23bfa4e1190a810a4cfb5229c02a40e76c179/src/hack_forked/utils/sys/tty.ml | ocaml | Angry Face
Face With Tears of Joy
Thinking Face
Hundred Points
See .
ANSI escape sequence to clear whole line |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
56101b6c862d33c14056c51b2d89adab43a2b0c19df6f2c2ce2b678a3b57fe4a | 8c6794b6/haskell-sc-scratch | Part1.hs | {-# LANGUAGE PackageImports #-}
------------------------------------------------------------------------------
-- |
-- Exercise from /Stream-Patterns-Events1/.
--
module SCHelp.SPE.Part1 where
import Control.Applicative
import Control.Arrow
import Control.Concurrent (threadDelay)
import "mtl" Control.Monad.State
impo... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/SCHelp/SPE/Part1.hs | haskell | # LANGUAGE PackageImports #
----------------------------------------------------------------------------
|
Exercise from /Stream-Patterns-Events1/.
| The only synthdef used in this example
| Makes osc message from midi note pitch.
| Repeat the state transformation for random number of time in
given range. |
module SCHelp.SPE.Part1 where
import Control.Applicative
import Control.Arrow
import Control.Concurrent (threadDelay)
import "mtl" Control.Monad.State
import Data.Map (Map)
import System.Random
import qualified Data.Map as M
import Sound.OpenSoundControl
import Sound.SC3
import Sound.SC3.Monadic
import Sound.SC3.Lep... |
cdb1b6ac10912fef56637bc3aeeb9c6f6e0832859c8810f23717e84b67be63da | tomprimozic/type-systems | test_refined.ml | open OUnit2
open Expr
type result =
| OK
| Fail of string option
let fail = Fail None
let error msg = Fail (Some msg)
let wrong = error "SMT solver returned sat."
let unknown = error "SMT solver returned unknown."
let test_cases = [
("1 : int if true", OK);
("1 : int if false", wrong);
("1 : int if 1 > 2", ... | null | https://raw.githubusercontent.com/tomprimozic/type-systems/4403586a897ee94cb8f0de039aeee8ef1ecef968/refined_types/test_refined.ml | ocaml | nil is a primitive constant
Heartbleed
Heartbleed fix
function subtyping | open OUnit2
open Expr
type result =
| OK
| Fail of string option
let fail = Fail None
let error msg = Fail (Some msg)
let wrong = error "SMT solver returned sat."
let unknown = error "SMT solver returned unknown."
let test_cases = [
("1 : int if true", OK);
("1 : int if false", wrong);
("1 : int if 1 > 2", ... |
37ef7fbf29542090ec9354e80ab221b6390bf639457c24dad8f87754804053bf | dinosaure/carton | uid.ml | type t = Digestif.SHA1.t
type ctx = Digestif.SHA1.ctx
let empty = Digestif.SHA1.empty
let feed = Digestif.SHA1.feed_bigstring
let get = Digestif.SHA1.get
let hash = Hashtbl.hash
let length = Digestif.SHA1.digest_size
let equal = Digestif.SHA1.equal
let pp = Digestif.SHA1.pp
let of_raw_string = Digestif.SHA1.of_raw_st... | null | https://raw.githubusercontent.com/dinosaure/carton/8cb8b3685fab477594b2d83c70b2fc965d1d59b9/test/uid.ml | ocaml | type t = Digestif.SHA1.t
type ctx = Digestif.SHA1.ctx
let empty = Digestif.SHA1.empty
let feed = Digestif.SHA1.feed_bigstring
let get = Digestif.SHA1.get
let hash = Hashtbl.hash
let length = Digestif.SHA1.digest_size
let equal = Digestif.SHA1.equal
let pp = Digestif.SHA1.pp
let of_raw_string = Digestif.SHA1.of_raw_st... | |
ff581a9c1b12b7a66a2ce7af053a2d96e14874dc11b2ea61be0214cfa7d3d518 | lpgauth/statsderl | statsderl_sup.erl | -module(statsderl_sup).
-include("statsderl.hrl").
%% public
-export([
start_link/0
]).
-behaviour(supervisor).
-export([
init/1
]).
%% public
-spec start_link() ->
{ok, pid()}.
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
%% supervisor callbacks
-spec init([]) ->
{ok,... | null | https://raw.githubusercontent.com/lpgauth/statsderl/87e94ca8084a8fdbff95c1ed26763373511c7053/src/statsderl_sup.erl | erlang | public
public
supervisor callbacks | -module(statsderl_sup).
-include("statsderl.hrl").
-export([
start_link/0
]).
-behaviour(supervisor).
-export([
init/1
]).
-spec start_link() ->
{ok, pid()}.
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
-spec init([]) ->
{ok, {{one_for_one, 5, 10}, []}}.
init(_Args) -... |
9e5802754896db7e9c410f0f04cf05763f7014e4a40e131e985c660c0494dab9 | google/ormolu | list-comprehensions.hs | foo x = [a |a<-x]
bar x y = [ (a, b) | a<-x, even a , b<-y, a != b ]
barbaz x y z w = [
(a, b, c, d) | -- Foo
a <-
x, -- Bar
any even [a, b],
c <- z *
z ^ 2, -- Bar baz
d <-
w
+
w, -- Baz bar
all
even [
a, b,
c, d
]
]
| null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/value/function/list-comprehensions.hs | haskell | Foo
Bar
Bar baz
Baz bar | foo x = [a |a<-x]
bar x y = [ (a, b) | a<-x, even a , b<-y, a != b ]
barbaz x y z w = [
a <-
any even [a, b],
c <- z *
d <-
w
+
all
even [
a, b,
c, d
]
]
|
9c1d0aeb136e6b66ff7a791f3d5f202fb78c2daa09e356286169898837fea163 | MLstate/opalang | jsRenaming.mli |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/jslang/jsRenaming.mli | ocaml | *
Local renaming on the qml ast
Also squashes local variables that are never alive at the same time
Also remove assignments that are never read
|
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... |
c11b1919d02b5be70dfeae3b5819515ba393baa016a95eade14fa7fc7d18e493 | bmeurer/ocaml-arm | addlabels.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, Kyoto U... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/tools/addlabels.ml | ocaml | *********************************************************************
OCaml
... | , Kyoto University RIMS
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
version 1.0 .
$ Id$
open StdLabels
open Asttypes
open Pa... |
c4a40120edb2dd88401b144be0fb2617d5756257b54dbfcfa7eb03985b263f18 | tkaryadis/squery-mongo-core | options.cljc | (ns squery-mongo-core.operators.options
(:require [squery-mongo-core.internal.convert.stages :refer [squery-vector->squery-map]]))
(defn remove-o []
{:remove true})
(defn new-o []
{:new true})
(defn fields-o [& fields]
(let [m (squery-vector->squery-map fields 0)]
{:fields m}))
(defn allow-disk-use []
... | null | https://raw.githubusercontent.com/tkaryadis/squery-mongo-core/7df7d6733cfacaf0379d2a39908e6ceb0d86ffeb/src/squery_mongo_core/operators/options.cljc | clojure | -----------------------------------my key options---------------------------------------------------------------------
i add them in command-keys (convert:445) | (ns squery-mongo-core.operators.options
(:require [squery-mongo-core.internal.convert.stages :refer [squery-vector->squery-map]]))
(defn remove-o []
{:remove true})
(defn new-o []
{:new true})
(defn fields-o [& fields]
(let [m (squery-vector->squery-map fields 0)]
{:fields m}))
(defn allow-disk-use []
... |
dadfb1b2224db914eeeb666c9bcf29e1464c8af9bbad1a8f9db037de9eb37c6f | ricardobcl/DottedDB | dotted_db_sync_manager.erl | -module(dotted_db_sync_manager).
-behaviour(gen_server).
-include_lib("dotted_db.hrl").
%% API
-export([start_link/0,
enable/0,
disable/0,
set_sync_interval/1,
get_sync_interval/0,
set_kill_node_interval/1,
get_kill_node_interval/0]).
%% gen_server callbacks
-expo... | null | https://raw.githubusercontent.com/ricardobcl/DottedDB/e3b96a9ec77439af90f94a80b875a01732c1425e/src/dotted_db_sync_manager.erl | erlang | API
gen_server callbacks
===================================================================
API
===================================================================
===================================================================
gen_server callbacks
==============================================================... | -module(dotted_db_sync_manager).
-behaviour(gen_server).
-include_lib("dotted_db.hrl").
-export([start_link/0,
enable/0,
disable/0,
set_sync_interval/1,
get_sync_interval/0,
set_kill_node_interval/1,
get_kill_node_interval/0]).
-export([init/1, handle_call/3, hand... |
46f8c27658fc3ec92f00b82e1b9455e38635daaaa9b3994717819394ec1224de | racket/rhombus-prototype | srcloc-object.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse/pre)
"provide.rkt"
"class-primitive.rkt"
"function-arity-key.rkt")
(provide (for-spaces (rhombus/namespace
#f
rhombus/bind
rhombus/annot)
... | null | https://raw.githubusercontent.com/racket/rhombus-prototype/2d7e044db8701ff06393922894bd4cb0edcdf299/rhombus/private/srcloc-object.rkt | racket | #lang racket/base
(require (for-syntax racket/base
syntax/parse/pre)
"provide.rkt"
"class-primitive.rkt"
"function-arity-key.rkt")
(provide (for-spaces (rhombus/namespace
#f
rhombus/bind
rhombus/annot)
... | |
0d6708159f053b807e56e6632ff153ba4722305e50bb46b422a5702fa736ff51 | yrashk/erlang | string.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 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/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/stdlib/src/string.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 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(string).
-export([len/1,equal/2,co... |
9c837e77b9d346231ff2334e4f658af18202289ce4be9a9faf4278f20c018aff | 8thlight/hyperion | ids.clj | (ns hyperion.riak.map-reduce.ids
(:require [fleet :refer [fleet]]
[hyperion.riak.map-reduce.helper :refer [deftemplate-fn]]))
(def ids-template
"
function f(values) {
var ids = [];
for (var i=0; i<values.length; i++) {
ids.push(values[i].id);
}
return ids;
}
")
(deftemplate-fn ids-js (flee... | null | https://raw.githubusercontent.com/8thlight/hyperion/b1b8f60a5ef013da854e98319220b97920727865/riak/src/hyperion/riak/map_reduce/ids.clj | clojure |
i<values.length; i++) {
| (ns hyperion.riak.map-reduce.ids
(:require [fleet :refer [fleet]]
[hyperion.riak.map-reduce.helper :refer [deftemplate-fn]]))
(def ids-template
"
function f(values) {
}
}
")
(deftemplate-fn ids-js (fleet [] ids-template {:escaping :bypass}))
|
5d547a8c79e0045f7725a835694f51657e37ef91656c201f352ddf647d65816f | janestreet/vcaml | test_greetings.ml | open! Core
open Async
open Vcaml
open Vcaml_greetings
open Vcaml_test_helpers
let%expect_test "Plugin responds to RPC request" =
let%map greeting =
with_client (fun client ->
let open Deferred.Or_error.Let_syntax in
let define_on_start =
{| function! OnGreetingsPluginStart(channel)
... | null | https://raw.githubusercontent.com/janestreet/vcaml/64d205c2d6eee4a7e57abd2d452f5979dc6cd797/example/greetings/test/test_greetings.ml | ocaml | open! Core
open Async
open Vcaml
open Vcaml_greetings
open Vcaml_test_helpers
let%expect_test "Plugin responds to RPC request" =
let%map greeting =
with_client (fun client ->
let open Deferred.Or_error.Let_syntax in
let define_on_start =
{| function! OnGreetingsPluginStart(channel)
... | |
5ef23ff6a2b31c5d0f5bcc2467b399680c49ae69fcc8a211b187eed254fcdd75 | bartavelle/language-puppet | pdbQuery.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
module Main where
import XPrelude hiding (option)
import qualified Data.Aeson as Aeson
import qualified Data.HashMap.Strict as HM
import qualified Da... | null | https://raw.githubusercontent.com/bartavelle/language-puppet/990cf7805d09cc63b69f70a5f4e5f7d951754015/progs/pdbQuery.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
module Main where
import XPrelude hiding (option)
import qualified Data.Aeson as Aeson
import qualified Data.HashMap.Strict as HM
import qualified Data.Text as Text
import... |
5a7e09212167eabc14e18c3ecadc587a7a8b02b569446ec17d01f3d0c4017a56 | Feldspar/feldspar-language | Feldspar.hs | --
Copyright ( c ) 2009 - 2011 , ERICSSON AB
-- 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 of source code must retain the above copyright notice,
-- th... | null | https://raw.githubusercontent.com/Feldspar/feldspar-language/499e4e42d462f436a5267ddf0c2f73d5741a8248/src/Feldspar.hs | haskell |
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 of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* R... | Copyright ( c ) 2009 - 2011 , ERICSSON AB
* Neither the name of the ERICSSON AB nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED . IN NO EVENT SHALL THE ... |
f8ac27926413c968a075190ac5fb731fd4eaaed5034c4d4f852ec850769d4769 | archimag/cl-pdf | ttu-font.lisp | cl - pdf copyright 2002 - 2005 see license.txt for the details
;;; You can reach me at or
;;; The homepage of cl-pdf is here: -pdf.html
;;;
( c ) copyright 2005 by ( )
;;;
;;; Support for TrueTypeUnicode fonts
(in-package #:pdf)
(defclass ttu-font-metrics (font-metrics)
((c2g :accessor c2g
:initform... | null | https://raw.githubusercontent.com/archimag/cl-pdf/b4925b5df9cb07b37ce4246c91914853e565a5bb/ttu-font.lisp | lisp | You can reach me at or
The homepage of cl-pdf is here: -pdf.html
Support for TrueTypeUnicode fonts
example: (pdf:load-ttu-font #P"/tmp/arial.ufm" #P"/tmp/arial.ttf")
:obj-number 0 :no-link t | cl - pdf copyright 2002 - 2005 see license.txt for the details
( c ) copyright 2005 by ( )
(in-package #:pdf)
(defclass ttu-font-metrics (font-metrics)
((c2g :accessor c2g
:initform (make-array 131072 :element-type 'character :initial-element #\Null))
(cid-widths :accessor cid-widths :initform (make-... |
1d35d85d08c5e0de8530cf2b8d7e3ad6b3dba7feb33a75d4517a8def0d3826dd | jordanthayer/ocaml-search | quad_orig.ml | $ I d : separate.ml , v 1.2 2004/01/11 01:24:30 ruml Exp ruml $
Quadratic per child rank
Uses a Separate.t data structure . The " saved " field holds the
table used for bound estimation and search . The parameters hold
the coefficients . In both , the last value holds the constant .
... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/blfs/quad_orig.ml | ocaml | ************ initialization before blfs ****************
* returns true iff reached a leaf
************ reiniting model between passes ****************
* assumes that fill_saved was called before estimating bound
may have garbage if previous iteration was halted
************* using model to choose children ********... | $ I d : separate.ml , v 1.2 2004/01/11 01:24:30 ruml Exp ruml $
Quadratic per child rank
Uses a Separate.t data structure . The " saved " field holds the
table used for bound estimation and search . The parameters hold
the coefficients . In both , the last value holds the constant .
... |
fe64f98d1b2166834e614fb8647f3bb5a34e14d99497a551db0e77ee330811a5 | aumouvantsillage/Virgule-CPU-Racket | tick.rkt | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
#lang racket
(require
"../src/assembler.rkt"
"../src/device.rkt"
"example-system.rkt")
(define tick
(asm
(J 'start)
; Interru... | null | https://raw.githubusercontent.com/aumouvantsillage/Virgule-CPU-Racket/14c42524aa3e8ea9898d8bdf2606ad89f87bd9b8/examples/tick.rkt | racket | Interrupt service routine
Acknowledge the interrupt request.
Read the counter value.
Display the counter value.
Enable the tick device
Loop indefinitely | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
#lang racket
(require
"../src/assembler.rkt"
"../src/device.rkt"
"example-system.rkt")
(define tick
(asm
(J 'start)
(LI t0 (... |
d001ff53a04932ce0abea61b5e4390e15468b8b84aecf86be76c56e0a70fe4d6 | vonzhou/LearnYouHaskellForGreatGood | guess_number.hs | import System.Random
import Control.Monad (when)
main = do
gen <- getStdGen
askForNumber gen
askForNumber :: StdGen -> IO ()
askForNumber gen = do
let (randNumber, newGen) = randomR (1,10) gen :: (Int, StdGen)
putStrLn "Which number in the range from 1 to 10 do you think ?"
numberString <- getLine
when (... | null | https://raw.githubusercontent.com/vonzhou/LearnYouHaskellForGreatGood/439d848deac53ef6da6df433078b7f1dcf54d18d/chapter9/guess_number.hs | haskell | import System.Random
import Control.Monad (when)
main = do
gen <- getStdGen
askForNumber gen
askForNumber :: StdGen -> IO ()
askForNumber gen = do
let (randNumber, newGen) = randomR (1,10) gen :: (Int, StdGen)
putStrLn "Which number in the range from 1 to 10 do you think ?"
numberString <- getLine
when (... | |
14ce3cb719e493d6b9e4dafb7625d31b4ee1f6368d124ad3504d4727bd47adb8 | oscaro/eq | io.cljs | (ns eq.io
(:require [clojure.string :as cs]))
(def fs (js/require "fs"))
;; The line-seq implementation below comes from the following gist:
;;
(defn- read-chunk [fd]
(let [length 128
b (js/Buffer. length)
bytes-read (.readSync fs fd b 0 length nil)]
(if (> bytes-read 0)
(.toString b ... | null | https://raw.githubusercontent.com/oscaro/eq/9766e4b882795bc65fd0647abb955a3053f4c36b/src/eq/io.cljs | clojure | The line-seq implementation below comes from the following gist:
| (ns eq.io
(:require [clojure.string :as cs]))
(def fs (js/require "fs"))
(defn- read-chunk [fd]
(let [length 128
b (js/Buffer. length)
bytes-read (.readSync fs fd b 0 length nil)]
(if (> bytes-read 0)
(.toString b "utf8" 0 bytes-read))))
(defn line-seq
([fd]
(line-seq fd nil))
(... |
8b2dbc18263f9614786c2d901caa84e8cdd09d22950314f30e8e5f09bb132e6e | facebook/infer | ErlangTypes.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/fbf40c8bd6fdf492df48ade70b270ad04aad7be0/infer/src/erlang/ErlangTypes.ml | ocaml | We can replace this check with [find_exn] once we have AST validation for specs (T115271156).
Union shouldn't be empty, but if it somehow happens, just return true.
Simple substitution. Can go into infinite loop. For now we assume that the type checker rejects
such cases before. TODO: check for cycles in a ... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
0e24cdc58f82f698b2fa8cb076a626ce0a437d7ba48d90e714ce743e655d94da | danilkolikov/dfl | ToConstraintTest.hs | |
Module : Frontend . Desugaring . Initial . ToConstraintTest
Description : Tests for desugaring of object to Constraint - s
Copyright : ( c ) , 2019
License : MIT
Test suite for desugaring of objects to Constraint - s
Module : Frontend.Desugaring.Initial.ToConstraintTest
De... | null | https://raw.githubusercontent.com/danilkolikov/dfl/698a8f32e23b381afe803fc0e353293a3bf644ba/test/Frontend/Desugaring/Initial/ToConstraintTest.hs | haskell | |
Module : Frontend . Desugaring . Initial . ToConstraintTest
Description : Tests for desugaring of object to Constraint - s
Copyright : ( c ) , 2019
License : MIT
Test suite for desugaring of objects to Constraint - s
Module : Frontend.Desugaring.Initial.ToConstraintTest
De... | |
823a59276ba5ded25068d5d1f02777df2aefd7a807ac17e07a8f2fa730c99fc8 | racket/games | common.rkt | #lang racket/base
(require scribble/manual
scribble/decode
scribble/struct
setup/collects)
(provide (all-from-out scribble/manual)
selflink
gametitle gametitle* play-margin-note
game)
(define (selflink str) (link str (tt str)))
(define game onscreen)
(define (ga... | null | https://raw.githubusercontent.com/racket/games/e57376f067be51257ed12cdf3e4509a00ffd533d/scribblings/common.rkt | racket | #lang racket/base
(require scribble/manual
scribble/decode
scribble/struct
setup/collects)
(provide (all-from-out scribble/manual)
selflink
gametitle gametitle* play-margin-note
game)
(define (selflink str) (link str (tt str)))
(define game onscreen)
(define (ga... | |
6fbabca7b9e83cf14d097c163a1a317aa496174d33fc43bc5e5df74cd6eb9828 | GaloisInc/elf-edit | AArch64.hs | {-
AArch64 64bit relocation type.
-}
# LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE PatternSynonyms #
# LANGUAGE TypeFamilies #
module Data.ElfEdit.Relocations.AArch64
( AArch64_RelocationType(..)
, pattern R_AARCH64_ABS64
, pattern R_AARCH64_GLOB_DAT
, pattern R_AARCH64_JUMP_SLOT
, pattern R_AARCH64_RELA... | null | https://raw.githubusercontent.com/GaloisInc/elf-edit/fb4699a2bba68c4d46ea3dee436f640c328fb682/src/Data/ElfEdit/Relocations/AArch64.hs | haskell |
AArch64 64bit relocation type.
----------------------------------------------------------------------
| Relocation types for AARCH64 code.
N.B. The type intentionally uses mixedcase for "AArch64" to match
constants in `elf.h`
| Maps known AArch64 relocation types to their string representation. | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE PatternSynonyms #
# LANGUAGE TypeFamilies #
module Data.ElfEdit.Relocations.AArch64
( AArch64_RelocationType(..)
, pattern R_AARCH64_ABS64
, pattern R_AARCH64_GLOB_DAT
, pattern R_AARCH64_JUMP_SLOT
, pattern R_AARCH64_RELATIVE
, pattern R_AARCH64_TLS_DTPMOD... |
4e2878c530b259c031494c1b28d37888defdc3e98ef0a27fb3d3f972dc3050a3 | typelead/intellij-eta | Pragma00002.hs | module Pragma00002 where
data Vector a = Pull DIM1 {-# UNPACK #-} !a
# CORE " bar " #
g x = let xs = {-# SCC "X" #-} [1..1000000] in x | null | https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/test/resources/fixtures/eta/sources/Pragma00002.hs | haskell | # UNPACK #
# SCC "X" # | module Pragma00002 where
# CORE " bar " #
|
95c6e079f4c3f4e2852e2c3aa4dbb0213d891f7f0653cc84c844097493667b3d | roburio/udns | dns_resolver_utils.ml | ( c ) 2017 , 2018 , all rights reserved
open Dns
open Dns_resolver_cache
open Rresult.R.Infix
let invalid_soa name =
let p pre =
match Domain_name.(prepend_label name "invalid" >>= fun n -> prepend_label n pre) with
| Ok name -> name
| Error _ -> name
in
{
Soa.nameserver = p "ns" ; hostmast... | null | https://raw.githubusercontent.com/roburio/udns/585c40933ac3d5eceb351f7edd3f45cf2615a9f8/resolver/dns_resolver_utils.ml | ocaml | maybe should be passed explicitly (when we don't do qname minimisation)
ANSWER
NODATA (no answer, but SOA (or not) in authority)
the "sub" should be relaxed - for dig ns mail.mehnert.org I get soa in mehnert.org!
--> but how to discover SOA/zone boundaries?
i really don't know how to handle ANY NoDA... | ( c ) 2017 , 2018 , all rights reserved
open Dns
open Dns_resolver_cache
open Rresult.R.Infix
let invalid_soa name =
let p pre =
match Domain_name.(prepend_label name "invalid" >>= fun n -> prepend_label n pre) with
| Ok name -> name
| Error _ -> name
in
{
Soa.nameserver = p "ns" ; hostmast... |
ea6ff5cb977393a4d38caded4d03de90624b2ef2448c95991dd06b9364731f84 | mnieper/unsyntax | 128.scm | FIXME : At the moment , the SRFI 128 implementation is obsolete .
Copyright © ( 2020 ) .
;; This file is part of unsyntax.
;; Permission is hereby granted, free of charge, to any person
;; obtaining a copy of this software and associated documentation files
( the " Software " ) , to deal in the Software wi... | null | https://raw.githubusercontent.com/mnieper/unsyntax/cd12891805a93229255ff0f2c46cf0e2b5316c7c/src/srfi/128.scm | scheme | This file is part of unsyntax.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission n... | FIXME : At the moment , the SRFI 128 implementation is obsolete .
Copyright © ( 2020 ) .
( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
po... |
66fb473060b2ab800a9f1847fd7c2c60221e98245c272555c8a7863ba6e93d9f | brownplt/pyret-docs | cmdline.js.rkt | #lang scribble/base
@(require "../../scribble-api.rkt")
@docmodule["cmdline"]{
@; Ignored type testers
@ignore[(list "is-success" "is-arg-error")]
@; Unknown: PLEASE DOCUMENT
@ignore[(list "file-name" "args")]
@section[#:tag "cmdline_ReExports"]{Re-exported values}
@re-export["left" (from (xref "either" "le... | null | https://raw.githubusercontent.com/brownplt/pyret-docs/a7aad4c6432e6863b3a3a7a6adb4aedfc6c7ca0d/src/trove/cmdline.js.rkt | racket | Ignored type testers
Unknown: PLEASE DOCUMENT
N.B. need para here to keep xref inline with text
N.B. need para here to keep xref inline with text | #lang scribble/base
@(require "../../scribble-api.rkt")
@docmodule["cmdline"]{
@ignore[(list "is-success" "is-arg-error")]
@ignore[(list "file-name" "args")]
@section[#:tag "cmdline_ReExports"]{Re-exported values}
@re-export["left" (from (xref "either" "left"))]{
@para{See @xref["either" "left"]}
}
@re-... |
a7b4d2b541bdcf5e70ba9851ce2d46c73c7881cbb631c72547d0f088f3eae45a | bbc/haskell-workshop | C5Tests.hs | module C5Tests where
import Test.Hspec
import qualified C5StartingOut as C5
testC5 = hspec $ do
describe "C5" $ do
it "myMin is implememted correctly" $ do
C5.myMin [4,5,6] `shouldBe` 4
C5.myMin [10] `shouldBe` 10
C5.myMin [100, 23, 11] `shouldBe` 11
it "myMap ... | null | https://raw.githubusercontent.com/bbc/haskell-workshop/475b9bac04167665030d7863798ccd27dfd589d0/matttaylor/tests/C5Tests.hs | haskell | module C5Tests where
import Test.Hspec
import qualified C5StartingOut as C5
testC5 = hspec $ do
describe "C5" $ do
it "myMin is implememted correctly" $ do
C5.myMin [4,5,6] `shouldBe` 4
C5.myMin [10] `shouldBe` 10
C5.myMin [100, 23, 11] `shouldBe` 11
it "myMap ... | |
b857dd00a43d57d011a6a714a88c661aea7c0c0fe285259a5f4d7fd5f4625b35 | chrovis/cljam | whole_genome_test.clj | (ns cljam.util.whole-genome-test
(:require [clojure.test :refer [deftest is are testing]]
[cljam.util.whole-genome :as wg]))
(def simple-refs [{:name "1", :len 100} {:name "2", :len 200} {:name "3", :len 300}])
(def refs
[{:name "chr1", :len 248956422} {:name "chr2", :len 242193529} {:name "chr3", :l... | null | https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/test/cljam/util/whole_genome_test.clj | clojure | (ns cljam.util.whole-genome-test
(:require [clojure.test :refer [deftest is are testing]]
[cljam.util.whole-genome :as wg]))
(def simple-refs [{:name "1", :len 100} {:name "2", :len 200} {:name "3", :len 300}])
(def refs
[{:name "chr1", :len 248956422} {:name "chr2", :len 242193529} {:name "chr3", :l... | |
5a6945f750706985fd71205abbab2c5bc3edcfd1097c83349da31080f34e84dc | conscell/hugs-android | ST.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.Array.ST
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : experimental
-- Portability : non-portabl... | null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/base/Data/Array/ST.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Array.ST
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : non-portable (uses Data.Array.MArray)
-------------------------------------------... | Copyright : ( c ) The University of Glasgow 2001
Mutable boxed and unboxed arrays in the ' Control . . ST.ST ' monad .
module Data.Array.ST (
instance of : , MArray
runSTArray,
* arrays
instance of : , MArray
runSTUArray,
: : STUArray s i a - > ST s ( STUArray s i b )
module Data.Array... |
adf4a620d9091e5e33940017c4e99c54d2450ca79f4d83d9af53ba6a13d4c578 | seagreen/ian | ApplicativeParser.hs | -- | Demonstration of static analysis with an Applicative parser.
--
-- + This is a toy example showing tracking of keywords.
module Scratch.ApplicativeParser where
import qualified Data.Set as Set
import qualified Data.Text as Text
import Scratch.Prelude
import Test.Hspec
data Parser a = Parser
{ keywords :: Set K... | null | https://raw.githubusercontent.com/seagreen/ian/f245fb68d94299f0e3e12744e9d1549447ad529a/haskell/src/Scratch/ApplicativeParser.hs | haskell | | Demonstration of static analysis with an Applicative parser.
+ This is a toy example showing tracking of keywords.
| Input
| Unconsumed input and result
If we wanted to make this module really useful
we'd also write an Alternative instance,
* Example use
If we want to forbid the keywords of our language
fro... | module Scratch.ApplicativeParser where
import qualified Data.Set as Set
import qualified Data.Text as Text
import Scratch.Prelude
import Test.Hspec
data Parser a = Parser
{ keywords :: Set Keyword,
runParserWithKeywords :: Set Keyword -> Text -> Maybe (Text, a)
}
newtype Keyword
= Keyword Text
deriving (... |
3401f7d65d1be7d12d9ba39719e0d40ffdef2d95f543c088b8ed414e493b60ad | juliannagele/ebso | gas_cost.mli | Copyright 2019 and under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distributed under ... | null | https://raw.githubusercontent.com/juliannagele/ebso/8e516036fcb98074b6be14fc81ae020f76977712/lib/gas_cost.mli | ocaml | Copyright 2019 and under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distributed under ... | |
b328ce108b76847f6f0d904fc4ade50cd2f85dd7ca766abcd4ad2fafa89859b4 | dpiponi/Stellarator | Step.hs | module Step where
import Asm
import Emulation
import Atari2600
import Prelude hiding (and)
import Data.Int
import Control.Monad
import ALU
-- Trying not having this inlined { - # IGNOREINLINABLE step # - }
step :: MonadAtari ()
step = do
--dumpState
p0 <- getPC
if p0 = = 0x3781 then debug .= True else retur... | null | https://raw.githubusercontent.com/dpiponi/Stellarator/77f86a6d3e513e5662d9dab625c19a1202a24776/src/Step.hs | haskell | Trying not having this inlined { - # IGNOREINLINABLE step # - }
dumpState
XXX
XXX undocumented "DOP" nop
dumpState | module Step where
import Asm
import Emulation
import Atari2600
import Prelude hiding (and)
import Data.Int
import Control.Monad
import ALU
step :: MonadAtari ()
step = do
p0 <- getPC
if p0 = = 0x400 then liftIO $ putStrLn " Started ! ! ! " else return ( )
if p0 = = 0x3770 then liftIO $ putStrLn " Pass... |
bb96114a003608260cf150ce4c751bab0d4bc5326ba3317acabf2d8456d6f61d | db48x/xe2 | cons-package.lisp | (defpackage :cons-game
(:documentation "CONS is an alternate universe sci-fi shooter game.")
(:use :xe2 :common-lisp)
(:export cons-game))
(in-package :cons-game)
| null | https://raw.githubusercontent.com/db48x/xe2/7896fcc69f5c6e28eaf6f6abb7966d6663370a66/cons/cons-package.lisp | lisp | (defpackage :cons-game
(:documentation "CONS is an alternate universe sci-fi shooter game.")
(:use :xe2 :common-lisp)
(:export cons-game))
(in-package :cons-game)
| |
cb75084061f6150d6ef13723bf0527203b3702265cba3f731dc6b9558da511be | lilydjwg/myhaskells | Lrc.hs | module Text.Lrc (
parseLrc,
addTime,
lrcAddOffset,
Lrc(..),
LrcLine(..),
) where
import Data.Char (isDigit)
import Data.Functor ((<$>))
import Data.List (sort)
import Data.Maybe (isJust, fromJust)
import Text.ParserCombinators.Parsec
import Text.String (parseInt)
data Lrc = Lrc {
title :: Maybe String,
... | null | https://raw.githubusercontent.com/lilydjwg/myhaskells/9a028c36a46e811e56d47a11ac4f261787fba0cf/lib/Text/Lrc.hs | haskell | module Text.Lrc (
parseLrc,
addTime,
lrcAddOffset,
Lrc(..),
LrcLine(..),
) where
import Data.Char (isDigit)
import Data.Functor ((<$>))
import Data.List (sort)
import Data.Maybe (isJust, fromJust)
import Text.ParserCombinators.Parsec
import Text.String (parseInt)
data Lrc = Lrc {
title :: Maybe String,
... | |
8271c76a8cc30c9d943e90654add9de6476428c0d0b353af21f7c31f83fa11da | lispgames/glop | package.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*-
(defpackage :glop
(:use #:cl)
(:export
#:load-libraries
;; video modes
#:list-video-modes #:set-video-mode #:current-video-mode
GL
#:create-gl-context #:destroy-gl-context #:attach-gl-context #:detach-gl-co... | null | https://raw.githubusercontent.com/lispgames/glop/45e722ab4a0cd2944d550bf790206b3326041e38/src/package.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*-
video modes
window
state
events
events methods
helper macros
multiple windows
platform-specific export for external event loop |
(defpackage :glop
(:use #:cl)
(:export
#:load-libraries
#:list-video-modes #:set-video-mode #:current-video-mode
GL
#:create-gl-context #:destroy-gl-context #:attach-gl-context #:detach-gl-context
#:gl-get-proc-address
#:window #:open-window #:close-window
#:create-window #:destroy-window
#:... |
ac6da8629b95da8acdd0053f9a33971e5cccd55324648014d63f86c12b91e8bb | haskell-distributed/distributed-process-platform | Execution.hs | -----------------------------------------------------------------------------
-- |
-- Module : Control.Distributed.Process.Platform.Execution
Copyright : ( c ) 2013 - 2014
-- License : BSD3 (see the file LICENSE)
--
Maintainer : < >
-- Stability : experimental
-- Portability : non-porta... | null | https://raw.githubusercontent.com/haskell-distributed/distributed-process-platform/46d63f81910e7dd527fb1d41e654a5cfb0dbfdba/src/Control/Distributed/Process/Platform/Execution.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Distributed.Process.Platform.Execution
License : BSD3 (see the file LICENSE)
Stability : experimental
Portability : non-portable (requires concurrency)
The /Execution Framework/ provides tools for load... | Copyright : ( c ) 2013 - 2014
Maintainer : < >
[ Inter - Process Traffic Management ]
module Control.Distributed.Process.Platform.Execution
module Control.Distributed.Process.Platform.Execution.Mailbox
, module Control.Distributed.Process.Platform.Execution.Exchange
) where
import Control.... |
a71a6cf74274bb10996f8d506a2ba37dd9db31cec9b312c5780daf8c3735b6d4 | racket/eopl | interp.rkt | #lang eopl
;; interpreter for the CALL-BY-REFERENCE language
(require "lang.rkt")
(require "data-structures.rkt")
(require "environments.rkt")
(require "store.rkt")
(require "pairvals.rkt")
(require (only-in racket pretty-print))
(provide value-of-program value-of instrument-let instrument-newref)
;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter4/call-by-reference/interp.rkt | racket | interpreter for the CALL-BY-REFERENCE language
switches for instrument-let ;;;;;;;;;;;;;;;;
say (instrument-let #t) to turn instrumentation on.
(instrument-let #f) to turn it off again.
the interpreter ;;;;;;;;;;;;;;;;
straightforward version of LET, without instrumentation
(let-exp (id rhs body)
... | #lang eopl
(require "lang.rkt")
(require "data-structures.rkt")
(require "environments.rkt")
(require "store.rkt")
(require "pairvals.rkt")
(require (only-in racket pretty-print))
(provide value-of-program value-of instrument-let instrument-newref)
(define instrument-let (make-parameter #f))
value - of - pr... |
cecf9d408b5a61836e9d65b0fba7242732c2ba3c5ebe1534b26dafe376e3e866 | masonium/cl-autodiff | tests.lisp | (in-package :cl-autodiff-system)
(defpackage :cl-autodiff-tests
(:nicknames :autodiff-tests)
(:documentation "Unit tests for cl-autodiff")
(:use :common-lisp :autodiff :fiveam)
(:export run-tests))
(in-package :cl-autodiff-tests)
(def-suite defun-ad-tests)
(in-suite defun-ad-tests)
(defun approx-= (x y)
(... | null | https://raw.githubusercontent.com/masonium/cl-autodiff/922c1df59d7ba9c7213f661b4b8b9bec0d8931a2/tests.lisp | lisp | (in-package :cl-autodiff-system)
(defpackage :cl-autodiff-tests
(:nicknames :autodiff-tests)
(:documentation "Unit tests for cl-autodiff")
(:use :common-lisp :autodiff :fiveam)
(:export run-tests))
(in-package :cl-autodiff-tests)
(def-suite defun-ad-tests)
(in-suite defun-ad-tests)
(defun approx-= (x y)
(... | |
f061bf2bc3f726b8940bf3590ffb297c754e9dde8a608a05f2c3768e42e23f4c | mtnygard/ssh-repl | pubkey.clj | (ns ssh-repl.pubkey
(:import [java.math BigInteger]
[java.security KeyFactory PublicKey]
[java.security.spec DSAPublicKeySpec RSAPublicKeySpec]
[java.util Scanner]))
(defn decode-string
"Decodes a string from a ByteBuffer."
[bb]
(let [len (.getInt bb)
buf (byte-array le... | null | https://raw.githubusercontent.com/mtnygard/ssh-repl/c5c8ed825a9c5beb8ab11cfe72cebff4dbd09913/src/ssh_repl/pubkey.clj | clojure | (ns ssh-repl.pubkey
(:import [java.math BigInteger]
[java.security KeyFactory PublicKey]
[java.security.spec DSAPublicKeySpec RSAPublicKeySpec]
[java.util Scanner]))
(defn decode-string
"Decodes a string from a ByteBuffer."
[bb]
(let [len (.getInt bb)
buf (byte-array le... | |
ea7757e65b5e2dc48e22c582aafadebca0824cd253e4b1c4c68f73851e7748bf | acieroid/scala-am | pico.scm | ;-----------------------------------;
> > > Pico - ag < < < ;
;
; Lab voor Programmeerkunde VUB ;
� 1995 ;
;-----------------------------------;
;----------------------------------------------------------------------------;
; <void> ... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/pico.scm | scheme | -----------------------------------;
Lab voor Programmeerkunde VUB ;
-----------------------------------;
----------------------------------------------------------------------------;
<void> -> [_VOI_TAG_] ;
<number> -> [_NBR_TAG_,NbrSet] ... |
(define _VOI_TAG_ 0)
(define _NBR_TAG_ 1)
(define _SYM_TAG_ 2)
(define _FUN_TAG_ 3)
(define _TAB_TAG_ 4)
(define _NAT_TAG_ 5)
(define _DFN_TAG_ 6)
(define _RFN_TAG_ 7)
(define _STN_TAG_ 8)
(define _DFF_TAG_ 9)
(define _RFF_TAG_ 10)
(define _STF_TAG_ 11)
(define _DFT_TAG_ 12)
(define _RFT_TAG_ 13)
(define _S... |
56be7e00a0577047c78edf2777e77b806ce4f48f4acecb1f2d31bc69039479fc | tonsky/grumpy | package.clj | (ns grumpy.package
(:require
[clojure.edn :as edn]
[clojure.string :as str]
[clojure.java.io :as io]
[cljs.build.api :as cljs]
[uberdeps.api :as uberdeps]))
(defn compile-cljs []
(let [t0 (System/currentTimeMillis)]
(println "[package] Compiling target/uberjar/static/editor.js...")
(clj... | null | https://raw.githubusercontent.com/tonsky/grumpy/40f1bf935b65ccf52c2e3c753e3af3d7e60f055b/package/grumpy/package.clj | clojure | (ns grumpy.package
(:require
[clojure.edn :as edn]
[clojure.string :as str]
[clojure.java.io :as io]
[cljs.build.api :as cljs]
[uberdeps.api :as uberdeps]))
(defn compile-cljs []
(let [t0 (System/currentTimeMillis)]
(println "[package] Compiling target/uberjar/static/editor.js...")
(clj... | |
ca62f0a997898bf7ae5dec2b2236ff8ab83061078f5f9dbdc2acdd77a41e8469 | rems-project/lem | rational_impl.ml | module QI = struct
include Q
let floor x = Z.fdiv (num x) (den x)
let ceiling x = Z.cdiv (num x) (den x)
let of_big_int = of_bigint
end
| null | https://raw.githubusercontent.com/rems-project/lem/a839114e468119d9ac0868d7dc53eae7f3cc3a6c/ocaml-lib/num_impl_zarith/rational_impl.ml | ocaml | module QI = struct
include Q
let floor x = Z.fdiv (num x) (den x)
let ceiling x = Z.cdiv (num x) (den x)
let of_big_int = of_bigint
end
| |
bde8a817ad71f7547d6d979ca73ca271b7a5d3a00131a776d25cd6564b658771 | intolerable/stitch | Main.hs | module Main where
import Stitch
import Stitch.Render
import Control.Monad
import Criterion.Main
import Data.Monoid
import Prelude
main :: IO ()
main = defaultMain
[ bgroup "css"
[ bench "basic" $ nf renderCSS example
, bench "compressed" $ nf (renderCSSWith compressed) example ] ]
example :: CSS
example =... | null | https://raw.githubusercontent.com/intolerable/stitch/316eaaafdacec5fe31256e7b14bf2291d6c24049/bench/Main.hs | haskell | module Main where
import Stitch
import Stitch.Render
import Control.Monad
import Criterion.Main
import Data.Monoid
import Prelude
main :: IO ()
main = defaultMain
[ bgroup "css"
[ bench "basic" $ nf renderCSS example
, bench "compressed" $ nf (renderCSSWith compressed) example ] ]
example :: CSS
example =... | |
7aad4ab90a7738bf21beb96c7f2434720e3c710b0dbd93ac1b49c340ffd14910 | jeffshrager/biobike | markov-functions-aux.lisp | ;;;; -*- mode: Lisp; Syntax: Common-Lisp; Package: bbi; -*-
(IN-PACKAGE :BBI)
(DEFUN Markov-score
(results lbuf0 lbuf1 order seq start end model both-strands?)
(DECLARE (IGNORABLE both-strands? lbuf1))
(DECLARE (Simple-string seq))
(DECLARE (FIXNUM start end))
(DECLARE ((Simple-array Single-float (... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/bike/markov-functions-aux.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; Package: bbi; -*-
FOR backward FIXNUM FROM (1- (LENGTH-SEQ)) DOWNTO (1- start)
(WHEN DNA?
)))
(when dna?
))))) |
(IN-PACKAGE :BBI)
(DEFUN Markov-score
(results lbuf0 lbuf1 order seq start end model both-strands?)
(DECLARE (IGNORABLE both-strands? lbuf1))
(DECLARE (Simple-string seq))
(DECLARE (FIXNUM start end))
(DECLARE ((Simple-array Single-float (2)) results))
(DECLARE (OPTIMIZE (Speed 3) (Safety 0) (Debug... |
3531547cc29c155504a05a712a2a98c5bfb148a3d941f24d07404069d48f8369 | calvis/cKanren | fd.rkt | #lang racket
(require cKanren/unstable/interval-domain
cKanren/ck
cKanren/src/framework
cKanren/src/events
cKanren/src/constraints
cKanren/src/triggers
cKanren/src/operators)
(provide (all-defined-out))
;; domains
(define-syntax-rule (infd x0 x ... e)
(let ([n... | null | https://raw.githubusercontent.com/calvis/cKanren/8714bdd442ca03dbf5b1d6250904cbc5fd275e68/cKanren/unstable/fd.rkt | racket | domains
(define (<=fd u v)
(<=fd-c u v))
(define (+fd u v w)
(+fd-c u v w))
(define (timesfd u v w)
(timesfd-c u v w))
(define (distinctfd v*)
;;;
(define ((existing-domain x) oc)
(eq? (car (oc-rands oc)) x))
;; gives x the domain dom in the constraint store c
(define (ext-d x dom)
... | #lang racket
(require cKanren/unstable/interval-domain
cKanren/ck
cKanren/src/framework
cKanren/src/events
cKanren/src/constraints
cKanren/src/triggers
cKanren/src/operators)
(provide (all-defined-out))
(define-syntax-rule (infd x0 x ... e)
(let ([n* e])
(... |
b79217a9f208a33a1515d462c93c9f523fda7b0ff079c42545d3629b54d3dcf0 | gsakkas/rite | 20060406-16:51:34-f6a4b5a7a5903facda19e0431adb571e.seminal.ml | # # # # # # # #
# # # # # # #
# # # # # # # # # # # # # # # # #
# # # # # # #
#######
#################
#######
*)
* * * * * Note : Problem 1 does not use ; see the assignment * * * *
exception Unimplemented
exception RuntimeTypeError
exception BadSourceProgram
exception BadPrecomputation
... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060406-16%3A51%3A34-f6a4b5a7a5903facda19e0431adb571e.seminal.ml | ocaml | store env!
********* examples and testing **********
let e = Second(Int(1))
let e = First(Int(1)) | # # # # # # # #
# # # # # # #
# # # # # # # # # # # # # # # # #
# # # # # # #
#######
#################
#######
*)
* * * * * Note : Problem 1 does not use ; see the assignment * * * *
exception Unimplemented
exception RuntimeTypeError
exception BadSourceProgram
exception BadPrecomputation
... |
b75c32b2f97e77913987cc61982fe12f66bfcba442b9a91a4c82bb699b798737 | gcross/LogicGrowsOnTrees | tree-versus-list-nqueens.hs | # LANGUAGE UnicodeSyntax #
import Criterion.Main
import LogicGrowsOnTrees
import LogicGrowsOnTrees.Checkpoint
import LogicGrowsOnTrees.Examples.Queens
import LogicGrowsOnTrees.Utils.WordSum
import LogicGrowsOnTrees.Parallel.Common.Worker (exploreTreeGeneric)
import LogicGrowsOnTrees.Parallel.ExplorationMode (Explorat... | null | https://raw.githubusercontent.com/gcross/LogicGrowsOnTrees/4befa81eb7152d877a7c78338d21bed61b06db66/LogicGrowsOnTrees/benchmarks/tree-versus-list-nqueens.hs | haskell | evaluated once, which distorts the benchmark. | # LANGUAGE UnicodeSyntax #
import Criterion.Main
import LogicGrowsOnTrees
import LogicGrowsOnTrees.Checkpoint
import LogicGrowsOnTrees.Examples.Queens
import LogicGrowsOnTrees.Utils.WordSum
import LogicGrowsOnTrees.Parallel.Common.Worker (exploreTreeGeneric)
import LogicGrowsOnTrees.Parallel.ExplorationMode (Explorat... |
c6b7a63eb2ace34a0127c4eb3b4d72bfa2b175f0291329751bfdca8fee5ee013 | haskell-graphql/graphql-api | Value.hs | -- | Description: Literal GraphQL values
# LANGUAGE PatternSynonyms #
module GraphQL.Value
( Value
, Value'(..)
, ConstScalar
, UnresolvedVariableValue
, pattern ValueInt
, pattern ValueFloat
, pattern ValueBoolean
, pattern ValueString
, pattern ValueEnum
, pattern ValueList
, pattern ValueObject... | null | https://raw.githubusercontent.com/haskell-graphql/graphql-api/8ced344485cd638cee50eeb6b653baecea359406/src/GraphQL/Value.hs | haskell | | Description: Literal GraphQL values
* Names
* Objects
** Constructing
** Combining
** Querying
* Converting to and from Value | # LANGUAGE PatternSynonyms #
module GraphQL.Value
( Value
, Value'(..)
, ConstScalar
, UnresolvedVariableValue
, pattern ValueInt
, pattern ValueFloat
, pattern ValueBoolean
, pattern ValueString
, pattern ValueEnum
, pattern ValueList
, pattern ValueObject
, pattern ValueNull
, toObject
, v... |
a0dde01dcb39403b3968769fec5a46aade75a4eb09e46179adda6a70750abc53 | fission-codes/fission | Log.hs | module Fission.Internal.Log
( logInfo
, logDebug
, logDebugN
, logWarn
, logError
, logErrorN
, logOther
, logUser
) where
import Control.Monad.Logger hiding (logDebug, logError, logInfo,
logOther, logWarn)
import GHC.Stack
import RIO ... | null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-core/library/Fission/Internal/Log.hs | haskell | module Fission.Internal.Log
( logInfo
, logDebug
, logDebugN
, logWarn
, logError
, logErrorN
, logOther
, logUser
) where
import Control.Monad.Logger hiding (logDebug, logError, logInfo,
logOther, logWarn)
import GHC.Stack
import RIO ... | |
6a173a269871becf8873c0e9e37ec1cd1162b71154d7505ff2e59fed286ab04b | typelead/etlas | JobControl.hs | -----------------------------------------------------------------------------
-- |
Module : Distribution . Client . JobControl
Copyright : ( c ) 2012
-- License : BSD-like
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-- A job control concurrency abstraction
-... | null | https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas/Distribution/Client/JobControl.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-like
Maintainer :
Stability : provisional
Portability : portable
A job control concurrency abstraction
---------------------------------------------------------------------------
| A simple concurrency abstr... | Module : Distribution . Client . JobControl
Copyright : ( c ) 2012
module Distribution.Client.JobControl (
JobControl,
newSerialJobControl,
newParallelJobControl,
spawnJob,
collectJob,
remainingJobs,
cancelJobs,
JobLimit,
newJobLimit,
withJobLimit,
Lock,
... |
d60e58af971299a4f1bcd8d8c2eabdea74c02ee480561591a6117b4775f4eb45 | BumblebeeBat/FlyingFox | flying_fox_sup.erl | -module(flying_fox_sup).
-behaviour(supervisor).
, start_http/0 ] ) .
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []).
-define(keys, [keys, accounts, channels, block_dump, block_pointers, block_finality, secrets, entropy... | null | https://raw.githubusercontent.com/BumblebeeBat/FlyingFox/0fa039cd2394b08b1a85559f9392086c6be47fa6/src/consensus/flying_fox_sup.erl | erlang | exit(keys, kill).
supervisor:terminate_child(flying_fox_sup, keys). | -module(flying_fox_sup).
-behaviour(supervisor).
, start_http/0 ] ) .
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []).
-define(keys, [keys, accounts, channels, block_dump, block_pointers, block_finality, secrets, entropy... |
48d4358864644418a2fe29cca28de413b62ee0f6c4aeba88b5c2c06fa773e836 | simon-brooke/dog-and-duck | collections_test.clj | (ns dog-and-duck.quack.picky.collections-test
(:require [clojure.test :refer [deftest is testing]]
[dog-and-duck.quack.picky.collections :refer
[collection-page-faults paged-collection-faults
simple-collection-faults]]
[dog-and-duck.quack.picky.constants :refer
... | null | https://raw.githubusercontent.com/simon-brooke/dog-and-duck/3aad725134a5a3e1cdec5521aa4a2d3e4e67c3d3/test/dog_and_duck/quack/picky/collections_test.clj | clojure | This program is free software; you can redistribute it and/or
either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A ... | (ns dog-and-duck.quack.picky.collections-test
(:require [clojure.test :refer [deftest is testing]]
[dog-and-duck.quack.picky.collections :refer
[collection-page-faults paged-collection-faults
simple-collection-faults]]
[dog-and-duck.quack.picky.constants :refer
... |
54ef4d6275af3d8e66501cfe45945be96d52a5273fb84216704ff3dd4a7314e7 | rm-hull/big-bang | core.cljs | (ns big-bang.core
(:require
[cljs.core.async :refer [<! >! chan alts!]]
[big-bang.protocol :refer [data-channel shutdown! no-op wrap-channel]]
[big-bang.package :refer [package? extract-message extract-world-state]]
[big-bang.timer :refer [interval-ticker]]
[big-bang.events.handler :refer [add-eve... | null | https://raw.githubusercontent.com/rm-hull/big-bang/2825e7f0bb7615e1158a72d58f426bc1e33bd9ef/src/big_bang/core.cljs | clojure | Draw initial state
initiate shutdown
TODO: this won't return to the original caller.. need to think about that
keep on truckin'
deprecated: | (ns big-bang.core
(:require
[cljs.core.async :refer [<! >! chan alts!]]
[big-bang.protocol :refer [data-channel shutdown! no-op wrap-channel]]
[big-bang.package :refer [package? extract-message extract-world-state]]
[big-bang.timer :refer [interval-ticker]]
[big-bang.events.handler :refer [add-eve... |
fd68ec7b949283690e780a77e521807cffb03764b3724dae2fc1603ef94b04bc | kingcons/colorize | coloring-support.lisp | ;; coloring-support.lisp
(in-package :colorize)
(defun close-dangling-parenthesis (paren-counter)
"Emit enough </span> tags to account for missing close parenthesis in the source."
(format nil "~{~A~}"
(loop for i from paren-counter downto 1
collect "</span></span>")))
(defmacro format-parenthesis (... | null | https://raw.githubusercontent.com/kingcons/colorize/ea676b584e0899cec82f21a9e6871172fe3c0eb5/coloring-support.lisp | lisp | coloring-support.lisp |
(in-package :colorize)
(defun close-dangling-parenthesis (paren-counter)
"Emit enough </span> tags to account for missing close parenthesis in the source."
(format nil "~{~A~}"
(loop for i from paren-counter downto 1
collect "</span></span>")))
(defmacro format-parenthesis (paren &key
open... |
c082737962217baacb4e13a6842557197fe9fff47dc1e0c91b8e02574a4552e3 | jordanthayer/ocaml-search | level.ml | * The known portion of the current level .
TODO :
* Instead of copying the screen into the level each tick , just
track the updates ( probably one column at a time ) . May need a
set to keep track of which colums in the level have an ' unknown '
value in it so that it can be fixed when... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/luigi/level.ml | ocaml | Completely unblocked.
Blocked going down, but you can jump thru from the bottom.
Blocked from all sides.
An enemy flower pot or a cannon.
* [char_of_tile elm] gets a character representation of a
screen tile for printing.
* [tile_width] the width of a tile (in the same units as a MOB's
location).
* [ti... | * The known portion of the current level .
TODO :
* Instead of copying the screen into the level each tick , just
track the updates ( probably one column at a time ) . May need a
set to keep track of which colums in the level have an ' unknown '
value in it so that it can be fixed when... |
a7260d0e8990d22632b87ad271066893edc9cb5fa9ca98916298720c67573cc4 | tmattio/js-bindings | vscode_jsonrpc_message_reader.mli | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]]
[@@@js.scope "__LIB__VSCODE_JSONRPC__IMPORTS"]
open Es2020
module DataCallback : sig
type t
val t_to_js : t -> Ojs.t
val t_of_js : Ojs.t -> t
val apply : t -> data:Vscode_jsonrpc_messages.Message.t -> unit [@@js.apply]... | null | https://raw.githubusercontent.com/tmattio/js-bindings/ca3bd6a12db519c8de7f41b303f14cf70cfd4c5f/lib/vscode-jsonrpc/vscode_jsonrpc_message_reader.mli | ocaml | FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unknown type
FIXME: unkn... | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]]
[@@@js.scope "__LIB__VSCODE_JSONRPC__IMPORTS"]
open Es2020
module DataCallback : sig
type t
val t_to_js : t -> Ojs.t
val t_of_js : Ojs.t -> t
val apply : t -> data:Vscode_jsonrpc_messages.Message.t -> unit [@@js.apply]... |
3f66a787778e26565b7a6822bc7f93a3a3cff72787a0a56b660cbc2199d49c92 | tonyg/kali-scheme | binding.scm | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1998 by NEC Research Institute , Inc. See file COPYING .
; Bindings: used to store bindings in packages.
; Representation is #(type place operator-or-transform-or-#f [path]).
; PLACE is a unique (to EQ?) value, usually a location.
; Why aren't these re... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/bcomp/binding.scm | scheme | Bindings: used to store bindings in packages.
Representation is #(type place operator-or-transform-or-#f [path]).
PLACE is a unique (to EQ?) value, usually a location.
Why aren't these records? Because they need to be written out in
the initial image?
Used when updating a package binding.
Return a binding that'... | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1998 by NEC Research Institute , Inc. See file COPYING .
(define binding? vector?)
(define (binding-type b) (vector-ref b 0))
(define (binding-place b) (vector-ref b 1))
(define (binding-static b) (vector-ref b 2))
(define (binding-path binding)
... |
d73069d66094a3bef6acf4b28b5d7e7e763b00adeff3437dc4c1047b4ecba2de | asmyczek/simple-avro | core.clj | (ns simple-avro.core
{:doc "Core namespace defines serialization/de-serialization functions."}
(:require (clojure.contrib [json :as json]))
(:import (java.io FileOutputStream ByteArrayOutputStream ByteArrayInputStream)
(org.apache.avro Schema Schema$Type Schema$Field)
(org.apache.avro.generi... | null | https://raw.githubusercontent.com/asmyczek/simple-avro/25825319e008316e20e9d4d867e2d88fcd389c7c/src/simple_avro/core.clj | clojure |
Encoding
Default implementations
Decoding
Custom avro type methods
| (ns simple-avro.core
{:doc "Core namespace defines serialization/de-serialization functions."}
(:require (clojure.contrib [json :as json]))
(:import (java.io FileOutputStream ByteArrayOutputStream ByteArrayInputStream)
(org.apache.avro Schema Schema$Type Schema$Field)
(org.apache.avro.generi... |
db7ada617b187b468303177188b9c597edb799e0f4d239db61a958cb88cf6acf | yzhs/ocamlllvm | debuginfo.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/asmcomp/debuginfo.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Gallium , INRIA Rocquencourt
Copyright 2006 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
type kind = Dinfo_call | Dinfo_raise
t... |
12bd9ac1c3aae1d3851767f4d445b377dffad45ea93f0b9bfcb4c65425b59cfd | snmsts/cl-langserver | events.lisp | (in-package :ls-base)
;;;;; Event Processing
(defvar *sly-db-quit-restart* nil
"The restart that will be invoked when the user calls sly-db-quit.")
Establish a top - level restart and execute BODY .
;; Execute K if the restart is invoked.
(defmacro with-top-level-restart ((connection k) &body body)
`(with-conn... | null | https://raw.githubusercontent.com/snmsts/cl-langserver/3b1246a5d0bd58459e7a64708f820bf718cf7175/src/helitage/events.lisp | lisp | Event Processing
Execute K if the restart is invoked.
Event history end.~%~
Backtrace:~%~{~A~%~}~
condition: ~A~%~
type: ~S~%~
style: ~S]~%" | (in-package :ls-base)
(defvar *sly-db-quit-restart* nil
"The restart that will be invoked when the user calls sly-db-quit.")
Establish a top - level restart and execute BODY .
(defmacro with-top-level-restart ((connection k) &body body)
`(with-connection (,connection)
(restart-case
(let ((*sly-db... |
0105528ae97e17d7de706727bc01db72cce57d6c75ace5fe549a41340479d4b0 | joearms/crypto_tutorial | stream.erl | -module(stream).
-compile(export_all).
START : test
test() ->
Password = <<"secret">>,
Server = spawn(?MODULE, server, [Password, self()]),
Client = spawn(?MODULE, client, [Password, Server]),
Client ! {send_server, <<"hello">>},
Client ! {send_server, <<" world">>},
Client ! stop,
Got = ... | null | https://raw.githubusercontent.com/joearms/crypto_tutorial/e487699017dbd102f67d18f466ff44445d10ba3e/src/stream.erl | erlang | END:test
END:client
END:server | -module(stream).
-compile(export_all).
START : test
test() ->
Password = <<"secret">>,
Server = spawn(?MODULE, server, [Password, self()]),
Client = spawn(?MODULE, client, [Password, Server]),
Client ! {send_server, <<"hello">>},
Client ! {send_server, <<" world">>},
Client ! stop,
Got = ... |
29fb3c9c79df73a2b26748b7f9c897e99d13e647c8e82a759d27a11b79f09aa4 | nominolo/scion | Commands.hs | # LANGUAGE ScopedTypeVariables , CPP , PatternGuards ,
ExistentialQuantification #
ExistentialQuantification #-} -- for 'Cmd'
# OPTIONS_GHC -fno - warn - orphans #
-- |
-- Module : Scion.Server.Commands
Copyright : ( c ) 2008
-- License : BSD-style
--
-- Maintainer :
-- Sta... | null | https://raw.githubusercontent.com/nominolo/scion/99b4589175665687181a932cd836850205625f71/server/Scion/Server/Commands.hs | haskell | for 'Cmd'
|
Module : Scion.Server.Commands
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
Commands provided by the server.
allCommands, allCommands',
these are reused in the vim interface
method: the method to be called
params: arguments to be passed
id ... | # LANGUAGE ScopedTypeVariables , CPP , PatternGuards ,
ExistentialQuantification #
# OPTIONS_GHC -fno - warn - orphans #
Copyright : ( c ) 2008
TODO : Need some way to document the wire protocol . Autogenerate ?
module Scion.Server.Commands (
supportedPragmas, allExposedModules,
) where
im... |
2bb741dd8d2133d412469f579e0bb4cf755ff908b9ebf50d63f54567d102ddeb | skanev/playground | 12.scm | EOPL exercise 1.12
;
; Eliminate the one call to subst-in-s-exp in subst, by replacing it by its
; definition and simplifying the resulting procedure. The result will be a
; version of substs that does not need subst-in-s-exp. This technique is
; called inlining, and is used by optimizing compilers.
(define subst
... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/01/12.scm | scheme |
Eliminate the one call to subst-in-s-exp in subst, by replacing it by its
definition and simplifying the resulting procedure. The result will be a
version of substs that does not need subst-in-s-exp. This technique is
called inlining, and is used by optimizing compilers. | EOPL exercise 1.12
(define subst
(lambda (new old slist)
(if (null? slist)
'()
(cons
(if (symbol? (car slist))
(if (eqv? (car slist) old) new (car slist))
(subst new old (car slist)))
(subst new old (cdr slist))))))
|
049e2fcea7d499dc18ccfb34d46036ccbe4efa02ad35d1fa7cda6f7434100aa4 | quchen/generative-art | SimpleOperations.hs | module Test.Uncategorized.SimpleOperations (tests) where
import Data.Foldable
import Graphics.Rendering.Cairo as C hiding (x, y)
import Draw
import Geometry
import Test.TastyAll
tests :: TestTree
tests = testGroup "Simple operations"
[ testGroup "Visual"
[ rotateLineTest
, perpendicularBisec... | null | https://raw.githubusercontent.com/quchen/generative-art/83ef03521b31485b42112bd93b035a7ee40bc473/test/testsuite/Test/Uncategorized/SimpleOperations.hs | haskell | This nasty point was inside the polygon, because the line leading towards it
as a single intersection with a corner. This led to the false claim that the
point was inside the polygon. | module Test.Uncategorized.SimpleOperations (tests) where
import Data.Foldable
import Graphics.Rendering.Cairo as C hiding (x, y)
import Draw
import Geometry
import Test.TastyAll
tests :: TestTree
tests = testGroup "Simple operations"
[ testGroup "Visual"
[ rotateLineTest
, perpendicularBisec... |
20f1056dff64cf1ebd5f59ad705c20eaff9f33b5c5da3f11a723f0afcebac615 | blockfrost/blockfrost-haskell | Blocks.hs | -- | Information about produced blocks
module Blockfrost.Types.Cardano.Blocks
( Block (..)
) where
import Data.Text (Text)
import Data.Aeson
import Data.Aeson.Types (explicitParseField)
import qualified Data.Vector
import Deriving.Aeson
import Servant.Docs (ToSample (..), singleSample)
import Blockfrost.Types.Sh... | null | https://raw.githubusercontent.com/blockfrost/blockfrost-haskell/5ced57686d95e7b14569e96f4244b701f1e321e4/blockfrost-api/src/Blockfrost/Types/Cardano/Blocks.hs | haskell | | Information about produced blocks
| Information about a block
^ Block number
^ Hash of the block
^ Slot number
^ Epoch number
^ Slot within the epoch
^ Bech32 ID of the slot leader or specific block description in case there is no slot leader
^ Number of transactions in the block
^ VRF key of the block
^ T... |
module Blockfrost.Types.Cardano.Blocks
( Block (..)
) where
import Data.Text (Text)
import Data.Aeson
import Data.Aeson.Types (explicitParseField)
import qualified Data.Vector
import Deriving.Aeson
import Servant.Docs (ToSample (..), singleSample)
import Blockfrost.Types.Shared
data Block = Block
^ Block crea... |
3a4b9c40037226c074f614d84e315382f62574a55b6763d371e9420b05498cd4 | khibino/haskell-relational-record | HDBC.hs | -- |
Module : Database . Relational . HDBC
Copyright : 2019
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : unknown
--
-- This module provides merged namespace of
typed ' Query ' , ' Insert ' , ' InsertQuery ' , ' Update ' , ' KeyUpdate ' and ' Delete '
-- runn... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-query-HDBC/src/Database/Relational/HDBC.hs | haskell | |
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
This module provides merged namespace of
running sequences.
# ANN module "HLint: ignore Use import/export shortcut" # | Module : Database . Relational . HDBC
Copyright : 2019
typed ' Query ' , ' Insert ' , ' InsertQuery ' , ' Update ' , ' KeyUpdate ' and ' Delete '
module Database.Relational.HDBC (
module Database.Relational.HDBC.Query,
module Database.Relational.HDBC.Insert,
module Database.Relational.HDBC.Insert... |
baacbcd61bd6a0ac938f23bd7c8bcef95a919a6808eefb9a5adcf6514d0368b8 | xach/buildapp | buildapp.lisp | ;;;;
Copyright ( c ) 2010 , 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 of source code must retain the above copyright
;;;; notice, this list o... | null | https://raw.githubusercontent.com/xach/buildapp/dd00f18938ccae0a9b406bfcfd882ad32abeb757/buildapp.lisp | lisp |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form... | Copyright ( c ) 2010 , All Rights Reserved
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package #:buildapp)
(defparameter *output-type-pathname*
#+sbcl
(let* ((runtime-symbol (find-symbol "*RUNTIME-PATHNAME*" '#... |
24f53700a3ebf27ebfa18384e44699c6f6d320662628c67ff6fd438bb3917900 | bcc32/projecteuler-ocaml | sol_059.ml | open! Core
open! Import
(* TODO Replace [Bytes.unsafe_{set,get}] with infix notation. *)
let decrypt ciphertext ~key =
let plaintext = Bytes.copy ciphertext in
let key_length = String.length key in
for i = 0 to Bytes.length plaintext - 1 do
Bytes.unsafe_set
plaintext
i
(Char.unsafe_of_int
... | null | https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/e47a58cb8d6a448be8907b1fef2b4d1988fb4c87/sol/sol_059.ml | ocaml | TODO Replace [Bytes.unsafe_{set,get}] with infix notation. | open! Core
open! Import
let decrypt ciphertext ~key =
let plaintext = Bytes.copy ciphertext in
let key_length = String.length key in
for i = 0 to Bytes.length plaintext - 1 do
Bytes.unsafe_set
plaintext
i
(Char.unsafe_of_int
(Char.to_int (Bytes.unsafe_get plaintext i)
lx... |
74b5aaebd7ad527d10e805717747be57124891d3cd58b686079be0fcf65ce5ce | unisonweb/unison | Lens.hs | module Unison.Util.Lens
( Field1',
Field2',
Field3',
Field4',
)
where
import qualified Control.Lens as Lens
type Field1' s a = Lens.Field1 s s a a
type Field2' s a = Lens.Field2 s s a a
type Field3' s a = Lens.Field3 s s a a
type Field4' s a = Lens.Field4 s s a a
| null | https://raw.githubusercontent.com/unisonweb/unison/afe1ba3fe1d94814fe17f06526d07ac47409c525/lib/unison-prelude/src/Unison/Util/Lens.hs | haskell | module Unison.Util.Lens
( Field1',
Field2',
Field3',
Field4',
)
where
import qualified Control.Lens as Lens
type Field1' s a = Lens.Field1 s s a a
type Field2' s a = Lens.Field2 s s a a
type Field3' s a = Lens.Field3 s s a a
type Field4' s a = Lens.Field4 s s a a
| |
74d03e6026c6a54d920c88f1d11721783d646d485ec419dc7c10cace18b3d3aa | kumarshantanu/calfpath | route.cljc | Copyright ( c ) . 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 LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the ... | null | https://raw.githubusercontent.com/kumarshantanu/calfpath/e923ad59106661cd66389cf94954b47558799d00/src/calfpath/route.cljc | 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 LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this ... | Copyright ( c ) . All rights reserved .
(ns calfpath.route
"Data driven routes functionality in Calfpath."
#?(:cljs (:require-macros calfpath.route))
(:require
[clojure.set :as set]
[clojure.string :as string]
[calfpath.internal :as i])
#?(:clj (:import
[clojure.lang Associative]... |
eec0ed6183b2a1c736069b212ce346ea6529f4259fb4cec79debf0c46d3a6759 | fukamachi/lsx | main.lisp | (defpackage #:lsx/tests/main
(:use #:cl
#:rove
#:lsx/tag
#:lsx/html
#:lsx/file)
(:import-from #:lsx/html
#:print-escaped-text)
(:import-from #:local-time
#:now)
(:import-from #:cl-ppcre))
(in-package #:lsx/tests/main)
(defun esc (v)
(with-output... | null | https://raw.githubusercontent.com/fukamachi/lsx/3a8ecea78080a0c7afe9bd8a0c594efd1b227de9/tests/main.lisp | lisp | (defpackage #:lsx/tests/main
(:use #:cl
#:rove
#:lsx/tag
#:lsx/html
#:lsx/file)
(:import-from #:lsx/html
#:print-escaped-text)
(:import-from #:local-time
#:now)
(:import-from #:cl-ppcre))
(in-package #:lsx/tests/main)
(defun esc (v)
(with-output... | |
41e4bce057e500c3aceebfdcf1ea201afba46171df0b4c28d13924ea7fb72d29 | JPMoresmau/dbIDE | TestHarness.hs | module Language.Haskell.ASBrowser.TestHarness where
import Data.Acid
import Data.Default
import Data.Acid.Memory
import Language.Haskell.ASBrowser.Database ()
import Language.Haskell.ASBrowser.Types
withTestAcid :: (AcidState Database -> IO b) -> IO b
withTestAcid f = openMemoryState (def::Database) >>= f | null | https://raw.githubusercontent.com/JPMoresmau/dbIDE/dae37edf67fbe55660e7e22c9c5356d0ada47c61/as-browser/test/Language/Haskell/ASBrowser/TestHarness.hs | haskell | module Language.Haskell.ASBrowser.TestHarness where
import Data.Acid
import Data.Default
import Data.Acid.Memory
import Language.Haskell.ASBrowser.Database ()
import Language.Haskell.ASBrowser.Types
withTestAcid :: (AcidState Database -> IO b) -> IO b
withTestAcid f = openMemoryState (def::Database) >>= f | |
92243651df25023d3f25803b2d30c9b09ad190b7ec5ae7dd54a53025a2334594 | zenspider/schemers | exercise.2.90.scm | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
Exercise 2.90
;; Suppose we want to have a polynomial system that
is efficient for both sparse and dense polynomials . One way to do
;; this is to allow both kinds of term-list representations in our
;; system. The situation is analog... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.90.scm | scheme | Suppose we want to have a polynomial system that
this is to allow both kinds of term-list representations in our
system. The situation is analogous to the complex-number example
polar representations. To do this we must distinguish different
types of term lists and make the operations on term lists generic.
Red... | #lang racket/base
(require "../lib/test.rkt")
(require "../lib/myutils.scm")
Exercise 2.90
is efficient for both sparse and dense polynomials . One way to do
of section * Note 2 - 4 : : , where we allowed both rectangular and
(done)
|
f989424d20ecd7f17ee4890ad81bb1604d1cc6b29d4501d3a2ce3ab373e4c289 | atlas-engineer/nyxt | input-edit.lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(nyxt:define-package :nyxt/input-edit-mode
(:documentation "Mode for editing HTML input areas."))
(in-package :nyxt/input-edit-mode)
;;;; commands for navigating/editing input fields on HTML pages
(define-parenscript a... | null | https://raw.githubusercontent.com/atlas-engineer/nyxt/f6e314644db2d12045009486f509325c90165afd/source/mode/input-edit.lisp | lisp | commands for navigating/editing input fields on HTML pages
TODO: Add VI-normal? | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(nyxt:define-package :nyxt/input-edit-mode
(:documentation "Mode for editing HTML input areas."))
(in-package :nyxt/input-edit-mode)
(define-parenscript active-input-area-content ()
(ps:chain (nyxt/ps:active-element ... |
1eb8b7db03b7426ff9cb6bfe8ed5cf69647b90941af57b6ca6d6316cb95c06a8 | Sudha247/ocaml5-tutorial-icfp-22 | echo_eio.ml | open Eio.Std
let run_server ~sw socket =
while true do
Eio.Net.accept_fork socket ~sw (fun flow _addr ->
traceln "Server accepted connection from client";
let parse' = Eio.Buf_read.of_flow ~max_size:100 flow in
while true do
let msg = Eio.Buf_read.line parse' in
traceln "Server ... | null | https://raw.githubusercontent.com/Sudha247/ocaml5-tutorial-icfp-22/7f04991a10270e5f5be0d2b1b6d931b242f4d3a2/code/eio/solved/echo_eio.ml | ocaml | open Eio.Std
let run_server ~sw socket =
while true do
Eio.Net.accept_fork socket ~sw (fun flow _addr ->
traceln "Server accepted connection from client";
let parse' = Eio.Buf_read.of_flow ~max_size:100 flow in
while true do
let msg = Eio.Buf_read.line parse' in
traceln "Server ... | |
51d39c306f351fb8c0218c38d2439a2b7fa65d644cea0ab4e4e440ed464c533b | vdloo/kodictl | volumechange.rkt | #!/usr/bin/env racket
#lang racket/base
(require json-rpc-client)
(require "input-action.rkt")
(provide kodictl-mute)
(provide kodictl-volumedown)
(provide kodictl-volumeup)
(define kodictl-mute
(λ ()
(kodictl-input-action "mute")))
(define do-n-times
(λ (n thunk)
(for/list ([_ n])
(thunk))
... | null | https://raw.githubusercontent.com/vdloo/kodictl/31c775a0889c06fcf65a0d91d15937144eb6a30a/kodictl/commands/volumechange.rkt | racket | #!/usr/bin/env racket
#lang racket/base
(require json-rpc-client)
(require "input-action.rkt")
(provide kodictl-mute)
(provide kodictl-volumedown)
(provide kodictl-volumeup)
(define kodictl-mute
(λ ()
(kodictl-input-action "mute")))
(define do-n-times
(λ (n thunk)
(for/list ([_ n])
(thunk))
... | |
82305289a7e918159c394250ce59bfe3963a58c80fde8b2e0c968e0791cf72e8 | ghc/testsuite | tcfail153.hs | -- Killed a test compiler, so I thought it was worth including
module ShouldFail where
f :: a -> [a]
f x = g x
where
g y = if y then [] else [y]
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail153.hs | haskell | Killed a test compiler, so I thought it was worth including |
module ShouldFail where
f :: a -> [a]
f x = g x
where
g y = if y then [] else [y]
|
ea42a9d9239b369e92c8de9025aefd92aaff3ee6cb253f284025ee4c5ccd9736 | Naproche-SAD/Naproche-SAD | Kit.hs |
Authors : ( 2001 - 2008 ) , ( 2017 - 2018 )
Various functions on formulas .
Authors: Andrei Paskevich (2001 - 2008), Steffen Frerix (2017 - 2018)
Various functions on formulas.
-}
module SAD.Data.Formula.Kit where
import Control.Monad
import Data.Maybe
import qualified Data.Map as M
import Data.List
impo... | null | https://raw.githubusercontent.com/Naproche-SAD/Naproche-SAD/da131a6eaf65d4e02e82082a50a4febb6d42db3d/src/SAD/Data/Formula/Kit.hs | haskell | Alpha-beta normalization
gets rid of top level negation, implication and equivalence
split a formula into its conjucts
remove all tags from a formula
Boolean simplification
perform boolean simplification through the whole formula
Maybe quantification
creation of formulas
creation of predefined functions an... |
Authors : ( 2001 - 2008 ) , ( 2017 - 2018 )
Various functions on formulas .
Authors: Andrei Paskevich (2001 - 2008), Steffen Frerix (2017 - 2018)
Various functions on formulas.
-}
module SAD.Data.Formula.Kit where
import Control.Monad
import Data.Maybe
import qualified Data.Map as M
import Data.List
impo... |
8ba9c7d94083a2033088db15ff5f23f19eb96fd1731f0514d1e37d2ebefa1ef3 | ixy-languages/ixy.ml | pagesize.ml | let () =
print_int Pci_linux.pagesize;
print_newline ()
| null | https://raw.githubusercontent.com/ixy-languages/ixy.ml/e79dcc4a19afd8e531346c27624c54224f942dc9/test/pagesize.ml | ocaml | let () =
print_int Pci_linux.pagesize;
print_newline ()
| |
4b05e494424ed6c371cbc76f8e103817325ebd84ffdba5970bf0b836f9e9e564 | kmi/irs | tests.lisp | Mode : Lisp ; Package :
;;; Tests for the Time Ontology
(in-package "OCML")
(in-ontology time-ontology)
(setf i0 (ocml-eval-fun `(#_getCurrentDateTime)))
(setf i1 (ocml-eval-fun `(#_getCurrentDateTime)))
(setf i2 (ocml-eval-fun `(#_getCurrentDateTime)))
(setf i3 (ocml-eval-fun `(#_getCurrentDateTime)))
(setf i4 ... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/time-ontology/tests.lisp | lisp | Package :
Tests for the Time Ontology
(ocml-eval-fun-term '#_dateTimesDifference `(,i1 ,i2))
i1 is not after i2
i2 is after i1
i2 is not after i2
(holds? '#_dateTimeAfter i2 i2)
i2 is not before i1
i1 is not before i1
(holds? '#_dateTimeBefore i1 i1)
i1 is before i2
i2 equals i2
i1 and i2 are not equal
(hol... |
(in-package "OCML")
(in-ontology time-ontology)
(setf i0 (ocml-eval-fun `(#_getCurrentDateTime)))
(setf i1 (ocml-eval-fun `(#_getCurrentDateTime)))
(setf i2 (ocml-eval-fun `(#_getCurrentDateTime)))
(setf i3 (ocml-eval-fun `(#_getCurrentDateTime)))
(setf i4 (ocml-eval-fun `(#_getCurrentDateTime)))
(setf i5 (ocml-eva... |
bee2ee5fe3ea66abaf078baff202492f9b31a9117c7d7c52175a20b084162677 | dhleong/wish | spells.cljs | (ns wish.sheets.dnd5e.subs.spells
(:require [clojure.string :as str]
[re-frame.core :as rf :refer [reg-sub subscribe]]
[wish-engine.core :as engine]
[wish.sheets.dnd5e.util :as util :refer [ability->mod ]]
[wish.sheets.dnd5e.subs.abilities :as abilities]
[wi... | null | https://raw.githubusercontent.com/dhleong/wish/9036f9da3706bfcc1e4b4736558b6f7309f53b7b/src/cljs/wish/sheets/dnd5e/subs/spells.cljs | clojure | ======= Constants ========================================
======= shared utils ====================================
no-slot casters can still have a slot
if it's a spell-slot-based limited use
if it's at-will or powered by a limited-use,
there's no possible usable slot because it doesn't
use *any* slots.
Of co... | (ns wish.sheets.dnd5e.subs.spells
(:require [clojure.string :as str]
[re-frame.core :as rf :refer [reg-sub subscribe]]
[wish-engine.core :as engine]
[wish.sheets.dnd5e.util :as util :refer [ability->mod ]]
[wish.sheets.dnd5e.subs.abilities :as abilities]
[wi... |
223f90d40cc4abdaa1be28c5bd404eca69b6a15e8280a3236b0a4a1c6d642019 | khibino/haskell-relational-record | Person.hs | # LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances #
module Person where
import Data.Int
import Database.Relational.Query
import Database.Relational.Query.TH
$(defineTable defaultConfig
"PUBLIC" "person"
[ ("name" , [t| String |])
, ("age" , [t| Int32 |])
, ("address", [t| String |]... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/doc/slide/haskell-hackathon-201412/Person.hs | haskell | # LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances #
module Person where
import Data.Int
import Database.Relational.Query
import Database.Relational.Query.TH
$(defineTable defaultConfig
"PUBLIC" "person"
[ ("name" , [t| String |])
, ("age" , [t| Int32 |])
, ("address", [t| String |]... | |
d39960f6d8d85d06080361572e839a912d36e1b19e43b4fad2ab892ddd26f8c4 | shop-planner/shop3 | p23.lisp | (in-package :shop-openstacks)
#.(make-problem 'OS-SEQUENCEDSTRIPS-P60_2 'OPENSTACKS-SEQUENCEDSTRIPS-ADL-INCLUDED '((NEXT-COUNT
N0
N1)
... | null | https://raw.githubusercontent.com/shop-planner/shop3/ba429cf91a575e88f28b7f0e89065de7b4d666a6/shop3/examples/openstacks-adl/p23.lisp | lisp | (in-package :shop-openstacks)
#.(make-problem 'OS-SEQUENCEDSTRIPS-P60_2 'OPENSTACKS-SEQUENCEDSTRIPS-ADL-INCLUDED '((NEXT-COUNT
N0
N1)
... | |
9fdaffcf3ed3735430a43fb15863aa22e8da65260f8fda00da6bd3dc60dd4645 | TrustInSoft/tis-interpreter | visit.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/rte/visit.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
9fff23b8b74388156af5ab7a768e614315d7c4e193b2977139767c2987e84af4 | foretspaisibles/cl-kaputt | configuration.lisp | configuration.lisp — Configuration for
( -kaputt )
This file is part of Kaputt .
;;;;
Copyright © 2019–2021
;;;; All rights reserved.
This software is governed by the CeCILL - B license under French law and
;;;; abiding by the rules of distribution of free software. You can use,
modify and/ or red... | null | https://raw.githubusercontent.com/foretspaisibles/cl-kaputt/b72856a16643a6facbd62f6717912950d13a5a98/src/configuration.lisp | lisp |
All rights reserved.
abiding by the rules of distribution of free software. You can use,
"-B_V1-en.txt"
End of file `configuration.lisp' | configuration.lisp — Configuration for
( -kaputt )
This file is part of Kaputt .
Copyright © 2019–2021
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribute the software under the terms of the CeCILL - B
license as circulated by CEA , CNRS and INRIA at... |
8401708834682f66273995049907b226f949ff7af03661cb1395f9e2cb331371 | timothypratley/reanimated | core.cljs | (ns examples.core
(:require-macros
[examples.macros :refer [example]]
[cljs.test :refer [testing is]]
[devcards.core :refer [defcard deftest defcard-rg start-devcard-ui!]])
(:require
[examples.scroll]
[examples.deprecated]
[examples.storyboard]
[reagent.core :as reagent]
[reagent.rat... | null | https://raw.githubusercontent.com/timothypratley/reanimated/337926deda118bdffae1e10c16d3a1be84ddf0ab/src/examples/core.cljs | clojure | TODO: This would be more compelling as a scrolling text area
TODO: make a convenient way to watch many things
perhaps a collection of keys or paths of interesting things
TODO: make more interesting, bigger steps, spinning wheels | (ns examples.core
(:require-macros
[examples.macros :refer [example]]
[cljs.test :refer [testing is]]
[devcards.core :refer [defcard deftest defcard-rg start-devcard-ui!]])
(:require
[examples.scroll]
[examples.deprecated]
[examples.storyboard]
[reagent.core :as reagent]
[reagent.rat... |
4cd26ae32dbb9a82ce5617a5956a2c5c8614b344f6f6b7ed7559330a61e78943 | borodust/alien-works-demo | packages.lisp | (cl:defpackage :alien-works-demo
(:local-nicknames (:a :alexandria)
(:aw :alien-works))
(:use :cl)
(:export #:run))
| null | https://raw.githubusercontent.com/borodust/alien-works-demo/934c540b92768b2017fd6ff4d2477163338fcee4/app/packages.lisp | lisp | (cl:defpackage :alien-works-demo
(:local-nicknames (:a :alexandria)
(:aw :alien-works))
(:use :cl)
(:export #:run))
| |
3f5dc7b99319df27f9fb9c76af2e99a63a393e90c91798a1a013cb98a8ce9275 | krohrer/caml-aesq | hyph_en.ml | , Sat Apr 3 18:08:06 CEST 2010
Adapted from python code :
let patterns = [|
Knuth and 's original hyphenation patterns from classic TeX.
In the public domain .
Knuth and Liang's original hyphenation patterns from classic TeX.
In the public domain.
*)
".ach4";".ad4der";".af1t";"... | null | https://raw.githubusercontent.com/krohrer/caml-aesq/4cdbd23c010ad3e8eb67ca6a86cdb6a9efafc9c6/hyph_en.ml | ocaml | , Sat Apr 3 18:08:06 CEST 2010
Adapted from python code :
let patterns = [|
Knuth and 's original hyphenation patterns from classic TeX.
In the public domain .
Knuth and Liang's original hyphenation patterns from classic TeX.
In the public domain.
*)
".ach4";".ad4der";".af1t";"... | |
362836fbfc5d7d8b6ebee34bb2a827126afe8584bd3a6228520fd31d74432033 | cldm/cldm | requirement.lisp | (in-package :cldm)
(defclass requirement ()
((name :initarg :library-name
:initform (error "Provide the library name")
:accessor library-name
:type string
:documentation "The library name")
(version-constraints :initarg :version-constraints
:initform (list :any)
:accessor requirement-version-constra... | null | https://raw.githubusercontent.com/cldm/cldm/899f1a92d52245ef0fc84d073ac35c4b0d2e9609/src/requirement.lisp | lisp | Check distribution names are all the same
not something the user can have influce on
Requirements parser
Matching
Return false if names dont match
else | (in-package :cldm)
(defclass requirement ()
((name :initarg :library-name
:initform (error "Provide the library name")
:accessor library-name
:type string
:documentation "The library name")
(version-constraints :initarg :version-constraints
:initform (list :any)
:accessor requirement-version-constra... |
05a2344969debb3ee72a0af6da680848047e0110a3fb7f51f7d50f812706430f | ghc/packages-Cabal | MyExeModule.hs | module MyExeModule where
main :: IO ()
main = error ""
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/AutogenModules/Package/MyExeModule.hs | haskell | module MyExeModule where
main :: IO ()
main = error ""
| |
a00971614178b59efe90d84ae202b19426cd054cf5a7a3f6a906f2c9623806b6 | FundingCircle/topology-grapher | render_test.clj | (ns topology-grapher.render-test
(:require [topology-grapher.render :as sut]
[topology-grapher.sample-data :as sample]
[clojure.java.io :as io]
[clojure.test :refer [deftest testing is]]))
;; different options to test
(def opts-matrix
(for [f sut/fmts, m sut/modes, c [true false... | null | https://raw.githubusercontent.com/FundingCircle/topology-grapher/c1e3518ef90f95097b3310d3d5cbd48750498e81/test/topology_grapher/render_test.clj | clojure | different options to test | (ns topology-grapher.render-test
(:require [topology-grapher.render :as sut]
[topology-grapher.sample-data :as sample]
[clojure.java.io :as io]
[clojure.test :refer [deftest testing is]]))
(def opts-matrix
(for [f sut/fmts, m sut/modes, c [true false]]
[f m c]))
(deftest re... |
2ec6504a0093e2cab86867848a53b6586d5723ad36d9cc805107c779c4b4acde | dmitryvk/sbcl-win32-threads | clos-interrupts.impure.lisp | CLOS interrupt safety tests
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This software is in the public d... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tests/clos-interrupts.impure.lisp | lisp | more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
Interrupting applicable method computation and calling the same
GF that was being computed ... | CLOS interrupt safety tests
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(defpackage "CLOS-INTERRUPT-TEST"
(:use "COMMON-LISP" "SB-EXT"))
(in-package "CLOS-INTERRUPT-TEST")
up as .
: We just want a w... |
4ffbefb6795bd743fb16387993a286b2f98970f1755532c507a45d27d3cababf | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | IssuingCardholderRequirements.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the types generated from the schema IssuingCardholderRequirements
module StripeAPI.Types.IssuingCardholderRequi... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/IssuingCardholderRequirements.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema IssuingCardholderRequirements
| Defines the object schema located at @components.schemas.issuing_cardholder_requirements@ in the specification.
| past_due: Array of fields that need to be collected in order to verif... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.IssuingCardholderRequirements where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
impo... |
c1abbdf7c7505f4973aca1b26be6b9a70c687f13cae8f7cc1015e9a24634d14d | ktakashi/sagittarius-scheme | footnotes.scm | -*- mode : scheme ; coding : utf-8 -*-
;;;
;;; text/markdown/extensions/footnotes.scm - Footnotes
;;;
Copyright ( c ) 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;;... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/f62dab0ff9b15b8adc429ab5b138294b6bb90c6b/sitelib/text/markdown/extensions/footnotes.scm | scheme | coding : utf-8 -*-
text/markdown/extensions/footnotes.scm - Footnotes
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, t... | Copyright ( c ) 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
#!nounbound
(library (text markdown extensions foo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.