_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 |
|---|---|---|---|---|---|---|---|---|
b44f8990dee6a65619c1500ba5ff7b965f7b0799c99fba8794661f3634a7f65a | ejlilley/AbstractMusic | Examples.hs | module Examples where
import Music (Name(..), Accidental(..), Scale(..), Tuning(..), Timing(..), Metronome(..),
AbstractInt1(..), AbstractPitch1(..), AbstractDur1(..),
AbstractInt2(..), AbstractPitch2(..), AbstractDur2(..),
AbstractInt3(..), AbstractPitch3(..), AbstractDur3(.... | null | https://raw.githubusercontent.com/ejlilley/AbstractMusic/815ab33ee204dd3ebf29076bde330bfdf6938677/Examples.hs | haskell | example notes:
example scales:
example tuning systems:
tuning some scales:
Construct a tune from scale degrees ( this is pretty unwieldy )
-- Some simple polyphony
and now to hear it through your speakers
-------------- | module Examples where
import Music (Name(..), Accidental(..), Scale(..), Tuning(..), Timing(..), Metronome(..),
AbstractInt1(..), AbstractPitch1(..), AbstractDur1(..),
AbstractInt2(..), AbstractPitch2(..), AbstractDur2(..),
AbstractInt3(..), AbstractPitch3(..), AbstractDur3(.... |
98e4f736ff55ac63a17a3cef1048a509a8850a0701fa751fb4e6b2d9f2e803ae | arcfide/chez-srfi | tables-test.ikarus.sps | Copyright ( C ) 2015 . All Rights Reserved .
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without restriction ,
;;; including without limitation the rights to use, copy, ... | null | https://raw.githubusercontent.com/arcfide/chez-srfi/96fb553b6ba0834747d5ccfc08c181aa8fd5f612/tests/tables-test.ikarus.sps | scheme |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission notice shall be
EXPRESS OR IMPLIED,... | Copyright ( C ) 2015 . All Rights Reserved .
files ( 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 ,
included in all copies or substantial portions ... |
32a67e98978d9a16af374525aafd020193f6ed43bb54bb948ee923e83c94a5b4 | lidcore/bs-async-monad | bsAsyncMonad.ml | module type Async_t = sig
type 'a t
val return : 'a -> 'a t
val fail : exn -> 'a t
val compose : ?noStack:bool -> 'a t -> ('a -> 'b t) -> 'b t
val (>>) : 'a t -> ('a -> 'b t) -> 'b t
val catch : ?noStack:bool -> 'a t -> (exn -> 'a t) -> 'a t
val (||>) : 'a t -> (exn -> 'a t) -> 'a t
val pipe : ?noS... | null | https://raw.githubusercontent.com/lidcore/bs-async-monad/7b4a2791684c74e0e61d7bfb6c84d319a7e6f5e5/src/bsAsyncMonad.ml | ocaml | A computation takes a callback and executes it
either with an error or with a result of type 'a.
Computation that returns x as a value.
Computation that returns an error.
Pipe current's result into next.
Catch exception.
Use native functions when available.
Default to noStack:true for ensure for consi... | module type Async_t = sig
type 'a t
val return : 'a -> 'a t
val fail : exn -> 'a t
val compose : ?noStack:bool -> 'a t -> ('a -> 'b t) -> 'b t
val (>>) : 'a t -> ('a -> 'b t) -> 'b t
val catch : ?noStack:bool -> 'a t -> (exn -> 'a t) -> 'a t
val (||>) : 'a t -> (exn -> 'a t) -> 'a t
val pipe : ?noS... |
ee02c258e803146a4e5ebbd3032a06ea1e59d9a6a906132ed6b1a177af91dff4 | adamschoenemann/clofrp | Interop.hs |
|
Module : CloFRP.Interop
Description : Reflecting CloFRP - Types into the type - system
Module : CloFRP.Interop
Description : Reflecting CloFRP-Types into the Haskell type-system
-}
# LANGUAGE AutoDeriveTypeable #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAG... | null | https://raw.githubusercontent.com/adamschoenemann/clofrp/c26f86aec2cdb8fa7fd317acd13f7d77af984bd3/library/CloFRP/Interop.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE KindSignatures #
# LANGUAGE RankNTypes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeOperators #
# LANGUAGE QuasiQuotes #
# LANGUAGE OverloadedStrings #
---------------------------------------------------------... |
|
Module : CloFRP.Interop
Description : Reflecting CloFRP - Types into the type - system
Module : CloFRP.Interop
Description : Reflecting CloFRP-Types into the Haskell type-system
-}
# LANGUAGE AutoDeriveTypeable #
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE Poly... |
c4ca10f996f94245ccd3190e6566518487f6e6e7fbeafde56dc750bbb2dd133d | RDTK/generator | package.lisp | ;;;; package.lisp --- Package for tests of the model.variables module.
;;;;
Copyright ( C ) 2018 , 2019 Jan Moringen
;;;;
Author : < >
(cl:defpackage #:build-generator.model.variables.test
(:use
#:cl
#:alexandria
#:let-plus
#:fiveam
#:build-generator.model.variables)
(:import-from #:build-... | null | https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/test/model/variables/package.lisp | lisp | package.lisp --- Package for tests of the model.variables module.
| Copyright ( C ) 2018 , 2019 Jan Moringen
Author : < >
(cl:defpackage #:build-generator.model.variables.test
(:use
#:cl
#:alexandria
#:let-plus
#:fiveam
#:build-generator.model.variables)
(:import-from #:build-generator.model.variables
#:merge-alists))
(cl:in-package #:build-generator.m... |
cd4e0989ebba90423f5947e9cdbf75ce76e3c075a610f31dc9688abd3a48776a | singleheart/programming-in-haskell | ex3.hs | type Board = [Int]
initial :: Board
initial = [5, 4, 3, 2, 1]
putRow :: Int -> Int -> IO ()
putRow row num = do
putStr (show row)
putStr ": "
putStrLn (concat (replicate num "* "))
putBoard :: Board -> IO ()
putBoard board = sequence_ [putRow idx row | (idx, row) <- zip [1 ..] board]
| null | https://raw.githubusercontent.com/singleheart/programming-in-haskell/80c7efc0425babea3cd982e47e121f19bec0aba9/ch10/ex3.hs | haskell | type Board = [Int]
initial :: Board
initial = [5, 4, 3, 2, 1]
putRow :: Int -> Int -> IO ()
putRow row num = do
putStr (show row)
putStr ": "
putStrLn (concat (replicate num "* "))
putBoard :: Board -> IO ()
putBoard board = sequence_ [putRow idx row | (idx, row) <- zip [1 ..] board]
| |
59143b2387f00ddbc8571db55f00ef1dea4399a4d99e7790718e8c88779cb35f | reasonml/reason | reason_omp.ml | (**************************************************************************)
(* *)
(* OCaml Migrate Parsetree *)
(* *)
... | null | https://raw.githubusercontent.com/reasonml/reason/3f433821d93bdc8f85677d4ee5d276ff6551c777/src/vendored-omp/src/reason_omp.ml | ocaml | ************************************************************************
OCaml Migrate Parsetree
... |
, Jane Street Europe
Copyright 2017 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module Def = Migrate_parsetree_def
Copy of... |
ea4f5aa7dd6a5928eb9163bd0ba86ab5c87beec7ebe5039550ac164cc097d195 | alex-hhh/ActivityLog2 | info.rkt | #lang info
;; info.rkt -- package definition for the the-application package
;;
;; This file is part of ActivityLog2 -- -hhh/ActivityLog2
Copyright ( c ) 2020 < >
;;
;; This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Fr... | null | https://raw.githubusercontent.com/alex-hhh/ActivityLog2/36a4bb8af45db19cea02e982e22379acb18d0c49/pkgs/the-application/info.rkt | racket | info.rkt -- package definition for the the-application package
This file is part of ActivityLog2 -- -hhh/ActivityLog2
This program is free software: you can redistribute it and/or modify it
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
without even the implied w... | #lang info
Copyright ( c ) 2020 < >
under the terms of the GNU General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option )
You should have received a copy of the GNU General Public License along
(define collection "the-application")
(define d... |
721b2ab09259f2aee2489d8d4b4c903dd313b12dd72176590a5bc7208e01da18 | froggey/Mezzano | mass-storage.lisp | Copyright ( c ) 2019 ( )
This code is licensed under the MIT license .
;;======================================================================
;; Mass Storage Class Driver
;;======================================================================
(defpackage :mezzano.driver.usb.mass
(:use :cl :mezzano.driver.... | null | https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/drivers/usb/mass-storage.lisp | lisp | ======================================================================
Mass Storage Class Driver
======================================================================
for debug
======================================================================
=====================================================================... | Copyright ( c ) 2019 ( )
This code is licensed under the MIT license .
(defpackage :mezzano.driver.usb.mass
(:use :cl :mezzano.driver.usb :mezzano.disk)
(:local-nicknames (:sup :mezzano.supervisor)
(:sync :mezzano.sync)
(:sys.int :mezzano.internals)))
(in-package :m... |
ab956f76d6e268fba34e49cc73fff9188978168e543945706e4be9e4189ab796 | helium/erlang-tc | key_SUITE.erl | -module(key_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([all/0, init_per_testcase/2, end_per_testcase/2]).
-export(
[
pk_size_test/1,
pk_serde_test/1,
signature_test/1,
pk_set_test/1,
pk_set_serde_test/1,
pk_set_combine_test/1,
pk_share_comb... | null | https://raw.githubusercontent.com/helium/erlang-tc/b3ef1d5541586f5c85b6d231345a921d57be32a3/test/key_SUITE.erl | erlang | Parity = tc_signature:parity(Signature),
?debugFmt("Parity: ~p~n", [Parity]), | -module(key_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([all/0, init_per_testcase/2, end_per_testcase/2]).
-export(
[
pk_size_test/1,
pk_serde_test/1,
signature_test/1,
pk_set_test/1,
pk_set_serde_test/1,
pk_set_combine_test/1,
pk_share_comb... |
e0fcec6577b2e2f1445a56ecb3dab53f15b8be31e6e7f000d2e3294ad0c05e82 | viercc/kitchen-sink-hs | LogRwd.hs | # LANGUAGE DerivingVia #
module LogRwd where
import Prelude hiding (log)
import Data.Bifunctor
import Control.Monad.State
module LogRwdTransf(M : MONAD ) = struct
type ( ' a , ' b ) log = ( ' a , ' b ) argFunPair list
and ( ' a , ' b ) mon = ( ' a , ' b ) log - > ( ' a * ( ' a , ' b ) log ) M.mon
and... | null | https://raw.githubusercontent.com/viercc/kitchen-sink-hs/391efc1a30f02a65bbcc37a4391bd5cb0d3eee8c/snippets/src/LogRwd.hs | haskell | ----------------------------------
---------------------------------- | # LANGUAGE DerivingVia #
module LogRwd where
import Prelude hiding (log)
import Data.Bifunctor
import Control.Monad.State
module LogRwdTransf(M : MONAD ) = struct
type ( ' a , ' b ) log = ( ' a , ' b ) argFunPair list
and ( ' a , ' b ) mon = ( ' a , ' b ) log - > ( ' a * ( ' a , ' b ) log ) M.mon
and... |
c7d1736edacf6bcf8fed841af56ebe6c699add1971c8ee39cbee9b93f2783ea8 | vitorenesduarte/tricks | tricks_config.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2018 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the Li... | null | https://raw.githubusercontent.com/vitorenesduarte/tricks/9ba11252be128be481b4d4a00fe162ccdbdac501/src/tricks_config.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2018 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(tricks_config).
-author... |
cf2cfc43d5772ddb7f9a58678e327e8109b9d5d980bd1e7182b11845445c1369 | hjcapple/reading-sicp | exercise_1_12.scm | #lang racket
P27 - [ 练习 1.12 ]
(define (pascal-row n)
(define (next-row lst)
(if (= (length lst) 1)
(list (car lst) (car lst))
(let ((ret (next-row (cdr lst)))
(first (car lst)))
(cons first (cons (+ first (car ret)) (cdr ret))))))
(if (<= n 1)
(list 1)
... | null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_1/exercise_1_12.scm | scheme |
输出
(1 2 1)
(1 4 6 4 1)
(1 5 10 10 5 1)
(1 6 15 20 15 6 1)
(1 7 21 35 35 21 7 1)
(1 8 28 56 70 56 28 8 1) | #lang racket
P27 - [ 练习 1.12 ]
(define (pascal-row n)
(define (next-row lst)
(if (= (length lst) 1)
(list (car lst) (car lst))
(let ((ret (next-row (cdr lst)))
(first (car lst)))
(cons first (cons (+ first (car ret)) (cdr ret))))))
(if (<= n 1)
(list 1)
... |
49931f0d1268eb09eff9c92b6c47ef71693ee8f8fad3d85eb905661401cf44e5 | LdBeth/keim | symbolics.lisp | ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;; ;;
Copyright ( C ) 1993 by AG Siekmann , , ; ;
Universitaet des Saarlandes , Saarbruecken , Germany . ; ;
;; All rights ... | null | https://raw.githubusercontent.com/LdBeth/keim/ed2665d3b0d9a78eaa88b5a2940a4541f0750926/ags/prog/emacs/symbolics.lisp | lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;;
;
;
All rights reserved. ;;
For information about this program, write to: ;;
K... |
(in-package "AGS")
#+(or symbolics explorer)
(defun emacs-time (&optional symbolp)
(multiple-value-bind (second minute hour day month year day.of.week daylight.saving.time.p time.zone)
(get-decoded-time)
(declare (ignore second day.of.week daylight.saving.time.p time.zone))
(let ((res (format nil "~@2... |
cb0f2114d6c1d549a181b4489e77839bae1e6ce1b3181c6c7b787363a9ed41aa | metaocaml/ber-metaocaml | subst.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/typing/subst.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Path
open Types
open Btype
type type_replacement =
| Path of Path.t
| Type_function ... |
df20ce2d2b310d2202db144806ffff9de7bed55eceeef0bb6abfc553ce559cd4 | lnostdal/SymbolicWeb | container_model.clj | (in-ns 'symbolicweb.core)
TODO ( ? )
: Why you should avoid Linked Lists
;;; -vgmo
(defmacro cm-iterate "Iterate over CMNs in CONTAINER-MODEL executing BODY for each iteration with CMN-DATA-SYMBOL bound to the CMN-DATA of each
CMN respectively.
Iteration will end whenever BODY returns a True value, or wh... | null | https://raw.githubusercontent.com/lnostdal/SymbolicWeb/d9600b286f70f88570deda57b05ca240e4e06567/src/symbolicweb/container_model.clj | clojure | -vgmo
Doubly linked list node.
Doubly linked list.
The getter is `count' from `clojure.lang.Count'.
HEAD-NODE
TAIL-NODE
%COUNT
-linked_list#Inserting_a_node
function insertEnd(List list, Node newNode)
if list.lastNode == null
insertBeginning(list, newNode)
else
insertAfter(list, list.lastNode, newNode)
-... | (in-ns 'symbolicweb.core)
TODO ( ? )
: Why you should avoid Linked Lists
(defmacro cm-iterate "Iterate over CMNs in CONTAINER-MODEL executing BODY for each iteration with CMN-DATA-SYMBOL bound to the CMN-DATA of each
CMN respectively.
Iteration will end whenever BODY returns a True value, or when the tai... |
c7bbd2eff5cca45bc651e8cf786a9239b53bfe7f077ad05567bca5083ceb3730 | KaroshiBee/weevil | service_cmdline.ml | module Defaults = Dapper.Dap.Defaults
let default_port = Defaults._DEFAULT_ADAPTER_PORT
(* NOTE type unparsing_mode = Optimized | Readable | Optimized_legacy, could we phantom this into the logger type? *)
let process port_arg () =
let p
?port_arg:(port:int=default_port)
() =
Server.svc ~port
in
... | null | https://raw.githubusercontent.com/KaroshiBee/weevil/1b166ba053062498c1ec05c885e04fba4ae7d831/lib/adapter/service_cmdline.ml | ocaml | NOTE type unparsing_mode = Optimized | Readable | Optimized_legacy, could we phantom this into the logger type? | module Defaults = Dapper.Dap.Defaults
let default_port = Defaults._DEFAULT_ADAPTER_PORT
let process port_arg () =
let p
?port_arg:(port:int=default_port)
() =
Server.svc ~port
in
p ?port_arg ()
module Term = struct
let listen_port_arg =
let open Cmdliner in
let doc =
Format.spri... |
2b90bc0240bf400b1e74b4e204ca08eee823c41b9c4c5831110b9bbdbc9e1c45 | lspitzner/brittany | Test137.hs | module Main (Test(Test, a, b)) where
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test137.hs | haskell | module Main (Test(Test, a, b)) where
| |
2e9ebcd265fddb254b6934f79fbc38aafcd6cbd6f5687675f1b4d63f81545d31 | losfair/Violet | IntAlu.hs | module Violet.Backend.IntAlu where
import Clash.Prelude
import qualified Violet.Config as Config
import qualified Violet.Types.Pipe as PipeT
import qualified Violet.Types.Gpr as GprT
import qualified Violet.Types.Issue as IssueT
intAlu' :: Maybe IssueT.IssuePort
-> (GprT.RegValue, GprT.RegValue)
-> Pi... | null | https://raw.githubusercontent.com/losfair/Violet/dcdd05f8dc08a438a157347f424966da73ccc9b8/src/Violet/Backend/IntAlu.hs | haskell | add/sub
sltu
xor
or
and
lui | module Violet.Backend.IntAlu where
import Clash.Prelude
import qualified Violet.Config as Config
import qualified Violet.Types.Pipe as PipeT
import qualified Violet.Types.Gpr as GprT
import qualified Violet.Types.Issue as IssueT
intAlu' :: Maybe IssueT.IssuePort
-> (GprT.RegValue, GprT.RegValue)
-> Pi... |
fa3e8fefaa015ec3beb723e3fe7f63a4c46efd05e7be2dc419b2c73a6029f97e | xapi-project/xen-api-libs | xmlrpc.mli |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/rpc-light/xmlrpc.mli | ocaml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | |
f691dae2ab913e0e1ec8ed6fc651692c94cf7e641335c1bb7d0ff440afbfc157 | ghc/packages-Cabal | ModuleShape.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
-- | See <-proposals/blob/backpack/proposals/0000-backpack.rst>
module Distribution.Backpack.ModuleShape (
-- * Module shapes
ModuleShape(..),
emptyModuleShape,
shapeInstalledPackage,
) where
import Prelude ()
import Distribution.Compat.Pre... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/Distribution/Backpack/ModuleShape.hs | haskell | # LANGUAGE DeriveDataTypeable #
| See <-proposals/blob/backpack/proposals/0000-backpack.rst>
* Module shapes
---------------------------------------------------------------------
Module shapes
'InstalledPackageInfo'.
| The default module shape, with no provisions and no requirements.
Imagine this situation:
... | # LANGUAGE DeriveGeneric #
module Distribution.Backpack.ModuleShape (
ModuleShape(..),
emptyModuleShape,
shapeInstalledPackage,
) where
import Prelude ()
import Distribution.Compat.Prelude hiding (mod)
import Distribution.ModuleName
import Distribution.InstalledPackageInfo as IPI
import Distribution.Back... |
4e6e11ccf8108bd612827e798035bc09073f2b8ea5c93a4aba5674327e4828fc | clj-kafka/franzy | client.clj | (ns franzy.clients.mocks.consumer.client
(:require [franzy.clients.consumer.protocols :refer :all]
[franzy.clients.mocks.consumer.protocols :refer :all]
[franzy.clients.mocks.protocols :refer :all]
[franzy.clients.consumer.client :refer :all]
[franzy.clients.codec :as c... | null | https://raw.githubusercontent.com/clj-kafka/franzy/6c2e2e65ad137d2bcbc04ff6e671f97ea8c0e380/mocks/src/franzy/clients/mocks/consumer/client.clj | clojure | (ns franzy.clients.mocks.consumer.client
(:require [franzy.clients.consumer.protocols :refer :all]
[franzy.clients.mocks.consumer.protocols :refer :all]
[franzy.clients.mocks.protocols :refer :all]
[franzy.clients.consumer.client :refer :all]
[franzy.clients.codec :as c... | |
6207f25cf7c0ac9bdf539777aa535b695f934c16528da368dda9dc4618fc459b | samrushing/irken-compiler | t14.scm |
(include "lib/core.scm")
(include "lib/pair.scm")
(let ((l (cons 1 (cons 2 (cons 3 (list:nil))))))
(let ((t0 (member? 3 l =))
(t1 (length l))
(t2 (append l l))
(t3 (range 10))
(t4 (n-of 5 "five"))
(t5 (reverse t3))
)
{a=t0 b=t1 c=t2 d=t3 e=t4 f=t5}))
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t14.scm | scheme |
(include "lib/core.scm")
(include "lib/pair.scm")
(let ((l (cons 1 (cons 2 (cons 3 (list:nil))))))
(let ((t0 (member? 3 l =))
(t1 (length l))
(t2 (append l l))
(t3 (range 10))
(t4 (n-of 5 "five"))
(t5 (reverse t3))
)
{a=t0 b=t1 c=t2 d=t3 e=t4 f=t5}))
| |
0bf9fa4b67aae10ba19a3221542b505873b532f132339cb7eec5d25b378e363f | v-kolesnikov/sicp | constraints_test.clj | (ns sicp.chapter03.constraints-test
(:require [clojure.test :refer :all]
[sicp.chapter03.constraints :refer :all]))
(deftest test-celsius-fahrenheit-converter
(let [C (make-connector)
F (make-connector)]
(celsius-fahrenheit-converter C F)
(probe "Celcius temp" C)
(probe "Fahrenheit... | null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter03/constraints_test.clj | clojure | (ns sicp.chapter03.constraints-test
(:require [clojure.test :refer :all]
[sicp.chapter03.constraints :refer :all]))
(deftest test-celsius-fahrenheit-converter
(let [C (make-connector)
F (make-connector)]
(celsius-fahrenheit-converter C F)
(probe "Celcius temp" C)
(probe "Fahrenheit... | |
d4a56570ea78355b2b742eb3b505e069a3eabb171f758b718103f8c4c7681328 | racket/racket7 | sandman.rkt | #lang racket/base
(require "check.rkt"
"tree.rkt"
"internal-error.rkt"
"sandman-struct.rkt")
;; A "sandman" manages the set of all sleeping threads that may need
;; to be awoken in response to an external event, and it implements
the process - wide ` sleep ` that waits for an external even... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/thread/sandman.rkt | racket | A "sandman" manages the set of all sleeping threads that may need
to be awoken in response to an external event, and it implements
are the only external events recognized by the initial sandman,
and that is supported by the host system's `sleep` function.
When a thread is registered with a sandman, the sandman pro... | #lang racket/base
(require "check.rkt"
"tree.rkt"
"internal-error.rkt"
"sandman-struct.rkt")
the process - wide ` sleep ` that waits for an external event . Timeouts
(provide sandman-merge-timeout
sandman-merge-exts
sandman-add-sleeping-thread!
sandman-remov... |
f96c526215ed44bf6dbd0c1c0745d23f26e9152db571c45220a25563e7031574 | RichiH/git-annex | Merger.hs | git - annex assistant git merge thread
-
- Copyright 2012 - 2017 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2012-2017 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Assistant.Threads.Merger where
import Assistant.Common
import Assistant.... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Assistant/Threads/Merger.hs | haskell | This thread watches for changes to .git/refs/, and handles incoming
- pushes.
Runs an action handler.
-
- Exceptions are ignored, otherwise a whole thread could be crashed.
Called when there's an error with inotify.
Called when a new branch ref is written, or a branch ref is modified.
-
- At startup, synth... | git - annex assistant git merge thread
-
- Copyright 2012 - 2017 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2012-2017 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Assistant.Threads.Merger where
import Assistant.Common
import Assistant.... |
f2ab402be75292ac071a3ea7cb10547d5d1582d150da89d12873e96776742c55 | TrustInSoft/tis-interpreter | logic_const.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/kernel_services/ast_queries/logic_const.ml | ocaml | ************************************************************************
alternatives)
Automatique) ... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
( Institut National de Recherche en Informatique et en ... |
882befdee4a100bc24a2bf0eb48a3fae6619b105815815255942f9fabf0e0754 | openmusic-project/openmusic | splineseditor.lisp | ;=========================================================================
OpenMusic : Visual Programming Language for Music Composition
;
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
;
This file is part of the OpenMusic environment sources
;
OpenMusic is free software : you ... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/projects/basicproject/editors/splineseditor.lisp | lisp | =========================================================================
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
======... | OpenMusic : Visual Programming Language for Music Composition
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
This file is part of the OpenMusic environment sources
OpenMusic is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public ... |
2939c94f67e9107cb0927a4d886b0a0035d69e811471351a883fb12e1df32413 | amalloy/aoc-2021 | Main.hs | module Main where
import Control.Arrow ((&&&))
import Data.Coerce (coerce)
import Data.List.NonEmpty (NonEmpty(..), nonEmpty)
import Data.Maybe (fromMaybe)
import Data.Semigroup (Min(..), Max(..))
import Text.Regex.Applicative
import Text.Regex.Applicative.Common (decimal)
data Input = Input {_min, _max :: Int, _crab... | null | https://raw.githubusercontent.com/amalloy/aoc-2021/e169e8326dac5e1ccfa9ba35f1c3575e5be28690/day07/src/Main.hs | haskell | module Main where
import Control.Arrow ((&&&))
import Data.Coerce (coerce)
import Data.List.NonEmpty (NonEmpty(..), nonEmpty)
import Data.Maybe (fromMaybe)
import Data.Semigroup (Min(..), Max(..))
import Text.Regex.Applicative
import Text.Regex.Applicative.Common (decimal)
data Input = Input {_min, _max :: Int, _crab... | |
fdff57bce8a9814003748418dfa49c345a6cd3f0317a8c26abaa52761881a311 | helium/miner | miner_blockchain_SUITE.erl | -module(miner_blockchain_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("blockchain/include/blockchain_vars.hrl").
-include_lib("blockchain/include/blockchain.hrl").
-export([
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
... | null | https://raw.githubusercontent.com/helium/miner/f5f71d7dcd9c6633cf5d80c8fee60def9a608f65/test/miner_blockchain_SUITE.erl | erlang | TODO Relocate all helper functions below tests.
FOR:
- submits txns
- submits vars
AGAINST:
- seems to intend to test miner-specific functionality - validators
FOR:
- seems to be mostly calling a single miner
- submits txns
AGAINST:
- seems to expect different outcomes in mult... | -module(miner_blockchain_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("blockchain/include/blockchain_vars.hrl").
-include_lib("blockchain/include/blockchain.hrl").
-export([
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
... |
1830308fb85c70e735aaffbae89f7ea6733ef3e82e59304f79bdd61d2a6550ed | ngrunwald/ring-middleware-format | impl.clj | (ns ring.middleware.format.impl)
(defn extract-options [args]
(if (map? (first args))
(do
(assert (empty? (rest args)) "When using options map arity, middlewares take only one parameter.")
(first args))
(do
(assert (even? (count args)) "When using keyword args arity, there should be even nu... | null | https://raw.githubusercontent.com/ngrunwald/ring-middleware-format/32b1c07e4369dd8b797ff6f727426ec561ed25a8/src/ring/middleware/format/impl.clj | clojure | (ns ring.middleware.format.impl)
(defn extract-options [args]
(if (map? (first args))
(do
(assert (empty? (rest args)) "When using options map arity, middlewares take only one parameter.")
(first args))
(do
(assert (even? (count args)) "When using keyword args arity, there should be even nu... | |
fd2860c210740376965f3d770665d0fb514b036d8d8819770e0605b38ce17dbf | NetworkVerification/nv | MapUnrolling.ml | open Batteries
open Nv_lang
open Syntax
* Unroll all map types contained in decls . Can not handle polymorphism ,
* so requires that inlining has been run first .
* Maps over nodes and edges are unrolled according to the order their keys
* are returned by ` AdjGraph.fold_vertex ` and ` AdjGraph.fold_edges_e `... | null | https://raw.githubusercontent.com/NetworkVerification/nv/e76824c537dcd535f2224b31f35cd37601a60957/src/lib/transformations/mapUnrolling/MapUnrolling.ml | ocaml | open Batteries
open Nv_lang
open Syntax
* Unroll all map types contained in decls . Can not handle polymorphism ,
* so requires that inlining has been run first .
* Maps over nodes and edges are unrolled according to the order their keys
* are returned by ` AdjGraph.fold_vertex ` and ` AdjGraph.fold_edges_e `... | |
3d4493924cd4a2b036986a97ed800dd8f07e1dcdcab5dea8034d82fda3b32bf8 | carl-eastlund/dracula | syntax.rkt | #lang racket
(require "proof.rkt")
(define key 'dracula)
;; annotate : ? Syntax -> Syntax
Stores a annotation with the given syntax .
(define (annotate v stx)
(syntax-property stx key v))
;; extract : Syntax -> ?
Extracts a annotation from the given syntax
(define (extract stx)
(syntax-property stx key))
... | null | https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/proof/syntax.rkt | racket | annotate : ? Syntax -> Syntax
extract : Syntax -> ?
get : Any -> List
get-proof : Syntax -> Proof | #lang racket
(require "proof.rkt")
(define key 'dracula)
Stores a annotation with the given syntax .
(define (annotate v stx)
(syntax-property stx key v))
Extracts a annotation from the given syntax
(define (extract stx)
(syntax-property stx key))
Get all annotations stored with a value .
(define (get... |
5c8446b130674bca80dcbf276a2cf41de53cab0335069643b906f4a1b3fdfe8d | earl-ducaine/cl-garnet | post-processing.lisp | (in-package :garnet-user)
(eval-when (:load-toplevel)
(let ((demo-apps
'("(demo-3d::do-go)"
"(demo-angle::do-go)"
"(demo-animator::do-go)"
"(demo-arith::do-go)"
"(demo-array::do-go)"
"(demo-clock::do-go)"
"(demo-editor::do-go)"
"(demo-file-browser::do-go)"
"(demo-gadgets::do-go)"
... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/post-processing.lisp | lisp | "(mge::do-go)"
"(quicklisp::do-go)"
"(tourcommands::do-go)"
"(tour::do-go)" | (in-package :garnet-user)
(eval-when (:load-toplevel)
(let ((demo-apps
'("(demo-3d::do-go)"
"(demo-angle::do-go)"
"(demo-animator::do-go)"
"(demo-arith::do-go)"
"(demo-array::do-go)"
"(demo-clock::do-go)"
"(demo-editor::do-go)"
"(demo-file-browser::do-go)"
"(demo-gadgets::do-go)"
... |
157791440823af9cbefea6dc2e933ebc6dfa11c379a57ea87c496fb28ba1966b | bazqux/bazqux-urweb | Auth.hs | # LANGUAGE OverloadedStrings , ViewPatterns , RecordWildCards , TupleSections ,
StandaloneDeriving #
StandaloneDeriving #-}
module Auth
( loginGetForwardUrl, loginCallback
, parseQueryStringUtf8Only
, signTwitter, signTwitterWithAccessToken
, readerDownloaderSettings, withRea... | null | https://raw.githubusercontent.com/bazqux/bazqux-urweb/bf2d5a65b5b286348c131e91b6e57df9e8045c3f/crawler/Auth.hs | haskell | appAccessToken = withReaderDL $ \ d -> do
DROK
concat [ fbApiPath, "/oauth/access_token?client_id="
, fbAppId, "&client_secret=", fbSecret
, "&grant_type=client_credentials" ]
rsp <- C.httpLbs req m
logS $ "Short-lived token: " ++ T.unpack shortLivedToken
... | # LANGUAGE OverloadedStrings , ViewPatterns , RecordWildCards , TupleSections ,
StandaloneDeriving #
StandaloneDeriving #-}
module Auth
( loginGetForwardUrl, loginCallback
, parseQueryStringUtf8Only
, signTwitter, signTwitterWithAccessToken
, readerDownloaderSettings, withRea... |
9048dc5421e2d9cb3559b455227bda963e112323bd480462947d543a13bd1a5a | ml4tp/tcoq | stm.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/stm/stm.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* state-transaction-machine interfac... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Vernacexpr
open Names
op... |
a7a79906ba71961c4fd6a899488405855de7d36bab21fb3ba9205febf825507c | wdanilo/haskell-logger | Base.hs | # LANGUAGE TypeFamilies #
-----------------------------------------------------------------------------
-- |
-- Module : System.Log.Logger.Base
Copyright : ( C ) 2015 Flowbox
-- License : Apache-2.0
Maintainer : < >
-- Stability : stable
-- Portability : portable
------------------------... | null | https://raw.githubusercontent.com/wdanilo/haskell-logger/bdf3b64f50c0a8e26bd44fdb882e72ffbe19fd3f/src/System/Log/Logger/Base.hs | haskell | ---------------------------------------------------------------------------
|
Module : System.Log.Logger.Base
License : Apache-2.0
Stability : stable
Portability : portable
---------------------------------------------------------------------------
---------------------------------------------------... | # LANGUAGE TypeFamilies #
Copyright : ( C ) 2015 Flowbox
Maintainer : < >
module System.Log.Logger.Base where
import Control.Monad.Trans
import System.Log.Data (Data, MonadRecord(appendRecord))
import Control.Applicative
import System.Log.Tuples
import System.Log.Log (LogFormat, MonadLogger, appendLo... |
c634275cb4d06d0cb57262c5bb25be4692f916f6a69efd18b389c050a300c59e | onedata/op-worker | tree_traverse_job.erl | %%%-------------------------------------------------------------------
@author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc Model for holding traverse jobs (see t... | null | https://raw.githubusercontent.com/onedata/op-worker/99b86a7229f6db6a694997bd5df4aa69e140e7ee/src/modules/datastore/models/tree_traverse/tree_traverse_job.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc Model for holding traverse jobs (see tree_traverse.erl). Main jobs for each task
are synchronized between providers, other are local for provider executing task.
@end
---... | @author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(tree_traverse_job).
-author("Michal Wrzeszcz").
-include("tree_traverse.hrl").
-include("modules/fslogic/fslogic_common.hrl").
-include("modules/datastore/datastore_models.hrl").
-include("... |
738e2bff06557b71ae241aee0c23f913d5129a33a5490982b4a25af441472df0 | ghc/testsuite | tc243.hs |
# OPTIONS_GHC -Wall #
module Bug where
-- When we warn about this, we give a warning saying
Inferred type : ( .+ . ) : : forall a. a
-- but we used to not print the parentheses.
(.+.) = undefined
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/tc243.hs | haskell | When we warn about this, we give a warning saying
but we used to not print the parentheses. |
# OPTIONS_GHC -Wall #
module Bug where
Inferred type : ( .+ . ) : : forall a. a
(.+.) = undefined
|
de85e43c090dd15858be2bd27731b14e93679dc3659ea8e90e831bfd0b7cddcf | softlab-ntua/bencherl | soda_integral_loading_test.erl | Copyright ( C ) 2008 - 2014 EDF R&D
This file is part of Sim - Diasca .
Sim - Diasca is free software : you can redistribute it and/or modify
% it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) a... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/mock-simulators/soda-test/src/soda_integral_loading_test.erl | erlang | it under the terms of the GNU Lesser General Public License as
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
If not, see </>.
Benchmarking case obtained from the soda deterministic example case.
See also:
- class_SodaVendingMachine.e... | Copyright ( C ) 2008 - 2014 EDF R&D
This file is part of Sim - Diasca .
Sim - Diasca is free software : you can redistribute it and/or modify
published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) any later version .
Sim - Diasca is distributed in the hope tha... |
5372bb0b79124c74ce86aa1b514e55913000e2ecc9f2e9e06f9f3bccc1b404cb | nd/bird | 6.4.1.hs | nothing other than
height xt <= size xt | null | https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch06/6.4.1.hs | haskell | nothing other than
height xt <= size xt | |
b56b4705a96ac570a5ae876cb7e795b688d4fcd2af1eaa311801314a66bae26a | dgtized/shimmers | ring.cljs | (ns shimmers.sketches.ring
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.math.vector :as v]
[shimmers.sketch :as sketch :include-macros true]
[thi.ng.geom.vector :as gv]
[thi.ng.math.core :as tm]))
(defn setup []
{... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/ring.cljs | clojure | (ns shimmers.sketches.ring
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.math.vector :as v]
[shimmers.sketch :as sketch :include-macros true]
[thi.ng.geom.vector :as gv]
[thi.ng.math.core :as tm]))
(defn setup []
{... | |
309f6ca6e14ef6e8103402702f7ef4b6bf6b31c26539374cff343ea95e36e1ef | dgiot/dgiot | dgiot_topic.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2017 - 2021 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/dgiot/dgiot/777c878acd0c89e445c3b8992febbc925b8ee060/apps/dgiot/src/utils/dgiot_topic.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2017 - 2021 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(dgiot_topic).
-export([ match/2
, validate/1
, validate/2
, lev... |
af6e70a34d64101a6f55bf524f5d042063095f1aa2db27d6f62a67bc011c68c0 | B-Lang-org/bsc | GlobPattern.hs | module GlobPattern (parseGlobPattern, matchGlobPattern, getGlobErr,
GlobPattern) where
import Control.Monad(msum)
import Data.List(isPrefixOf, tails)
-- import Debug.Trace
data CharClass = CharRange Char Char
| CharList [Char]
| BadCharClass String
deriving (Eq)
i... | null | https://raw.githubusercontent.com/B-Lang-org/bsc/bd141b505394edc5a4bdd3db442a9b0a8c101f0f/src/comp/GlobPattern.hs | haskell | import Debug.Trace
Test if a pattern contains GlobBadPattern
Test is a character is in a class
Match a string against a glob pattern | module GlobPattern (parseGlobPattern, matchGlobPattern, getGlobErr,
GlobPattern) where
import Control.Monad(msum)
import Data.List(isPrefixOf, tails)
data CharClass = CharRange Char Char
| CharList [Char]
| BadCharClass String
deriving (Eq)
instance Show CharClass... |
7b7dbefa9bf1a14c8d0bb4124087c9333f27282e9958aedf069a96fb9555fb0e | pa-ba/compdata | Multi_Test.hs | module Data.Comp.Multi_Test where
import Test.Framework
import qualified Data.Comp.Multi.Variables_Test
--------------------------------------------------------------------------------
-- Test Suits
--------------------------------------------------------------------------------
main = defaultMain [tests]
tests = t... | null | https://raw.githubusercontent.com/pa-ba/compdata/5783d0e11129097e045cabba61643114b154e3f2/testsuite/tests/Data/Comp/Multi_Test.hs | haskell | ------------------------------------------------------------------------------
Test Suits
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Properties
-----------------------------------------------------------... | module Data.Comp.Multi_Test where
import Test.Framework
import qualified Data.Comp.Multi.Variables_Test
main = defaultMain [tests]
tests = testGroup "Multi" [
Data.Comp.Multi.Variables_Test.tests
]
|
3fa2da9d75c56512601809059263ae94330916ea2aed7e6013d905ad125e22f2 | Shirakumo/kandria | package.lisp | (defpackage #:org.shirakumo.fraf.kandria.fish)
(defpackage #:org.shirakumo.fraf.kandria.item)
(defpackage #:kandria
(:nicknames #:org.shirakumo.fraf.kandria)
(:use #:cl+trial)
(:shadow #:main #:launch #:tile #:block
#:located-entity #:sized-entity #:sprite-entity
#:camera #:light #:shadow-m... | null | https://raw.githubusercontent.com/Shirakumo/kandria/26b88c6963b2d2e3457628abbee44604cf11c7db/package.lisp | lisp | ui/general.lisp
ui/popup.lisp
module.lisp
world.lisp | (defpackage #:org.shirakumo.fraf.kandria.fish)
(defpackage #:org.shirakumo.fraf.kandria.item)
(defpackage #:kandria
(:nicknames #:org.shirakumo.fraf.kandria)
(:use #:cl+trial)
(:shadow #:main #:launch #:tile #:block
#:located-entity #:sized-entity #:sprite-entity
#:camera #:light #:shadow-m... |
234f8bee8af69bcd728f1fcd1855837b26635f74509c94aba5db68b9eb0fd0a1 | egonSchiele/dominion | Original.hs | module Dominion.Cards.Original (
-- | Playing a card is easy:
--
-- > playerId `plays` adventurer
module Dominion.Cards.Original
) where
import Dominion.Types
adventurer = Card "Adventurer" 6 [Action] [AdventurerEffect]
bureaucrat = Card "Bureaucrat" 4 [Action, Attack] [Bureaucra... | null | https://raw.githubusercontent.com/egonSchiele/dominion/a4b7300f2e445da5e7cfcc1cf9029243a3561ed6/src/Dominion/Cards/Original.hs | haskell | | Playing a card is easy:
> playerId `plays` adventurer
|
> playerId `plays` cellar `with` (Cellar [list of cards to discard])
> To move your deck into the discard pile:
> playerId `plays` chancellor `with` (Chancellor True)
If you don't want to, you don't have to use the followup action at all:
> playerId... | module Dominion.Cards.Original (
module Dominion.Cards.Original
) where
import Dominion.Types
adventurer = Card "Adventurer" 6 [Action] [AdventurerEffect]
bureaucrat = Card "Bureaucrat" 4 [Action, Attack] [BureaucratEffect]
cellar = Card "Cellar" 2 [Action] [PlusAction 1, CellarE... |
b5447fb31a2dc4afad4a1f002d52f23e1eb0f4edd6880c37d42b10c47048344d | TrustInSoft/tis-kernel | engine.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/qed/src/engine.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
6024ac2a9ec72c7bcff65cda1b50938c1d1ec776eca01b236b5e0658feba4268 | spechub/Hets | Merge.hs | |
Module : ./HasCASL / Merge.hs
Description : union of signature parts
Copyright : ( c ) and Uni Bremen 2003 - 2005
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
merging parts of local environment
Module... | null | https://raw.githubusercontent.com/spechub/Hets/f582640a174df08d4c965d7c0a1ab24d1a31000d/HasCASL/Merge.hs | haskell | |
Module : ./HasCASL / Merge.hs
Description : union of signature parts
Copyright : ( c ) and Uni Bremen 2003 - 2005
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
merging parts of local environment
Module... | |
ab39b8ef4f5769b97d0dcc27c66a7fde175948fd890312cc692fa66a90f1533c | michaxm/task-distribution | Configuration.hs | module Control.Distributed.Task.Util.Configuration (
Configuration(..), getConfiguration, DistributionStrategy(..)
)where
import Data.List.Split (splitOn)
import Control.Distributed.Task.Types.HdfsConfigTypes
data Configuration = Configuration {
_maxTasksPerNode :: Int,
_hdfsConfig :: HdfsConfig,
_pseudoDB... | null | https://raw.githubusercontent.com/michaxm/task-distribution/d0dee6a661390b7d1279389fa8c7b711309dab6a/src/Control/Distributed/Task/Util/Configuration.hs | haskell | module Control.Distributed.Task.Util.Configuration (
Configuration(..), getConfiguration, DistributionStrategy(..)
)where
import Data.List.Split (splitOn)
import Control.Distributed.Task.Types.HdfsConfigTypes
data Configuration = Configuration {
_maxTasksPerNode :: Int,
_hdfsConfig :: HdfsConfig,
_pseudoDB... | |
74e8e5636ba875fc7b972aa8f8a086224c430896b5efa22f56172c067b692028 | dimitri/pgloader | command-cast-rules.lisp | ;;;
Now parsing CAST rules for migrating from MySQL
;;;
(in-package :pgloader.parser)
(defrule cast-typemod-guard (and kw-when sexp)
(:destructure (w expr) (declare (ignore w)) (cons :typemod expr)))
(defrule cast-default-guard (and kw-when kw-default quoted-string)
(:destructure (w d value) (declare (ignore w... | null | https://raw.githubusercontent.com/dimitri/pgloader/7e1f7c51c80630263673f6dc1297a275c087cb03/src/parsers/command-cast-rules.lisp | lisp |
at the moment we only know about extra auto_increment
type names may be "double quoted"
well, we want namestring . namestring | Now parsing CAST rules for migrating from MySQL
(in-package :pgloader.parser)
(defrule cast-typemod-guard (and kw-when sexp)
(:destructure (w expr) (declare (ignore w)) (cons :typemod expr)))
(defrule cast-default-guard (and kw-when kw-default quoted-string)
(:destructure (w d value) (declare (ignore w d)) (co... |
729b307f95325bb4cda5b56995b5fc50f8406dd8c727bf03d51937b96709e302 | camlp5/camlp5 | oprint.ml | (* camlp5r *)
oprint.ml , v
Copyright ( c ) INRIA 2007 - 2017
open Format;
open Outcometree;
exception Ellipsis;
value cautious f ppf arg =
try f ppf arg with [ Ellipsis -> fprintf ppf "..." ]
;
value rec print_ident ppf =
fun
[ Oide_ident s -> fprintf ppf "%s" s
| Oide_dot id s -> fprintf ppf "%a.%s" pr... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/top/oprint.ml | ocaml | camlp5r
Values
Types
Phrases | oprint.ml , v
Copyright ( c ) INRIA 2007 - 2017
open Format;
open Outcometree;
exception Ellipsis;
value cautious f ppf arg =
try f ppf arg with [ Ellipsis -> fprintf ppf "..." ]
;
value rec print_ident ppf =
fun
[ Oide_ident s -> fprintf ppf "%s" s
| Oide_dot id s -> fprintf ppf "%a.%s" print_ident id s... |
14730416dca2882c35ce03f54a617ccc8a9a6433067089b5ef78f72041d599cd | jyp/lp-diagrams | Model.hs | module SMT.Model (readModel) where
import Text.ParserCombinators.Parsek.Position
import Data.Char (isSpace)
type P a = Parser a
tok :: String -> P ()
tok s = spaces >> string s >> return ()
many1 p = (:) <$> p <*> many p
parseDouble :: P Double
parseDouble = do
spaces
x <- many1 digit
string "."
y <- many1... | null | https://raw.githubusercontent.com/jyp/lp-diagrams/d334eee4343f340976c09d0da27431d5777a0266/SMT/Model.hs | haskell | module SMT.Model (readModel) where
import Text.ParserCombinators.Parsek.Position
import Data.Char (isSpace)
type P a = Parser a
tok :: String -> P ()
tok s = spaces >> string s >> return ()
many1 p = (:) <$> p <*> many p
parseDouble :: P Double
parseDouble = do
spaces
x <- many1 digit
string "."
y <- many1... | |
7be33b15034ccfca8bb0b101bf3b2081e212d3c1354cebb45d63a31402e748a0 | rescript-association/reanalyze | FindSourceFile.ml | (** Prepend nativeBuildTarget to fname when provided (-native-build-target) *)
let nativeFilePath fname =
match !Common.Cli.nativeBuildTarget with
| None -> fname
| Some nativeBuildTarget -> Filename.concat nativeBuildTarget fname
let rec interface items =
match items with
| {CL.Typedtree.sig_loc} :: rest ->... | null | https://raw.githubusercontent.com/rescript-association/reanalyze/f98831c1cd5dabc1737f500515f0f3ae443a232b/src/FindSourceFile.ml | ocaml | * Prepend nativeBuildTarget to fname when provided (-native-build-target) | let nativeFilePath fname =
match !Common.Cli.nativeBuildTarget with
| None -> fname
| Some nativeBuildTarget -> Filename.concat nativeBuildTarget fname
let rec interface items =
match items with
| {CL.Typedtree.sig_loc} :: rest -> (
match
not (Sys.file_exists (nativeFilePath sig_loc.loc_start.pos_f... |
3fd022718e2444951de55fa59ae006a2953cc1cd8f5347157a1b35b3facf181b | nuprl/gradual-typing-performance | classes.rkt | (module classes typed/racket
(require ;racket/class
(prefix-in mred: typed/racket/gui)
(prefix-in util: "utils.rkt")
"typed-base.rkt" ; replace this with base, after defining interfaces
"constants.rkt"
"make-cards.rkt"
string-constants
"../show-help.rkt")
;; case-lambda bug
(require (o... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/cards/cards/classes.rkt | racket | racket/class
replace this with base, after defining interfaces
case-lambda bug
Card%)))]
not sure if this is right, but a decent starting guess
mred:Snip%) Any) Void))
Since we use size-in-pixels, the letters
the descender), but the space above the letter
center on 12 , splitting
the difference for the descend... | (module classes typed/racket
(prefix-in mred: typed/racket/gui)
(prefix-in util: "utils.rkt")
"constants.rkt"
"make-cards.rkt"
string-constants
"../show-help.rkt")
(require (only-in racket/base case-lambda))
( require / typed racket [ remq ( All ( a ) ( Any ( a ) - > ( a ) ) ) ] )
(require... |
320c535b9b895da4dcbb8e8fc9da0c68a5bc6932423f4563b0e3ce5638bce542 | microsoft/hash-modulo-alpha | Hash.hs | -- |
-- For example, have a look at example1:
--
> import
-- > showExpr example1
--
-- ((lam x ((add x) x)) (lam y ((add y) y)))
{-# LANGUAGE BangPatterns #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE LambdaCase #
module Hash where
import Hedgehog hiding (Var)
import qualified Hedgehog.Gen as Gen
import... | null | https://raw.githubusercontent.com/microsoft/hash-modulo-alpha/7ff12dbee25595a141e197a4c0a3666c416abc4e/src/Hash.hs | haskell | |
For example, have a look at example1:
> showExpr example1
((lam x ((add x) x)) (lam y ((add y) y)))
# LANGUAGE BangPatterns #
hash-code at every node
Does not return a decorated expression, only a hash code
All nested lambdas are dealt with via deBruijn
'uniquifyBinders'
| Makes binders unique whil... | > import
# LANGUAGE TemplateHaskell #
# LANGUAGE LambdaCase #
module Hash where
import Hedgehog hiding (Var)
import qualified Hedgehog.Gen as Gen
import Data.Char (ord)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Hashable (Hashable, hash)
import Data.Function (on)
import D... |
eb74289c7f66427765866f4d10fbacc56d0f97197f611a6730d0bed19217ed25 | paurkedal/batyr | message.ml | Copyright ( C ) 2022 < >
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version .
*
* This p... | null | https://raw.githubusercontent.com/paurkedal/batyr/ade1853a93c32c79384eb5eec0d8c79401c1ca04/rockettime/lib/message.ml | ocaml | many more fields
parlsedUrl | Copyright ( C ) 2022 < >
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version .
*
* This p... |
f37b9a3502c53a44118d3f31c2f90d2ad0b1d3d1f86523a521f84acefeee8cc5 | emina/rosette | raco.rkt | #lang racket/base
(require racket/cmdline
raco/command-name
"../util/module.rkt"
"compile.rkt"
"tool.rkt"
(only-in "record.rkt" filtering-threshold)
"renderer/trace.rkt"
"renderer/noop.rkt"
"renderer/heap.rkt"
"renderer/report.rkt")
;; r... | null | https://raw.githubusercontent.com/emina/rosette/b58652b26f110931638f0b78fa6bb301e6da2768/rosette/lib/profile/raco.rkt | racket | raco symprofile (based on raco feature-profile)
profile the main submodule (if there is one), or the top-level module
Profiler selections
Tool configuration
Renderer-specific configuration
pass all unused arguments to the file being run
Set up the renderer | #lang racket/base
(require racket/cmdline
raco/command-name
"../util/module.rkt"
"compile.rkt"
"tool.rkt"
(only-in "record.rkt" filtering-threshold)
"renderer/trace.rkt"
"renderer/noop.rkt"
"renderer/heap.rkt"
"renderer/report.rkt")
(de... |
19177e8a21960035c6b50d4d9ab05a4111a1dcfd0e6e1a99260ed82f16b22025 | AeneasVerif/aeneas | TypesUtils.ml | open Types
include Charon.TypesUtils
module TA = TypesAnalysis
* Retuns true if the type contains borrows .
Note that we ca n't simply explore the type and look for regions : sometimes
we erase the lists of regions ( by replacing them with [ [ ] ] when using { ! } ,
and when a type uses ' static th... | null | https://raw.githubusercontent.com/AeneasVerif/aeneas/d8d661d02cf0068753ae3963156896492dfde50a/compiler/TypesUtils.ml | ocaml | * Retuns true if the type contains a borrow under a mutable borrow | open Types
include Charon.TypesUtils
module TA = TypesAnalysis
* Retuns true if the type contains borrows .
Note that we ca n't simply explore the type and look for regions : sometimes
we erase the lists of regions ( by replacing them with [ [ ] ] when using { ! } ,
and when a type uses ' static th... |
4fee07d230ef6cac9ab2eebcafcbd829280eb7db35007de74e905dc45e396ef4 | janestreet/sexp | sexps.mli | open! Core
type t = Sexp.t Hash_set.t
val create : unit -> t
val of_list : Sexp.t list -> t
include Sexpable with type t := t
| null | https://raw.githubusercontent.com/janestreet/sexp/56e485b3cbf8a43e1a8d7647b0df31b27053febf/sexp_app/src/sexps.mli | ocaml | open! Core
type t = Sexp.t Hash_set.t
val create : unit -> t
val of_list : Sexp.t list -> t
include Sexpable with type t := t
| |
461aa09df122a4a6a10ec29c1e0b9f544ea2c2a347cca431539ce85e0360285c | RoadRunnr/dtlsex | dtlsex_session_cache.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2012 . 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 Publi... | null | https://raw.githubusercontent.com/RoadRunnr/dtlsex/6cb9e52ff00ab0e5f33e0c4b54bf46eacddeb8e7/src/dtlsex_session_cache.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 limitatio... | Copyright Ericsson AB 2008 - 2012 . 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(dtlsex_session_cache).
-behaviour... |
d18e08c673c4b63197345cc104454f4e6d7f5e8cf12b67f7986055982d978ae4 | abhinav/pinch | FoldListSpec.hs | # LANGUAGE ScopedTypeVariables #
module Pinch.Internal.FoldListSpec (spec) where
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck
import qualified Data.Foldable as F
import qualified Data.IORef as IORef
import qualified Data.Vector as V
import qualified Pinch.In... | null | https://raw.githubusercontent.com/abhinav/pinch/4b09f7960840f316b223bff9b9b44a6a51d3cccc/tests/Pinch/Internal/FoldListSpec.hs | haskell | # LANGUAGE ScopedTypeVariables #
module Pinch.Internal.FoldListSpec (spec) where
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck
import qualified Data.Foldable as F
import qualified Data.IORef as IORef
import qualified Data.Vector as V
import qualified Pinch.In... | |
50c438c12dcb1b85108cf802dbfd89f2ae1c37a2eb1781699bb650ac75e6051b | msfm2018/Online-Service | utils.erl | -module(utils).
-include("common.hrl").
-compile(export_all).
% ets 为非关键字 的查询删除
del_player(So) ->
Key = ets:first(users),
case Key of
'$end_of_table' -> void;
_ ->
RT = ets:lookup(users, Key),
case RT of
[] -> void;
_ ->
[{_, _, _, _, B}] = RT,
case B == So of
true ->
ets:delete(users, Key);
false ->
nx(Key, So)
e... | null | https://raw.githubusercontent.com/msfm2018/Online-Service/281c2db795f09c7e4dc6768d08d35bbe83350670/src/lib/utils.erl | erlang | ets 为非关键字 的查询删除
io:format("next2~n"),
删除 代理IP
currently cannot handle this case... :-(
@doc 获取元组列表中对应k的v
@doc get IP address string from Socket
@doc quick sort
for
@doc convert other type to atom
@doc convert other type to list
@doc convert other type to binary
@doc convert other type to float
@do... | -module(utils).
-include("common.hrl").
-compile(export_all).
del_player(So) ->
Key = ets:first(users),
case Key of
'$end_of_table' -> void;
_ ->
RT = ets:lookup(users, Key),
case RT of
[] -> void;
_ ->
[{_, _, _, _, B}] = RT,
case B == So of
true ->
ets:delete(users, Key);
false ->
nx(Key, So)
end
end
end.
nx(K... |
2f6a529f4a7de687fad4c17a348314e3254c2d283bacf9b61a694b22a5cc8b9b | Enecuum/Node | Interpreters.hs | module Enecuum.Testing.Core.Interpreters
( module X
) where
import Enecuum.Testing.Core.Interpreters.Logger as X
import Enecuum.Testing.Core.Interpreters.CoreEffect as X
| null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/test/test-framework/Enecuum/Testing/Core/Interpreters.hs | haskell | module Enecuum.Testing.Core.Interpreters
( module X
) where
import Enecuum.Testing.Core.Interpreters.Logger as X
import Enecuum.Testing.Core.Interpreters.CoreEffect as X
| |
e4f9159e577b47d7bf68859317acc3c959c004cd994c673eb19dd990ec252f6d | abdulapopoola/SICPBook | 3.02.scm | #lang planet neil/sicp
;; Looks like a spy function
(define (make-monitored proc)
(let ((counter 0))
(define (dispatch m)
(cond ((eq? m 'how-many-calls?) counter)
((eq? m 'reset)
(set! counter 0))
(else (set! counter (+ counter 1))
... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%203/3.1/3.02.scm | scheme | Looks like a spy function | #lang planet neil/sicp
(define (make-monitored proc)
(let ((counter 0))
(define (dispatch m)
(cond ((eq? m 'how-many-calls?) counter)
((eq? m 'reset)
(set! counter 0))
(else (set! counter (+ counter 1))
(proc m))))
dis... |
cddaa7196d147079fb3828c422d7b9dcecfb0c3f256732854d2311f3e4d44531 | janestreet/universe | client.mli | open Core
val command : command:string -> unit Or_error.t Api_call.t
val command_output : command:string -> string Or_error.t Api_call.t
val get_chan_info : chan:int -> Channel_info.t Or_error.t Api_call.t
val list_bufs : Buf.t list Or_error.t Api_call.t
val list_chans : Channel_info.t list Or_error.t Api_call.t
val g... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/vcaml/src/client.mli | ocaml | open Core
val command : command:string -> unit Or_error.t Api_call.t
val command_output : command:string -> string Or_error.t Api_call.t
val get_chan_info : chan:int -> Channel_info.t Or_error.t Api_call.t
val list_bufs : Buf.t list Or_error.t Api_call.t
val list_chans : Channel_info.t list Or_error.t Api_call.t
val g... | |
115de62cd865056c863f189b44dbff04a8235ddf25d10515c4e4a4649930c6a3 | obsidiansystems/obelisk | Types.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StandaloneDeriving #
# LANGUAGE UndecidableIn... | null | https://raw.githubusercontent.com/obsidiansystems/obelisk/9127921ab7cd1e67f6869ee814491a5a7aafb698/lib/cliapp/src/Obelisk/CliApp/Types.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
Regular logging message (with colors and newlines)
Like `Output_Log` but without the implicit newline added.
Clear the line
| Log a message to the console.
Logs safely even if... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
# LANGUAGE UndecidableInstances #
module Obelisk.CliApp.Types where
import Control.Concurre... |
c45081196fb88a14c8b6622f19e1561a3d275abe2e2940ecf2e9e0252d6d7ff8 | Opetushallitus/aipal | vastaajatunnus_test.clj | (ns aipal.arkisto.vastaajatunnus-test
(:require [aipal.arkisto.vastaajatunnus :refer :all])
(:use clojure.test))
(deftest tunnukset-ovat-keskenaan-yksilollisia
(testing "Tarkistetaan että funktio osaa luoda vain keskenään uniikkien tunnusten joukon kun mahdolliset merkit loppuvat."
(let [merkkien-lkm (co... | null | https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal/test/clj/aipal/arkisto/vastaajatunnus_test.clj | clojure | (ns aipal.arkisto.vastaajatunnus-test
(:require [aipal.arkisto.vastaajatunnus :refer :all])
(:use clojure.test))
(deftest tunnukset-ovat-keskenaan-yksilollisia
(testing "Tarkistetaan että funktio osaa luoda vain keskenään uniikkien tunnusten joukon kun mahdolliset merkit loppuvat."
(let [merkkien-lkm (co... | |
0fff322052f545081fd02cec1b65c1e44d3db27c9a05097736b03f224c6a7875 | wilbowma/cur | issue-60.rkt | #lang cur
(require
cur/stdlib/sugar
cur/stdlib/prop
rackunit/turnstile+)
(typecheck-fail/toplvl
(define-datatype Nat : Type
(z : Nat)
(s : (-> (-> (-> Nat False) False) Nat)))
#:with-msg "does not satisfy strict positivity")
| null | https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-test/cur/tests/issue-60.rkt | racket | #lang cur
(require
cur/stdlib/sugar
cur/stdlib/prop
rackunit/turnstile+)
(typecheck-fail/toplvl
(define-datatype Nat : Type
(z : Nat)
(s : (-> (-> (-> Nat False) False) Nat)))
#:with-msg "does not satisfy strict positivity")
| |
2cf9a4919c1fed7448983d8ca722acdbf2bd063d80d1fd054b9fe14a3a91794d | ghc/testsuite | tc219.hs | {-# LANGUAGE ImplicitParams, NoMonomorphismRestriction #-}
module ShouldCompile where
c.f . , only no type signature here
-- Instead, the NoMonomorphismRestriction language
bar = show ?c
foo1 = let { ?c = 'x' } in bar
foo2 = let { ?c = True } in bar
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/tc219.hs | haskell | # LANGUAGE ImplicitParams, NoMonomorphismRestriction #
Instead, the NoMonomorphismRestriction language |
module ShouldCompile where
c.f . , only no type signature here
bar = show ?c
foo1 = let { ?c = 'x' } in bar
foo2 = let { ?c = True } in bar
|
a5aabb232c70494782a1b274c7d49f241d189cef57ed72e40b3486e87fe37354 | HunterYIboHu/htdp2-solution | ex75-ufo.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 5.6-ufo) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.r... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter1/Section5/ex75-ufo.rkt | racket | about the language level of this file in a form that our tools can easily process.
interpretation
(make-vel dx dy) means a velocity of dx pixels [per tick]
along the horizontal and dy pixels along the vertical direction
A UFO is a structure: (make-ufo Posn Vel)
interpretation (make-ufo p v) is at location p movi... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 5.6-ufo) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t write repeating-decimal #f #t none #f (... |
f6b63a34eb375c82022fedb697b4dd6e1a760a73f47b626725053760eeea3126 | gabebw/croniker | Root.hs | module Handler.Root
( getRootR
) where
import Import
import Yesod.Auth.OAuth (twitterUrl)
getRootR :: Handler Html
getRootR = do
maid <- maybeAuthId
case maid of
Nothing -> defaultLayout $ do
setTitle "Croniker"
$(widgetFile "root")
(Just _) -> redirect Profil... | null | https://raw.githubusercontent.com/gabebw/croniker/89f081738c229a3302af3b0123fea208bccbda11/Handler/Root.hs | haskell | module Handler.Root
( getRootR
) where
import Import
import Yesod.Auth.OAuth (twitterUrl)
getRootR :: Handler Html
getRootR = do
maid <- maybeAuthId
case maid of
Nothing -> defaultLayout $ do
setTitle "Croniker"
$(widgetFile "root")
(Just _) -> redirect Profil... | |
c7e6310648563e81b33e82c0236b36d8e1adf7d19706f3a8afc56234698ae35c | ivarref/double-trouble | counter_str.clj | (ns com.github.ivarref.double-trouble.counter-str
(:require [datomic.api :as d])
(:import (datomic.db DbId)))
(defn counter-str [db counter-name tempid attr]
(assert (string? counter-name) "counter-name must be a string")
(assert (or (instance? DbId tempid) (string? tempid)) "tempid must be a string or datomic... | null | https://raw.githubusercontent.com/ivarref/double-trouble/a8ebc58758c21b1a6f4e5faa0128bb034526a26d/src/com/github/ivarref/double_trouble/counter_str.clj | clojure | (ns com.github.ivarref.double-trouble.counter-str
(:require [datomic.api :as d])
(:import (datomic.db DbId)))
(defn counter-str [db counter-name tempid attr]
(assert (string? counter-name) "counter-name must be a string")
(assert (or (instance? DbId tempid) (string? tempid)) "tempid must be a string or datomic... | |
e6051adae19483e7c4aa44ba5730a4110b6e4ca0542b20eab85217a8e25d2b8e | unison-code/unison | ImplementFrameOperations.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Tools/Import/ImplementFrameOperations.hs | haskell | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | |
ef3654911438d2d154875cab1bfd3c8b0102545e88fdcd2b816189261dc901dd | osener/bonsai_revery | color.mli | exception Color_hex_parse_exception of string
type t = Revery.Color.t
val rgba : float -> float -> float -> float -> t
val rgb : float -> float -> float -> t
val rgba_int : int -> int -> int -> int -> t
val rgb_int : int -> int -> int -> t
(** @raise Color_hex_parse_exception on invalid hex color strings *)
val hex ... | null | https://raw.githubusercontent.com/osener/bonsai_revery/754346997c21d2c4f91e6a7e7e6ce9f18df09056/src/color.mli | ocaml | * @raise Color_hex_parse_exception on invalid hex color strings | exception Color_hex_parse_exception of string
type t = Revery.Color.t
val rgba : float -> float -> float -> float -> t
val rgb : float -> float -> float -> t
val rgba_int : int -> int -> int -> int -> t
val rgb_int : int -> int -> int -> t
val hex : string -> t
val multiply_alpha : float -> t -> t
val mix : start:t... |
70b0e3e20cdb927df9a81949e7e1e1276146b3905de5bdd131a2d513166b3f76 | fjames86/schannel | ffi.lisp | Copyright ( c ) 2019 < >
This code is licensed under the MIT license .
(in-package #:schannel)
(define-foreign-library secur32
(:windows "Secur32.dll"))
(use-foreign-library secur32)
(define-foreign-library crypt32
(:windows "Crypt32.dll"))
(use-foreign-library crypt32)
;; ---------------------- Useful... | null | https://raw.githubusercontent.com/fjames86/schannel/95182848e672065e6a679175dc843ec06bcf154e/ffi.lisp | lisp | ---------------------- Useful utilities -----------------------
----------------------------------------------------------------
typedef struct _CERT_CONTEXT {
BYTE *pbCertEncoded;
PCERT_INFO pCertInfo;
} CERT_CONTEXT, *PCERT_CONTEXT;
typedef struct _CRYPTOAPI_BLOB {
}
typedef struct _CRYPT_ALGO... | Copyright ( c ) 2019 < >
This code is licensed under the MIT license .
(in-package #:schannel)
(define-foreign-library secur32
(:windows "Secur32.dll"))
(use-foreign-library secur32)
(define-foreign-library crypt32
(:windows "Crypt32.dll"))
(use-foreign-library crypt32)
(defun memset (ptr count &opti... |
44823815d0e2fd06f54ec07c9acd43236cf8c1cb2166df286efec359edcd7a9c | merijn/Belewitte | RunConfig.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralisedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE Standalo... | null | https://raw.githubusercontent.com/merijn/Belewitte/cab6010a2bc54acfc4f4b169c95799fe455799ef/benchmark-analysis/src/Schema/RunConfig.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
Schema version for current schema | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralisedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeF... |
2bed73dbf4a9bbc6de0901f51790d55a81dcc1113ea8a246ceb59ab5f9f2c884 | w01fe/sniper | snarf.clj | (ns sniper.snarf
"Snarf in namespaces and extract sniper.core/Forms with dependency info.
Main entry point is `classpath-ns-forms`."
(:use plumbing.core)
(:require
[clojure.java.classpath :as classpath]
[clojure.java.io :as java-io]
[clojure.tools.analyzer.ast :as ast]
[clojure.tools.analyzer.env :... | null | https://raw.githubusercontent.com/w01fe/sniper/cdfadbef08bf41aea2cf6b0c854de6497ca52022/src/sniper/snarf.clj | clojure |
(println "\n\n" form)
Private helpers: extracting definitions and references from forms
possibly defprotocol
defmethod is part of multi var def.
Public | (ns sniper.snarf
"Snarf in namespaces and extract sniper.core/Forms with dependency info.
Main entry point is `classpath-ns-forms`."
(:use plumbing.core)
(:require
[clojure.java.classpath :as classpath]
[clojure.java.io :as java-io]
[clojure.tools.analyzer.ast :as ast]
[clojure.tools.analyzer.env :... |
c563318325dce187eb8601b69083158100eb586a13a2a0ff7c80402ac94c2900 | bmeurer/ocamljit2 | multimatch.ml | (* Simple example *)
let f x =
(multimatch x with `A -> 1 | `B -> true),
(multimatch x with `A -> 1. | `B -> "1");;
(* OK *)
module M : sig
val f :
[< `A & 'a = int & 'b = float | `B & 'b =string & 'a = bool] -> 'a * 'b
end = struct let f = f end;;
(* Bad *)
module M : sig
val f :
[< `A & 'a = int ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/testlabl/multimatch.ml | ocaml | Simple example
OK
Bad
Should be good!
OK
Bad
Examples with hidden sharing
Bad!
Now OK
Still OK
Examples that would need unification
Didn't work, now Ok
Other examples
type dispatch | let f x =
(multimatch x with `A -> 1 | `B -> true),
(multimatch x with `A -> 1. | `B -> "1");;
module M : sig
val f :
[< `A & 'a = int & 'b = float | `B & 'b =string & 'a = bool] -> 'a * 'b
end = struct let f = f end;;
module M : sig
val f :
[< `A & 'a = int & 'b = float | `B & 'b =string & 'a = ... |
ec7b882f907af1bfd1df93fc60f612e6c040a2faa463e7f5a2be3608da9fc6ff | jumarko/clojure-experiments | day-03.clj | (ns clojure-experiments.advent-of-code.advent-2020.day-03
"
Input: "
(:require [clojure-experiments.advent-of-code.advent-2020.utils :refer [read-input]]
[clojure.string :as str]))
(def sample-input
(->
"..##.......
#...#...#..
.#....#..#.
..#.#...#.#
.#...##..#.
..#.##.....
.#.#.#....#
.#........ | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/advent_of_code/advent_2020/day-03.clj | clojure | ... but computing indices using module is much simpler
until we reach the bommot-most row on our map | (ns clojure-experiments.advent-of-code.advent-2020.day-03
"
Input: "
(:require [clojure-experiments.advent-of-code.advent-2020.utils :refer [read-input]]
[clojure.string :as str]))
(def sample-input
(->
"..##.......
#...#...#..
.#....#..#.
..#.#...#.#
.#...##..#.
..#.##.....
.#.#.#....#
.#........ |
0c0abaf726801aceccc8aa0cc7d1823a7f011dd57218ea15b101dc2fd5466a14 | Helium4Haskell/helium | SimilarFunction2.hs | module SimilarFunction2 where
keerPi :: Float -> Float
keerPi x = pi * x
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/simple/typeerrors/Heuristics/SimilarFunction2.hs | haskell | module SimilarFunction2 where
keerPi :: Float -> Float
keerPi x = pi * x
| |
68e742c912316a282c08606a24750ba771493b4ed73237ef5faf8d7b779118d3 | didierverna/declt | package.lisp | package.lisp --- Declt package definition
Copyright ( C ) 2010 - 2013 , 2015 , 2017 , 2021 , 2022
Author : < >
This file is part of Declt .
;; Permission to use, copy, modify, and distribute this software for any
;; purpose with or without fee is hereby granted, provided that the above
;; copyright not... | null | https://raw.githubusercontent.com/didierverna/declt/2b81350102d78b8122be908b8619f43fbf87da57/core/package.lisp | lisp | Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SH... | package.lisp --- Declt package definition
Copyright ( C ) 2010 - 2013 , 2015 , 2017 , 2021 , 2022
Author : < >
This file is part of Declt .
THIS SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSO... |
26248cdcc41898431a05d5df75df57a83948201547109d048e085d60fcb5b062 | nikita-volkov/rerebase | STM.hs | module Control.Concurrent.STM
(
module Rebase.Control.Concurrent.STM
)
where
import Rebase.Control.Concurrent.STM
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Control/Concurrent/STM.hs | haskell | module Control.Concurrent.STM
(
module Rebase.Control.Concurrent.STM
)
where
import Rebase.Control.Concurrent.STM
| |
68f69e40e59aa927c3677f31b46c8a3b1d4473894e7badb4764a5d69746ea632 | csabahruska/jhc-components | Real.hs | module Jhc.Class.Real(Real(..),Integral(..),Fractional(..),Rational) where
import Jhc.Basics
import Jhc.Class.Num
import Jhc.Class.Ord
import Jhc.Enum
import Jhc.Inst.Num
import Jhc.Type.Float
infixl 7 /, `quot`, `rem`, `div`, `mod`
type Rational = Ratio Integer
class (Num a, Ord a) => Real a where
toRation... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/lib/jhc/Jhc/Class/Real.hs | haskell | Minimal complete definition:
quotRem, toInteger
Minimal complete definition:
fromRational and (recip or (/)) | module Jhc.Class.Real(Real(..),Integral(..),Fractional(..),Rational) where
import Jhc.Basics
import Jhc.Class.Num
import Jhc.Class.Ord
import Jhc.Enum
import Jhc.Inst.Num
import Jhc.Type.Float
infixl 7 /, `quot`, `rem`, `div`, `mod`
type Rational = Ratio Integer
class (Num a, Ord a) => Real a where
toRation... |
3301e1e67c0a24f271664ef9f32892aa77602fb928f79cd20d04d07d67033703 | mdedwards/slippery-chicken | reeling-trains.lsp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; File: reeling-trains.lsp
;;;
Class Hierarchy : None
;;;
Version : 1.0
;;;
;;; Project: slippery chicken (algorithmic composition)
;;;
;;; Purpose: Lisp example code to accompany t... | null | https://raw.githubusercontent.com/mdedwards/slippery-chicken/c1c11fadcdb40cd869d5b29091ba5e53c5270e04/doc/examples/reeling-trains.lsp | lisp |
File: reeling-trains.lsp
Project: slippery chicken (algorithmic composition)
Purpose: Lisp example code to accompany trains.html
Creation date: 1st December 2012
****
This file is part of slippery-chicken
slippery-... | Class Hierarchy : None
Version : 1.0
Author :
$ $ Last modified : 22:47:17 Fri May 17 2013 BST
SVN ID : $ I d : reeling-trains.lsp 3538 2013 - 05 - 18 08:29:15Z medward2 $
Licence : Copyright ( c ) 2012
Public License as published by the F... |
f033efe8376c5d30b678300c9684fcfb3e1827678698439215829b9db8793db3 | uim/uim | hangul2.scm | ;;;
Copyright ( c ) 2003 - 2013 uim Project
;;;
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
1 . Redistributions of source code must retain the above copyright
;;; notice, t... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/hangul2.scm | scheme |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
documen... | Copyright ( c ) 2003 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR... |
65672f4d6f8ed351c0e8857a35d2d3c01c076b60bf779ab826216d4340830d7a | google/lisp-koans | vectors.lisp | Copyright 2013 Google Inc.
;;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the License.
;;; You may obtain a copy of the License at
;;;
;;; -2.0
;;;
;;; Unless required by applicable law or agreed to in writing, software
distrib... | null | https://raw.githubusercontent.com/google/lisp-koans/df5e58dc88429ef0ff202d0b45c21ce572144ba8/koans/vectors.lisp | lisp |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2013 Google Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
Vectors are one - dimensional arrays . This means that general array operations
will work on vectors normally . However , also defines some functions for
(define-test vector-basics
(let ((vector #(1 11 111)))
... |
28ea792121922de8ce92acc1bcbf44425e17b7638c974e05f09490201ade66b2 | divipp/emulator-stunts | Dos.hs | {-# LANGUAGE OverloadedStrings #-}
module Dos where
import Data.Word
import Data.Int
import Data.Bits hiding (bit)
import Data.Char
import Data.List
import Data.Monoid
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BSC
import qualified Data.Map as M
import qualified Data.IntMap.Strict... | null | https://raw.githubusercontent.com/divipp/emulator-stunts/5f7077ff04f44af24c6a95504a52818b73a7f3b1/emulate8086/Dos.hs | haskell | # LANGUAGE OverloadedStrings #
-------------------------------------------- memory allocation
------------------------------------
------------------------------------------------------------------------------
?
v -> trace_ "int resume " ++ show
?
?
Set timer control
----------------------------------... | module Dos where
import Data.Word
import Data.Int
import Data.Bits hiding (bit)
import Data.Char
import Data.List
import Data.Monoid
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BSC
import qualified Data.Map as M
import qualified Data.IntMap.Strict as IM
import qualified Data.Vector... |
d31254304cf7bf4a0867668f5c4695622d7030f78f8cb5a28da15ecfa8144df5 | acieroid/scala-am | count7.scm | (letrec ((i 100)
(thread (lambda (n)
(if (<= i 0)
#t
(begin (set! i (- i 1)) (thread n)))))
(t1 (fork (thread 1)))
(t2 (fork (thread 2)))
(t3 (fork (thread 3)))
(t4 (fork (thread 4)))
(t5 (fork (thread 5)))
(t6 (fork (thread 6)))
(t7 (fork (thread 7)))... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/threads/variations/count7.scm | scheme | (letrec ((i 100)
(thread (lambda (n)
(if (<= i 0)
#t
(begin (set! i (- i 1)) (thread n)))))
(t1 (fork (thread 1)))
(t2 (fork (thread 2)))
(t3 (fork (thread 3)))
(t4 (fork (thread 4)))
(t5 (fork (thread 5)))
(t6 (fork (thread 6)))
(t7 (fork (thread 7)))... | |
9a912d865c156a89206310afdb50a0451d3dd5950c17c318b358a22381153e76 | shamazmazum/easy-audio | frame.lisp | (in-package :easy-audio.ape)
(defconstant +mono-silence+ 1)
(defconstant +stereo-silence+ 3)
(defconstant +pseudo-stereo+ 4)
(deftype octet-reader ()
'(function (&optional) (ub 8)))
(defparameter *stereo-entropy-versions*
'#.(reverse '(0 3860 3900 3930 3990)))
(defparameter *mono-entropy-versions*
'#.(reverse... | null | https://raw.githubusercontent.com/shamazmazum/easy-audio/64700a5c84aa27176f2dd9936e1051966611a481/ape/frame.lisp | lisp | TODO: calculate this from *counts*
What's the difference between bytestream_get_[b|l]e32() and
get_bits_long()?
Copy version and calculate compression level
Read entropy
Seek to the start of a frame
Make that peculiar swapped-bytes reader needed to read a frame
Skip some bytes from the beginning
Read a frame
... | (in-package :easy-audio.ape)
(defconstant +mono-silence+ 1)
(defconstant +stereo-silence+ 3)
(defconstant +pseudo-stereo+ 4)
(deftype octet-reader ()
'(function (&optional) (ub 8)))
(defparameter *stereo-entropy-versions*
'#.(reverse '(0 3860 3900 3930 3990)))
(defparameter *mono-entropy-versions*
'#.(reverse... |
3efcae6a0ce869970003a2f30f7d5fd8676092814ad37019d6c44813794dcfbd | racket/racket7 | jitify.rkt | #lang racket/base
(require "match.rkt"
"wrap.rkt")
;; Convert `lambda`s to make them fully closed, which is compatible
;; with JIT compilation of the `lambda` or separate ahead-of-time
;; compilation (as opposed to compiling a whole linklet).
;; If `convert-size-threashold` is #f, then every `lambda` is
;; c... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/schemify/jitify.rkt | racket | Convert `lambda`s to make them fully closed, which is compatible
with JIT compilation of the `lambda` or separate ahead-of-time
compilation (as opposed to compiling a whole linklet).
If `convert-size-threashold` is #f, then every `lambda` is
converted. If it's a number, then only `lambda`s smaller than the
thresh... | #lang racket/base
(require "match.rkt"
"wrap.rkt")
(provide jitify-schemified-linklet)
(define (jitify-schemified-linklet v
need-extract?
extractable-annotation
reannotate)
a closed ` lambda ` form... |
548ac3f45cc77f084621427e2597733f32bea8cda76c10ffaa6b6c7ecb58c060 | geneanet/ocaml-wikitext | wikitext_js.ml | open Js_of_ocaml
open Wikitext
let () =
let getElementById coerce id =
match Js.Opt.to_option @@ Dom_html.document##getElementById (Js.string id) with
| None -> failwith id
| Some x -> match Js.Opt.to_option @@ coerce x with
| None -> failwith id
| Some x -> x
in
let i... | null | https://raw.githubusercontent.com/geneanet/ocaml-wikitext/d507087a04ee72e92b430040e4a9ce31c7148a1a/test/wikitext_js.ml | ocaml | open Js_of_ocaml
open Wikitext
let () =
let getElementById coerce id =
match Js.Opt.to_option @@ Dom_html.document##getElementById (Js.string id) with
| None -> failwith id
| Some x -> match Js.Opt.to_option @@ coerce x with
| None -> failwith id
| Some x -> x
in
let i... | |
bff2f1b085bc78c1bdfdd2023bcb172c26d4f7ef8de2debe25288b48f3107d9e | webyrd/n-grams-for-synthesis | r7rs-shim.scm | ;;; Necessary R7RS syntax and procedures
(define-syntax when
(syntax-rules ()
((when test . body)
(if test (begin . body)))))
;;> \procedure{(string-map proc str)}
;;>
;;> Returns a new string composed of applying the procedure \var{proc}
;;> to every character in \var{string}.
(define (string-map proc st... | null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-130/foof/r7rs-shim.scm | scheme | Necessary R7RS syntax and procedures
> \procedure{(string-map proc str)}
>
> Returns a new string composed of applying the procedure \var{proc}
> to every character in \var{string}.
> \procedure{(string-for-each proc str)}
>
> discard the result. |
(define-syntax when
(syntax-rules ()
((when test . body)
(if test (begin . body)))))
(define (string-map proc str . los)
(let* ((out (open-output-string))
(void (apply string-for-each
(lambda args (write-char (apply proc args) out))
str los))
(res (get-output-string... |
9677f5ee364220b1e2948a7ab810cad43bd0ea5ad5ead6019573913100604cf0 | yzhs/ocamlllvm | marshal.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/stdlib/marshal.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1997 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ Id$
type extern_flags =
No_sha... |
74750ab9918c4b33d668e33f79cd5c0a2276ec7b2d9e8ba1978cc206a0a7bb3e | haskell/cabal | custom.test.hs | {-# LANGUAGE OverloadedStrings #-}
import Test.Cabal.Prelude
import Test.Cabal.DecodeShowBuildInfo
import Control.Monad.Trans.Reader
main = setupTest $ do
-- No cabal test because per-component is broken with it
skipUnlessGhcVersion ">= 8.1"
withPackageDb $ do
setup_build ["--en... | null | https://raw.githubusercontent.com/haskell/cabal/c21dbcd2a9d54962eb39f598dfce2d012ff7fd1c/cabal-testsuite/PackageTests/ShowBuildInfo/Custom/custom.test.hs | haskell | # LANGUAGE OverloadedStrings #
No cabal test because per-component is broken with it | import Test.Cabal.Prelude
import Test.Cabal.DecodeShowBuildInfo
import Control.Monad.Trans.Reader
main = setupTest $ do
skipUnlessGhcVersion ">= 8.1"
withPackageDb $ do
setup_build ["--enable-build-info"]
env <- ask
let buildInfoFp = testDistDir env </> "build-info.json"
... |
1d442d6287b4cd778a4ebe594f3ae005cfa2b0cd96d2fa1b1c0a604c56d2019f | MondayMorningHaskell/haskellings | Syntax5.hs | -- I AM NOT DONE
import Test.Tasty
import Test.Tasty.HUnit
- So far our functions have been very simple . So we 've been able to write the whole
result on a single line without re - using sub - expressions . But often this is n't the case .
Suppose we want to use some part of our answer multiple times . It... | null | https://raw.githubusercontent.com/MondayMorningHaskell/haskellings/fafadd5bbb722b54c1b7b114e34dc9b96bb7ca4d/exercises/syntax/Syntax5.hs | haskell | I AM NOT DONE
< Can use prod1 even though it 's defined " after " .
< This is a problem ! prod3 and prod4 depend on each other !
< Can use prod1 even though it's defined "after".
< This is a problem! prod3 and prod4 depend on each other!
TODO: Use 'where' clauses to complete these functions!
Take the sum of ea... |
import Test.Tasty
import Test.Tasty.HUnit
- So far our functions have been very simple . So we 've been able to write the whole
result on a single line without re - using sub - expressions . But often this is n't the case .
Suppose we want to use some part of our answer multiple times . It would make our c... |
6e87b89a47785a1c6c59e48c6285b42526b7d6850a137f64d2c4920567d24047 | janestreet/universe | readme.ml | open Core
[ Command ] treats the first space - separated word as part of an argument .
Without the space prefix , the readme will have the following form in -help output :
[ -readme Display ] documentation for the configuration file and
Without the space prefix, the readme will have the ... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/patdiff/bin/readme.ml | ocaml | open Core
[ Command ] treats the first space - separated word as part of an argument .
Without the space prefix , the readme will have the following form in -help output :
[ -readme Display ] documentation for the configuration file and
Without the space prefix, the readme will have the ... | |
9e3211ad62c1cd6730536452e43d40b65efe603abbf7456599f9d75211faa0b0 | vouch-opensource/vouch-load-tests | converter.clj | (ns io.vouch.load-tests.task.definition.converter)
(defmulti task-definition->task (fn [definition] (:task definition)))
(defmethod task-definition->task :default [definition] definition)
(defn number-definition->number
[definition]
(if (vector? definition)
(let [[low high] definition]
(+ low (rand-int... | null | https://raw.githubusercontent.com/vouch-opensource/vouch-load-tests/d1d3a8b7df760ad452037d69cce85b0f2ccbb3b8/src/io/vouch/load_tests/task/definition/converter.clj | clojure | (ns io.vouch.load-tests.task.definition.converter)
(defmulti task-definition->task (fn [definition] (:task definition)))
(defmethod task-definition->task :default [definition] definition)
(defn number-definition->number
[definition]
(if (vector? definition)
(let [[low high] definition]
(+ low (rand-int... | |
4bd50749d82d346aad91ace02f0276ca91d92ad05e18487efe362b37202117bd | SimulaVR/godot-haskell | VisualShaderNodeVectorClamp.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.VisualShaderNodeVectorClamp () where
import Data.Coerce
imp... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/VisualShaderNodeVectorClamp.hs | haskell | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.VisualShaderNodeVectorClamp () where
import Data.Coerce
imp... | |
887206e2c81544c683c9570f3a6f944788cf3a0df54db4c844b5ae7a6943a6ce | jayrbolton/coursework | Tutorial_notes.hs | {-# LANGUAGE EmptyDataDecls
, ExistentialQuantification
, ScopedTypeVariables
, NoMonomorphismRestriction
#-}
module MAlonzo.Tutorial_notes where
import qualified Unsafe.Coerce
name1 = ("Tutorial_notes.Bool")
d1 = (())
data T1 = C2
| C3
name2 = ("Tutorial_notes.true")
name3 ... | null | https://raw.githubusercontent.com/jayrbolton/coursework/f0da276527d42a6751fb8d29c76de35ce358fe65/computability_and_formal_languages/project__/agda/MAlonzo/Tutorial_notes.hs | haskell | # LANGUAGE EmptyDataDecls
, ExistentialQuantification
, ScopedTypeVariables
, NoMonomorphismRestriction
# | module MAlonzo.Tutorial_notes where
import qualified Unsafe.Coerce
name1 = ("Tutorial_notes.Bool")
d1 = (())
data T1 = C2
| C3
name2 = ("Tutorial_notes.true")
name3 = ("Tutorial_notes.false")
name4 = ("Tutorial_notes.not")
d4 (C3) = ((Unsafe.Coerce.unsafeCoerce) (C2))
d4 v0
= ((Unsafe.Coerce.unsafeCoerce)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.