_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
c645965d23ab91951a9dbe4ed3f219160efe9ff0d4df37c16da1f13a9aace7ae
deadpendency/deadpendency
Crates.hs
module DF.Effect.FetchRegistryRepoInfo.Backend.LanguageRegistryFiles.Crates.Crates ( fetchDependencyCrates, ) where import Common.Model.Dependency.DependencyName import Common.Model.Dependency.Registry.DependencyRegistryInfo import DF.Effect.FetchRegistryRepoInfo.Backend.LanguageRegistryFiles.Crates.CratesPackage ...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/dependency-fetcher/src/DF/Effect/FetchRegistryRepoInfo/Backend/LanguageRegistryFiles/Crates/Crates.hs
haskell
module DF.Effect.FetchRegistryRepoInfo.Backend.LanguageRegistryFiles.Crates.Crates ( fetchDependencyCrates, ) where import Common.Model.Dependency.DependencyName import Common.Model.Dependency.Registry.DependencyRegistryInfo import DF.Effect.FetchRegistryRepoInfo.Backend.LanguageRegistryFiles.Crates.CratesPackage ...
5b95c4865e42ee0a928008c20875e52beea1278b3887fa69bdc5ea11504b6a29
esengie/fpl-exploration-tool
Nf.hs
module CodeGen.Nf( genNf ) where import Control.Monad.Reader import Control.Monad.State import Control.Monad.Except (throwError, lift) import Language.Haskell.Exts.Simple import Control.Lens import qualified Data.Set as Set import qualified Data.Map as Map import SortCheck import AST hiding (Var, name) import qual...
null
https://raw.githubusercontent.com/esengie/fpl-exploration-tool/bf655e65d215da4d7cae703dda7a7fde1a180b43/src/langGenerator/CodeGen/Nf.hs
haskell
- Var work ---- - TyDefs ---- We've checked our lang, can unJust - Gather and build a resulting function -
module CodeGen.Nf( genNf ) where import Control.Monad.Reader import Control.Monad.State import Control.Monad.Except (throwError, lift) import Language.Haskell.Exts.Simple import Control.Lens import qualified Data.Set as Set import qualified Data.Map as Map import SortCheck import AST hiding (Var, name) import qual...
9edef2f2f252bd03ff2a0e5298a5d6e0c434787901fd8ccb7ca3f552e27ea19f
alura-cursos/clojure-introducao
project.clj
(defproject curso "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.0"]] :repl-options {:init-ns curso.core})
null
https://raw.githubusercontent.com/alura-cursos/clojure-introducao/9b37f6cca3c33dd2382a3b44c87896d33e0246ae/project.clj
clojure
(defproject curso "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.0"]] :repl-options {:init-ns curso.core})
2bdd029199f4a6c121501e3f400282052f0fae1dfede086217482096395b3c9a
rwmjones/guestfs-tools
sysprep_operation_backup_files.ml
virt - sysprep * Copyright ( C ) 2012 - 2023 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 la...
null
https://raw.githubusercontent.com/rwmjones/guestfs-tools/57423d907270526ea664ff15601cce956353820e/sysprep/sysprep_operation_backup_files.ml
ocaml
Unix-like? If so that only operate on the unix_whitelist * filesystems, else operate on everything. Ignore root directory and non-regular files. Check the filename against all of the globs, and if it * matches any then delete it.
virt - sysprep * Copyright ( C ) 2012 - 2023 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 la...
fbf700a31e72bd3bbec80e0b3cdcaf0faf31748a1787e829ce65383447a0146c
kupl/LearnML
patch.ml
type aexp = | Const of int | Var of string | Power of (string * int) | Times of aexp list | Sum of aexp list let rec diff ((exp : aexp), (var : string)) : aexp = match exp with | Const a -> Const 0 | Var s -> if s = var then Const 1 else Const 0 | Power (s, a) -> if s != var then Const 0 else T...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/diff/sub79/patch.ml
ocaml
type aexp = | Const of int | Var of string | Power of (string * int) | Times of aexp list | Sum of aexp list let rec diff ((exp : aexp), (var : string)) : aexp = match exp with | Const a -> Const 0 | Var s -> if s = var then Const 1 else Const 0 | Power (s, a) -> if s != var then Const 0 else T...
2160940241e0712aa8821c67c4d0d8b28ce4289a51a9809fce7541700096a973
rowangithub/DOrder
08_tacas08.ml
let rec loop x y = if (Random.bool ()) then ( if (Random.bool ()) then loop (x+1) (y+100) else if (Random.bool ()) then ( let (x, y) = if (x >= 4) then (x+1, y+1) else (x, y) in let y = if (x < 0) then y - 1 else y in loop x y ) else loop x y ) else assert (x < 4 || y > 2) let main () = let x =...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/hola/08_tacas08.ml
ocaml
let rec loop x y = if (Random.bool ()) then ( if (Random.bool ()) then loop (x+1) (y+100) else if (Random.bool ()) then ( let (x, y) = if (x >= 4) then (x+1, y+1) else (x, y) in let y = if (x < 0) then y - 1 else y in loop x y ) else loop x y ) else assert (x < 4 || y > 2) let main () = let x =...
e5ed61f5e49ee5b7d86edff5583f213776255077f53d1393c6cdeb104d9b3807
lally/ppt
Cp.hs
{- |C++ Code generator -} module Ppt.Generate.Cp where import Ppt.Frame.ParsedRep import Ppt.Frame.Types import Ppt.Frame.Layout import Ppt.Generate.CpConfig import Ppt.Generate.CpPrim import Prelude hiding ((<>)) import Control.Exception (throw, NoMethodError(..)) import Control.Lens import Text.PrettyPrint ((<>),(<...
null
https://raw.githubusercontent.com/lally/ppt/67587918a6cb72cf4b5402eee222842050c110fc/src/Ppt/Generate/Cp.hs
haskell
|C++ Code generator Mid level (structures, functions, etc) type, member High-Level Generation Primitives |Wraps a 'body' in a namespace decl and #includes. The 'headers' list elements must already have either angle brackets or quotes around them. docConcat ["class ", firstName, ";"], that wraps s_index an...
module Ppt.Generate.Cp where import Ppt.Frame.ParsedRep import Ppt.Frame.Types import Ppt.Frame.Layout import Ppt.Generate.CpConfig import Ppt.Generate.CpPrim import Prelude hiding ((<>)) import Control.Exception (throw, NoMethodError(..)) import Control.Lens import Text.PrettyPrint ((<>),(<+>)) import Data.Aeson (en...
2209e15e33bdf5bb082e5aade9d0cf39b7ee259063e683168aadc9945a36c3bd
azimut/shiny
extempore.lisp
(in-package :shiny) ;;; ;; Helpers ;;; (defvar TWOPI 6.283185) (defun filter (fn 1st) (let ((ace nil)) (dolist (x 1st) (let ((val (funcall fn x))) (if val (push val ace)))) (nreverse ace))) (defun myrange (max &key (min 0) (step 1)) (loop for n from min below max by step collect n)) (d...
null
https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/lib/extempore.lisp
lisp
Helpers Define basic diatonic major Define basic diatonic minor Define basic chord symbols various scales defined as pc sets returns a scale based on a chord (standard jazz translations) General MIDI drum note numbers pc:make-chord From extempore - Scheme - instruments_ext-scm.xtm ---------------------...
(in-package :shiny) (defvar TWOPI 6.283185) (defun filter (fn 1st) (let ((ace nil)) (dolist (x 1st) (let ((val (funcall fn x))) (if val (push val ace)))) (nreverse ace))) (defun myrange (max &key (min 0) (step 1)) (loop for n from min below max by step collect n)) (defun remove-first (...
9d002d4ec07db010a12da8e70f76986ea0688e53f7ac08a84af9fd815351b2d5
iskandr/parakeet-retired
Callbacks.ml
(*** FrontEnd ***) let _ = Callback.register "register_untyped_function" FrontEnd.register_untyped_function let _ = Callback.register "run_function" FrontEnd.run_function let _ = Callback.register "run_adverb" FrontEnd.run_adverb (*** ExternalLibNames ***) let _ = Callback.register "get_prim" ExternalLibNames.get_pr...
null
https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/FrontEnd/Callbacks.ml
ocaml
** FrontEnd ** ** ExternalLibNames ** ** PTR ** ** SHAPE ** ** AST ** ** TYPE ** ** Value ** ** HostMemspace ** ** DataManager ** ** SSA ** ** LLVM **
let _ = Callback.register "register_untyped_function" FrontEnd.register_untyped_function let _ = Callback.register "run_function" FrontEnd.run_function let _ = Callback.register "run_adverb" FrontEnd.run_adverb let _ = Callback.register "get_prim" ExternalLibNames.get_prim let _ = Callback.register "get_adverb" Exte...
57d70c2f33ffe62b41a180356698e63d0ac237c8b738ca651a957840ac90c1bf
OtpChatBot/Ybot
ybot.erl
%%%----------------------------------------------------------------------------- %%% @author 0xAX <> %%% @doc Ybot entry point . %%% @end %%%----------------------------------------------------------------------------- -module(ybot). -export([start/0, stop/0]). -spec start() -> ok. start() -> [application:start...
null
https://raw.githubusercontent.com/OtpChatBot/Ybot/5ce05fea0eb9001d1c0ff89702729f4c80743872/src/ybot.erl
erlang
----------------------------------------------------------------------------- @author 0xAX <> @doc @end -----------------------------------------------------------------------------
Ybot entry point . -module(ybot). -export([start/0, stop/0]). -spec start() -> ok. start() -> [application:start(A) || A <- deps() ++ [ybot]], ok. -spec stop() -> ok. stop() -> [application:stop(A) || A <- lists:reverse(deps()) ++ [ybot]], ok. Internal functions deps() -> [compiler, syntax_t...
890ae9d9e5e9e9ce974630adbbaca8c62a4560ed9037a4cf2c43e3026b255e83
arlicle/ablog
transformers.cljc
(ns markdown.transformers (:require [clojure.string :as string] [markdown.links :refer [link image reference-link image-reference-link implicit-reference-link footnote-link]] [...
null
https://raw.githubusercontent.com/arlicle/ablog/36a9bf8c6319097353d9a1808f05b6d686a079d6/markdown/cljc/markdown/transformers.cljc
clojure
raw inline-raw italics superscript
(ns markdown.transformers (:require [clojure.string :as string] [markdown.links :refer [link image reference-link image-reference-link implicit-reference-link footnote-link]] [...
43a73b5881441c04ccbad5dcd4cfbbbeb2c17357f1ac26a81777f1ff1702c9c9
gothinkster/clojurescript-keechma-realworld-example-app
inputs.cljs
(ns app.ui.components.inputs (:require [keechma.next.helix.core :refer [with-keechma use-meta-sub dispatch]] [keechma.next.helix.lib :refer [defnc]] [helix.core :as hx :refer [$ <> suspense]] [helix.dom :as d] [helix.hooks :as hooks] ["react" :a...
null
https://raw.githubusercontent.com/gothinkster/clojurescript-keechma-realworld-example-app/f6d32f8eea5439b0b33df1afb89da6d27b7da66b/src/app/ui/components/inputs.cljs
clojure
(ns app.ui.components.inputs (:require [keechma.next.helix.core :refer [with-keechma use-meta-sub dispatch]] [keechma.next.helix.lib :refer [defnc]] [helix.core :as hx :refer [$ <> suspense]] [helix.dom :as d] [helix.hooks :as hooks] ["react" :a...
88969be21489add21ccd5ec32e2eecff57bcbd04e7361fe77aa98242f4e5ea46
janestreet/hardcaml_circuits
test_pipelined_cac_adder.ml
open Import open Pipelined_adder show the truth table for the Carry Ahead Cell used in the adder let%expect_test "cac truthtable" = let open Bits in let cac c = let a = gnd @: gnd @: bit c 0 in let b = gnd @: vdd @: bit c 1 in a +: b +: uresize (bit c 2) 3 in let cacs = List.init 8 ~f:(fun i ...
null
https://raw.githubusercontent.com/janestreet/hardcaml_circuits/a2c2d1ea3e6957c3cda4767d519e94c20f1172b2/test/test_pipelined_cac_adder.ml
ocaml
Simulate the pipeline.
open Import open Pipelined_adder show the truth table for the Carry Ahead Cell used in the adder let%expect_test "cac truthtable" = let open Bits in let cac c = let a = gnd @: gnd @: bit c 0 in let b = gnd @: vdd @: bit c 1 in a +: b +: uresize (bit c 2) 3 in let cacs = List.init 8 ~f:(fun i ...
71658b0ae6169ec8c2aa050853bc78a1d092e95cbacaed2f6f3d2b6d16b2e566
vindarel/cl-readline-example
example.lisp
;;; Example for cl-readline. ;;; ;;; This file is to be run with sbcl --script example.lisp ;;; (load #p"~/quicklisp/setup.lisp") ;;; Load some systems and define a package... (asdf:load-system :str) (asdf:load-system :cl-readline) (cl:defpackage :example (:use #:common-lisp #:alexandria) (:expo...
null
https://raw.githubusercontent.com/vindarel/cl-readline-example/c28a5ab4a58667991606c18bfa5227d212fa0329/example.lisp
lisp
Example for cl-readline. This file is to be run with Load some systems and define a package... Now let's define lists of verbs and fruits: Define and register function that does custom completion: if user enters be completed as fruits. Let's also create a custom command and bind it to some key sequence so use...
sbcl --script example.lisp (load #p"~/quicklisp/setup.lisp") (asdf:load-system :str) (asdf:load-system :cl-readline) (cl:defpackage :example (:use #:common-lisp #:alexandria) (:export #:run-example)) (in-package :example) (defvar *verbs* '("eat" "get" "throw" "quit")) (defvar *fruits* '("ban...
f593a590c4453e7b1a0e108db7d4b647c0c9ebbb12d06755ef88a6566d26a65e
evansb/cis194-hw
HW01.hs
# OPTIONS_GHC -Wall # module HW01 where -- Exercise 1 ----------------------------------------- -- Get the last digit from a number lastDigit :: Integer -> Integer lastDigit = (`mod` 10) -- Drop the last digit from a number dropLastDigit :: Integer -> Integer dropLastDigit = (`div` 10) Exercise 2 ----------------...
null
https://raw.githubusercontent.com/evansb/cis194-hw/7ee2bc5e45a6c61d021b43e19ded66a0899f9c33/spring_2015/hw1/HW01.hs
haskell
Exercise 1 ----------------------------------------- Get the last digit from a number Drop the last digit from a number --------------------------------------- --------------------------------------- --------------------------------------- --------------------------------------- -------------------------------------...
# OPTIONS_GHC -Wall # module HW01 where lastDigit :: Integer -> Integer lastDigit = (`mod` 10) dropLastDigit :: Integer -> Integer dropLastDigit = (`div` 10) toRevDigits :: Integer -> [Integer] toRevDigits n | n <= 0 = [] | otherwise = lastDigit n : toRevDigits (dropLastDigit n) Double every second number ...
5c533aba0d586627aa7d55d573d3a3d9d73ee290a0c7c30293ba190046f88881
OCamlPro/alt-ergo
symbols.ml
(******************************************************************************) (* *) (* The Alt-Ergo theorem prover *) Copyright ( C ) 2006 - 2013 ...
null
https://raw.githubusercontent.com/OCamlPro/alt-ergo/43c4cb3a4d194399eea91f09f84f4092d6d87019/src/lib/structures/symbols.ml
ocaml
**************************************************************************** The Alt-Ergo theorem prover ...
Copyright ( C ) 2006 - 2013 ...
3a7b4de571db9dfc0f939d682ebf391fc0efe91083fcc1aa3c3cab28b7a74933
moss/haskell-roguelike-challenge
rfk.hs
import Control.Monad import Model import Input import Update import LevelGeneration import Rendering instance GameView GameState where |view breaks up a GameState into UiElements > > > view Playing { robot = ( 3,4 ) , message = " Hi ! " , over = False , level = [ NKI ' x ' ( 5,6 ) " a duck " , Kitten ' k ' ( 7,8 ...
null
https://raw.githubusercontent.com/moss/haskell-roguelike-challenge/2163c3aa6f14051bc2360de0d7a1694b54ef73a3/infinite-future-roguelike-exploration/src/rfk.hs
haskell
import Control.Monad import Model import Input import Update import LevelGeneration import Rendering instance GameView GameState where |view breaks up a GameState into UiElements > > > view Playing { robot = ( 3,4 ) , message = " Hi ! " , over = False , level = [ NKI ' x ' ( 5,6 ) " a duck " , Kitten ' k ' ( 7,8 ...
034ecacb359002954a9929721896e81332df0641c7bad4eeab47a47820fc31bb
plewto/Cadejo
filter_editor.clj
(ns cadejo.instruments.alias.editor.filter-editor (:require [cadejo.instruments.alias.constants :as constants]) (:require [cadejo.instruments.alias.editor.matrix-editor :as matrix]) (:require [cadejo.ui.util.sgwr-factory :as sfactory]) (:require [cadejo.ui.util.lnf :as lnf]) (:require [cadejo.ui.instruments.s...
null
https://raw.githubusercontent.com/plewto/Cadejo/2a98610ce1f5fe01dce5f28d986a38c86677fd67/src/cadejo/instruments/alias/editor/filter_editor.clj
clojure
' ignore not implemented ---------------------------------------------------------------------- Distortion tick marks ---------------------------------------------------------------------- FM -----------------------------------------------------...
(ns cadejo.instruments.alias.editor.filter-editor (:require [cadejo.instruments.alias.constants :as constants]) (:require [cadejo.instruments.alias.editor.matrix-editor :as matrix]) (:require [cadejo.ui.util.sgwr-factory :as sfactory]) (:require [cadejo.ui.util.lnf :as lnf]) (:require [cadejo.ui.instruments.s...
d65b7d94b2280c365466f51ab75666f1f3169a2158041cf8124aac94bfa6725c
quchen/prettyprinter
IO.hs
Provide a fake API , mimicking Data . Text . IO from text package , -- but actually backed by type Text = String. It is used only in rare -- circumstances, when prettyprinter is built with -text flag. -- # OPTIONS_GHC -fno - warn - missing - signatures # module Data.Text.IO where import qualified System.IO hPutSt...
null
https://raw.githubusercontent.com/quchen/prettyprinter/205b33843f6f098db441a64195ec48fb407add8e/prettyprinter/src-text/Data/Text/IO.hs
haskell
but actually backed by type Text = String. It is used only in rare circumstances, when prettyprinter is built with -text flag.
Provide a fake API , mimicking Data . Text . IO from text package , # OPTIONS_GHC -fno - warn - missing - signatures # module Data.Text.IO where import qualified System.IO hPutStr = System.IO.hPutStr putStrLn = System.IO.putStrLn
6ac9d0f0686f0f63c15ca4c04acf4a795e27d565e6c7ee006c9b4daff3c50ba7
mikelevins/categories
c3-domain-examples.scm
;;;; *********************************************************************** ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: c3-domain-examples.scm ;;;; Project: Categories ;;;; Purpose: Example uses of the =c3= domain ;;;; Author: mikel evins Copyright : Copyright 2009 by mikel evins , all ...
null
https://raw.githubusercontent.com/mikelevins/categories/66e3861071e4d88b7b27421a78ab497e1fb5fa0c/0.2.1/scm/gambit/c3-domain-examples.scm
scheme
*********************************************************************** FILE IDENTIFICATION Name: c3-domain-examples.scm Project: Categories Purpose: Example uses of the =c3= domain Author: mikel evins See the accompanying file "License" for more information ********...
Copyright : Copyright 2009 by mikel evins , all rights reserved License : Licensed under the Apache License , version 2.0 (include "structure-macros.scm") (include "c3-domain-macros.scm") (define print-user (function =c3=)) (define <user> (structure () username password)) (c3:derive-type! =c3= <user...
0269c14db68723a7684af3cdcae844b4b2ead18518960103260c9109ab936d34
gonimo/gonimo
PersistDatabase.hs
{-# LANGUAGE GADTs #-} module Gonimo.Database.Effects.PersistDatabase where import Control.Exception.Lifted (try) import Control.Monad.Freer.Internal (Eff(..), Arrs, decomp, qApp) import Control.Monad.Freer.Exception (Exc(..), runError) import Control.Monad.Trans.Reader (ReaderT) import Data.Monoid ((<>)) import Data...
null
https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/back/src/Gonimo/Database/Effects/PersistDatabase.hs
haskell
# LANGUAGE GADTs # Little experiment of composing multiple IO interpreters Little experiment of composing multiple IO interpreters }
module Gonimo.Database.Effects.PersistDatabase where import Control.Exception.Lifted (try) import Control.Monad.Freer.Internal (Eff(..), Arrs, decomp, qApp) import Control.Monad.Freer.Exception (Exc(..), runError) import Control.Monad.Trans.Reader (ReaderT) import Data.Monoid ((<>)) import Database.Persist import Gon...
179eecc995fec5be8a9e88f63b6d4df619fb627812405fd4acaee2b7f6abb349
strint/sicpAns
2010_interval_div.scm
(define (make-interval a b) (cons a b)) (define (lower-bound i) (car i)) (define (upper-bound i) (cdr i)) (define (mul-interval x y) (let ((p1 (* (lower-bound x) (lower-bound y))) (p2 (* (lower-bound x) (upper-bound y))) (p3 (* (upper-bound x) (lower-bound y))) (p4 (* (upper-bound x) (up...
null
https://raw.githubusercontent.com/strint/sicpAns/efc4bdfaab7583117d42f2141d4b3b9e12792b79/2.1.4-4_IntervalArithmetic/2010_interval_div.scm
scheme
test
(define (make-interval a b) (cons a b)) (define (lower-bound i) (car i)) (define (upper-bound i) (cdr i)) (define (mul-interval x y) (let ((p1 (* (lower-bound x) (lower-bound y))) (p2 (* (lower-bound x) (upper-bound y))) (p3 (* (upper-bound x) (lower-bound y))) (p4 (* (upper-bound x) (up...
d3f5d31f1583204038a28be452e4623c566bdee9d7fa73aff0da27388baff503
imandra-ai/ocaml-opentelemetry
metrics_service_pb.ml
[@@@ocaml.warning "-27-30-39"] type export_metrics_service_request_mutable = { mutable resource_metrics : Metrics_types.resource_metrics list; } let default_export_metrics_service_request_mutable () : export_metrics_service_request_mutable = { resource_metrics = []; } type export_metrics_partial_success_mutable ...
null
https://raw.githubusercontent.com/imandra-ai/ocaml-opentelemetry/3dc7d63c7d2c345ba13e50b67b56aff878b6d0bb/src/metrics_service_pb.ml
ocaml
[@@@ocaml.warning "-27-30-39"] type export_metrics_service_request_mutable = { mutable resource_metrics : Metrics_types.resource_metrics list; } let default_export_metrics_service_request_mutable () : export_metrics_service_request_mutable = { resource_metrics = []; } type export_metrics_partial_success_mutable ...
4ec09b4e2fb0bf88ca2a7bdc831b1594c6390ef67001bed54a8b10eb1a40d27c
lamdu/lamdu
Styled.hs
-- | Styled widgets Apply the theme to various widgets and guis module Lamdu.GUI.Styled ( grammar, info , text , mkLabel, mkFocusableLabel , label, focusableLabel , addValBG, addBgColor , addValPadding, addValFrame , deletedDef, deletedUse , actionable , withColor , nameAtBind...
null
https://raw.githubusercontent.com/lamdu/lamdu/5b15688e53ccbf7448ff11134b3e51ed082c6b6c/src/Lamdu/GUI/Styled.hs
haskell
| Styled widgets | Add a diagonal line (top-left to right-bottom).
Apply the theme to various widgets and guis module Lamdu.GUI.Styled ( grammar, info , text , mkLabel, mkFocusableLabel , label, focusableLabel , addValBG, addBgColor , addValPadding, addValFrame , deletedDef, deletedUse , actionable , withColor , nameAtBinder , unitSprite,...
52d8fdaac38d1e8a39837f586ec9c2efb68be0b8c047ed826bfaa22143a31844
alaricsp/chicken-scheme
takl.scm
;;;; takl.scm (define (listn n) (if (= 0 n) '() (cons n (listn (- n 1)))) ) (define 18l (listn 18)) (define 12l (listn 12)) (define 6l (listn 6)) (define (mas x y z) (if (not (shorterp y x)) z (mas (mas (cdr x) y z) (mas (cdr y) z x) (mas (cdr z) x y)))) (define (shor...
null
https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/benchmarks/takl.scm
scheme
takl.scm
(define (listn n) (if (= 0 n) '() (cons n (listn (- n 1)))) ) (define 18l (listn 18)) (define 12l (listn 12)) (define 6l (listn 6)) (define (mas x y z) (if (not (shorterp y x)) z (mas (mas (cdr x) y z) (mas (cdr y) z x) (mas (cdr z) x y)))) (define (shorterp x y) (a...
e154ccb40d39a1558275a78d667a375a3dae688ade7b8b8f2b5c2de82689f0a0
findmyway/reinforcement-learning-an-introduction
random_walk.clj
gorilla-repl.fileformat = 1 ;; @@ (ns rl.chapter06.random-walk (:require [incanter.stats :refer [sample-binomial]] [clojure.core.matrix :as m] [clojure.core.matrix.stats :refer [mean]] [rl.util :refer [take-until]]) (:use [plotly-clj.core])) ;; @@ ;; => ;;; {"type":"html","con...
null
https://raw.githubusercontent.com/findmyway/reinforcement-learning-an-introduction/6911efbe7a6478658b188022ebad542751146ddd/src/rl/chapter06/random_walk.clj
clojure
@@ @@ => {"type":"html","content":"<span class='clj-nil'>nil</span>","value":"nil"} <= @@ @@ => {"type":"html","content":"<script src=\"-latest.min.js\" type=\"text/javascript\"></script>","value":"pr'ed value"} <= @@ @@ => {"type":"html","content":"<span class='clj-var'>#&#x27;rl.chapter06.random-walk/tr...
gorilla-repl.fileformat = 1 (ns rl.chapter06.random-walk (:require [incanter.stats :refer [sample-binomial]] [clojure.core.matrix :as m] [clojure.core.matrix.stats :refer [mean]] [rl.util :refer [take-until]]) (:use [plotly-clj.core])) (online-init) (def init-states [0 0.5 0...
7852179962f197861b45e1f65dc5e78b5f8a8d92d1769afe7ab982399e70d1a6
monadbobo/ocaml-core
readline__input_char.mli
(* This is an internal module: it shouldn't be used outside of core_extended *) open Core.Std type t = [ | `Backspace | `Tab | `Newline | `Char of char | `Up | `Down | `Left | `Right | `Home | `End | `Delete | `Eof | `Unknown_escape of (string*int option*int option) ] val get : unit -> t
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib/readline__input_char.mli
ocaml
This is an internal module: it shouldn't be used outside of core_extended
open Core.Std type t = [ | `Backspace | `Tab | `Newline | `Char of char | `Up | `Down | `Left | `Right | `Home | `End | `Delete | `Eof | `Unknown_escape of (string*int option*int option) ] val get : unit -> t
f8e9388cad173918a44e6f4a30853ab8ac6f3d15d954bf0cbda8bad7df8f8c19
sweirich/trellys
Syntax.hs
# LANGUAGE TemplateHaskell , DeriveDataTypeable , ScopedTypeVariables , FlexibleInstances , MultiParamTypeClasses , FlexibleContexts , UndecidableInstances , TypeFamilies # FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, UndecidableInstances, TypeFamilies #-} # OPTIONS_GHC -fno - warn - orpha...
null
https://raw.githubusercontent.com/sweirich/trellys/63ea89d8fa09929c23504665c55a3d909fe047c5/lib/sep-core/Language/SepCore/Syntax.hs
haskell
| I define expr data for display purpose only. deriving(Show) deriving(Show) Bind a term var and a proof var in a proof. type TermBranches = [(TermScheme,Term)] \z:Z.zx a proof yz a proof [yz/x](\z:Z.zx)=\z:Z.z(yz') yz is term \z:Y.zx is a term [yz/x](\z:Z.zx)=\z:Z.z(yz') yz is pr...
# LANGUAGE TemplateHaskell , DeriveDataTypeable , ScopedTypeVariables , FlexibleInstances , MultiParamTypeClasses , FlexibleContexts , UndecidableInstances , TypeFamilies # FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, UndecidableInstances, TypeFamilies #-} # OPTIONS_GHC -fno - warn - orpha...
6b7e136b1f4c2344fef10f411a76878c95d8189cb730edf938e0dc04673c6db7
davidlazar/ocaml-semantics
match-constr02.ml
match Some 1 with None -> 2 | Some _ -> 1
null
https://raw.githubusercontent.com/davidlazar/ocaml-semantics/6f302c6b9cced0407d501d70ad25c2d2aefbb77d/tests/unit/match-constr02.ml
ocaml
match Some 1 with None -> 2 | Some _ -> 1
fe28515bace71964788dd8d55e89b1bc6e3862955bccd0223f0c569564c64056
smallhadroncollider/taskell-2.0
EditorSpec.hs
module Taskell.UI.Text.EditorSpec ( spec ) where import RIO import Test.Hspec import Taskell.Error (e) import Taskell.UI.Text.Editor -- tests spec :: Spec spec = parallel $ do describe "begin" $ do it "goes to first character" $ ((^. cursor) <$> (begin =<< create 20 "...
null
https://raw.githubusercontent.com/smallhadroncollider/taskell-2.0/baf2970357665370f1b6f108b79548dfae8dd146/test/Taskell/UI/Text/EditorSpec.hs
haskell
tests
module Taskell.UI.Text.EditorSpec ( spec ) where import RIO import Test.Hspec import Taskell.Error (e) import Taskell.UI.Text.Editor spec :: Spec spec = parallel $ do describe "begin" $ do it "goes to first character" $ ((^. cursor) <$> (begin =<< create 20 "Hello")) ...
97073404fcc48f046ba2d933a18315ea90c1491881bd2aed48dcba11dcafbbae
ghc/nofib
parfact.hs
-- -*- haskell -*- Time - stamp : < 2005 - 11 - 09 15:46:13 simonmar > -- -- Doing a factorial-like computation, actually just sum, using a std parallel divide - and - conquer stucture . -- Haskell98 version. ----------------------------------------------------------------------------- module Main(main) where imp...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/parallel/OLD/parfact/parfact.hs
haskell
-*- haskell -*- Doing a factorial-like computation, actually just sum, using a std Haskell98 version. --------------------------------------------------------------------------- size of the interval threshold thresholding version seq version below t par d&c version
Time - stamp : < 2005 - 11 - 09 15:46:13 simonmar > parallel divide - and - conquer stucture . module Main(main) where import System.Environment (getArgs) import Control.Parallel main = do args <- getArgs let res = pfact n t + + " \nResult is " + + ...
ff5e4924eaa80b33d0c7a2f12b0315349dbc03f301e0ad4428e9fc7f31795eae
shamazmazum/neural-classifier
mnist.lisp
(in-package :neural-classifier-mnist) (defparameter *mnist-dataset-path* (asdf:system-relative-pathname :neural-classifier/mnist #p"mnist/dataset/") "Path to MNIST dataset") (defvar *train-data* nil) (defvar *test-data* nil) (defconstant +image-magic+ 2051) (defconstant +label-magic+ 2049) (alex:define-co...
null
https://raw.githubusercontent.com/shamazmazum/neural-classifier/bbc833b93817dde9072110d358c58ae1058c102b/mnist/mnist.lisp
lisp
(in-package :neural-classifier-mnist) (defparameter *mnist-dataset-path* (asdf:system-relative-pathname :neural-classifier/mnist #p"mnist/dataset/") "Path to MNIST dataset") (defvar *train-data* nil) (defvar *test-data* nil) (defconstant +image-magic+ 2051) (defconstant +label-magic+ 2049) (alex:define-co...
582a892f01a219874c11178be6af11b1002a446becbbc6f89c2d804f8a6eb3b1
duelinmarkers/insfactor
minimal_ns.clj
(ns duelinmarkers.insfactor.subjects.minimal-ns)
null
https://raw.githubusercontent.com/duelinmarkers/insfactor/8085c4e582735f928752cbed9f5957cf95321e57/test/duelinmarkers/insfactor/subjects/minimal_ns.clj
clojure
(ns duelinmarkers.insfactor.subjects.minimal-ns)
c088fd813626e124898c7f82d3f27f363f486ae444d31cc1cfde07af486b1b1d
spectrum-finance/cardano-dex-backend
Context.hs
module Spectrum.Prelude.Context ( HasType , MonadReader , askContext , ask ) where import RIO ( MonadReader(ask), asks ) import Data.Generics.Product.Typed ( HasType, typed ) import Data.Generics.Internal.VL.Lens ( view ) askContext :: forall m env a. (HasType a env, MonadReader env m) => m a askContex...
null
https://raw.githubusercontent.com/spectrum-finance/cardano-dex-backend/e3a99b8a7f0edcadc6a777a7379c67d6dfa705a1/spectrum-prelude/src/Spectrum/Prelude/Context.hs
haskell
module Spectrum.Prelude.Context ( HasType , MonadReader , askContext , ask ) where import RIO ( MonadReader(ask), asks ) import Data.Generics.Product.Typed ( HasType, typed ) import Data.Generics.Internal.VL.Lens ( view ) askContext :: forall m env a. (HasType a env, MonadReader env m) => m a askContex...
60ff427018bfdf9f41ab90771e1e6e2974c9aba107c1dd1652335b89ff8f8887
futurice/haskell-mega-repo
AddItemRequest.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE InstanceSigs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # {-# LANGUAGE TemplateHaskell #-} # LANGUAGE TypeFamilies # {-# LANGUAGE TypeOperators #-} module Futurice.App.Library.Types.AddItemRequest where impo...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/library-app/src/Futurice/App/Library/Types/AddItemRequest.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators #
# LANGUAGE InstanceSigs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # module Futurice.App.Library.Types.AddItemRequest where import Data.Char (digitToInt, isDigit) import Data.Text.Read (decimal) import Futurice.Office (offOther) import F...
bb01a566ccc6a59f4d44f5e9989b8cd9c5dd25aa404263c89483d6300625f9b8
DKurilo/hackerrank
solution.hs
# LANGUAGE OverloadedStrings , UnicodeSyntax # module Main where import Prelude.Unicode import Control.Monad import qualified Data.ByteString.Char8 as BSC import Data.List import Data.Ord import qualified Data.IntMap as DM import Debug.Trace import System.IO data Building = B Int Int Int -- index per day initial h...
null
https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/mirko-at-construction-site/solution.hs
haskell
index per day initial height error
# LANGUAGE OverloadedStrings , UnicodeSyntax # module Main where import Prelude.Unicode import Control.Monad import qualified Data.ByteString.Char8 as BSC import Data.List import Data.Ord import qualified Data.IntMap as DM import Debug.Trace import System.IO deriving (Show, Eq) instance Ord Building where c...
9c8b26b2381ea2bc8952658c0d5f1ab40416ca6876ef4608a793edbc4ba61140
gorillalabs/neo4j-clj
database.clj
(ns joplin.neo4j.database (:require [clj-time [coerce :as tc] [core :as t]] [neo4j-clj.core :as neo4j] [joplin.core :as j] [ragtime.protocols :refer [DataStore]])) Connecting with the database on - demand rather than in new - database makes for a pret...
null
https://raw.githubusercontent.com/gorillalabs/neo4j-clj/f3f5e1632a23de06d4dd4b7b680c8ab06a7c10fc/src/joplin/neo4j/database.clj
clojure
because this macro is used by migrations as well. ============================================================================ ============================================================================
(ns joplin.neo4j.database (:require [clj-time [coerce :as tc] [core :as t]] [neo4j-clj.core :as neo4j] [joplin.core :as j] [ragtime.protocols :refer [DataStore]])) Connecting with the database on - demand rather than in new - database makes for a pret...
528f265d75496e460ccd9539b5d1d4e6abe6fe9abe851866339c108987a1290e
evincarofautumn/kitten
Platform.hs
| Module : Kitten . Platform Description : Target platform identifier Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : experimental Portability : GHC Module : Kitten.Platform Description : Target platform identifier Copyright : (c) Jon Purdy, 2016 License ...
null
https://raw.githubusercontent.com/evincarofautumn/kitten/a5301fe24dbb9ea91974abee73ad544156ee4722/lib/Kitten/Platform.hs
haskell
| Module : Kitten . Platform Description : Target platform identifier Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : experimental Portability : GHC Module : Kitten.Platform Description : Target platform identifier Copyright : (c) Jon Purdy, 2016 License ...
03aa29af54ee84a4fe2f2c781502c6887a0b805913bc63a715fc53d9b0ee4925
xanxys/hs2bf
Main.hs
-- | Create a chain based on given arguments and run it. -- -- Overall development policy: -- -- * If you seek /elegant/ abstraction, you will get /elephant/ abstraction. -- -- * All intermediate-languages should be interpretable in 'IO' monad with exactly same behavior, -- or at least have such semantics. -- -- * In...
null
https://raw.githubusercontent.com/xanxys/hs2bf/fd8ef0fd42490779a7f082bc778afdfac77a7a9c/Main.hs
haskell
| Create a chain based on given arguments and run it. Overall development policy: * If you seek /elegant/ abstraction, you will get /elephant/ abstraction. * All intermediate-languages should be interpretable in 'IO' monad with exactly same behavior, or at least have such semantics. * Interpreters should no...
module Main where import Control.Monad import System.Environment import System.FilePath.Posix import System.IO import qualified Paths_hs2bf import Util import qualified Front import qualified Core import qualified GMachine import qualified SAM import qualified Brainfuck main=execCommand =<< liftM parseArgs getArgs ...
ffec7aefe4280ea831acf3a3ec4a7e4998f8c03e2e58b699e39237e4d4b0aa09
EFanZh/EOPL-Exercises
exercise-5.x-letrec-lang-test.rkt
#lang racket/base (require rackunit) (require "../solutions/exercise-5.x-letrec-lang.rkt") (check-equal? (run "2") (num-val 2)) (check-equal? (run "-(3, 3)") (num-val 0)) (check-equal? (run "-(3, 4)") (num-val -1)) (check-equal? (run "-(4, 3)") (num-val 1)) (check-equal? (run "zero?(0)") (bool-val #t)) (check-equal? ...
null
https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-5.x-letrec-lang-test.rkt
racket
#lang racket/base (require rackunit) (require "../solutions/exercise-5.x-letrec-lang.rkt") (check-equal? (run "2") (num-val 2)) (check-equal? (run "-(3, 3)") (num-val 0)) (check-equal? (run "-(3, 4)") (num-val -1)) (check-equal? (run "-(4, 3)") (num-val 1)) (check-equal? (run "zero?(0)") (bool-val #t)) (check-equal? ...
9ce888d9203e7722e857d7e5b9cda563bfda31ebcce39af67b72207b43d0edb3
fluentpython/lispy
chap8j.scm
$ I d : chap8j.scm , v 1.1 1993/09/19 18:49:04 queinnec Exp $ ;;; A reflective interpreter with non-systematically reified ;;; continuation and environment. These can be obtained through export ;;; and call/cc. Special forms are coded as fexprs. Bytecode size roughly 1 K bytes . (call/cc (lambda (exit) ((la...
null
https://raw.githubusercontent.com/fluentpython/lispy/6b995c398e2d100fc3fc292e34ba1a00c0ae9b5a/references/LiSP-2ndEdition-2006Dec11/tmp.si/chap8j.scm
scheme
A reflective interpreter with non-systematically reified continuation and environment. These can be obtained through export and call/cc. Special forms are coded as fexprs. extend! error make-toplevel toplevel eval or evlis eprogn reference begin quote if set! lambda export real work end of chap8j.s...
$ I d : chap8j.scm , v 1.1 1993/09/19 18:49:04 queinnec Exp $ Bytecode size roughly 1 K bytes . (call/cc (lambda (exit) ((lambda (extend! error make-toplevel) (begin (set! extend! (lambda (env names values) (if (pair? names) (if (pair? values)...
f75e8d2cb724a38519ee26b0fc074be69fa48c40d2fda3f05fb37ba7562a32b7
lsrcz/mini-prover
Intro.hs
module MiniProver.Proof.Tactics.Intro ( handleIntro ) where import MiniProver.Proof.ProofDef import MiniProver.Core.Typing import MiniProver.Core.Syntax import MiniProver.Core.Context import MiniProver.Core.Rename import MiniProver.PrettyPrint.PrettyPrint import Debug.Trace handleIntro :: Goal -> Tactic -> Eith...
null
https://raw.githubusercontent.com/lsrcz/mini-prover/0aa4cdf3b495ddf6707f27dcbee810d519b43177/src/MiniProver/Proof/Tactics/Intro.hs
haskell
module MiniProver.Proof.Tactics.Intro ( handleIntro ) where import MiniProver.Proof.ProofDef import MiniProver.Core.Typing import MiniProver.Core.Syntax import MiniProver.Core.Context import MiniProver.Core.Rename import MiniProver.PrettyPrint.PrettyPrint import Debug.Trace handleIntro :: Goal -> Tactic -> Eith...
eaa13d33e01cb03cb10d231cfc55e3c700d6939b94b4ec7cef4c58e24b04ac84
rowangithub/DOrder
cliquetree.ml
(**************************************************************************) (* *) : a generic graph library for OCaml Copyright ( C ) 2004 - 2007 , and (* ...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/external/ocamlgraph/src/cliquetree.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
: a generic graph library for OCaml Copyright ( C ) 2004 - 2007 , and modify it under the terms of the GNU Library General Public License version 2 , with the special exception on linking * Cli...
731fcaecd6dc7d792e418aa29cd19ec2301f989fe27b70cb42faf758dbf9d3c1
LaurentMazare/ocaml-bert
albert.mli
open! Base open! Torch module Config = Albert_config val model : Var_store.t -> Config.t -> Tensor.t -> mask:Tensor.t option -> token_type_ids:Tensor.t option -> position_ids:Tensor.t option -> is_training:bool -> Tensor.t * Tensor.t val masked_lm : Var_store.t -> Config.t -> Tensor.t -> mas...
null
https://raw.githubusercontent.com/LaurentMazare/ocaml-bert/23d6697833cc54173d075f904a1018db0265261d/src/model/albert.mli
ocaml
open! Base open! Torch module Config = Albert_config val model : Var_store.t -> Config.t -> Tensor.t -> mask:Tensor.t option -> token_type_ids:Tensor.t option -> position_ids:Tensor.t option -> is_training:bool -> Tensor.t * Tensor.t val masked_lm : Var_store.t -> Config.t -> Tensor.t -> mas...
3dfbfb4efa387bdb59dca8e64b791fe5c244c4325cb59a62d0cece3c807b41ce
input-output-hk/project-icarus-importer
TypesSpec.hs
# LANGUAGE ScopedTypeVariables # module Test.Pos.Slotting.TypesSpec ( spec ) where import Universum import Test.Hspec (Spec, describe, it, shouldBe, shouldSatisfy) import Data.Map import Data.Maybe (isJust, isNothing) import Data.Time.Units (Millisecond, Sec...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/lib/test/Test/Pos/Slotting/TypesSpec.hs
haskell
-------------------------------------------------------------------------- Test data -------------------------------------------------------------------------- -------------------------------------------------------------------------- Unit tests ------------------------------------------------------------------------...
# LANGUAGE ScopedTypeVariables # module Test.Pos.Slotting.TypesSpec ( spec ) where import Universum import Test.Hspec (Spec, describe, it, shouldBe, shouldSatisfy) import Data.Map import Data.Maybe (isJust, isNothing) import Data.Time.Units (Millisecond, Sec...
e2f1b802ad8088061186d8a3700808d02e03590b6c0c0f0a3fc8fa77ce01c1ae
nyu-acsys/drift
inductive3-2.ml
let rec f x = if x < -1 then f (-2) else if x <= 1 then 2 * x - 1 else x let main_p (n:int) = if n >= -1 then assert(f n >= -3) else () let main (w:unit) = let _ = main_p 12 in let _ = main_p (-1) in let _ = for i = 1 to 1000000 do main ( Random.int 1000 ) done ...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/r_type/first/inductive3-2.ml
ocaml
let rec f x = if x < -1 then f (-2) else if x <= 1 then 2 * x - 1 else x let main_p (n:int) = if n >= -1 then assert(f n >= -3) else () let main (w:unit) = let _ = main_p 12 in let _ = main_p (-1) in let _ = for i = 1 to 1000000 do main ( Random.int 1000 ) done ...
eb78786189378146d881094fba34bf05cbac8a5f2580ed65b86301d8e6a57438
haskell-suite/haskell-tc
RankN1.hs
{-# LANGUAGE RankNTypes #-} f :: (forall a. a -> a) -> () f = f k :: forall a b c. a -> b -> c k = k test1 = f ( \a - > a ) -- test2 = f k test3 n = f (k n)
null
https://raw.githubusercontent.com/haskell-suite/haskell-tc/abf5e3cc624e0095cae14c3c1c695b76ea8ffcb9/tests/RankN1.hs
haskell
# LANGUAGE RankNTypes # test2 = f k
f :: (forall a. a -> a) -> () f = f k :: forall a b c. a -> b -> c k = k test1 = f ( \a - > a ) test3 n = f (k n)
6fa36adde3323965dabf2270ff73897caec0bc520a524b80db237ff338a3853b
let-def/owee
owee_form.mli
Form codes are types for DWARF operators . In the spec , they all start with [ DW_FORM _ ] . type t = [ `addr | `block2 | `block4 | `data2 | `data4 | `data8 | `string | `block | `block1 | `data1 | `flag | `sdata | `strp | `udata | `ref_addr | `ref1 | `ref2 | `ref4 | `ref8 | `re...
null
https://raw.githubusercontent.com/let-def/owee/5c122b643a6bc5ce1a9287d2f602196b89c88378/src/owee_form.mli
ocaml
Moves the given cursor past data of type [t].
Form codes are types for DWARF operators . In the spec , they all start with [ DW_FORM _ ] . type t = [ `addr | `block2 | `block4 | `data2 | `data4 | `data8 | `string | `block | `block1 | `data1 | `flag | `sdata | `strp | `udata | `ref_addr | `ref1 | `ref2 | `ref4 | `ref8 | `re...
12166cd5b0d67241eba979b0e8996d49cae58cf0e8733c7f2fa476e94649b08d
REPROSEC/dolev-yao-star
Spec_SecretBox_Test.ml
open Prims let (key : FStar_UInt8.t Prims.list) = FStar_List_Tot_Base.map (fun x -> x) [FStar_UInt8.uint_to_t (Prims.of_int (0x1b)); FStar_UInt8.uint_to_t (Prims.of_int (0x27)); FStar_UInt8.uint_to_t (Prims.of_int (0x55)); FStar_UInt8.uint_to_t (Prims.of_int (0x64)); FStar_UInt8.uint_to_t (Prims.o...
null
https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Spec_SecretBox_Test.ml
ocaml
open Prims let (key : FStar_UInt8.t Prims.list) = FStar_List_Tot_Base.map (fun x -> x) [FStar_UInt8.uint_to_t (Prims.of_int (0x1b)); FStar_UInt8.uint_to_t (Prims.of_int (0x27)); FStar_UInt8.uint_to_t (Prims.of_int (0x55)); FStar_UInt8.uint_to_t (Prims.of_int (0x64)); FStar_UInt8.uint_to_t (Prims.o...
4098e2732d79e7d7b887c54b4df02b210bebe9f7d72a128dea64e3a5667a9aa3
huangz1990/real-world-haskell-cn
minimun.hs
file : ch11 / minimum.hs head :: [a] -> a head (x:_) = x head [] = error "Prelude.head: empty list" minimum :: (Ord a) => [a] -> a minimum [] = error "Prelude.minimum: empty list" minimum xs = foldl1 min xs
null
https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch11/minimun.hs
haskell
file : ch11 / minimum.hs head :: [a] -> a head (x:_) = x head [] = error "Prelude.head: empty list" minimum :: (Ord a) => [a] -> a minimum [] = error "Prelude.minimum: empty list" minimum xs = foldl1 min xs
3302ceb205e5faaf4cf11dfd362dcd7c45007b40188fd06284919c606be757ea
LexiFi/lrt
json.ml
(******************************************************************************) Copyright ( C ) 2020 by LexiFi . (* *) This source file is released under the terms of the MIT license as part ...
null
https://raw.githubusercontent.com/LexiFi/lrt/038ff963bd066c9d94cffb9896b04b6b8696f136/lib/json.ml
ocaml
**************************************************************************** of the lrt package. Details can be found in the attached LICENSE file. **************************************************************************** let () = ...
Copyright ( C ) 2020 by LexiFi . This source file is released under the terms of the MIT license as part Inspired by aeson library . open Xtype open Std module Parsec : sig type 'a parser val return : 'a -> 'a parser val ( <$> ) : ('a -> 'b) -> 'a pa...
0d123c01969f183c88bb12bcb7da54f9153155ad6bfe12af8757c34528940298
camllight/camllight
camlpro.ml
#open "printf";; #open "filename";; #open "config";; #open "misc";; #open "modules";; #open "location";; #open "syntax";; #open "lexer";; #open "parser";; #open "typing";; #open "ty_decl";; #open "ty_intf";; (* Errors specific to the profiler *) exception Profiler ;; let profiler_failwith s = eprintf "Profiler err...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/profiler/camlpro.ml
ocaml
Errors specific to the profiler Modes In case we forgot something Producing instrumented code User defined marker Producing results of profile run not a match it's a match let in where used only when not !instr_fun called only when !instr_fun Simulate part of the compiler job to get constructo...
#open "printf";; #open "filename";; #open "config";; #open "misc";; #open "modules";; #open "location";; #open "syntax";; #open "lexer";; #open "parser";; #open "typing";; #open "ty_decl";; #open "ty_intf";; exception Profiler ;; let profiler_failwith s = eprintf "Profiler error: %s\n" s; flush stderr; raise P...
ab427c34fa9c400d1316b6beacf189c962d74829a02bd0fefe478d6bc3d51d52
CryptoKami/cryptokami-core
Mode.hs
# LANGUAGE TypeFamilies # -- | Execution mode used in Auxx. module Mode ( -- * Mode, context, etc. AuxxContext (..) , AuxxMode , MonadAuxxMode -- * Helpers , isTempDbUsed , realModeToAuxx , makePubKeyAddressAuxx , deriveHDAddressAuxx ) wh...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/auxx/src/Mode.hs
haskell
| Execution mode used in Auxx. * Mode, context, etc. * Helpers -------------------------------------------------------------------------- Helpers -------------------------------------------------------------------------- -------------------------------------------------------------------------- Boilerplate instanc...
# LANGUAGE TypeFamilies # module Mode ( AuxxContext (..) , AuxxMode , MonadAuxxMode , isTempDbUsed , realModeToAuxx , makePubKeyAddressAuxx , deriveHDAddressAuxx ) where import Universum import Control.Lens (lens, makeLensesWith) ...
01394790fad0973c17fed69ab8fab2a223663886f31eba8b0368e112881cf1ac
ndmitchell/catch
CoreHite.hs
module Convert.CoreHite(convHite, mergeHites, convDatas, convFuncs) where import Core import Hite import Convert.CoreData import List import Maybe import Char import General.General mergeHites :: [Hite] -> Hite mergeHites xs = reachable "" $ ensureCtors $ reachableCode "" $ Hite (concatMap datas xs...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Convert/CoreHite.hs
haskell
add them back in where _ is a case variable, expand it Perform let expansion application, need sequencing variables, some are local, some are remote let expressions, expand out case expressions, always translate, some are complex and need new functions if c == "_" else
module Convert.CoreHite(convHite, mergeHites, convDatas, convFuncs) where import Core import Hite import Convert.CoreData import List import Maybe import Char import General.General mergeHites :: [Hite] -> Hite mergeHites xs = reachable "" $ ensureCtors $ reachableCode "" $ Hite (concatMap datas xs...
3ac6f1d928e336626e6a7563a84f320c0d761fdceed0ed620d7bf3f96b160539
CryptoKami/cryptokami-core
BinarySpec.hs
-- | This module tests Binary instances. module Test.Pos.Types.Identity.BinarySpec ( spec ) where import Test.Hspec (Spec, describe) import Universum import Pos.Arbitrary.Core () import Pos.Arbitrary.Infra () import qualified Pos.Core as T import Pos.Da...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lib/test/Test/Pos/Types/Identity/BinarySpec.hs
haskell
| This module tests Binary instances.
module Test.Pos.Types.Identity.BinarySpec ( spec ) where import Test.Hspec (Spec, describe) import Universum import Pos.Arbitrary.Core () import Pos.Arbitrary.Infra () import qualified Pos.Core as T import Pos.Data.Attributes (Attributes (..)) import ...
686e7afcaa941a19b32489d5cd21c5bf5329b131e2cb47b3318780f70edee785
ocamllabs/ocaml-modular-implicits
odoc_text.ml
(***********************************************************************) (* *) (* OCamldoc *) (* *) , projet ...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/ocamldoc/odoc_text.ml
ocaml
********************************************************************* OCamldoc ...
, projet Cristal , INRIA Rocquencourt Copyright 2001 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 . open Odoc_types module Texter = struct...
2a4b4c2106e9a775c89ac7e0aa016a3969d3a21c91c32a4380cfedb5c1aae384
votinginfoproject/data-processor
election_official.clj
(ns vip.data-processor.output.v3-0.election-official (:require [vip.data-processor.output.xml-helpers :refer :all] [korma.core :as korma])) (defn ->xml [{:keys [id name title phone fax email]}] (let...
null
https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/src/vip/data_processor/output/v3_0/election_official.clj
clojure
(ns vip.data-processor.output.v3-0.election-official (:require [vip.data-processor.output.xml-helpers :refer :all] [korma.core :as korma])) (defn ->xml [{:keys [id name title phone fax email]}] (let...
57574f9344c23cd1a24b0d2963f3c8a595d7fd6dc0c6cfad5cfbc48bea462b16
SimulaVR/godot-haskell
PlaneMesh.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.PlaneMesh (Godot.Core.PlaneMesh.get_size, Go...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/PlaneMesh.hs
haskell
| Size of the generated plane. | Size of the generated plane. | Number of subdivision along the Z axis. | Number of subdivision along the Z axis. | Number of subdivision along the X axis. | Number of subdivision along the X axis. | Size of the generated plane. | Size of the generated plane. | Number of subdivi...
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.PlaneMesh (Godot.Core.PlaneMesh.get_size, Go...
d0d27c4a55a418234cc91c80d850b83dfe760b81c931ed0e20d2558168f3c878
nitrogen/NitrogenProject.com
demos_comet3.erl
-module (demos_comet3). -include_lib ("nitrogen_core/include/wf.hrl"). -compile(export_all). main() -> #template { file="./templates/demos46.html" }. title() -> "Multiple Comet Processes". headline() -> "Multiple Comet Processes". left() -> [ " <p> This demo shows how to run multiple C...
null
https://raw.githubusercontent.com/nitrogen/NitrogenProject.com/b4b3a0dbe17394608d2ee6eaa089e3ece1285075/src/demos/demos_comet3.erl
erlang
Start the counter as a background process. Don't exit on error... Update the control. we could just let the function complete. Loop. This process will automatically be killed once the page stops requesting the output that it generates.
-module (demos_comet3). -include_lib ("nitrogen_core/include/wf.hrl"). -compile(export_all). main() -> #template { file="./templates/demos46.html" }. title() -> "Multiple Comet Processes". headline() -> "Multiple Comet Processes". left() -> [ " <p> This demo shows how to run multiple C...
91329a470576cb436400932e5c91296cb51846f6eea02758d42be81cf52fd7d2
tezos-commons/baseDAO
UpdateReceiversDelete.hs
SPDX - FileCopyrightText : 2021 Tezos Commons SPDX - License - Identifier : LicenseRef - MIT - TC module Test.Ligo.RegistryDAO.Tests.UpdateReceiversDelete ( updateReceiversDelete ) where import Prelude import Data.Set qualified as S import Test.Tasty (TestTree) import Morley.Util.Named import Test.Cleveland...
null
https://raw.githubusercontent.com/tezos-commons/baseDAO/c8cc03362b64e8f27432ec70cdb4c0df82abff35/haskell/test/Test/Ligo/RegistryDAO/Tests/UpdateReceiversDelete.hs
haskell
Advance one voting period to a proposing stage. Advance one voting period to a voting stage. Advance one voting period to a proposing stage.
SPDX - FileCopyrightText : 2021 Tezos Commons SPDX - License - Identifier : LicenseRef - MIT - TC module Test.Ligo.RegistryDAO.Tests.UpdateReceiversDelete ( updateReceiversDelete ) where import Prelude import Data.Set qualified as S import Test.Tasty (TestTree) import Morley.Util.Named import Test.Cleveland...
5e866a964849c8e7b08372ab4d6f7097606674cb3535b8e5a52d1503650ff5df
Mishio595/disml
ban_t.ml
open Core type t = { reason: string option [@default None]; user: User_t.t; } [@@deriving sexp, yojson { strict = false; exn = true }]
null
https://raw.githubusercontent.com/Mishio595/disml/cbb1e47a6d358eace03790c07a1b85641f4ca366/lib/models/guild/ban_t.ml
ocaml
open Core type t = { reason: string option [@default None]; user: User_t.t; } [@@deriving sexp, yojson { strict = false; exn = true }]
75d270f0e6a89b25b36b4d92e18e8735d2b756126a6f33a64bec19ab80c88c11
djs55/ocaml-fd-send-recv
fd_send_recv.mli
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/djs55/ocaml-fd-send-recv/f05e338db2b425710566482112c8c45ec2c7df06/lib/fd_send_recv.mli
ocaml
* Module to send and receive file descriptors over UNIX domain sockets. * Thrown by the low-level C functions * [int_of_fd fd] returns the underlying unix integer file descriptor associated with OCaml Unix.file_descr [fd]. * [fd_of_int fd] returns the OCaml Unix.file_descr associated with underlying unix int...
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
c0653cb3be356dd897a1de88eb04a9a72383c55f2237010fa7376837685cd72c
seckcoder/course-compiler
r4_8.rkt
(define (even? [x : Integer]) : Boolean (if (eq? x 0) #t (odd? (+ (- 1) x)))) (define (odd? [x : Integer]) : Boolean (if (eq? x 0) #f (even? (+ (- 1) x)))) (let ([vec (vector odd?)]) (let ([dummy (vector-set! vec 0 even?)]) (if ((vector-ref vec 0) 21) 999 42)))
null
https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/student-tests/r4_8.rkt
racket
(define (even? [x : Integer]) : Boolean (if (eq? x 0) #t (odd? (+ (- 1) x)))) (define (odd? [x : Integer]) : Boolean (if (eq? x 0) #f (even? (+ (- 1) x)))) (let ([vec (vector odd?)]) (let ([dummy (vector-set! vec 0 even?)]) (if ((vector-ref vec 0) 21) 999 42)))
9e9c35acb13270326f468453f0812577d8d06b1056b623be6c39029a2bf99099
avsm/eeww
test_overlapping_loc.ml
let test_1 () = [ cas_2 ] acts on the same location as [ ] and has conflicting values . kCAS should be failing . and has conflicting values. kCAS should be failing. *) let v_1 = Kcas.ref 0 in let cas_1 = Kcas.mk_cas v_1 0 1 in let cas_2 = Kcas.mk_cas v_1 2 3 in assert (Kcas.kCAS [ cas_1; c...
null
https://raw.githubusercontent.com/avsm/eeww/a316137bc7550870c9fd0c6a907d87e9d9810ae4/lib/kcas/test/test_overlapping_loc.ml
ocaml
let test_1 () = [ cas_2 ] acts on the same location as [ ] and has conflicting values . kCAS should be failing . and has conflicting values. kCAS should be failing. *) let v_1 = Kcas.ref 0 in let cas_1 = Kcas.mk_cas v_1 0 1 in let cas_2 = Kcas.mk_cas v_1 2 3 in assert (Kcas.kCAS [ cas_1; c...
2522ee36b1a624b1aa365addec08c000668b42d495ccc57373628b029e4870d4
ramsdell/ocaml-datalog
reader.ml
(* A reader for Datalog programs. *) (* Much of this code is dedicated to showing the location of an error in the input. *) let report_error file_name lexbuf msg = let (lineno, start, finish) = Scanner.lexeme_place lexbuf in let msg = Printf.sprintf "File \"%s\", line %d, characters %d-%d: %s" ...
null
https://raw.githubusercontent.com/ramsdell/ocaml-datalog/058728203184a5fd54333a442b55d215a080dfaf/reader.ml
ocaml
A reader for Datalog programs. Much of this code is dedicated to showing the location of an error in the input. Reads a Datalog program. The argument is the name of the file. Standard input is used if the file name is "-".
let report_error file_name lexbuf msg = let (lineno, start, finish) = Scanner.lexeme_place lexbuf in let msg = Printf.sprintf "File \"%s\", line %d, characters %d-%d: %s" file_name lineno start finish msg in failwith msg let report_parse_error file_name lexbuf = report_error file_name lex...
95e19569d9fc11512450492333e134825bf87826688d5d9d93fb1222721a4a80
MassD/99
p24.ml
Lotto : Draw N different random numbers from the set 1 .. M. ( easy ) The selected numbers shall be returned in a list . Lotto: Draw N different random numbers from the set 1..M. (easy) The selected numbers shall be returned in a list. *) let lotto_select n m = let rec select i acc = if i = n then ac...
null
https://raw.githubusercontent.com/MassD/99/1d3019eb55b0d621ed1df4132315673dd812b1e1/1-28-lists/p24.ml
ocaml
Lotto : Draw N different random numbers from the set 1 .. M. ( easy ) The selected numbers shall be returned in a list . Lotto: Draw N different random numbers from the set 1..M. (easy) The selected numbers shall be returned in a list. *) let lotto_select n m = let rec select i acc = if i = n then ac...
f696274587066007615c543d756e558b6085cbd0cfa3199643d2a1b21675709c
jacius/lispbuilder
translate.lisp
SDL_ttf CFFI lisp wrapper (in-package #:lispbuilder-sdl-image-cffi) (defun convert-image-type (value) (values (case value (:ICO (cffi:foreign-string-alloc "ICO")) (:CUR (cffi:foreign-string-alloc "CUR")) (:TGA (cffi:foreign-string-alloc "TGA")) (:BMP (cffi:foreign-string-alloc "BMP")) (:P...
null
https://raw.githubusercontent.com/jacius/lispbuilder/e693651b95f6818e3cab70f0074af9f9511584c3/lispbuilder-sdl-image/cffi/translate.lisp
lisp
SDL_ttf CFFI lisp wrapper (in-package #:lispbuilder-sdl-image-cffi) (defun convert-image-type (value) (values (case value (:ICO (cffi:foreign-string-alloc "ICO")) (:CUR (cffi:foreign-string-alloc "CUR")) (:TGA (cffi:foreign-string-alloc "TGA")) (:BMP (cffi:foreign-string-alloc "BMP")) (:P...
c9049d89505634aa29c448d76fd54681139db3e8c87c12104bd6b22188b88bcb
simingwang/emqx-plugin-kafkav5
kernel_config.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2018 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/kernel-8.3/src/kernel_config.erl
erlang
%CopyrightBegin% 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 lan...
Copyright Ericsson AB 1996 - 2018 . 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(kernel_config). -behaviour(gen_server). -export([start_link/0]). -export([init/1, handle_info/2, terminate/...
0317ba418995d6c5ee1b18b7c75cee253738bcb190947b311d417651f6b4af1a
2600hz/kazoo
kz_dist.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc 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 /. %%% %%% @end %%%--------...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_stdlib/src/kz_dist.erl
erlang
----------------------------------------------------------------------------- @doc @end -----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz 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 /. -module(kz_dist). -export([listen/1, accept/1, accept_connection/5, setup/5, close/1, select/1]). -spec...
ba53ff9718dd1bdf6107e6aba8537c59a19fd1192b3ada914be1b93af67823f5
conal/Fran
Main.hs
-- Test out machines module Main where import Machine import LazyST -- Example: state is an array, input is the index of an array element to -- be incremented, and output is the new value at the changed index. type IncState s = STArray s Int Int incRange = (0, 7) :: (Int,Int) incMachine :: ST s (Int...
null
https://raw.githubusercontent.com/conal/Fran/a113693cfab23f9ac9704cfee9c610c5edc13d9d/demos/Machine/Main.hs
haskell
Test out machines Example: state is an array, input is the index of an array element to be incremented, and output is the new value at the changed index.
module Main where import Machine import LazyST type IncState s = STArray s Int Int incRange = (0, 7) :: (Int,Int) incMachine :: ST s (Int -> ST s Int) incMachine = do arr <- newSTArray incRange 0 return $ \ i -> do x <- readSTArray arr i writeSTArray arr i (x+1) return (x+1) ...
0cdd5790d0204758b83ef85de3b23db259eaf7313aa0ca4276296adf56bf13c3
databrary/databrary
Stage.hs
module Store.Stage ( stageFile ) where import Ops import Files import Store.Types import System.Posix.Files.ByteString (fileExist) stageFile :: RawFilePath -> Storage -> IO (Maybe RawFilePath) stageFile f Storage{ storageStage = Just s } = (sf `useWhen`) <$> fileExist sf where sf = s </> f stageFile _ _ = retu...
null
https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Store/Stage.hs
haskell
module Store.Stage ( stageFile ) where import Ops import Files import Store.Types import System.Posix.Files.ByteString (fileExist) stageFile :: RawFilePath -> Storage -> IO (Maybe RawFilePath) stageFile f Storage{ storageStage = Just s } = (sf `useWhen`) <$> fileExist sf where sf = s </> f stageFile _ _ = retu...
b8e2e3fec71776ab722bae196914f1d360743310e819f9da6ac30b8d5323d519
slyrus/mcclim-old
builtin-commands.lisp
;;; -*- Mode: Lisp; Package: CLIM-INTERNALS -*- ( c ) copyright 2002 by ( ) ;;; This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your op...
null
https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/builtin-commands.lisp
lisp
-*- Mode: Lisp; Package: CLIM-INTERNALS -*- This library is free software; you can redistribute it and/or either This library 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 Licen...
( c ) copyright 2002 by ( ) modify it under the terms of the GNU Library General Public version 2 of the License , or ( at your option ) any later version . Library General Public License for more details . You should have received a copy of the GNU Library General Public Free Software Foundation , In...
3c0f842178fb631328f077e0455c7e763810583ef6877162e906025f9798b944
ndmitchell/rattle
Profile.hs
{-# LANGUAGE ScopedTypeVariables, RecordWildCards, TupleSections #-} # OPTIONS_GHC -w # module Development.Rattle.Profile( constructGraph, Graph(..), dotStringOfGraph, graphData, writeProfile ) where import Development.Rattle.Options import Development.Rattle.Types import Development.Rattle.Hash import Developm...
null
https://raw.githubusercontent.com/ndmitchell/rattle/f1f10504ef175dd005c8affdddfc1fb615c040f2/src/Development/Rattle/Profile.hs
haskell
# LANGUAGE ScopedTypeVariables, RecordWildCards, TupleSections # edge is directed based on order cmd were listed in script end1 was listed before end2. helps determine read/write hazards | Given some options, produce various statistics. | Generate a profile report given a file. assume p1 occurred before p2. find ...
# OPTIONS_GHC -w # module Development.Rattle.Profile( constructGraph, Graph(..), dotStringOfGraph, graphData, writeProfile ) where import Development.Rattle.Options import Development.Rattle.Types import Development.Rattle.Hash import Development.Rattle.Hazards import Development.Rattle.Shared import Control.Mo...
165512dcb1621c282e31322b205592211ba24f3f4f99400cdc49ee208d47beeb
rbonichon/smtpp
main.ml
(*********************************************************************************) Copyright ( c ) 2015 , INRIA , Universite de Nancy 2 and Universidade Federal do Rio Grande do Norte . (* ...
null
https://raw.githubusercontent.com/rbonichon/smtpp/57eb74bccbb0f30293ee058ded4b01baa1067756/src/main.ml
ocaml
******************************************************************************* Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above ...
Copyright ( c ) 2015 , INRIA , Universite de Nancy 2 and Universidade Federal do Rio Grande do Norte . THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER I...
6e7c30fdfbe308783e3a4ea7138805c97835e97ba42cc779c505fd2ba5c12995
green-labs/ppx_ts
signature.ml
open Ppxlib open Parsetree open Utils let map_type_decl decl = let { ptype_attributes; ptype_name = { txt = type_name }; ptype_manifest; ptype_loc; ptype_kind; } = decl in (* attributes -> structure_item list list -> structure_item list *) ptype_attributes |> List.map parse_attribute ...
null
https://raw.githubusercontent.com/green-labs/ppx_ts/ae2bb49923c33f6622af146b0cdec3a4f4ec0732/src/signature.ml
ocaml
attributes -> structure_item list list -> structure_item list
open Ppxlib open Parsetree open Utils let map_type_decl decl = let { ptype_attributes; ptype_name = { txt = type_name }; ptype_manifest; ptype_loc; ptype_kind; } = decl in ptype_attributes |> List.map parse_attribute |> List.map (fun (attribute : attribute_kind option) -> mat...
b6614358c3c8c300bfd393d97ffb51fc8f16a1ab185d5bb656a824ac40355091
zotonic/cowmachine
mainpage.erl
-module(mainpage). -export([init/2]). init(Req0, Opts) -> Method = cowboy_req:method(Req0), #{echo := Echo} = cowboy_req:match_qs([{echo, [], undefined}], Req0), Req = echo(Method, Echo, Req0), {ok, Req, Opts}. echo(<<"GET">>, undefined, Req) -> cowboy_req:reply(400, #{}, <<"Missing echo parameter.">...
null
https://raw.githubusercontent.com/zotonic/cowmachine/ad592a3e70ccce87434e3555c58fa1664bfa00c6/examples/echo_get/apps/main/src/mainpage.erl
erlang
Method not allowed.
-module(mainpage). -export([init/2]). init(Req0, Opts) -> Method = cowboy_req:method(Req0), #{echo := Echo} = cowboy_req:match_qs([{echo, [], undefined}], Req0), Req = echo(Method, Echo, Req0), {ok, Req, Opts}. echo(<<"GET">>, undefined, Req) -> cowboy_req:reply(400, #{}, <<"Missing echo parameter.">...
22203e78af7f38fbd784c8082f5cc3b268874eefc1fa2350b3bfe0a0cb194140
c-cube/qcheck
QCheck2_tests.ml
* QCheck2 tests * (* Please add any additional tests to both [QCheck_tests.ml] and [QCheck2_tests.ml]. This ensures that both generator approaches continue to work as expected and furthermore allows us to compare their behaviour with [diff -y test/core/QCheck_expect_test.expected test/core/QCheck2_expect_test...
null
https://raw.githubusercontent.com/c-cube/qcheck/063c1d74795a24eb77fa661d218c4715382df566/test/core/QCheck2_tests.ml
ocaml
Please add any additional tests to both [QCheck_tests.ml] and [QCheck2_tests.ml]. This ensures that both generator approaches continue to work as expected and furthermore allows us to compare their behaviour with [diff -y test/core/QCheck_expect_test.expected test/core/QCheck2_expect_test.expected] * Module ...
* QCheck2 tests * module IntTree = struct type tree = Leaf of int | Node of tree * tree let leaf x = Leaf x let node x y = Node (x,y) let rec depth = function | Leaf _ -> 1 | Node (x, y) -> 1 + max (depth x) (depth y) let rec print_tree = function | Leaf x -> Printf.sprintf "Leaf %d" x | ...
c4982abbd3af5d4107705370276e5aec247d118e7c49666690f33b34449dc265
haskell-compat/base-compat
Repl.hs
{-# LANGUAGE PackageImports #-} # OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports # -- | Reexports "Foreign.Marshal.Utils.Compat" -- from a globally unique namespace. module Foreign.Marshal.Utils.Compat.Repl ( module Foreign.Marshal.Utils.Compat ) where import "this" Foreign.Marshal.Utils.Com...
null
https://raw.githubusercontent.com/haskell-compat/base-compat/847aa35c4142f529525ffc645cd035ddb23ce8ee/base-compat/src/Foreign/Marshal/Utils/Compat/Repl.hs
haskell
# LANGUAGE PackageImports # | Reexports "Foreign.Marshal.Utils.Compat" from a globally unique namespace.
# OPTIONS_GHC -fno - warn - dodgy - exports -fno - warn - unused - imports # module Foreign.Marshal.Utils.Compat.Repl ( module Foreign.Marshal.Utils.Compat ) where import "this" Foreign.Marshal.Utils.Compat
c19bcc014f21a3d4ee900e158e1e89e73c0f8f01d48748c81e12c4a0d9307758
overtone/mini-beast
core.clj
(ns synth-0.test.core (:use [synth-0.core]) (:use [clojure.test])) (deftest replace-me ;; FIXME: write (is false "No tests have been written."))
null
https://raw.githubusercontent.com/overtone/mini-beast/16cd076d95e419ee72a1fa8827170c34e271456e/test/synth_0/test/core.clj
clojure
FIXME: write
(ns synth-0.test.core (:use [synth-0.core]) (:use [clojure.test])) (is false "No tests have been written."))
713694d6af6200f47c4ce81c8c196c26901e2610170c0f4db9f055f32203a770
ericlavigne/tic-tac-toe
epsilon_greedy.cljc
(ns ai.epsilon-greedy (:require ai.game)) (def memory (atom {})) ; evaluator is fn[game,perspective]->float (defn evaluate-move-with-deja-vu [game perspective] (if (ai.game/finished? game) (ai.game/evaluate-based-on-winning game perspective) (get @memory game))) (defn evaluate-with-depth [game evaluato...
null
https://raw.githubusercontent.com/ericlavigne/tic-tac-toe/7cf9c533618d2763e5d9d332da380b91cf460195/src/ai/epsilon_greedy.cljc
clojure
evaluator is fn[game,perspective]->float
(ns ai.epsilon-greedy (:require ai.game)) (def memory (atom {})) (defn evaluate-move-with-deja-vu [game perspective] (if (ai.game/finished? game) (ai.game/evaluate-based-on-winning game perspective) (get @memory game))) (defn evaluate-with-depth [game evaluator perspective depth] (let [available (ai....
e0343b026d79bc59b73b32354d915af0d0ca2db4a692168f38047710a7856418
janestreet/ppx_type_directed_value
ppx_type_directed_value_examples.ml
module Command = Type_directed_command * The prefix [ Type_directed _ * ] is preserved on the next two to avoid clashing with the ppx_jane versions . ppx_jane versions. *) module Type_directed_enumerate = Type_directed_enumerate module Type_directed_equal = Type_directed_equal module Val...
null
https://raw.githubusercontent.com/janestreet/ppx_type_directed_value/f85693cc6d0ad8a9bc3bad55fed22a3d78e1fcaf/examples/ppx_type_directed_value_examples.ml
ocaml
module Command = Type_directed_command * The prefix [ Type_directed _ * ] is preserved on the next two to avoid clashing with the ppx_jane versions . ppx_jane versions. *) module Type_directed_enumerate = Type_directed_enumerate module Type_directed_equal = Type_directed_equal module Val...
65685a44c4292b7593b841762552be52f5807116c030d4f5c342e16d07e38fee
ocsigen/js_of_ocaml
test_toplevel.ml
let () = let content = {| let () = print_endline "hello";; 1+;; Missing_module.f;; |} in Topdirs.dir_directory "/static/cmis"; Toploop.initialize_toplevel_env (); Toploop.input_name := "//toplevel//"; let lexbuf = Lexing.from_string content in while true do try let phr = !Toploop.parse_toplevel_ph...
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/079422579f4a5eb9ad2f5e67fd3e108d784022e7/compiler/tests-toplevel/test_toplevel.ml
ocaml
let () = let content = {| let () = print_endline "hello";; 1+;; Missing_module.f;; |} in Topdirs.dir_directory "/static/cmis"; Toploop.initialize_toplevel_env (); Toploop.input_name := "//toplevel//"; let lexbuf = Lexing.from_string content in while true do try let phr = !Toploop.parse_toplevel_ph...
536a6f4e56ba7a85c23133dd7ed2d4f831593330b1f5b1475c6dea1aed1844ff
erlang/otp
mnesia_consistency_test.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1997 - 2023 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/mnesia/test/mnesia_consistency_test.erl
erlang
%CopyrightBegin% 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 lan...
Copyright Ericsson AB 1997 - 2023 . 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(mnesia_consistency_test). -author(''). -export([init_per_testcase/2, end_per_testcase/2, init_per_...
2a54995dd3804ce076f4d413afd51dc0d9dd760ced06b16471f860a0875430c1
shimmering-void/sketches
cellular-2d-sprites.cljs
(ns sketches.cellular-2d-sprites (:require [quil.core :as q] [quil.middleware :as middleware] [sketches.palette :as pal] [sketches.celllar-2d-rules :as rules] [util.files :as f])) (println "Perlin flow hellooooo!") (def body (.-body js/document)) (def w (.-clientWidth...
null
https://raw.githubusercontent.com/shimmering-void/sketches/84d29636a798720e8db3379c21814fe9f92686fd/src/sketches/cellular-2d-sprites.cljs
clojure
iterate entire grid -> map to new grid map-indexed should get us there? (when (= (:value cell) 0) (when (q/loaded? (get images 0)) (q/image (get images 0) (* x size) (* y size)))) keep a few onion skinned frames
(ns sketches.cellular-2d-sprites (:require [quil.core :as q] [quil.middleware :as middleware] [sketches.palette :as pal] [sketches.celllar-2d-rules :as rules] [util.files :as f])) (println "Perlin flow hellooooo!") (def body (.-body js/document)) (def w (.-clientWidth...
02d2735c4bb6ad61d5cc5d5f87073b74031eaf86d2834a267a37b1cb08c5d955
factisresearch/opensource
Plus.hs
{-| Helper functions for dealing with call stacks and source locations. -} module GHC.Stack.Plus ( callerLocation , callerFile , callerLine , adjustSourceFilePath ) where import GHC.Stack import Safe (tailSafe, lastNote) adjustSourceFilePath :: FilePath -> FilePath adjustSourceFilePath = tailSafe...
null
https://raw.githubusercontent.com/factisresearch/opensource/d8b1fdf39d945bfcbc045ca9f73ab5aa84f89fa0/util-plus/src/GHC/Stack/Plus.hs
haskell
| Helper functions for dealing with call stacks and source locations.
module GHC.Stack.Plus ( callerLocation , callerFile , callerLine , adjustSourceFilePath ) where import GHC.Stack import Safe (tailSafe, lastNote) adjustSourceFilePath :: FilePath -> FilePath adjustSourceFilePath = tailSafe . dropWhile (/='/') . drop 1 . dropWhile (/= '/') callerLocation :: (HasCa...
4e1a0b76998064e6e7e160eacd2bc8b49137274fb246891062293b998236a594
ruHaskell/ruhaskell
Links.hs
{-# LANGUAGE OverloadedStrings #-} module Links ( createLinksPage ) where import Control.Monad.Trans (lift) import Hakyll (applyTemplate, compile, constField, create, defaultContext, idRoute, makeItem, relativizeUrls, route) import M...
null
https://raw.githubusercontent.com/ruHaskell/ruhaskell/1e38eae50011307d11a2026af925a23a6fd8a346/src/Links.hs
haskell
# LANGUAGE OverloadedStrings #
module Links ( createLinksPage ) where import Control.Monad.Trans (lift) import Hakyll (applyTemplate, compile, constField, create, defaultContext, idRoute, makeItem, relativizeUrls, route) import Markup.Default (defaultTemplate) imp...
c0cf70ec9f1b9ec695b14cfbce6465143de043679513d579f5cd46efda585f8c
ajkavanagh/vimwiki-publishing-system
CategoriesContext.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeAp...
null
https://raw.githubusercontent.com/ajkavanagh/vimwiki-publishing-system/c358ea03bcdb576ce4a7a4e42ac38ba5e1816c7b/src/Lib/Context/CategoriesContext.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE ExtendedDefaultRules # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # it? | return Just category if the route forms a category. /categories/<some-cat> where <some-cat> is a cate...
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE PolyKinds # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE AllowAmbiguousTypes # needed for the instance ToGV...
d3e3900776da4d03ba3c3d82895d02f76136b7f132db2d8476577a738bb7db77
FundingCircle/jackdaw
project.clj
(defproject fundingcircle/jackdaw "_" :description "A Clojure library for the Apache Kafka distributed streaming platform." :scm {:name "git" :url ""} :url "/" :repositories [["confluent" {:url "/"}] ["mulesoft" {:url "/"}]] :dependencies [[aleph "0.4.6"] [danlentz/clj-uu...
null
https://raw.githubusercontent.com/FundingCircle/jackdaw/1e51947eb0b4e882972d7bacd5c3ba0e77f89327/project.clj
clojure
off with the kafka version. See -notes.html Use specific commons-compress version to avoid Define a profile intended to be shared by this project and its children The dev profile - non-deployment configuration
(defproject fundingcircle/jackdaw "_" :description "A Clojure library for the Apache Kafka distributed streaming platform." :scm {:name "git" :url ""} :url "/" :repositories [["confluent" {:url "/"}] ["mulesoft" {:url "/"}]] :dependencies [[aleph "0.4.6"] [danlentz/clj-uu...
937a2397144ecc4265df57c92a37dae6b6fa87f051eab426e48bbd79922dbc68
pdlla/haskell-ffi-cabal-foreign-library-examples
Potato.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE ForeignFunctionInterface # # LANGUAGE TemplateHaskell # # OPTIONS_GHC -fno - warn - unused - top - binds # module Potato ( basicPotato ) where import Foreign....
null
https://raw.githubusercontent.com/pdlla/haskell-ffi-cabal-foreign-library-examples/7ce0b5b437b2cfe61f84151f2c1c84504b96120e/src/Potato.hs
haskell
# LANGUAGE CPP # # LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric #
# LANGUAGE ForeignFunctionInterface # # LANGUAGE TemplateHaskell # # OPTIONS_GHC -fno - warn - unused - top - binds # module Potato ( basicPotato ) where import Foreign.C.Types import Foreign.Ptr import Foreign.StablePtr import Control.DeepSeq import Con...
345bc2d36547729790dfa657e522f4e1a23d2ae721eb013310a8021c0653ad6e
nasa/Common-Metadata-Repository
opendap_util.clj
(ns cmr.ingest.services.granule-bulk-update.opendap.opendap-util "Contains functions to facilitate OPeNDAP url granule bulk update." (:require [clojure.string :as string] [cmr.common.services.errors :as errors] [cmr.common.util :as util])) (def ^:private cloud-pattern "Defines the Hyrax-in-the-cloud pat...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/7a217ca3758f9f7b2d894f31d0e23c42819cc3e0/ingest-app/src/cmr/ingest/services/granule_bulk_update/opendap/opendap_util.clj
clojure
(ns cmr.ingest.services.granule-bulk-update.opendap.opendap-util "Contains functions to facilitate OPeNDAP url granule bulk update." (:require [clojure.string :as string] [cmr.common.services.errors :as errors] [cmr.common.util :as util])) (def ^:private cloud-pattern "Defines the Hyrax-in-the-cloud pat...
523c6d83af349f8b31a5bb25bdb09855e57416024070fee8c41eabddb4685e71
kframework/haskell-core-semantics
Integers.hs
{-# LANGUAGE ExplicitForAll #-} module Integers where x :: Int x = 1 y :: Int y = 2 result :: Bool result = x == y
null
https://raw.githubusercontent.com/kframework/haskell-core-semantics/6dc257b34993970873cf0ea47f29b3d4fad13b1f/test/haskell/Integers.hs
haskell
# LANGUAGE ExplicitForAll #
module Integers where x :: Int x = 1 y :: Int y = 2 result :: Bool result = x == y
1cef25b3cce160e0ef38c6df3403c4d418588be792728636bbb8253cd682904c
nwf/dyna
THTuple.hs
--------------------------------------------------------------------------- -- | Template haskell for deriving tuple-handling functions -- -- I dearly wish I didn't have to do this kind of thing -- (and even though I am, it doesn't quite work!) -- Header material ...
null
https://raw.githubusercontent.com/nwf/dyna/74bdc852b906b902b53ca07dab0c8e0639ace8ba/src/Dyna/XXX/THTuple.hs
haskell
------------------------------------------------------------------------- | Template haskell for deriving tuple-handling functions I dearly wish I didn't have to do this kind of thing (and even though I am, it doesn't quite work!) Header material {{{ # LANGUA...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # # LANGUAGE TypeFamilies...
68c2ef9c1fedffa2c53b5267e82126f155ee39f90bbf1372f65f9674ca03ab65
archimag/mongo-cl-driver
async.lisp
;;; connection.lisp ;;;; ;;;; This file is part of the MONGO-CL-DRIVER library, released under Lisp-LGPL. ;;;; See file COPYING for details. ;;;; Author : < > (defpackage #:mongo-cl-driver.cl-async (:nicknames #:mongo.as) (:use #:cl #:iter #:mongo-cl-driver.adapters #:mongo-cl-driver.wire #:mongo-cl-driver.bs...
null
https://raw.githubusercontent.com/archimag/mongo-cl-driver/300c10bd3d0b3ca3a82c8b32087bddbc7b6a86c3/adapters/cl-async/async.lisp
lisp
connection.lisp This file is part of the MONGO-CL-DRIVER library, released under Lisp-LGPL. See file COPYING for details. temporary fix ---------------------------------------------------------------------- ------------------------------------------------------------- ---------------------------------------------...
Author : < > (defpackage #:mongo-cl-driver.cl-async (:nicknames #:mongo.as) (:use #:cl #:iter #:mongo-cl-driver.adapters #:mongo-cl-driver.wire #:mongo-cl-driver.bson #:cl-async #:blackbird) (:import-from #:mongo-cl-driver.bson #:ub8) (:import-from #:alexandria #:named-lambda) (:shadowing-import-from #:...
89c06cbbbbc8ef7390cd10c35404e39eb308af1eeae8ac402c429e202d73c023
clojureverse/clojurians-log-app
test_helper.clj
(ns clojurians-log.test-helper (:require [clojure.java.io :as io] [clojurians-log.db.schema :as schema] [clojurians-log.db.queries :as queries] [clojurians-log.xml2hiccup :as x2h] [datomic.api :as d] [net.cgrand.enlive-html :as enlive] [clojure.e...
null
https://raw.githubusercontent.com/clojureverse/clojurians-log-app/d34c9bd715e492c8f1899653548716d32c623fad/test/clojurians_log/test_helper.clj
clojure
setup a full test system don't actually start a http server silence http server startup message
(ns clojurians-log.test-helper (:require [clojure.java.io :as io] [clojurians-log.db.schema :as schema] [clojurians-log.db.queries :as queries] [clojurians-log.xml2hiccup :as x2h] [datomic.api :as d] [net.cgrand.enlive-html :as enlive] [clojure.e...
6983acf4d4fc97c12a104aaba95ead15fb7d2f498cd88be879003e4be7d8194b
janestreet/bonsai
styles.mli
open! Core open! Bonsai_web (** This file exists to encapsulate all the styles used within these form elements. Ideally these form components would be web components [-US/docs/Web/Web_Components] and styles would be encapsulated within a shadow dom. This doesn't appear to be supported in jsoo. (at least th...
null
https://raw.githubusercontent.com/janestreet/bonsai/c202b961f41e20e0b735c4e33c2bbac57a590941/web_ui/typeahead/src/styles.mli
ocaml
* This file exists to encapsulate all the styles used within these form elements. Ideally these form components would be web components [-US/docs/Web/Web_Components] and styles would be encapsulated within a shadow dom. This doesn't appear to be supported in jsoo. (at least the bindings don't exist) Th...
open! Core open! Bonsai_web val full_width : Css_gen.t val typeahead : Css_gen.t val pill : Css_gen.t val pill_container : Css_gen.t
6f7c40bd99a48c1244cff23401834b98ca7835375320082b053b728ee5c3c99c
shentufoundation/deepsea
Specif.ml
type 'a coq_sig = 'a (* singleton inductive, whose constructor was exist *) type ('a, 'p) sigT = | Coq_existT of 'a * 'p (** val projT1 : ('a1, 'a2) sigT -> 'a1 **) let projT1 = function | Coq_existT (a, _) -> a * projT2 : ( ' a1 , ' a2 ) sigT - > ' a2 * let projT2 = function | Coq_existT (_, h) -> h type sum...
null
https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/backend/extraction/Specif.ml
ocaml
singleton inductive, whose constructor was exist * val projT1 : ('a1, 'a2) sigT -> 'a1 *
type 'a coq_sig = 'a type ('a, 'p) sigT = | Coq_existT of 'a * 'p let projT1 = function | Coq_existT (a, _) -> a * projT2 : ( ' a1 , ' a2 ) sigT - > ' a2 * let projT2 = function | Coq_existT (_, h) -> h type sumbool = | Coq_left | Coq_right
556888f3d37ce8da132d50b40c786d2681ce5732bfc4654102ff3a4eed89a925
lokke-org/lokke
compile.scm
Copyright ( C ) 2019 < > SPDX - License - Identifier : LGPL-2.1 - or - later OR EPL-1.0 + (define-module (lokke compile) #:use-module ((ice-9 pretty-print) #:select (pretty-print)) #:use-module ((ice-9 receive) #:select (receive)) #:use-module ((ice-9 sandbox) #:select (all-pure-bindings ...
null
https://raw.githubusercontent.com/lokke-org/lokke/a6616b3de60b62d787bf9b98206f8ad9eeb10844/mod/lokke/compile.scm
scheme
Right now the tree walkers in this code tend to be prescriptive, i.e. they reject any type they don't recognize. That's been helpful with respect to debugging, but we could omit some of the checks and just rely on a catch-all else clause (perhaps controlled via a debug option) if we liked. FIXME: do we want/need...
Copyright ( C ) 2019 < > SPDX - License - Identifier : LGPL-2.1 - or - later OR EPL-1.0 + (define-module (lokke compile) #:use-module ((ice-9 pretty-print) #:select (pretty-print)) #:use-module ((ice-9 receive) #:select (receive)) #:use-module ((ice-9 sandbox) #:select (all-pure-bindings ...
2c84f8c92646df1b8755e3e6fc9335699703795a30f4ab685d21ca1c18f159b5
racket/racket7
linklet-info.rkt
#lang racket/base (provide (struct-out linklet-info)) ;; A linklet-info is a phase-specific slice of a module --- mainly a ;; linklet, but we group the linklet together with metadata from the ;; module's declaration linklet (struct linklet-info (linklet ; the implementation, or #f if the implementation is em...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/extract/linklet-info.rkt
racket
A linklet-info is a phase-specific slice of a module --- mainly a linklet, but we group the linklet together with metadata from the module's declaration linklet the implementation, or #f if the implementation is empty list of links: import "arguments" list of links: links whose variables are re-exported set of s...
#lang racket/base (provide (struct-out linklet-info))
5f6b10af954b3db8ff79cb6644ab29abad72265b72064b2e4ff214c4eb1e5200
ucsd-progsys/liquidhaskell
Util.hs
# LANGUAGE TupleSections # # OPTIONS_GHC -Wno - orphans # ----------------------------------------------------------------------------- -- | -- Module : Language.Stitch.LH.Util Copyright : ( C ) 2015 -- License : BSD-style (see LICENSE) Maintainer : ( ) -- Stability : experimental -- --...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/benchmarks/stitch-lh/src/Language/Stitch/LH/Util.hs
haskell
--------------------------------------------------------------------------- | Module : Language.Stitch.LH.Util License : BSD-style (see LICENSE) Stability : experimental Utility exports (and re-exports) for stitch. This module is meant to be internal -- do not import it if you are not part of the s...
# LANGUAGE TupleSections # # OPTIONS_GHC -Wno - orphans # Copyright : ( C ) 2015 Maintainer : ( ) module Language.Stitch.LH.Util ( render, toSimpleDoc, maybeParens, ($$), Prec, topPrec, stripWhitespace, foldl1M, allPairs ) where import Text.Parsec import Text.PrettyPrint.ANSI.Leijen as Pr...
66b0e2c8b8f1deea6b08df586b0e93464ac7f7c6255b52bbc4e86088c1bbbb35
janestreet/sexp
main_parts.ml
open Core open Sexp_app let rec flatten () = match try Some (Sexp.input_sexp In_channel.stdin) with | End_of_file -> None with | None -> () | Some sexp -> Parts.output (Parts.flatten sexp) stdout; flatten () ;; let rec assemble () = let flattened = Parts.input In_channel.stdin in if List.i...
null
https://raw.githubusercontent.com/janestreet/sexp/2414e8f11fadff4a33fff87bd79fb614ee7642f3/bin/main_parts.ml
ocaml
open Core open Sexp_app let rec flatten () = match try Some (Sexp.input_sexp In_channel.stdin) with | End_of_file -> None with | None -> () | Some sexp -> Parts.output (Parts.flatten sexp) stdout; flatten () ;; let rec assemble () = let flattened = Parts.input In_channel.stdin in if List.i...