_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 |
|---|---|---|---|---|---|---|---|---|
4e307f0de705f59cc5985764e21b2a944c3c681ebabfbb892d1d106ff548fe74 | oreillymedia/etudes-for-erlang | powers.erl | %% @author J D Eisenberg <>
%% @doc Functions for raising a number to an integer power
and finding the Nth root of a number using Newton 's method .
2013 J D Eisenberg
%% @version 0.1
-module(powers).
-export([raise/2]).
@doc Raise a number X to an integer power N.
Any number to the power 0 equals 1 .
Any ... | null | https://raw.githubusercontent.com/oreillymedia/etudes-for-erlang/07200372503a8819f9fcc2856f8cb82451be7b48/code/ch04-03/powers.erl | erlang | @author J D Eisenberg <>
@doc Functions for raising a number to an integer power
@version 0.1 | and finding the Nth root of a number using Newton 's method .
2013 J D Eisenberg
-module(powers).
-export([raise/2]).
@doc Raise a number X to an integer power N.
Any number to the power 0 equals 1 .
Any number to the power 1 is that number itself .
When N is positive , is equal to X times X^(N - 1 )
... |
81ffdb5854708babe4a134debdd18868de340a8dda14f24dd88bf1e4a13eda33 | JustusAdam/language-haskell | T0157.hs | SYNTAX TEST " source.haskell " " Specialise pragma "
# SPECIALIZE [ 0 ] hammeredLookup : : [ ( Widget , value ) ] - > Widget - > value #
-- ^^^^^^^^^^ keyword.other.preprocessor.pragma.haskell
^^^^^^ ^^^^^^ storage.type.haskell
... | null | https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tickets/T0157.hs | haskell | ^^^^^^^^^^ keyword.other.preprocessor.pragma.haskell
^^^^^^^^^^^^^^ - meta.preprocessor.haskell
# SPECIALISE INLINE (!:) :: Arr (a, b) -> Int -> (a, b) #
^^^^^^^^^^ keyword.other.preprocessor.pragma.haskell
... | SYNTAX TEST " source.haskell " " Specialise pragma "
# SPECIALIZE [ 0 ] hammeredLookup : : [ ( Widget , value ) ] - > Widget - > value #
^^^^^^ ^^^^^^ storage.type.haskell
^^^^^ ^^^^^ variable.oth... |
02ad0257a93038ba5fe006c512a97329c0e12dca8673ac29d10ba6610a66c6ac | mishadoff/project-euler | problem063.clj | (ns project-euler)
(defn pow [n e]
(reduce *' (repeat e n)))
Elapsed time : 4.921157 msecs
(defn euler-063 []
(loop [powers (iterate inc 1)
[x & xs] (map #(pow % (first powers)) (iterate inc 1)) sum 0 hit false]
(let [n (quot x (pow 10 (dec (first powers))))]
(cond (< n 1) (recur powers xs su... | null | https://raw.githubusercontent.com/mishadoff/project-euler/45642adf29626d3752227c5a342886b33c70b337/src/project_euler/problem063.clj | clojure | (ns project-euler)
(defn pow [n e]
(reduce *' (repeat e n)))
Elapsed time : 4.921157 msecs
(defn euler-063 []
(loop [powers (iterate inc 1)
[x & xs] (map #(pow % (first powers)) (iterate inc 1)) sum 0 hit false]
(let [n (quot x (pow 10 (dec (first powers))))]
(cond (< n 1) (recur powers xs su... | |
6dee1d42091fa77cf06ca8ca7e3e5ac7c84b55294a75b1fa27d44d333cfc875e | brendanzab/language-garden | Lang_Clos.ml | (** {0 Closure converted functional language}
Unlike {!FunLang}, this language makes an explicit distinction between the
‘code’ of closures, and the captured variables they close over.
*)
(** {1 Syntax} *)
type ty =
| BoolType (** [ Bool ] *)
| IntType (** ... | null | https://raw.githubusercontent.com/brendanzab/language-garden/a2737cd9869f5fbbba0a7cac9a460fca952b40df/compile-closure-conv/lib/Lang_Clos.ml | ocaml | * {0 Closure converted functional language}
Unlike {!FunLang}, this language makes an explicit distinction between the
‘code’ of closures, and the captured variables they close over.
* {1 Syntax}
* [ Bool ]
* [ Int ]
* [ Code(t_env, t1, t2) ]
* [ (t1, ... tn) ]
* [ t1 -> t2 ]
* [ fun env x => e ]
* [ (... |
type ty =
type tm =
| Var of int
| Let of string * ty * tm * tm
| BoolLit of bool
| IntLit of int
| PrimApp of Prim.t * tm list
* [ clos(e1 , e2 ) ]
* { 1 Pretty printing }
let rec pp_ty fmt =
function
| ClosType (param_ty, body_ty) ->
Format.fprintf fmt "%a -> %a"
pp_atomic_ty param_... |
023416ae93837b2cde32fa5026ad334802678b3eaf013d866aaca2835595a0a9 | plumatic/grab-bag | main_local.clj | (ns crane.main-local
"Entry point for local crane operations."
(:use plumbing.core)
(:require
[schema.core :as s]
[plumbing.classpath :as classpath]
[crane.config :as config]
[crane.core :as crane]
crane.task))
(defn resolve-task [x]
(ns-resolve 'crane.task (symbol x)))
(defn main [project-name... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/crane/src/crane/main_local.clj | clojure | (ns crane.main-local
"Entry point for local crane operations."
(:use plumbing.core)
(:require
[schema.core :as s]
[plumbing.classpath :as classpath]
[crane.config :as config]
[crane.core :as crane]
crane.task))
(defn resolve-task [x]
(ns-resolve 'crane.task (symbol x)))
(defn main [project-name... | |
58e3d727f3cd689aebdd29a05297aec3cebe03f1e407b7b486dbbc6822c54899 | Gbury/archsat | superposition.ml | This file is free software , part of Archsat . See file " LICENSE " for more details .
This module uses unitary supperposition to
unify terms modulo equality .
For a reference , see :
' E , a brainiac theorem prover ' by .
This module uses unitary supperposition to
unify terms modulo equa... | null | https://raw.githubusercontent.com/Gbury/archsat/322fbefa4a58023ddafb3fa1a51f8199c25cde3d/src/algos/superposition.ml | ocaml | Types
************************************************************************
Type of reasons for clauses.
Unique id (for printing and tracking through logs)
Contents of the clause
Current mapping for variables & meta-variables
Reason of the clause
Depth of the inference chain that leads to this clause.... | This file is free software , part of Archsat . See file " LICENSE " for more details .
This module uses unitary supperposition to
unify terms modulo equality .
For a reference , see :
' E , a brainiac theorem prover ' by .
This module uses unitary supperposition to
unify terms modulo equa... |
21ab12cebf07526acad902680a8bcfd23a24779c35becc30f411cdb6c1902a5c | haskell/ThreadScope | BSort.hs | -------------------------------------------------------------------------------
- $ I d : BSort.hs#1 2009/03/06 10:53:15 REDMOND\\satnams $
-------------------------------------------------------------------------------
module Main
where
import System.Mem
import System.Random
import System.Time
---------... | null | https://raw.githubusercontent.com/haskell/ThreadScope/7269ccbf7810f268f8cbc3f0e60d49cc6168b882/papers/haskell_symposium_2009/bsort/BSort.hs | haskell | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
----... | - $ I d : BSort.hs#1 2009/03/06 10:53:15 REDMOND\\satnams $
module Main
where
import System.Mem
import System.Random
import System.Time
infixr 5 >->
(>->) :: (a-> b) -> (b-> c) -> (a-> c)
(>->) circuit1 circuit2 input1
= circuit2 (circuit1 input1)
halve :: [a] -> ([a], [a])
halve l
= (... |
e274ecbe336ec01740a6a353f91ad8202883f5336bb74063d900ae264e7f27b0 | nebogeo/weavingcodes | scene.scm | Planet Fluxus Copyright ( C ) 2013
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
;; License, or (at your option) any later version.
;;
;; This program i... | null | https://raw.githubusercontent.com/nebogeo/weavingcodes/e305a28a38ef745ca31de3074c8aec3953a72aa2/dyadic/scm/scene.scm | scheme |
This program is free software: you can redistribute it and/or modify
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Af... | Planet Fluxus Copyright ( C ) 2013
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
You should have received a copy of the GNU Affero General Public License
(define scene-node
(lambda (id prim state children)
(list id pri... |
076363a4e9f6c5d61210b21e87c616e73eda48712814ff8384eb52ddaf2573c7 | haskell-mafia/boris | Log.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Boris.Client.Log (
source
, source'
) where
import Boris.Core.Data
import Data.Conduit (Source, (=$=))
import qualified Data.Conduit.List as CL
import qualified Data.Text as T
import Jebediah.Data (Followi... | null | https://raw.githubusercontent.com/haskell-mafia/boris/fb670071600e8b2d8dbb9191fcf6bf8488f83f5a/boris-client/src/Boris/Client/Log.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
module Boris.Client.Log (
source
, source'
) where
import Boris.Core.Data
import Data.Conduit (Source, (=$=))
import qualified Data.Conduit.List as CL
import qualified Data.Text as T
import Jebediah.Data (Following (..), Query (..), LogGroup (..),... |
66cead68fc95439f1f8e6d255db5f4c6634b84d2dbac504763d8aa7597eef3e3 | mokus0/junkbox | SimpleActor.hs | {-# LANGUAGE RankNTypes, ExistentialQuantification, RecordWildCards #-}
module TypeExperiments.SimpleActor where
import Control.Concurrent
import Control.Monad.LoopWhile
import Control.Monad.Trans
import Data.IORef
import TypeExperiments.MsgChan
data Actor f m = forall st. Actor
{ name :: !String
, i... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/TypeExperiments/SimpleActor.hs | haskell | # LANGUAGE RankNTypes, ExistentialQuantification, RecordWildCards # | module TypeExperiments.SimpleActor where
import Control.Concurrent
import Control.Monad.LoopWhile
import Control.Monad.Trans
import Data.IORef
import TypeExperiments.MsgChan
data Actor f m = forall st. Actor
{ name :: !String
, initialize :: m st
, receive :: forall a. f a -> st -> m (a,... |
8a691a26bfa6f864feb4a363b93e79e5ed2950aee5aee1b8df329b619e861c61 | returntocorp/semgrep | Hooks.ml |
*
* Copyright ( C ) 2020 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICENSE .
... | null | https://raw.githubusercontent.com/returntocorp/semgrep/9a9f7dd6c09327a3e5d8bb9d941abe82a632d63b/src/core/Hooks.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Hooks
**************************************************************************... |
*
* Copyright ( C ) 2020 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICENSE .
... |
6d5d38e1d79c206e35af4c98c79b26b953f40c79f6d309e6fec5926dd2282843 | thma/lambda-ski | GraphReductionSpec.hs | module GraphReductionSpec where
import Parser
import LambdaToSKI
import GraphReduction
import Data.Maybe (fromJust)
import Test.QuickCheck
import Test.Hspec
import Control.Monad.ST (runST, ST)
import Data.STRef
import TestSources
main :: IO ()
main = hspec spec
spec :: Spec
spec =
describe "C... | null | https://raw.githubusercontent.com/thma/lambda-ski/f5546b865a4fae81dec9d5a250f25d1166ba3546/test/GraphReductionSpec.hs | haskell | module GraphReductionSpec where
import Parser
import LambdaToSKI
import GraphReduction
import Data.Maybe (fromJust)
import Test.QuickCheck
import Test.Hspec
import Control.Monad.ST (runST, ST)
import Data.STRef
import TestSources
main :: IO ()
main = hspec spec
spec :: Spec
spec =
describe "C... | |
c6af9ec10728ffb6e4fb1a3324bcd426fdbaeea98117fc37ec3546cac60314ac | FPBench/FPBench | core2fptaylor.rkt | #lang racket
(require "fpcore-reader.rkt" "fpcore-extra.rkt" "imperative.rkt" "range-analysis.rkt")
(provide core->fptaylor fptaylor-supported *fptaylor-inexact-scale*)
(define *fptaylor-inexact-scale* (make-parameter 1))
(define fptaylor-supported
(supported-list
(invert-op-proc
(curry set-member?
... | null | https://raw.githubusercontent.com/FPBench/FPBench/ecdfbfc484cc7f392c46bfba43813458a6406608/src/core2fptaylor.rkt | racket | Language-specific reserved names (avoid name collisions)
The same as 'nearestEven
TODO: constraints
Override visitor behavior
ignore 'declaration' and type' since they are never used
Legacy command line
(with-handlers ([exn:fail? (λ (exn) (eprintf "[ERROR]: ~a\n\n" exn))]) | #lang racket
(require "fpcore-reader.rkt" "fpcore-extra.rkt" "imperative.rkt" "range-analysis.rkt")
(provide core->fptaylor fptaylor-supported *fptaylor-inexact-scale*)
(define *fptaylor-inexact-scale* (make-parameter 1))
(define fptaylor-supported
(supported-list
(invert-op-proc
(curry set-member?
... |
d258c99029e22a62922d3c93e344f560b2a3f7f6d95510a0709ef3ba8a906d4c | axelarge/advent-of-code | day23_test.clj | (ns advent-of-code.y2022.day23-test
(:require [clojure.test :refer :all]
[advent-of-code.y2022.day23 :refer :all]))
(def test-input "....#..\n..###.#\n#...#.#\n.#...##\n#.###..\n##.#.##\n.#..#..")
(deftest test-solve1
(is (= (solve1 test-input) 110))
(is (= (solve1 input) 3990)))
(deftest test-solve... | null | https://raw.githubusercontent.com/axelarge/advent-of-code/077d414b2509891b068f1216c67390ad71312514/test/advent_of_code/y2022/day23_test.clj | clojure | (ns advent-of-code.y2022.day23-test
(:require [clojure.test :refer :all]
[advent-of-code.y2022.day23 :refer :all]))
(def test-input "....#..\n..###.#\n#...#.#\n.#...##\n#.###..\n##.#.##\n.#..#..")
(deftest test-solve1
(is (= (solve1 test-input) 110))
(is (= (solve1 input) 3990)))
(deftest test-solve... | |
0a55acf092fecb2647f1a814932b0c9a211b632cdd64ad1f240197aa5a755ef3 | jrm-code-project/LISP-Machine | qcfasd.lisp | -*- Mode : LISP ; Package : COMPILER ; Base:8 ; : ZL -*-
* * ( c ) Copyright 1980 Massachusetts Institute of Technology * *
(DEFVAR FASD-TABLE-CURRENT-INDEX NIL "Allocating index for runtime fasl table")
(DEFVAR FASD-HASH-TABLE NIL "FASD time hash table")
(DEFVAR FASD-EVAL-HASH-TABLE NIL "FASD time hash ta... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/sys/qcfasd.lisp | lisp | Package : COMPILER ; Base:8 ; : ZL -*-
The package in which the fasl file will presumably be loaded
If this is the car of a list, the cdr is a form to be evaluated at load time
The "#," reader macro uses this
list is a named-lambda, it will be compiled.
Make it the same as FUNCTION for when the interpreter or com... |
* * ( c ) Copyright 1980 Massachusetts Institute of Technology * *
(DEFVAR FASD-TABLE-CURRENT-INDEX NIL "Allocating index for runtime fasl table")
(DEFVAR FASD-HASH-TABLE NIL "FASD time hash table")
(DEFVAR FASD-EVAL-HASH-TABLE NIL "FASD time hash table for self ref pointers")
(DEFVAR FASD-TYO-BUFFER-ARRAY ni... |
154967d8449f9b2f76d5e98d433d222606cb52511e0e594d2ce1897b8faf5cc2 | patricoferris/ocaml-multicore-monorepo | target.ml | This file is part of Dream , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2021
for details, or visit .
Copyright 2021 Anton Bachin *)
let decode string =
string
|> Dream.split_target
|> fun (path, query) -> Printf.printf "%S %S\n" path query
let%exp... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/test/expect/pure/formats/target/target.ml | ocaml | This file is part of Dream , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2021
for details, or visit .
Copyright 2021 Anton Bachin *)
let decode string =
string
|> Dream.split_target
|> fun (path, query) -> Printf.printf "%S %S\n" path query
let%exp... | |
1f77b73ff0a28b33f20e0f89b12afcd530ad14138625dda28c71303b05f77b5d | change-metrics/monocle | Syntax.hs | | The Monocle Search Language Syntax
module Monocle.Search.Syntax (
Expr (..),
ParseError (..),
) where
import Relude
type Field = Text
type Value = Text
data Expr
= AndExpr Expr Expr
| OrExpr Expr Expr
| NotExpr Expr
Field operator
EqExpr Field Value
| GtExpr Field Value
| LtExpr Field Value
... | null | https://raw.githubusercontent.com/change-metrics/monocle/8b239d7ee0e9e30690cd82baf7e46a5fda221583/src/Monocle/Search/Syntax.hs | haskell | | The Monocle Search Language Syntax
module Monocle.Search.Syntax (
Expr (..),
ParseError (..),
) where
import Relude
type Field = Text
type Value = Text
data Expr
= AndExpr Expr Expr
| OrExpr Expr Expr
| NotExpr Expr
Field operator
EqExpr Field Value
| GtExpr Field Value
| LtExpr Field Value
... | |
e8e88c65f86f7ccdfc753c12566cc7dc36e02172796e2691663c56de156465f3 | marigold-dev/deku | api_path.ml | open Deku_concepts
open Deku_consensus
open Deku_stdlib
module Level_or_hash = struct
type t = Level of Level.t | Hash of Block_hash.t
let parser path =
let serialize data =
match data with
| Level level -> Level.show level
| Hash hash -> Block_hash.to_b58 hash
in
let parse string =
... | null | https://raw.githubusercontent.com/marigold-dev/deku/a26f31e0560ad12fd86cf7fa4667bb147247c7ef/deku-p/src/core/bin/api/api_path.ml | ocaml | open Deku_concepts
open Deku_consensus
open Deku_stdlib
module Level_or_hash = struct
type t = Level of Level.t | Hash of Block_hash.t
let parser path =
let serialize data =
match data with
| Level level -> Level.show level
| Hash hash -> Block_hash.to_b58 hash
in
let parse string =
... | |
b04b883f256aa1d723bb405b64f5e82ebf568f1d9db6d48b3721aa9be2d2881b | LdBeth/keim | term-mixin.lisp | -*- syntax : common - lisp ; package : keim ; base : 10 ; mode : lisp -*-
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;; ;;
Copyright ( C ) 1993 by AG Siekmann , , ; ;
Universitaet des Sa... | null | https://raw.githubusercontent.com/LdBeth/keim/ed2665d3b0d9a78eaa88b5a2940a4541f0750926/keim/prog/term/term-mixin.lisp | lisp | package : keim ; base : 10 ; mode : lisp -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;
;;
;
;
All rights reserved. ;;
For information about this program... |
(in-package :keim)
(mod~defmod termix :uses (env keim mod post term )
:documentation "Using terms in larger structures"
:exports (
termix+mixin
termix~set-term!
termix~term
termix+named-term
termix~named-term-p
termix~read-named-term
termix~named-term-... |
23d7fe5a4bc603dc6c958d1c782e7c18fc3a41c865bb58ddaad1a36a49566d19 | GillianPlatform/Gillian | wParserAndCompiler.mli | include
Gillian.CommandLine.ParserAndCompiler.S
with type tl_ast = WProg.t
and type init_data = unit
and module Annot = WAnnot
| null | https://raw.githubusercontent.com/GillianPlatform/Gillian/064097945f7d70264be49bb0d54369646269de96/wisl/lib/ParserAndCompiler/wParserAndCompiler.mli | ocaml | include
Gillian.CommandLine.ParserAndCompiler.S
with type tl_ast = WProg.t
and type init_data = unit
and module Annot = WAnnot
| |
59d95fe22bc5d085c941c8730a562dfd4bc0e6cc9e618fd39ec2214d3ed5cd1b | futurice/haskell-mega-repo | SqlBuilder.hs | {-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE RankNTypes #-}
-- | This small library helps with building complex queries:
--
--... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/futurice-postgres/src/Futurice/Postgres/SqlBuilder.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE RankNTypes #
| This small library helps with building complex queries:
>>> :{
demo $ do
fields_ tbl [ "c1", "c2"]
:}
SELECT t.c1, t.c2
FROM sch.table1 t
WHERE (? < t.c3) AND (t.c3 < ?) AND (t.c4 = ?)
... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
< - from _ " table1 "
orderby _ " c2 " ASC
orderby _ " c1 " DESC
where _ [ eparam _ ( -100 : : Int ) , " < " , ecolumn _ " c3 " ]
where _ [ ecolumn _ " c3 " , ... |
98203e4555d8e74d8f69759c988a0761be5e2dc9aa57b526a7d20ce5ee9509a9 | lumberdev/auth0-clojure | requests.clj | (ns auth0-clojure.utils.requests
(:require [auth0-clojure.utils.common :as common]
[auth0-clojure.utils.json :as json]
[auth0-clojure.utils.edn :as edn]
[auth0-clojure.utils.urls :as urls]
[clj-http.client :as client]
[org.bovinegenius.exploding-fish :as uri... | null | https://raw.githubusercontent.com/lumberdev/auth0-clojure/ed01e95d7a11e6948d286a35aead100ab5a39a00/src/auth0_clojure/utils/requests.clj | clojure | (ns auth0-clojure.utils.requests
(:require [auth0-clojure.utils.common :as common]
[auth0-clojure.utils.json :as json]
[auth0-clojure.utils.edn :as edn]
[auth0-clojure.utils.urls :as urls]
[clj-http.client :as client]
[org.bovinegenius.exploding-fish :as uri... | |
5bbc34bf5957ca5e0eb4b0a1fb9ca05e4fca1610fefe4432674b9830899ee65c | owainlewis/falkor | server.clj | (ns falkor.server
(:require [falkor.parser :as falkor]
[falkor.util :refer [enforce-params json-handler wrap-as-result]]
[falkor.middleware :as logging]
[compojure.core :refer :all]
[compojure.handler :as handler]
[ring.middleware.json :as middleware]
... | null | https://raw.githubusercontent.com/owainlewis/falkor/7d4fb04b11d4c7c820c9814d78a6d9ebff3ff01b/src/falkor/server.clj | clojure | (ns falkor.server
(:require [falkor.parser :as falkor]
[falkor.util :refer [enforce-params json-handler wrap-as-result]]
[falkor.middleware :as logging]
[compojure.core :refer :all]
[compojure.handler :as handler]
[ring.middleware.json :as middleware]
... | |
4d4817ee8b1e3f0a00a6f60d9612364494c35fcf9607bc960ca4ea75ca9b075e | rabbitmq/rabbitmq-auth-backend-oauth2 | uaa_jwt_jwt.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(uaa_jwt_jwt).
Transitional step until w... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-auth-backend-oauth2/444174bba60eba307c0ee5ede51cb4a2fb99034f/src/uaa_jwt_jwt.erl | erlang |
use the now recommended try/catch syntax for obtaining the stack trace. | 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(uaa_jwt_jwt).
Transitional step until we can ... |
c7f2b51706359dcb586df3e23283c03a7436cfff907fe1191fff8b5fa7b4adf3 | exercism/clojure | two_fer.clj | (ns two-fer)
(defn two-fer [name] ;; <- arglist goes here
;; your code goes here
)
| null | https://raw.githubusercontent.com/exercism/clojure/7ed96a5ae3c471c37db2602baf3db2be3b5a2d1a/exercises/practice/two-fer/src/two_fer.clj | clojure | <- arglist goes here
your code goes here | (ns two-fer)
)
|
9cd120eb34c85ce584322258c551745c567e518a3c16964b77f06a00592cec8e | ocaml/odoc | m.mli | type t
module M : sig
type nonrec t = Foo of t
end
type x = Foo of y
and y = Bar of x
| null | https://raw.githubusercontent.com/ocaml/odoc/51220dfad29dbc48154230032291b9c2696e6b28/test/xref2/recursive_types.t/m.mli | ocaml | type t
module M : sig
type nonrec t = Foo of t
end
type x = Foo of y
and y = Bar of x
| |
ddae3fcb595f63d876efb4b3f2ee31c52fdfb9a9f882cadf61776c078d99523c | camlp5/camlp5 | parsetree.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_stuff/4.12.0/parsing/parsetree.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Asttypes
type constant =
Pconst_integer of string * char option
3 3l 3L 3n
Suffixes ... |
2931ba514b54959bff2b49909f913feeaa47831c7cb7bf1715ba92625d26f1fd | FlowerWrong/mblog | user_default.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/user_default.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
-module(user_default).
-compile(export_all).
hello() ->
"Hello Joe how are you?".
away(Time) ->
io:format("Joe is away and will be back in ~w minutes~n",
[Time]).
|
8916b58512c7264e1026b5ea8b1359ba9be44d0e1ace8e5baff578fcfe89a150 | haroldcarr/learn-haskell-coq-ml-etc | WriteRunDot.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
Created : 2014 Feb 26 ( We d ) 18:54:30 by .
Last Modified : 2014 Mar 02 ( Sun ) 15:49:45 by .
Created : 2014 Feb 26 (Wed) 18:54:30 by Harold Carr.
Last Modified : 2014 Mar 02 (Sun) 15:49:45 by Harold Carr.
-}
module WriteRu... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/paper/haroldcarr/2014-02-28-using-graphviz-via-haskell/2014-02-28-using-graphviz-via-haskell/WriteRunDot.hs | haskell | End of file. | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
Created : 2014 Feb 26 ( We d ) 18:54:30 by .
Last Modified : 2014 Mar 02 ( Sun ) 15:49:45 by .
Created : 2014 Feb 26 (Wed) 18:54:30 by Harold Carr.
Last Modified : 2014 Mar 02 (Sun) 15:49:45 by Harold Carr.
-}
module WriteRu... |
627dfa87fa0b9bf541afdd975005a40d5c0674e9498dd4b06a86312c06afc3af | andrejv/cl-simple-tk | ex1.lisp | (defpackage :tk-user
(:use :cl :tk)
(:export :main))
(in-package :tk-user)
(defun main ()
(with-tk-root (root)
(setf (window-title root) "Example 1")
(setf (window-geometry root) "300x100+100+200")
(let ((f (frame :parent root)))
(pack f :expand t :fill "both")
(pack (button :pa... | null | https://raw.githubusercontent.com/andrejv/cl-simple-tk/0ef565fedde588caa62148c2551be1520a955567/examples/ex1.lisp | lisp | (defpackage :tk-user
(:use :cl :tk)
(:export :main))
(in-package :tk-user)
(defun main ()
(with-tk-root (root)
(setf (window-title root) "Example 1")
(setf (window-geometry root) "300x100+100+200")
(let ((f (frame :parent root)))
(pack f :expand t :fill "both")
(pack (button :pa... | |
8a2471b409dbd23ddbe503f7792ece24c32cc4d57f49bf256180bfc7b03ba15f | spurious/sagittarius-scheme-mirror | types.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; encode.scm - ASN.1 BER types
;;;
Copyright ( c ) 2009 - 2012 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/asn.1/ber/types.scm | scheme | coding : utf-8 ; -*-
encode.scm - ASN.1 BER types
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and t... | Copyright ( c ) 2009 - 2012 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(library (asn.1 ber types)
(export <ber-... |
978cd33f94983314ef60e2988f5df3aea1242a7b9b8c97399783aec63704c51d | ocaml-community/obus | oBus_resolver.mli |
* oBus_resolver.mli
* -----------------
* Copyright : ( c ) 2008 , < >
* Licence : BSD3
*
* This file is a part of obus , an ocaml implementation of D - Bus .
* oBus_resolver.mli
* -----------------
* Copyright : (c) 2008, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a part of ... | null | https://raw.githubusercontent.com/ocaml-community/obus/8d38ee6750587ae6519644630b75d53a0a011acd/src/protocol/oBus_resolver.mli | ocaml | * Bus name resolving
* [make ?switch bus name] creates a resolver which will monitor
the name [name] on [bus]. It returns a signal holding the
current owner of the name. It holds [""] when there is no
owner. |
* oBus_resolver.mli
* -----------------
* Copyright : ( c ) 2008 , < >
* Licence : BSD3
*
* This file is a part of obus , an ocaml implementation of D - Bus .
* oBus_resolver.mli
* -----------------
* Copyright : (c) 2008, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a part of ... |
1122198f425c6be3c0fd64355d2f828bf882b071a74a762624160b23e49c7ca2 | rd--/hsc3 | tDelay.help.hs | -- tDelay
let z = impulse ar 2 0
z' = tDelay z 0.5
o = sinOsc ar 440 0 * 0.1
in mce [z * 0.1,toggleFF z' * o]
| null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/tDelay.help.hs | haskell | tDelay | let z = impulse ar 2 0
z' = tDelay z 0.5
o = sinOsc ar 440 0 * 0.1
in mce [z * 0.1,toggleFF z' * o]
|
a6cbeb16032b72ea4a5852433af9bb8abfe5f6d052cc7d242fbf0c43e8fd1199 | audreyt/openafp-utils | afp-split-scb.hs | module Main where
import OpenAFP
import System.Exit
import Data.Char (isDigit, isAlphaNum)
import Data.List (find)
import qualified Data.ByteString.Char8 as C
-- Algorithm:
Gather everything up to first BPG
write out each BPG / EPG chunks
append ENG+EDT
main :: IO ()
main = do
args <- getArgs
if n... | null | https://raw.githubusercontent.com/audreyt/openafp-utils/cbc59144e07638ba9f34685aba77c867e1a766ac/afp-split-scb.hs | haskell | Algorithm:
| module Main where
import OpenAFP
import System.Exit
import Data.Char (isDigit, isAlphaNum)
import Data.List (find)
import qualified Data.ByteString.Char8 as C
Gather everything up to first BPG
write out each BPG / EPG chunks
append ENG+EDT
main :: IO ()
main = do
args <- getArgs
if null args then ... |
d453183e880f2f4dee3e68e955603f122be6b732bc7d55eea7a9e6a57f3b60b1 | stepcut/plugins | Plugin.hs | --
-- Plugin
--
module Plugin where
import API
import Modules.Flags as Flags
resource = plugin {
dbFunc = (\x -> Flags.f1 x)
}
| null | https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/testsuite/hier/hier1/Plugin.hs | haskell |
Plugin
|
module Plugin where
import API
import Modules.Flags as Flags
resource = plugin {
dbFunc = (\x -> Flags.f1 x)
}
|
9a8f0fb440c6dc509d31bbc0a00c8cb014a2073fff9c78dab4595f96c9b63f55 | libguestfs/virt-v2v | create_libvirt_xml.mli | virt - v2v
* Copyright ( C ) 2009 - 2020 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... | null | https://raw.githubusercontent.com/libguestfs/virt-v2v/c331654848f9abdb6edb93cec54bf410c9f6ccd0/output/create_libvirt_xml.mli | ocaml | * Create libvirt XML for [-o libvirt] and [-o local]. | virt - v2v
* Copyright ( C ) 2009 - 2020 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... |
bce3fbbf3fde8c20dac6efe2cfd255c4efcd6fe2b52cffc0a912ae98947be2db | janestreet/async_unix | assign_try_with_log_exn.ml | open! Core
open! Async_kernel
open! Import
We want to get a log of errors sent to [ Monitor.try_with ] after the initial return , so
on initialization we redirect them to [ Log.Global.error ] . However , logging errors
is n't cheap and there are issues with thread fairness when outputting to stderr ( whi... | null | https://raw.githubusercontent.com/janestreet/async_unix/2562a6b9316d7c6757726305482380bd7e6dba06/src/assign_try_with_log_exn.ml | ocaml | open! Core
open! Async_kernel
open! Import
We want to get a log of errors sent to [ Monitor.try_with ] after the initial return , so
on initialization we redirect them to [ Log.Global.error ] . However , logging errors
is n't cheap and there are issues with thread fairness when outputting to stderr ( whi... | |
fca21fe0bf8f853142b5f8a70b019257cc27a9d9500664f8770b8805b6e7a144 | poroh/ersip_proxy | erproxy_listener_sup.erl | %%
Copyright ( c ) 2018 Dmitry Poroh
%% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%%
%% Stateless proxy worker supervisor
%%
-module(erproxy_listener_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
%%===... | null | https://raw.githubusercontent.com/poroh/ersip_proxy/8a67e676e255c07a63b88b970ef82ed4762debcb/apps/erproxy/src/erproxy_listener_sup.erl | erlang |
All rights reserved.
Stateless proxy worker supervisor
API
Supervisor callbacks
====================================================================
API functions
====================================================================
====================================================================
Supervisor... | Copyright ( c ) 2018 Dmitry Poroh
Distributed under the terms of the MIT License . See the LICENSE file .
-module(erproxy_listener_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
Child : : { Id , StartFunc ... |
11a14529a87f9837e0ac4e7ea0b8e85ac70bd8941c2d01e18a8aa33a9255f4c0 | dselsam/arc | Spec.hs | Copyright ( c ) 2020 Microsoft Corporation . All rights reserved .
Released under Apache 2.0 license as described in the file LICENSE .
Authors : , , .
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE StrictData #-... | null | https://raw.githubusercontent.com/dselsam/arc/7e68a7ed9508bf26926b0f68336db05505f4e765/src/Synth/Spec.hs | haskell | # LANGUAGE StrictData # | Copyright ( c ) 2020 Microsoft Corporation . All rights reserved .
Released under Apache 2.0 license as described in the file LICENSE .
Authors : , , .
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
module Synth.Spec where
i... |
c74509d009238e431bb8d2e7b0ac7a9e54f5e98b38c88f9d824e9173aa956875 | clojure/tools.gitlibs | test_impl.clj | (ns clojure.tools.gitlibs.test-impl
(:require
[clojure.test :refer :all]
[clojure.tools.gitlibs.impl :as impl]))
(deftest test-clean-url
(are [url expected-path]
(= expected-path (#'impl/clean-url url))
;; url formats - don't use user or port
"ssh://:3333/org/repo.git" "ssh/gitlab.com/org/repo... | null | https://raw.githubusercontent.com/clojure/tools.gitlibs/8b699c68573d501bc49be6c805a17da1094ac1b2/src/test/clojure/clojure/tools/gitlibs/test_impl.clj | clojure | url formats - don't use user or port
scp style url (most common github ssh url format)
file scheme
file repos - handle relative vs absolute, handle . .. ~ | (ns clojure.tools.gitlibs.test-impl
(:require
[clojure.test :refer :all]
[clojure.tools.gitlibs.impl :as impl]))
(deftest test-clean-url
(are [url expected-path]
(= expected-path (#'impl/clean-url url))
"ssh://:3333/org/repo.git" "ssh/gitlab.com/org/repo"
"ssh" "ssh/gitlab.org.net/org/repo"
... |
540d8a74f64fba32487b4323b4d2dce1053ee5ed1cf6a39b2a446a3e0de09662 | javalib-team/sawja | wlist.mli |
* This file is part of SAWJA
* Copyright ( c)2009 ( INRIA )
*
* This program is free software : you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation , either version 3 of
* the License , or ( at your option ) a... | null | https://raw.githubusercontent.com/javalib-team/sawja/da39f9c1c4fc52a1a1a6350be0e39789812b6c00/src/wlist.mli | ocaml | * A growable when itering list.
TODO : add documentation |
* This file is part of SAWJA
* Copyright ( c)2009 ( INRIA )
*
* This program is free software : you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation , either version 3 of
* the License , or ( at your option ) a... |
79c2617a699ffb1b25cc74a6341a64daa84f7a68020fe97035fdafa48ba508e7 | c4-project/c4f | thread.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/delitmus/src/thread.mli | ocaml | * Type of thread context.
* [when_local t x ~over ~f] returns [f x] when [x.@(over)] is local in [t],
and [x] otherwise.
* [when_local t x ~over ~f] returns [x] when [x.@(over)] is local in [t],
and [f x] otherwise. | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
788e1cdaf3b5380cbff19b71ec4e2e60d6bb7d1b0af8a9e8e5d696de33b9f28c | jlahd/cacle | testsuite.lisp | (in-package :cacle)
#+5am
(5am:def-suite cacle-tests :description "cacle test suite")
#+5am
(5am:in-suite cacle-tests)
#+5am
(defmacro with-testing-cache ((var size &key policy lifetime item-size-modulus without-cleanup (cleanup-checks t)) &body body)
(let ((provider (gensym))
(cleanup (gensym))
(object (gensym)... | null | https://raw.githubusercontent.com/jlahd/cacle/4cbe8cfe227d2e097eaced14766f4f37aa05e617/src/testsuite.lisp | lisp | (in-package :cacle)
#+5am
(5am:def-suite cacle-tests :description "cacle test suite")
#+5am
(5am:in-suite cacle-tests)
#+5am
(defmacro with-testing-cache ((var size &key policy lifetime item-size-modulus without-cleanup (cleanup-checks t)) &body body)
(let ((provider (gensym))
(cleanup (gensym))
(object (gensym)... | |
d8067434240d3a0d7fb87edb78215eb578eec09bd035df195da55517ef336aad | ujamjar/hardcaml-zinc | interp.mli | open Base
module type State = sig
type st
include Ops.S
(* machine registers *)
val get_reg : st -> Machine.Register.t -> t * st
val set_reg : st -> Machine.Register.t -> t -> st
(* memory access *)
val get_mem : st -> Machine.Cache.t -> t -> t * st
val set_mem : st -> Machine.Cache.t -> t -> t ->... | null | https://raw.githubusercontent.com/ujamjar/hardcaml-zinc/ad9360a66ddd239550623e3a92fe5328934706fa/src/interp.mli | ocaml | machine registers
memory access
control
oo
debugging | open Base
module type State = sig
type st
include Ops.S
val get_reg : st -> Machine.Register.t -> t * st
val set_reg : st -> Machine.Register.t -> t -> st
val get_mem : st -> Machine.Cache.t -> t -> t * st
val set_mem : st -> Machine.Cache.t -> t -> t -> st
val cond : st -> t -> (st -> unit * st) ... |
a36c1bbdeda71c84864e60038b8bda8e90accfd3ddd657121da453c61de4558f | zmactep/hasbolt | Record.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
module Database.Bolt.Record where
import Database.Bolt.Value.Type
import Database.Bolt.Value.Instances ()
import Database.Bolt.Connection.Type
import Control.Monad.Except ... | null | https://raw.githubusercontent.com/zmactep/hasbolt/8f53d21f3db891fd74801cdd6ae996a41318b111/src/Database/Bolt/Record.hs | haskell | # LANGUAGE OverloadedStrings #
|Result type for query requests
|Get exact type from Value
|Gets result from obtained record
|Possibly gets result from obtained record | # LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
module Database.Bolt.Record where
import Database.Bolt.Value.Type
import Database.Bolt.Value.Instances ()
import Database.Bolt.Connection.Type
import Control.Monad.Except (MonadError (..), withExce... |
b360955790a60f263672a108e7b8db8ca87bf6d966d60cca05fb404a66151936 | gilith/hol-light | main_thms.ml | let empty_mat = prove_by_refinement(
`interpmat [] [] [[]]`,
(* {{{ Proof *)
[
REWRITE_TAC[interpmat;ROL_EMPTY;interpsigns;ALL2;partition_line];
]);;
(* }}} *)
let empty_sgns = [ARITH_RULE `&1 > &0`];;
let monic_isign_lem = prove(
`(!s c mp p. (!x. c * p x = mp x) ==> c > &0 ==> interpsign s mp Pos ==> inter... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/Rqe/main_thms.ml | ocaml | {{{ Proof
}}}
{{{ Proof
}}}
{{{ Proof
}}}
{{{ Proof
}}}
{{{ Proof
}}}
{{{ Proof
}}}
{{{ Proof
}}}
{{{ Proof
}}}
{{{ Proof
}}}
{{{ Proof
}}}
{{{ Proof
}}}
{{{ Proof
}}}
{{{ Proof
}}}
{{{ Proof
}}}
{{{ Proof
}}}
{{{ Proof
}}} | let empty_mat = prove_by_refinement(
`interpmat [] [] [[]]`,
[
REWRITE_TAC[interpmat;ROL_EMPTY;interpsigns;ALL2;partition_line];
]);;
let empty_sgns = [ARITH_RULE `&1 > &0`];;
let monic_isign_lem = prove(
`(!s c mp p. (!x. c * p x = mp x) ==> c > &0 ==> interpsign s mp Pos ==> interpsign s p Pos) /\
(!s... |
149a50cb9d3a060e360ffa786509243586bfab38b8bbca27777f8e380ebc1cb3 | NorfairKing/exchangerates | Cache.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
-- | Caches for the raw API
module ExchangeRates.Cache
( ExchangeRatesCache(..)
, insertRates
, ExchangeRatesCacheResult(..)
, lookupRates
, emptyExchangeRatesCache
... | null | https://raw.githubusercontent.com/NorfairKing/exchangerates/6ee3ee31ed479259900ae728e6c4caa968e0dcda/src/ExchangeRates/Cache.hs | haskell | # LANGUAGE OverloadedStrings #
| Caches for the raw API
Defaults
Helpers
| A complete cache for the raw API.
This includes a cache for the rates we get, as well as a cache for the
rates we do not get.
^ The current date
^ The requested date
^ Because we requested a date in the future
| Look up rates in cache... | # LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
module ExchangeRates.Cache
( ExchangeRatesCache(..)
, insertRates
, ExchangeRatesCacheResult(..)
, lookupRates
, emptyExchangeRatesCache
, RateCache(..)
, emptyRateCache
, insertRatesInCache
... |
1fbdc9daaf4b91cdf2dc5e64c2adb1b9e2966dc5c619504a8b079ba7cd85b352 | semperos/clj-webdriver | chrome_test.clj | (ns ^:chrome webdriver.chrome-test
(:require [clojure.test :refer :all]
[clojure.tools.logging :as log]
[webdriver.test.helpers :refer :all]
[webdriver.core :refer [new-webdriver to quit]]
[webdriver.test.common :as c])
(:import org.openqa.selenium.remote.DesiredCapab... | null | https://raw.githubusercontent.com/semperos/clj-webdriver/508eb95cb6ad8a5838ff0772b2a5852dc802dde1/test/webdriver/chrome_test.clj | clojure | Driver definitions
Fixtures | (ns ^:chrome webdriver.chrome-test
(:require [clojure.test :refer :all]
[clojure.tools.logging :as log]
[webdriver.test.helpers :refer :all]
[webdriver.core :refer [new-webdriver to quit]]
[webdriver.test.common :as c])
(:import org.openqa.selenium.remote.DesiredCapab... |
9e03a8e3f3f69dce6958f29f0e7e8ab5850d1f8db4a54774807f04a8ecae52f8 | dwango/fialyzer | from_erlang.mli | open Base
open Obeam
val expr_of_erlang_expr : Abstract_format.expr_t -> Ast.t
val code_to_module : Abstract_format.t -> (Ast.module_, exn) Result.t
(* export for unit-test *)
val extract_match_expr : Abstract_format.expr_t -> Abstract_format.expr_t list
| null | https://raw.githubusercontent.com/dwango/fialyzer/3c4b4fc2dacf84008910135bfef16e4ce79f9c89/lib/from_erlang.mli | ocaml | export for unit-test | open Base
open Obeam
val expr_of_erlang_expr : Abstract_format.expr_t -> Ast.t
val code_to_module : Abstract_format.t -> (Ast.module_, exn) Result.t
val extract_match_expr : Abstract_format.expr_t -> Abstract_format.expr_t list
|
169cc7abb07936ea21b3cb94d3d816091037925d0784faa5c7202a21aab744f3 | nyu-acsys/drift | prog2.ml |
let rec loop lx ly =
if lx <= 9 then
loop (lx + 1) (ly+1)
else
assert (ly >= 0)
let main (m:unit) =
let x = 0 in
let y = 0 in
loop x y
let _ = main () | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/DOrder/first/prog2.ml | ocaml |
let rec loop lx ly =
if lx <= 9 then
loop (lx + 1) (ly+1)
else
assert (ly >= 0)
let main (m:unit) =
let x = 0 in
let y = 0 in
loop x y
let _ = main () | |
caa398e39ddef5928b1756cae0d1582374843f8f033a16d2c2ba2754ddd64538 | avsm/mirage-duniverse | test_macros.ml | open! Import
open Sexplib
open Sexplib.Conv
open Printf
module type Load = sig
val load_sexp_conv_exn : string -> (Sexp.t -> 'a) -> 'a
val load_sexps_conv : string -> (Sexp.t -> 'a) -> 'a Sexp.Annotated.conv list
end
let () =
Printexc.register_printer (fun exc ->
match Sexplib.Conv.sexp_of_exn_opt exc wi... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/sexplib/test/test_macros.ml | ocaml | open! Import
open Sexplib
open Sexplib.Conv
open Printf
module type Load = sig
val load_sexp_conv_exn : string -> (Sexp.t -> 'a) -> 'a
val load_sexps_conv : string -> (Sexp.t -> 'a) -> 'a Sexp.Annotated.conv list
end
let () =
Printexc.register_printer (fun exc ->
match Sexplib.Conv.sexp_of_exn_opt exc wi... | |
925b66dcd5ef80e80a68848644a65c62d8d26a1442f6b53a4956be9afd9b40cb | music-suite/music-score | Midi.hs |
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverloadedStrings #-}
-------------------------------------------------------------------------------------
-- |
Copyright ... | null | https://raw.githubusercontent.com/music-suite/music-score/aa7182d8ded25c03a56b83941fc625123a7931f8/src/Music/Score/Import/Midi.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------------
|
License : BSD-style
Stability : experimental
Provides MIDI import.
/Warning/ Experimental module.
... |
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
Copyright : ( c ) 2012 - 2014
Maintainer :
Portability : non - portable ( TF , )
module Music.Score.Import.Midi (
IsMidi(..),
fromMidi,
readMidi,
readMidiMaybe,
readMidiEither
) wh... |
5ac1ff1564b4b9631abe8cf418b078f9ffc04c5c376511fb3b6a6ce6e940a110 | jfeser/castor | fixed_point.mli | open Core
type t = { value : int; scale : int } [@@deriving hash, sexp]
include Comparable.S with type t := t
val convert : t -> int -> t
(** Convert to a new scale. *)
val pow10 : int -> int
val of_int : int -> t
val of_string : String.t -> t
val to_string : t -> string
val pp : Format.formatter -> t -> unit
val (... | null | https://raw.githubusercontent.com/jfeser/castor/39005df41a094fee816e85c4c673bfdb223139f7/lib/fixed_point.mli | ocaml | * Convert to a new scale. | open Core
type t = { value : int; scale : int } [@@deriving hash, sexp]
include Comparable.S with type t := t
val convert : t -> int -> t
val pow10 : int -> int
val of_int : int -> t
val of_string : String.t -> t
val to_string : t -> string
val pp : Format.formatter -> t -> unit
val ( + ) : t -> t -> t
val ( ~- ) :... |
47df4df628899285398768dfb42d3c3ae1e43b50056d34621fd0e79947815ecc | nrepl/nrepl | helpers_test.clj | (ns nrepl.helpers-test
{:author "Chas Emerick"}
(:require
[clojure.test :refer :all]
[nrepl.core :as nrepl]
[nrepl.core-test :refer [def-repl-test repl-server-fixture]]
[nrepl.helpers :as helpers])
(:import
(java.io File)))
(def ^File project-base-dir (File. (System/getProperty "nrepl.basedir" "."... | null | https://raw.githubusercontent.com/nrepl/nrepl/6eb53818c86bc2683ab80f695d3ab72bd006e049/test/clojure/nrepl/helpers_test.clj | clojure | bizarrely, the path of the test script generated by clojure-maven-plugin
ends up being in the :file metadata here on Clojure 1.3.0+, but
passes in 1.2.0... | (ns nrepl.helpers-test
{:author "Chas Emerick"}
(:require
[clojure.test :refer :all]
[nrepl.core :as nrepl]
[nrepl.core-test :refer [def-repl-test repl-server-fixture]]
[nrepl.helpers :as helpers])
(:import
(java.io File)))
(def ^File project-base-dir (File. (System/getProperty "nrepl.basedir" "."... |
d190ec9fcf37f7d358a2bbb0bfb7f9b4169c4c9dac6a10ac2b534746c21adb82 | hiroshi-unno/coar | fold_fun_list.ml | (*
USED: PEPM2013 as fold_fun_list
*)
let rec make_list n =
if n <= 0
then []
else (fun m -> n + m) :: make_list (n-1)
let rec fold_right f xs init =
match xs with
[] -> init
| x::xs' -> f x (fold_right f xs' init)
let compose f g x = f (g x)
let main n =
let xs = make_list n in
let f = fold_r... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/benchmarks/OCaml/safety/tacas2015/fold_fun_list.ml | ocaml |
USED: PEPM2013 as fold_fun_list
|
let rec make_list n =
if n <= 0
then []
else (fun m -> n + m) :: make_list (n-1)
let rec fold_right f xs init =
match xs with
[] -> init
| x::xs' -> f x (fold_right f xs' init)
let compose f g x = f (g x)
let main n =
let xs = make_list n in
let f = fold_right compose xs (fun x -> x) in
as... |
79ecdc854f0ac3313c3bc6d7b5aaadee49cfd329fb9a2605b8599a07664a5983 | csabahruska/jhc-components | Values.hs | module E.Values where
import Control.Monad.Identity
import Data.Monoid
import List
import Ratio
import C.Prims
import E.E
import E.FreeVars()
import E.Subst
import E.TypeCheck
import Info.Info(HasInfo(..))
import Info.Types
import Name.Id
import Name.Name
import Name.Names
import Name.VConsts
import Support.CanType
i... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-core/src/E/Values.hs | haskell | lazy in a
| This takes care of types right away, it simplifies various other things to do it this way.
| strict version of let, evaluates argument before assigning it.
various routines used to classify expressions
many assume atomicity constraints are in place
| whether a value is a compile time constant
| wheth... | module E.Values where
import Control.Monad.Identity
import Data.Monoid
import List
import Ratio
import C.Prims
import E.E
import E.FreeVars()
import E.Subst
import E.TypeCheck
import Info.Info(HasInfo(..))
import Info.Types
import Name.Id
import Name.Name
import Name.Names
import Name.VConsts
import Support.CanType
i... |
6af514a7084c31c5dffc293e80d91d4f51c46f25d4a2b6eb44d6fa04b17c3ba2 | emqx/emqttb | emqttb_http.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2022 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 of the L... | null | https://raw.githubusercontent.com/emqx/emqttb/0b1b95935b0963c2f7a86f4d33f17c7e14ac6f15/src/restapi/emqttb_http.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 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(emqttb_http).
-export([start_link/0, doc/0]).
-export_type([rest_options/0]).
-include("emqtt... |
8a2ebf8f1b3a9f03b397af2aedd01ddec3bcbbbb4a69ecf770d0360c6cdc02b6 | lambdaisland/open-source | gh_actions.clj | (ns lioss.gh-actions
(:require [clojure.string :as str]))
;; -Actions/set-output-Truncates-Multiline-Strings/m-p/38372#M3322
(defn multiline-escape [s]
(-> s
(str/replace #"%" "%25")
(str/replace #"\n" "%0A")
(str/replace #"\r" "%0D")))
(defn changelog-stanza []
(-> "CHANGELOG.md"
slurp
... | null | https://raw.githubusercontent.com/lambdaisland/open-source/02debf4a8feee5d1370413b9c30b6d33e28cdc45/src/lioss/gh_actions.clj | clojure | -Actions/set-output-Truncates-Multiline-Strings/m-p/38372#M3322 | (ns lioss.gh-actions
(:require [clojure.string :as str]))
(defn multiline-escape [s]
(-> s
(str/replace #"%" "%25")
(str/replace #"\n" "%0A")
(str/replace #"\r" "%0D")))
(defn changelog-stanza []
(-> "CHANGELOG.md"
slurp
(str/split #"\n")
(->> (drop-while #(not (re-find #"^# ... |
c7f643884b1bf6096cf7069e90aaf942a7f45280051eb1eceaf80f95f13f1b1e | Bike/mother | env.lisp | ;;;; env.lisp
;;;; interface to environments
(in-package #:mother)
(defclass environment () ()) ; abstract, for subtyping
LOOKUP and FLAT - LOOKUP return two values , like GETHASH .
;;; FLAT- just means that any parents of the environments aren't relevant.
( SETF LOOKUP ) is presently mostly unimplemented becaus... | null | https://raw.githubusercontent.com/Bike/mother/be571bcc8ed2a9f6c65a5d73e5e711509499420b/env.lisp | lisp | env.lisp
interface to environments
abstract, for subtyping
FLAT- just means that any parents of the environments aren't relevant. |
(in-package #:mother)
LOOKUP and FLAT - LOOKUP return two values , like GETHASH .
( SETF LOOKUP ) is presently mostly unimplemented because does n't need it .
(defgeneric lookup (environment key))
(defgeneric (setf lookup) (value environment key)
(:argument-precedence-order environment key value))
(defgeneri... |
86134c062defe7cc5a2d3cf3206738d54ec8130f8e0ee7ec662e60813595d260 | guicho271828/eazy-project | actually-create-project.lisp | (in-package :eazy-project)
(lispn:define-namespace processor)
(defvar *done* nil)
(defun actually-create-project ()
(let ((*done* nil))
(iter (for failure =
(iter
(for (key value) in-hashtable *processor-table*)
(count (not (funcall value)))))
(for pr... | null | https://raw.githubusercontent.com/guicho271828/eazy-project/518c8b6792975893a351ae6f76c0a2b5eb412773/src/create/actually-create-project.lisp | lisp | Global Parameters:
creation
git
autoload asd
might be confusing, but cl-emb treat pathnames and strings
differently
convert the filename
-> . /tmp/skeleton/x/y.lisp
next, get the relative pathname
this should be x/y.lisp
e.g. ~/myrepos/ + x/y.lisp
now convert the contents
failed to open a file; e.g. a file... | (in-package :eazy-project)
(lispn:define-namespace processor)
(defvar *done* nil)
(defun actually-create-project ()
(let ((*done* nil))
(iter (for failure =
(iter
(for (key value) in-hashtable *processor-table*)
(count (not (funcall value)))))
(for pr... |
85a4904ecef660476fc7870bf47501636f85d99113abef56f1604697bb41f32c | devonzuegel/smallworld | frontend.cljs |
(ns smallworld.frontend
(:require [reagent.core :as r]
[reitit.frontend :as rf]
[reitit.frontend.easy :as rfe]
[reitit.frontend.controllers :as rfc]
[reitit.ring :as ring]
[reitit.coercion.schema :as rs... | null | https://raw.githubusercontent.com/devonzuegel/smallworld/cc8bddaa548cc090eaa7b71da2b4c94845d23a82/src/smallworld/frontend.cljs | clojure |
TODO: handle logged out state |
(ns smallworld.frontend
(:require [reagent.core :as r]
[reitit.frontend :as rf]
[reitit.frontend.easy :as rfe]
[reitit.frontend.controllers :as rfc]
[reitit.ring :as ring]
[reitit.coercion.schema :as rs... |
d1d8b47b253b11459f765eef0ba13d1b30f8550ec5f755511d9604ba6765b022 | jellelicht/guix | gperf.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of t... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/gperf.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages gperf)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-m... |
c2c04cef5072f86e091ea37015e423c6cdb8b114172aa8cc324b8f1007caa62a | danieljharvey/mimsa | RawSamples.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecursiveDo #
module Test.IR.RawSamples
( print42,
useId42,
useAdd42,
useConst42Curried,
useBasicIf,
oneTuple42,
twoTuple42,
nestedTuple42,
either42,
)... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/152e4a65edcc48c2f0bec9750f2526a9dde4e99d/smol-core/test/Test/IR/RawSamples.hs | haskell | # LANGUAGE OverloadedStrings #
this version passes the env but calls it immediately
inputs for const2
fn is (arg, env)
this is the continuation of `const` below
add them
return a
allocate room for a struct
run next function
return result
print output
make a one tuple, fetch from it, sum items
output nothing... | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RecursiveDo #
module Test.IR.RawSamples
( print42,
useId42,
useAdd42,
useConst42Curried,
useBasicIf,
oneTuple42,
twoTuple42,
nestedTuple42,
either42,
)
where
import LLVM.AST hiding (fun... |
363db5c87fd748fa942083c73866338986c9a07a4ecd1d53a70d24e37f7271d1 | gtk2hs/gtk2hs | Setup.hs | # LANGUAGE CPP , ViewPatterns #
-- Adjustments specific to this package,
-- all Gtk2Hs-specific boilerplate is kept in
gtk2hs - buildtools : Gtk2HsSetup
--
import Distribution.Simple ( defaultMainWithHooks, UserHooks(postConf),
PackageIdentifier(..), PackageName(..) )
import Gtk2HsSetup (... | null | https://raw.githubusercontent.com/gtk2hs/gtk2hs/0f90caa1dae319a0f4bbab76ed1a84f17c730adf/pango/Setup.hs | haskell | Adjustments specific to this package,
all Gtk2Hs-specific boilerplate is kept in
----------------------------------------------------------------------------
---------------------------------------------------------------------------- | # LANGUAGE CPP , ViewPatterns #
gtk2hs - buildtools : Gtk2HsSetup
import Distribution.Simple ( defaultMainWithHooks, UserHooks(postConf),
PackageIdentifier(..), PackageName(..) )
import Gtk2HsSetup ( gtk2hsUserHooks, getPkgConfigPackages)
import Distribution.Simple.Setup ( ConfigFlags(con... |
0fcd8061183920914ffa98c43975016c77c42144898f7bf9131791b8949818b2 | input-output-hk/plutus | DeBruijn.hs | {-# LANGUAGE DerivingStrategies #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
| Support for using de Bruijn indices for term names .
module UntypedPlutusCore.DeBruijn
( Index (..)
, HasIndex (..)
, D... | null | https://raw.githubusercontent.com/input-output-hk/plutus/fffd9f76eba31de0b10ff8dbcea6f49c3c04bdaf/plutus-core/untyped-plutus-core/src/UntypedPlutusCore/DeBruijn.hs | haskell | # LANGUAGE DerivingStrategies #
# LANGUAGE LambdaCase #
* unsafe api, use with care
Note [Comparison with typed deBruijn conversion]
This module is just a boring port of the typed version.
Will throw an error if a free variable is encountered.
Will throw an error if a free variable is encountered.
|... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
| Support for using de Bruijn indices for term names .
module UntypedPlutusCore.DeBruijn
( Index (..)
, HasIndex (..)
, DeBruijn (..)
, NamedDeBruijn (..)
, FakeNamedDeBruijn (..)
, FreeV... |
5a773f82b01957d9434785602079345f6df650a7e6f448dd8456dc7ded7257e4 | scheme-live/live | output.scm | #f | null | https://raw.githubusercontent.com/scheme-live/live/4c7c9d80f2fcf80692614e10935fa66be69e3708/live/json/data/y-structure-lonely-false/output.scm | scheme | #f | |
463eac722e713688a0d8835228df9423666dc2fb7ded16f756c86f9c774b791b | input-output-hk/plutus-apps | Run.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE NumericUnderscores #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/8706e6c7c525b4973a7b6d2ed7c9d0ef9cd4ef46/plutus-pab/src/Plutus/PAB/LocalCluster/Run.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE NumericUnderscores #
# LANGUAGE OverloadedStrings #
| Start a local cluster of cardano nodes and PAB(s)
Do all the program setup required for running the local cluster, create a
temporary directory, log o... | # LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
module Plutus.PAB.LocalCluster.Run where
import Cardano.Api qualified as CAPI
import Cardano.Api.NetworkId.Extra (NetworkIdWrapper (NetworkIdWrapper))... |
8af7b76ffb53a6901490e0a52600a86af43f3ff62cbc59637aec20e86649a15c | Ekatereana/CommonLispWorks | groupby.lisp |
(defun create_mini_table (table value id)
(let ((result (simple-table:make-table)))
(simple-table:with-rows (table row)
(if (funcall (get_equal (aref row id)) (aref row id) value)
(setq result (simple-table:add-to-table row result)))
)
(return-from create_mini_table result)
)... | null | https://raw.githubusercontent.com/Ekatereana/CommonLispWorks/13111f7c45ec4d672dfdf3689ba22554d5c60727/groupby.lisp | lisp |
(defun create_mini_table (table value id)
(let ((result (simple-table:make-table)))
(simple-table:with-rows (table row)
(if (funcall (get_equal (aref row id)) (aref row id) value)
(setq result (simple-table:add-to-table row result)))
)
(return-from create_mini_table result)
)... | |
1db7e2275b4dd46e2e90795e56fe20218dfc6f5f507b1532f8318544f7ab9cd2 | mirage/synjitsu | config.ml | open Mirage
let main = foreign "Synjitsu.Main" (console @-> network @-> stackv4 @-> job)
let ipv4_config =
let address = Ipaddr.V4.of_string_exn "192.168.2.140" in
let netmask = Ipaddr.V4.of_string_exn "255.255.255.0" in
let gateways = [Ipaddr.V4.of_string_exn "192.168.2.1"] in
{ address; netmask; gateways }
... | null | https://raw.githubusercontent.com/mirage/synjitsu/68adda5260802f936e7cc84b3d009c6a59ff055e/synjitsu/config.ml | ocaml | open Mirage
let main = foreign "Synjitsu.Main" (console @-> network @-> stackv4 @-> job)
let ipv4_config =
let address = Ipaddr.V4.of_string_exn "192.168.2.140" in
let netmask = Ipaddr.V4.of_string_exn "255.255.255.0" in
let gateways = [Ipaddr.V4.of_string_exn "192.168.2.1"] in
{ address; netmask; gateways }
... | |
8dce6b795517454e711c9a26813ef15aff5dc77d24ae7c6e0789f0c6d6865435 | db48x/xe2 | ldoc.lisp | ldoc.lisp --- extract and format documentation from lisp files
Copyright ( C ) 2009
Author : < >
;; Keywords: lisp, tools
;; This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either... | null | https://raw.githubusercontent.com/db48x/xe2/7896fcc69f5c6e28eaf6f6abb7966d6663370a66/ldoc.lisp | lisp | Keywords: lisp, tools
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See th... | ldoc.lisp --- extract and format documentation from lisp files
Copyright ( C ) 2009
Author : < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public Lice... |
e71164437a07e571f648fb30f9341fefd2608a44078d5b18c3b2876efa518ef1 | exercism/clojurescript | example.cljs | (ns rna-transcription)
(def ^:private
dna->rna {\G \C
\C \G
\A \U
\T \A})
(defn- translate [c]
{:post [%]}
(dna->rna c))
(defn to-rna [dna]
(apply str (map translate dna)))
| null | https://raw.githubusercontent.com/exercism/clojurescript/7700a33e17a798f6320aad01fb59a637bd21e12b/exercises/practice/rna-transcription/.meta/src/example.cljs | clojure | (ns rna-transcription)
(def ^:private
dna->rna {\G \C
\C \G
\A \U
\T \A})
(defn- translate [c]
{:post [%]}
(dna->rna c))
(defn to-rna [dna]
(apply str (map translate dna)))
| |
40919f3dc0d35c2edabe13c4326d82c6ffda47216177e5bbccfa74330ae10062 | chef/stats_hero | capture_udp.erl | Copyright 2014 - 2016 Chef Software , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicabl... | null | https://raw.githubusercontent.com/chef/stats_hero/0811d3045874f6c16b76c04ac9358322e029c4b7/test/capture_udp.erl | erlang |
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-----------------------------... | Copyright 2014 - 2016 Chef Software , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(captu... |
4c7befa529ff3f1ec946e08dfa49f2a743593e32e2be23e74afc904ff7872726 | elaforge/karya | Browser.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
| The instrument browser is a standalone program to browse the instrument
database .
Instruments are in the left pane , and the right pane has information on the
sele... | null | https://raw.githubusercontent.com/elaforge/karya/89d1651424c35e564138d93424a157ff87457245/Instrument/Browser.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Send this to the REPL when on a double-click on an instrument.
| Look up the instrument, generate a info sheet on it, and send to the UI.
code
info
important properties
implementation details
If this in... | Copyright 2013
| The instrument browser is a standalone program to browse the instrument
database .
Instruments are in the left pane , and the right pane has information on the
selected instrument . A search box above the instrument list accepts
a simple query language , documneted at ... |
4b82c2158ddd54c91a4f0378ad8fb26d7734dd0aa93ba6335eef56033091b958 | vbmithr/ocaml-thrift-lib | test_types.mli |
Autogenerated by Thrift Compiler ( 0.16.0 )
DO NOT EDIT UNLESS YOU ARE SURE YOU KNOW WHAT YOU ARE DOING
Autogenerated by Thrift Compiler (0.16.0)
DO NOT EDIT UNLESS YOU ARE SURE YOU KNOW WHAT YOU ARE DOING
*)
open Thrift
class nestedStruct :
object ('a)
method get_message : string option
method grab_me... | null | https://raw.githubusercontent.com/vbmithr/ocaml-thrift-lib/1e5b7924636d8926114cbd34398a0848cd472e83/test/gen-ocaml/test_types.mli | ocaml |
Autogenerated by Thrift Compiler ( 0.16.0 )
DO NOT EDIT UNLESS YOU ARE SURE YOU KNOW WHAT YOU ARE DOING
Autogenerated by Thrift Compiler (0.16.0)
DO NOT EDIT UNLESS YOU ARE SURE YOU KNOW WHAT YOU ARE DOING
*)
open Thrift
class nestedStruct :
object ('a)
method get_message : string option
method grab_me... | |
def3049eddb8a0cd5c135a567a44edc315ca57013ade2e228298b5df3c194776 | haskell/ghcide | HieUtils.hs | module Compat.HieUtils
( module HieUtils ) where
import HieUtils
| null | https://raw.githubusercontent.com/haskell/ghcide/3ef4ef99c4b9cde867d29180c32586947df64b9e/hie-compat/src-reexport/Compat/HieUtils.hs | haskell | module Compat.HieUtils
( module HieUtils ) where
import HieUtils
| |
8647851e3055710fe90455e91c1e40732860fe510c154ce21b7dafb845300c1c | yashrk/raylib-scm | 3d_camera_first_person.scm | (include "raylib-definitions.scm")
(import defstruct
raylib-scm
srfi-1)
(use format raylib-scm srfi-1)
(define max-columns 20)
(define screen-width 800)
(define screen-height 450)
(define camera (make-camera (make-vector-3 4.0 2.0 4.0)
(make-vector-3 0.0 1.8 0.0)
... | null | https://raw.githubusercontent.com/yashrk/raylib-scm/b4c6fe17374ce4ddd4162fda37f4691b1e35b5f2/examples/core/3d_camera_first_person/3d_camera_first_person.scm | scheme | Draw ground
Draw a blue wall
Draw a green wall
Draw a yellow wall | (include "raylib-definitions.scm")
(import defstruct
raylib-scm
srfi-1)
(use format raylib-scm srfi-1)
(define max-columns 20)
(define screen-width 800)
(define screen-height 450)
(define camera (make-camera (make-vector-3 4.0 2.0 4.0)
(make-vector-3 0.0 1.8 0.0)
... |
bd44b7859c2e18521129b7e876bb1eb4cecb689a4d01bb85e413b85450b5dc95 | unfoldr/Salsa | Core.hs | # LANGUAGE GADTs , TypeFamilies , MultiParamTypeClasses , EmptyDataDecls #
# LANGUAGE ExistentialQuantification , FlexibleContexts , TypeOperators #
# LANGUAGE ScopedTypeVariables , TypeSynonymInstances , FlexibleInstances #
# LANGUAGE UndecidableInstances #
-------------------------------------------------------------... | null | https://raw.githubusercontent.com/unfoldr/Salsa/c28c54139353a22346c3e6b963e714e0ac4e398e/Foreign/Salsa/Core.hs | haskell | ---------------------------------------------------------------------------
|
Module : Foreign.Salsa.Core
Licence : BSD-style (see LICENSE)
---------------------------------------------------------------------------
Reverse function application
Binding to the target of a method invocation
Method invoc... | # LANGUAGE GADTs , TypeFamilies , MultiParamTypeClasses , EmptyDataDecls #
# LANGUAGE ExistentialQuantification , FlexibleContexts , TypeOperators #
# LANGUAGE ScopedTypeVariables , TypeSynonymInstances , FlexibleInstances #
# LANGUAGE UndecidableInstances #
Copyright : ( c ) 2007 - 2008
module Foreign.Salsa.Cor... |
9bb0d702ef379a1a88d821026c8f57f0a36e1f41fe6da3ad84c5e28a80ff49ea | ciderpunx/57-exercises-for-programmers | P25PwStrengthSpec.hs | module P25PwStrengthSpec (main,spec) where
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck ((==>))
import P25PwStrength hiding (main)
import Data.List (sort)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "passwordStrength" $ do
it "identifies a very weak password" $ do
... | null | https://raw.githubusercontent.com/ciderpunx/57-exercises-for-programmers/25958ab80cc3edc29756d3bddd2d89815fd390bf/test/P25PwStrengthSpec.hs | haskell | module P25PwStrengthSpec (main,spec) where
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck ((==>))
import P25PwStrength hiding (main)
import Data.List (sort)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "passwordStrength" $ do
it "identifies a very weak password" $ do
... | |
ea74be674a55ba710d98b5aebe1e084ec492c43dc6409f3abb419c28668856f0 | outlyerapp/erl-vent | vent_app.erl | %%%-------------------------------------------------------------------
%% @doc vent public API
%% @end
%%%-------------------------------------------------------------------
-module(vent_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%%===========================================... | null | https://raw.githubusercontent.com/outlyerapp/erl-vent/9fd0d1352cccb4e525fbc3293f35806b3cf724d4/src/vent_app.erl | erlang | -------------------------------------------------------------------
@doc vent public API
@end
-------------------------------------------------------------------
Application callbacks
====================================================================
API
===========================================================... |
-module(vent_app).
-behaviour(application).
-export([start/2, stop/1]).
-spec start(application:start_type(), term()) -> {ok, pid()}.
start(_StartType, _StartArgs) ->
vent_sup:start_link().
-spec stop(term()) -> ok.
stop(_State) ->
ok.
Internal functions
|
1660f661a920f1be3c9c4ab011d7b3d3d416d4522894604723be3c0d9bde401b | bytekid/mkbtt | odg.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/processors/src/termination/dg/odg.ml | ocaml | ** OPENS *******************************************************************
** MODULES *****************************************************************
** TYPES *******************************************************************
** GLOBALS *****************************************************************
** FUNCTIONS... | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... |
42a2831bc4eee454b47fb80f8d2597e51a4ad3bdc7bda93593cfa028faea4567 | TrustInSoft/tis-kernel | cil.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_services/ast_queries/cil.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
Copyright ( C ) 2001 - 2003
< > ... |
d19cf6252c3a5432f6aeb16a636d648ce0301a23a1176bb22144c94ea208c837 | nvim-treesitter/nvim-treesitter | injections.scm | (comment) @comment
(apply_expression
function: (_) @_func
argument: [
(string_expression (string_fragment) @regex)
(indented_string_expression (string_fragment) @regex)
]
(#match? @_func "(^|\\.)match$"))
@combined
(binding
attrpath: (attrpath (identifier) @_path)
expression: [
(string_expre... | null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/332fd5338ff11b94803f2629f67f7d3db289b946/queries/nix/injections.scm | scheme | (comment) @comment
(apply_expression
function: (_) @_func
argument: [
(string_expression (string_fragment) @regex)
(indented_string_expression (string_fragment) @regex)
]
(#match? @_func "(^|\\.)match$"))
@combined
(binding
attrpath: (attrpath (identifier) @_path)
expression: [
(string_expre... | |
e917cb4defdefba6c1e6175920555685d72732afaa7b5cc37fedffa710c1e340 | rescript-lang/rescript-compiler | res_scanner.ml | module Diagnostics = Res_diagnostics
module Token = Res_token
module Comment = Res_comment
type mode = Jsx | Diamond
(* We hide the implementation detail of the scanner reading character. Our char
will also contain the special -1 value to indicate end-of-file. This isn't
ideal; we should clean this up *)
let ha... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/fa299663d8a0172916f86f56a9fd9978d631e4a3/res_syntax/src/res_scanner.ml | ocaml | We hide the implementation detail of the scanner reading character. Our char
will also contain the special -1 value to indicate end-of-file. This isn't
ideal; we should clean this up
current character
character offset
current line offset
current line number
line number
offset of the beginning of the ... | module Diagnostics = Res_diagnostics
module Token = Res_token
module Comment = Res_comment
type mode = Jsx | Diamond
let hackyEOFChar = Char.unsafe_chr (-1)
type charEncoding = Char.t
type t = {
filename: string;
src: string;
mutable err:
startPos:Lexing.position ->
endPos:Lexing.position ->
Diagno... |
13cb029c5e5e753b5ac67f9cdc33813f4699a2ef5b684a81fe182171d7cadeca | AlacrisIO/legicash-facts | ppx_deriving_rlp_test_data.ml | open Ppx_deriving_rlp_runtime
type foo = A of int | B of float * bool
[@@deriving rlp]
type loi = Loimt | Loicons of { first : int; rest : loi }
[@@deriving rlp]
type wrapped_list1 = Wrap1 of int list
[@@deriving rlp]
type wrapped_list2 = Wrap2 of { value: int list }
[@@deriving rlp]
type wrapped_list3 = { value: in... | null | https://raw.githubusercontent.com/AlacrisIO/legicash-facts/5d3663bade68c09bed47b3f58fa12580f38fdb46/src/ppx_deriving_rlp/test/ppx_deriving_rlp_test_data.ml | ocaml | Type aliases
Polymorphic variants
Type parameters
Using { rlping = expression } attribute | open Ppx_deriving_rlp_runtime
type foo = A of int | B of float * bool
[@@deriving rlp]
type loi = Loimt | Loicons of { first : int; rest : loi }
[@@deriving rlp]
type wrapped_list1 = Wrap1 of int list
[@@deriving rlp]
type wrapped_list2 = Wrap2 of { value: int list }
[@@deriving rlp]
type wrapped_list3 = { value: in... |
cf05cae249719a08306bd3827f88af5820b9c5951054ca2b4a0d37392c6fc396 | jyp/topics | IncrementalParserWithGeneralizedErrorCorrection.hs | Copyright ( c ) JP Bernardy 2008
{-# OPTIONS -fglasgow-exts #-}
module Yi.IncrementalParse (Process, Void,
recoverWith, symbol, eof, lookNext, runPolish,
runP, profile, pushSyms, pushEof, evalR,
P, AlexState (..), scanner) where
imp... | null | https://raw.githubusercontent.com/jyp/topics/8442d82711a02ba1356fd4eca598d1368684fa69/Parsers/IncrementalParserWithGeneralizedErrorCorrection.hs | haskell | # OPTIONS -fglasgow-exts #
--------------------------------------
----------------------------------------
-----------------------------------------}
| Our parsing processes.
To understand the design of this data type it is important to consider the
basic design goal: Our parser should return a (partial) result as ... | Copyright ( c ) JP Bernardy 2008
module Yi.IncrementalParse (Process, Void,
recoverWith, symbol, eof, lookNext, runPolish,
runP, profile, pushSyms, pushEof, evalR,
P, AlexState (..), scanner) where
import Yi.Lexer.Alex (AlexState (.... |
c138bfd23372877565849f90eb3bbaea6317c85dd68914e447eed4c8abf1ffe7 | beijaflor-io/haskell-libui | Wrapped.hs | {-# LANGUAGE CApiFFI #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE InterruptibleFFI #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeFamilies #
# LANGUAGE Undecidabl... | null | https://raw.githubusercontent.com/beijaflor-io/haskell-libui/4d1fad25e220071c4c977f79f05b482c2c36af84/src/Graphics/LibUI/FFI/Wrapped.hs | haskell | # LANGUAGE CApiFFI #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
|
This module should be enough to match how most imperative languages will
work with the foreign library, if you're ok with building your GUI
* Basic API
* UI Controls
** Wi... | # LANGUAGE FlexibleInstances #
# LANGUAGE InterruptibleFFI #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
Provides wrappers to make the imperative C API nicer to use in Haskell
imperatively on the IO Monad , this should be fine
module Graphics... |
efc65ed2502b9813df4e16b1d08418c55240107604d312b37dc73bc8fcd7d722 | pablomarx/Thomas | portable-rep.scm | * Copyright 1992 Digital Equipment Corporation
;* All Rights Reserved
;*
;* Permission to use, copy, and modify this software and its documentation is
;* hereby granted only under the following terms and conditions. Both the
;* above copyright notice and this permission notice mus... | null | https://raw.githubusercontent.com/pablomarx/Thomas/c8ab3f6fa92a9a39667fe37dfe060b651affb18e/kits/scc/src/portable-rep.scm | scheme | * All Rights Reserved
*
* Permission to use, copy, and modify this software and its documentation is
* hereby granted only under the following terms and conditions. Both the
* above copyright notice and this permission notice must appear in all copies
* of the software, derivative works or modi... | * Copyright 1992 Digital Equipment Corporation
* and hereby grant back to Digital a non - exclusive , unrestricted , royalty - free
* their best efforts to return to Digital any such changes , enhancements or
* extensions that they make and inform Digital of noteworthy uses of this
* software . Correspo... |
6deb5bf0068aa38b9fc87448df88b0851cff24012d0f971cf59a919ac6b5d1d9 | acl2/acl2 | assert.cpp.ref.ast.lsp |
(funcdef foo (a) (block (assert a foo) (return 1)))
| null | https://raw.githubusercontent.com/acl2/acl2/c2d69bad0ed3132cc19a00cb632de8b73558b1f9/books/projects/rac/tests/yaml_test/control_flow/assert.cpp.ref.ast.lsp | lisp |
(funcdef foo (a) (block (assert a foo) (return 1)))
| |
b144b8a3ea3584cc950f21ac0c6ebac7997a0ee3515558c0074d058e03600694 | ml-in-barcelona/server-reason-react | webapi.ml | module Dom = struct
type element
type window
end
| null | https://raw.githubusercontent.com/ml-in-barcelona/server-reason-react/a5d22907eb2633bcb8e77808f6c677802062953a/lib/web/webapi.ml | ocaml | module Dom = struct
type element
type window
end
| |
736f187bce975f95c0c4d1bd0630032514d74411db4e94d92ceb8e3824fc9969 | rtoy/ansi-cl-tests | format-paren.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Oct 17 20:28:24 2004
;;;; Contains: Tests of the ~( format directives
(in-package :cl-test)
(compile-and-load "printer-aux.lsp")
(def-format-test format.paren.1
"~(XXyy~AuuVV~)" ("ABc dEF ghI") "xxyyabc def ghiuuvv")
Conversion of simple characters to do... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/format-paren.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of the ~( format directives
Nested conversion | Author :
Created : Sun Oct 17 20:28:24 2004
(in-package :cl-test)
(compile-and-load "printer-aux.lsp")
(def-format-test format.paren.1
"~(XXyy~AuuVV~)" ("ABc dEF ghI") "xxyyabc def ghiuuvv")
Conversion of simple characters to downcase
(deftest format.paren.2
(loop for i from 0 below (min char-code-... |
6e887428de7f78dad31acdcbf3bdd8de970bc25e1748b944a74ee0447ae16553 | manuel-serrano/bigloo | dsssl.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / / runtime / Llib / dsssl.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/runtime/Llib/dsssl.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*=====================================================================*/
*---------------------------... | * serrano / prgm / project / bigloo / / runtime / Llib / dsssl.scm * /
* Author : * /
* Creation : Sat Jul 3 11:30:29 1997 * /
* Last change : Sun Aug 25 09:08:52 2019 ( serrano ) * /
* suppor... |
56acb73620d4bd546d494820e4f3ebde2b99cc8f8b6b11568a5183289d986ae6 | guardian/content-api-haskell-client | ContentApi.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE RecordWildCards #
module Network.Guardian.ContentApi
(
ContentApi
, runContentApi
, ApiConfig(..)
, defaultApiConfig
, ContentApiError
, contentSearch
, tagSearch
) where
import Network.Guardian.ContentApi.Content
im... | null | https://raw.githubusercontent.com/guardian/content-api-haskell-client/f80195c4117570bc3013cbe93ceb9c5d3f5e17bd/guardian-content-api-client/Network/Guardian/ContentApi.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable # | # LANGUAGE RecordWildCards #
module Network.Guardian.ContentApi
(
ContentApi
, runContentApi
, ApiConfig(..)
, defaultApiConfig
, ContentApiError
, contentSearch
, tagSearch
) where
import Network.Guardian.ContentApi.Content
import Network.Guardian.ContentApi.Tag
import Blaze.ByteString.Builder (... |
82f7bc5417def3ae571cc39255cdf5d202284b8c3fbbf354c57646a395400a64 | bloomberg/blpapi-hs | PrettyPrint.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : Finance . Blpapi . PrettyPrint
Description : Printing Utility for Blpapi types
Copyright : Bloomberg Finance L.P.
License : MIT
Maintainer :
Stability : experimental
Portability : * nix , windows
A pretty printer for ' Element ' and ' Me... | null | https://raw.githubusercontent.com/bloomberg/blpapi-hs/a4bdff86f3febcf8b06cbc70466c8abc177b973a/src/Finance/Blpapi/PrettyPrint.hs | haskell | # LANGUAGE OverloadedStrings #
| Configuration that can be passed to pretty print routines
^ Indentation spaces per level of nesting
| Class which determines what BLPAPI types can be pretty printed
|Pretty print an 'Finance.Blpapi.Element' or 'Finance.Blpapi.Message'
with the default configuration
|Pretty print an... | |
Module : Finance . Blpapi . PrettyPrint
Description : Printing Utility for Blpapi types
Copyright : Bloomberg Finance L.P.
License : MIT
Maintainer :
Stability : experimental
Portability : * nix , windows
A pretty printer for ' Element ' and ' Message ' .
Module : Finance.B... |
220b863709c765ac8298b4f1e9e4abf425e7b2260a5e76318fa27e1e830976a0 | static-analysis-engineering/codehawk | bCHARMSumTypeSerializer.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/e8fed9f226abe38578768968279c8242eb21fea9/CodeHawk/CHB/bchlibarm32/bCHARMSumTypeSerializer.ml | ocaml | chutil
bchlib
bchlibarm32 | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
66c9fd88aff7bf0227a8cc6a77dee8a0303f4610a756e963db0c11672dfc811a | phadej/cabal-extras | NixSingle.hs | module CabalBundler.NixSingle (
generateDerivationNix,
) where
import Peura
import qualified Cabal.Index as I
import qualified Cabal.Plan as P
import qualified Data.List.NonEmpty as NE
import qualified Data.Map.Strict ... | null | https://raw.githubusercontent.com/phadej/cabal-extras/0cb96d2cf6c390555937fbb57fbe42b299aeb596/cabal-bundler/src/CabalBundler/NixSingle.hs | haskell | -----------------------------------------------------------------------------
generating output
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Exceptions
-------------------------------------------------------... | module CabalBundler.NixSingle (
generateDerivationNix,
) where
import Peura
import qualified Cabal.Index as I
import qualified Cabal.Plan as P
import qualified Data.List.NonEmpty as NE
import qualified Data.Map.Strict ... |
00823ee467e68e1f0800e3f47f24bba8563918498e7f3b6c84a1b57641441492 | NetASM/NetASM-haskell | Run.hs | ---------------------------------------------------------------------------------
--
--
--
-- File:
-- TTLDecrement/Run.hs
--
-- Project:
: A Network Assembly for Orchestrating Programmable Network Devices
--
-- Author:
--
-- Copyright notice:
Copyright ( C ) 2014 Georgia Inst... | null | https://raw.githubusercontent.com/NetASM/NetASM-haskell/08e102691e4f343148b6cc270d89bbf0b97cac96/Apps/TTLDecrement/Run.hs | haskell | -------------------------------------------------------------------------------
File:
TTLDecrement/Run.hs
Project:
Author:
Copyright notice:
Licence:
This file is free code: you can redistribute it and/or modify it under
This package is distributed in the hope that it will b... | : A Network Assembly for Orchestrating Programmable Network Devices
Copyright ( C ) 2014 Georgia Institute of Technology
Network Operations and Internet Security Lab
This file is a part of the development base package .
the terms of the GNU Lesser General Pub... |
918286de8f31ce497d17ef40ae2426504c69ce19b74e057154eace43d563069c | tek/ribosome | Error.hs | module Ribosome.Host.Error where
import Ribosome.Host.Data.BootError (BootError (BootError))
import Ribosome.Host.Data.RpcError (RpcError)
import Ribosome.Host.Effect.Rpc (Rpc)
|Run a ' Sem ' that uses ' Rpc ' and discard ' RpcError 's , interpreting ' Rpc ' to @'Rpc ' ' ! ! ' ' RpcError'@.
ignoreRpcError ::
Memb... | null | https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/host/lib/Ribosome/Host/Error.hs | haskell | 'RpcError'@. | module Ribosome.Host.Error where
import Ribosome.Host.Data.BootError (BootError (BootError))
import Ribosome.Host.Data.RpcError (RpcError)
import Ribosome.Host.Effect.Rpc (Rpc)
|Run a ' Sem ' that uses ' Rpc ' and discard ' RpcError 's , interpreting ' Rpc ' to @'Rpc ' ' ! ! ' ' RpcError'@.
ignoreRpcError ::
Memb... |
b271ef5f8b69525b67fb44c292791a817011c77b68bb52e6a8de2781d592d7dc | realworldocaml/book | coq_lib_name.ml | open! Import
(* This file is licensed under The MIT License *)
( c ) MINES ParisTech 2018 - 2019
(* (c) INRIA 2020 *)
Written by :
(* Coq Directory Path *)
type t = string list
let compare = List.compare ~compare:String.compare
let to_string x = String.concat ~sep... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/coq_lib_name.ml | ocaml | This file is licensed under The MIT License
(c) INRIA 2020
Coq Directory Path | open! Import
( c ) MINES ParisTech 2018 - 2019
Written by :
type t = string list
let compare = List.compare ~compare:String.compare
let to_string x = String.concat ~sep:"." x
let to_dir x = String.concat ~sep:"/" x
let wrapper x = to_string x
let dir x = to_dir x
We should add some furt... |
fdad53af597a96317bfab5a1a8ef5737f44b6fa19e256312da4f1814507a73a1 | ucsd-progsys/mist | ticktock2.hs | tick and tock with session types in Mist
undefined as rforall a. a
undefined = 0
assert :: {v:Bool | v} -> Unit
assert = \tru -> Unit
-----------------------------------------------------------------------------
-- | The ST Monad -----------------------------------------------------------
-------------------------... | null | https://raw.githubusercontent.com/ucsd-progsys/mist/0a9345e73dc53ff8e8adb8bed78d0e3e0cdc6af0/tests/Tests/Integration/pos/ticktock2.hs | haskell | ---------------------------------------------------------------------------
| The ST Monad -----------------------------------------------------------
---------------------------------------------------------------------------
---------------------------------------------------------------------------
| Primitive Con... | tick and tock with session types in Mist
undefined as rforall a. a
undefined = 0
assert :: {v:Bool | v} -> Unit
assert = \tru -> Unit
bind :: rforall a, b, p, q, r.
ST <p >q >a ->
(x:a -> ST <q >r >b) ->
ST <p >r >b
bind = undefined
pure :: rforall a, p, q. x:a -> ST <p >q >a
pure = undefined
thenn :: rfor... |
f7cb6fcdbe9a645cb1bc9b5af52fc351e19540f5cc10083a6a82202b0edffebb | chetmurthy/ensemble | route.ml | (**************************************************************)
Author : , 12/95
(**************************************************************)
open Trans
open Buf
open Util
(**************************************************************)
let name = Trace.file "ROUTE"
let failwith = Trace.make_failwith name
(... | null | https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/route/route.ml | ocaml | ************************************************************
************************************************************
************************************************************
************************************************************
************************************************************
***************... |
Author : , 12/95
open Trans
open Buf
open Util
let name = Trace.file "ROUTE"
let failwith = Trace.make_failwith name
let drop = Trace.log "ROUTED"
let info = Trace.log "ROUTEI"
type pre_processor =
| Unsigned of (rank -> Obj.t option -> seqno -> Iovecl.t -> unit)
| Signed of (bool -> rank -> Obj.t option ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.