_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 |
|---|---|---|---|---|---|---|---|---|
eb8619bde401077f912a7328c2b7e231128c1554f9ce6fbc47a852814fa9a40d | dalaing/little-languages | Size.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleInstances #
module Common.Term.Size (
SizeInput(..)
, HasSizeInput(..)
, SizeOutput(..)
, HasSizeOutput(..)
, mkSize
) where
import Control.Lens.TH (makeClassy)
import Common.Recursion
... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/nb-modular/src/Common/Term/Size.hs | haskell | # LANGUAGE TemplateHaskell #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleInstances #
module Common.Term.Size (
SizeInput(..)
, HasSizeInput(..)
, SizeOutput(..)
, HasSizeOutput(..)
, mkSize
) where
import Control.Lens.TH (makeClassy)
import Common.Recursion
... | |
7fd8f831d6224bfcb448f3f23a35fa6eb0f90779e891e0b666b45ff867d8515e | plexus/syna.esth.etic | project.clj | (defproject synaesthetic "0.0.0"
:dependencies [[org.clojure/tools.cli "0.3.5" :exclusions [[org.clojure/clojure]]]]
:cljsbuild {:builds [{:id "dev"
:source-paths ["src"]
:compiler {:main syna.esth.etic
:target :nodejs}}]})
| null | https://raw.githubusercontent.com/plexus/syna.esth.etic/9e92a55e2e859d597c3fc23ee983e16cfedb5ce6/project.clj | clojure | (defproject synaesthetic "0.0.0"
:dependencies [[org.clojure/tools.cli "0.3.5" :exclusions [[org.clojure/clojure]]]]
:cljsbuild {:builds [{:id "dev"
:source-paths ["src"]
:compiler {:main syna.esth.etic
:target :nodejs}}]})
| |
61370097d1094fc0f7b41a2a7097a7b90cfc621d361bc096fe6f9459c3c2893a | smelc/tn-fp-haskell-course | Scratch.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE AllowAmbiguousTypes #
-- | Module for live trial and error
module Scratch where
import Data.Char
import Data.Word
class Collection t where
size :: t a -> Int
toList :: t a -> [a]
instance Collection [] where
size = \case [] -> 0; _ : xs -> 1 + size xs
toList = id... | null | https://raw.githubusercontent.com/smelc/tn-fp-haskell-course/ce861c5b31acc23dd1d273e807eb7aae31e34cc5/tps/Scratch.hs | haskell | | Module for live trial and error | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE AllowAmbiguousTypes #
module Scratch where
import Data.Char
import Data.Word
class Collection t where
size :: t a -> Int
toList :: t a -> [a]
instance Collection [] where
size = \case [] -> 0; _ : xs -> 1 + size xs
toList = id
mkEmail :: String -> String -> Stri... |
086697f1b6730e479180fb78ef296b8613eb50d8588200437829ee9236111653 | danieljharvey/mimsa | Parse.hs | module Language.Mimsa.Actions.Helpers.Parse (parseExpr, parseDataType, parseModule) where
import Control.Monad.Except
import Data.Text (Text)
import Language.Mimsa.Actions.Types
import Language.Mimsa.Core (Annotation, DataType, Expr, Module, Name)
import qualified Language.Mimsa.Core as Parser
import qualified Languag... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/e6b177dd2c38e8a67d6e27063ca600406b3e6b56/compiler/src/Language/Mimsa/Actions/Helpers/Parse.hs | haskell | module Language.Mimsa.Actions.Helpers.Parse (parseExpr, parseDataType, parseModule) where
import Control.Monad.Except
import Data.Text (Text)
import Language.Mimsa.Actions.Types
import Language.Mimsa.Core (Annotation, DataType, Expr, Module, Name)
import qualified Language.Mimsa.Core as Parser
import qualified Languag... | |
bd8848efb6aeb45396a0b62004078433efafd38e03e41271d2b40fa2b0e8cf03 | TrustInSoft/tis-kernel | compiler.ml | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/wp/qed/top/compiler.ml | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
17becc74073f162d2203b65985350fb96bac962259e87cbe11e7d66f618821b7 | sharplispers/montezuma | phrase-positions.lisp | (in-package #:montezuma)
;;?? FIXME: to-s
(defclass phrase-positions ()
((document :reader document :initform -1)
(phrase-position :reader phrase-position :initform -1)
(next :accessor next :initform nil)
(tp-enum :initarg :tp-enum :reader tp-enum)
(offset :initarg :offset)
(position)
(phrase-coun... | null | https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/src/search/phrase-positions.lisp | lisp | ?? FIXME: to-s | (in-package #:montezuma)
(defclass phrase-positions ()
((document :reader document :initform -1)
(phrase-position :reader phrase-position :initform -1)
(next :accessor next :initform nil)
(tp-enum :initarg :tp-enum :reader tp-enum)
(offset :initarg :offset)
(position)
(phrase-count :initform -1 :r... |
528216f9e5ec63f9de1a6ffe91099d40ce39875ca3d3c83d9e7742b716a5400c | Clojure2D/clojure2d-examples | sphere.clj | (ns rt4.the-next-week.ch05b.sphere
(:require [rt4.the-next-week.ch05b.hittable :as hittable]
[rt4.the-next-week.ch05b.interval :as interval]
[rt4.the-next-week.ch05b.ray :as ray]
[fastmath.core :as m]
[fastmath.vector :as v]
[rt4.the-next-week.ch05b.aabb :as... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch05b/sphere.clj | clojure | (ns rt4.the-next-week.ch05b.sphere
(:require [rt4.the-next-week.ch05b.hittable :as hittable]
[rt4.the-next-week.ch05b.interval :as interval]
[rt4.the-next-week.ch05b.ray :as ray]
[fastmath.core :as m]
[fastmath.vector :as v]
[rt4.the-next-week.ch05b.aabb :as... | |
2d660956bb7a6ca9b92488971c747c633cc4118e6da14e114323b552a3a3d04c | swamp-agr/proof-assistant-bot | Request.hs | module Proof.Assistant.Request where
import Data.ByteString (ByteString)
import Data.Text.Encoding (encodeUtf8)
import Telegram.Bot.API
import Telegram.Bot.Simple.UpdateParser
| Request from Telegram .
data InterpreterRequest = InterpreterRequest
^ Telegram ChatId ( for reply and isolation ) .
^ Telegram Messag... | null | https://raw.githubusercontent.com/swamp-agr/proof-assistant-bot/28eb16104b65f83ba5a9a7e5cebd4085d4b0425d/src/Proof/Assistant/Request.hs | haskell | ^ Message content.
chatId
messageId | module Proof.Assistant.Request where
import Data.ByteString (ByteString)
import Data.Text.Encoding (encodeUtf8)
import Telegram.Bot.API
import Telegram.Bot.Simple.UpdateParser
| Request from Telegram .
data InterpreterRequest = InterpreterRequest
^ Telegram ChatId ( for reply and isolation ) .
^ Telegram Messag... |
6d4e54184be860d4f089ce40184ebad795554c2d20fb129ff951a79511b5b13e | fulcrologic/fulcro-rad | form_options.cljc | (ns com.fulcrologic.rad.form-options
"Documented definitions of the standard form options. These provide easy access to documentation for the options,
along with preventing spelling errors when using the keys in definitions. Plugin authors are encouraged to
write their own options files to get the same benefits.
... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-rad/ba17f5d3057a18e4af77294fc59b9408451896cd/src/main/com/fulcrologic/rad/form_options.cljc | clojure | however, NO I/O is done on these | (ns com.fulcrologic.rad.form-options
"Documented definitions of the standard form options. These provide easy access to documentation for the options,
along with preventing spelling errors when using the keys in definitions. Plugin authors are encouraged to
write their own options files to get the same benefits.
... |
aa2a94d71115510f18d14908902ea8f49c628e503999c526d7270cee2ce4baca | 5HT/ant | PageLayout.mli |
open XNum;
open Runtime;
open Unicode.Types;
open Logging;
open Dim;
open Substitute;
open FontMetric;
open Box;
open Page;
type area = (* an area of the page *)
{
ar_name : uc_string;
ar_shape : area_shape;
ar_contents : area_contents_function (* function to fill the area with... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Typesetting/PageLayout.mli | ocaml | an area of the page
function to fill the area with its contents
description of a page
paper dimensions
the areas
state while filling areas
marks in previous pages
marks in the current page
layout of the next page ... |
open XNum;
open Runtime;
open Unicode.Types;
open Logging;
open Dim;
open Substitute;
open FontMetric;
open Box;
open Page;
{
ar_name : uc_string;
ar_shape : area_shape;
}
and page_update = (page * area_finaliser * page_state)
and area_contents_function =
page -> area_shape -> list (list extended_glyph... |
e01c326b1bf9429044f1b8f3029b81663987ec070e785333c39ef8138ae9a706 | savonet/ocaml-metadata | test.ml | let p name m =
let m =
List.map (fun (l, v) -> "- " ^ l ^ " : " ^ v) m |> String.concat "\n"
in
Printf.printf "# Testing %s\n\n%s\n\n%!" name m
(* Test parsing of metadata. *)
let () =
p "mp3v2" (Metadata.ID3v2.parse_file "test.mp3");
p "mp3v1" (Metadata.ID3v1.parse_file "test.mp3");
p "mp3" (Metadata.... | null | https://raw.githubusercontent.com/savonet/ocaml-metadata/d32e9b6e0a69e7e7976f86ba1ea27c9d2b1192e3/examples/test.ml | ocaml | Test parsing of metadata.
Test failures. | let p name m =
let m =
List.map (fun (l, v) -> "- " ^ l ^ " : " ^ v) m |> String.concat "\n"
in
Printf.printf "# Testing %s\n\n%s\n\n%!" name m
let () =
p "mp3v2" (Metadata.ID3v2.parse_file "test.mp3");
p "mp3v1" (Metadata.ID3v1.parse_file "test.mp3");
p "mp3" (Metadata.ID3.parse_file "test.mp3");
p ... |
401533db1339691675c67cea9574c6cc9abb9a4991c51081727fb18b6a7229dd | mariari/Misc-Lisp-Scripts | increasing-order.lisp | (defun increasing-order? (list)
(unless (eq (cadr list) nil)
(if (> (car list) (cadr list))
nil
(increasing-order? (cdr list)))
t))
(increasing-order? '(1 2 3 3 4 5))
(eq '(1 2 3) '(1 2 3))
| null | https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/Books/LandOfLisp/Chapter%204/increasing-order.lisp | lisp | (defun increasing-order? (list)
(unless (eq (cadr list) nil)
(if (> (car list) (cadr list))
nil
(increasing-order? (cdr list)))
t))
(increasing-order? '(1 2 3 3 4 5))
(eq '(1 2 3) '(1 2 3))
| |
68e9038113e7199672fa4f082a64ce0a53d5c43100f882d3f2e6dd544d539534 | ukari/cl-generator | util.lisp | (in-package :cl-generator-util)
(defmacro for (expr &body body)
(let* ((vars (reverse (cdr (reverse `,expr))))
(generator (car (last `,expr)))
(iter (gensym "iter")))
`(let ((,iter ,generator))
(labels ((f (,@vars)
,@body
(if (not (null (iter-next ,ite... | null | https://raw.githubusercontent.com/ukari/cl-generator/80789ca8cc8a076e353dd2c29abdcf5fb8ed944c/src/util/util.lisp | lisp | (in-package :cl-generator-util)
(defmacro for (expr &body body)
(let* ((vars (reverse (cdr (reverse `,expr))))
(generator (car (last `,expr)))
(iter (gensym "iter")))
`(let ((,iter ,generator))
(labels ((f (,@vars)
,@body
(if (not (null (iter-next ,ite... | |
179fb12449bff7c3b721042890a845a310195b5c82a857d09a4f2ce366c55647 | al3623/rippl | pretty_tast_print.ml | open Ast
open Tast
open Pretty_type_print
let rec texpr_to_str tx =
match tx with
| TIntLit (i) -> string_of_int i
| TFloatLit (f) -> string_of_float f
| TBoolLit (b) -> string_of_bool b
| TCharLit (c) -> String.make 1 c
| TWildCard -> "_"
| _ -> "texpr"
let typ_to_str ty =
Pretty... | null | https://raw.githubusercontent.com/al3623/rippl/a7e5c24f67935b3513324148279791042856a1fa/src/utils/pretty_tast_print.ml | ocaml | open Ast
open Tast
open Pretty_type_print
let rec texpr_to_str tx =
match tx with
| TIntLit (i) -> string_of_int i
| TFloatLit (f) -> string_of_float f
| TBoolLit (b) -> string_of_bool b
| TCharLit (c) -> String.make 1 c
| TWildCard -> "_"
| _ -> "texpr"
let typ_to_str ty =
Pretty... | |
be4f20c484460fef0116d423427af00ee0ad0ff1afdea693c0ae566124bd08ae | exoscale/ablauf | manifold.clj | (ns ablauf.job.manifold
"
An execution engine for warp jobs on manifold.
To perform parallel actions with manifold.
Execution is represented as a stream on which results
are produced.
The stream is closed when execution is finished.
Each execution step is store with the help of a
`ablauf.job.store/Job... | null | https://raw.githubusercontent.com/exoscale/ablauf/c7496a46b364c4d311c785eb5dfba12b844958ca/src/ablauf/job/manifold.clj | clojure | Persist to given store, either we get a deferred or nil,
doesn't matter
Launch all dispatchs found
all dispatchers chain on the same persist-result deferred
to ensure progress only when persist-result is not a failure
Close input if processing is finished
the persist fails and the job will not get executed.
Av... | (ns ablauf.job.manifold
"
An execution engine for warp jobs on manifold.
To perform parallel actions with manifold.
Execution is represented as a stream on which results
are produced.
The stream is closed when execution is finished.
Each execution step is store with the help of a
`ablauf.job.store/Job... |
badc0eaf0a655d03c93fd9f39be340cdd6515eff0b5ade27f2050b1b14a716f1 | dwayne/eopl3 | ex2.10.rkt | #lang racket
Exercise 2.9
;;
;; Add a constructor called extend-env* and
;; implement it using the a-list representation.
(define (empty-env)
'())
(define (empty-env? env)
(null? env))
(define (extend-env var val env)
(cons (cons var val) env))
(define (extend-env* vars vals env)
(define (zip xs ys)
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/02-ch2/racket/ex2.10.rkt | racket |
Add a constructor called extend-env* and
implement it using the a-list representation. | #lang racket
Exercise 2.9
(define (empty-env)
'())
(define (empty-env? env)
(null? env))
(define (extend-env var val env)
(cons (cons var val) env))
(define (extend-env* vars vals env)
(define (zip xs ys)
(cond
[(null? xs) '()]
[(null? ys) '()]
[else
(cons (cons (car xs) (car... |
c127bf00f93fe1885ee6f12cf896189ed3807d24be7ca424cc98b6a2e0702354 | samoht/camloo | lprim.scm | * Copyright ( C ) 1994 - 2010 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 ; version 2 of the License .
;*
;* This program is distributed in the hope that it will be useful,
;* but W... | null | https://raw.githubusercontent.com/samoht/camloo/29a578a152fa23a3125a2a5b23e325b6d45d3abd/src/camloo/Llib/lprim.scm | scheme | *
* This program is free software; you can redistribute it and/or modify
version 2 of the License .
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public L... | * Copyright ( C ) 1994 - 2010 INRIA
* it under the terms of the GNU General Public License as published by
(module Lprim
(include "var.sch")
(import Llambda
var
Pmakeblock
Lconst
Ldefine
module
utils
generate
init
hop-names)
(export (Lprim exp tl? cp sg? raise?)))
... |
623e55af6341a7608651eae28a1247ce2deee8fb874948dad9896d48116a43e9 | VictorCMiraldo/generics-mrsop | TypeClassAssocFamily.hs | # LANGUAGE DataKinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -cpp #
module TypeClassAssocFamily where
import Outline
#define Prod [Atom]
#define Sum [Prod]
#define Family [Sum]
-- * Multirec
class Eleme... | null | https://raw.githubusercontent.com/VictorCMiraldo/generics-mrsop/b66bb6c651297cdb71655663e34ab35812b38f72/scratchpad/TypeClassAssocFamily.hs | haskell | # LANGUAGE TypeSynonymInstances #
* Multirec
* Usage | # LANGUAGE DataKinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -cpp #
module TypeClassAssocFamily where
import Outline
#define Prod [Atom]
#define Sum [Prod]
#define Family [Sum]
class Element ty (fam :: Family) where
type Idx ty fam :: Nat... |
eb18b53920a8e8a0231f4dbd91433ed2b077856c41ddccd78adde14d6aaccfcf | rametta/retros | View.hs | module Application.Helper.View where
import IHP.ViewPrelude
import Generated.Types
import Web.Controller.Prelude
renderNavbar :: AutoRoute SessionsController => AutoRoute TeamsController => Maybe (Id Team) -> Html -> Html -> Html
renderNavbar mTeamId afterLogo beforSessionBtn =
[hsx|
<nav class="flex items-cent... | null | https://raw.githubusercontent.com/rametta/retros/55da48d71a409638d3a828cf48ccfe29dc4fc5d6/Application/Helper/View.hs | haskell | module Application.Helper.View where
import IHP.ViewPrelude
import Generated.Types
import Web.Controller.Prelude
renderNavbar :: AutoRoute SessionsController => AutoRoute TeamsController => Maybe (Id Team) -> Html -> Html -> Html
renderNavbar mTeamId afterLogo beforSessionBtn =
[hsx|
<nav class="flex items-cent... | |
48c51bb276ea50ded2d7281e8da3cb653268f501d114354f2b1145acbc8fdc74 | ndmitchell/shake | Digest.hs |
module Test.Digest(main) where
import Control.Monad
import Development.Shake
import Test.Type
main = testBuild test $ do
want ["Out.txt","Out2.txt"]
"Out.txt" %> \out -> do
txt <- readFile' "In.txt"
liftIO $ appendFile out txt
["Out1.txt","Out2.txt"] &%> \[out1,out2] -> do
txt ... | null | https://raw.githubusercontent.com/ndmitchell/shake/99c5a7a4dc1d5a069b13ed5c1bc8e4bc7f13f4a6/src/Test/Digest.hs | haskell | should not involve a hash calculation (sadly no way to test that) |
module Test.Digest(main) where
import Control.Monad
import Development.Shake
import Test.Type
main = testBuild test $ do
want ["Out.txt","Out2.txt"]
"Out.txt" %> \out -> do
txt <- readFile' "In.txt"
liftIO $ appendFile out txt
["Out1.txt","Out2.txt"] &%> \[out1,out2] -> do
txt ... |
c4d9efbbd0ff7641f4bad523142ab0f9149ef3cfd966883191e90f6f7c80383e | emilaxelsson/syntactic | NanoFeldsparComp.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE TypeOperators #
Note GADTs needed by GHC 7.6 . In later GHCs is works with just TypeFamilies .
| A simple compiler for NanoFeldspar
module NanoFeldsparComp where
import Control.Monad.State
import Control.Monad.Writer
import Language.Syntactic
import Language.Syntactic.Functi... | null | https://raw.githubusercontent.com/emilaxelsson/syntactic/c51258ed96d4e9704e5842ce15667e7d3e5b77d7/examples/NanoFeldsparComp.hs | haskell | # LANGUAGE GADTs #
------------------------------------------------------------------------------
* Imperative programs
------------------------------------------------------------------------------
------------------------------------------------------------------------------
* Code generation
----------------------... | # LANGUAGE TypeOperators #
Note GADTs needed by GHC 7.6 . In later GHCs is works with just TypeFamilies .
| A simple compiler for NanoFeldspar
module NanoFeldsparComp where
import Control.Monad.State
import Control.Monad.Writer
import Language.Syntactic
import Language.Syntactic.Functional
import Language.Sy... |
ea1d77c2a14a74196f6aba9678bc146051d16d90f8798bb4dfd69f3278ff9edc | dyzsr/ocaml-selectml | t252-pushoffsetclosure.ml | TEST
include tool - ocaml - lib
flags = " -w -a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
let rec f x = x
and g _ = f 4
and h _ = f 6
in
if h 1 <> ... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tool-ocaml/t252-pushoffsetclosure.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w -a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
let rec f x = x
and g _ = f 4
and h _ = f 6
in
if h 1 <> ... | |
ad5f96d31ef3bc410f7ff336051dd6d0bb1e15f17ac98e9a58f47d7fa3134203 | lexi-lambda/racket-sample-heroku-app | server.rkt | #lang racket
(require web-server/servlet
web-server/servlet-env)
(define (start req)
(response/xexpr
'(html (head (title "Racket Heroku App"))
(body (h1 "It works!")))))
(define port (if (getenv "PORT")
(string->number (getenv "PORT"))
8080))
(serve/servlet s... | null | https://raw.githubusercontent.com/lexi-lambda/racket-sample-heroku-app/ea58d92cf1e44fe28dc5d771ed38c6a73b22c5da/server.rkt | racket | #lang racket
(require web-server/servlet
web-server/servlet-env)
(define (start req)
(response/xexpr
'(html (head (title "Racket Heroku App"))
(body (h1 "It works!")))))
(define port (if (getenv "PORT")
(string->number (getenv "PORT"))
8080))
(serve/servlet s... | |
e20a0670d6dd435f1c0571f38239e3bffb95a91dd81214e2f57e6352ca673b57 | rizo/snowflake-os | main_args.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/tools/main_args.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Para , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
let mk_a f =
"-a", Arg.Unit f,... |
b61f3466bdbaca24803024a023357d766ec5499ec46aca1e9897e6ca74c92a45 | opencog/learn | en-pairs.scm | ;
; en-pairs.scm
;
Scripts used to generate images for the English word - pair graphs .
;
; als are the stars obj
(define als (add-pair-stars pair-obj))
(define pfrq (add-pair-freq-api als))
; All of the pairs!
(define alp (add-loop-api als))
(define (noop x) x)
(define all-enprs (alp 'map-pair noop))
5544578
... | null | https://raw.githubusercontent.com/opencog/learn/c599c856f59c1815b92520bee043c588d0d1ebf9/learn-lang-diary/zh-images/en-pairs.scm | scheme |
en-pairs.scm
als are the stars obj
All of the pairs!
binned-cset-mi and weighted-cset-mi | Scripts used to generate images for the English word - pair graphs .
(define als (add-pair-stars pair-obj))
(define pfrq (add-pair-freq-api als))
(define alp (add-loop-api als))
(define (noop x) x)
(define all-enprs (alp 'map-pair noop))
5544578
Assign each word a score , using SCORE - FN , and then rank them... |
38b90efe0c27ba694a89f82f7c160bd832c6b2d5dcb11bed74cd388c220eac01 | vedang/bb-scripts | components_test.clj | (ns me.vedang.scripts.components-test
(:require [me.vedang.scripts.components :as sut]
[clojure.test :as t]))
(t/deftest clj-files
(t/is (= (set ["src/bb-scripts/components.clj"
"src/bb-scripts/util.clj"])
(set (sut/clj-files ["src/bb-scripts/components.clj"
... | null | https://raw.githubusercontent.com/vedang/bb-scripts/96c04aaa64d114dc115b3b95f2e54fd954abe999/test/me/vedang/scripts/components_test.clj | clojure | (ns me.vedang.scripts.components-test
(:require [me.vedang.scripts.components :as sut]
[clojure.test :as t]))
(t/deftest clj-files
(t/is (= (set ["src/bb-scripts/components.clj"
"src/bb-scripts/util.clj"])
(set (sut/clj-files ["src/bb-scripts/components.clj"
... | |
a39a4f7ec79253d5da5ab7b901ef0fdd50b5a8ad9331215d15eba6444c5b503d | OCamlPro/ocp-ocamlres | oCamlResMain.ml | This file is part of ocp - ocamlres - main entry
* ( C ) 2013 OCamlPro - Benjamin CANOU
*
* ocp - ocamlres is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 3.0 of t... | null | https://raw.githubusercontent.com/OCamlPro/ocp-ocamlres/8ec8bce4afb55dd13f6df30eccda60ca1f6f0d6b/src/oCamlResMain.ml | ocaml | * Outputs the list of formats with their descriptions
* Outputs the list of subformats with their descriptions
* Prints the version number | This file is part of ocp - ocamlres - main entry
* ( C ) 2013 OCamlPro - Benjamin CANOU
*
* ocp - ocamlres is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* version 3.0 of t... |
3ac3999d7f09160781955060840320bc76fc63864c6587f72940afc1c6990f61 | input-output-hk/ouroboros-network | RealPoint.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module Ouroboros.Consensus.B... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/c82309f403e99d916a76bb4d96d6812fb0a9db81/ouroboros-consensus/src/Ouroboros/Consensus/Block/RealPoint.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
* Non-genesis points
* Derived
------------------------------------------------------------------------------
Non-genesis point
----------------------------------------------------... | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module Ouroboros.Consensus.Block.RealPoint (
RealPoint (..)
, decodeRealPoint
, encodeRealPoint
, blockRealPoint
, headerRealPoint
, pointToWithOriginRealPoint
, re... |
dbaf6cd19f11da35ec6639555cfa12a2ad8586231e6b6c67149533b2023d25a3 | exercism/ocaml | forth.mli | val evaluate : string list -> int list option | null | https://raw.githubusercontent.com/exercism/ocaml/bfd6121f757817865a34db06c3188b5e0ccab518/exercises/practice/forth/forth.mli | ocaml | val evaluate : string list -> int list option | |
8ce694533c834a31da6d7983e230473b47880d44b74b07d5bae3a39966f1cc4f | josephwilk/musical-creativity | network.clj | (ns musical-creativity.composers.network
(:require
[clojure.math.numeric-tower :as math]
[clojure.pprint :refer :all]
[musical-creativity.events :as events]
[musical-creativity.util :refer :all]))
(def number-of-outputs (atom 5))
(def number-of-inputs (atom 5))
(def input-patterns (atom '((0.0 0.2 0.1 0... | null | https://raw.githubusercontent.com/josephwilk/musical-creativity/c2e6aab2a26d69ee2e51f4fad84fa3a71805e6ca/src/musical_creativity/composers/network.clj | clojure | model constants: | (ns musical-creativity.composers.network
(:require
[clojure.math.numeric-tower :as math]
[clojure.pprint :refer :all]
[musical-creativity.events :as events]
[musical-creativity.util :refer :all]))
(def number-of-outputs (atom 5))
(def number-of-inputs (atom 5))
(def input-patterns (atom '((0.0 0.2 0.1 0... |
b078b84344305d6e5f5568154cec004d238a20cbc9aa111cfe3e6e86ea851a5e | links-lang/links | sugarConstructorsIntf.ml | (* This module contains module signatures used by SugarConstructors module.
Putting them here allows to avoid repetition. *)
open CommonTypes
open Operators
open SourceCode
open Sugartypes
An abstract type of positions and operations on them . The core type of
positions used in the compilation pipeline is... | null | https://raw.githubusercontent.com/links-lang/links/5434779a4d296a58d7ca824c9cfda03804a77d4e/core/sugarConstructorsIntf.ml | ocaml | This module contains module signatures used by SugarConstructors module.
Putting them here allows to avoid repetition.
Type of positions.
Convert a position to Sugartypes.position.
Produce a syntax tree node with a position attached.
Default (dummy) position
Various smart constructors for elements of Link... |
open CommonTypes
open Operators
open SourceCode
open Sugartypes
An abstract type of positions and operations on them . The core type of
positions used in the compilation pipeline is Sugartypes.position , which
again is an alias to SourceCode.pos . However , in several places we operate
on positio... |
18881ed00d9870a87bd8b015afccb5cdfb1cef40a6424ab3b6826be4975d17c2 | capnproto/capnp-ocaml | innerArray.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* capnp - ocaml
*
* Copyright ( c ) 2013 - 2014 ,
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without ... | null | https://raw.githubusercontent.com/capnproto/capnp-ocaml/dda3d811aa7734110d7af051465011f1f823ffb9/src/runtime/innerArray.mli | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* capnp - ocaml
*
* Copyright ( c ) 2013 - 2014 ,
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without ... | |
70765c74cb73ac5f9bbb192eb5efd9969866d2d49a623769a10f48df4e82bdc8 | Veridise/Eurus | mhash.rkt | #lang rosette
(require
(prefix-in tokamak: "../tokamak.rkt")
)
(provide (all-defined-out))
(define mvoid 'mvoid)
(define (mvoid? obj)
(tokamak:typed obj concrete?)
(equal? mvoid obj)
)
cap : capacity , k2i : key - to - index mapping ( a hashmap ) , vvec : vector of cap for storing values
; mhash can onl... | null | https://raw.githubusercontent.com/Veridise/Eurus/1a416e0d285a6abdc8936743a6d67a0f90411e83/eurus/rosette/mhash.rkt | racket | mhash can only have string keys, and arbitrary values
cap exceeds
cap not exceeds
arg-val can be symbolic
existent
not existent | #lang rosette
(require
(prefix-in tokamak: "../tokamak.rkt")
)
(provide (all-defined-out))
(define mvoid 'mvoid)
(define (mvoid? obj)
(tokamak:typed obj concrete?)
(equal? mvoid obj)
)
cap : capacity , k2i : key - to - index mapping ( a hashmap ) , vvec : vector of cap for storing values
(struct mhash (... |
5872b7abfee3c15ea4f287896ec14a3fec409b0bea502f96dc76f1301e806a56 | lspitzner/brittany | Test191.hs | type (a :+: b) = (a, b)
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test191.hs | haskell | type (a :+: b) = (a, b)
| |
46b618d8e52096d671b6179e6ba6bd5cf0fb5e35bb3d3f7238d2d847a9c17704 | ocaml-ppx/ppx_tools_versioned | ppx_tools_407.ml | module Ast_convenience = Ast_convenience_407
module Ast_mapper_class = Ast_mapper_class_407
| null | https://raw.githubusercontent.com/ocaml-ppx/ppx_tools_versioned/00a0150cdabfa7f0dad2c5e0e6b32230d22295ca/ppx_tools_407.ml | ocaml | module Ast_convenience = Ast_convenience_407
module Ast_mapper_class = Ast_mapper_class_407
| |
fa78e0520df31ba5705acc8512ad2d57b1c7cacf612fdbcb8854c0509098518f | stamourv/feature-profile | composition.rkt | #lang typed/racket
(require/typed feature-profile
[feature-profile-thunk (-> (-> Any) Any)])
(define string-list
(map number->string (range 1000000)))
(define (run)
(for ([s string-list])
(define n (cast (string->number s) Integer))
(if (even? n)
(printf "~a is even\n" n)
(... | null | https://raw.githubusercontent.com/stamourv/feature-profile/cc96e3aa8efe71c013f662c60e2b0d9231b27f97/examples/composition.rkt | racket | #lang typed/racket
(require/typed feature-profile
[feature-profile-thunk (-> (-> Any) Any)])
(define string-list
(map number->string (range 1000000)))
(define (run)
(for ([s string-list])
(define n (cast (string->number s) Integer))
(if (even? n)
(printf "~a is even\n" n)
(... | |
def00ea6c6c4841ff71a89bccf99a7e9bafc8224b10d6d8ee40dc06c0e4f9974 | mirleft/ocaml-tls | test_server.ml | open! Core
open! Async
let server_cert = "./certificates/server.pem"
let server_key = "./certificates/server.key"
let serve_tls ~low_level port handler =
let%bind certificate =
Tls_async.X509_async.Certificate.of_pem_file server_cert |> Deferred.Or_error.ok_exn
in
let%bind priv_key =
Tls_async.X509_asyn... | null | https://raw.githubusercontent.com/mirleft/ocaml-tls/9a26701a077ee750496173a853207d4f520467de/async/examples/test_server.ml | ocaml | open! Core
open! Async
let server_cert = "./certificates/server.pem"
let server_key = "./certificates/server.key"
let serve_tls ~low_level port handler =
let%bind certificate =
Tls_async.X509_async.Certificate.of_pem_file server_cert |> Deferred.Or_error.ok_exn
in
let%bind priv_key =
Tls_async.X509_asyn... | |
bc4f2c2b2f73f8a790ca1833b4467679110f828449474fdda1e814f646e1f86d | steffan-westcott/clj-otel | core_async.clj | (ns example.common-utils.core-async
(:require [clojure.core.async :as async]
[ring.util.response :as response]
[steffan-westcott.clj-otel.api.trace.span :as span]))
(defn throwable?
"Returns `true` if `x` is a throwable exception, `false` otherwise."
[x]
(instance? Throwable x))
(de... | null | https://raw.githubusercontent.com/steffan-westcott/clj-otel/3df52f28dd17be8a1eab5744c09c0dedcb9f2d36/examples/common-utils/core-async/src/example/common_utils/core_async.clj | clojure | Add non-escaping exception to span as an event
Used by <with-span-binding
Implementation note: While active, the timeout channel `<timeout`
prevents the go loop becoming eligible for garbage collection if `<src`
and `<dest` are garbage collected. This guarantees that either `respond`
or `raise` are evaluated (bef... | (ns example.common-utils.core-async
(:require [clojure.core.async :as async]
[ring.util.response :as response]
[steffan-westcott.clj-otel.api.trace.span :as span]))
(defn throwable?
"Returns `true` if `x` is a throwable exception, `false` otherwise."
[x]
(instance? Throwable x))
(de... |
7c42fc03a3ce000eca7ead57c9f3f8ce67a376f7f954b485de1c99c272f01a05 | ocaml/ocamlfind | make_wizard.ml | (* $Id$
* ----------------------------------------------------------------------
*
*)
open Tk;;
open Widget;;
(**********************************************************************)
(* GLOBAL VARIABLES *)
(*********************************************************... | null | https://raw.githubusercontent.com/ocaml/ocamlfind/03eb839eb8d7102ab567e3f7232afe32cf004d9f/src/findlib-toolbox/make_wizard.ml | ocaml | $Id$
* ----------------------------------------------------------------------
*
********************************************************************
GLOBAL VARIABLES
********************************************************************
General
Preprocessor
li... |
open Tk;;
open Widget;;
let wiz_package_name = ref "";;
let wiz_package_version = ref "";;
let wiz_package_description = ref "";;
let wiz_enable_camlp4 = ref false;;
let wiz_camlp4_syntax = ref "camlp4o";;
let wiz_camlp4_options = ref "";;
Build Library
let wiz_byte_enable = ref true;;
let wiz_nat_enable =... |
47fe81b43ba975bc1a08ab7c202353f12ce6fb85ea9e7737eeaf63cd490429e2 | 97jaz/gregor | metazone.rkt | #lang racket/base
(require racket/match
racket/string
cldr/core
"../../datetime.rkt"
"../../generics.rkt")
(provide metazone-of
metazone-preferred-zone
preferred-zone->country)
(struct epoch (mz from to))
(define (metazone-of canonical-olson-id posix)
(for/fir... | null | https://raw.githubusercontent.com/97jaz/gregor/91d71c6082fec4197aaf9ade57aceb148116c11c/gregor-lib/gregor/private/pattern/l10n/metazone.rkt | racket | #lang racket/base
(require racket/match
racket/string
cldr/core
"../../datetime.rkt"
"../../generics.rkt")
(provide metazone-of
metazone-preferred-zone
preferred-zone->country)
(struct epoch (mz from to))
(define (metazone-of canonical-olson-id posix)
(for/fir... | |
f0839ba5d365c511c7ade7620a467da9acf068baf3a13a64f66cd656891e182f | qkrgud55/ocamlmulti | typeclass.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cri... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/typing/typeclass.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : typeclass.mli 12511 2012 - 05 - ... |
354aaf1b8f055889cd39fbe0cd32bf892757d26f5150b1bbc8772423a668dc8f | exoscale/interceptor | auspex.clj | (ns exoscale.interceptor.auspex
"Auspex support"
(:require [exoscale.interceptor.protocols :as p]
[exoscale.interceptor.impl :as impl]
[qbits.auspex :as auspex]))
(extend-protocol p/AsyncContext
java.util.concurrent.CompletableFuture
(then [d f] (auspex/chain d f))
(catch [d f] (auspe... | null | https://raw.githubusercontent.com/exoscale/interceptor/11c5685c1aef3fef5ac601f08971b1ebf6250c45/src/exoscale/interceptor/auspex.clj | clojure | (ns exoscale.interceptor.auspex
"Auspex support"
(:require [exoscale.interceptor.protocols :as p]
[exoscale.interceptor.impl :as impl]
[qbits.auspex :as auspex]))
(extend-protocol p/AsyncContext
java.util.concurrent.CompletableFuture
(then [d f] (auspex/chain d f))
(catch [d f] (auspe... | |
54f2fceb83c44d98736ed8ff3629123d84453d51c206aac70adcdec851d5074a | willowtreeapps/wombats-api | game.clj | (ns wombats.daos.game
(:require [datomic.api :as d]
[taoensso.timbre :as log]
[taoensso.nippy :as nippy]
[wombats.constants :refer [initial-stats]]
[wombats.game.core :as game]
[wombats.handlers.helpers :refer [wombat-error]]
[wombats.game.utils ... | null | https://raw.githubusercontent.com/willowtreeapps/wombats-api/738e4cc8d7011998695ec85e663f650be71f60ae/src/wombats/daos/game.clj | clojure | Note about game states:
Looks something like this;
↓ ↑
2 → ↑
This is what is exposed to the client
This is what our API uses internally
NOTE: This should probably stay transact (not transact-async)
until we can guarantee frames to be saved in sequential order
at a DB level.
We put this in a future so th... | (ns wombats.daos.game
(:require [datomic.api :as d]
[taoensso.timbre :as log]
[taoensso.nippy :as nippy]
[wombats.constants :refer [initial-stats]]
[wombats.game.core :as game]
[wombats.handlers.helpers :refer [wombat-error]]
[wombats.game.utils ... |
274c2c6af0aab7549020597df0f713d5b617c0c74c295a29645140c3c1c5d884 | janestreet/lwt-async | lwt_top.mli | Lightweight thread library for
* Interface Lwt_top
* Copyright ( C ) 2009
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation , with linking exceptions ;
* eit... | null | https://raw.githubusercontent.com/janestreet/lwt-async/c738e6202c1c7409e079e513c7bdf469f7f9984c/src/top/lwt_top.mli | ocaml | * Return the current completion mode.
* Change the completion mode | Lightweight thread library for
* Interface Lwt_top
* Copyright ( C ) 2009
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation , with linking exceptions ;
* eit... |
4ed4e969474ef6da7ceb27c64a8dc9568d77daa3487ef9b7da570227e05a1695 | binaryage/cljs-oops | utils.clj | (ns oops.circus.utils
(:require [clojure.java.io :as io]
[clojure.string :as string]
[cuerdas.core :as cuerdas]
[clansi]
[clojure.java.shell :as shell]
[clojure.tools.logging :as log]
[clojure.pprint :refer [pprint]]
[oops.tools :as t... | null | https://raw.githubusercontent.com/binaryage/cljs-oops/a2b48d59047c28decb0d6334e2debbf21848e29c/test/src/circus/oops/circus/utils.clj | clojure | black on black background should be displayed as gray
we want to be compatible with "copy transcript!" button which copies to clipboard with extra new-line
see gen-marker
taken from: -tools/blob/dcc9853514756f2f4fc3bfdfdba45abffd94c5dd/src/clojure/tools/file_utils.clj#L83 | (ns oops.circus.utils
(:require [clojure.java.io :as io]
[clojure.string :as string]
[cuerdas.core :as cuerdas]
[clansi]
[clojure.java.shell :as shell]
[clojure.tools.logging :as log]
[clojure.pprint :refer [pprint]]
[oops.tools :as t... |
1f22b794b6257e59d723323afccc4cd9d66e5999ee1233fcf53972f521e750cf | andrewmcveigh/cljs-time | macros.cljc | (ns cljs-time.macros "### Supporting macros")
(defmacro do-at
"Like clojure.core/do except evalautes the expression at the given date-time"
[base-date-time & body]
`(cljs-time.core/do-at* ~base-date-time
(fn [] ~@body)))
| null | https://raw.githubusercontent.com/andrewmcveigh/cljs-time/7f86226ef2bc5e1c8e00ab9c36096e76f84a73e1/src/cljs_time/macros.cljc | clojure | (ns cljs-time.macros "### Supporting macros")
(defmacro do-at
"Like clojure.core/do except evalautes the expression at the given date-time"
[base-date-time & body]
`(cljs-time.core/do-at* ~base-date-time
(fn [] ~@body)))
| |
99930eb7da41e76c73ccac17096910e60f0b07ba9d5c941e7dd6e264053ec86f | cbaggers/nineveh | bsharpe-fast-32-hash.lisp | (in-package :nineveh.hashing)
;;
;; FAST32_hash
;; A very fast hashing function. Requires 32bit support.
;; -fast-and-simple-32bit-floating-point-hash-function/
;;
;; The 2D hash formula takes the form....
hash = mod ( coord.x * coord.x * coord.y * coord.y , )
;; / SOMELARGEFLOAT
;;
;; We truncate and offse... | null | https://raw.githubusercontent.com/cbaggers/nineveh/0a10a84669cd9d1c584f54b9eab062986a5f1c47/hashing/bsharpe-fast-32-hash.lisp | lisp |
FAST32_hash
A very fast hashing function. Requires 32bit support.
-fast-and-simple-32bit-floating-point-hash-function/
The 2D hash formula takes the form....
/ SOMELARGEFLOAT
We truncate and offset the domain to the most interesting part of the noise.
picked. Only some give good results. A 3D hash is... | (in-package :nineveh.hashing)
hash = mod ( coord.x * coord.x * coord.y * coord.y , )
SOMELARGEFLOAT should be in the range of 400.0->1000.0 and needs to be hand
the SOMELARGEFLOAT value by the Z coordinate
(defun-g bs-fast32-hash ((grid-cell :vec2))
(let* ((offset (v2! 26.0 161.0))
(domain 71.0)
... |
769eb3ed3bc5c6540823313cbb41a2ad372c1e04309fe48fb1fad24c3c80a864 | Fresheyeball/Shpadoinkle | Template.hs | module Shpadoinkle.Template where
import Data.Text
import Shpadoinkle
template :: (Text -> Text) -> Html m a -> Html m a
template r (Html html) = Html $ \n p t ->
html (\tn ps cs ->
n (r tn)
((\(k,v) -> (r k, case v of PText pt -> PText (r pt); x -> x)) <$> ps)
cs)
p $
... | null | https://raw.githubusercontent.com/Fresheyeball/Shpadoinkle/8e0efbb11857a1af47038dae07b8140291c251ed/template/Shpadoinkle/Template.hs | haskell | module Shpadoinkle.Template where
import Data.Text
import Shpadoinkle
template :: (Text -> Text) -> Html m a -> Html m a
template r (Html html) = Html $ \n p t ->
html (\tn ps cs ->
n (r tn)
((\(k,v) -> (r k, case v of PText pt -> PText (r pt); x -> x)) <$> ps)
cs)
p $
... | |
f3694ce54ae191814df47e48df584e361c2800c0afe49e3972a4b43e37411299 | bytekid/mkbtt | rulex.mli | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mascott/src/rulex.mli | ocaml | ** VALUES *****************************************************************
* [rewrite r t p] rewrites term [t] with rule [r] at position [p] and
returns the resulting term together with the substitution applied to [r]
and the renamed rule.
* [narrow t r p] narrows term [t] with rule [r] at position [p] and
returns... | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... |
11980bb4a74971344f9881c084379e77ed12528c59c5015548e400edbedce299 | nuty/vela | meta.rkt | #lang racket/base
(require
web-server/http/request-structs)
(define urls-hash (make-hash))
(define default-headers
(list
(make-header #"Access-Control-Allow-Methods" #"PUT, POST, GET, DELETE, PATCH, OPTIONS")))
(define MIME-TYPE-HASH
(hash
"jpg" #"image/jpg; charset=utf-8"
"jpeg" #"image/jpeg; char... | null | https://raw.githubusercontent.com/nuty/vela/5998a2cf7101a9b98d91fce11c4c1d86f0f5a274/vela-lib/vela/meta.rkt | racket | #lang racket/base
(require
web-server/http/request-structs)
(define urls-hash (make-hash))
(define default-headers
(list
(make-header #"Access-Control-Allow-Methods" #"PUT, POST, GET, DELETE, PATCH, OPTIONS")))
(define MIME-TYPE-HASH
(hash
"jpg" #"image/jpg; charset=utf-8"
"jpeg" #"image/jpeg; char... | |
be04d2f82c605e349106e14168f1478730427409929f3aa9865e901a6169b007 | faylang/fay | nqueens.hs |
-- !!! count the number of solutions to the "n queens" problem.
module NQueens where
import Prelude
import FFI
main :: Fay ()
main = benchmark $ print (nsoln 11)
listLength :: [a] -> Int -> Int
listLength [] acc = acc
listLength (_:l) acc = listLength l (1 + acc)
listFilter :: (a -> Bool) -> [a] -> [a]
listFilte... | null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/examples/nqueens.hs | haskell | !!! count the number of solutions to the "n queens" problem. |
module NQueens where
import Prelude
import FFI
main :: Fay ()
main = benchmark $ print (nsoln 11)
listLength :: [a] -> Int -> Int
listLength [] acc = acc
listLength (_:l) acc = listLength l (1 + acc)
listFilter :: (a -> Bool) -> [a] -> [a]
listFilter f [] = []
listFilter f (a : l)
| f a = a : (listFil... |
bb427378c859727bb1b35713bada34bebb2b2a357e27bdac1dfa69e581abb954 | gdamore/tree-sitter-d | import.scm | ================================================================================
Import declaration
================================================================================
import garrett.damore;
--------------------------------------------------------------------------------
(source_file
(import_declaration... | null | https://raw.githubusercontent.com/gdamore/tree-sitter-d/ef33d2a62c7efedfa90ea6313f5f9f334379516e/test/corpus/import.scm | scheme | ================================================================================
Import declaration
================================================================================
--------------------------------------------------------------------------------
(source_file
(import_declaration
(import)
(impo... | |
396761649121ba55082dbe3c04c06e6708458df2f3c669b8e339f14ce747c099 | verystable/warframe-autobuilder | AmmoMods.hs | # LANGUAGE NoImplicitPrelude #
-- |
-- Module : Builder.Mods.MeleeMods.AmmoMods
-- Maintainer :
-- Stability : experimental
--
-- Contains function that modify ammo, applicable on melee weapons.
module Builder.Mods.MeleeMods.AmmoMods where
import ClassyPrelude
import GenericFunctions.Gen... | null | https://raw.githubusercontent.com/verystable/warframe-autobuilder/015e0bb6812711ea27071816d054cbaa1c65770b/src/Builder/Mods/MeleeMods/AmmoMods.hs | haskell | |
Module : Builder.Mods.MeleeMods.AmmoMods
Maintainer :
Stability : experimental
Contains function that modify ammo, applicable on melee weapons. | # LANGUAGE NoImplicitPrelude #
module Builder.Mods.MeleeMods.AmmoMods where
import ClassyPrelude
import GenericFunctions.GenericFunctions
import Types.GenericWeapon
|
1472bd31071ebb8d99f0745331b272470a0e891d39f7c8d0f6c8212f9b8ee9aa | jeffshrager/biobike | bbl-function-descriptions-topics.lisp | -*- Package : help ; mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
(in-package :help)
;;; +=========================================================================+
| Copyright ( c ) 2002 - 2006 JP , , |
;;; | ... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Doc/bbl-function-descriptions-topics.lisp | lisp | mode : lisp ; base : 10 ; Syntax : Common - Lisp ; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software a... |
(in-package :help)
| Copyright ( c ) 2002 - 2006 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , sub... |
645d8f0b68a8a81d1d8cc24dd917755850312ce5824f32ab18fd670200d8efc2 | DavidAlphaFox/aiwiki | aiwiki_helper.erl | -module(aiwiki_helper).
-export([parse_pager/1]).
-spec parse_pager(cowboy_req:req()) -> tuple().
parse_pager(QS)->
PageIndex = proplists:get_value(<<"index">>,QS,0),
PageCount = proplists:get_value(<<"size">>,QS,10),
PageIndex0 = ai_string:to_integer(PageIndex),
PageCount0 = ai_string:to_integer(PageCount),
... | null | https://raw.githubusercontent.com/DavidAlphaFox/aiwiki/3a2a78668d4a708fda4af35430f25a69c4b91a7e/src/utilities/aiwiki_helper.erl | erlang | -module(aiwiki_helper).
-export([parse_pager/1]).
-spec parse_pager(cowboy_req:req()) -> tuple().
parse_pager(QS)->
PageIndex = proplists:get_value(<<"index">>,QS,0),
PageCount = proplists:get_value(<<"size">>,QS,10),
PageIndex0 = ai_string:to_integer(PageIndex),
PageCount0 = ai_string:to_integer(PageCount),
... | |
115890d342d63866476088adc04c0d74b41481cd5c4b2a05bc49e304914d72a1 | Eonblast/Scalaxis | fix_queue.erl | 2009 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
d... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/src/fix_queue.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 or implied.
See the License for the specific language gov... | 2009 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(fix_queue).
-author('').
-vsn('$Id$').
-include("scalaris.hrl").
-ifdef(with_export_type_support).
-export... |
29689c071fcbf878e29b6d4fab36eadfdf9e071e2cb1423eb1804a347b8e7d54 | josefs/Gradualizer | gradualizer_erlang_abstract_code.erl | This file is part of PropEr .
%%%
%%% PropEr is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
%%% (at your option) any later version.
%%%
%%% PropEr is distributed in the... | null | https://raw.githubusercontent.com/josefs/Gradualizer/b21659436a320253ce36763f3d326b5af7c598d7/test/property_test/gradualizer_erlang_abstract_code.erl | erlang |
PropEr is free software: you can redistribute it and/or modify
(at your option) any later version.
PropEr is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for ... | This file is part of PropEr .
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 License
Alternatively , you may use this file under the terms of the Apache
distrib... |
3ad03b2b959815870133bafbdbb5f26640eebac0b0560849ea5323544a925771 | jqueiroz/lojban.io | Parsing.hs | # LANGUAGE PartialTypeSignatures #
module Language.Eberban.Parsing
( parseText
) where
import qualified Data.Text as T
import qualified Language.Eberban.Parser.Mercury as MercuryParser
| Parses Eberban text using " Language . Eberban . Parser . Mercury " .
parseText :: T.Text -> Either String _
parseText = Mercury... | null | https://raw.githubusercontent.com/jqueiroz/lojban.io/3ed69788fff21d36570604c5b8f95d795b938bde/haskell/src/Language/Eberban/Parsing.hs | haskell | # LANGUAGE PartialTypeSignatures #
module Language.Eberban.Parsing
( parseText
) where
import qualified Data.Text as T
import qualified Language.Eberban.Parser.Mercury as MercuryParser
| Parses Eberban text using " Language . Eberban . Parser . Mercury " .
parseText :: T.Text -> Either String _
parseText = Mercury... | |
626f9f5a679edde21455d9fafafd6b81e5b01805ce77bd81738f2a61cc054319 | unclebob/wator | world_imp.clj | (ns wator.world-imp
(:require [wator
[world :as world :refer :all]
[cell :as cell]
[fish :as fish]
[shark :as shark]
[water :as water]]))
(defmethod world/tick ::world/world [world]
(let [cells (::world/cells world)]
(loop [locs (keys cells)
... | null | https://raw.githubusercontent.com/unclebob/wator/3c45455647deb1364e3102e189d0cf10340ceeb4/src/wator/world_imp.clj | clojure | (ns wator.world-imp
(:require [wator
[world :as world :refer :all]
[cell :as cell]
[fish :as fish]
[shark :as shark]
[water :as water]]))
(defmethod world/tick ::world/world [world]
(let [cells (::world/cells world)]
(loop [locs (keys cells)
... | |
a9366f5285b3f9f17a3e532594e3883a125a169d268c7d21b903af589b1301a7 | rtoy/cmucl | bindings.lisp | ;;; -*- Log: hemlock.log; Package: Hemlock -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/hemlock/bindings... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/hemlock/bindings.lisp | lisp | -*- Log: hemlock.log; Package: Hemlock -*-
**********************************************************************
**********************************************************************
Some bindings:
Default key translations:
This page defines prefix characters that set specified modifier bits on
the next c... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/hemlock/bindings.lisp $")
(in-package "HEMLOCK")
(setf (key-translation #k"escape") '(:bits :meta))
(setf (key-translation #k"control-z") '(... |
55ba56230081de5d02620b0bb941c91ccccee93717117ccfcc7677faa35732eb | sylane/erod | erdom_session.erl | %%% ==========================================================================
Copyright ( c ) 2014 < >
%%%
%%% This file is part of erdom.
%%%
Erdom 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 , ei... | null | https://raw.githubusercontent.com/sylane/erod/b0c435f8546ea38b1501d3e22614fe7951c61c9a/apps/erdom/src/erdom_session.erl | erlang | ==========================================================================
This file is part of erdom.
(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 P... | Copyright ( c ) 2014 < >
Erdom 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
You should have received a copy of the GNU General Public License
2014 < >
... |
dec2148efa22fa3513a6475c7efb6e516c62bbcf5cd6a4fc304c36505a5b9be7 | ros/roslisp | slave.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Software License Agreement (BSD License)
;;
Copyright ( c ) 2008 , Willow Garage , Inc.
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with
;; or without modification, are permitted provided that the
;; following cond... | null | https://raw.githubusercontent.com/ros/roslisp/559355a8d695e34e6dedae071a9af2c065411687/src/slave.lisp | lisp |
Software License Agreement (BSD License)
All rights reserved.
Redistribution and use in source and binary forms, with
or without modification, are permitted provided that the
following conditions are met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions... | Copyright ( c ) 2008 , Willow Garage , Inc.
* Neither the name of Willow Garage , Inc. nor the names
CONTRIBUTORS " AS IS " AND ANY EXPRESS OR
COPYRIGHT OWNER OR ANY DIRECT ,
INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN
(in-package roslisp)
(de... |
14525f3fa190d3c5bed24454bbb235760fc02f1cadfea98ad9288cc62b72f0b6 | tezos/tezos-mirror | test_sc_rollup_wasm.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 Nomadic Labs < >
Copyright ( c ) 2022 ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/f51294c91d1a964bfd8163848328859b43e62554/src/proto_alpha/lib_protocol/test/unit/test_sc_rollup_wasm.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 Nomadic Labs < >
Copyright ( c ) 2022 , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRAN... |
a3ffba5e76b47f005bea32ef0538c7a994576b69c92a7cdb52e8b20e0cacf954 | icicle-lang/zebra-ambiata | Logical.hs | # LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternGuards #
module Zebra.Serial.Text.Logical (
encodeLogical
, encodeLogicalBlock
, decodeLogical
, decodeLogicalBlock
, TextLogicalEncodeError(..)
, renderTextLogicalEncodeError
, TextLogicalDeco... | null | https://raw.githubusercontent.com/icicle-lang/zebra-ambiata/394ee5f98b4805df2c76abb52cdaad9fd7825f81/zebra-core/src/Zebra/Serial/Text/Logical.hs | haskell | # LANGUAGE OverloadedStrings #
* Internal | # LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE PatternGuards #
module Zebra.Serial.Text.Logical (
encodeLogical
, encodeLogicalBlock
, decodeLogical
, decodeLogicalBlock
, TextLogicalEncodeError(..)
, renderTextLogicalEncodeError
, TextLogicalDecodeError(..)
, renderTextLogicalDe... |
1ebaa6574e8e36dc88ad2d1b1c15ee74449d7a073aaf4ca4cd4bad063c226283 | zenhack/haskell-capnp | Capnp.hs | -- |
Module : Capnp . Gen.
Description : Generated modules for the schema that ship with Cap'N Proto
--
The modules under ' Capnp . Gen. ' are generated code for the schema files that
-- ship with the Cap'N Proto reference implementation.
module Capnp.Gen.Capnp () where
| null | https://raw.githubusercontent.com/zenhack/haskell-capnp/6cf9fae35189a3668f2740d64c634675ec5fbdec/lib/Capnp/Gen/Capnp.hs | haskell | |
ship with the Cap'N Proto reference implementation. | Module : Capnp . Gen.
Description : Generated modules for the schema that ship with Cap'N Proto
The modules under ' Capnp . Gen. ' are generated code for the schema files that
module Capnp.Gen.Capnp () where
|
7f5b9e3763f7b0f1575f01577b5ce1d5017e37e92c4c8e16dc7420a574baff7a | erszcz/learning | t_with_shippai.erl | -module(t_with_shippai).
-export([t/1]).
t(X) ->
case X of
{Y,Z} -> Y + Z
end.
| null | https://raw.githubusercontent.com/erszcz/learning/b21c58a09598e2aa5fa8a6909a80c81dc6be1601/erlang-shippai/t_with_shippai.erl | erlang | -module(t_with_shippai).
-export([t/1]).
t(X) ->
case X of
{Y,Z} -> Y + Z
end.
| |
a06598e2fcd8a92eba2ed779840f59888f620ff43547ea4495478fc6fad11f6e | helpshift/hydrox | tags.clj | (ns hydrox.doc.link.tags
(:require [hara.string.case :as case]))
(def tag-required?
#{:chapter :section :subsection :subsubsection :appendix :citation})
(def tag-optional?
#{:ns :reference :image :equation})
(defn inc-candidate
"creates an incremental version of a name
(inc-candidate \"hello\") => \"h... | null | https://raw.githubusercontent.com/helpshift/hydrox/2beb3c56fad43bbf16f07db7ee72c5862978350c/src/hydrox/doc/link/tags.clj | clojure | (ns hydrox.doc.link.tags
(:require [hara.string.case :as case]))
(def tag-required?
#{:chapter :section :subsection :subsubsection :appendix :citation})
(def tag-optional?
#{:ns :reference :image :equation})
(defn inc-candidate
"creates an incremental version of a name
(inc-candidate \"hello\") => \"h... | |
dc4ea5f623bf18c9954864713046226e43d6828a5d30ca4138792725c352aeff | exoscale/seql | listener.clj | (ns seql.listener
"Facilities to register and run listeners. Listeners are
ran after a successful mutation has happened and are fed
an identifier, the transaction results as well as its initial
pameters."
(:require [seql.schema :as schema]))
(defn add-listener
"Given an environment, add a mutation handl... | null | https://raw.githubusercontent.com/exoscale/seql/7142132a5c364baf201936052095589489320e99/src/seql/listener.clj | clojure | (ns seql.listener
"Facilities to register and run listeners. Listeners are
ran after a successful mutation has happened and are fed
an identifier, the transaction results as well as its initial
pameters."
(:require [seql.schema :as schema]))
(defn add-listener
"Given an environment, add a mutation handl... | |
83ed2159d087debea5a96e21393e362e5e311bdc19091449f38ae1ec2151fe22 | SKS-Keyserver/sks-keyserver | Unique_time.mli | (***********************************************************************)
(* Unique_time.mli - Module to return unique time *)
@author
(* *)
Copyright ( C ) 2002 , 2003 , 2004 , 2... | null | https://raw.githubusercontent.com/SKS-Keyserver/sks-keyserver/a4e5267d817cddbdfee13d07a7fb38a9b94b3eee/Unique_time.mli | ocaml | *********************************************************************
Unique_time.mli - Module to return unique time
redistribute it and/or modify it under ... | @author
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2011 , 2012 , 2013 and Contributors
This file is part of SKS . SKS is free software ; you can
Public License as published by the Free So... |
b166b63411978090a0a997185cdc3d9601a9f891909eca7005638668fda1b090 | ferd/ReVault | revault_disterl.erl | %%% @doc Protocol handler in charge of translations and callback
handling over distributed Erlang .
%%%
%%% A core assumption of this module is that either parties being
%%% contacted are assumed to already be started and addressable,
%%% and that this may be handled by a stateful component
%%% that wraps communicati... | null | https://raw.githubusercontent.com/ferd/ReVault/71746984f2f5d862a203ab2f7ed51dbced69abcd/apps/revault/src/revault_disterl.erl | erlang | @doc Protocol handler in charge of translations and callback
A core assumption of this module is that either parties being
contacted are assumed to already be started and addressable,
and that this may be handled by a stateful component
that wraps communications. A similar expectation is put on
I.e. the idea he... | handling over distributed Erlang .
SSH and TCP protocols , which would have different handshake
requirements and could n't be made generic in the FSM handler .
-module(revault_disterl).
-export([callback/1, mode/1, peer/3, accept_peer/2, unpeer/2, send/2, reply/3, unpack/1]).
-define(VSN, 1).
-type state() :: ?MO... |
740740074d06008fc64c745aa5e7ba7109286d798f46928eeb440870dbd828a5 | exercism/haskell | PigLatin.hs | module PigLatin (translate) where
import Data.Char (isLetter)
import Data.List (isSuffixOf)
consonantCluster :: String -> (String, String)
consonantCluster = qu . break (`elem` "aeiou")
where qu (cs, 'u':rest) | "q" `isSuffixOf` cs = (cs ++ "u", rest)
qu pair = pair
translateWord :: String -> String
transla... | null | https://raw.githubusercontent.com/exercism/haskell/ae17e9fc5ca736a228db6dda5e3f3b057fa6f3d0/exercises/practice/pig-latin/.meta/examples/success-standard/src/PigLatin.hs | haskell | I'm not proud of this ugly hack,
but now it passes the tests. | module PigLatin (translate) where
import Data.Char (isLetter)
import Data.List (isSuffixOf)
consonantCluster :: String -> (String, String)
consonantCluster = qu . break (`elem` "aeiou")
where qu (cs, 'u':rest) | "q" `isSuffixOf` cs = (cs ++ "u", rest)
qu pair = pair
translateWord :: String -> String
transla... |
86f72312fce64da1b6c413cb994ff4ad28257dc3b9e93dad85124df6d4c7ad65 | johannesgerer/blazeT | Internal.hs | # LANGUAGE DeriveFunctor #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE CPP #
#if MIN_VERSION_blaze_markup(0,7,1)
#define PRE_BUILDER
#endif
module Text.BlazeT.Internal
(
-- * Entities exported only by the @blazeT@ version of this module
Marku... | null | https://raw.githubusercontent.com/johannesgerer/blazeT/4dc7c9b2b700d43e6b8550b218b6c67bdf20f565/src/Text/BlazeT/Internal.hs | haskell | # LANGUAGE RankNTypes #
* Entities exported only by the @blazeT@ version of this module
** Specializations for @blaze-markup@ backwards compatibility
** Running
** Executing
** Wrappers
* Entities exported also by "Text.Blaze.Internal"
$descr1
** Important types.
** Creating custom tags and attributes.
** Com... | # LANGUAGE DeriveFunctor #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
# LANGUAGE CPP #
#if MIN_VERSION_blaze_markup(0,7,1)
#define PRE_BUILDER
#endif
module Text.BlazeT.Internal
(
MarkupT(..)
,MarkupI
,mapMarkupT
,MarkupM
,Markup
,Markup2
,runMarkupT
,runM... |
38b073bd67fc9385ca7607ca77d6705521a234e8c33daa0c208c28d5ba7c141c | GaloisInc/cryptol | CryptolServer.hs | # LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module CryptolServer (module CryptolServer) where
import Control.Lens
import Control.Monad.IO.Class
import Control.Monad.Reader (ReaderT(ReaderT))
import qualified Da... | null | https://raw.githubusercontent.com/GaloisInc/cryptol/8cca24568ad499f06032c2e4eaa7dfd4c542efb6/cryptol-remote-api/src/CryptolServer.hs | haskell | # LANGUAGE OverloadedStrings #
TODO: What to do about warnings when a command completes
successfully?
^ Working on this module.
^ Working on this file.
NOTE: the "pure ()" is a callback which is invoked if/when the solver
stops for some reason. This is just a placeholder for now, and could
be replaced by someth... | # LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module CryptolServer (module CryptolServer) where
import Control.Lens
import Control.Monad.IO.Class
import Control.Monad.Reader (ReaderT(ReaderT))
import qualified Data.Aeson as JSON
import Data.Contai... |
9cb02102c46d54c5f917c2ef1f3f3ced89ee2cdc1eb071563c3f38f94b219303 | rm-hull/inkspot | project.clj | (defproject rm-hull/inkspot "0.3.0"
:description "A small Clojure/ClojureScript library for creating colour swatches"
:url "-hull/inkspot"
:license {
:name "The MIT License (MIT)"
:url ""}
:dependencies [
[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.10.339"]
[org.clojure/data.... | null | https://raw.githubusercontent.com/rm-hull/inkspot/ccb7a452a0930f451bcc6c960024d6029f616cd2/project.clj | clojure | (defproject rm-hull/inkspot "0.3.0"
:description "A small Clojure/ClojureScript library for creating colour swatches"
:url "-hull/inkspot"
:license {
:name "The MIT License (MIT)"
:url ""}
:dependencies [
[org.clojure/clojure "1.9.0"]
[org.clojure/clojurescript "1.10.339"]
[org.clojure/data.... | |
1f6cc56f800c156a83509458a6bcb628444b50a86830769b9b220b33119c79fe | brendanhay/terrafomo | DataSources.hs | -- This module is auto-generated.
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - unused - imports #
-- |
Module : . Heroku . DataSources
Copyright : ( c ) 2017 - 2018
License ... | null | https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-heroku/gen/Terrafomo/Heroku/DataSources.hs | haskell | This module is auto-generated.
|
Stability : auto-generated
* heroku_app
* heroku_space
* heroku_space_peering_info
^ @name@
- (Required)
s Text
Expr s Text
^ The minimal/required arguments.
| The main @heroku_space@ datasource definition.
^ @name@
- (Required)
s Text
Expr s Text
^ The minimal/r... |
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - unused - imports #
Module : . Heroku . DataSources
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
... |
bb720daf0647bff694e01fe397d7279eae3888ce8c20ee36bef767a8f5214a52 | binaryage/chromex | resources_private.cljs | (ns chromex.ext.resources-private (:require-macros [chromex.ext.resources-private :refer [gen-wrap]])
(:require [chromex.core]))
-- functions --------------------------------------------------------------------------------------------------------------
(defn get-strings* [config component]
(gen-wrap :function... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts_private/chromex/ext/resources_private.cljs | clojure | (ns chromex.ext.resources-private (:require-macros [chromex.ext.resources-private :refer [gen-wrap]])
(:require [chromex.core]))
-- functions --------------------------------------------------------------------------------------------------------------
(defn get-strings* [config component]
(gen-wrap :function... | |
39760c2a6b9d199f2a6178bd95964cdb98d0642e85b6002bfebe34de075645b5 | nikita-volkov/rebase | TopHandler.hs | module Rebase.GHC.TopHandler
(
module GHC.TopHandler
)
where
import GHC.TopHandler
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/GHC/TopHandler.hs | haskell | module Rebase.GHC.TopHandler
(
module GHC.TopHandler
)
where
import GHC.TopHandler
| |
e44d5df21ea5c3f21fa2a23f73ef57a2ed8dfdb3bc48f11fd5df2873a898a946 | anwarmamat/cmsc330fall20 | higher.ml | open Funs
(********************************)
(* Part 1: High Order Functions *)
(********************************)
let count_occ lst target = failwith "unimplemented"
let uniq lst = failwith "unimplemented"
let assoc_list lst = failwith "unimplemented"
let ap fns args = failwith "unimplemented"
| null | https://raw.githubusercontent.com/anwarmamat/cmsc330fall20/1f185a757ad86c37587ec15d580ea0ff728d9472/project2b/src/higher.ml | ocaml | ******************************
Part 1: High Order Functions
****************************** | open Funs
let count_occ lst target = failwith "unimplemented"
let uniq lst = failwith "unimplemented"
let assoc_list lst = failwith "unimplemented"
let ap fns args = failwith "unimplemented"
|
ca67b79166f490ba0c31db723469a2a2f29cf4675b1352a272f37cdad1deb3e3 | discus-lang/ddc | Predicates.hs | {-# OPTIONS_HADDOCK hide #-}
-- | Simple predicates on core expressions.
module DDC.Core.Exp.Annot.Predicates
( module DDC.Type.Exp.Simple.Predicates
-- * Atoms
, isXVar, isXCon
, isAtomX, isAtomW
-- * Lambdas
, isXLAM, isXLam
, isLambdaX
-- * Ap... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Exp/Annot/Predicates.hs | haskell | # OPTIONS_HADDOCK hide #
| Simple predicates on core expressions.
* Atoms
* Lambdas
* Applications
* Arguments
* Cast
* Let bindings
* Patterns
Atoms ----------------------------------------------------------------------
| Check whether an expression is a variable.
| Check whether an expression is a construc... | module DDC.Core.Exp.Annot.Predicates
( module DDC.Type.Exp.Simple.Predicates
, isXVar, isXCon
, isAtomX, isAtomW
, isXLAM, isXLam
, isLambdaX
, isXApp
, isRType
, isRWitness
, isRTerm
, isRImplicit
, isXCast
, isXCastB... |
0b04d031201917660550bc05c8531c718677ae873db400854bcad29be03237af | ranjitjhala/haddock-annot | Dependency.hs | -----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Dependency
Copyright : ( c ) 2005 ,
2007
2008
-- License : BSD-like
--
-- Maintainer :
-- Stability : provisional
-- Portability : p... | null | https://raw.githubusercontent.com/ranjitjhala/haddock-annot/ffaa182b17c3047887ff43dbe358c246011903f6/cabal-install-0.10.3/Distribution/Client/Dependency.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Client.Dependency
License : BSD-like
Maintainer :
Stability : provisional
Portability : portable
Top level interface to dependency resolution.
--------------------------------------------------... | Copyright : ( c ) 2005 ,
2007
2008
module Distribution.Client.Dependency (
resolveDependencies,
Progress(..),
foldProgress,
resolveWithoutDependencies,
DepResolverParams(..),
PackageConstraint(..),
PackagesPreferenceDefault(..),
Pa... |
c00955e77f1eed50a4317bc7983c9f09b17db5da1b2ea7e92caed9058e4b4e53 | haskell-mafia/boris | Build.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Boris.Http.Resource.Build (
collection
, item
, ignore
, cancel
) where
import Airship (Resource (..), Webmachine, defaultResource, lookupParam, putResponseBody, halt)
import Boris.Core.Data
import Bori... | null | https://raw.githubusercontent.com/haskell-mafia/boris/fb670071600e8b2d8dbb9191fcf6bf8488f83f5a/boris-http/src/Boris/Http/Resource/Build.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
module Boris.Http.Resource.Build (
collection
, item
, ignore
, cancel
) where
import Airship (Resource (..), Webmachine, defaultResource, lookupParam, putResponseBody, halt)
import Boris.Core.Data
import Boris.Http.Airship
import Bor... |
c5a215b7b186dd59c042130ce6598929c62c526562156c5a02e223f661c11545 | yuriy-chumak/ol | share.scm | (define (foo a b c d) c)
(define (bar x y z w) z)
(if (eq? foo bar)
(print "shared"))
| null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/share.scm | scheme | (define (foo a b c d) c)
(define (bar x y z w) z)
(if (eq? foo bar)
(print "shared"))
| |
3e9590a4ba8dc4b8693aaf83b880b42e8d4fcbdc574fc7643b8d7e8293df6dda | pat227/ocaml-pgsql-model | date_time_extended.mli | module Date_time_extended : sig
(*type t = Core.Time.t*)
include (module type of Core.Time)
val show : t -> Ppx_deriving_runtime.string
val pp : Format.formatter -> t -> Ppx_deriving_runtime.unit
to_string : t - > string
val of_string : string -> t
val compare : t -> t -> Ppx_deriving_run... | null | https://raw.githubusercontent.com/pat227/ocaml-pgsql-model/17f4ad13dd26fbc228867841e61d153bac890e18/src/lib/date_time_extended.mli | ocaml | type t = Core.Time.t | module Date_time_extended : sig
include (module type of Core.Time)
val show : t -> Ppx_deriving_runtime.string
val pp : Format.formatter -> t -> Ppx_deriving_runtime.unit
to_string : t - > string
val of_string : string -> t
val compare : t -> t -> Ppx_deriving_runtime.int
val equal : t ->... |
00fca241a1ee9c9c31fed757cdabf8459b04f2c96f0125101d99d07ee2ff6aff | plande/grand-scheme | set.scm | (define-module (grand set)
#:use-module (grand syntax)
#:use-module (srfi srfi-1)
#:use-module (grand examples)
#:export (union difference intersection equivalence-classes in? same-sets? same-set?
subset? member? set powerset))
(define (union . args)
(apply lset-union equal? args))
(define (difference .... | null | https://raw.githubusercontent.com/plande/grand-scheme/c40cc25373789a437fdf5e49f47f5dd456f76faf/grand/set.scm | scheme | (define-module (grand set)
#:use-module (grand syntax)
#:use-module (srfi srfi-1)
#:use-module (grand examples)
#:export (union difference intersection equivalence-classes in? same-sets? same-set?
subset? member? set powerset))
(define (union . args)
(apply lset-union equal? args))
(define (difference .... | |
f36b6bad26c8b9b992026310530808fd8d0a5207f43614fd2d75c68a855b94e7 | clojure-finance/clojask | preview.clj | (ns clojask.preview
(:require [clojure.set :as set]
[ clojask.classes . : refer [ ->ColInfo ] ]
[ clojask.classes . : refer [ ->RowInfo ] ]
[clojure.data.csv :as csv]
[clojure.java.io :as io]
[clojask.utils :refer [eval-res eval-res-ne filter-check]]
[clojask.grou... | null | https://raw.githubusercontent.com/clojure-finance/clojask/1cf122efb05370cacd5412f070cdf6890d9aa2e4/src/main/clojure/clojask/preview.clj | clojure | [clojask.onyx-comps :refer [start-onyx start-onyx-groupby start-onyx-join]]
[clojask.sort :as sort]
[clojask.aggregate.aggre-onyx-comps :refer [start-onyx-aggre]]
outer loop is the input node
index (take (count index-key) (iterate inc 0))
indices-deleted (.getDeletedCol (:col-info dataframe))
indices-not-deleted... | (ns clojask.preview
(:require [clojure.set :as set]
[ clojask.classes . : refer [ ->ColInfo ] ]
[ clojask.classes . : refer [ ->RowInfo ] ]
[clojure.data.csv :as csv]
[clojure.java.io :as io]
[clojask.utils :refer [eval-res eval-res-ne filter-check]]
[clojask.grou... |
17e5ecb0a512cf94a6aed18a226a9359c5cf836a01786726dbb1c154a2ed6b2d | k0ral/hbro | StatusBar.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
module Hbro.Gui.StatusBar
( StatusBar(..)
, asStatusBar
, statusBarName
) where
-- {{{ Imports
import Hbro.Prelude
import Graphics.UI.Gtk.Abstract.Widget
import Graphics.UI.G... | null | https://raw.githubusercontent.com/k0ral/hbro/8926b53960eb7136c4dec94eb31f2426fa34c726/library/Hbro/Gui/StatusBar.hs | haskell | # LANGUAGE ConstraintKinds #
{{{ Imports
}}}
| Status bar is just a horizontal layout that can host widgets. | # LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
module Hbro.Gui.StatusBar
( StatusBar(..)
, asStatusBar
, statusBarName
) where
import Hbro.Prelude
import Graphics.UI.Gtk.Abstract.Widget
import Graphics.UI.Gtk.Layout.HBox
import System.Glib.Types... |
4a791db0ea4918c0f26397177f296cdd4bbc6dd448ad0493ce78a847f813ae8e | clojurecademy/clojurecademy | auth.clj | (ns clojurecademy.controller.auth
(:require [clojure.string :as str]
[clojurecademy.util.resource :as resource.util :refer [check]]
[clojurecademy.validation :as validation]
[clojurecademy.dao.user :as user.dao]
[clojurecademy.util.time :as time.util]
[cloju... | null | https://raw.githubusercontent.com/clojurecademy/clojurecademy/97dc7f9b91a90a3f30ca5a3de88542c90a50ce01/src/clj/clojurecademy/controller/auth.clj | clojure | (ns clojurecademy.controller.auth
(:require [clojure.string :as str]
[clojurecademy.util.resource :as resource.util :refer [check]]
[clojurecademy.validation :as validation]
[clojurecademy.dao.user :as user.dao]
[clojurecademy.util.time :as time.util]
[cloju... | |
ac9d40cba8b488d3923ae7c51705380ce9cd63e25df4afa36fc658ca69738bf6 | nklein/userial | buffer.lisp | Copyright ( c ) 2011 nklein software
MIT License . See included LICENSE.txt file for licensing details .
(in-package :userial)
(deftype uchar () '(unsigned-byte 8))
(deftype uint () '(integer 0 *))
(deftype bufsize () '(integer 0 #.array-dimension-limit))
(deftype buffer ()
"A BUFFER is an adjustable, one-... | null | https://raw.githubusercontent.com/nklein/userial/dc34fc73385678a61c39e98f77a4443433eedb1d/userial/buffer.lisp | lisp | make-buffer function | Copyright ( c ) 2011 nklein software
MIT License . See included LICENSE.txt file for licensing details .
(in-package :userial)
(deftype uchar () '(unsigned-byte 8))
(deftype uint () '(integer 0 *))
(deftype bufsize () '(integer 0 #.array-dimension-limit))
(deftype buffer ()
"A BUFFER is an adjustable, one-... |
20fd22dd48919b5faa6010846fea10e62a1948187d299042b37932c193e881dd | threatgrid/ctia | routes.clj | (ns ctia.metrics.routes
(:require
[ctia.lib.compojure.api.core :refer [context GET]]
[ctia.http.routes.common :as routes.common]
[metrics
[core :refer [default-registry]]
[counters :as counters]
[gauges :as gauges]
[histograms :as histograms]
[meters :as meters]
[timers :as timers]
... | null | https://raw.githubusercontent.com/threatgrid/ctia/4d42a63f472490f36814c1855faf50beb45c75ba/src/ctia/metrics/routes.clj | clojure | (ns ctia.metrics.routes
(:require
[ctia.lib.compojure.api.core :refer [context GET]]
[ctia.http.routes.common :as routes.common]
[metrics
[core :refer [default-registry]]
[counters :as counters]
[gauges :as gauges]
[histograms :as histograms]
[meters :as meters]
[timers :as timers]
... | |
b35ebb355164aa5ef1bb347b970171ead7628f893994495f3537aeac0f05f8f5 | codereport/SICP-2020 | conor_hoekstra_solutions.rkt | Exercise 2.54 ( page 196 )
(require rackunit)
(define (equal? a b)
(cond ((and (null? a) (null? b)) #t)
((or (null? a) (null? b)) #f)
((eq? (car a) (car b)) (equal? (cdr a) (cdr b)))
(else #f)))
(check-equal? (equal? '(0 1 2) (range 3)) #t)
(check-equal? (equal? '(0 1 2) (range 2)) #... | null | https://raw.githubusercontent.com/codereport/SICP-2020/2d1e60048db89678830d93fcc558a846b7f57b76/Chapter%202.3%20Solutions/conor_hoekstra_solutions.rkt | racket | Symbolic Differentiation (from the book)
a) the same (in-order traversal)
b) append vs cons = O(nlogn) vs O(n)
From book
union-set via balanced-tree
Code from book
root
A .
/ \
/ \
A D A B B C A
> (encode '(A D A B B C A) sample-tree)
'(0 1 1 0 0 1 0... | Exercise 2.54 ( page 196 )
(require rackunit)
(define (equal? a b)
(cond ((and (null? a) (null? b)) #t)
((or (null? a) (null? b)) #f)
((eq? (car a) (car b)) (equal? (cdr a) (cdr b)))
(else #f)))
(check-equal? (equal? '(0 1 2) (range 3)) #t)
(check-equal? (equal? '(0 1 2) (range 2)) #... |
dacb707da986fcbd473799c48ead9fc2e237204c600d44351015e576e34863ab | typedbyte/switch | Controller.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
module Device.Nintendo.Switch.Controller where
attoparsec
import Data.Attoparsec.ByteString (IResult(Done), Parser, anyWord8, parse, take, word8)
-- base
import Data.Bits ((.&.), (.|.), Bits, shiftL, shif... | null | https://raw.githubusercontent.com/typedbyte/switch/f83ca31619cbc81ec7a7862f60543855ebbc1c85/src/Device/Nintendo/Switch/Controller.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
base
bytestring
switch
this library.
in order to prevent programming mistakes at compile-time (e.g., to prevent
sending a rumble command to a controller which has no rumble feature).
Chances are very high that you don't need this type on the val... | # LANGUAGE AllowAmbiguousTypes #
module Device.Nintendo.Switch.Controller where
attoparsec
import Data.Attoparsec.ByteString (IResult(Done), Parser, anyWord8, parse, take, word8)
import Data.Bits ((.&.), (.|.), Bits, shiftL, shiftR)
import Data.Int (Int16)
import Data.IORef (IORef)
import Data.Word ... |
d12672bc552c15f83345345adb2faa34a91ad8ec9c033914d473e9eddb07b7a3 | rabbitmq/ra-kv-store | perf.clj | (ns jepsen.checker.perf
"Supporting functions for performance analysis."
(:require [clojure.stacktrace :as trace]
[clojure.core.reducers :as r]
[clojure.set :as set]
[clojure.java.io :as io]
[clojure.tools.logging :refer [info warn]]
[jepsen.util :as util]... | null | https://raw.githubusercontent.com/rabbitmq/ra-kv-store/faf36863bb3822ef4dcd99de5635007273d35997/jepsen/jepsen/src/jepsen/checker/perf.clj | clojure | At this point we have a sequence of
v2 , ... } , ... ]
pairs, and we want a map of
{q1 -> [[time, v1], [time2, v2], ...], ...}
slow and bad
Order for the key
Order for points
Plot ops
Plot
Key
Plot
Key
Dummy point to force rendering
For each f, emit a map of quantiles to points
Plot ops
Don't graph neme... | (ns jepsen.checker.perf
"Supporting functions for performance analysis."
(:require [clojure.stacktrace :as trace]
[clojure.core.reducers :as r]
[clojure.set :as set]
[clojure.java.io :as io]
[clojure.tools.logging :refer [info warn]]
[jepsen.util :as util]... |
9c09fa6a09a9958015390a851ed8cee4b6618e3fba11de6414f607a8fac62b16 | plumatic/plumbing | pfnk_test.cljc | (ns plumbing.fnk.pfnk-test
#?(:cljs
(:require-macros
[cljs.test :refer [is deftest testing]]))
(:require
[schema.core :as s]
[plumbing.core :as p #?@(:cljs [:include-macros true])]
[plumbing.fnk.pfnk :as pfnk]
#?(:clj [clojure.test :refer :all]
:cljs cljs.test)))
(deftest meta-round-trip-tes... | null | https://raw.githubusercontent.com/plumatic/plumbing/31d01287217aff5690e78c1c5dc7eff9279a7a69/test/plumbing/fnk/pfnk_test.cljc | clojure | (ns plumbing.fnk.pfnk-test
#?(:cljs
(:require-macros
[cljs.test :refer [is deftest testing]]))
(:require
[schema.core :as s]
[plumbing.core :as p #?@(:cljs [:include-macros true])]
[plumbing.fnk.pfnk :as pfnk]
#?(:clj [clojure.test :refer :all]
:cljs cljs.test)))
(deftest meta-round-trip-tes... | |
577cb1722c74f5ffea4969bda0ea711a815967b33ce8fcc6e58b8e36ddb2e1e4 | cmonty/brainiac | layout.clj | (ns brainiac.pages.layout
(:require [brainiac.plugin :as plugin])
(:use [noir.core :only (defpartial)]
hiccup.core
hiccup.form-helpers
hiccup.page-helpers
brainiac.loader))
(defn build-panel [plugins]
[:div {:class "panel"}
(map #(plugin/render % %2) plugins (cycle ["front" "b... | null | https://raw.githubusercontent.com/cmonty/brainiac/f0e1e1e112e1b10f3f135d959c34aa8b7f2ca086/src/brainiac/pages/layout.clj | clojure | (ns brainiac.pages.layout
(:require [brainiac.plugin :as plugin])
(:use [noir.core :only (defpartial)]
hiccup.core
hiccup.form-helpers
hiccup.page-helpers
brainiac.loader))
(defn build-panel [plugins]
[:div {:class "panel"}
(map #(plugin/render % %2) plugins (cycle ["front" "b... | |
91016d5abb9a8f20d6c531441280a07696952f4ddc999e2cdf53c9fe7a2620ae | openvstorage/alba | alba_arakoon.ml |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Arakoon_client_config
module Config =
struct
type nonrec tcp_kee... | null | https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/alba_arakoon.ml | ocaml | * only SSL v3 protocol
* only TLS v1 protocol
* only TLS v1.1 protocol |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Arakoon_client_config
module Config =
struct
type nonrec tcp_kee... |
c3f3a2edf65da264b8839ce1a28594eeb1add5c88d98c37e5b475045902c6b90 | rubenbarroso/EOPL | 3_60.scm | (load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/3-8need.scm")
;When ref points to a thunk-target, we may simply return the thunk, since
;it i... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/chapter3/3_60.scm | scheme | When ref points to a thunk-target, we may simply return the thunk, since
it is thawed by deref. These are the changes needed to support this:
indirect-target:
thunk-targets:
Test that everything is working as before:
(run
"(proc (t, u, v ,w)
(proc (a, b)
(proc (x, y, z)
y | (load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/3-8need.scm")
eval - rand only creates indirect - targets when the reference points to an
(d... |
c8b7023d0077e8c718267c84c2ad9a1f13704abb1020128d9c0085c26f6c1b9e | tomfaulhaber/autodoc | params.clj | (import (java.io File))
(let [file-prefix (.getAbsolutePath (File. "../autodoc-work-area/clojure-fork"))
root (str file-prefix "/src/")]
{
:name "Clojure (Tom's Fork)",
:file-prefix file-prefix,
:root root,
:source-path ["src/clj"],
:web-src-dir "/",
:web-home "/",
:output-path (str file-... | null | https://raw.githubusercontent.com/tomfaulhaber/autodoc/56fbcd80fc7e0bb292c44722c16b76261af43239/params/clojure-fork/params.clj | clojure | (import (java.io File))
(let [file-prefix (.getAbsolutePath (File. "../autodoc-work-area/clojure-fork"))
root (str file-prefix "/src/")]
{
:name "Clojure (Tom's Fork)",
:file-prefix file-prefix,
:root root,
:source-path ["src/clj"],
:web-src-dir "/",
:web-home "/",
:output-path (str file-... | |
a3d9a5cf0da4170a63bca2308d3518fd14de0d17fafd4c0449b6340b1518ecc9 | gregr/racket-misc | codec.rkt | #lang racket/base
(provide
encode-base32hex
decode-base32hex
)
(require
"dict.rkt"
"sugar.rkt"
math/base
racket/dict
racket/function
racket/list
)
(define (list->chunks xs size)
(letn loop (values rchunks xs) = (values '() xs)
(if (<= size (length xs))
(lets (values prefix suffix) = (s... | null | https://raw.githubusercontent.com/gregr/racket-misc/0a5c9d4875288795e209d06982b82848c989d08b/codec.rkt | racket | #lang racket/base
(provide
encode-base32hex
decode-base32hex
)
(require
"dict.rkt"
"sugar.rkt"
math/base
racket/dict
racket/function
racket/list
)
(define (list->chunks xs size)
(letn loop (values rchunks xs) = (values '() xs)
(if (<= size (length xs))
(lets (values prefix suffix) = (s... | |
14e27a2f7fcd0ef4cd2913f294f1ae77c10610c0fd72b1c61a99140c4e922d53 | etoroxlabs/lira | EvmCompilerTest.hs | MIT License
--
Copyright ( c ) 2019 eToroX Labs
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
-- to use, copy, modif... | null | https://raw.githubusercontent.com/etoroxlabs/lira/33fae6d37c5467d0a59ab9e9759636f2468b3653/test/EvmCompilerTest.hs | haskell |
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above copyright not... | MIT License
Copyright ( c ) 2019 eToroX Labs
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND... |
19a7b31db2a9bf1e8bbcaf97e47eb7cf66e391c4328553950825b44f8db95fd9 | google/ormolu | proc-forms1-out.hs | {-# LANGUAGE Arrows #-}
foo0 f g x y = proc _ -> (| f (g -< (x, y)) |)
foo1 f g h x =
proc (y, z) ->
(|
test
(h f
. h g
-<
y x
. y z)
(h g
. h f
-<
y z
. y x)
|)
| null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/value/function/arrow/proc-forms1-out.hs | haskell | # LANGUAGE Arrows # |
foo0 f g x y = proc _ -> (| f (g -< (x, y)) |)
foo1 f g h x =
proc (y, z) ->
(|
test
(h f
. h g
-<
y x
. y z)
(h g
. h f
-<
y z
. y x)
|)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.