_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 |
|---|---|---|---|---|---|---|---|---|
4d45a8c591d0bbc32b4228402c3408c71e5d833b451467ed2ba987702c267d54 | yzhs/ocamlllvm | cmmgen.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/asmcomp/cmmgen.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : cmmgen.ml 10794 2010 - 11 - 1... |
60e456eb685443bf543daa46aee4ca30e6133e0a4de342e5755dccb067878db6 | dbuenzli/vg | arrowhead.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2013 The vg programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/dbuenzli/vg/2d0cd56636a17280fe938ecaafc6402383dca1f3/db/arrowhead.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2013 The vg programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | |
ed85aef3d6e5dff15940188a55926f093264dd9740c9539d6cdd789a4be51d0c | ygrek/mldonkey | commonComplexOptions.mli | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey 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 2 of the License , or
... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/daemon/common/commonComplexOptions.mli | ocaml | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey 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 2 of the License , or
... | |
ed68fb15bb88d112fa999972b9b186a044f44981f110bb21ec66d159c3b0d46e | emqx/emqx | emqx_bridge_proto_v1.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2022 - 2023 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/emqx/emqx/42dfaf3ef2f2113d710c066894fe62c263190526/apps/emqx_bridge/src/proto/emqx_bridge_proto_v1.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 ) 2022 - 2023 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(emqx_bridge_proto_v1).
-behaviour(emqx_bpapi).
-export([
introduced_in/0,
depr... |
1b4102088fd5bedec2051c1785de0b34e7281fac5304fc2c4fd9630c29326a68 | bjorng/wings | wpc_shift.erl | %%
wpc_shift.erl --
%%
%% Plug-in for shifting vertices
%%
Copyright ( c ) 2005 - 2011
%%
%% See the file "license.terms" for information on usage and redistribution
%% of this file, and for a DISCLAIMER OF ALL WARRANTIES.
%%
%% $Id$
%%
-module(wpc_shift).
-export([init/0,menu/2,command/2]).
-impor... | null | https://raw.githubusercontent.com/bjorng/wings/dec64a500220359dbc552600af486be47c45d301/plugins_src/commands/wpc_shift.erl | erlang |
Plug-in for shifting vertices
See the file "license.terms" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
$Id$
Exported functions
Create the menus
Respond to commands
for repeat cmds
Drag and iterate through the vertices
The... | wpc_shift.erl --
Copyright ( c ) 2005 - 2011
-module(wpc_shift).
-export([init/0,menu/2,command/2]).
-import(lists, [foldl/3]).
-include_lib("wings/src/wings.hrl").
-define(HUGE, 1.0E307).
-define(EPSILON, 1.0E-6).
init() ->
true.
menu({Mode}, Menu) when Mode==vertex; Mode==edge; Mode==face; Mode==b... |
8caef8a880c50469ed3cc409bde73436c28d9adf23c1e9eec5d6311b276f705c | tisnik/clojure-examples | core.clj | (ns factorial.core
(:gen-class))
(defn factorial
[n]
(if (neg? n)
(throw (IllegalArgumentException. "negative numbers are not supported!"))
(apply * (range 1 (inc n)))))
(defn -main
"I don't do a whole lot ... yet."
[& args]
(doseq [i (range 0 10)]
(println i "! = " (fact... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/factorial/src/factorial/core.clj | clojure | (ns factorial.core
(:gen-class))
(defn factorial
[n]
(if (neg? n)
(throw (IllegalArgumentException. "negative numbers are not supported!"))
(apply * (range 1 (inc n)))))
(defn -main
"I don't do a whole lot ... yet."
[& args]
(doseq [i (range 0 10)]
(println i "! = " (fact... | |
b97915bf7e60fb65fb5629d58c94266b4ef1419a1280d10745615e49d37f9d03 | fragnix/fragnix | GHC.Word.hs | {-# LINE 1 "GHC.Word.hs" #-}
# LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude , BangPatterns , MagicHash , UnboxedTuples #
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Word
Co... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/builtins/base/GHC.Word.hs | haskell | # LINE 1 "GHC.Word.hs" #
# OPTIONS_HADDOCK hide #
---------------------------------------------------------------------------
|
Module : GHC.Word
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
'Word64'.
-------------------------------------------------------------------... |
# LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude , BangPatterns , MagicHash , UnboxedTuples #
Copyright : ( c ) The University of Glasgow , 1997 - 2002
Portability : non - portable ( GHC Extensions )
Sized unsigned integral types : ' Word ' , ' Word8 ' ... |
6792455fc2fbcbab40160b07d805838546b10bcab2401c93fd0ee067e743f215 | xysun/sbe-erlang | carexample.erl | % corresponds to ExampleUsingGeneratedStub.java
-module(carexample).
-export([main/0, readJava/0, encode/2]).
main() ->
io:format("****** SBE Car example ******", []),
Buffer = buffer:allocate(64),
BufferOffset = 0,
MessageTemplateVersion = 0,
% encode a message
% messageHeader
M = me... | null | https://raw.githubusercontent.com/xysun/sbe-erlang/974a2b1a4c82402f377a397f4525995db283c918/examples/baselinesimple/carexample.erl | erlang | corresponds to ExampleUsingGeneratedStub.java
encode a message
messageHeader
write the encoded buffer to a file for decoding
decode the encoded message
match template ID | -module(carexample).
-export([main/0, readJava/0, encode/2]).
main() ->
io:format("****** SBE Car example ******", []),
Buffer = buffer:allocate(64),
BufferOffset = 0,
MessageTemplateVersion = 0,
M = messageHeader:wrap(Buffer, BufferOffset, MessageTemplateVersion),
M1 = messageHeader:setB... |
fe369c7aa68e16ba30fedaa3eede49f7898bb55f1c70f28461a99613d9cd7973 | Frama-C/Frama-C-snapshot | intset.ml | (**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/qed/intset.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Software
Foundation ,... |
bb3cbacad82f02f2a5130c9b98010885dbcf478563b9e7c61c6ddc20cc918b48 | Bogdanp/racket-redis | info.rkt | #lang info
(define license 'MIT)
(define collection "tests")
(define deps '())
(define build-deps '("base"
"rackunit-lib"
"redis-lib"))
(define update-implies '("redis-lib"))
| null | https://raw.githubusercontent.com/Bogdanp/racket-redis/063664898fb6e99f24877cbb1b7fb19143293eb1/redis-test/info.rkt | racket | #lang info
(define license 'MIT)
(define collection "tests")
(define deps '())
(define build-deps '("base"
"rackunit-lib"
"redis-lib"))
(define update-implies '("redis-lib"))
| |
67ce23b930c56c9dff81a73746fd360799224656211a1079e133490635a44335 | borodust/alien-works | packages.lisp | (cl:defpackage :%alien-works.tools.filament
(:local-nicknames (:a :alexandria)
(:! :alien-works.utils.empty)
(:u :alien-works.utils)
(:m :alien-works.math)
(:%aw.fm :%alien-works.filament))
(:use :cl)
(:export #:serialize-material
... | null | https://raw.githubusercontent.com/borodust/alien-works/27992c20ad3cecd47549793f3b923cbcf17c3241/tools/graphics/packages.lisp | lisp | (cl:defpackage :%alien-works.tools.filament
(:local-nicknames (:a :alexandria)
(:! :alien-works.utils.empty)
(:u :alien-works.utils)
(:m :alien-works.math)
(:%aw.fm :%alien-works.filament))
(:use :cl)
(:export #:serialize-material
... | |
fe4d197a6b223523fb82458e7391301a73c2985d4d9308bd6bb0667acb0ecddc | silverbullettt/SICP | 3.50.rkt | (load "stream.rkt")
(define (stream-map proc . argstreams)
(if (stream-null? (car argstreams))
the-empty-stream
(cons-stream
(apply proc (map stream-car argstreams))
(apply stream-map
(cons proc (map stream-cdr argstreams))))))
(stream-map + (stream 1 2 3) (stream 4 5 6) (str... | null | https://raw.githubusercontent.com/silverbullettt/SICP/e773a8071ae2fae768846a2b295b5ed96b019f8d/3.50.rkt | racket | (load "stream.rkt")
(define (stream-map proc . argstreams)
(if (stream-null? (car argstreams))
the-empty-stream
(cons-stream
(apply proc (map stream-car argstreams))
(apply stream-map
(cons proc (map stream-cdr argstreams))))))
(stream-map + (stream 1 2 3) (stream 4 5 6) (str... | |
d80d557566df6f991bf0f6b243ea69895ca1b8f37c58bd7374eac539f9d372e4 | GaloisInc/renovate | Chunk.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE StandaloneDeriving #
# LANGUAGE UndecidableInstances #
module Renovate.Core.Chunk (
Chunk(..)
, chunkAddress
, chunkSize
) where
import qualified Data.ByteString as B
import qualified Data.Macaw.CFG as MC
import Data.Word ( Word64 )
import qualified Prettyprin... | null | https://raw.githubusercontent.com/GaloisInc/renovate/89b82366f84be894c3437852e39c9b4e28666a37/renovate/src/Renovate/Core/Chunk.hs | haskell | | A chunk is a unit of code managed during re-assembly
A chunk of code can either be a 'RCB.ConcretizedBlock' (i.e., a block that
has had a new address assigned to it) or raw bytes that have been assigned an
address (either raw injected code or padding bytes).
| Get the address assigned to this 'Chunk'
| Compute... | # LANGUAGE FlexibleContexts #
# LANGUAGE StandaloneDeriving #
# LANGUAGE UndecidableInstances #
module Renovate.Core.Chunk (
Chunk(..)
, chunkAddress
, chunkSize
) where
import qualified Data.ByteString as B
import qualified Data.Macaw.CFG as MC
import Data.Word ( Word64 )
import qualified Prettyprin... |
512b91086116ee7dfa5481a62a78c4f248c5b214484814c84631e8a486cdc985 | inhabitedtype/ocaml-aws | sendAutomationSignal.ml | open Types
open Aws
type input = SendAutomationSignalRequest.t
type output = unit
type error = Errors_internal.t
let service = "ssm"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service regio... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/sendAutomationSignal.ml | ocaml | open Types
open Aws
type input = SendAutomationSignalRequest.t
type output = unit
type error = Errors_internal.t
let service = "ssm"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (Endpoints.url_of service regio... | |
dbbecc1b86553897b53bab470c9e7b49b090c6c04504b5cd353f1b7fbcc9c567 | juxt/site | cors_test.clj | Copyright © 2021 , JUXT LTD .
(ns juxt.site.cors-test
(:require
[clojure.test :refer [deftest is are testing]]
[juxt.site.alpha.handler :refer [access-control-match-origin]]))
(alias 'site (create-ns 'juxt.site.alpha))
(deftest access-control-origin-match-test
(let [allow-origins
{#":\p{Digit}+"... | null | https://raw.githubusercontent.com/juxt/site/98bb331d90611f30fbe3d0aa0fe20da48cdf6691/test/juxt/site/cors_test.clj | clojure | Copyright © 2021 , JUXT LTD .
(ns juxt.site.cors-test
(:require
[clojure.test :refer [deftest is are testing]]
[juxt.site.alpha.handler :refer [access-control-match-origin]]))
(alias 'site (create-ns 'juxt.site.alpha))
(deftest access-control-origin-match-test
(let [allow-origins
{#":\p{Digit}+"... | |
f9e5808c6b16ebdb88cbc3fb24f4c3f1514437dc8a6e753616ffa26797f3763a | NorfairKing/sydtest | Client.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - redundant - constra... | null | https://raw.githubusercontent.com/NorfairKing/sydtest/9db39de44641f28a2c26de80fcfe08616fcf3054/sydtest-yesod/src/Test/Syd/Yesod/Client.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| The site itself
| The 'HTTP.Manager' to make the requests
| The base 'URI' that the site is running on
| The state that is maintained throughout a 'YesodClientM'
| The last request and response pair
| The cookies to pass along
| The starting point of the '... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - redundant - constraints -fno - warn - unused - imports #
module Test.Syd.Yesod.Cl... |
35c39c2dd5799eb198119f243475216d911c8ea7f56b3613ad3e49356164978a | OCamlPro/ocp-indent | let-open.ml |
let _ =
(* ... *)
let open Option in
indented_line
| null | https://raw.githubusercontent.com/OCamlPro/ocp-indent/9e26c0a2699b7076cebc04ece59fb354eb84c11c/tests/passing/let-open.ml | ocaml | ... |
let _ =
let open Option in
indented_line
|
7327e7da2c3e17e95e429f51fff399d42b8777debee7e56260694987f63b14df | apinf/proxy42 | toy_router.erl | Copyright ( c ) 2013 - 2015 , Heroku Inc < > .
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modification, are permitted provided that the following conditions are
%%% met:
%%%
%%% * Redistributions of source code must retain the above copyright
%%% notice,... | null | https://raw.githubusercontent.com/apinf/proxy42/01b483b711881391e8306bf64b83b4df9d0bc832/apps/vegur/demo/toy_router.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions... | Copyright ( c ) 2013 - 2015 , Heroku Inc < > .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE ,
... |
4b41772f4bb0d0d4fd5968598d7c6f789d27f4351a9be555c7c1b80ef9063bd5 | stchang/macrotypes | lin+cons.rkt | #lang turnstile/base
(extends "lin+tup.rkt")
(require (for-syntax racket/contract))
(provide (type-out MList MList0)
cons nil match-list)
(define-type-constructor MList #:arity = 1)
(define-base-type MList0)
(begin-for-syntax
(current-linear-type? (or/c MList? MList0? (current-linear-type?))))
(define-t... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-example/turnstile/examples/linear/lin%2Bcons.rkt | racket | implicit memory location created
with memory location given
list
cons branch
nil branch | #lang turnstile/base
(extends "lin+tup.rkt")
(require (for-syntax racket/contract))
(provide (type-out MList MList0)
cons nil match-list)
(define-type-constructor MList #:arity = 1)
(define-base-type MList0)
(begin-for-syntax
(current-linear-type? (or/c MList? MList0? (current-linear-type?))))
(define-t... |
1dd7a02c838ab7ea2dbc81171de1f942c10f26717ab5d9cc4e0ee4b4f42fbf5d | rtrusso/scp | constant-operand.scm | (need sasm/parse/syntax)
(need sasm/sasm-ast)
(define (sasm-parse-constant-operand expression)
(sasm-parse-by-case
expression
(sasm-syntax-case
:pattern (const (,integer? constant-integer))
:rewrite (constant-integer)
(sasm-ast-node <integer-constant-operand>
(:intege... | null | https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/sasm/parse/constant-operand.scm | scheme | (need sasm/parse/syntax)
(need sasm/sasm-ast)
(define (sasm-parse-constant-operand expression)
(sasm-parse-by-case
expression
(sasm-syntax-case
:pattern (const (,integer? constant-integer))
:rewrite (constant-integer)
(sasm-ast-node <integer-constant-operand>
(:intege... | |
26c826281ba22eff26965752a3a233f7c495a9670c15cc0a2c53367dec3fb745 | hugoduncan/makejack | impl.clj | (ns makejack.deps.impl)
(defn lift-local-deps
"Return a basis with :mvn/local deps converted to source dependencies.
Adds transitive libs, and extends the paths."
[basis]
;; NOTE this could be simpler if we constructed a new deps map and used
;; b/create-basis, but that complains about non-local source paths... | null | https://raw.githubusercontent.com/hugoduncan/makejack/2d2c8950a3c0018899071f6c6d6d0062bbcca8c4/components/deps/src/makejack/deps/impl.clj | clojure | NOTE this could be simpler if we constructed a new deps map and used
b/create-basis, but that complains about non-local source paths.
Predicate for lib being a transitive dependency
of a direct project dependency. | (ns makejack.deps.impl)
(defn lift-local-deps
"Return a basis with :mvn/local deps converted to source dependencies.
Adds transitive libs, and extends the paths."
[basis]
(let [libs (:libs basis)
local-root #(:local/root (get libs %))
transitive-local (fn transitive-local
... |
4fcec4bd3ca66de71ac8182bf541b09a28f7bea676bb749e12dc7f3fda5594fb | clj-kondo/clj-kondo.lsp | version.clj | (ns clj-kondo.lsp-server.impl.version
{:no-doc true}
(:require [clojure.java.io :as io]
[clojure.string :as str]))
(defn -main [& _args]
(let [version (str/trim (slurp (io/resource "CLJ_KONDO_VERSION")))
out-file (io/file ".." "vscode-extension" "CLJ_KONDO_VERSION")]
(println "Generation ... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo.lsp/5a61fecae5b364e556afb59040c2d1a543918fec/server/src/clj_kondo/lsp_server/impl/version.clj | clojure | (ns clj-kondo.lsp-server.impl.version
{:no-doc true}
(:require [clojure.java.io :as io]
[clojure.string :as str]))
(defn -main [& _args]
(let [version (str/trim (slurp (io/resource "CLJ_KONDO_VERSION")))
out-file (io/file ".." "vscode-extension" "CLJ_KONDO_VERSION")]
(println "Generation ... | |
aa0c951ccc51d60e220954055e44c28f7c3817b07ff90309e6926681aaca7fc0 | synrc/shen | shen_app.erl | -module(shen_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) -> shen_sup:start_link().
stop(_State) -> ok.
| null | https://raw.githubusercontent.com/synrc/shen/fa954212d9270c4591aff0365b4672f165413315/src/shen_app.erl | erlang | -module(shen_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) -> shen_sup:start_link().
stop(_State) -> ok.
| |
ba27a24a718763f12333ebf0a4f43c84edaad981f2fbb1258a4b20d1a48a334f | djblue/portal | json.cljs | (ns portal.ui.viewer.json
(:require [portal.ui.inspector :as ins]))
(defn- parse-json [json-string]
(try (js->clj (js/JSON.parse json-string) :keywordize-keys true)
(catch :default e (ins/error->data e))))
(defn json? [value] (string? value))
(defn inspect-json [json-string]
[ins/tabs
{:portal.viewer... | null | https://raw.githubusercontent.com/djblue/portal/556bef27f9d3f22d7bf5ab805083e8d6e9e16095/src/portal/ui/viewer/json.cljs | clojure | (ns portal.ui.viewer.json
(:require [portal.ui.inspector :as ins]))
(defn- parse-json [json-string]
(try (js->clj (js/JSON.parse json-string) :keywordize-keys true)
(catch :default e (ins/error->data e))))
(defn json? [value] (string? value))
(defn inspect-json [json-string]
[ins/tabs
{:portal.viewer... | |
f301b421068247c1ae758576c6b1571606d4f384ba35594d4017db8328ba9a85 | mirage/mirage-qubes | dB.mli | Copyright ( C ) 2015 ,
See the README file for details .
See the README file for details. *)
(** A QubesDB client *)
include S.DB
val connect : domid:int -> unit -> t Lwt.t
* [ connect ~domid ( ) ] is a QubesDB agent which connects to a server in [ domid ] .
val disconnect : t -> unit Lwt.t
(** Close th... | null | https://raw.githubusercontent.com/mirage/mirage-qubes/b2dcdfe29a90f86f9046788da4799abc451a0b9b/lib/dB.mli | ocaml | * A QubesDB client
* Close the underlying vchan. | Copyright ( C ) 2015 ,
See the README file for details .
See the README file for details. *)
include S.DB
val connect : domid:int -> unit -> t Lwt.t
* [ connect ~domid ( ) ] is a QubesDB agent which connects to a server in [ domid ] .
val disconnect : t -> unit Lwt.t
|
c2510dfa53e5ec5a8c9620618e7effc32c8e64f7cbd44ec4ffee2aaf3f679f78 | NelosG/fp-tests | ExceptState.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
module Test.ExceptState
( genExceptState
) where
import HW2.T1 (Annotated (..), Except (..))
import HW2.T5 (ExceptState (runES), throwExceptState, wrapExceptState)
import qualified Hedgehog as H
import qualified Hedgehog.Gen as Gen
genExceptState ::... | null | https://raw.githubusercontent.com/NelosG/fp-tests/2c5da9743a9ed3c0234ad5517efb70a2efb03abd/hw2/test/T5/Test/ExceptState.hs | haskell | # LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
module Test.ExceptState
( genExceptState
) where
import HW2.T1 (Annotated (..), Except (..))
import HW2.T5 (ExceptState (runES), throwExceptState, wrapExceptState)
import qualified Hedgehog as H
import qualified Hedgehog.Gen as Gen
genExceptState ::... | |
760047e7e39fb07e9c239d39937cb40fa49b50e673345edfbef4fdcb798fb5b4 | bitc/omegagb | GuiTests.hs | OmegaGB Copyright 2007 Bit
This program is distributed under the terms of the GNU General Public License
-----------------------------------------------------------------------------
-- |
Module : GuiTests
Copyright : ( c ) Bit Connor 2007 < >
-- License : GPL
-- Maintainer :
-- Stability... | null | https://raw.githubusercontent.com/bitc/omegagb/5ab9c3a22f5fc283906b8af53717d81fef96db7f/src/GuiTests.hs | haskell | ---------------------------------------------------------------------------
|
License : GPL
Maintainer :
Stability : in-progress
OmegaGB
Game Boy Emulator
debugger. It allows you to step through instructions and view the values
of registers, and graphics memory.
-----------------------------------... | OmegaGB Copyright 2007 Bit
This program is distributed under the terms of the GNU General Public License
Module : GuiTests
Copyright : ( c ) Bit Connor 2007 < >
This module runs a gtk+ application that is some sort of Game Boy
module GuiTests where
import Maybe(fromJust)
import qualified Cont... |
00077994e676e573a7bdf07f5bc077c94aafe6df1549d84744e57648dc37baad | dbuenzli/jsonc | testing_backend.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/jsonc/b6adf836a2812f25d934e85ba3b6daa5fe77fd14/test-jsonm/testing_backend.mli | ocaml | * Testing for [Jsont_jsonm]. | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... |
14237eaa536cd234288c06e3a0353f021885df815bce94b76d5d58dfd69e834f | helium/blockchain-core | blockchain_state_channels_client.erl | %%%-------------------------------------------------------------------
%% @doc
%% == Blockchain State Channels Client ==
%% @end
%%%-------------------------------------------------------------------
-module(blockchain_state_channels_client).
-behavior(gen_server).
%% -------------------------------------------------... | null | https://raw.githubusercontent.com/helium/blockchain-core/0caf2295d0576c0ef803258e834bf6ec3b3e74bc/src/state_channel/blockchain_state_channels_client.erl | erlang | -------------------------------------------------------------------
@doc
== Blockchain State Channels Client ==
@end
-------------------------------------------------------------------
------------------------------------------------------------------
API Function Exports
-----------------------------------------... | -module(blockchain_state_channels_client).
-behavior(gen_server).
-export([start_link/1,
packet/3,
purchase/2,
banner/2,
reject/2,
gc_state_channels/1,
get_known_channels/1,
response/1]).
-export([init/1,
handle_call/3,
handle_info/2,
... |
097943764b0084a5a03b2f758ec5ba4f71def7eded1eec760bce236fb37b49bf | bscarlet/llvm-general | DataLayout.hs | module LLVM.General.Test.DataLayout where
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit
import LLVM.General.Test.Support
import Data.Maybe
import qualified Data.Set as Set
import qualified Data.Map as Map
import LLVM.General.Context
import LLVM.General.Module
import LLVM.General.AST
... | null | https://raw.githubusercontent.com/bscarlet/llvm-general/61fd03639063283e7dc617698265cc883baf0eec/llvm-general/test/LLVM/General/Test/DataLayout.hs | haskell | module LLVM.General.Test.DataLayout where
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit
import LLVM.General.Test.Support
import Data.Maybe
import qualified Data.Set as Set
import qualified Data.Map as Map
import LLVM.General.Context
import LLVM.General.Module
import LLVM.General.AST
... | |
0a1bd44afedd6efc04a5703cf42e588d3d4a98421159622e48eb4a1f04d64109 | overtone/overtone | defaults.clj | (ns ^{:doc "Default vals and fns required to manipulate ugens."
:author "Jeff Rose"}
overtone.sc.machinery.ugen.defaults
(:use [overtone.helpers lib]))
;; Outputs have a specified calculation rate
0 = scalar rate - one sample is computed at initialization time only .
1 = control rate - one sample is... | null | https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/sc/machinery/ugen/defaults.clj | clojure | Outputs have a specified calculation rate | (ns ^{:doc "Default vals and fns required to manipulate ugens."
:author "Jeff Rose"}
overtone.sc.machinery.ugen.defaults
(:use [overtone.helpers lib]))
0 = scalar rate - one sample is computed at initialization time only .
1 = control rate - one sample is computed each control period .
2 = audio... |
cd71938dc13ec3274c40ee9edf55a5eaf80da1622a7737eb894b3ba5e6543829 | hexlet-codebattle/battle_asserts | nrzi_encoding.clj | (ns battle-asserts.issues.nrzi-encoding
(:require [clojure.string :as s]
[clojure.test.check.generators :as gen]))
(def level :easy)
(def tags ["strings"])
(def description
{:en "Non return to zero, inverted (NRZI) is a method of mapping a binary signal to a physical signal
for transmission o... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/3c5c91acf1c479839b9d9ddd8befe1d3d72063d8/src/battle_asserts/issues/nrzi_encoding.clj | clojure | (ns battle-asserts.issues.nrzi-encoding
(:require [clojure.string :as s]
[clojure.test.check.generators :as gen]))
(def level :easy)
(def tags ["strings"])
(def description
{:en "Non return to zero, inverted (NRZI) is a method of mapping a binary signal to a physical signal
for transmission o... | |
0e69f2ca0127bbecf371293601ec211d52907d2f8d6c97f50bbccad12c6c2311 | skanev/playground | 40.scm | SICP exercise 2.40
;
; Define a procedure unique-pairs that, given an integer n, generates the
sequence of pairs ( i , j ) with 1 ≤ j < i ≤ n. Use unique - pairs to simplify the
; definition of prime-sum-pairs given above.
(define (unique-pairs n)
(flatmap (lambda (a)
(map (lambda (b) (list a b))
... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/02/40.scm | scheme |
Define a procedure unique-pairs that, given an integer n, generates the
definition of prime-sum-pairs given above. | SICP exercise 2.40
sequence of pairs ( i , j ) with 1 ≤ j < i ≤ n. Use unique - pairs to simplify the
(define (unique-pairs n)
(flatmap (lambda (a)
(map (lambda (b) (list a b))
(enumerate-interval (+ a 1) n)))
(enumerate-interval 1 n)))
(define (prime-sum-pairs n)
(fi... |
33bd31eef244af20df1acd526f735a620925782584e43f5026605f7a73111cab | scarvalhojr/haskellbook | section11.18.hs |
import Data.Char (toUpper)
isSubseqOf :: (Eq a) => [a] -> [a] -> Bool
isSubseqOf [] _ = True
isSubseqOf _ [] = False
isSubseqOf xs@(x:xt) (y:yt)
| x == y = isSubseqOf xt yt
| otherwise = isSubseqOf xs yt
isSubseqOfWorks = (isSubseqOf "blah" "blahwoot" == True)
&& (isSubseqOf "blah" "wootbla... | null | https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter11/section11.18.hs | haskell |
import Data.Char (toUpper)
isSubseqOf :: (Eq a) => [a] -> [a] -> Bool
isSubseqOf [] _ = True
isSubseqOf _ [] = False
isSubseqOf xs@(x:xt) (y:yt)
| x == y = isSubseqOf xt yt
| otherwise = isSubseqOf xs yt
isSubseqOfWorks = (isSubseqOf "blah" "blahwoot" == True)
&& (isSubseqOf "blah" "wootbla... | |
b4f2a3596261cc7d35fe7e4d6091ab8e3992cf6795185290e34d3a83e3fd51f2 | Naproche-SAD/Naproche-SAD | Thesis.hs |
Authors : ( 2001 - 2008 ) , ( 2017 - 2018 )
Maintain the current thesis .
Authors: Andrei Paskevich (2001 - 2008), Steffen Frerix (2017 - 2018)
Maintain the current thesis.
-}
module SAD.Core.Thesis (inferNewThesis) where
import SAD.Data.Formula
import SAD.Data.Definition (Definitions)
import SAD.Data.Te... | null | https://raw.githubusercontent.com/Naproche-SAD/Naproche-SAD/da131a6eaf65d4e02e82082a50a4febb6d42db3d/src/SAD/Core/Thesis.hs | haskell | Infer new thesis
a thesis can only become unmotivated through an assumption
enable destruction of defined symbols in this case
Reduce f in view of g
contraction in view of a set of formulae
the equivalence test used here is quite crude, but cheap:
syntactic equality modulo alpha-beta normalization
checks wheth... |
Authors : ( 2001 - 2008 ) , ( 2017 - 2018 )
Maintain the current thesis .
Authors: Andrei Paskevich (2001 - 2008), Steffen Frerix (2017 - 2018)
Maintain the current thesis.
-}
module SAD.Core.Thesis (inferNewThesis) where
import SAD.Data.Formula
import SAD.Data.Definition (Definitions)
import SAD.Data.Te... |
924398f94e91ea614cf6b58563c47d0fd57b53216f595acb500069f06833bc6a | EFanZh/EOPL-Exercises | exercise-1.27.rkt | #lang eopl
Exercise 1.27 [ ★ ★ ] ( flatten slist ) returns a list of the symbols contained in slist in the order in which they occur
when is printed . Intuitively , flatten removes all the inner parentheses from its argument .
;;
;; > (flatten '(a b c))
;; (a b c)
;; > (flatten '((a) () (b ()) () (c))... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-1.27.rkt | racket |
> (flatten '(a b c))
(a b c)
> (flatten '((a) () (b ()) () (c)))
(a b c)
> (flatten '((a b) c (((d)) e)))
(a b c d e)
> (flatten '(a b (() (c))))
(a b c) | #lang eopl
Exercise 1.27 [ ★ ★ ] ( flatten slist ) returns a list of the symbols contained in slist in the order in which they occur
when is printed . Intuitively , flatten removes all the inner parentheses from its argument .
(define flatten-element
(lambda (tail element)
(if (list? element)
(flat... |
d0569d630762b0a85ce92b149299fbea47c1e6fc1f5c685849c1b7b428d6ee86 | CryptoKami/cryptokami-core | Util.hs | # LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeOperators #
module Pos.Util.Util
(
-- * Exceptions/errors
maybeThrow
, eitherToThrow
, leftToPanic
, toAesonError
, aesonError
, toCborError
, cborError
, toTemplateHaskellE... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/util/Pos/Util/Util.hs | haskell | # LANGUAGE RankNTypes #
* Exceptions/errors
* Ether
* Lifting monads
* Logging helpers
* Misc
--------------------------------------------------------------------------
Exceptions/errors
--------------------------------------------------------------------------
| Throw exception or return result depending on ... | # LANGUAGE PolyKinds #
# LANGUAGE TypeOperators #
module Pos.Util.Util
(
maybeThrow
, eitherToThrow
, leftToPanic
, toAesonError
, aesonError
, toCborError
, cborError
, toTemplateHaskellError
, templateHaskellError
, toParsecError
... |
b4101e3ff46bd1a300db6c922a0fd228d213a1da648daa8e19d9494801e96649 | ramsdell/ocaml-datalog | datalog.ml | An implementation of Datalog .
Copyright ( C ) 2005 The MITRE Corporation
This library 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 2 of the License , or ( at... | null | https://raw.githubusercontent.com/ramsdell/ocaml-datalog/058728203184a5fd54333a442b55d215a080dfaf/datalog.ml | ocaml | The inference engine uses tabled logic programming to ensure that
all queries terminate.
See the interface for comments
See the interface for comments
table used to intern varibles and predicate names
variables
generates fresh variables
assumes normal variables are not numbers
don't intern fresh vars ... | An implementation of Datalog .
Copyright ( C ) 2005 The MITRE Corporation
This library 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 2 of the License , or ( at... |
6967f02048998ee598760c84b973b4377c85f5522ce194541a55a88f64ee1012 | Cumulus/Cumulus | feed.mli |
Copyright ( c ) 2012
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 , modify , merge , publish , dis... | null | https://raw.githubusercontent.com/Cumulus/Cumulus/3b6de05d76c57d528e052aa382f98e40354cf581/src/base/feed.mli | ocaml | TODO: Remove the following functions |
Copyright ( c ) 2012
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 , modify , merge , publish , dis... |
611fbc8feb9566993b6f8c03938b27a5609136705b59410b9c9b668d271b0f10 | np/ling | Layout.hs | File generated by the BNF Converter ( bnfc 2.9.4.1 ) .
# OPTIONS_GHC -fno - warn - incomplete - patterns #
# LANGUAGE LambdaCase #
# LANGUAGE PatternGuards #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - unused - matches -fno - warn - unused - binds #
module Ling.Layout where
import Prelude
impor... | null | https://raw.githubusercontent.com/np/ling/5a49fb5fdaef04b56e26c3ff1cd613e2800b4c23/Ling/Layout.hs | haskell | # LANGUAGE OverloadedStrings #
local parameters
^ Nothing for toplevel layout.
^ Nothing for toplevel layout.
layout separators
| Report an error during layout resolution.
^ Remaining tokens.
^ Error message.
| Replace layout syntax with explicit layout tokens.
^ Whether to use top-level layout.
^ Token strea... | File generated by the BNF Converter ( bnfc 2.9.4.1 ) .
# OPTIONS_GHC -fno - warn - incomplete - patterns #
# LANGUAGE LambdaCase #
# LANGUAGE PatternGuards #
# OPTIONS_GHC -fno - warn - unused - matches -fno - warn - unused - binds #
module Ling.Layout where
import Prelude
import Data.Maybe ( fromMaybe, listToMay... |
3bc51805bbd1b6bdc768f86056f17c4cf2f5611dd569bdd7d728a44d32d90c11 | hkupty/defteron | runner.clj | (ns bench.runner
(:require [criterium.core :as crit]
[bench.defteron :as lib]
[bench.native :as native])
(:import (defteron Proto$Header Proto$Size))
(:gen-class))
(def base (.build (doto (Proto$Header/newBuilder)
(.setMsgSize Proto$Size/large)
(.se... | null | https://raw.githubusercontent.com/hkupty/defteron/d14ae8bf7f8f7ff3c4b63bbe2ac8d28ed078e97e/bench/bench/runner.clj | clojure | (ns bench.runner
(:require [criterium.core :as crit]
[bench.defteron :as lib]
[bench.native :as native])
(:import (defteron Proto$Header Proto$Size))
(:gen-class))
(def base (.build (doto (Proto$Header/newBuilder)
(.setMsgSize Proto$Size/large)
(.se... | |
c4be09de57bdb04a1be69390890ad9fe8b03dda104c73f39114c100ac4f58905 | ekmett/linear | Coincides.hs | {-# LANGUAGE GADTs #-}
---------------------------------------------------------------------------------
-- |
Copyright : ( C ) 2012 - 2015
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
--
-- Utility for working wit... | null | https://raw.githubusercontent.com/ekmett/linear/9bb5d69d25f96dd338769f81927d5101b90663af/src/Linear/Plucker/Coincides.hs | haskell | # LANGUAGE GADTs #
-------------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
Utility for working with Plücker coordinates for lines in 3d homogeneous space.
----------------------------... | Copyright : ( C ) 2012 - 2015
Maintainer : < >
module Linear.Plucker.Coincides
( Coincides(..)
) where
import Linear.Epsilon
import Linear.Plucker
' ' ) checks that the two lines coincide in 3D space . Directed
equality , between two ' 's , checks that two lines coincide in 3D ,
and have... |
b22fc75c394c2d6297c01819d94b5729196b56fd883d274a3e193d0d598cf0d6 | f-f/dhall-clj | test_utils.clj | (ns dhall-clj.test-utils
(:require [medley.core :refer [map-vals]]
[dhall-clj.binary :refer [slurp-bytes]]
[clojure.string :as string]
[clojure.java.io :as io]))
;; Credit: -seq#example-54d33991e4b0e2ac61831d15
(defn list-files [basepath]
(let [directory (clojure.java.io/file b... | null | https://raw.githubusercontent.com/f-f/dhall-clj/05d25d2464972bbeae46d828b478b4cfd59836dc/test/dhall_clj/test_utils.clj | clojure | Credit: -seq#example-54d33991e4b0e2ac61831d15
we want only files, therefore filter items that are not directories. | (ns dhall-clj.test-utils
(:require [medley.core :refer [map-vals]]
[dhall-clj.binary :refer [slurp-bytes]]
[clojure.string :as string]
[clojure.java.io :as io]))
(defn list-files [basepath]
(let [directory (clojure.java.io/file basepath)
dir? #(.isDirectory %)]
(fil... |
dd9a2efae316865e6dbb2f79236b93c275dc0eb06a72df7b52af955063297a73 | acl2/acl2 | executable@useless-runes.lsp | (ABNF::PRETTY-PRINT-NUMBER)
(ABNF::STRINGP-OF-PRETTY-PRINT-NUMBER)
(ABNF::PRETTY-PRINT-NUM-BASE)
(ABNF::STRINGP-OF-PRETTY-PRINT-NUM-BASE)
(ABNF::PRETTY-PRINT-NUM-VAL-DIRECT-AUX
(381 3 (:DEFINITION ABNF::PRETTY-PRINT-NUM-VAL-DIRECT-AUX))
(366 3 (:DEFINITION STR::FAST-STRING-APPEND-LST))
(363 9 (:DEFINITION STRING-APP... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/abnf/grammar-printer/.sys/executable%40useless-runes.lsp | lisp | (ABNF::PRETTY-PRINT-NUMBER)
(ABNF::STRINGP-OF-PRETTY-PRINT-NUMBER)
(ABNF::PRETTY-PRINT-NUM-BASE)
(ABNF::STRINGP-OF-PRETTY-PRINT-NUM-BASE)
(ABNF::PRETTY-PRINT-NUM-VAL-DIRECT-AUX
(381 3 (:DEFINITION ABNF::PRETTY-PRINT-NUM-VAL-DIRECT-AUX))
(366 3 (:DEFINITION STR::FAST-STRING-APPEND-LST))
(363 9 (:DEFINITION STRING-APP... | |
3092623647bdebd2433d9dce5e9a675cc1ec43fb8052c8db0dc3abca0c188d6d | facundoolano/cljsbin | project.clj | (defproject cljsbin "0.1.0-SNAPSHOT"
:description "httpbin implemented in ClojureScript"
:url ""
:dependencies [[bidi "2.0.16"]
[com.cemerick/piggieback "0.2.1"]
[com.taoensso/timbre "4.8.0"]
[hiccups "0.3.0"]
[macchiato/core "0.1.6"]
... | null | https://raw.githubusercontent.com/facundoolano/cljsbin/d48be25a9c57522f1dc29e1e520b43ea408cf864/project.clj | clojure | (defproject cljsbin "0.1.0-SNAPSHOT"
:description "httpbin implemented in ClojureScript"
:url ""
:dependencies [[bidi "2.0.16"]
[com.cemerick/piggieback "0.2.1"]
[com.taoensso/timbre "4.8.0"]
[hiccups "0.3.0"]
[macchiato/core "0.1.6"]
... | |
64130393b1bdb0cf8a4d135d602542c423069069d9463b892a5543c5e111d700 | larcenists/larceny | sumfp.scm | ;;; SUMFP -- Compute sum of integers from 0 to n using floating point
(import (scheme base)
(scheme read)
(scheme write)
(scheme time))
(define (run n)
(let loop ((i n) (sum 0.))
(if (< i 0.)
sum
(loop (- i 1.) (+ i sum)))))
(define (main)
(let* ((count (read))
... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/Benchmarking/R7RS/src/sumfp.scm | scheme | SUMFP -- Compute sum of integers from 0 to n using floating point |
(import (scheme base)
(scheme read)
(scheme write)
(scheme time))
(define (run n)
(let loop ((i n) (sum 0.))
(if (< i 0.)
sum
(loop (- i 1.) (+ i sum)))))
(define (main)
(let* ((count (read))
(input1 (read))
(output (read))
(s2 (number->stri... |
e03d15f1ba046d7110b333a796cb1dba4b7a51658c31a0aec20e40b882eba2dd | ghc/packages-Cabal | Capture.hs | module Capture (capture) where
import Language.Haskell.TH
import Language.Haskell.TH.Syntax (NameFlavour (..), Name (..))
import Control.Monad.IO.Class
import Data.Generics as SYB
-- | Capture the source code of declarations in the variable
capture
:: String -- ^ variable name
-> Q [Dec] -- ^ definitions
... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-dev-scripts/src/Capture.hs | haskell | | Capture the source code of declarations in the variable
^ variable name
^ definitions
mangle all names to drop unique suffixes and module prefixes
liftIO (putStrLn declsStr) | module Capture (capture) where
import Language.Haskell.TH
import Language.Haskell.TH.Syntax (NameFlavour (..), Name (..))
import Control.Monad.IO.Class
import Data.Generics as SYB
capture
-> Q [Dec]
capture name decls = do
decls1 <- decls
let decls2 = SYB.everywhere (SYB.mkT mangleName) decls1
let d... |
5259fba90496e15026be19c80286d32d7e42f4710612a64620bfdea8645123c1 | lambdamikel/DLMAPS | creators.lisp | ;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*-
(in-package :PROVER)
;;;
;;;
;;;
;;;
(defmethod create-abox-node ((abox abox) name-for-node
&rest args)
(apply #'create-node
abox name-for-node
(make-node-description (get-standard-node-description-class ab... | null | https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/prover/creators.lisp | lisp | -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*-
Blaetter
|
(in-package :PROVER)
(defmethod create-abox-node ((abox abox) name-for-node
&rest args)
(apply #'create-node
abox name-for-node
(make-node-description (get-standard-node-description-class abox) nil)
args))
(defmethod create-no... |
17756f8728fe4c6b2b6c1b7b541b7fde46d1d4a22dd00d298be14fff46019ee4 | borkdude/aoc2017 | template.clj | (ns template
(:require
[clojure.edn :as edn]
[clojure.string :as str]
[criterium.core :refer [quick-bench]]
[util :refer [resource-reducible
parse-int find-first]]))
(defn data
[])
(defn part-1
[])
(defn part-2
[])
;;;; Scratch
(comment
(set! *print-length* 20)
(set! *warn-... | null | https://raw.githubusercontent.com/borkdude/aoc2017/0f5bce5e496d65d0e53a8983e71ea3462aa0569c/src/template.clj | clojure | Scratch | (ns template
(:require
[clojure.edn :as edn]
[clojure.string :as str]
[criterium.core :refer [quick-bench]]
[util :refer [resource-reducible
parse-int find-first]]))
(defn data
[])
(defn part-1
[])
(defn part-2
[])
(comment
(set! *print-length* 20)
(set! *warn-on-reflection... |
edfe7079b2281d61e42bf8c017e2d67653ac07b605a02fa67f5cc31476bd76b1 | ghcjs/ghcjs | Main.hs | From , Oct 99
This pretends to be the " fair " improved Cryptarithm solver test for
the performance comparison between Haskell and C++ .
--------------------------------------------------------------------
Compilation : g++ -O3 t.cc
ghc-4.04 -c -... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/nofib/spectral/cryptarithm1/Main.hs | haskell | ------------------------------------------------------------------
------------------------------------------------------------------
----------------------------------------------------------------
----------------------------------------------------------------
----------------
----------------------------------... | From , Oct 99
This pretends to be the " fair " improved Cryptarithm solver test for
the performance comparison between Haskell and C++ .
Compilation : g++ -O3 t.cc
ghc-4.04 -c -fvia - C -O2 -O2 - for - C t.hs
RESULTS : Platform1 - C++ ... |
bd3f5513a862818a9f5a629a3f30184b130ec340fd149f99d6ea3f697147cdb4 | sonowz/advent-of-code-haskell | Day07.hs | module Y2019.Day07 where
import Relude
import Relude.Extra.Bifunctor
import Relude.Extra.CallStack
import Relude.Extra.Foldable1
import Relude.Extra.Map hiding ((!?))
import Relude.Extra.Newtype
import Relude.Extra.Tuple
import Relude.Unsafe ((!!))
import Data.Vector (Vector, (!?))
import qualified Data.Vector as V
im... | null | https://raw.githubusercontent.com/sonowz/advent-of-code-haskell/6cec825c5172bbec687aab510e43832e6f2c0372/src/Y2019/Day07.hs | haskell | ---------------------
Type declarations --
---------------------
----------
Part 1 --
----------
input
thruster output
----------
----------
------------------
------------------ | module Y2019.Day07 where
import Relude
import Relude.Extra.Bifunctor
import Relude.Extra.CallStack
import Relude.Extra.Foldable1
import Relude.Extra.Map hiding ((!?))
import Relude.Extra.Newtype
import Relude.Extra.Tuple
import Relude.Unsafe ((!!))
import Data.Vector (Vector, (!?))
import qualified Data.Vector as V
im... |
6317889b5deb74c9e689cbeafcd957d69854431252fde53e7340a89c73d2aa04 | flowyourmoney/malli-ts | core.cljc | (ns malli-ts.core
(:require [malli-ts.ast :refer [->ast]]
[malli-ts.core-schema :as core-schemas]
[malli.core :as m]
[malli.registry :as mr]
[camel-snake-kebab.core :as csk]
[clojure.string :as string]
[clojure.set :as set]
#?(:cljs [... | null | https://raw.githubusercontent.com/flowyourmoney/malli-ts/478b5dd190cbdc7a494c03e958ec65d53232441a/src/malli_ts/core.cljc | clojure | ))
Normalize symbols to strings | (ns malli-ts.core
(:require [malli-ts.ast :refer [->ast]]
[malli-ts.core-schema :as core-schemas]
[malli.core :as m]
[malli.registry :as mr]
[camel-snake-kebab.core :as csk]
[clojure.string :as string]
[clojure.set :as set]
#?(:cljs [... |
d09bf0c6dd12dd31226e6ce6564ad52803b3f098e970c1be35d60b85f80a62e6 | haskell-foundation/foundation | Unix.hs | -- |
-- Module : Foundation.System.Entropy.Unix
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : Good
--
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ForeignFunctionInterface #
module Foundation.System.Entropy.Unix
( EntropyCtx
, entropyOpen
, entropyGath... | null | https://raw.githubusercontent.com/haskell-foundation/foundation/58568e9f5368170d272000ecf16ef64fb91d0732/foundation/Foundation/System/Entropy/Unix.hs | haskell | |
Module : Foundation.System.Entropy.Unix
License : BSD-style
Stability : experimental
Portability : Good
Return the number of bytes, or a negative number otherwise
return 0 on success, !0 for failure | Maintainer : < >
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ForeignFunctionInterface #
module Foundation.System.Entropy.Unix
( EntropyCtx
, entropyOpen
, entropyGather
, entropyClose
, entropyMaximumSize
) where
import Foreign.Ptr
import Control.Exception as E
import Control.Monad
impor... |
535250a1ac6ed6204d028d719281000662a8b86521f3fa4723fdd81b7ecbbb1f | lexi-lambda/hackett | info.rkt | #lang info
(define collection 'multi)
(define deps
'(["base" #:version "7.0.0.2"]
"curly-fn-lib"
"data-lib"
"syntax-classes-lib"
"threading-lib"))
(define build-deps
'())
| null | https://raw.githubusercontent.com/lexi-lambda/hackett/e90ace9e4a056ec0a2a267f220cb29b756cbefce/hackett-lib/info.rkt | racket | #lang info
(define collection 'multi)
(define deps
'(["base" #:version "7.0.0.2"]
"curly-fn-lib"
"data-lib"
"syntax-classes-lib"
"threading-lib"))
(define build-deps
'())
| |
203fe076db11709c245d9eff629e5028bc98d7b06bb9112634f56e5647b0a629 | comptekki/esysman | ecom.erl | Copyright ( c ) 2012 , < >
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions are met:
%%
%% * Redistributions of source code must retain the above copyright
%% notice, this list of condi... | null | https://raw.githubusercontent.com/comptekki/esysman/2d6c9d0d2c3711d18e81beb933309e174d03d948/src/ecom.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Red... | Copyright ( c ) 2012 , < >
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR
LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY... |
5def66377b5eab1d1b59fab1ad3bdff850f5787161ad912962909d2a8a065245 | dbuenzli/lit | demo.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/lit/4058b8a133cd51d3bf756c66b9ab620e39e1d2c4/test/demo.mli | ocaml | * A few common, ad-hoc, tools for Lit's demos.
* [show_start r] prints basic information about [r] on [stdout].
* [show_stop ()] just prints a final newline on [stdout]. | ---------------------------------------------------------------------------
Copyright ( c ) 2014 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
% % NAME%% % % ---------------------------------------------------------------------------
Copyright (c) ... |
7e352f32eb58b2e51ed0bd00a6cd633b67286e0c3f457e85676700a79ed420e2 | NorfairKing/easyspec | ToUpper.hs | # LANGUAGE NoImplicitPrelude #
module ToUpper where
import Data.Char (toUpper)
| null | https://raw.githubusercontent.com/NorfairKing/easyspec/b038b45a375cc0bed2b00c255b508bc06419c986/examples/toy/ToUpper.hs | haskell | # LANGUAGE NoImplicitPrelude #
module ToUpper where
import Data.Char (toUpper)
| |
59fc0cbee77fdc1e82e25ad293d02279848b499c3ab8322368980be7a1c2fe90 | unclebob/AdventOfCode2022 | core.clj | (ns day12-hill-climing-algorithm.core
(:require [clojure.string :as string]))
(defn get-cell [grid [x y]]
(try
(-> grid (nth y) (nth x))
(catch Exception _e
"TILT")))
(defn get-bounds [grid]
[(count (first grid)) (count grid)])
(defn in-bounds [grid [x y]]
(let [[bx by] (get-bounds grid)]
(... | null | https://raw.githubusercontent.com/unclebob/AdventOfCode2022/f5eb954c336a547d56f6bc0efe3797d5884290ca/day12-hill-climing-algorithm/src/day12_hill_climing_algorithm/core.clj | clojure | (ns day12-hill-climing-algorithm.core
(:require [clojure.string :as string]))
(defn get-cell [grid [x y]]
(try
(-> grid (nth y) (nth x))
(catch Exception _e
"TILT")))
(defn get-bounds [grid]
[(count (first grid)) (count grid)])
(defn in-bounds [grid [x y]]
(let [[bx by] (get-bounds grid)]
(... | |
68895c9253cd1dd41a15b5147f3a22fda50e3dadcc8207122a19feff9435841b | byorgey/BlogLiterately | Post.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
-----------------------------------------------------------------------------
-- |
-- Module : Text.BlogLiterately.Post
Copyright : ( c ) 2008 - 2010 , 2012
-- License : GPL (see LICENSE)
Maintainer : ... | null | https://raw.githubusercontent.com/byorgey/BlogLiterately/fbc8dc238c7e5bc570bef4d0c1dd9cf2f92de72a/src/Text/BlogLiterately/Post.hs | haskell | ---------------------------------------------------------------------------
|
Module : Text.BlogLiterately.Post
License : GPL (see LICENSE)
Uploading posts to the server and fetching posts from the server.
---------------------------------------------------------------------------
| Prepare a post for... | # LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
Copyright : ( c ) 2008 - 2010 , 2012
Maintainer : < >
module Text.BlogLiterately.Post
(
mkPost, mkArray, postIt, getPostURL, findTitle
) where
import Control.Lens (at... |
43fa4eedb46f1673d6af728b224164baeca338358c33515881a71bee552f06e2 | rems-project/lem | pset_using_lists.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rems-project/lem/a839114e468119d9ac0868d7dc53eae7f3cc3a6c/ocaml-lib/pset_using_lists.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 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
Modified by 2010 - 10 - 28
Modifi... |
c3379039094cb0140e702ec5712010d6217822ed8119260d41988696030e81ea | habibutsu/erlz | erlz_monad_error.erl | -module('erlz_monad_error').
-compile([export_all]).
%%====================================================================
%% Error (special case for Either)
%%====================================================================
instance Monad
return(V) ->
{ok, V}.
'>>='({error, Reason}, _) ->
{error, R... | null | https://raw.githubusercontent.com/habibutsu/erlz/eac1757905ca3c49483a86d9b72ab5e4f033fa29/src/erlz_monad_error.erl | erlang | ====================================================================
Error (special case for Either)
====================================================================
instance Functor | -module('erlz_monad_error').
-compile([export_all]).
instance Monad
return(V) ->
{ok, V}.
'>>='({error, Reason}, _) ->
{error, Reason};
'>>='({ok, V}, Fn) ->
Fn(V);
'>>='(Fn, V) ->
throw({bad_match, "could not prepare value", V, "for", Fn}).
fmap(_Fn, {error, V}) ->
{error, V};
fmap(Fn, {ok... |
505cb413f6c29abddc755b29b8343df727926a8798a6c81a696b6c94afb13424 | kitlang/kit | EnumVariant.hs | module Kit.Ast.Definitions.EnumVariant (
EnumVariant (..),
newEnumVariant,
convertEnumVariant,
discriminantFieldName,
variantFieldName,
variantIsSimple
) where
import Control.Monad
import Kit.Ast.Definitions.ArgSpec
import Kit.Ast.Definitions.Base
import Kit.Ast.Metadata
import Kit.Ast.Modifier
import Kit.... | null | https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/src/Kit/Ast/Definitions/EnumVariant.hs | haskell | module Kit.Ast.Definitions.EnumVariant (
EnumVariant (..),
newEnumVariant,
convertEnumVariant,
discriminantFieldName,
variantFieldName,
variantIsSimple
) where
import Control.Monad
import Kit.Ast.Definitions.ArgSpec
import Kit.Ast.Definitions.Base
import Kit.Ast.Metadata
import Kit.Ast.Modifier
import Kit.... | |
623ba99634fdda95bf2287456fc6902c3de81f3888b72b2a89f1eb7f2fd4b513 | renatoalencar/ocaml-socks-client | config.ml | open Mirage
let packages = [ package "socks"
; package "mirage_socks4" ]
let main = foreign ~packages "Unikernel.Main" (stackv4 @-> job)
let stack = generic_stackv4 default_network
let () =
register "example" [
main $ stack
]
| null | https://raw.githubusercontent.com/renatoalencar/ocaml-socks-client/0102279ba53bac3cdca7e611cac6472e7ecb1172/examples/mirage/config.ml | ocaml | open Mirage
let packages = [ package "socks"
; package "mirage_socks4" ]
let main = foreign ~packages "Unikernel.Main" (stackv4 @-> job)
let stack = generic_stackv4 default_network
let () =
register "example" [
main $ stack
]
| |
4554f12c8cf347cc9d31050455d6d85e55eb2f13c5933ec5fe46d96155fa6eca | bcc32/advent-of-code | a.ml | open! Core
open! Async
open! Import
let re = Re.(compile (seq [ group (rep1 digit); str ", "; group (rep1 digit) ]))
let dist (x, y) (x', y') = Int.abs (x - x') + Int.abs (y - y')
let main () =
let%bind points =
Reader.with_file "input" ~f:(fun r ->
r
|> Reader.lines
|> Pipe.map ~f:(fun line -... | null | https://raw.githubusercontent.com/bcc32/advent-of-code/86a9387c3d6be2afe07d2657a0607749217b1b77/2018/06/a.ml | ocaml | index to area
tied | open! Core
open! Async
open! Import
let re = Re.(compile (seq [ group (rep1 digit); str ", "; group (rep1 digit) ]))
let dist (x, y) (x', y') = Int.abs (x - x') + Int.abs (y - y')
let main () =
let%bind points =
Reader.with_file "input" ~f:(fun r ->
r
|> Reader.lines
|> Pipe.map ~f:(fun line -... |
bd2804911216bb598ebc548f9759af9ba3c0c70684939830da88953ad292a2ff | samrocketman/home | Shiny_painting.0.3.scm | ; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
A set of layer effects script for GIMP 1.2
Copyright ( C ) 2001
Copyright ( C ) 2001
Copyright ( C ) 2007 Paint corroded version for GIMP 2.4
;
; --------------------------------------------------------------------
version... | null | https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/Shiny_painting.0.3.scm | scheme | The GIMP -- an image manipulation program
--------------------------------------------------------------------
- Initial relase
--------------------------------------------------------------------
This program is free software; you can redistribute it and/or modify
either version 2 of the License , or
(at... | Copyright ( C ) 1995 and
A set of layer effects script for GIMP 1.2
Copyright ( C ) 2001
Copyright ( C ) 2001
Copyright ( C ) 2007 Paint corroded version for GIMP 2.4
version 0.2 2007 - october-21
it under the terms of the GNU General Public License as published by
You should have receive... |
0eff73bec9a096fb2b9d0932d2f7e9b8108c2384422a8656e3870b6767d64707 | lambdacube3d/lambdacube-edsl | LC_U_DeBruijn.hs | module LC_U_DeBruijn where
import Data.ByteString.Char8 (ByteString)
import Data.Generics.Fixplate
import LC_U_APIType
import LC_U_PrimFun
TODO :
represent these as tuples from specific types : Vertex , Fragment , FragmentDepth , FragmentRastDepth
TODO:
represent these as tuples from specific ty... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-edsl/4347bb0ed344e71c0333136cf2e162aec5941df7/lambdacube-core/tmp/sandbox/lambdacube-unified-input/LC_U_DeBruijn.hs | haskell | Fun
Exp
Array operations
GPU pipeline model
Transform feedback support
Special tuple expressions
Interpolated
Output | module LC_U_DeBruijn where
import Data.ByteString.Char8 (ByteString)
import Data.Generics.Fixplate
import LC_U_APIType
import LC_U_PrimFun
TODO :
represent these as tuples from specific types : Vertex , Fragment , FragmentDepth , FragmentRastDepth
TODO:
represent these as tuples from specific ty... |
41aa9bd4212245e235f15c4786f085cfc1505cdf39f6925b65299e1fdc1df822 | TheLortex/mirage-monorepo | ctf.mli | (** This library is used to write event traces in mirage-profile's CTF format. *)
type id = private int
(** Each thread/fiber/promise is identified by a unique ID. *)
* { 2 Recording events }
Libraries and applications can use these functions to make the traces more useful .
Libraries and applications can ... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/0c29acffaf08dc0008097d36225a14960769f132/duniverse/eio/lib_eio/core/ctf.mli | ocaml | * This library is used to write event traces in mirage-profile's CTF format.
* Each thread/fiber/promise is identified by a unique ID.
* [label msg] attaches text [msg] to the current thread.
* [note_increase counter delta] records that [counter] increased by [delta].
If [delta] is negative, this records a decre... |
type id = private int
* { 2 Recording events }
Libraries and applications can use these functions to make the traces more useful .
Libraries and applications can use these functions to make the traces more useful. *)
val label : string -> unit
val note_increase : string -> int -> unit
val note_counter_va... |
57b69ca50cf163a940e36cd3b53907e07eee126d4da8a39e725f6e5f44dcf092 | xvw/muhokama | category_endpoints.ml | open Lib_service.Endpoint
let list () = get (~/"category" / "list")
| null | https://raw.githubusercontent.com/xvw/muhokama/dcfa488169677ff7f1a3ed71182524aeb0b13c53/app/endpoints/category_endpoints.ml | ocaml | open Lib_service.Endpoint
let list () = get (~/"category" / "list")
| |
4d2ca200b1c5d1cee1cd89097426af705dcd478a58b1b186f25fe9b003d31b56 | ghcjs/ghcjs | t8280.hs | # LANGUAGE MagicHash #
module Main where
import GHC.Prim
data A = A Word# deriving Show
main = print (A (int2Word# 4#))
| null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/deriving/t8280.hs | haskell | # LANGUAGE MagicHash #
module Main where
import GHC.Prim
data A = A Word# deriving Show
main = print (A (int2Word# 4#))
| |
46c102bb55fb1d41c91c3caa93480f90dff0cb5c4d29f3c8debefae04b3041ed | bschwind/earthquakes | project.clj | (defproject earthquakes "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha10"]
[org.clojure/clojures... | null | https://raw.githubusercontent.com/bschwind/earthquakes/265d2e27504ee50f1a815a89a85601e9715af1d7/project.clj | clojure | (defproject earthquakes "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha10"]
[org.clojure/clojures... | |
cee3356ac1ed005e996a28356ce6073d6980876b61e25f8872dce170c3799e2d | pirapira/coq2rust | proof_using.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2013
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/proofs/proof_using.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2013
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[ minimize_hyps e s1 ] giv... |
d5b5ea29f3e1e87605718069d8d7f95627ed3dcc48a64d29daa1d89c6f12bea7 | bellissimogiorno/nominal | Name.hs | |
Module : Name
Description : Nominal theory of names and swappings
Copyright : ( c ) , 2020
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
The basic framework : a nominal theory of names and swappings
Module : Name
Description : Nominal theory o... | null | https://raw.githubusercontent.com/bellissimogiorno/nominal/ab3306ee349dc481d2e2e6d103d90ffdd14ccaa9/src/Language/Nominal/Name.hs | haskell | $setup
* Atoms
(..)
* Creating atoms
* Atom swapping
* Permutations
* Names
* Name swapping
* Nameless types
* Tests
$tests
$setup
* Atoms
| An atom is a unique atomic token.
| We provide a stock datatype @'Tom'@.
| A distinguished type of atoms.
| Display an atom by showing (the hash of) its ... | |
Module : Name
Description : Nominal theory of names and swappings
Copyright : ( c ) , 2020
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
The basic framework : a nominal theory of names and swappings
Module : Name
Description : Nominal theory o... |
442487d253de1dfceb6ef70c7e863b547159095258f2193d81502402b8fa7932 | shayne-fletcher/zen | ml_typedtree.ml | open Ml_misc
open Ml_asttypes
open Ml_types
type partial = | Partial | Total
type pattern = {
pat_desc : pattern_desc;
pat_loc : Ml_location.t;
}
and pattern_desc =
| Tpat_any
(** _ *)
| Tpat_var of Ml_ident.t * string loc
(** x *)
| Tpat_alias of pattern * Ml_ident.t * string loc
(... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/cos/src/typing/ml_typedtree.ml | ocaml | * _
* x
* P as a
* P1 | P2
* (E1, ..., EN)
* C []
C E [E]
C (E1, ..., En) [E1;...;En]
List the identifiers bound by a pattern or a let
Invariant : both arguments bind the same variables
note the [Not_found] case | open Ml_misc
open Ml_asttypes
open Ml_types
type partial = | Partial | Total
type pattern = {
pat_desc : pattern_desc;
pat_loc : Ml_location.t;
}
and pattern_desc =
| Tpat_any
| Tpat_var of Ml_ident.t * string loc
| Tpat_alias of pattern * Ml_ident.t * string loc
| Tpat_constant of constant
* 1 , ' a ' ,... |
1d4cba558ae6765720c12c8a4e710cf9816dd58ea31784be736de9769841234b | scrintal/heroicons-reagent | megaphone.cljs | (ns com.scrintal.heroicons.mini.megaphone)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:d "M13.92 3.845a19.361 19.361 0 01-6.3 1.98C6.765 5.942 5.89 6 5 6a4 4 0 00-.504 7.969 15.974 15.974 0 001.271 3.341c.397.... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/megaphone.cljs | clojure | (ns com.scrintal.heroicons.mini.megaphone)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 20 20"
:fill "currentColor"
:aria-hidden "true"}
[:path {:d "M13.92 3.845a19.361 19.361 0 01-6.3 1.98C6.765 5.942 5.89 6 5 6a4 4 0 00-.504 7.969 15.974 15.974 0 001.271 3.341c.397.... | |
322657a4e1e4f68166c1990dccb1078277d9ed9458480be433358538c9874323 | death/constantia | chained-hash-table.lisp | ;;;; +----------------------------------------------------------------+
| |
;;;; +----------------------------------------------------------------+
(defpackage #:constantia/chained-hash-table
(:documentation
"A hierarchical hash-table that can have a single parent.")
(:use #:cl)
(:import-from #:alexandria... | null | https://raw.githubusercontent.com/death/constantia/87379e2cf46a2be335e099e24a114717e26d4e96/chained-hash-table.lisp | lisp | +----------------------------------------------------------------+
+----------------------------------------------------------------+ | | |
(defpackage #:constantia/chained-hash-table
(:documentation
"A hierarchical hash-table that can have a single parent.")
(:use #:cl)
(:import-from #:alexandria
#:ensure-functionf)
(:export
#:chained-hash-table
#:chash-table-p
#:chash-table-parent
#:chash-table-test
#:ch... |
d9b65881f12e9f2fe05771eed3f31ef5cebc7bd19d91d9789fe6fbe9c6791b39 | scicloj/metamorph.ml | tools.clj | (ns scicloj.metamorph.ml.tools
(:require
[clojure.pprint :as pprint]))
(defn dissoc-in
"Dissociate a value in a nested assocative structure, identified by a sequence
of keys. Any collections left empty by the operation will be dissociated from
their containing structures."
[m ks]
(if-let [[k & ks] (seq ... | null | https://raw.githubusercontent.com/scicloj/metamorph.ml/795ac6b0618a510e91ca3e0c5c9a01523e32d827/src/scicloj/metamorph/ml/tools.clj | clojure | (ns scicloj.metamorph.ml.tools
(:require
[clojure.pprint :as pprint]))
(defn dissoc-in
"Dissociate a value in a nested assocative structure, identified by a sequence
of keys. Any collections left empty by the operation will be dissociated from
their containing structures."
[m ks]
(if-let [[k & ks] (seq ... | |
a349c89263a1638e3137e7d0a8d272dcaf9a13c02184e595e5a68388307d9a3b | repl-acement/repl-acement | analysis.clj | (ns replacement.server.analysis
(:require
[replacement.specs.messages :as messages]
[clj-kondo.core :as kondo]))
(set! *warn-on-reflection* true)
(defn- clj-kondo* [form]
(-> form
(with-in-str (kondo/run! {:lint ["-"] :config {:output {:analysis true}}}))
:analysis))
(defn clj-kondo [{::messa... | null | https://raw.githubusercontent.com/repl-acement/repl-acement/1416166b1fad1744ee8749a19ca5cd387a69feee/repl-server/replacement/server/analysis.clj | clojure | (ns replacement.server.analysis
(:require
[replacement.specs.messages :as messages]
[clj-kondo.core :as kondo]))
(set! *warn-on-reflection* true)
(defn- clj-kondo* [form]
(-> form
(with-in-str (kondo/run! {:lint ["-"] :config {:output {:analysis true}}}))
:analysis))
(defn clj-kondo [{::messa... | |
9ae54f712dabfd7165599be510a8960fb15f894c2c8e793c8f70ebb43a8700d0 | clojure-interop/java-jdk | SynthStyleFactory.clj | (ns javax.swing.plaf.synth.SynthStyleFactory
"Factory used for obtaining SynthStyles. Each of the
Synth ComponentUIs will call into the current
SynthStyleFactory to obtain a SynthStyle
for each of the distinct regions they have.
The following example creates a custom SynthStyleFactory
that returns a diffe... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/synth/SynthStyleFactory.clj | clojure |
" | (ns javax.swing.plaf.synth.SynthStyleFactory
"Factory used for obtaining SynthStyles. Each of the
Synth ComponentUIs will call into the current
SynthStyleFactory to obtain a SynthStyle
for each of the distinct regions they have.
The following example creates a custom SynthStyleFactory
that returns a diffe... |
301a290cd61c553a2e497001a2bb7050c9bfbf6123318e314b243646d15d95df | dlowe-net/orcabot | panic-grammar.lisp | (sentence -> (or (panic panic)
(panic panic panic)
(panic panic panic)
(panic panic panic panic)))
(panic -> (or "OMG!!!!!"
"Game over, man!"
"Oh, God."
"It's too late!"
"We're all going to die!"
"Wo... | null | https://raw.githubusercontent.com/dlowe-net/orcabot/bf3c799337531e6b16086e8105906cc9f8808313/data/panic-grammar.lisp | lisp | (sentence -> (or (panic panic)
(panic panic panic)
(panic panic panic)
(panic panic panic panic)))
(panic -> (or "OMG!!!!!"
"Game over, man!"
"Oh, God."
"It's too late!"
"We're all going to die!"
"Wo... | |
21aef281b0d9655d45af290958e2b2e6589215713722f701193678fbead26566 | e-wrks/edh | RuntimeM.hs | # LANGUAGE ImplicitParams #
module Language.Edh.RuntimeM
( createEdhWorld,
declareEdhOperators,
installModuleM_,
installModuleM,
runProgramM,
runProgramM_,
runProgramM',
createEdhModule,
runModuleM,
runModuleM',
runEdhFile,
runEdhFile',
)
where
-- import Debug... | null | https://raw.githubusercontent.com/e-wrks/edh/f6c9db18a32a7d97aa9ce32bcd64c7e9f8bc6b2e/host.hs/src/Language/Edh/RuntimeM.hs | haskell | import Debug.Trace | # LANGUAGE ImplicitParams #
module Language.Edh.RuntimeM
( createEdhWorld,
declareEdhOperators,
installModuleM_,
installModuleM,
runProgramM,
runProgramM_,
runProgramM',
createEdhModule,
runModuleM,
runModuleM',
runEdhFile,
runEdhFile',
)
where
import Control.Concurren... |
47697152543ac613a2a82c10e04d541a9bf2b7b82b2aafafc414756855a583a1 | fujita-y/ypsilon | base.scm | #!nobacktrace
(library (rnrs base (6))
(export define define-syntax
quote lambda if set! cond case and or
let let* letrec letrec* let-values let*-values
begin quasiquote unquote unquote-splicing
let-syntax letrec-syntax syntax-rules
identifier-syntax assert
... | null | https://raw.githubusercontent.com/fujita-y/ypsilon/f742470e2810aabb7a7c898fd6c07227c14a725f/sitelib/rnrs/base.scm | scheme | #!nobacktrace
(library (rnrs base (6))
(export define define-syntax
quote lambda if set! cond case and or
let let* letrec letrec* let-values let*-values
begin quasiquote unquote unquote-splicing
let-syntax letrec-syntax syntax-rules
identifier-syntax assert
... | |
a82ff81f01a6b20f96cbb958bc5cad255cd4039e539fb07b308cd6990225ab29 | zehnpaard/48hr-scheme-ocaml | ex.ml | open Lisp
let f env s =
try Lexing.from_string s
|> Parser.f Lexer.f
|> Eval.f env
|> Exp.to_string
|> print_endline
with
| Exception.NumArgs (n, s) -> Printf.printf "NumArgs %d %s\n" n s
| Exception.TypeMismatch (s1, s2) -> Printf.printf "TypeMismatch %s %s\n" s1 s2
| Exception.LexingFail s ->... | null | https://raw.githubusercontent.com/zehnpaard/48hr-scheme-ocaml/b1f710cb2cd73bd81de0fe3ea2a3e02d3295a296/bin/ex.ml | ocaml | open Lisp
let f env s =
try Lexing.from_string s
|> Parser.f Lexer.f
|> Eval.f env
|> Exp.to_string
|> print_endline
with
| Exception.NumArgs (n, s) -> Printf.printf "NumArgs %d %s\n" n s
| Exception.TypeMismatch (s1, s2) -> Printf.printf "TypeMismatch %s %s\n" s1 s2
| Exception.LexingFail s ->... | |
cd53bbe43bb31c519262e3121a46835fb366fbdf6b8bf9ca1ac19da043ef801d | ucsd-progsys/liquidhaskell | MeasureContains.hs | {-@ LIQUID "--expect-any-error" @-}
module MeasureContains where
import Language.Haskell.Liquid.Prelude
{-@ LIQUID "--no-termination" @-}
{-@ measure binderContainsV @-}
binderContainsV :: Binder n -> Bool
binderContainsV B = True
binderContainsV (M x) = containsV x
data Binder n = B | M (TT n)
data TT n =... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/MeasureContains.hs | haskell | @ LIQUID "--expect-any-error" @
@ LIQUID "--no-termination" @
@ measure binderContainsV @
@ measure containsV @ | module MeasureContains where
import Language.Haskell.Liquid.Prelude
binderContainsV :: Binder n -> Bool
binderContainsV B = True
binderContainsV (M x) = containsV x
data Binder n = B | M (TT n)
data TT n = V Int | Other | Bind (Binder n) (TT n)
containsV :: TT n -> Bool
containsV (V i) = True
cont... |
6b2394a1f2ad2190996cc1acfb0ac50f48733a6f0924b749c45ff5a28780df01 | Kappa-Dev/KappaTools | setMap.mli | (******************************************************************************)
(* _ __ * The Kappa Language *)
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
(* | ' / ********************************************************************... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/dataStructures/setMap.mli | ocaml | ****************************************************************************
_ __ * The Kappa Language
| ' / ********************************************************************
| . \ * This file is distributed under the terms of the
|_|\_\ * GN... | | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
module type OrderedType =
sig
type t
val compare : t -> t -> int
val print : Format.formatter -> t -> unit
end
type ('parameters,'error,'a) with_log_wrap =
('parameters -> 'error -> string -> string option -> exn -> 'error) ->
... |
dd72d4c8f7facfcd336c3995e2a39a97d25e068b0d5239ae83b212824b94b0c2 | crosswire/xiphos | kddurtreeZ.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;
Centre for Speech Technology Research ; ;
University of Edinburgh , UK ; ;
;;; ... | null | https://raw.githubusercontent.com/crosswire/xiphos/a9283769ef4d0d47f1d09a3ca4138610bb96a46c/win32/festival/lib/voices/english/ked_diphone/festvox/kddurtreeZ.scm | scheme |
;;
;
;
Copyright (c) 1996,1997 ;;
;
;;
Permission is hereby granted, free of charge, to use and distribute ;;
this softwar... |
(set! kd_durs
'(
(uh 0.067 0.025)
(hh 0.061 0.028)
(ao 0.138 0.046)
(hv 0.053 0.020)
(v 0.051 0.019)
(ih 0.058 0.023)
(el 0.111 0.043)
(ey 0.132 0.042)
(em 0.080 0.033)
(jh 0.094 0.024)
(w 0.054 0.023)
(uw 0.107 0.044)
(ae 0.120 0.036)
(en 0.117 0.056)
(k 0.089 0.034)
(y 0.048 0.025)
... |
b5daf9401e634386e17ba09052edaacd0ac23219b9249418d077f8efce119f04 | neonsquare/mel-base | line-terminator-filter.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
Copyright ( c ) 2004 , < > .
;;; All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; * Redistribution... | null | https://raw.githubusercontent.com/neonsquare/mel-base/7edc8fb94f30d29637bae0831c55825b0021e0f8/line-terminator-filter.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list... |
Copyright ( c ) 2004 , < > .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :mel.internal)
(defclass line-terminator-input-stream (encapsulating-input-stream)())
(defclass line-terminator-output-stream (e... |
f6da5eb47166b43d8219b9e7047a5febe211ada7de718eb8f032752260e921b4 | runtimeverification/haskell-backend | StringLiteral.hs | module Test.Kore.Simplify.StringLiteral (
test_stringLiteralSimplification,
) where
import Kore.Internal.OrPattern (
OrPattern,
)
import Kore.Internal.OrPattern qualified as OrPattern
import Kore.Internal.Pattern (
Conditional (..),
)
import Kore.Internal.Predicate (
makeTruePredicate,
)
import Kore... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/b06757e252ee01fdd5ab8f07de2910711997d845/kore/test/Test/Kore/Simplify/StringLiteral.hs | haskell | module Test.Kore.Simplify.StringLiteral (
test_stringLiteralSimplification,
) where
import Kore.Internal.OrPattern (
OrPattern,
)
import Kore.Internal.OrPattern qualified as OrPattern
import Kore.Internal.Pattern (
Conditional (..),
)
import Kore.Internal.Predicate (
makeTruePredicate,
)
import Kore... | |
554422045a77ec34065839086b2cf440fb89e7dffce958fb5c730ca140aaee0a | chaoxu/fancy-walks | REVINPUT.hs | z(n:b)=unwords[x|x<-b,y<-[1..read n]];main=interact$reverse.z.words | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/spoj.pl/REVINPUT.hs | haskell | z(n:b)=unwords[x|x<-b,y<-[1..read n]];main=interact$reverse.z.words | |
f546428cb8adc3fa7d5fdfe24d7319c41c7de71cedc7e511d8e1d935421b2e77 | eltex-ecss/chronica | chronica_manager.erl | %%%-------------------------------------------------------------------
-*- coding : utf-8 -*-
@author , ,
( C ) 2015 , Eltex , Novosibirsk , Russia
%%% @doc
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(chronica_manager).
-behaviour(gen_server).
-include("ch... | null | https://raw.githubusercontent.com/eltex-ecss/chronica/bdc9f37797cd74215a02aabedf03b09005e9b21f/src/chronica_manager.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
Do not add them to head!
Error during add application in cache.
--------------------------------------------------------------------
-----------------------------------... | -*- coding : utf-8 -*-
@author , ,
( C ) 2015 , Eltex , Novosibirsk , Russia
-module(chronica_manager).
-behaviour(gen_server).
-include("chronica_int.hrl").
-include("chronica_config.hrl").
-include_lib("pt_scripts/include/pt_macro.hrl").
-include_lib("pt_lib/include/pt_lib.hrl").
-export(
[
ac... |
67c7c67662818d7ff8d648615e8864df3c138af3638dad216eacce55bb27fe61 | ocaml/ocaml | coercions.ml | (* TEST
flags = " -w +A -strict-sequence "
* expect
*)
comment 9644 of PR#6000
fun b -> if b then format_of_string "x" else "y"
[%%expect {|
- : bool -> ('a, 'b, 'c, 'd, 'd, 'a) format6 = <fun>
|}, Principal{|
Line 1, characters 45-48:
1 | fun b -> if b then format_of_string "x" else "y"
... | null | https://raw.githubusercontent.com/ocaml/ocaml/d71ea3d089ae3c338b8b6e2fb7beb08908076c7a/testsuite/tests/typing-warnings/coercions.ml | ocaml | TEST
flags = " -w +A -strict-sequence "
* expect
PR#7135
example of non-ground coercion |
comment 9644 of PR#6000
fun b -> if b then format_of_string "x" else "y"
[%%expect {|
- : bool -> ('a, 'b, 'c, 'd, 'd, 'a) format6 = <fun>
|}, Principal{|
Line 1, characters 45-48:
1 | fun b -> if b then format_of_string "x" else "y"
^^^
Warning 18 [not-principal]: t... |
57ee44fb0bb1147cd91a4b465beb32692f86c4472cfd8e960fe86bbbaf773814 | WormBase/wormbase_rest | reagents.clj | (ns rest-api.classes.cds.widgets.reagents
(:require
[clojure.string :as str]
[rest-api.formatters.object :as obj :refer [pack-obj]]
[rest-api.classes.generic-fields :as generic]))
(defn source-clone [c]
{:data (some->> (:sequence/clone
(:locatable/parent c))
(map ... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/cds/widgets/reagents.clj | clojure | (ns rest-api.classes.cds.widgets.reagents
(:require
[clojure.string :as str]
[rest-api.formatters.object :as obj :refer [pack-obj]]
[rest-api.classes.generic-fields :as generic]))
(defn source-clone [c]
{:data (some->> (:sequence/clone
(:locatable/parent c))
(map ... | |
8a39d912644a6d2a53d3092be2be1f1f0df7d4898ea1b1a77f7c2ebb9589b508 | meta-ex/ignite | petals.clj | (ns meta-ex.viz.petals
(:use quil.core
[overtone.helpers.ref]))
Modified version of " Mums " by
;;
(defonce num-petals-to-draw* (atom 0))
(def magenta [255 0 255])
(def orange [255 170 0])
(def chartreuse [127 255 0])
(def flower-colors [magenta orange chartreuse])
(def yellow [255 255 0])
(defn setu... | null | https://raw.githubusercontent.com/meta-ex/ignite/b9b1ed7ae2fa01d017c23febabb714a6389a98dd/src/meta_ex/viz/petals.clj | clojure |
TODO: Need correct implementation
This is done because ellipse() starts drawing from the top left corner
(draw-streaks petal-color petal-length)
This is a cheat to make sure the petals don't show
through the gaps in between the circles created below
Algorithm is as follows
* Randomize number of petals per... | (ns meta-ex.viz.petals
(:use quil.core
[overtone.helpers.ref]))
Modified version of " Mums " by
(defonce num-petals-to-draw* (atom 0))
(def magenta [255 0 255])
(def orange [255 170 0])
(def chartreuse [127 255 0])
(def flower-colors [magenta orange chartreuse])
(def yellow [255 255 0])
(defn setup []... |
1ffa20650818ead7c6112377132d87d8d06539a80fad4510f2ce44f6e8a64c20 | arohner/spectrum | z3_test.clj | (ns spectrum.z3-test
(:require [clojure.test :refer :all]
[spectrum.z3 :as z3 :refer [q]]))
(def a :a)
(def b :b)
(deftest q-works
(are [in out] (= out in)
(q (foo ~a)) '(foo :a)
(q (foo ~a ~b)) '(foo :a :b)
(let [bar [1 2 3]]
(q (foo ~@bar))) '(foo 1 2 3)
(let [bar [1 2 3]]
... | null | https://raw.githubusercontent.com/arohner/spectrum/72b47a91a5ce4567eed547507d25b2528f48c2d1/test/spectrum/z3_test.clj | clojure | (ns spectrum.z3-test
(:require [clojure.test :refer :all]
[spectrum.z3 :as z3 :refer [q]]))
(def a :a)
(def b :b)
(deftest q-works
(are [in out] (= out in)
(q (foo ~a)) '(foo :a)
(q (foo ~a ~b)) '(foo :a :b)
(let [bar [1 2 3]]
(q (foo ~@bar))) '(foo 1 2 3)
(let [bar [1 2 3]]
... | |
04c26cc5cc45036e9a75d64a68c0fe4b4c5708da64408063487fe2370499e6f0 | craff/pacomb | Break.ml | open Pacomb
open Grammar
Blank function
let blank = Regexp.blank_regexp "\\(\\([#][^\n]*\\)\\|[ \r\t\026]+\\)*"
(* bug: "\\([ \r\t\026]\\|\\(\\(#[^\n]*\\)\\)*" *)
Parser for
let%parser char =
(i::RE"[0-9A-Fa-F]+") => Uchar.of_int (int_of_string ("0x" ^ i))
let%parser sep = "÷" => true ; "×" => false
let%... | null | https://raw.githubusercontent.com/craff/pacomb/3e83f56bc483f6b9c495ae91d773aa9b484eb321/tests/Break.ml | ocaml | bug: "\\([ \r\t\026]\\|\\(\\(#[^\n]*\\)\\)*"
Single mapping parser
Command line args
Parsing and preparing the data | open Pacomb
open Grammar
Blank function
let blank = Regexp.blank_regexp "\\(\\([#][^\n]*\\)\\|[ \r\t\026]+\\)*"
Parser for
let%parser char =
(i::RE"[0-9A-Fa-F]+") => Uchar.of_int (int_of_string ("0x" ^ i))
let%parser sep = "÷" => true ; "×" => false
let%parser rec sample_aux = (l::sample_aux) (c::char) (s::... |
d403311df93c48dc24c75d8db2ef020e7076a8a475c1c4e8e67f8b7afa200a4a | gfour/gic | Lifter.hs | module SLIC.Front.LLifter.Lifter (lambdaLiftMod) where
import SLIC.AuxFun (ierr, lkUpSure)
import SLIC.Front.LLifter.Equations as Eqn
import SLIC.State
import SLIC.SyntaxAux
import SLIC.SyntaxFL
import SLIC.Types
import Data.List as List (concat, foldl, map, unzip, zip)
import Data.Set as Set (Set, delete, difference... | null | https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/SLIC/Front/LLifter/Lifter.hs | haskell | | Same as Map.insert but raises an error when given key
is already present in the map so that silent updates
are avoided.
| Take a map from varnames to varname sets, a defined name and
to the set associated with the given defined name.
| Take a map from varnames to varname sets, a defined name and
to the... | module SLIC.Front.LLifter.Lifter (lambdaLiftMod) where
import SLIC.AuxFun (ierr, lkUpSure)
import SLIC.Front.LLifter.Equations as Eqn
import SLIC.State
import SLIC.SyntaxAux
import SLIC.SyntaxFL
import SLIC.Types
import Data.List as List (concat, foldl, map, unzip, zip)
import Data.Set as Set (Set, delete, difference... |
a390afcbb5065e0e1e64915b2f9f9dac7f91940ac9cb54bb714305c615b651a9 | ocharles/haskell-opentracing | Main.hs | {-# language OverloadedStrings #-}
module Main where
import Web.Scotty
import Network.Wai.Handler.Warp
import Network.Wai.Middleware.OpenTracing
import Control.Monad.OpenTracing
import Jaeger
import qualified TestLib
main :: IO ()
main = do
t <-
openTracer TracerConfiguration { tracerServiceName = "test-exe" }... | null | https://raw.githubusercontent.com/ocharles/haskell-opentracing/8466a47b12fd5dbb7e9293c404c87e5f0222b285/test-exe/Main.hs | haskell | # language OverloadedStrings # |
module Main where
import Web.Scotty
import Network.Wai.Handler.Warp
import Network.Wai.Middleware.OpenTracing
import Control.Monad.OpenTracing
import Jaeger
import qualified TestLib
main :: IO ()
main = do
t <-
openTracer TracerConfiguration { tracerServiceName = "test-exe" }
runTracingT TestLib.hello t
... |
bae1463f92aba966ccec992945bc0a25271a05d01ab844e68e86d3f817055c4f | runtimeverification/haskell-backend | Module.hs | |
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2019-2021
License : BSD-3-Clause
-}
module Kore.Syntax.Module (
ModuleName (..),
getModuleNameForError,
Module (..),
) where
import Data.Aeson (
FromJSON,
ToJS... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/b74e9f8d5b88f4550145abf90d7fb3e69e072963/kore/src/Kore/Syntax/Module.hs | haskell | |
Copyright : ( c ) Runtime Verification , 2019 - 2021
License : BSD-3 - Clause
Copyright : (c) Runtime Verification, 2019-2021
License : BSD-3-Clause
-}
module Kore.Syntax.Module (
ModuleName (..),
getModuleNameForError,
Module (..),
) where
import Data.Aeson (
FromJSON,
ToJS... | |
4163aca4d186832644b9fd42d30f6d72ea441d100a50e50409755aeb0a38dbb2 | nikita-volkov/rerebase | Internal.hs | module Data.ByteString.Lazy.Internal
(
module Rebase.Data.ByteString.Lazy.Internal
)
where
import Rebase.Data.ByteString.Lazy.Internal
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/ByteString/Lazy/Internal.hs | haskell | module Data.ByteString.Lazy.Internal
(
module Rebase.Data.ByteString.Lazy.Internal
)
where
import Rebase.Data.ByteString.Lazy.Internal
| |
e1d821cc0fb4a1332e885b8aa08e3f17e29e267085ec3f2474c95c456f4f1c9a | na4zagin3/satyrographos | store.ml | open Core
type library_name = string
exception RegisteredAlready of library_name
type store = {
library_dir: string;
}
(* Basic operations *)
let list reg = FileUtil.ls reg.library_dir |> List.map ~f:FilePath.basename |> List.sort ~compare:String.compare
let directory reg name = Filename.concat reg.library_dir nam... | null | https://raw.githubusercontent.com/na4zagin3/satyrographos/d2943bac9659d20746720ab36ebe11ae59203d32/src/store.ml | ocaml | Basic operations
| false, false -> FileUtil.cp ~recurse:true [dir] (directory reg name)
Tests | open Core
type library_name = string
exception RegisteredAlready of library_name
type store = {
library_dir: string;
}
let list reg = FileUtil.ls reg.library_dir |> List.map ~f:FilePath.basename |> List.sort ~compare:String.compare
let directory reg name = Filename.concat reg.library_dir name
let mem reg name = di... |
9187c0123bf05c9097997a57d52da1244079e085b5d40c4e6e4e5ad8c529a4ac | puzza007/openpoker | fixed_limit.erl | Copyright ( C ) 2005 Wager Labs , SA
%%%
This file is part of OpenPoker .
%%%
OpenPoker 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 2 of the License , or ( at your option ) any l... | null | https://raw.githubusercontent.com/puzza007/openpoker/bbd7158c81ba869f9f04ac7295c9fb7ea099a9d2/src/fixed_limit.erl | erlang |
modify it under the terms of the GNU General Public
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
License along with this ... | Copyright ( C ) 2005 Wager Labs , SA
This file is part of OpenPoker .
OpenPoker is free software ; you can redistribute it and/or
License as published by the Free Software Foundation ; either
version 2 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Gene... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.