_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 |
|---|---|---|---|---|---|---|---|---|
9c72e2b0729a6157680917146e4f4d53c4b9f0becda73eb73819a62802639057 | nchataing/caml-migrate-floatarray | io.ml | (******************************************************************)
Copyright ( C ) 2020 - 2021 . All rights reserved .
(* *)
(* This software may be modified and distributed under the terms *)
of the BSD license . See the LICENSE file for details... | null | https://raw.githubusercontent.com/nchataing/caml-migrate-floatarray/9e7bb55ba7a801f20cdd9ce7701f0bb0200c1459/src/io.ml | ocaml | ****************************************************************
This software may be modified and distributed under the terms
**************************************************************** | Copyright ( C ) 2020 - 2021 . All rights reserved .
of the BSD license . See the LICENSE file for details .
let read filename =
let ic = open_in_bin filename in
Fun.protect
~finally:(fun () -> close_in ic)
(fun () -> really_input_string ic (in_channel_length ic))
let write filename txt =
... |
a44d2ca69d13694521749a9928a31f38c39246e09f3d001dd3dfbc10c8eead9c | prg-titech/baccaml | simple4.ml | ;;
let rec interp bytecode pc a =
jit_dispatch (pc = 6) bytecode a;
if pc = 6 then test_trace a bytecode else
let instr = bytecode.(pc) in
if instr = 0
then (* ADD *)
interp bytecode (pc + 1) (a + 1)
else if instr = 1
then (* SUB *)
interp bytecode (pc + 1) (a - 1)
else if instr = 2
then (
... | null | https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/test/interp_example/simple4.ml | ocaml | ADD
SUB
CALL
RETURN
PRINT_A
OTHERS | ;;
let rec interp bytecode pc a =
jit_dispatch (pc = 6) bytecode a;
if pc = 6 then test_trace a bytecode else
let instr = bytecode.(pc) in
if instr = 0
interp bytecode (pc + 1) (a + 1)
else if instr = 1
interp bytecode (pc + 1) (a - 1)
else if instr = 2
then (
let t1 = bytecode.(pc + 1) in
... |
bcd36588062a81978610a49cab9b3bc96b6c1995e3eea8f693db0ff8b0ec1b07 | borkdude/edamame | read_fn.cljc | (ns edamame.impl.read-fn
{:no-doc true})
(defn walk*
"Preserves metadata, unlike clojure.walk/walk."
[inner outer form]
(cond
(list? form) (with-meta (outer (apply list (map inner form)))
(meta form))
#?(:clj (instance? clojure.lang.IMapEntry form) :cljs (map-entry? form))
(outer... | null | https://raw.githubusercontent.com/borkdude/edamame/e609451d5dc38f347a5e0c68453edd76cccac3ff/src/edamame/impl/read_fn.cljc | clojure | (ns edamame.impl.read-fn
{:no-doc true})
(defn walk*
"Preserves metadata, unlike clojure.walk/walk."
[inner outer form]
(cond
(list? form) (with-meta (outer (apply list (map inner form)))
(meta form))
#?(:clj (instance? clojure.lang.IMapEntry form) :cljs (map-entry? form))
(outer... | |
64df983e5fc9b892ba64bea401f0dbfecffb39010d80fb4824d0128bd821e102 | haskell/cabal | P.hs | module P where
p = True
| null | https://raw.githubusercontent.com/haskell/cabal/c976c0ad65b93431acbe6c85d302df7ee888c0a1/cabal-testsuite/PackageTests/PackageDB/p-no-package-dbs/P.hs | haskell | module P where
p = True
| |
541ba3dd5ed6d3c5b1dcf90096335ff27e5a0317ecf6588e525b6f3d840dc5ac | alanz/ghc-exactprint | T4170.hs | # LANGUAGE TemplateHaskell #
module T4170 where
import Language.Haskell.TH
class LOL a
lol :: Q [Dec]
lol = [d|
instance LOL Int
|]
instance LOL Int
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc86/T4170.hs | haskell | # LANGUAGE TemplateHaskell #
module T4170 where
import Language.Haskell.TH
class LOL a
lol :: Q [Dec]
lol = [d|
instance LOL Int
|]
instance LOL Int
| |
7844285bea37213c1cc599033aa1fb00a1df9a4ee623995fa6c89ec974b805d7 | dhess/sicp-solutions | ex2.36.scm | (define nil (quote ()))
(define (accumulate op initial sequence)
(if (null? sequence)
initial
(op (car sequence)
(accumulate op initial (cdr sequence)))))
(define (accumulate-n op init seqs)
(if (null? (car seqs))
nil
(cons (accumulate op init (map car seqs))
(accumul... | null | https://raw.githubusercontent.com/dhess/sicp-solutions/2cf78db98917e9cb1252efda76fddc8e45fe4140/chap2/ex2.36.scm | scheme | (define nil (quote ()))
(define (accumulate op initial sequence)
(if (null? sequence)
initial
(op (car sequence)
(accumulate op initial (cdr sequence)))))
(define (accumulate-n op init seqs)
(if (null? (car seqs))
nil
(cons (accumulate op init (map car seqs))
(accumul... | |
5086b0f51377f11d4693a1a54599e4402d32e68338d9d6ccff37151f11ddae8f | evturn/haskellbook | 12.05-unfolds.hs | 1 .
Write a function ` myIterate ` using direct recursion .
myIterate :: (a -> a) -> a -> [a]
myIterate f x = x : myIterate f (f x)
2 .
-- Write a function `myUnfoldr` using direct recursion.
myUnfoldr :: (b -> Maybe (a, b)) -> b -> [a]
myUnfoldr f x = doIt (f x)
where
doIt Nothing = []
doIt (Jus... | null | https://raw.githubusercontent.com/evturn/haskellbook/3d310d0ddd4221ffc5b9fd7ec6476b2a0731274a/12/12.05-unfolds.hs | haskell | Write a function `myUnfoldr` using direct recursion. | 1 .
Write a function ` myIterate ` using direct recursion .
myIterate :: (a -> a) -> a -> [a]
myIterate f x = x : myIterate f (f x)
2 .
myUnfoldr :: (b -> Maybe (a, b)) -> b -> [a]
myUnfoldr f x = doIt (f x)
where
doIt Nothing = []
doIt (Just (x, y)) = x : myUnfoldr f y
3 .
Rewrite ` myItera... |
d1dae147619844291740ecbed37467d15e3474b2f1b15f56033942257cf9e8d9 | eproxus/meck | meck_test_module.erl | -module(meck_test_module).
-tag(foobar).
-deprecated([a/0]).
-export([a/0, b/0, c/2]).
-spec ?MODULE:a() -> a | b.
a() -> a.
b() -> b.
c(A, B) ->
{A, B}.
| null | https://raw.githubusercontent.com/eproxus/meck/3efce27e01fcb442f0ec7dc3af587745510fdc19/test/meck_test_module.erl | erlang | -module(meck_test_module).
-tag(foobar).
-deprecated([a/0]).
-export([a/0, b/0, c/2]).
-spec ?MODULE:a() -> a | b.
a() -> a.
b() -> b.
c(A, B) ->
{A, B}.
| |
25f4e2fccf590144a66cb8bc3272027eac8eacb325b6871850df66d0df027f78 | awakesecurity/hocker | Nix.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Docker.Nix
Copyright : ( C ) 2016 Awake Networks
-- License : Apache-2.0
Maintainer : Awake Netw... | null | https://raw.githubusercontent.com/awakesecurity/hocker/4610befce9881e85925e96ebf464e925fae67164/src/Data/Docker/Nix.hs | haskell | # LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
|
Module : Data.Docker.Nix
License : Apache-2.0
Stability : stable
--------------------------------------------------------------------------
* Generate nix build instructions for a docker imag... | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
Copyright : ( C ) 2016 Awake Networks
Maintainer : Awake Networks < >
This module only re - exports Nix modules providing - specific
functionality as it pertains to generation of expression .
module Data.Docker.Nix
module Data.Docke... |
6eabd20896fe01a3b287d48ecb447a28d2e337fe04ee9d1413abb861a12d3ac3 | REPROSEC/dolev-yao-star | Spec_ECDSA_Test_Vectors.ml | open Prims
type vec_SigVer =
{
msg: Prims.string ;
qx: Prims.string ;
qy: Prims.string ;
r: Prims.string ;
s: Prims.string ;
result: Prims.bool }
let (__proj__Mkvec_SigVer__item__msg : vec_SigVer -> Prims.string) =
fun projectee ->
match projectee with | { msg; qx; qy; r; s; result;_} -> msg
let (__... | null | https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Spec_ECDSA_Test_Vectors.ml | ocaml | open Prims
type vec_SigVer =
{
msg: Prims.string ;
qx: Prims.string ;
qy: Prims.string ;
r: Prims.string ;
s: Prims.string ;
result: Prims.bool }
let (__proj__Mkvec_SigVer__item__msg : vec_SigVer -> Prims.string) =
fun projectee ->
match projectee with | { msg; qx; qy; r; s; result;_} -> msg
let (__... | |
48ed9f094ff53546b9fe323b4d135a13526ef5170f7d63aa4e90ccf801284e16 | input-output-hk/cardano-sl | Log.hs | {-# LANGUAGE DeriveAnyClass #-}
# OPTIONS_GHC -fno - warn - orphans #
-- | Logging implemented with library `katip`
module Pos.Util.Log
(
-- * Logging
Severity (..)
, LogContext
, LoggingHandler
-- * Compatibility
, CanLog (..)
, WithLogger
-- * Configu... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/util/src/Pos/Util/Log.hs | haskell | # LANGUAGE DeriveAnyClass #
| Logging implemented with library `katip`
* Logging
* Compatibility
* Configuration
* Startup
* Do logging
* Functions
* Naming/Context
* other functions
* class for structured logging
| alias - pretend not to depend on katip
-- | compatibility
| log a Text with severity
| log... | # OPTIONS_GHC -fno - warn - orphans #
module Pos.Util.Log
(
Severity (..)
, LogContext
, LoggingHandler
, CanLog (..)
, WithLogger
, LoggerConfig (..)
, parseLoggerConfig
, retrieveLogFiles
, setupLogging
, loggerBracket
, usingLogg... |
2a0ed296c2032ec2a2dd1b0e41b61f485d9b2d7e340b2789c329b934e08057d7 | input-output-hk/hydra | TxScriptValidity.hs | module Hydra.Cardano.Api.TxScriptValidity where
import Hydra.Cardano.Api.Prelude
import qualified Cardano.Ledger.Alonzo.Tx as Ledger
| Convert a cardano - api ' TxScriptValidity ' into a cardano - ledger ' '
-- boolean wrapper.
toLedgerScriptValidity :: TxScriptValidity era -> Ledger.IsValid
toLedgerScriptValidit... | null | https://raw.githubusercontent.com/input-output-hk/hydra/11c015bbe3a28def0935e247eb0d54af17f47948/hydra-cardano-api/src/Hydra/Cardano/Api/TxScriptValidity.hs | haskell | boolean wrapper. | module Hydra.Cardano.Api.TxScriptValidity where
import Hydra.Cardano.Api.Prelude
import qualified Cardano.Ledger.Alonzo.Tx as Ledger
| Convert a cardano - api ' TxScriptValidity ' into a cardano - ledger ' '
toLedgerScriptValidity :: TxScriptValidity era -> Ledger.IsValid
toLedgerScriptValidity =
Ledger.IsValid... |
2e3e94d3c0a8624ce8dae2ee018343e4388840af01692bd1b2ee192bc044a9fc | ogaml/ogaml | programInternal.ml |
exception Program_internal_error of string
module Uniform = struct
type t = {name : string; kind : GLTypes.GlslType.t; location : GL.Program.u_location}
let name u = u.name
let kind u = u.kind
let location u = u.location
end
module Attribute = struct
type t = {name : string; kind : GLTypes.GlslType... | null | https://raw.githubusercontent.com/ogaml/ogaml/5e74597521abf7ba2833a9247e55780eabfbab78/src/graphics/backend/programInternal.ml | ocaml | * 2D drawing program
Text drawing program |
exception Program_internal_error of string
module Uniform = struct
type t = {name : string; kind : GLTypes.GlslType.t; location : GL.Program.u_location}
let name u = u.name
let kind u = u.kind
let location u = u.location
end
module Attribute = struct
type t = {name : string; kind : GLTypes.GlslType... |
52d7d904698592a374512fd77b8f3d4ba6ae658b66fc173e7a715124ff7fb0f5 | dannywillems/types-and-programming-languages-pierce-implementation | print.ml | open Grammar
exception NameConflict of string
exception TypeError of string
(* The context is a list of binding. *)
type context = {
variable_binding : (termVariable * typ) list;
type_binding : typeVariable list
}
let empty_context = {
variable_binding = [];
type_binding = []
}
let get_type_of_variable cont... | null | https://raw.githubusercontent.com/dannywillems/types-and-programming-languages-pierce-implementation/f3b48d44adc59fd957909b9157e0ff104dea1959/OCaml/chapter25/src/print.ml | ocaml | The context is a list of binding. | open Grammar
exception NameConflict of string
exception TypeError of string
type context = {
variable_binding : (termVariable * typ) list;
type_binding : typeVariable list
}
let empty_context = {
variable_binding = [];
type_binding = []
}
let get_type_of_variable context var =
let (_, typ) =
List.find... |
d414730e2dd76e36ab254691e55a111d8e2195bd40d6c0071f0b75070aecc032 | v-kolesnikov/sicp | tagged_data.clj | (ns sicp.common.tagged-data
"Tagged data from SICP section 2.4.2"
{:author "Vasily Kolesnikov"}
(:require [sicp.common.pairs :as p]))
(defn attach-tag
[type-tag contents]
(p/cons type-tag contents))
(defn tag
[item]
(p/car item))
(defn contents
[item]
(p/cdr item))
| null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/common/tagged_data.clj | clojure | (ns sicp.common.tagged-data
"Tagged data from SICP section 2.4.2"
{:author "Vasily Kolesnikov"}
(:require [sicp.common.pairs :as p]))
(defn attach-tag
[type-tag contents]
(p/cons type-tag contents))
(defn tag
[item]
(p/car item))
(defn contents
[item]
(p/cdr item))
| |
a29b8fddba2608bb10702effffb790f6539ae370f4a0d9d43cdf4a57ea9e089a | pitag-ha/ppx_fprint | alcotest_ext.mli | open Alcotest
val rresult : 'a testable -> 'e testable -> ('a, 'e) Rresult.result testable | null | https://raw.githubusercontent.com/pitag-ha/ppx_fprint/98506a3c8b3e3af04ab31a31fa5a4c1148c5a022/test/lib/alcotest_ext.mli | ocaml | open Alcotest
val rresult : 'a testable -> 'e testable -> ('a, 'e) Rresult.result testable | |
55c5a3fc56485008cddd4618739fc17eaf27edb5e5afe70524fbaefbaccf4472 | padsproj/pads-haskell | Errors.hs | {-# LANGUAGE NamedFieldPuns, DeriveDataTypeable #-}
{-# OPTIONS_HADDOCK prune #-}
|
Module : Language . Pads . Errors
Description : Parse error reporting support
Copyright : ( c ) 2011
< >
< >
License : MIT
Maintainer : < >
Stability ... | null | https://raw.githubusercontent.com/padsproj/pads-haskell/8dce6b2b28bf7d98028e67f6faa2be753a6ad691/src/Language/Pads/Errors.hs | haskell | # LANGUAGE NamedFieldPuns, DeriveDataTypeable #
# OPTIONS_HADDOCK prune #
| Errors which can be encountered at runtime when parsing a Pads type
XXX-KSF: fix pretty printing to use pretty printing combinators rather than string ++
| Pretty printer for Pads runtime error messages.
| Error information relating back t... | |
Module : Language . Pads . Errors
Description : Parse error reporting support
Copyright : ( c ) 2011
< >
< >
License : MIT
Maintainer : < >
Stability : experimental
Module : Language.Pads.Errors
Description : Parse erro... |
70aa220441e3bd76c0f689315d872f78e362ff79d4ac09e1c3c7ecbe12c257c2 | democracyworks/imbarcode | big_integer.cljs | (ns imbarcode.big-integer
"Wraps goog.math.Integer operations to provide
a common, Clojure-esque interface for dealing with arbitrary
precision integers in ClojureScript."
(:refer-clojure :exclude [+ * inc quot rem int zero?])
(:import [goog.math Integer]))
(defn valid-string? [string]
(re-matches #"^\d*... | null | https://raw.githubusercontent.com/democracyworks/imbarcode/8b4a821a42238c0bd62f5e19fbb51462741b4b9f/src/cljs/imbarcode/big_integer.cljs | clojure | (ns imbarcode.big-integer
"Wraps goog.math.Integer operations to provide
a common, Clojure-esque interface for dealing with arbitrary
precision integers in ClojureScript."
(:refer-clojure :exclude [+ * inc quot rem int zero?])
(:import [goog.math Integer]))
(defn valid-string? [string]
(re-matches #"^\d*... | |
fd71bfaa8135cf5616507e066c66982775db995a3062fafa9350346ef5391592 | ChaosCabbage/very-lazy-boy | Reference.hs | # LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE RankNTypes #-}
module CPU.Reference (
CPUReference(..)
) where
-- A bit of an experiment.
-- There's a lot of repeated code because the types of various regi... | null | https://raw.githubusercontent.com/ChaosCabbage/very-lazy-boy/53ec41a3ff296e9d602b73fee33a512126c8a8b4/src/CPU/Reference.hs | haskell | # LANGUAGE TypeSynonymInstances #
# LANGUAGE RankNTypes #
A bit of an experiment.
There's a lot of repeated code because the types of various registers are different.
Can I unify it? | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
module CPU.Reference (
CPUReference(..)
) where
import CPU
import CPU.Environment (Register8, Register16, ComboRegister)
import Data.Bits (FiniteBits)
import Data.Word (Word8, Word16)
class (Num w, Boun... |
f897b6579f99da4648150fac864ee8c6cdbdc8f6c4347168a456f01b90944972 | felixmulder/hedgehog-servant | Servant.hs | # LANGUAGE TemplateHaskell #
module Test.Hedgehog.Servant
( tests
) where
import Control.Monad (forM_)
import Data.Aeson (FromJSON, ToJSON, eitherDecode)
import Data.String (IsString)
import Data.Proxy (Proxy(..))
import Data.Text (Text, splitOn)
import D... | null | https://raw.githubusercontent.com/felixmulder/hedgehog-servant/a3bf9cbf785162928caf5ff3afd91d4a7fc7f5b7/test/Test/Hedgehog/Servant.hs | haskell | A typical cat:
With ability to go back and forth to JSON:
And a simple generator to get random values of Cat:
Here's a simple API that allows posting a Cat in JSON to
POST /cats
Generate a request to the Cat API from a base URL
A typical dog:
With ability to go back and forth to JSON:
And a simple generator t... | # LANGUAGE TemplateHaskell #
module Test.Hedgehog.Servant
( tests
) where
import Control.Monad (forM_)
import Data.Aeson (FromJSON, ToJSON, eitherDecode)
import Data.String (IsString)
import Data.Proxy (Proxy(..))
import Data.Text (Text, splitOn)
import D... |
4fbcf01c7d11c0f986c195aec16514f39e629e127b524745ddbe9a28219c5f7b | ssm-lang/sslang | Instantiate.hs | module IR.Constraint.Instantiate
( fromScheme
) where
import qualified Common.Identifiers as Ident
import qualified Data.Map.Strict as Map
import Data.Map.Strict ( (!) )
import qualified IR.Constraint.Canonical as Can
import IR.Constraint.Monad ... | null | https://raw.githubusercontent.com/ssm-lang/sslang/d23597773d471fb222890e31a984d54289b45d28/src/IR/Constraint/Instantiate.hs | haskell | | FROM SCHEME | module IR.Constraint.Instantiate
( fromScheme
) where
import qualified Common.Identifiers as Ident
import qualified Data.Map.Strict as Map
import Data.Map.Strict ( (!) )
import qualified IR.Constraint.Canonical as Can
import IR.Constraint.Monad ... |
112fd3747d0b9c7f6f597b11e17102e7ace71976156dbbcd536adbfa596cd796 | larcenists/larceny | prefix-kawa.scm | ;INSERTCODE
;------------------------------------------------------------------------------
FIXME : probably has some way to time benchmarks .
(define (time x) x)
(define (run-bench name count ok? run)
(let loop ((i 0) (result (list 'undefined)))
(if (< i count)
(loop (+ i 1) (run))
result)))
(... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/Benchmarking/CrossPlatform/prefix/prefix-kawa.scm | scheme | INSERTCODE
------------------------------------------------------------------------------
------------------------------------------------------------------------------
(define-syntax bitwise-or
(syntax-rules ()
((bitwise-or x y) (fxior x y))))
(define-syntax bitwise-and
(syntax-rules ()
((bitwise-and x y) ... |
FIXME : probably has some way to time benchmarks .
(define (time x) x)
(define (run-bench name count ok? run)
(let loop ((i 0) (result (list 'undefined)))
(if (< i count)
(loop (+ i 1) (run))
result)))
(define (run-benchmark name count ok? run-maker . args)
(newline)
(let* ((run (apply run-... |
4f9e813e52bae0ab3872ee7729dce24a3802fc794d91a0d8e151f0c3cc86b1d9 | FreeProving/free-compiler | Base.hs | | This module contains the Agda identifiers of types , constructors and
-- functions defined in the Base library that accompanies the compiler.
module FreeC.Backend.Agda.Base
( -- * Library Imports
baseLibName
, generatedLibName
, imports
-- * Free Monad
, free
, pure
, shape
, position
, pa... | null | https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/lib/FreeC/Backend/Agda/Base.hs | haskell | functions defined in the Base library that accompanies the compiler.
* Library Imports
* Free Monad
* Sized Types
* Reserved Identifiers
isn't a problem.
-----------------------------------------------------------------------------
Library Imports --
--... | | This module contains the Agda identifiers of types , constructors and
module FreeC.Backend.Agda.Base
baseLibName
, generatedLibName
, imports
, free
, pure
, shape
, position
, partial
, size
, up
, reservedIdents
) where
We always import this module qualified , therefore clashing with ... |
142f55625af11a1b184c8090ae4f9c8b9002edd8aa021b01d5ef039ad077f4a6 | hanshuebner/pixelisp | clock.lisp | ;; -*- Lisp -*-
(defpackage :clock
(:use :cl :alexandria)
(:export #:run
#:style
#:render-seconds-p))
(in-package :clock)
(defparameter *lib-directory* #P"lib/clock/")
(storage:defconfig 'style 1)
(storage:defconfig 'render-seconds t)
(defun style ()
(storage:config 'style))
(defun (se... | null | https://raw.githubusercontent.com/hanshuebner/pixelisp/f304dfb08130d5a2a7deb68fc4881e720df42a56/src/clock.lisp | lisp | -*- Lisp -*- |
(defpackage :clock
(:use :cl :alexandria)
(:export #:run
#:style
#:render-seconds-p))
(in-package :clock)
(defparameter *lib-directory* #P"lib/clock/")
(storage:defconfig 'style 1)
(storage:defconfig 'render-seconds t)
(defun style ()
(storage:config 'style))
(defun (setf style) (style... |
4eeb4622e9128b6644cfa56424f3b0c609c0dfcb9045930ead352435a9379c85 | mu-chaco/ReWire | MiniISA.hs | import ReWire
import ReWire.Bits
( dataIn , rstIn , intIn )
( addrOut , dataOut , weOut , iackOut )
( inputs , outputs ) ( 0 - 9,10 - 27 )
( zFlag , cFlag , ieFlag , pc ) ( 28,29,30,31 - 38 )
( zsFlag , csFlag , pcSave ) ( 39,40,41 - 48 )
( r0,r1,r2,r3 ) ( 49 - 56,57 - 64,65 - 72,73 - 80 )
data Register =... | null | https://raw.githubusercontent.com/mu-chaco/ReWire/b04686a4cd6cb36ca9976a4b6c42bc195ce69462/tests/integration/MiniISA.hs | haskell | # INLINE putPC #
# INLINE and' #
# INLINE not' # | import ReWire
import ReWire.Bits
( dataIn , rstIn , intIn )
( addrOut , dataOut , weOut , iackOut )
( inputs , outputs ) ( 0 - 9,10 - 27 )
( zFlag , cFlag , ieFlag , pc ) ( 28,29,30,31 - 38 )
( zsFlag , csFlag , pcSave ) ( 39,40,41 - 48 )
( r0,r1,r2,r3 ) ( 49 - 56,57 - 64,65 - 72,73 - 80 )
data Register =... |
f885dffbcef247d5b38d2ed209341a2a247110e0a385b029d706ae0c9e296793 | haskell/haskell-ide-engine | DupRecFields.hs | # LANGUAGE DuplicateRecordFields #
module DupRecFields where
newtype One = One { accessor :: Int }
newtype Two = Two { accessor :: Int }
| null | https://raw.githubusercontent.com/haskell/haskell-ide-engine/d84b84322ccac81bf4963983d55cc4e6e98ad418/test/testdata/completion/DupRecFields.hs | haskell | # LANGUAGE DuplicateRecordFields #
module DupRecFields where
newtype One = One { accessor :: Int }
newtype Two = Two { accessor :: Int }
| |
891ad5956febb1b0b754302d8b4434d9d84c09a3ea0b77810de21981cc472ca5 | mkoppmann/eselsohr | Collection.hs | module Lib.Domain.Collection
( Collection
) where
{- | An empty type used for declaring collection IDs. It is only used in the
context of phantom types.
-}
data Collection
| null | https://raw.githubusercontent.com/mkoppmann/eselsohr/3bb8609199c1dfda94935e6dde0c46fc429de84e/src/Lib/Domain/Collection.hs | haskell | | An empty type used for declaring collection IDs. It is only used in the
context of phantom types.
| module Lib.Domain.Collection
( Collection
) where
data Collection
|
e866f74bb660b14186b58e9575bd24df01c3c96f058ca99b14320a5bd21cbf33 | samrushing/irken-compiler | t_b256.scm | ;; -*- Mode: Irken -*-
(include "lib/basis.scm")
(include "lib/map.scm")
(include "demo/bignum.scm")
(include "lib/codecs/hex.scm")
test the codec for .
(define tests-passed 0)
(defmacro assert2
(assert2 exp)
-> (if (not exp)
(begin
(printf "assertion failed: " (repr (car (%%sexp exp))) ... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_b256.scm | scheme | -*- Mode: Irken -*-
--- slow/simple/correct versions to test against ---
----------------------------------------------------
round-trip negative ints. |
(include "lib/basis.scm")
(include "lib/map.scm")
(include "demo/bignum.scm")
(include "lib/codecs/hex.scm")
test the codec for .
(define tests-passed 0)
(defmacro assert2
(assert2 exp)
-> (if (not exp)
(begin
(printf "assertion failed: " (repr (car (%%sexp exp))) "\n")
(raise... |
d79c1250d3bd494f0706e254cd9f916ef7b63b79d49be64582b36089143d07c4 | vehicle-lang/vehicle | ExpandResources.hs | module Vehicle.Compile.ExpandResources
( expandResources,
)
where
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.State
import Data.Foldable (traverse_)
import Data.Map (Map)
import Data.Map qualified as Map (insert, lookup)
import Data.Traversable (for)
import Vehicle.Compile.Error
im... | null | https://raw.githubusercontent.com/vehicle-lang/vehicle/8db54819fdfd79e4b2b5d77019560a207192a23a/vehicle/src/Vehicle/Compile/ExpandResources.hs | haskell | | Expands datasets and parameters, and attempts to infer the values of
inferable parameters. Also checks the resulting types of networks.
------------------------------------------------------------------------------
the resources, comparing the data against the type in the spec, and making
note of the values for i... | module Vehicle.Compile.ExpandResources
( expandResources,
)
where
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.State
import Data.Foldable (traverse_)
import Data.Map (Map)
import Data.Map qualified as Map (insert, lookup)
import Data.Traversable (for)
import Vehicle.Compile.Error
im... |
fc0e9e0629995176fe270899cb8cc0cf2aea4bb03113124ada52ad1705580b21 | aartaka/chur-guix | recon.scm | (define-module (chur recon)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
#:use-module (gnu... | null | https://raw.githubusercontent.com/aartaka/chur-guix/8fcb5ddaa15fd10d71c1e50950405bb6d48e4393/chur/recon.scm | scheme | (define-module (chur recon)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system perl)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
#:use-module (gnu... | |
a97b4b5770819b3c74f17f2d24f3f605617a2fa579a42677d0b7f09a66f3b33d | gfngfn/otfed | decodePost.ml |
open Basic
open DecodeBasic
open DecodeOperation.Open
let macintosh_glyph_name_array =
Array.of_list macintosh_glyph_name_list
let d_pascal_string_names (len_remained : int) : (string array) decoder =
let open DecodeOperation in
let rec aux acc len_remained =
if len_remained <= 0 then
return @@ Arr... | null | https://raw.githubusercontent.com/gfngfn/otfed/3c6d8ea0b05fc18a48cb423451da7858bf73d1d0/src/decodePost.ml | ocaml | numberOfGlyphs |
open Basic
open DecodeBasic
open DecodeOperation.Open
let macintosh_glyph_name_array =
Array.of_list macintosh_glyph_name_list
let d_pascal_string_names (len_remained : int) : (string array) decoder =
let open DecodeOperation in
let rec aux acc len_remained =
if len_remained <= 0 then
return @@ Arr... |
6daa4a4ba5de5b68781ac79ae54ff089815fc899c97b33bc61ce312028d1106e | nasser/magic | flags.clj | (ns magic.flags)
(def ^:dynamic *strongly-typed-invokes* false)
(def ^:dynamic *direct-linking* false)
(def ^:dynamic *elide-meta* false)
(def ^:dynamic *legacy-dynamic-callsites* false) | null | https://raw.githubusercontent.com/nasser/magic/febe2df12c23a31103e69fd34756698e89b2b46d/src/magic/flags.clj | clojure | (ns magic.flags)
(def ^:dynamic *strongly-typed-invokes* false)
(def ^:dynamic *direct-linking* false)
(def ^:dynamic *elide-meta* false)
(def ^:dynamic *legacy-dynamic-callsites* false) | |
00ac2529c03adaf444a8db9202828c79eb3c07fcd635c33d5cc75b60003de73c | SamueleGiraudo/Bud-Music-Box | Pattern.ml | Author :
* Creation : mar . 2019
* Modifications : mar . 2019 , apr . 2019 , aug . 2019 , sep . 2019 , dec . 2019 , jan . 2020 ,
* apr . 2020 , may 2020 , oct . 2020 , apr . 2021 , jul . 2022
* Creation: mar. 2019
* Modifications: mar. 2019, apr. 2019, aug. 2019, sep. 2019, dec. 2019, jan. 2020,
* ap... | null | https://raw.githubusercontent.com/SamueleGiraudo/Bud-Music-Box/45eae635fcbd85555f74d864b31ab25ee50e6bde/Sources/Pattern.ml | ocaml | A pattern is a nonempty list of atoms.
Returns a string representing the pattern p.
Returns the empty pattern.
Returns the pattern consisting in unity atom, having degree 0.
Returns the pattern consisting in a sequence of k rests.
Returns the arity of the pattern p. This is the number of beats of the pattern... | Author :
* Creation : mar . 2019
* Modifications : mar . 2019 , apr . 2019 , aug . 2019 , sep . 2019 , dec . 2019 , jan . 2020 ,
* apr . 2020 , may 2020 , oct . 2020 , apr . 2021 , jul . 2022
* Creation: mar. 2019
* Modifications: mar. 2019, apr. 2019, aug. 2019, sep. 2019, dec. 2019, jan. 2020,
* ap... |
0760d0f04da62ab66e123d5c23486477ef788e151f7fc9d2f77df1b498e214dc | babashka/nbb | plet.cljs | (ns plet
{:clj-kondo/config '{:lint-as {plet/plet clojure.core/let}}})
(defmacro plet
"Inspired by -tooling/blob/b4962dd39b84d60cbd087a96ba6fccb1bffd0bd6/src/repl_tooling/editor_integration/interpreter.cljs#L26"
[bindings & body]
(let [binding-pairs (reverse (partition 2 bindings))
body (list* 'do body... | null | https://raw.githubusercontent.com/babashka/nbb/4d06aa142a5fb5baac48a8ad8e611d672f779b5f/test-scripts/plet.cljs | clojure | (prn binding-pairs) | (ns plet
{:clj-kondo/config '{:lint-as {plet/plet clojure.core/let}}})
(defmacro plet
"Inspired by -tooling/blob/b4962dd39b84d60cbd087a96ba6fccb1bffd0bd6/src/repl_tooling/editor_integration/interpreter.cljs#L26"
[bindings & body]
(let [binding-pairs (reverse (partition 2 bindings))
body (list* 'do body... |
4fa7261200a6bf255ad66a2d03734bb3ebceb49d0e9a10b54d01ae4b118b0e29 | haskell/lsp | MarkupContent.hs | # LANGUAGE DuplicateRecordFields #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
| A MarkupContent literal represents a string value which content can
-- be represented in different formats.
-- Currently plaintext and markdown are supported formats.
A MarkupContent i... | null | https://raw.githubusercontent.com/haskell/lsp/2221206c9df13a7e36ba73ed0109423e556c3f9b/lsp-types/src/Language/LSP/Types/MarkupContent.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
be represented in different formats.
Currently plaintext and markdown are supported formats.
| Describes the content type that a client supports in various
^ Plain text is supported as a content format
| kind flag. Currently the proto... | # LANGUAGE DuplicateRecordFields #
| A MarkupContent literal represents a string value which content can
A MarkupContent is usually used in documentation properties of result
literals like CompletionItem or SignatureInformation .
module Language.LSP.Types.MarkupContent where
import Data.Aeson
im... |
ae922a49ccfe6ad19b6b306ec99c32397bbac091edad15de9bbed251685ef5b4 | Netflix/mantis-mql | operands.cljc | (ns io.mantisrx.mql.compilers.core.operands
(:require [io.mantisrx.mql.properties :as mqlp])
(:import java.util.Map)
)
(defn sw-property->fn
[prop]
(with-meta
(fn [datum]
(let
[ks (filter (fn [^String k] (.startsWith k prop)) (keys datum))]
(map (fn [k] {:name [k] :value (mqlp/get-i... | null | https://raw.githubusercontent.com/Netflix/mantis-mql/94600fc687afd380e6a063806a5f0dd0be218f34/mql-jvm/src/main/clojure/io/mantisrx/mql/compilers/core/operands.cljc | clojure | (ns io.mantisrx.mql.compilers.core.operands
(:require [io.mantisrx.mql.properties :as mqlp])
(:import java.util.Map)
)
(defn sw-property->fn
[prop]
(with-meta
(fn [datum]
(let
[ks (filter (fn [^String k] (.startsWith k prop)) (keys datum))]
(map (fn [k] {:name [k] :value (mqlp/get-i... | |
1734c51406e58c560934f1a6af006fa5b46632eaf472287f70fc4b5b57eb01f9 | racket/htdp | dir-aux.rkt | #lang racket
(provide writeln natural-number/c regexp-match) | null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-test/htdp/tests/dir-aux.rkt | racket | #lang racket
(provide writeln natural-number/c regexp-match) | |
e3265bd1c5d0b1da15f3a14f28e194ab205baab1b4ac1069ce33ba55d98851ce | basho/rebar | rebar_templater.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
%% -------------------------------------------------------------------
%%
rebar : Erlang Build Tools
%%
Copyright ( c ) 2009 ( )
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this softw... | null | https://raw.githubusercontent.com/basho/rebar/cd55176009df794f506771fd574de9303ff2a42e/src/rebar_templater.erl | erlang | ex: ts=4 sw=4 et
-------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sel... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
rebar : Erlang Build Tools
Copyright ( c ) 2009 ( )
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the... |
7cbc6ad33ab24cdb9c8e497ddbf5be782e7b7e1f0644c5be7c64bcd1333d88e6 | 8c6794b6/guile-tjit | t-records.scm | SRFI-9 Records .
;;;
(use-modules (srfi srfi-9))
(define-record-type <stuff>
(%make-stuff chbouib)
stuff?
(chbouib stuff:chbouib stuff:set-chbouib!))
(and (stuff? (%make-stuff 12))
(= 7 (stuff:chbouib (%make-stuff 7)))
(not (stuff? 12)))
| null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/vm/t-records.scm | scheme | SRFI-9 Records .
(use-modules (srfi srfi-9))
(define-record-type <stuff>
(%make-stuff chbouib)
stuff?
(chbouib stuff:chbouib stuff:set-chbouib!))
(and (stuff? (%make-stuff 12))
(= 7 (stuff:chbouib (%make-stuff 7)))
(not (stuff? 12)))
| |
47afc2b07a6a220dc4fcdcdca773841ef8223344cfd9168ed47904df05ecfd32 | marigold-dev/mankavar | woo_types.ml | module P = Ppxlib
module A = P.Ast_builder.Default
module SMap = struct
include Map.Make(String)
let to_kv_list_rev : 'a t -> (string * 'a) list = fun m -> fold (fun k v prev -> (k , v) :: prev) m []
let to_kv_list : 'a t -> (string * 'a) list = fun m -> List.rev (to_kv_list_rev m)
end
type type_parameter = str... | null | https://raw.githubusercontent.com/marigold-dev/mankavar/0fd0b98c9ca01a9ddd1e623955b406881629f6c2/vendors/ppx-woo/woo_types.ml | ocaml | module P = Ppxlib
module A = P.Ast_builder.Default
module SMap = struct
include Map.Make(String)
let to_kv_list_rev : 'a t -> (string * 'a) list = fun m -> fold (fun k v prev -> (k , v) :: prev) m []
let to_kv_list : 'a t -> (string * 'a) list = fun m -> List.rev (to_kv_list_rev m)
end
type type_parameter = str... | |
124974d6198adc66286e91a6994fe191c3d17ac5c91d8b84cfbdb48f4aece354 | opennars/Narjure | sensorimotor.clj | (ns narjure.sensorimotor
(:require [narjure.perception-action.operator-executor :refer [registered-operator-functions]]
[co.paralleluniverse.pulsar.actors :refer [whereis cast!]]
[narjure.global-atoms :refer [answer-handlers]]))
(defn nars-register-operation
"Register an operation by provid... | null | https://raw.githubusercontent.com/opennars/Narjure/cd5a72e6777fc47271d721fef8362aa2dad664ca/src/narjure/sensorimotor.clj | clojure | (ns narjure.sensorimotor
(:require [narjure.perception-action.operator-executor :refer [registered-operator-functions]]
[co.paralleluniverse.pulsar.actors :refer [whereis cast!]]
[narjure.global-atoms :refer [answer-handlers]]))
(defn nars-register-operation
"Register an operation by provid... | |
bd0f70a547a64bd36ebdfee0320c56080b8ec96f3b5bc8a9f0f791f84ccc96ac | EasyCrypt/easycrypt | ecCoreLib.ml | (* -------------------------------------------------------------------- *)
let s_get = "_.[_]"
let s_set = "_.[_<-_]"
let s_nil = "[]"
let s_cons = "::"
let s_abs = "`|_|"
(* -------------------------------------------------------------------- *)
let i_top = "Top"
let i_self = "Self"
let p_top = EcPath.psymbol i... | null | https://raw.githubusercontent.com/EasyCrypt/easycrypt/56054fd63daac6e26b37efc5572236ba75a2ad1f/src/ecCoreLib.ml | ocaml | --------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
------------------------------------... | let s_get = "_.[_]"
let s_set = "_.[_<-_]"
let s_nil = "[]"
let s_cons = "::"
let s_abs = "`|_|"
let i_top = "Top"
let i_self = "Self"
let p_top = EcPath.psymbol i_top
let i_Pervasive = "Pervasive"
let p_Pervasive = EcPath.pqname p_top i_Pervasive
let _Pervasive = fun x -> EcPath.pqname p_Pervasive x
let base... |
3d63db67d09c80451ed632612cb371271fda22025941124619e9bd67efd38d4c | callum-oakley/advent-of-code | 11.clj | (ns aoc.2015.11
(:require
[aoc.string :as aocstr]
[clojure.test :refer [deftest is]]))
(defn incc [c]
(-> c int inc char))
(defn valid? [password]
(and (some (fn [[a b c]] (and (= b (incc a)) (= c (incc b))))
(partition 3 1 password))
(not-any? #{\i \o \l} password)
(let [runs (... | null | https://raw.githubusercontent.com/callum-oakley/advent-of-code/fa79f6483157e3aeeb43dd8661ca5d308d203933/src/aoc/2015/11.clj | clojure | (ns aoc.2015.11
(:require
[aoc.string :as aocstr]
[clojure.test :refer [deftest is]]))
(defn incc [c]
(-> c int inc char))
(defn valid? [password]
(and (some (fn [[a b c]] (and (= b (incc a)) (= c (incc b))))
(partition 3 1 password))
(not-any? #{\i \o \l} password)
(let [runs (... | |
9260dca125d1e4a5a2aa26964ebc9c7a3ddef62c967a550a285f3e642f36fd08 | lspector/Clojush | solve_boolean.clj | ;; solve_boolean.clj
,
;;
;; Problem inspired by:
(ns clojush.problems.psb2.solve-boolean
(:use clojush.pushgp.pushgp
[clojush pushstate interpreter random util globals]
clojush.instructions.tag
[clojure.math numeric-tower]))
; Atom generators
(def atom-generators
(make-proportional-... | null | https://raw.githubusercontent.com/lspector/Clojush/8f8c6dcb181e675a3f514e6c9e9fc92cf76ac566/src/clojush/problems/psb2/solve_boolean.clj | clojure | solve_boolean.clj
Problem inspired by:
Atom generators
stacks
tags
inputs
constants
A list of data domains for the problem. Each domain is a vector containing
should be used as training and testing cases respectively. Each "set" of
inputs is either a list or a function that, when called, will create a
rand... | ,
(ns clojush.problems.psb2.solve-boolean
(:use clojush.pushgp.pushgp
[clojush pushstate interpreter random util globals]
clojush.instructions.tag
[clojure.math numeric-tower]))
(def atom-generators
(make-proportional-atom-generators
(concat
(tagged-instruction-erc 1000))... |
afe8eea1d46c6bb844a307faf6e14c1c6b486ba558b34a3f31860674369adef9 | takikawa/racket-ppa | struct-type-info.rkt | #lang racket/base
(require "wrap.rkt"
"match.rkt"
"known.rkt"
"import.rkt"
"mutated-state.rkt"
"simple.rkt"
"find-known.rkt"
"lambda.rkt")
(provide (struct-out struct-type-info)
struct-type-info-rest-properties-list-pos
make-struct-type-i... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/src/schemify/struct-type-info.rkt | racket | #f or immutable expression to be quoted
#f or immutable expression to be quoted
an expression
argument expressions after auto-field value
if the parse succeed:
an arity-reduced procedure
The inspector argument needs to be missing or duplicable,
and if it's not known to produce a value other than 'prefab,
the l... | #lang racket/base
(require "wrap.rkt"
"match.rkt"
"known.rkt"
"import.rkt"
"mutated-state.rkt"
"simple.rkt"
"find-known.rkt"
"lambda.rkt")
(provide (struct-out struct-type-info)
struct-type-info-rest-properties-list-pos
make-struct-type-i... |
32f2f6a48bad3f3f088b9aa63187b402b1595370084411fc104b82c9de559396 | hyperledger-archives/fabric-chaintool | clean.clj | Copyright London Stock Exchange Group 2016 All Rights Reserved .
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law... | null | https://raw.githubusercontent.com/hyperledger-archives/fabric-chaintool/57d8f460d0bfdc7cb4ddea0147fea16f15a06258/src/chaintool/subcommands/clean.clj | clojure |
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 ... | Copyright London Stock Exchange Group 2016 All Rights Reserved .
distributed under the License is distributed on an " AS IS " BASIS ,
(ns chaintool.subcommands.clean
(:require [chaintool.config.util :as config.util]
[chaintool.platforms.core :as platforms.core]
[chaintool.platforms.api :as... |
eda88d0b61e543553509b7880c68026b557def76709ab975c8f9d03112068c2a | clojure/core.typed | typed.cljs | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/runtime.jvm/src/cljs/core/typed.cljs | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns cljs.core.typed
"Internal functions for CLJS"
(:refer-clojure :exclude [IFn])
(:require-macros
[clojure.core.typed.bootstrap-cljs :as boot]))
(defn ^:skip-wiki
ann*
"Internal use only. Use ann."
[qsym typesyn check? form]
nil)
(defn ^:skip-wiki
an... |
a8520d74656494b18f7b17e139435c792b9758e1eeaddf2b025db1f8663c5a99 | fare/xcvb | generate-version.lisp | #+xcvb (module (:depends-on ("/asdf" "/xcvb/driver" "/xcvb/version" "specials")))
(in-package :xcvb-hello)
(asdf:find-system :xcvb)
(defparameter *hello-version-path*
(asdf:system-relative-pathname :xcvb "examples/hello/version.lisp"))
(with-open-file (s *hello-version-path* :direction :output
... | null | https://raw.githubusercontent.com/fare/xcvb/460e27bd4cbd4db5e7ddf5b22c2ee455df445258/examples/hello/generate-version.lisp | lisp | #+xcvb (module (:depends-on ("/asdf" "/xcvb/driver" "/xcvb/version" "specials")))
(in-package :xcvb-hello)
(asdf:find-system :xcvb)
(defparameter *hello-version-path*
(asdf:system-relative-pathname :xcvb "examples/hello/version.lisp"))
(with-open-file (s *hello-version-path* :direction :output
... | |
71a59f56c8a87c5b383c84cc571c47a55fb025ba40c482ab6af7baa2307a8fe1 | TrustInSoft/tis-kernel | special_hooks.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_internals/runtime/special_hooks.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 Frama - C.
Copyright ( C ) 2007 - 2015 ... |
9b83d53c8c3c1d2bfbba318279ba02c3058fdd99078335dfa560372b1394c6cc | L7R7/gitlab-ci-build-statuses | Projects.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# OPTIONS_GHC -fno - warn - orphans #
module Ports.Outbound.Gitlab.Projects (initCache, projectsApiToIO, projectsWithoutExcludesApiInTermsOfProjects) where
import Burrito
import Conf... | null | https://raw.githubusercontent.com/L7R7/gitlab-ci-build-statuses/7701ef41dad6a7015703b6e7ec26897f44fa0e6a/src/Ports/Outbound/Gitlab/Projects.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings # | # LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# OPTIONS_GHC -fno - warn - orphans #
module Ports.Outbound.Gitlab.Projects (initCache, projectsApiToIO, projectsWithoutExcludesApiInTermsOfProjects) where
import Burrito
import Config.Config (ApiToken (..), GitlabHost, ProjectCacheTtlSecon... |
cf58939abe852392b34d87bb39f3ec504c6ca39eef2b71953f00456daea2ec44 | kronusaturn/lw2-viewer | components.lisp | (uiop:define-package #:lw2.components
(:use #:cl #:alexandria #:lw2.utils #:lw2.csrf)
(:export
#:standard-component #:prepare-function
#:make-binding-form
#:&without-csrf-check
#:wrap-prepare-code
#:find-component #:delete-component #:define-component #:renderer
#:component-value-bind)
(:uninter... | null | https://raw.githubusercontent.com/kronusaturn/lw2-viewer/f328105e9640be1314d166203c8706f9470054fa/src/components.lisp | lisp | (uiop:define-package #:lw2.components
(:use #:cl #:alexandria #:lw2.utils #:lw2.csrf)
(:export
#:standard-component #:prepare-function
#:make-binding-form
#:&without-csrf-check
#:wrap-prepare-code
#:find-component #:delete-component #:define-component #:renderer
#:component-value-bind)
(:uninter... | |
1e3e297c1c10e40bd55747ce8037cd4ccba86cb139ec36c02be51a1651d0fab8 | re-path/studio | show_function.cljs | (ns repath.studio.reepl.show-function
(:require [clojure.string :as str]
[repath.studio.reepl.helpers :as helpers]))
(def styles
{:function {:color "#00a"}})
(def view (partial helpers/view styles))
(def text (partial helpers/text styles))
(def button (partial helpers/button styles))
(def cljs-fn-pre... | null | https://raw.githubusercontent.com/re-path/studio/0841056ef12689cffb226a99a9dfe58d7f2c4778/src/repath/studio/reepl/show_function.cljs | clojure | (ns repath.studio.reepl.show-function
(:require [clojure.string :as str]
[repath.studio.reepl.helpers :as helpers]))
(def styles
{:function {:color "#00a"}})
(def view (partial helpers/view styles))
(def text (partial helpers/text styles))
(def button (partial helpers/button styles))
(def cljs-fn-pre... | |
d70be7397ced1cae0e8468e50e5a5e6d478aac849a8fb464d0be8b896588ab35 | diagrams/geometry | Located.hs | {-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE StandaloneDeriving #-}
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
------------------------------------------------------------... | null | https://raw.githubusercontent.com/diagrams/geometry/945c8c36b22e71d0c0e4427f23de6614f4e7594a/src/Geometry/Located.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE StandaloneDeriving #
---------------------------------------------------------------------------
|
Module : Geometry.Located
License : BSD-style (see LICENSE)
Maintainer :
\"Located\" things, /i.e./ things with a con... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
Copyright : ( c ) 2013 - 2017 diagrams team ( see LICENSE )
intuitively , @Located a ~ ( a , Point)@. Wrapping a translationally
module Geometry.Located
( Located ... |
b937d0b921585e22c991058a03b752cff705c1297d9cbbb8153a4c9a6baf6a5d | reborg/clojure-pills | subvec.clj | (ns clojure-pills.subvec)
"Clojure Pills - 007 subvec"
;; ============== contract
(subvec [1 2 3 4] 1 3)
(subvec [1 2 3 4] 1)
(def subv (subvec (vector-of :int 1 2 3) 1))
(conj subv \a)
(conj subv nil) ;; !
= = = = = = = = = = = = = = example 1
(defn remove-at [v idx]
(into (subvec v 0 idx)
(subvec v (inc ... | null | https://raw.githubusercontent.com/reborg/clojure-pills/8b407f14bbb3529a70e9a30e480774efbcf9802a/src/clojure_pills/subvec.clj | clojure | ============== contract
!
Straight from reducers.clj | (ns clojure-pills.subvec)
"Clojure Pills - 007 subvec"
(subvec [1 2 3 4] 1 3)
(subvec [1 2 3 4] 1)
(def subv (subvec (vector-of :int 1 2 3) 1))
(conj subv \a)
= = = = = = = = = = = = = = example 1
(defn remove-at [v idx]
(into (subvec v 0 idx)
(subvec v (inc idx) (count v))))
(remove-at [0 1 2 3 4 5] 3)
... |
1769e4899b542ac6cca2d05fae38c3901d6ad59377308767925aeb5e806304a7 | reubenharry/stochastic-memoization | Lib.hs | # LANGUAGE DeriveTraversable , LambdaCase , FlexibleContexts , TypeFamilies , GADTs , TupleSections , NoMonomorphismRestriction #
module Lib where
import Prelude hiding (words, Word)
import Data.List (intersperse)
import Data.Set (Set)
import Data.Maybe (catMaybes, fromMaybe, isJust)
im... | null | https://raw.githubusercontent.com/reubenharry/stochastic-memoization/ce5c9def16adb672f2522066bde08ccddf93b79a/src/Lib.hs | haskell | a type synonym to indicate that the monad is just the identity
helper functions
------------------------------------
progressively more complex examples
------------------------------------
starting category
--------------------------
The full fragment grammar
-------------------------- | # LANGUAGE DeriveTraversable , LambdaCase , FlexibleContexts , TypeFamilies , GADTs , TupleSections , NoMonomorphismRestriction #
module Lib where
import Prelude hiding (words, Word)
import Data.List (intersperse)
import Data.Set (Set)
import Data.Maybe (catMaybes, fromMaybe, isJust)
im... |
fb13611305e808a55d131398902008cc2c8089319be2393830fb1de959c9c728 | JacquesCarette/Drasil | Assumptions.hs | module Drasil.SWHS.Assumptions where --all of this file is exported
import Language.Drasil
import Control.Lens ((^.))
import Language.Drasil.Chunk.Concept.NamedCombinators
import qualified Language.Drasil.NounPhrase.Combinators as NP
import qualified Language.Drasil.Sentence.Combinators as S
import Data.Drasil.Concep... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/a1c22b739c958ae169e8fe4fb2ea2b0a670dc7df/code/drasil-example/swhs/lib/Drasil/SWHS/Assumptions.hs | haskell | all of this file is exported
-----------------------
-----------------------
- Again, list structure is same between all examples.
Can booktabs colored links be used? The box links completely cover nearby
punctuation. |
import Language.Drasil
import Control.Lens ((^.))
import Language.Drasil.Chunk.Concept.NamedCombinators
import qualified Language.Drasil.NounPhrase.Combinators as NP
import qualified Language.Drasil.Sentence.Combinators as S
import Data.Drasil.Concepts.Documentation (system, simulation, model,
problem, assumpDom)
... |
acaaa0835a3340b952d93ba015d452ac17b899a02f3d1e50a3965b5863ffb8d8 | tonyrog/dbus | dbus_connection.erl | %%%---- BEGIN COPYRIGHT -------------------------------------------------------
%%%
Copyright ( C ) 2007 - 2013 , Rogvall Invest AB , < >
%%%
%%% This software is licensed as described in the file COPYRIGHT, which
%%% you should have received as part of this distribution. The terms
%%% are also available at .
%%%
%%... | null | https://raw.githubusercontent.com/tonyrog/dbus/51c318d65ebcd104a2408596d3a7e2cb5c43ed90/src/dbus_connection.erl | erlang | ---- BEGIN COPYRIGHT -------------------------------------------------------
This software is licensed as described in the file COPYRIGHT, which
you should have received as part of this distribution. The terms
are also available at .
You may opt to use, copy, modify, merge, publish, distribute and/or sell
furni... | Copyright ( C ) 2007 - 2013 , Rogvall Invest AB , < >
copies of the Software , and permit persons to whom the Software is
This software is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY
@author < >
Created : 15 Feb 2013 by < >
-module(dbus_connection).
-behaviour(gen_server).
-export([op... |
29f77c0583806c46a64d0735cbe70cdd7754ef80541e8569d0cb60f7d9ddfc6d | keera-studios/keera-hails | HailsArgs.hs | -- |
--
Copyright : ( C ) Keera Studios Ltd , 2013
-- License : BSD3
Maintainer :
module HailsArgs where
-- External
import System.Console.CmdArgs
Internal
import AppDataBasic
This is the - based CLI interface definition
sample :: AppDataBasic
sample = AppDataBasic
{ action = enum [ H... | null | https://raw.githubusercontent.com/keera-studios/keera-hails/bf069e5aafc85a1f55fa119ae45a025a2bd4a3d0/keera-hails/src/HailsArgs.hs | haskell | |
License : BSD3
External | Copyright : ( C ) Keera Studios Ltd , 2013
Maintainer :
module HailsArgs where
import System.Console.CmdArgs
Internal
import AppDataBasic
This is the - based CLI interface definition
sample :: AppDataBasic
sample = AppDataBasic
{ action = enum [ HailsInit
&= ... |
662f5eb8eb3a893805086ed1c2c54272a597ab5923b763ed915f455d1277010c | akabe/ocaml-jupyter | channel_intf.ml | ocaml - jupyter --- An OCaml kernel for Jupyter
Copyright ( c ) 2017
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 limitat... | null | https://raw.githubusercontent.com/akabe/ocaml-jupyter/7ea00fde81a915ee9d86c979f295f4c5dac28db8/src/kernel/channel_intf.ml | ocaml | * Interface for bi-directional communication modules
* [reply ?time ~parent channel content] sends a message including [content]
as a reply of [parent]. | ocaml - jupyter --- An OCaml kernel for Jupyter
Copyright ( c ) 2017
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 limitat... |
0781f5d9e42abbf87dedd7fc3d2cad8c3487ceb56f2768a669c255b7e03e3e96 | tpapp/cl-random | internals.lisp | ;;; -*- Mode:Lisp; Syntax:ANSI-Common-Lisp; -*-
(cl:defpackage #:cl-random.internals
(:use #:cl
#:alexandria
#:let-plus)
(:export
#:internal-float
#:float-vector
#:as-float
#:with-floats
#:as-float-vector
#:as-float-probabilities
#:try
#:maybe-ignore-constant))
(cl:in-packag... | null | https://raw.githubusercontent.com/tpapp/cl-random/5bb65911037f95a4260bd29a594a09df3849f4ea/src/internals.lisp | lisp | -*- Mode:Lisp; Syntax:ANSI-Common-Lisp; -*-
internal representation of floats
Miscellaneous macros | (cl:defpackage #:cl-random.internals
(:use #:cl
#:alexandria
#:let-plus)
(:export
#:internal-float
#:float-vector
#:as-float
#:with-floats
#:as-float-vector
#:as-float-probabilities
#:try
#:maybe-ignore-constant))
(cl:in-package #:cl-random.internals)
(deftype internal-fl... |
e81882f155926db8c0fba6107ecbdcc61f8c376c464f1abde52598890c009ba3 | falsetru/htdp | 25.2.5.scm | (define (larger-items alon threshold) (filter (lambda (x) (> x threshold)) alon))
(define (smaller-items alon threshold) (filter (lambda (x) (< x threshold)) alon))
(require rackunit)
(require rackunit/text-ui)
(define larger-smaller-items-using-lambda-tests
(test-suite
"Test for larger-smaller-items-using-lambd... | null | https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/25/25.2.5.scm | scheme | (define (larger-items alon threshold) (filter (lambda (x) (> x threshold)) alon))
(define (smaller-items alon threshold) (filter (lambda (x) (< x threshold)) alon))
(require rackunit)
(require rackunit/text-ui)
(define larger-smaller-items-using-lambda-tests
(test-suite
"Test for larger-smaller-items-using-lambd... | |
28cc4362c629c0540b1e41d14945e9790a2f64d5bd2a816e5a6a187b476f2133 | mirage/alcotest | cli.mli |
* Copyright ( c ) 2013 - 2016 < >
* Copyright ( c ) 2019 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE S... | null | https://raw.githubusercontent.com/mirage/alcotest/bb3492901dea03c72b4de6b5660852a020283921/src/alcotest-engine/cli.mli | ocaml |
* Copyright ( c ) 2013 - 2016 < >
* Copyright ( c ) 2019 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE S... | |
7d5879ec0894b45f4f7293337e2f75f73aa1dbacb2065ef9d293981936ca23ad | tweag/ormolu | block-arguments.hs | f1 = foo do bar
f2 = foo do
bar
f3 = foo case True of
True -> bar
False -> baz
f4 = foo let a = 3 in b
f5 = foo let a = 3
b = a
in b
f6 = foo if bar
then baz
else not baz
f7 = foo \x -> y
f8 = foo \x ->
y
f9 = foo do { bar } baz
f10 = foo
do { a }
do { b }
... | null | https://raw.githubusercontent.com/tweag/ormolu/46a3142fce77b3e7a2788820e2bc841e79040da7/data/examples/declaration/value/function/block-arguments.hs | haskell | f1 = foo do bar
f2 = foo do
bar
f3 = foo case True of
True -> bar
False -> baz
f4 = foo let a = 3 in b
f5 = foo let a = 3
b = a
in b
f6 = foo if bar
then baz
else not baz
f7 = foo \x -> y
f8 = foo \x ->
y
f9 = foo do { bar } baz
f10 = foo
do { a }
do { b }
... | |
57d5f8a39b87ac95ea515ae035a2b2ede5a3d2a662ac43566682ad528dd471ae | inflex-io/early | Early.hs | # LANGUAGE LambdaCase #
module Data.Early
( FoldableEarly(..)
, TraversableEarly(..)
) where
import Control.Early
import Data.Foldable
import Data.Sequence (Seq)
import qualified Data.Sequence as Seq
import Data.Vector (Vector)
import qualified Data.Vector as V
class Fol... | null | https://raw.githubusercontent.com/inflex-io/early/736c0f02b75d0251bfb5fa9cfc5554c5dda139ca/src/Data/Early.hs | haskell | # LANGUAGE LambdaCase #
module Data.Early
( FoldableEarly(..)
, TraversableEarly(..)
) where
import Control.Early
import Data.Foldable
import Data.Sequence (Seq)
import qualified Data.Sequence as Seq
import Data.Vector (Vector)
import qualified Data.Vector as V
class Fol... | |
12bd4de5ec8c4c25ed1aec8e5d6ccd786ad3e97912013007c5a49be810ba6b54 | silverpond/hat | controllers.clj | (ns hat.controllers
(:require [hat.resources :as r]
[liberator.representation :refer [render-map-generic]]
[liberator.core :refer [resource]]
[hat.routes :refer [router] :as routes]
[ring.middleware.resource :refer [wrap-resource]]
... | null | https://raw.githubusercontent.com/silverpond/hat/4e4a5dd89cac29c0a0cf68e4f02b76523e096276/src/hat/controllers.clj | clojure | (ns hat.controllers
(:require [hat.resources :as r]
[liberator.representation :refer [render-map-generic]]
[liberator.core :refer [resource]]
[hat.routes :refer [router] :as routes]
[ring.middleware.resource :refer [wrap-resource]]
... | |
02a6093dd8b44c8c10cc0bdf5efa1d8542ea0a0c44996d50809a3a7a1aec8750 | fugue/fregot | Value.hs | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Inferring already - evaluated values .
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimenta... | null | https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Fregot/Types/Value.hs | haskell | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Inferring already - evaluated values .
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimenta... | |
71255742b2724d1ee206cc3ac4de5f3d0cdd53a4e825c912303971618a56aa89 | janestreet/core_extended | parse_state.mli | open Core
(** Row up to the error, and the field with the error up to the point of failure *)
exception Bad_csv_formatting of string list * string
* At the lowest level , we model csv parsing as a fold over string arrays , one array
per row . It is up to you to interpret the header row .
per row. It is up t... | null | https://raw.githubusercontent.com/janestreet/core_extended/5eb206493891be4610ed188c0ac44006a5b72061/delimited_kernel/src/parse_state.mli | ocaml | * Row up to the error, and the field with the error up to the point of failure
* At any moment, the result of folding over all complete rows seen so far.
* Can be used to set or clear the current [acc]
* [f ~line_number init row] should take the previous accumulator [init]
and the next complete row [row], and ... | open Core
exception Bad_csv_formatting of string list * string
* At the lowest level , we model csv parsing as a fold over string arrays , one array
per row . It is up to you to interpret the header row .
per row. It is up to you to interpret the header row. *)
type 'a t
val current_line_number : 'a t -> ... |
46cf886199a5f2266eb8968d4794c0247179dd818e922688dfbaf50ca8580538 | camllight/camllight | command_line_interpreter.ml | (************************ Reading and executing commands ***************)
#open "format";;
#open "globals";;
#open "misc";;
#open "lambda";;
#open "unix";;
#open "debugger_config";;
#open "types";;
#open "primitives";;
#open "unix_tools";;
#open "parser";;
#open "parser_aux";;
#open "lexer";;
#open "input_handling";;
... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/debugger/command_line_interpreter.ml | ocaml | *********************** Reading and executing commands **************
* Instructions, variables and infos lists. *
* Utilities. *
* Instructions. *
break
break PC
break FUNCTION
break @ [MODULE] LINE [COL]
break @ [MODULE] # POSITION
* Variables. *
* Infos. *
* Initialization. *
function name, priority, func... |
#open "format";;
#open "globals";;
#open "misc";;
#open "lambda";;
#open "unix";;
#open "debugger_config";;
#open "types";;
#open "primitives";;
#open "unix_tools";;
#open "parser";;
#open "parser_aux";;
#open "lexer";;
#open "input_handling";;
#open "communication";;
#open "program_loading";;
#open "program_managemen... |
073625c0f0cdc7027ae203834a4ea02f1c8668d1d39b6d6b6616e6fad9171c78 | fukamachi/lack | component.lisp | (in-package :cl-user)
(defpackage t.lack.component
(:use :cl
:lack.component
:lack.test
:prove))
(in-package :t.lack.component)
(plan 4)
(defclass myapp (lack-component) ())
(defmethod call ((comp myapp) env)
(declare (ignore env))
'(200
(:content-type "text/plain")
("ok from mya... | null | https://raw.githubusercontent.com/fukamachi/lack/1f155216aeea36291b325c519f041e469262a399/t/component.lisp | lisp | (in-package :cl-user)
(defpackage t.lack.component
(:use :cl
:lack.component
:lack.test
:prove))
(in-package :t.lack.component)
(plan 4)
(defclass myapp (lack-component) ())
(defmethod call ((comp myapp) env)
(declare (ignore env))
'(200
(:content-type "text/plain")
("ok from mya... | |
39c685f4d387d3d9dfc59fb3443f4b07d2e140e0ebab9a4f4e3981d93943043d | casperschipper/ocaml-cisp | cisp5.ml | open Cisp
open Midi
open Seq
open Reader.Ops
simple mod of controller 1 onto pitch
let sr = ref 44100.0
let pitchControl =
MidiState.getControlR (MidiCh 0) (MidiCtrl 0)
>>= (fun (MidiVal ctrl1) ->
MidiState.getControlR (MidiCh 0) (MidiCtrl 1) >>=
(fun (MidiVal ctrl2) ->
MidiState.triggerR 30... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/pianotrance/cisp5.ml | ocaml | a seq of (x,y) make it (seq x, seq y)
this maps midi input msg to an output msg (raw midi)
take msg, make it a state
run a bunch of readers to extract properties
the result is then used to contruct streams
turn back into raw midi | open Cisp
open Midi
open Seq
open Reader.Ops
simple mod of controller 1 onto pitch
let sr = ref 44100.0
let pitchControl =
MidiState.getControlR (MidiCh 0) (MidiCtrl 0)
>>= (fun (MidiVal ctrl1) ->
MidiState.getControlR (MidiCh 0) (MidiCtrl 1) >>=
(fun (MidiVal ctrl2) ->
MidiState.triggerR 30... |
8f77dcd97e7d7a59bbfe427dd2944663360e9f30b53cf2325f984cfb4affc1bc | everpeace/programming-erlang-code | extract.erl | -module(extract).
-export([attribute/2]).
attribute(File, Key) ->
case beam_lib:chunks(File,[attributes]) of
{ok, {_Module, [{attributes,L}]}} ->
case lookup(Key, L) of
{ok, Val} ->
Val;
error ->
exit(badAttribute)
end;
_ ->
exit(badFile)
end.
lookup(Key, [{Key,Val}|_]) -> ... | null | https://raw.githubusercontent.com/everpeace/programming-erlang-code/8ef31aa13d15b41754dda225c50284915c29cb48/code/extract.erl | erlang | -module(extract).
-export([attribute/2]).
attribute(File, Key) ->
case beam_lib:chunks(File,[attributes]) of
{ok, {_Module, [{attributes,L}]}} ->
case lookup(Key, L) of
{ok, Val} ->
Val;
error ->
exit(badAttribute)
end;
_ ->
exit(badFile)
end.
lookup(Key, [{Key,Val}|_]) -> ... | |
31f622f4f62be2cf2c1f0b013805731af8196631bf41e1d2654ff2b5b7939ad3 | rabbitmq/rabbitmq-common | rabbit_data_coercion.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_data_coercion).
-export([to_binar... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-common/67c4397ffa9f51d87f994aa4db4a68e8e95326ab/src/rabbit_data_coercion.erl | erlang | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_data_coercion).
-export([to_binary/1, t... | |
e574182c52ef2c6827081318d4ea7bc2ff1619c20273802a93eb5c5896c853b1 | CBMM/tagging | DirectoryToStimSet.hs | # LANGUAGE RecordWildCards #
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Main where
------------------------------------------------------------------------------
import Control.Concurrent (threadDelay)
import Co... | null | https://raw.githubusercontent.com/CBMM/tagging/15f257394f3dda5baf6db0581a52d9c9f99e2abe/tagging-server/exec/DirectoryToStimSet.hs | haskell | # LANGUAGE QuasiQuotes #
# LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
import Server.Database
----------------------------------------------------------------------... | # LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Main where
import Control.Concurrent (threadDelay)
import Control.Lens ((&),(?~),(^.))
import Control.Monad (filterM, when)
import Control.Monad... |
f89401c6ae1a3a3c8be940fae6a1317295288dc5f42198dd96f1eee41b912619 | rmloveland/scheme48-0.53 | list-interface.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
; ,open interfaces packages meta-types sort syntactic
; ,config scheme
(define (list-interface thing)
(cond ((structure? thing)
(list-interface-1 (structure-interface thing)
(lambda (name)
(let ((x (structure-lookup thing name #t)))
... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/env/list-interface.scm | scheme | ,open interfaces packages meta-types sort syntactic
,config scheme
compound signatures...
( ...)
?
e.g. (variable #{Type :value}) | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
(define (list-interface thing)
(cond ((structure? thing)
(list-interface-1 (structure-interface thing)
(lambda (name)
(let ((x (structure-lookup thing name #t)))
(if (binding? x)
(binding-type x)
#f)))))
((interf... |
e37e8f38da0f44114a06a091a94d56eaa7436502fa37fe5e41acbd091bc5e768 | arcfide/oleg | serializer.scm | SXML serializer into XML and HTML
;
; Partial conformance with
; [1] XSLT 2.0 and XQuery 1.0 Serialization
W3C Candidate Recommendation 3 November 2005
; -xslt-xquery-serialization-20051103/
;
; This software is in Public Domain.
IT IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND .
;
; Please send bug report... | null | https://raw.githubusercontent.com/arcfide/oleg/c6826870436925fd4c873c01d7fcc24a7a7f95dc/sxml-tools/serializer.scm | scheme |
Partial conformance with
[1] XSLT 2.0 and XQuery 1.0 Serialization
-xslt-xquery-serialization-20051103/
This software is in Public Domain.
Please send bug reports and comments to:
Dmitry Lizorkin
short for "serialization"
Requires: function `filter' from SRFI-1
syntax `cond-expand' from SRFI... | SXML serializer into XML and HTML
W3C Candidate Recommendation 3 November 2005
IT IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND .
Prefix for global identifiers in this module is ` srl : '
In particular , for PLT , ` filter ' can be acquired as follows :
( srl : map - append func lst ) = ( apply a... |
53d64da625f515f3eeede85f5e4ac24f2a2db213d968cc395543e535daf643a1 | puppetlabs/clj-i18n | locales.clj | ;; This file can go anywhere on the class path
;; It is used to add additional locales for testing
;; to the ones that are available for 'normal' use
{
we use Esperanto for testing
:locales #{"eo"}
;; this should be the same as in resources/locales.clj
:package "puppetlabs.i18n"
}
| null | https://raw.githubusercontent.com/puppetlabs/clj-i18n/bcf44b7bc5ba301502558a5e5fa7a4ba78cdfc6e/dev-resources/locales.clj | clojure | This file can go anywhere on the class path
It is used to add additional locales for testing
to the ones that are available for 'normal' use
this should be the same as in resources/locales.clj | {
we use Esperanto for testing
:locales #{"eo"}
:package "puppetlabs.i18n"
}
|
8f062a2b527b293907d2e03cd26dca4c4a55e4cb2c93ea0a03165c31e2f24bcc | dmiller/clr.core.async | async_test.clj | (ns clojure.core.async-test
(:refer-clojure :exclude [map into reduce merge take partition partition-by])
(:require [clojure.core.async :refer :all :as a]
[clojure.test :refer :all])
DM : Added
(defn default-chan []
(chan 1))
(defn drain [c]
(close! c)
(dorun (take-while #(not (nil... | null | https://raw.githubusercontent.com/dmiller/clr.core.async/bb861242531cdd6ba727283bf3ddee73db1e1c2d/test/clojure/clojure/core/async_test.clj | clojure | make sure the channel unlocks
make sure the channel unlocks
fill up the channel
enqueue a put
make room in the buffer
Must provide buffers for channels else the tests won't complete
merge uses alt, so results can be in any order, we're using
frequencies as a way to make sure we get the right result.
| (ns clojure.core.async-test
(:refer-clojure :exclude [map into reduce merge take partition partition-by])
(:require [clojure.core.async :refer :all :as a]
[clojure.test :refer :all])
DM : Added
(defn default-chan []
(chan 1))
(defn drain [c]
(close! c)
(dorun (take-while #(not (nil... |
8526bc0b3ead062cda6ac4da1a468195f9f88dc4db90a1ca8579b0577de1a4ee | yetibot/yetibot | info.clj | (ns yetibot.commands.info
(:require
[yetibot.core.hooks :refer [cmd-hook]]
[yetibot.core.util.http :refer [get-json encode]]))
(def endpoint "=")
(defn info
"info <topic> # retrieve info about <topic> from DuckDuckGo"
[{topic :match}]
{:yb/cat #{:info}}
(let [json (get-json (str endpoint (encode top... | null | https://raw.githubusercontent.com/yetibot/yetibot/2fb5c1182b1a53ab0e433d6bab2775ebd43367de/src/yetibot/commands/info.clj | clojure | (ns yetibot.commands.info
(:require
[yetibot.core.hooks :refer [cmd-hook]]
[yetibot.core.util.http :refer [get-json encode]]))
(def endpoint "=")
(defn info
"info <topic> # retrieve info about <topic> from DuckDuckGo"
[{topic :match}]
{:yb/cat #{:info}}
(let [json (get-json (str endpoint (encode top... | |
8f866812cef70ee0069f7253b0998a82950abc54bad0809cf90c16c64faa87b2 | Deducteam/zenon_modulo | extension.ml | Copyright 2004 INRIA
Version.add "$Id$";;
open Mlproof;;
open Printf;;
type translator =
(Expr.expr -> Expr.expr) ->
Mlproof.proof -> (Llproof.prooftree * Expr.expr list) array ->
Llproof.prooftree * Expr.expr list
;;
type t = {
name : string;
newnodes :
Expr.expr -> int -> (Expr.expr * Expr.... | null | https://raw.githubusercontent.com/Deducteam/zenon_modulo/9534fbdca0d009a513cb40d9a5a2a98329835c63/extension.ml | ocaml | Copyright 2004 INRIA
Version.add "$Id$";;
open Mlproof;;
open Printf;;
type translator =
(Expr.expr -> Expr.expr) ->
Mlproof.proof -> (Llproof.prooftree * Expr.expr list) array ->
Llproof.prooftree * Expr.expr list
;;
type t = {
name : string;
newnodes :
Expr.expr -> int -> (Expr.expr * Expr.... | |
51d599991e803773eec9ae7a6711e510b6df483b3dc63c90df16d297c301e5bd | grin-compiler/ghc-wpc-sample-programs | Fail.hs | | A pure MonadFail .
# LANGUAGE GeneralizedNewtypeDeriving #
module Agda.Utils.Fail where
import Control.Monad.Fail
newtype Fail a = Fail { runFail :: Either String a }
deriving (Functor, Applicative, Monad)
instance MonadFail Fail where
fail = Fail . Left
runFail_ :: Fail a -> a
runFail_ = either error id . ... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/Utils/Fail.hs | haskell | | A pure MonadFail .
# LANGUAGE GeneralizedNewtypeDeriving #
module Agda.Utils.Fail where
import Control.Monad.Fail
newtype Fail a = Fail { runFail :: Either String a }
deriving (Functor, Applicative, Monad)
instance MonadFail Fail where
fail = Fail . Left
runFail_ :: Fail a -> a
runFail_ = either error id . ... | |
0c6335129f2fca2ecb39b2fa33457131be08f8d073bf068ab09d9cbd796a9edc | larcenists/larceny | ctak.scm | CTAK -- A version of the TAK procedure that uses continuations .
(define (ctak x y z)
(call-with-current-continuation
(lambda (k) (ctak-aux k x y z))))
(define (ctak-aux k x y z)
(if (not (< y x))
(k z)
(call-with-current-continuation
(lambda (k)
(ctak-aux
k
(c... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/Stress/src/ctak.scm | scheme | CTAK -- A version of the TAK procedure that uses continuations .
(define (ctak x y z)
(call-with-current-continuation
(lambda (k) (ctak-aux k x y z))))
(define (ctak-aux k x y z)
(if (not (< y x))
(k z)
(call-with-current-continuation
(lambda (k)
(ctak-aux
k
(c... | |
18147a07d24ed07c0c1ed1cf4528777df31eb26e39cc80e6ea4cb88b1e54b3d9 | babashka/babashka | native.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns helins.binf.test.native
""
{:author "Adam Helinski"}
(:require [clojure.test :as t]
[helins.binf.native :as bin... | null | https://raw.githubusercontent.com/babashka/babashka/3dfc15f5a40efaec07cba991892c1207a352fab4/test-resources/lib_tests/helins/binf/test/native.clj | clojure | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns helins.binf.test.native
""
{:author "Adam Helinski"}
(:require [clojure.test :as t]
[helins.binf.native :as bin... | |
cfdfd912748d0d648b095c752d73fa25e247e92f915ba57be16bc8f444d01578 | shiguredo/swidden | spam_user.erl | -module(spam_user).
-export([start/0]).
-export([get_user/1, create_user/1, update_user/1, delete_user/1]).
-define(TABLE, spam_user_table).
start() ->
_Tid = ets:new(?TABLE, [set, public, named_table]),
ok.
get_user(#{<<"username">> := Username}) ->
case ets:lookup(?TABLE, Username) of
[] ->
... | null | https://raw.githubusercontent.com/shiguredo/swidden/49b9f70a2e17034e57d2088cc4a31e68c21fdb5b/examples/spam/src/spam_user.erl | erlang | proplists を戻せば JSON で返ります
spam_user_with_group 対応
spam_user_with_group 対応 | -module(spam_user).
-export([start/0]).
-export([get_user/1, create_user/1, update_user/1, delete_user/1]).
-define(TABLE, spam_user_table).
start() ->
_Tid = ets:new(?TABLE, [set, public, named_table]),
ok.
get_user(#{<<"username">> := Username}) ->
case ets:lookup(?TABLE, Username) of
[] ->
... |
30151fff9827e54a030de61048a9d1ebb34f9240ec9664ee5c49751701526eb6 | SamB/coq | univ.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/kernel/univ.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i $Id$ i
Universes.
image of Set ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
type universe
The univ... |
cca2c6e9ec80ba42392250de72562f5eae98186af38d6b2dbf8509510b67089d | stil4m/project-typo | transitions.cljs | (ns ui.channels.transitions)
(defn enrich-channel
[channel]
(.log js/console "Enrich")
(.log js/console (str channel))
(assoc channel :room (get channel :room true)
:unread 0
:queue []
:messages []))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Created Channel
;;;;;;;... | null | https://raw.githubusercontent.com/stil4m/project-typo/4e343934175f429c8b7870814d569f776203d461/client/ui_src/ui/channels/transitions.cljs | clojure |
Joined Channel
Setup Channels
Leave channel
Handle received message
| (ns ui.channels.transitions)
(defn enrich-channel
[channel]
(.log js/console "Enrich")
(.log js/console (str channel))
(assoc channel :room (get channel :room true)
:unread 0
:queue []
:messages []))
Created Channel
(defn add-created-channel
[db [created... |
d489cbd54e9755c7246a204081fc4e4217711ac79ff0470349de6b64d15320b9 | mbj/stratosphere | ParquetSerDeProperty.hs | module Stratosphere.KinesisFirehose.DeliveryStream.ParquetSerDeProperty (
ParquetSerDeProperty(..), mkParquetSerDeProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Valu... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/kinesisfirehose/gen/Stratosphere/KinesisFirehose/DeliveryStream/ParquetSerDeProperty.hs | haskell | module Stratosphere.KinesisFirehose.DeliveryStream.ParquetSerDeProperty (
ParquetSerDeProperty(..), mkParquetSerDeProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Valu... | |
45a546ee62eceb978cd0cea43a87cc461e23f4a1df8e8408e446edb0bc4fda77 | shop-planner/shop3 | p18.lisp |
(IN-PACKAGE :SHOP-USER)
(DEFPROBLEM STRIPS-SAT-X-1
((SATELLITE SATELLITE0) (INSTRUMENT INSTRUMENT0)
(INSTRUMENT INSTRUMENT1) (INSTRUMENT INSTRUMENT2)
(SATELLITE SATELLITE1) (INSTRUMENT INSTRUMENT3)
(INSTRUMENT INSTRUMENT4) (INSTRUMENT INSTRUMENT5)
(INSTRUMENT INSTRUMENT6) (SATELLITE SATELLITE2)
(INSTRUMENT... | null | https://raw.githubusercontent.com/shop-planner/shop3/ba429cf91a575e88f28b7f0e89065de7b4d666a6/shop3/examples/satellite/strips/p18.lisp | lisp |
(IN-PACKAGE :SHOP-USER)
(DEFPROBLEM STRIPS-SAT-X-1
((SATELLITE SATELLITE0) (INSTRUMENT INSTRUMENT0)
(INSTRUMENT INSTRUMENT1) (INSTRUMENT INSTRUMENT2)
(SATELLITE SATELLITE1) (INSTRUMENT INSTRUMENT3)
(INSTRUMENT INSTRUMENT4) (INSTRUMENT INSTRUMENT5)
(INSTRUMENT INSTRUMENT6) (SATELLITE SATELLITE2)
(INSTRUMENT... | |
5b3090be913d7c0389f32f911ac304f8382621b4cf0834c8007a9c5757c47212 | dizengrong/erlang_game | npc_fsm.erl | @author dzR < >
%% @doc npc有限状态机模块,处理npc的各种状态逻辑
-module (npc_fsm).
-include("map.hrl").
-include("npc.hrl").
-include("log.hrl").
-include("common.hrl").
-export ([main_loop/1]).
main_loop(Tick) ->
_ = [fsm(NpcId, Tick) || NpcId <- npc_dict:get_all_npc_id_list()],
ok.
fsm(NpcId, Tick) ->
try
NpcRec = npc_di... | null | https://raw.githubusercontent.com/dizengrong/erlang_game/4598f97daa9ca5eecff292ac401dd8f903eea867/gerl/src/map_srv/npc_fsm.erl | erlang | @doc npc有限状态机模块,处理npc的各种状态逻辑
@doc 判断是否准备好可以开始行动了
@doc 根据状态执行逻辑
@doc 第一次出生后执行的状态逻辑
@doc 空闲时执行的状态逻辑
@doc npc移动一条路径,Path为路径
先移动
todo:根据npc的移动速度做延迟check | @author dzR < >
-module (npc_fsm).
-include("map.hrl").
-include("npc.hrl").
-include("log.hrl").
-include("common.hrl").
-export ([main_loop/1]).
main_loop(Tick) ->
_ = [fsm(NpcId, Tick) || NpcId <- npc_dict:get_all_npc_id_list()],
ok.
fsm(NpcId, Tick) ->
try
NpcRec = npc_dict:get_npc_rec(NpcId),
?_IF(is... |
677060526b7cd4c813146ee1d5f6923116f52caae357bd536680740b3b3aa976 | jberryman/chan-benchmarks | RetryExperiment.hs | module Main
where
import Control.Concurrent
import Control.Concurrent.STM
import Control.Concurrent.STM.TSem
import Control.Monad
import System.IO
import Debug.Trace
main = do
hSetBuffering stdout NoBuffering
noMansLand <- replicateM 998 $ newTVarIO 0
t0 <- newTVarIO (1::Int)
t999 <- newTVarIO (-... | null | https://raw.githubusercontent.com/jberryman/chan-benchmarks/a59fd96889457987452aa4fe9b7c5d658aea67a6/RetryExperiment.hs | haskell | need enough time here for nestedOrElseMap thread above to move past t0
that's not really working...
CONSIDER:
The behavior we see ensures that all branches of orElse see the same view of
the same variables, but is overzealous! It should do validation for each
subtransaction by only checking oldest parent read of... | module Main
where
import Control.Concurrent
import Control.Concurrent.STM
import Control.Concurrent.STM.TSem
import Control.Monad
import System.IO
import Debug.Trace
main = do
hSetBuffering stdout NoBuffering
noMansLand <- replicateM 998 $ newTVarIO 0
t0 <- newTVarIO (1::Int)
t999 <- newTVarIO (-... |
2dd1c2d9bee1e5c9638736fef6ae338697c20ceafcfe42368b8e579328027726 | tjammer/schmu | parse.ml | open Lexing
open Schmulang
module E = MenhirLib.ErrorReports
module L = MenhirLib.LexerUtil
module I = UnitActionsParser.MenhirInterpreter
let pp_position lexbuf file =
let pp = Pp_loc.(pp ~max_lines:5 ~input:(Input.file file)) in
let pos = lexbuf.lex_curr_p in
let pos =
Printf.sprintf "%d:%d" pos.pos_lnum (... | null | https://raw.githubusercontent.com/tjammer/schmu/dd25e308b7c22cccf09e825eb8ca660e4ccdc8e6/bin/parse.ml | ocaml | The index is out of range. This should not happen if [$i]
keywords are correctly inside the syntax error message
database. The integer [i] should always be a valid offset
into the known suffix of the stack.
[fail text buffer checkpoint] is invoked when parser has encountered a
syntax er... | open Lexing
open Schmulang
module E = MenhirLib.ErrorReports
module L = MenhirLib.LexerUtil
module I = UnitActionsParser.MenhirInterpreter
let pp_position lexbuf file =
let pp = Pp_loc.(pp ~max_lines:5 ~input:(Input.file file)) in
let pos = lexbuf.lex_curr_p in
let pos =
Printf.sprintf "%d:%d" pos.pos_lnum (... |
b43d7fdc9b4241da8725333cb4b548fcd3a5e79fdf78dbedda38549b33b6f33f | gigamonkey/monkeylib-prose-diff | utilities.lisp | (in-package :com.gigamonkeys.prose-diff)
;;; Bits of utility code that perhaps should be moved into
;;; com.gigamonkeys.utilities or replaced with calls to equivalent
;;; bits o fsome standard utility library.
(defun maximum (list &key (key #'identity))
(when list
(destructuring-bind (first . rest) list
(... | null | https://raw.githubusercontent.com/gigamonkey/monkeylib-prose-diff/9e393807671ef54b1c9b47f570a93267ac85b62a/utilities.lisp | lisp | Bits of utility code that perhaps should be moved into
com.gigamonkeys.utilities or replaced with calls to equivalent
bits o fsome standard utility library. | (in-package :com.gigamonkeys.prose-diff)
(defun maximum (list &key (key #'identity))
(when list
(destructuring-bind (first . rest) list
(loop with best-score = (funcall key first)
with best = first
for x in rest
for score = (funcall key x) do
(when (> score best-score... |
ebae4c9e8caa42b2a72d5ddab60bc1fa180d55847d0ad2ae2ea8e2bd5360c0f9 | haskus/haskus-system | Diagrams.hs | # LANGUAGE FlexibleContexts #
-- | Diagrams utilities (specialized for the rasterific backend)
module Haskus.System.Graphics.Diagrams
( rasterizeDiagram
, VDiagram
, VDiagram'
, module Diagrams
, module Diagrams.Prelude
, text'
, text
)
where
TODO
-- We might use Diagrams queries to handle m... | null | https://raw.githubusercontent.com/haskus/haskus-system/38b3a363c26bc4d82e3493d8638d46bc35678616/haskus-system/src/lib/Haskus/System/Graphics/Diagrams.hs | haskell | | Diagrams utilities (specialized for the rasterific backend)
We might use Diagrams queries to handle mouse clicks, etc.
-04-30-GTK-coordinates.html
| Render a diagram into an image that can be displayed on a framebuffer
of the text.
| Create a primitive text diagram from the given string, with baseline | # LANGUAGE FlexibleContexts #
module Haskus.System.Graphics.Diagrams
( rasterizeDiagram
, VDiagram
, VDiagram'
, module Diagrams
, module Diagrams.Prelude
, text'
, text
)
where
TODO
import Data.Typeable
import Diagrams.Prelude hiding ((|>),(<|),text)
import Diagrams hiding (text)
import Di... |
eb5ba44fcd8170fdfb135556895c22e9087a17867dbd3c61af1b50f56dd1fccc | fp-alice/dante | dev.cljs | (ns ^:figwheel-no-load dante.dev
(:require
[dante.core :as core]
[devtools.core :as devtools]))
(devtools/install!)
(enable-console-print!)
(core/init!)
| null | https://raw.githubusercontent.com/fp-alice/dante/3f5eb64fddbee7c2b0ae94282d30aa62f68e61ec/env/dev/cljs/dante/dev.cljs | clojure | (ns ^:figwheel-no-load dante.dev
(:require
[dante.core :as core]
[devtools.core :as devtools]))
(devtools/install!)
(enable-console-print!)
(core/init!)
| |
df8834f1b5f622db043b0dd174a2f6278aa938e00eaba20b7e91ecc45538b955 | lk-geimfari/secrets.clj | project.clj | (defproject likid_geimfari/secrets "2.1.1"
:description "A Clojure library designed to generate secure random numbers for managing secrets"
:scm {:name "git"
:url "-geimfari/secrets.clj"}
:url "-geimfari/secrets.clj"
:license {:name "MIT License"}
:plugins [[lein-cljfmt "0.6.8"]
[lein-clov... | null | https://raw.githubusercontent.com/lk-geimfari/secrets.clj/1d20ce839707e5fd7d48dd5d45fac36092b8556d/project.clj | clojure | (defproject likid_geimfari/secrets "2.1.1"
:description "A Clojure library designed to generate secure random numbers for managing secrets"
:scm {:name "git"
:url "-geimfari/secrets.clj"}
:url "-geimfari/secrets.clj"
:license {:name "MIT License"}
:plugins [[lein-cljfmt "0.6.8"]
[lein-clov... | |
6fc06246cdb16263ba4b8d66b99f1c73fe262c763860ef4638a5d94b7e50e1c8 | isovector/thinking-with-types | HKD.hs | # LANGUAGE TypeFamilies #
module HKD where
import GHC.Generics
import Data.Functor.Identity (Identity (..))
import Data.Kind (Type)
type family HKD (f :: Type -> Type)
(a :: Type) :: Type where
HKD Identity a = a
HKD f a = f a
data Foo f = Foo
{ bar :: HKD f Int
}
# eqInstFoo
deri... | null | https://raw.githubusercontent.com/isovector/thinking-with-types/481bbb9fc02ecf11230cce7097e0ca4e04516b0d/code/HKD.hs | haskell | # gflayK1
# gflayU1
# gflayV1
# gflayTimes
# gflayPlus
# gflayM1 | # LANGUAGE TypeFamilies #
module HKD where
import GHC.Generics
import Data.Functor.Identity (Identity (..))
import Data.Kind (Type)
type family HKD (f :: Type -> Type)
(a :: Type) :: Type where
HKD Identity a = a
HKD f a = f a
data Foo f = Foo
{ bar :: HKD f Int
}
# eqInstFoo
deri... |
5842d37ddcd70916a8f30512613f2fb453584e8e9b5f96b5996855310766f931 | timjb/halma | View.hs | {-# LANGUAGE OverloadedStrings #-}
module Game.Halma.TelegramBot.View
( module Game.Halma.TelegramBot.View.DrawBoard
, module Game.Halma.TelegramBot.View.I18n
, module Game.Halma.TelegramBot.View.Pretty
) where
import Game.Halma.TelegramBot.Model
import Game.Halma.TelegramBot.View.DrawBoard
import Game.Halma.... | null | https://raw.githubusercontent.com/timjb/halma/0267d636dbed0de03d2d6527ca35458637a0021c/halma-telegram-bot/src/Game/Halma/TelegramBot/View.hs | haskell | # LANGUAGE OverloadedStrings # |
module Game.Halma.TelegramBot.View
( module Game.Halma.TelegramBot.View.DrawBoard
, module Game.Halma.TelegramBot.View.I18n
, module Game.Halma.TelegramBot.View.Pretty
) where
import Game.Halma.TelegramBot.Model
import Game.Halma.TelegramBot.View.DrawBoard
import Game.Halma.TelegramBot.View.I18n
import Game.H... |
aac156be9cb7a93d854a8d700a263e03a11fdd3bd0a9926ffe658af5f82aa4bb | appleshan/cl-http | control.lisp | -*- Syntax : Ansi - Common - Lisp ; Package : CL - USER ; Base : 10 ; Mode : lisp -*-
Control Browser via AppleEvents moved into the server system 8/25/97 -- JCMa .
(load "http:mcl;server;control.lisp")
| null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/mcl/contrib/mtravers/browsercontrol/control.lisp | lisp | Package : CL - USER ; Base : 10 ; Mode : lisp -*- |
Control Browser via AppleEvents moved into the server system 8/25/97 -- JCMa .
(load "http:mcl;server;control.lisp")
|
8a7e3b239b8df3a8833854d0f3fcae4d4cd71c96c6d455cd63d53b28b0a519c4 | SKA-ScienceDataProcessor/RC | Types.hs | {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHask... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS5/dna/core/DNA/Interpreter/Types.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric #
# LANGUAGE RankNTypes #
# LANGUAGE TemplateHaskell #
# OPTIONS_HADDOCK hide #
| Data types for interpretation of DNA DSL using cloud haskell
--------------------------------------------------------------
Extra f... | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# OPTIONS_GHC -fno - warn - missing - signatures #
module DNA.Interpreter.Types where
import Control.Monad.Except
import Control.Monad.Reader
import Control... |
f1c43bf985beb7ea2c049d0b59db746ab6376b6e22710667a3a746eda813d7e2 | starburstdata/metabase-driver | starburst.clj | ;;
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
distributed under the License is distributed on... | null | https://raw.githubusercontent.com/starburstdata/metabase-driver/69b7f411f5b076efe78e5d564bbc4fc4a1899560/drivers/starburst/test/metabase/test/data/starburst.clj | clojure |
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 permi... |
distributed under the License is distributed on an " AS IS " BASIS ,
(ns metabase.test.data.starburst
"Starburst driver test extensions."
(:require [clojure.string :as str]
[metabase.config :as config]
[metabase.connection-pool :as connection-pool]
[metabase.driver :as driver... |
ddfb16d8787d55cd7f9c7fdfcf526726895e2722041625861ef41387361e7f10 | lspitzner/brittany | Test452.hs | -- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
module Main
( main
, test1
, test2
, test3
, test4
, test5
, test6
, test7
, test8
, test9
) where
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test452.hs | haskell | brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } | module Main
( main
, test1
, test2
, test3
, test4
, test5
, test6
, test7
, test8
, test9
) where
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.