_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
9d1ea3c03a8b21b27f7fc1f736c875557df0812ce10cd84ea7a9e7aed778db52
reifyhealth/specmonstah
08.clj
(ns reifyhealth.specmonstah-tutorial.08 (:require [reifyhealth.specmonstah.core :as sm])) (def schema {:user {:prefix :u} :topic {:prefix :t :relations {:owner-id [:user :id]}} :post {:prefix :p :relations {:topic-id [:topic :id]}}}) (defn announce [db {:keys [ent-name]}] (...
null
https://raw.githubusercontent.com/reifyhealth/specmonstah/afe38e7a39149836c31719f7e36a7504c14dbb80/tutorial/reifyhealth/specmonstah_tutorial/08.clj
clojure
=>
(ns reifyhealth.specmonstah-tutorial.08 (:require [reifyhealth.specmonstah.core :as sm])) (def schema {:user {:prefix :u} :topic {:prefix :t :relations {:owner-id [:user :id]}} :post {:prefix :p :relations {:topic-id [:topic :id]}}}) (defn announce [db {:keys [ent-name]}] (...
f8fc08e2cc9e145ed75c60b8dc346eb53058295fbe92306d7a2dbe39669bbf46
mbj/stratosphere
FirehoseProperty.hs
module Stratosphere.MSK.Cluster.FirehoseProperty ( FirehoseProperty(..), mkFirehoseProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data FirehoseProperty = Fir...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/msk/gen/Stratosphere/MSK/Cluster/FirehoseProperty.hs
haskell
module Stratosphere.MSK.Cluster.FirehoseProperty ( FirehoseProperty(..), mkFirehoseProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data FirehoseProperty = Fir...
ca91d26b6ee11b123fba8a456b23303c811af708aea0ef0f8537732f1833d72b
wedesoft/aiscm
image.scm
AIscm - Guile extension for numerical arrays and tensors . Copyright ( C ) 2013 , 2014 , 2015 , 2016 , 2017 , 2018 , 2019 < > ;; ;; 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 v...
null
https://raw.githubusercontent.com/wedesoft/aiscm/2c3db8d00cad6e042150714ada85da19cf4338ad/aiscm/image.scm
scheme
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public...
AIscm - Guile extension for numerical arrays and tensors . Copyright ( C ) 2013 , 2014 , 2015 , 2016 , 2017 , 2018 , 2019 < > 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 G...
276acd9cf15a629f2ecd9077ac5daa6d634cc5be3792abbcd75c9fc8ba810925
inhabitedtype/ocaml-aws
restoreDBClusterToPointInTime.mli
open Types type input = RestoreDBClusterToPointInTimeMessage.t type output = RestoreDBClusterToPointInTimeResult.t type error = Errors_internal.t include Aws.Call with type input := input and type output := output and type error := error
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/rds/lib/restoreDBClusterToPointInTime.mli
ocaml
open Types type input = RestoreDBClusterToPointInTimeMessage.t type output = RestoreDBClusterToPointInTimeResult.t type error = Errors_internal.t include Aws.Call with type input := input and type output := output and type error := error
b70a9b7fd64aff32766af337952b2accdd28c72a2d6c4085421bdebd3a7c6d4f
herd/herdtools7
int32Scalar.ml
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/c3b5079aed4bf9d92a5c7de04ef3638d6af0f8c0/lib/int32Scalar.ml
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2017 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
ef05dad8fc2e3c54e7a08401b71ee2790e0fa0a5e941dd9cf1b2e6d35d4c9e81
static-analysis-engineering/codehawk
tCHTest.mli
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Unit Testing Framework Author : Adapted from : ( ) ------------------------------------------------------------------------------ ...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/a6cbbdc2da7f171e0879fb94fe707bb00c9293c6/CodeHawk/CHT/tchlib/tCHTest.mli
ocaml
tchlib * [return x] returns the function always returning [x]. * [make_assert_test ~title:t set_up f tear_down] constructs a test running the function [f]. The function is fed by the result of a call to [set_up], and the value returned by the function is passed to [tear_down]. The function is intended to...
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Unit Testing Framework Author : Adapted from : ( ) ------------------------------------------------------------------------------ ...
deaf4ed20e75401f190c1686572bb0ddc9c60818d7d5f43753196816a257982f
Ptival/chick
Inductive.hs
# LANGUAGE TupleSections # module Parsing.Inductive ( inductiveP, ) where import Control.Applicative (Alternative (many)) import Control.Monad.Fix (fix) import Inductive.Inductive ( Constructor (Constructor), Inductive (Inductive), ) import Parsing (bindingsP, termP, variableP) import Parsing.Chick.Utils ...
null
https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/Parsing/Inductive.hs
haskell
check sort? check τ2?
# LANGUAGE TupleSections # module Parsing.Inductive ( inductiveP, ) where import Control.Applicative (Alternative (many)) import Control.Monad.Fix (fix) import Inductive.Inductive ( Constructor (Constructor), Inductive (Inductive), ) import Parsing (bindingsP, termP, variableP) import Parsing.Chick.Utils ...
4d16ad89805231661962c57ad30080dc2d836daaedf0e10439fbc2be2abbed45
project-oak/hafnium-verification
CallGraph.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/backend/CallGraph.ml
ocaml
* [node_map] is a map from ids (unique ints) to nodes corresponding to defined procedures. [id_map] is a map from all encountered (not necessarily defined) procnames to their ids, and thus its image is a superset of the domain of [node_map], and usually a strict superset. [trim_id_map] makes the image equal...
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
5cec951652766f6bef24e75be4927c313a8cb4339fd955b844a74b7231e88c8a
elastic/eui-cljs
button_empty.cljs
(ns eui.button-empty (:require ["@elastic/eui/lib/components/button/button_empty/button_empty.js" :as eui])) (def EuiButtonEmpty eui/EuiButtonEmpty) (def SIZES eui/SIZES) (def FLUSH_TYPES eui/FLUSH_TYPES) (def COLORS eui/COLORS)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/button_empty.cljs
clojure
(ns eui.button-empty (:require ["@elastic/eui/lib/components/button/button_empty/button_empty.js" :as eui])) (def EuiButtonEmpty eui/EuiButtonEmpty) (def SIZES eui/SIZES) (def FLUSH_TYPES eui/FLUSH_TYPES) (def COLORS eui/COLORS)
1cbf411c954efafeb945ba3be84005505d4be8ec96e779ea8a45a9c5ac1db898
stchang/macrotypes
exist-tests.rkt
#lang s-exp macrotypes/examples/exist (require "rackunit-typechecking.rkt") (check-type (pack (Int 0) as (∃ (X) X)) : (∃ (X) X)) (check-type (pack (Int 0) as (∃ (X) X)) : (∃ (Y) Y)) (typecheck-fail (pack (Int 0) as (∃ (X) Y))) (check-type (pack (Bool #t) as (∃ (X) X)) : (∃ (X) X)) (typecheck-fail (pack (Int #t) as (∃ ...
null
https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/macrotypes-test/tests/macrotypes/exist-tests.rkt
racket
can't use as Int X shouldn't escape open. same as above, but with different internal counter representation err cases previous tets from stlc+reco+var-tests.rkt --------------------------------- define-type-alias error , Complex undefined records (ie labeled tuples) variants not enough clauses wrong clause ...
#lang s-exp macrotypes/examples/exist (require "rackunit-typechecking.rkt") (check-type (pack (Int 0) as (∃ (X) X)) : (∃ (X) X)) (check-type (pack (Int 0) as (∃ (X) X)) : (∃ (Y) Y)) (typecheck-fail (pack (Int 0) as (∃ (X) Y))) (check-type (pack (Bool #t) as (∃ (X) X)) : (∃ (X) X)) (typecheck-fail (pack (Int #t) as (∃ ...
fc4a0fe1a82bbceefe071149fa65ff7858d870dc481c790e0fc29c9417359340
haroldcarr/learn-haskell-coq-ml-etc
ch_06_8.hs
Created : 2015 Apr 20 ( Mon ) by . Last Modified : 2015 Apr 20 ( Mon ) 13:01:58 by . Created : 2015 Apr 20 (Mon) 09:20:01 by Harold Carr. Last Modified : 2015 Apr 20 (Mon) 13:01:58 by Harold Carr. -} import Test.HUnit as T import Test.HUnit.Util as U 6.8 Exercises -...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/book/2007-Programming_in_Haskell-1st_Edition-Graham_Hutton/ch_06_8.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- --------------------------------------------------------------------------- -------------...
Created : 2015 Apr 20 ( Mon ) by . Last Modified : 2015 Apr 20 ( Mon ) 13:01:58 by . Created : 2015 Apr 20 (Mon) 09:20:01 by Harold Carr. Last Modified : 2015 Apr 20 (Mon) 13:01:58 by Harold Carr. -} import Test.HUnit as T import Test.HUnit.Util as U 6.8 Exercises ...
d655981cc322199698db37ed00aee81cd187ef886fe6ffda310af59371b9da4a
anuyts/menkar
Entry.hs
module Menkar.TC.Entry where import Menkar.System.Fine import Menkar.Monad.Monad import Menkar.Fine.Syntax import Menkar.Fine.Context import Menkar.Fine.Judgement import Menkar.TC.Segment import Data.Void import Data.Foldable import Data.Functor.Compose import Data.List (inits) import Control.Monad.State.Lazy checkT...
null
https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/obsolete/Menkar/TC/Entry.hs
haskell
----------------------- ----------------------- constraint <- defConstraint jud (Just parent) reason
module Menkar.TC.Entry where import Menkar.System.Fine import Menkar.Monad.Monad import Menkar.Fine.Syntax import Menkar.Fine.Context import Menkar.Fine.Judgement import Menkar.TC.Segment import Data.Void import Data.Foldable import Data.Functor.Compose import Data.List (inits) import Control.Monad.State.Lazy checkT...
9918287192ec9d3d42c3f87dfa683b514c04508dd00aba0851b1466e2d514ade
srid/emanote
ModelRoute.hs
{-# LANGUAGE DeriveAnyClass #-} | Route types representing the resources in our ` Model ` . See also : ` Emanote . Route . SiteRoute ` . See also: `Emanote.Route.SiteRoute`. -} module Emanote.Route.ModelRoute ( -- Some route in a generated site ModelRoute (..), modelRouteCase, mkModelRouteFromFilePat...
null
https://raw.githubusercontent.com/srid/emanote/66dad06ca8fff73e30c52aee28f6458c73c900e3/src/Emanote/Route/ModelRoute.hs
haskell
# LANGUAGE DeriveAnyClass # Some route in a generated site Static file routes | A R to anywhere in `Model` | Like `mkLMLRouteFromFilePath`, but when the file extension is known ahead to be of `lmlType`.
| Route types representing the resources in our ` Model ` . See also : ` Emanote . Route . SiteRoute ` . See also: `Emanote.Route.SiteRoute`. -} module Emanote.Route.ModelRoute ( ModelRoute (..), modelRouteCase, mkModelRouteFromFilePath, Only LML routes LMLRoute (..), defaultLmlRoute, possibleL...
408c1594c4875ac79c9f8f62618e2111a5f5dfcdb5dac64c093b4939fcbbe56a
garrigue/lablgtk
about.ml
(**************************************************************************) Lablgtk - Examples (* *) (* This code is in the public domain. *) (* You may f...
null
https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/examples/about.ml
ocaml
************************************************************************ This code is in the public domain. You may freely copy parts of it in your application. ...
Lablgtk - Examples let show () = let dialog = GWindow.about_dialog ~name:"Name" ~authors:["Me" ; "Myself"; ] ~copyright:"Copyright: copyleft" ~license:"Open" ~website:"" ~website_label:...
0b5c357e4927f37b9e30ebba7e9d91f003a2f15b97053c2ac41b1bc0aded0da6
EduardoRFS/linear-f
ltree.ml
type name = string and expr = | LE_var of name | LE_t_lambda of name * expr | LE_t_apply of expr * typ_ | LE_e_lambda of name * typ_ option * expr | LE_e_apply of expr * expr | LE_t_alias of name * name list * typ_ * expr | LE_e_alias of name * expr * expr | LE_annot of expr * typ_ and typ_ = | LT_v...
null
https://raw.githubusercontent.com/EduardoRFS/linear-f/2ef3f929e49d239aae7e888f8bd07af0a84a550d/src/ltree.ml
ocaml
type name = string and expr = | LE_var of name | LE_t_lambda of name * expr | LE_t_apply of expr * typ_ | LE_e_lambda of name * typ_ option * expr | LE_e_apply of expr * expr | LE_t_alias of name * name list * typ_ * expr | LE_e_alias of name * expr * expr | LE_annot of expr * typ_ and typ_ = | LT_v...
1caf48ea8d78403f6a4557ad7ebc367212f996caa2ad99153f3a9181be8fc072
philschonholzer/co2db
HowToContribute.hs
module Web.View.Static.HowToContribute where import Web.View.Prelude data HowToContributeView = HowToContributeView instance View HowToContributeView where html HowToContributeView = [hsx| <header> <h1>Contribution</h1> </header> <p>I would love for you to contribute to the CO<sub>2<...
null
https://raw.githubusercontent.com/philschonholzer/co2db/88a2f7109b89cb9c93c11dd3ac4cbe4b9ddaa5c3/Web/View/Static/HowToContribute.hs
haskell
module Web.View.Static.HowToContribute where import Web.View.Prelude data HowToContributeView = HowToContributeView instance View HowToContributeView where html HowToContributeView = [hsx| <header> <h1>Contribution</h1> </header> <p>I would love for you to contribute to the CO<sub>2<...
a1b244cb21ac371ee950fcfd94fa72f4d267e6e48601f6588b0617c3ff976ff6
TatriX/cl-selenium-webdriver
mouse.lisp
(in-package :cl-selenium) (defun mouse-move-to (x y &key element (session *session*)) (http-post-check (session-path session "/moveto") (list :element (when element (element-id element)) :xoffset x :yoffset y))) (defun mouse-click (button &key (se...
null
https://raw.githubusercontent.com/TatriX/cl-selenium-webdriver/51a4b6833731281353ae6585e404dc934ad8df33/src/mouse.lisp
lisp
(in-package :cl-selenium) (defun mouse-move-to (x y &key element (session *session*)) (http-post-check (session-path session "/moveto") (list :element (when element (element-id element)) :xoffset x :yoffset y))) (defun mouse-click (button &key (se...
25cdead1e6a3f4831671ff18c1c4aedecece7ea6b0d89086fa4997ac27ab9875
xxyzz/SICP
Exercise_1_44.rkt
#lang racket/base (require racket/function) ; identity (define dx 1) (define (compose f g) (lambda (x) (f (g x)))) (define (square x) (* x x)) (define (repeated f n) (if (< n 1) identity (compose f (repeated f (sub1 n))))) (define (smooth f) (lambda (x) (/ (+ (f (- x dx)) (f x) ...
null
https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/1_Building_Abstractions_with_Procedures/1.3_Formulating_Abstractions_with_Higher-Order_Procedures/Exercise_1_44.rkt
racket
identity 5 / 3
#lang racket/base (define dx 1) (define (compose f g) (lambda (x) (f (g x)))) (define (square x) (* x x)) (define (repeated f n) (if (< n 1) identity (compose f (repeated f (sub1 n))))) (define (smooth f) (lambda (x) (/ (+ (f (- x dx)) (f x) (f (+ x dx))) 3))) (define (n-fold-s...
ddf7012ecdfe7eced36db4b2e2af3ad59b79675236f100b670d52172fe368db5
reasonml-old/BetterErrors
type_IncompatibleType_5.ml
module PettyModule = struct type youAreAString = string module Nested = struct type weAreStrings = youAreAString list end end module TopNotchModule = struct type stringListList = string list list type myRecord = {nihao: int} type myRecordList = myRecord list type myRecordListList = myRecordList list...
null
https://raw.githubusercontent.com/reasonml-old/BetterErrors/d439b92bfe377689c38fded5d8aa2b151133f25d/tests/type_IncompatibleType/type_IncompatibleType_5.ml
ocaml
module PettyModule = struct type youAreAString = string module Nested = struct type weAreStrings = youAreAString list end end module TopNotchModule = struct type stringListList = string list list type myRecord = {nihao: int} type myRecordList = myRecord list type myRecordListList = myRecordList list...
8fa03b40757683890d38d2cf973edbc0350f4d12d3dd2855036b820cfd90f71c
jgm/HeX
LaTeX.hs
# LANGUAGE OverloadedStrings , ScopedTypeVariables # module Text.HeX.Standard.LaTeX (defaults) where import Text.HeX import Text.HeX.Standard.TeX (ctl, ch, grp) import Text.HeX.Standard.Generic (getSectionNum) defaults :: HeX () defaults = do addParser [Inline] $ basicInline ch addParser [Block] $ basicBlock toPa...
null
https://raw.githubusercontent.com/jgm/HeX/5bab503606e01c453555545493c43c00398ca408/Text/HeX/Standard/LaTeX.hs
haskell
we need to increment the number
# LANGUAGE OverloadedStrings , ScopedTypeVariables # module Text.HeX.Standard.LaTeX (defaults) where import Text.HeX import Text.HeX.Standard.TeX (ctl, ch, grp) import Text.HeX.Standard.Generic (getSectionNum) defaults :: HeX () defaults = do addParser [Inline] $ basicInline ch addParser [Block] $ basicBlock toPa...
e838f874ac7ac719c3a4323664091ea89440da9974858dd0a4406343a0027d49
openweb-nl/open-bank-mark
project.clj
(defproject nl.openweb/open-bank-mark "0.1.0-SNAPSHOT" :plugins [[lein-modules "0.3.11"]] :modules {:inherited {:repositories [["confluent" "/"]] :aliases {"all" ^:displace ["do" "clean," "test," "install", "uberjar"] "-f" [...
null
https://raw.githubusercontent.com/openweb-nl/open-bank-mark/786c940dafb39c36fdbcae736fe893af9c00ef17/project.clj
clojure
(defproject nl.openweb/open-bank-mark "0.1.0-SNAPSHOT" :plugins [[lein-modules "0.3.11"]] :modules {:inherited {:repositories [["confluent" "/"]] :aliases {"all" ^:displace ["do" "clean," "test," "install", "uberjar"] "-f" [...
bd8470185be466aa50835a770dbb7e49f50853378e4cc92af5dfd03ebc64acab
NorfairKing/super-user-spark
Utils.hs
# LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # module SuperUserSpark.Utils where import Import import Data.List (isInfixOf) incase :: MonadReader c m => (c -> Bool) -> m () -> m () incase bf func = do b <- asks bf when b func incaseElse :: MonadReader c m => (c -> Bool) ->...
null
https://raw.githubusercontent.com/NorfairKing/super-user-spark/3c286a52a0b81e083c0e6d39f6f2b02aa9bb9231/src/SuperUserSpark/Utils.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # module SuperUserSpark.Utils where import Import import Data.List (isInfixOf) incase :: MonadReader c m => (c -> Bool) -> m () -> m () incase bf func = do b <- asks bf when b func incaseElse :: MonadReader c m => (c -> Bool) ->...
6bfdd9043fad8dffbd591ee20d00a9c457ff4b1a457693dc0bb865d6a1ae9cb0
BioHaskell/hPDB
ParseCAVEAT.hs
-- # LANGUAGE PatternGuards # # LANGUAGE ScopedTypeVariables , OverloadedStrings # | Parsing CAVEAT records . module Bio.PDB.EventParser.ParseCAVEAT(parseCAVEAT) where import Prelude hiding(String) import qualified Data.ByteString.Char8 as BS import Bio.PDB.EventParser.PDBEvents import Bio.PDB.EventParse...
null
https://raw.githubusercontent.com/BioHaskell/hPDB/5be747e2f2c57370b498f4c11f9f1887fdab0418/Bio/PDB/EventParser/ParseCAVEAT.hs
haskell
# LANGUAGE PatternGuards # ----------- { { { CAVEAT records ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- } Arguments: parse unpack fields ----------- } } } CAVEAT records
# LANGUAGE ScopedTypeVariables , OverloadedStrings # | Parsing CAVEAT records . module Bio.PDB.EventParser.ParseCAVEAT(parseCAVEAT) where import Prelude hiding(String) import qualified Data.ByteString.Char8 as BS import Bio.PDB.EventParser.PDBEvents import Bio.PDB.EventParser.PDBParsingAbstractions - COLUMN...
1227f1c0d201d7b3cc80626884023fdc19370d30c84a1b4cd815ed2f7092f6c3
euhmeuh/virtual-mpu
info.rkt
#lang info (define collection "virtual-mpu") (define deps '("base" "brag" "br-parser-tools-lib" "anaphoric" "reprovide-lang" "command-tree" "rackunit-lib" "charterm")) (define build-deps '()) (define racket-laun...
null
https://raw.githubusercontent.com/euhmeuh/virtual-mpu/d8056f928a646bb9ac96fdb78cde794efc82d144/info.rkt
racket
#lang info (define collection "virtual-mpu") (define deps '("base" "brag" "br-parser-tools-lib" "anaphoric" "reprovide-lang" "command-tree" "rackunit-lib" "charterm")) (define build-deps '()) (define racket-laun...
5d13991bed0306ee160a753180e1fb6910e32e60f5decf22846f51db62a676c1
EFanZh/EOPL-Exercises
exercise-5.44.rkt
#lang eopl Exercise 5.44 [ ★ ★ ] An alternative to letcc and throw of the preceding exercises is to add a single procedure to the language . This procedure , which in Scheme is called call - with - current - continuation , takes a one - argument procedure , p , and passes to p a procedure that when invoked with ...
null
https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-5.44.rkt
racket
cont. We could define call-with-current-continuation in terms of letcc and throw as follows: let call-with-current-continuation = proc (p) letcc cont in (p proc (v) throw v to cont) in ... Add call-with-current-continuation to the language. Then write a translator ...
#lang eopl Exercise 5.44 [ ★ ★ ] An alternative to letcc and throw of the preceding exercises is to add a single procedure to the language . This procedure , which in Scheme is called call - with - current - continuation , takes a one - argument procedure , p , and passes to p a procedure that when invoked with ...
01ad940fd602c5edb210689a7688d098ada08cfb607e51ef56bb80185d7037da
prg-titech/baccaml
type.ml
type t = MinCamlの型を表現するデータ型 ( caml2html : type_t ) | Unit | Bool | Int | Float | String | Fun of t list * t (* arguments are uncurried *) | Tuple of t list | Array of t | Var of t option ref [@@deriving show] let rec type_of_string : string -> t = fun x -> match x with | "unit" | "Unit" -> Uni...
null
https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/base/type.ml
ocaml
arguments are uncurried
type t = MinCamlの型を表現するデータ型 ( caml2html : type_t ) | Unit | Bool | Int | Float | String | Tuple of t list | Array of t | Var of t option ref [@@deriving show] let rec type_of_string : string -> t = fun x -> match x with | "unit" | "Unit" -> Unit | "int" | "Int" -> Int | "float" | "Float" -> ...
4f19a13e4846d8cf4d01eecec88277975e0312d3c2f4d2e4a6e2698727c9464a
aryx/xix
spl_.ml
open Types In there is really just high or low ; no intermediate type prio = Low | High
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/kernel/core/spl_.ml
ocaml
open Types In there is really just high or low ; no intermediate type prio = Low | High
378141c88db31e99e5b887382903d4261a692541710bc7b94d2f7e819f3bc111
shadow-cljs/lein-template
project.clj
(defproject shadow-cljs/lein-template "0.1.3" :description "Shadow-cljs template." :url "-cljs-template" :license {:name "Eclipse Public License" :url "-v10.html"} :repositories {"clojars" {:url "" :sign-releases false}} :eval-in-leiningen true)
null
https://raw.githubusercontent.com/shadow-cljs/lein-template/b68374d73de4df7cc15fa4c39f9ee41fd5b3e5ed/project.clj
clojure
(defproject shadow-cljs/lein-template "0.1.3" :description "Shadow-cljs template." :url "-cljs-template" :license {:name "Eclipse Public License" :url "-v10.html"} :repositories {"clojars" {:url "" :sign-releases false}} :eval-in-leiningen true)
e8302500b0ec5ed02ebcbed0607899e5afee356ae7a6d645eb79f00c0e494506
maxlapshin/graphic
graphic_quotes_demo.erl
-module(graphic_quotes_demo). -include_lib("graphic/include/graphic.hrl"). -export([body/1]). -export([graphic/1, handle_info/2]). body(Stock) -> % Configure fix application:start(fix), {ok, FixConf} = file:consult("fix_src.conf"), application:set_env(fix, fix_src, FixConf), #graphic{style="width:600px;",...
null
https://raw.githubusercontent.com/maxlapshin/graphic/390da7285768c19baf4abb8b5386c056c81cfd68/src/graphic_quotes_demo.erl
erlang
Configure fix Graphic callback Return graphs from stockdb Graphic configuration Subscribe to stock updates flush collected events periodically Stock is not live -- no updates Get raw stockdb data Incoming message handler Simplify collected data to not overload browser
-module(graphic_quotes_demo). -include_lib("graphic/include/graphic.hrl"). -export([body/1]). -export([graphic/1, handle_info/2]). body(Stock) -> application:start(fix), {ok, FixConf} = file:consult("fix_src.conf"), application:set_env(fix, fix_src, FixConf), #graphic{style="width:600px;", data = {mfa, ?MOD...
5046d49477860b26bb58972b83b706882394c9a0ddaaf1feb39d050ee5e7de14
abdulapopoola/SICPBook
4.70.scm
#lang planet neil/sicp (define (add-assertion! assertion) (store-assertion-in-index assertion) (set! THE-ASSERTIONS (cons-stream assertion THE-ASSERTIONS)) 'ok) ;; This version would cause an infinite recursion because cons - stream does not evaluate its second argument immediate...
null
https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%204/4.4/4.70.scm
scheme
This version would cause an infinite recursion because THE-ASSERTIONS will point to itself. i.e. -> a = cons-stream(b a) and this can cause infinite loops under the right conditions. Using a let triggers an evaluation and thus cons-stream gets an already evaluated different value.
#lang planet neil/sicp (define (add-assertion! assertion) (store-assertion-in-index assertion) (set! THE-ASSERTIONS (cons-stream assertion THE-ASSERTIONS)) 'ok) cons - stream does not evaluate its second argument immediately and thus
a3305b218e838ffc1139b191b5d66f1cb7e59f28dad8dfbeaec751e405bd2a35
jimcrayne/jhc
PrimDecode.hs
{-# LANGUAGE OverloadedStrings #-} translate foreign Prim statements to jhc core module E.PrimDecode(processPrim) where import Text.Printf import C.Prims import Cmm.Op(readTy,Ty) import Data.Maybe import DataConstructors import E.E import E.Values import FrontEnd.SrcLoc import FrontEnd.Tc.Kind import FrontEnd.Warni...
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/src/E/PrimDecode.hs
haskell
# LANGUAGE OverloadedStrings # array operations accessing the rts directly | A safe version of 'zipWith'. ^ location of declaration ^ primitive name ^ arguments ^ return type ^ c requires ^ result since the primitive was found in the plainPrimMap file and typechecked we pass it through unchanged. check the ...
translate foreign Prim statements to jhc core module E.PrimDecode(processPrim) where import Text.Printf import C.Prims import Cmm.Op(readTy,Ty) import Data.Maybe import DataConstructors import E.E import E.Values import FrontEnd.SrcLoc import FrontEnd.Tc.Kind import FrontEnd.Warning import Name.Name import Name.Nam...
5f635aeac322007046b202a08a778a312e97f00a83d4a6a12cd401ef83360168
YoshikuniJujo/test_haskell
Main.hs
module Main where import Foreign.Storable.SizeAlignment main :: IO () main = putStrLn "Slozsoft"
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/2a2c502099ad750ded6479ccda73679f4adc6ca0/themes/memory/try-size-alignment/app/Main.hs
haskell
module Main where import Foreign.Storable.SizeAlignment main :: IO () main = putStrLn "Slozsoft"
a5efcdd349330c8fff19523779375fd59b7fdbbb0d7e23ffd075528dbf093d20
Gbury/archsat
tptp.mli
This file is free software , part of Archsat . See file " LICENSE " for more details . (** TPTP export This module defines helprs for printing tptp problem files. *) * { 2 Printing } module Print : sig val pos : Pretty.pos Expr.tag val name : Pretty.name Expr.tag val assoc : Pretty.assoc Expr.tag (**...
null
https://raw.githubusercontent.com/Gbury/archsat/322fbefa4a58023ddafb3fa1a51f8199c25cde3d/src/output/tptp.mli
ocaml
* TPTP export This module defines helprs for printing tptp problem files. * Pretty-printing tags. * Print an identifier (using correct escape rules). * Print some prefix for the proof (mainly some generic info, to make the proof look better). * Declare a new identifier, with the correct type. * Declare a ...
This file is free software , part of Archsat . See file " LICENSE " for more details . * { 2 Printing } module Print : sig val pos : Pretty.pos Expr.tag val name : Pretty.name Expr.tag val assoc : Pretty.assoc Expr.tag val var : Format.formatter -> _ Expr.id -> unit val cst : Format.formatter -> _ Expr...
ced29a6555975f37d875a987e2e3e56908c7e81f6e91263adcb234a0db0501b7
RBornat/jape
displaystate.ml
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . 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 ver...
null
https://raw.githubusercontent.com/RBornat/jape/afe9f207e89e965636b43ef8fad38fd1f69737ae/distrib/camlengine/displaystate.ml
ocaml
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . 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 ver...
fffff119ad3af099e5e1758000122b5c09a06be3a1c0f6f2b5f4763580e43d18
beamparticle/beamparticle
beamparticle_sup.erl
%%%------------------------------------------------------------------- %%% @doc Supervisor for the beamparticle app . This will boot the %%% supervision tree required for persistent application state. %%% @end %%% %CopyrightBegin% %%% Copyright < > 2017 . All Rights Reserved . %%% Licensed under the Apache L...
null
https://raw.githubusercontent.com/beamparticle/beamparticle/65dcea1569d06b331b08cd9f8018ece4b176b690/src/beamparticle_sup.erl
erlang
------------------------------------------------------------------- @doc supervision tree required for persistent application state. @end %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 ag...
Supervisor for the beamparticle app . This will boot the Copyright < > 2017 . 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(beamparticle_sup). -behaviour(supervisor). -export([start_l...
747357694c4499b88cca7b415d9c23f59bafbec3735704ab9feb345997ddedda
sealchain-project/sealchain
WalletLayer.hs
module Cardano.Wallet.WalletLayer ( PassiveWalletLayer (..) , ActiveWalletLayer (..) -- * Types , CreateWallet(..) -- ** Errors , CreateWalletError(..) , GetWalletError(..) , UpdateWalletError(..) , UpdateWalletPasswordError(..) , DeleteWalletError(..) , GetUtxosError(..) ...
null
https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/wallet/src/Cardano/Wallet/WalletLayer.hs
haskell
* Types ** Errors (ExpenseRegulation, InputGrouping) ---------------------------------------------------------- ---------------------------------------------------------- | Unsound show instance needed for the 'Exception' instance. which is new-data-layer specific. | Unsound show instance nee...
module Cardano.Wallet.WalletLayer ( PassiveWalletLayer (..) , ActiveWalletLayer (..) , CreateWallet(..) , CreateWalletError(..) , GetWalletError(..) , UpdateWalletError(..) , UpdateWalletPasswordError(..) , DeleteWalletError(..) , GetUtxosError(..) , NewPaymentError(..) , Est...
1ee39f205795767335c63b99ddb88d3fc458ee2a85e231c290425938028be41a
AmpersandTarski/Ampersand
NormalForms.hs
# LANGUAGE FlexibleInstances # module Ampersand.FSpec.ToFSpec.NormalForms ( conjNF, cfProof, dfProofs, -- these are for confluence testing. makeAllConjs, conjuncts, ) where import Ampersand.ADL1 import Ampersand.ADL1.P2A_Converters (ConceptMap, pCpt2aCpt) import Ampersand.Basics import Ampersand.C...
null
https://raw.githubusercontent.com/AmpersandTarski/Ampersand/8a1c00e3b0aeccd7ea6283b20097a8b73310b138/src/Ampersand/FSpec/ToFSpec/NormalForms.hs
haskell
these are for confluence testing. The following was built for the purpose of testing confluence. These functions produce all derivations of results from the normalizer. A useful side effect is that it implicitly tests for soundness. the weight function for disjunctive normal form. Deriving normal forms and repres...
# LANGUAGE FlexibleInstances # module Ampersand.FSpec.ToFSpec.NormalForms ( conjNF, cfProof, makeAllConjs, conjuncts, ) where import Ampersand.ADL1 import Ampersand.ADL1.P2A_Converters (ConceptMap, pCpt2aCpt) import Ampersand.Basics import Ampersand.Classes.Relational import Ampersand.Core.ShowAStruct...
c426796a49c2d6d1d805d7dcf7a59c3763072a3c4995a59dc5647e703d8bc503
aryx/xix
change.ml
(*s: version_control/change.ml *) (*s: copyright ocamlgit *) Copyright 2017 , see copyright.txt (*e: copyright ocamlgit *) open Common (*****************************************************************************) (* Prelude *) (*****************************************************************************) (****...
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/version_control/change.ml
ocaml
s: version_control/change.ml s: copyright ocamlgit e: copyright ocamlgit *************************************************************************** Prelude *************************************************************************** *************************************************************************** Types...
Copyright 2017 , see copyright.txt open Common type content = bytes type entry = { path: Common.filename; mode: Index.mode; content: content Lazy.t; } type t = | Add of entry | Del of entry
4dfa0881ea918d7065114256d2275d837c050be3bd31ecc16cb58ddadc64fbfc
backtracking/mlpost
num.ml
(**************************************************************************) (* *) Copyright ( C ) Johannes Kanig , , and (* *) (* This software is f...
null
https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/src/num.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
Copyright ( C ) Johannes Kanig , , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking open Types type t = float let zero = 0. let one = 1. let minus_one = -1. let two = 2. let of_floa...
dc562b618ded2db996e259e1c45d7b4dd31df39ec3a1b1f880b3def6b4bb35f4
emqx/quic
quicer_listener_sup.erl
Copyright ( c ) 2021 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agr...
null
https://raw.githubusercontent.com/emqx/quic/868d5af2636fe8eea4a517c0a1db0776a44d2626/src/quicer_listener_sup.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 governing perm...
Copyright ( c ) 2021 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(quicer_listener_sup). -behaviour(supervisor). -export([ start_link/0 , start_listener/...
3929358d4c46a49eae06cee30f9c05f46e27c681437f06c7ba71c5dae5088986
lrascao/raterl
raterl_sup.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2016 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the ...
null
https://raw.githubusercontent.com/lrascao/raterl/9c1dddda346a190aa19b6299778479a891a17a9c/src/raterl_sup.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2016 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(raterl_sup). -behavi...
91a74bc850b385023b3798eb6385058d4a654d16f970464c163a21f68d491d01
ocurrent/ocurrent
github.ml
Usage : github.exe SOURCE --github - token - file --github - webhook - secret - file GITHUB - APP - SECRET Given a Github repository SOURCE , build the latest version on the default branch using and OCaml 4.13 . Updates to the GitHub repository will trigger webhooks on " webhooks / github " , so...
null
https://raw.githubusercontent.com/ocurrent/ocurrent/8a3ff8d7813b798e767797264c5c3be81793d6ab/doc/examples/github.ml
ocaml
Generate a Dockerfile for building all the opam packages in the build context. this example does not have support for looking up job_ids for a commit Command-line parsing
Usage : github.exe SOURCE --github - token - file --github - webhook - secret - file GITHUB - APP - SECRET Given a Github repository SOURCE , build the latest version on the default branch using and OCaml 4.13 . Updates to the GitHub repository will trigger webhooks on " webhooks / github " , so...
cdeeba25e913c62fba5135d224155e4245cfe54e9fab52bbaa38db8fa3f447d2
potapenko/playphraseme-site
playlists.clj
(ns playphraseme.api.routes.playlists (:require [playphraseme.api.middleware.cors :refer [cors-mw]] [playphraseme.api.queries.playlists :refer :all] [compojure.api.sweet :refer :all] [ring.util.http-response :refer :all] [schema.core :as s])) (s/defschema Playlist {:...
null
https://raw.githubusercontent.com/potapenko/playphraseme-site/d50a62a6bc8f463e08365dca96b3a6e5dde4fb12/src/clj/playphraseme/api/routes/playlists.clj
clojure
(ns playphraseme.api.routes.playlists (:require [playphraseme.api.middleware.cors :refer [cors-mw]] [playphraseme.api.queries.playlists :refer :all] [compojure.api.sweet :refer :all] [ring.util.http-response :refer :all] [schema.core :as s])) (s/defschema Playlist {:...
85132d43404f25a9badb0b39852d6609ad9dbefc04b78bf07f3274e522ef724d
ocamllabs/vscode-ocaml-platform
ast_editor.ml
open Import exception User_error of string module Handlers = struct let unpwrap = function | `Ok () -> () | `Error err_msg -> show_message `Error "%s" err_msg let w1 f x = try `Ok (f x) with User_error e -> `Error e let ws f x y = match f x with | `Ok f' -> ( try `Ok (f' y) with User_error e -...
null
https://raw.githubusercontent.com/ocamllabs/vscode-ocaml-platform/9b3fc24994b41e3be5999c08aef664cf90728a94/src/ast_editor.ml
ocaml
!original_mode && Find and update the webview Register listener that monitors active editor change. Register listener that monitors closing documents. Register listener that monitors saving documents.
open Import exception User_error of string module Handlers = struct let unpwrap = function | `Ok () -> () | `Error err_msg -> show_message `Error "%s" err_msg let w1 f x = try `Ok (f x) with User_error e -> `Error e let ws f x y = match f x with | `Ok f' -> ( try `Ok (f' y) with User_error e -...
e35926aa172dfa51bb5b28d7b271ecb10e9e626656f2e3fbc5c4549022b9aa57
OCamlPro/typerex-lldb
LLDBOCamlDatarepr.ml
(**************************************************************************) (* *) (* OCamlPro TypeRex *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/typerex-lldb/3be12b69f30127bbf8a5dd483a6bfbbd6045ba0e/tools/ocp-lldb/LLDBOCamlDatarepr.ml
ocaml
************************************************************************ OCamlPro TypeRex This file is distributed ...
Copyright OCamlPro 2011 - 2016 . All rights reserved . ( GNU Public Licence version 3.0 ) . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE...
fe7f7216ce9cb82a0ad9ac80050572b50f49a7264d6af96e7ef3530a8ec2c7a9
clj-kafka/franzy
protocols.clj
(ns franzy.clients.mocks.producer.protocols) (defprotocol KafkaMockProducerLifecycle (complete-next! [this])) (defprotocol KafkaHistorian (clear-history! [this]) (history [this]))
null
https://raw.githubusercontent.com/clj-kafka/franzy/6c2e2e65ad137d2bcbc04ff6e671f97ea8c0e380/mocks/src/franzy/clients/mocks/producer/protocols.clj
clojure
(ns franzy.clients.mocks.producer.protocols) (defprotocol KafkaMockProducerLifecycle (complete-next! [this])) (defprotocol KafkaHistorian (clear-history! [this]) (history [this]))
0a09d7af9bc3aeeb1fc57d5d163986eaecc78eee08b44299913a6da6c2e6f475
callum-oakley/advent-of-code
12.clj
(ns aoc.2020.12 (:require [clojure.string :as str] [clojure.test :refer [deftest is]])) (defn parse [s] (map #(vector (first %) (read-string (subs % 1))) (str/split-lines s))) (def compass {\N [0 1] \S [0 -1] \E [1 0] \W [-1 0]}) (defn move [pos dir dist] (map + pos (map #(* dist %) dir))) (defn turn ...
null
https://raw.githubusercontent.com/callum-oakley/advent-of-code/e24c126fdfa4852c1380f5d1b1fda96da1ebe553/src/aoc/2020/12.clj
clojure
(ns aoc.2020.12 (:require [clojure.string :as str] [clojure.test :refer [deftest is]])) (defn parse [s] (map #(vector (first %) (read-string (subs % 1))) (str/split-lines s))) (def compass {\N [0 1] \S [0 -1] \E [1 0] \W [-1 0]}) (defn move [pos dir dist] (map + pos (map #(* dist %) dir))) (defn turn ...
bb5e5de6299482a58695b9fc466857b90520fa6d5917b49219b1fcf1d20431f1
lwhjp/racket-asm
base.rkt
#lang racket/base (provide (all-from-out "private/assembler.rkt")) (require "private/assembler.rkt")
null
https://raw.githubusercontent.com/lwhjp/racket-asm/57abd235fcb8c7505990f8e9731c01c716324ee5/base.rkt
racket
#lang racket/base (provide (all-from-out "private/assembler.rkt")) (require "private/assembler.rkt")
ae9edf3e16c080901614ecd478b7c356af22217ccb543f4d0327a08ca5dc7d1d
davexunit/guile-allegro5
system.scm
(define-module (allegro system) #:use-module (system foreign) #:use-module (allegro utils) #:export (allegro-pi al-install-system al-init al-uninstall-system al-is-system-installed? al-get-allegro-version al-set-exe-name al-set-ap...
null
https://raw.githubusercontent.com/davexunit/guile-allegro5/614ecc978e034f7b7ba5bd23e27111c8fef81b56/allegro/system.scm
scheme
Foreign function bindings Wrappers
(define-module (allegro system) #:use-module (system foreign) #:use-module (allegro utils) #:export (allegro-pi al-install-system al-init al-uninstall-system al-is-system-installed? al-get-allegro-version al-set-exe-name al-set-ap...
1b93ef5edabc29841952e30b7c98e99107f92ba07a7b9ce192a63a66324ef758
waldheinz/ads
SplitFile.hs
{-# LANGUAGE OverloadedStrings #-} module Freenet.SplitFile ( SplitFile(..), SplitFileSegment(..), fetchSplitFile ) where import qualified Codec.FEC as FEC import Control.Concurrent ( forkIO ) import Control.Concurrent.STM import qualified Control.Exception as CE import Control.Monad ( replicateM_ ) import Dat...
null
https://raw.githubusercontent.com/waldheinz/ads/7695a157d76f35849351b2e039890eae1b419088/src/lib/Freenet/SplitFile.hs
haskell
# LANGUAGE OverloadedStrings # ^ True if this is a data block, false if it's a check block ^ the compression codec used by this splitfile ^ size of compressed data, equals original size if not compressed ^ size of original data before compression was applied ^ the segments this split consists of ^ MIME type of th...
module Freenet.SplitFile ( SplitFile(..), SplitFileSegment(..), fetchSplitFile ) where import qualified Codec.FEC as FEC import Control.Concurrent ( forkIO ) import Control.Concurrent.STM import qualified Control.Exception as CE import Control.Monad ( replicateM_ ) import Data.Word import qualified Data.ByteSt...
27725e3f842485fd931721ae5b92a322cd4ea05d101de938b1c0a7d911de3fad
Carnap/Carnap
AcceptJSON.hs
# LANGUAGE UndecidableInstances , FlexibleInstances , RankNTypes , OverloadedStrings , FlexibleContexts , DeriveDataTypeable , CPP , JavaScriptFFI # module Carnap.GHCJS.Action.AcceptJSON ( acceptJSONAction) where import Data.Tree as T import qualified Data.Map as M import Data.Aeson as A import Data.Foldable ...
null
https://raw.githubusercontent.com/Carnap/Carnap/99546e377008247c5a1e8de1e294aac8e22584d7/Carnap-GHCJS/src/Carnap/GHCJS/Action/AcceptJSON.hs
haskell
- XXX See if this duplication can be avoided TODO: unify with other callback code in SequentCheck
# LANGUAGE UndecidableInstances , FlexibleInstances , RankNTypes , OverloadedStrings , FlexibleContexts , DeriveDataTypeable , CPP , JavaScriptFFI # module Carnap.GHCJS.Action.AcceptJSON ( acceptJSONAction) where import Data.Tree as T import qualified Data.Map as M import Data.Aeson as A import Data.Foldable ...
a40722bfd9fe6d9f8ecfe90a12fbcd37d2841124c01afb2b730ab0e778cc3ed8
futurice/haskell-mega-repo
Config.hs
# LANGUAGE DataKinds # module Futurice.App.Badge.Config ( Config(..), ) where import Futurice.EnvConfig import Futurice.Integrations import Futurice.Prelude import Prelude () import Servant.Client (BaseUrl) import qualified . GroupName as FUM import qualified FUM.Types.Login as FUM data Config ...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/badge-app/src/Futurice/App/Badge/Config.hs
haskell
, cfgAccessGroups :: ![FUM.GroupName] <*> envVar "ACCESS_GROUPS"
# LANGUAGE DataKinds # module Futurice.App.Badge.Config ( Config(..), ) where import Futurice.EnvConfig import Futurice.Integrations import Futurice.Prelude import Prelude () import Servant.Client (BaseUrl) import qualified . GroupName as FUM import qualified FUM.Types.Login as FUM data Config ...
f462537c647c8e2cff4ed5b7cd4855bec01919740bb65d8eb0ced4ee2a37fd4e
racket/drdr
time.rkt
#lang racket/base (require racket/cmdline racket/list job-queue racket/system "config.rkt" "notify.rkt" "dirstruct.rkt" "sema.rkt" "cache.rkt") (define test-workers (make-job-queue (number-of-cpus))) (define start-revision #f) (define history? #f...
null
https://raw.githubusercontent.com/racket/drdr/a3e5e778a1c19e7312b98bab25ed95075783f896/time.rkt
racket
#lang racket/base (require racket/cmdline racket/list job-queue racket/system "config.rkt" "notify.rkt" "dirstruct.rkt" "sema.rkt" "cache.rkt") (define test-workers (make-job-queue (number-of-cpus))) (define start-revision #f) (define history? #f...
89fd966c6cc10d7d9a5c56abc7c4d198f42dd716ae2653b041f2ad04750b7654
patrikja/autosar
ARSim.hs
Copyright ( c ) 2014 - 2015 , , , , and 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 copyr...
null
https://raw.githubusercontent.com/patrikja/autosar/2b8d3a22eb99812dca645a1c3c18ce18fbf6d539/oldARSim/ARSim.hs
haskell
Lets design the interface later... For future compatability | A monad for writing runnables Enter is blocking A monad for building up the static structure. Accumulates the The queue is physically located on the 'required' side, which is why the receiver specifies the max queue length. A hack to do some kind of ...
Copyright ( c ) 2014 - 2015 , , , , and 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 copyr...
b657f7c7091c9cef6da7ea03afad41b470c09d02fa9edd0e5201cc16b4ef5d72
toschoo/mom
Registry.hs
# LANGUAGE CPP # module Registry #ifndef TEST (insert, remove, getWorker, freeWorker, getServiceName, clean, size, stat, statPerService) #endif where import Network.Mom.Patterns.Broker.Common import Control.Concurrent import Control.Monad (when) import C...
null
https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/patterns/test/broker/Registry.hs
haskell
last action + heartbeat silent error update last action update last action remove all dead notes and return list of removed nodes
# LANGUAGE CPP # module Registry #ifndef TEST (insert, remove, getWorker, freeWorker, getServiceName, clean, size, stat, statPerService) #endif where import Network.Mom.Patterns.Broker.Common import Control.Concurrent import Control.Monad (when) import C...
bae1b9eff331eef1a9cab36dcaef86cd0474fa11121ee81b6f729865af648f10
BranchTaken/Hemlock
test_bit_pop_bit_clz_bit_ctz.ml
open! Basis.Rudiments open! Basis open U128 let test () = let rec test = function | [] -> () | x :: xs' -> begin File.Fmt.stdout |> Fmt.fmt "bit_{pop,clz,ctz} " |> fmt ~alt:true ~zpad:true ~width:32L ~radix:Radix.Hex ~pretty:true x |> Fmt.fmt " -> " |> Uns.pp (bit_pop ...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/u128/test_bit_pop_bit_clz_bit_ctz.ml
ocaml
open! Basis.Rudiments open! Basis open U128 let test () = let rec test = function | [] -> () | x :: xs' -> begin File.Fmt.stdout |> Fmt.fmt "bit_{pop,clz,ctz} " |> fmt ~alt:true ~zpad:true ~width:32L ~radix:Radix.Hex ~pretty:true x |> Fmt.fmt " -> " |> Uns.pp (bit_pop ...
d8fd5f0823384e1867872f2f1d1fae3bd48f40fabc9278f2a25649328a09e3dd
Mishio595/disml
ban.ml
include Ban_t
null
https://raw.githubusercontent.com/Mishio595/disml/cbb1e47a6d358eace03790c07a1b85641f4ca366/lib/models/guild/ban.ml
ocaml
include Ban_t
1e007c9d5077871c5f4929afbb9a3609f513e18a017cf7e8b21c4858b33aaafa
mirage/conan
comparison.ml
let invalid_arg fmt = Format.kasprintf invalid_arg fmt type 'a t = | Equal of 'a | Different of 'a | Greater of 'a | Lower of 'a | And of 'a | Xor of 'a let serialize pp ppf = function | Equal v -> Format.fprintf ppf "@[<2>Conan.Comparison.equal_to@ %a@]" pp v | Different v -> Format.fprintf ppf...
null
https://raw.githubusercontent.com/mirage/conan/fb144c7785ff0aa4ec6d8c87e58ca2a0c2d328db/src/comparison.ml
ocaml
let invalid_arg fmt = Format.kasprintf invalid_arg fmt type 'a t = | Equal of 'a | Different of 'a | Greater of 'a | Lower of 'a | And of 'a | Xor of 'a let serialize pp ppf = function | Equal v -> Format.fprintf ppf "@[<2>Conan.Comparison.equal_to@ %a@]" pp v | Different v -> Format.fprintf ppf...
6f0b48c9db360636cbb529679485be62b62047fbb2f3fabc8f7bf4414fa9271e
pixlsus/registry.gimp.org_static
defringe.scm
Defringe is a script for ; ; This script removes the blue/purple fringe found in digital camera ; pictures. ; ; The script is located in "<Image> / Script-Fu / Enhance / Defringe" ; Last changed : 2009 July 5 ; Copyright ( C ) 2009 < > ; ; -------------------------------------------------------------------- ;...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/defringe.scm
scheme
This script removes the blue/purple fringe found in digital camera pictures. The script is located in "<Image> / Script-Fu / Enhance / Defringe" -------------------------------------------------------------------- Changelog: - Created! - Fixed some blotchiness found in overblown areas - Cleared ...
Defringe is a script for Last changed : 2009 July 5 Copyright ( C ) 2009 < > Version 1.0 ( 2009 June 16 ) Version 1.1 ( 2009 June 18 ) Version 1.2 ( 2009 July 5 ) it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License...
c8f19686d439a60e36dee3da2fc359ac0cea807539dc0bd4aa35f61a43e50d22
atlas-engineer/nyxt
filter.lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :prompter) (defvar word-separator '(#\ #\Tab) "List of characters that are considered as word separators by `score-suggestion-string'.") (defvar start-bonus 0.3 "Additional weight `score-suggestion-strin...
null
https://raw.githubusercontent.com/atlas-engineer/nyxt/d8eabb9246ae5de0e07b94804d15cc9ecf3efb32/libraries/prompter/filter.lisp
lisp
FIXME: Optimized arithmetic typing is hard to get right. Can we fix it? bonus for continuous match bonus for word ending early (shorter words at the beginning wins) flex match, with higher weight for the beginning TODO: Learn good value and enable low-score filtering.
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :prompter) (defvar word-separator '(#\ #\Tab) "List of characters that are considered as word separators by `score-suggestion-string'.") (defvar start-bonus 0.3 "Additional weight `score-suggestion-strin...
9d28bfcc841b6a7a053455f78907fa0e6f245690074f42d2e2aac67cc7cba824
picnic/RelationExtraction
proof_scheme.ml
(****************************************************************************) RelationExtraction - Extraction of inductive relations for Coq (* *) (* This program is free software: you can redistribute it and/or modify *) it u...
null
https://raw.githubusercontent.com/picnic/RelationExtraction/a4cee37d0a8e5f0eff2e010e6305e037aa0d2564/proof_scheme.ml
ocaml
************************************************************************** This program is free software: you can redistribute it and/or modify (at your option) any later version. ...
RelationExtraction - Extraction of inductive relations for Coq 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 Copyright 2...
fc9cdb8f01b31872c1c7a78d0d4d27116ec4b748e39554ab876c0046b3132d7b
jpmonettas/flow-storm-debugger
call_tree.clj
(ns flow-storm.debugger.ui.flows.call-tree (:require [flow-storm.debugger.ui.flows.code :as flow-code] [flow-storm.debugger.ui.flows.general :as ui-flows-gral] [flow-storm.debugger.ui.flows.components :as flow-cmp] [flow-storm.utils :as utils :refer [log]] [flow-storm.d...
null
https://raw.githubusercontent.com/jpmonettas/flow-storm-debugger/6ec3c452bf7da4b5b43c1bd75b487d1bc23e4e10/src-dbg/flow_storm/debugger/ui/flows/call_tree.clj
clojure
Important ! this will be called for all visible tree nodes after any expansion so it should be fast it's the root dummy node, put update-tree-btn else, put the frame
(ns flow-storm.debugger.ui.flows.call-tree (:require [flow-storm.debugger.ui.flows.code :as flow-code] [flow-storm.debugger.ui.flows.general :as ui-flows-gral] [flow-storm.debugger.ui.flows.components :as flow-cmp] [flow-storm.utils :as utils :refer [log]] [flow-storm.d...
0fa998fc768cd978cace8a3d6f29a89b9049e4027b92326d257a9c9a7220a27e
abailly/hs-word2vec
Array.hs
| An implementation of ` Model . NN ` based on Repa arrays module Model.Array where import Control.Monad.Trans (MonadIO, liftIO) import qualified Data.Aeson as J import Data.Array.Repa ((:.) (..), Array, DIM1, U, Z (..), computeP, foldP, fromList...
null
https://raw.githubusercontent.com/abailly/hs-word2vec/894e401325dbb7c35c45e9ed546b0914f93c900f/src/Model/Array.hs
haskell
| Used for vector computations | More efficient to update part of a map than a complete matrix Number of words in the model Size of the model or number of dimensions each word is mapped to also called number of features The input -> hidden connection matrix input layer has size equal to number of words in vocabu...
| An implementation of ` Model . NN ` based on Repa arrays module Model.Array where import Control.Monad.Trans (MonadIO, liftIO) import qualified Data.Aeson as J import Data.Array.Repa ((:.) (..), Array, DIM1, U, Z (..), computeP, foldP, fromList...
bd6dd3369a2c9c9e47e5d7c5c989f2f4503baa6fefdffe566aa1454cc63ab9d7
revnull/noisefunge-legacy
Befunge.hs
This source file is a part of the noisefunge programming environment . Copyright ( C ) 2015 Rev. < > 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...
null
https://raw.githubusercontent.com/revnull/noisefunge-legacy/fc43cd4b024d26650818280403eee21fc6e0fcf6/src/Language/NoiseFunge/Befunge.hs
haskell
This source file is a part of the noisefunge programming environment . Copyright ( C ) 2015 Rev. < > 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...
0465d5253dcf15bb17f4c035fada74fa8b313f3d04e61cee12299a0a86185eaf
robert-strandh/Cluster
data.lisp
(cl:in-package #:cluster) (defclass data-command (command) ((%data-bytes :initarg :data-bytes :reader data-bytes))) (defmethod compute-encoding ((item data-command)) (data-bytes item)) Return a list of SIZE integers of type ( UNSIGNED - BYTE 8) making up the representation of VALUE in a little - endian encod...
null
https://raw.githubusercontent.com/robert-strandh/Cluster/623600d51cc0a12ac44968dd51e7750cd49cd224/data.lisp
lisp
bytes in the resulting list are ordered from least to most significant.
(cl:in-package #:cluster) (defclass data-command (command) ((%data-bytes :initarg :data-bytes :reader data-bytes))) (defmethod compute-encoding ((item data-command)) (data-bytes item)) Return a list of SIZE integers of type ( UNSIGNED - BYTE 8) making up the representation of VALUE in a little - endian encod...
b80ef3c7e5be05daeb99815979a89e8a043b3bdd22766bad8e116b1d30e3e40d
facebook/pyre-check
decoratorTest.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/pyre-check/7d59476e9e15dd86666daa972028b018c27608f0/source/analysis/test/integration/decoratorTest.ml
ocaml
TODO(T27138096): Iterable should have attribute `__enter__`. Decorators are chained properly. Avoid infinite looping Neither of these error because the error only comes up on each others' inner application. Not super concerned about that, mostly just don't want to hang the type checker This should not...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
56d098e533896917819b82cf84b5874888fbd9eea7ed0489e3c9567fb3d69745
ocamllabs/ocaml-modular-implicits
string.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Ga...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/stdlib/string.ml
ocaml
********************************************************************* OCaml ...
, projet Gallium , INRIA Rocquencourt Copyright 2014 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with external length : string -> int = "%stri...
2779107f55777ef7bc6ee0595d0afdefa536d399f081e5811e9139a33d1d9d52
mbenke/zpf2013
Sudoku.hs
-- -- Sudoku solver using constraint propagation. The algorithm is by ; the implementation is by and , and can be found on -- the Haskell Wiki -- The wiki license applies to this code : -- -- Permission is hereby granted, free of charge, to any person obtaining -- this work (the "Work"), to deal in the ...
null
https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/Par/Marlow/Sudoku.hs
haskell
Sudoku solver using constraint propagation. The algorithm is by the Haskell Wiki Permission is hereby granted, free of charge, to any person obtaining this work (the "Work"), to deal in the Work without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sub...
; the implementation is by and , and can be found on The wiki license applies to this code : THE WORK IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABLE FOR ANY CLAIM , DAMAGES OR OTHER LIABILITY , WHETHER IN AN ACTION module Sudoku (solve, printGrid) where import Data.List hid...
9f3dc9760e6ed83ee82adfd95827b51307d4ae65af950ebb4d508c62811a709c
Helium4Haskell/helium
Bug1.hs
type Table = [[String]] reOrderTable :: String -> Table -> Table reOrderTable stringy tabel = (!! x): (take x tabel) : (drop (x-1) tabel) where x = f stringy tabel f :: String -> Table -> Int f _ [] = 0 f stringz (t:ts) |eqString stringz (head t) = 0 ...
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/simple/typeerrors/Examples/Bug1.hs
haskell
type Table = [[String]] reOrderTable :: String -> Table -> Table reOrderTable stringy tabel = (!! x): (take x tabel) : (drop (x-1) tabel) where x = f stringy tabel f :: String -> Table -> Int f _ [] = 0 f stringz (t:ts) |eqString stringz (head t) = 0 ...
b33452064dc0efade055ac7d8cf2ee72103b0e0b067b70f5dd06b235954ab582
mfikes/fifth-postulate
ns139.cljs
(ns fifth-postulate.ns139) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns139.cljs
clojure
(ns fifth-postulate.ns139) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
f2ce7e35fb1c66173fa0bfa336fdfcf21564f99f6623874a7f5904ec15ebf54a
radian-software/smarter-playlist
project.clj
(defproject smarter-playlist "0.1.0-SNAPSHOT" :description "Generates interesting iTunes playlists" :dependencies [[org.clojure/clojure "1.8.0"] [clj-time "0.12.0"] [com.github.bdesham/clj-plist "0.10.0"] [org.clojure/tools.cli "0.3.5"]] :main smarter-playlist.co...
null
https://raw.githubusercontent.com/radian-software/smarter-playlist/e89f7e34cddc2d6a672fadfa84ddd3e84c5b1292/project.clj
clojure
(defproject smarter-playlist "0.1.0-SNAPSHOT" :description "Generates interesting iTunes playlists" :dependencies [[org.clojure/clojure "1.8.0"] [clj-time "0.12.0"] [com.github.bdesham/clj-plist "0.10.0"] [org.clojure/tools.cli "0.3.5"]] :main smarter-playlist.co...
f798e90a1f34a9488fa6c6d0548f95811cc7e9b4c4cd78a755f2ee2a4ae996f4
dino-/epub-tools
epubmeta.hs
-- License: ISC (see LICENSE) Author : < > import Data.Maybe import System.Environment ( getArgs ) import System.Exit import EpubTools.EpubMeta.Display import EpubTools.EpubMeta.Edit import EpubTools.EpubMeta.Export import EpubTools.EpubMeta.Import import EpubTools.EpubMeta.Opts import EpubTools.EpubMeta.Util ...
null
https://raw.githubusercontent.com/dino-/epub-tools/edcfa8f56622433f39febac9436bf88c04fc8303/src/EpubTools/epubmeta.hs
haskell
License: ISC (see LICENSE)
Author : < > import Data.Maybe import System.Environment ( getArgs ) import System.Exit import EpubTools.EpubMeta.Display import EpubTools.EpubMeta.Edit import EpubTools.EpubMeta.Export import EpubTools.EpubMeta.Import import EpubTools.EpubMeta.Opts import EpubTools.EpubMeta.Util dispatch :: Options -> [FilePa...
1233be0562bea6992e32039454862a029fab273fc32de288149249c16cc441cd
donaldsonjw/bigloo
predicate.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / comptime / Object / predicate.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Object/predicate.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * We make the class predicate */ * -----------------------...
* serrano / prgm / project / bigloo / comptime / Object / predicate.scm * / * Author : * / * Creation : We d 5 11:16:50 1996 * / * Last change : We d Nov 21 07:20:11 2012 ( serrano ) * / * Copyr...
5b1dfaa0d01beed7f97883bfd232609cd8469f287630757e040d9fccebdbdf7e
racket/racket7
utils-primitive.rkt
#lang racket/base (require racket/private/config racket/private/executable-path "../common/reflect-hash.rkt" (only-in "../eval/load.rkt" load/use-compiled) "../eval/collection.rkt") (provide utils-primitives) These functions are a small step away from ` # % kernel ` , and they ;;...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/boot/utils-primitive.rkt
racket
have traditionally been available as the `#%utils` module. Don't implementation sometimes is. We turn the functions into a "primitive" module using this table in a bootstrapped load.
#lang racket/base (require racket/private/config racket/private/executable-path "../common/reflect-hash.rkt" (only-in "../eval/load.rkt" load/use-compiled) "../eval/collection.rkt") (provide utils-primitives) These functions are a small step away from ` # % kernel ` , and they ...
e12c7d9ff10374da40c5a577813f1fdce0b1ec5ec0df8fafe8cb4d15bfc68152
ocaml-flambda/flambda-backend
convert_primitives.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/14e94c382a2ea09956a217c1ffb25ad5c24e3c89/ocaml/middle_end/convert_primitives.ml
ocaml
************************************************************************ OCaml ...
, OCamlPro and , Copyright 2017 OCamlPro SAS Copyright 2017 Jane Street Group LLC the GNU Lesser General Public License version 2.1 , with the ...
8325b18fa3a8712a37c70e9dd7a3f32d0e4c94f22d6919cb1713a1656c339500
BramvanVeenschoten1/qtt
Prettyprint.hs
module Prettyprint where import Lexer(Loc) import Parser(Binder(..)) import Core import Elaborator import Utils import Data.Map import Data.List instance Show Mult where show Zero = " 0" show One = " 1" show Many = "" showGlobalNames :: Objects -> GlobalNames -> String showGlobalNames obs = ...
null
https://raw.githubusercontent.com/BramvanVeenschoten1/qtt/ece216ac2e6126b25e0894e93bd146a838b084b3/lamcvii/Prettyprint.hs
haskell
(ctx !! n) will have to do without constructor names for now
module Prettyprint where import Lexer(Loc) import Parser(Binder(..)) import Core import Elaborator import Utils import Data.Map import Data.List instance Show Mult where show Zero = " 0" show One = " 1" show Many = "" showGlobalNames :: Objects -> GlobalNames -> String showGlobalNames obs = ...
5821cea34871c150d736245bfd44a5cdd535b217ada2bf917440bc6162a740eb
0xYUANTI/huckleberry
huck_log.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% @doc The replicated log. %%% This is basically s2_gen_db with more control over checkpointing and a %%% different callback interface. %%% @end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% member leng...
null
https://raw.githubusercontent.com/0xYUANTI/huckleberry/1df7d611b509a725140b048f444e820c044fb807/src/huck_log.erl
erlang
@doc The replicated log. This is basically s2_gen_db with more control over checkpointing and a different callback interface. @end _* Module declaration =============================================== _* Exports ========================================================== Log API Statemachine API gen_server call...
member length concat term last_term -module(huck_log). -behaviour(gen_server). -export([ append/2 , commit/2 , new/1 , open/1 , truncate/2 ]). -export([ ]). -export([ code_change/3 , handle_call/3 , handle_cast/2 , handle_info/2 , init/1 ...
931b6c103faef2d57357d24c774526ee0af510ef278c04b394518e3b4c4032bd
ocaml-ppx/ppx
code_matcher.mli
(** Match source code against generated code *) open! Import (** Checks that the given code starts with [expected] followed by [@@@deriving.end] or [@@@end]. Raises if there is no [@@@deriving.end]. If some items don't match, it calls [mismatch_handler] with the location of the source items and the ...
null
https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/src/code_matcher.mli
ocaml
* Match source code against generated code * Checks that the given code starts with [expected] followed by [@@@deriving.end] or [@@@end]. Raises if there is no [@@@deriving.end]. If some items don't match, it calls [mismatch_handler] with the location of the source items and the expected code. * Sam...
open! Import val match_structure : pos:Lexing.position -> expected:structure -> mismatch_handler:(Location.t -> structure -> unit) -> structure -> unit val match_signature : pos:Lexing.position -> expected:signature -> mismatch_handler:(Location.t -> signature -> unit) -> signature -> unit
aa78bd43d6feb42abff720f55700a60cf8316b20455cdf2d0a29542e1a301c5f
shayan-najd/NativeMetaprogramming
T7287.hs
# LANGUAGE MagicHash # module T7287 where import GHC.Prim {-# RULES "int2Word#/word2Int#" forall x. int2Word# (word2Int# x) = x #-} We get a legitmiate T7287.hs:7:3 : warning : Rule int2Word#/word2Int # may never fire because rule " word2Int # " for ‘ word2Int # ’ might fire first ...
null
https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/simplCore/should_compile/T7287.hs
haskell
# RULES "int2Word#/word2Int#" forall x. int2Word# (word2Int# x) = x #
# LANGUAGE MagicHash # module T7287 where import GHC.Prim We get a legitmiate T7287.hs:7:3 : warning : Rule int2Word#/word2Int # may never fire because rule " word2Int # " for ‘ word2Int # ’ might fire first Probable fix : add phase [ n ] or [ ~n ] to the competing rule becaus...
2a96dab9e3ccc8f7c0b261c70ba756fd926179f16b55e3e1eea1d70a0a2c5d4c
wireless-net/erlang-nommu
wxPickerBase.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2013 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Publi...
null
https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxPickerBase.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitatio...
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(wxPickerBase). -include("wxe.hrl"...
eaac49416591990717509fd0b32c553512a742de24ec2a6cde5d55744bdfaa78
Elzair/nazghul
jim.scm
;;---------------------------------------------------------------------------- ;; Schedule ;; ;; The schedule below is for the place "Trigrave" ;;---------------------------------------------------------------------------- (kern-mk-sched 'sch_jim (list 0 0 trigrave-jims-bed "sleeping") ...
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.001/jim.scm
scheme
---------------------------------------------------------------------------- Schedule The schedule below is for the place "Trigrave" ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- Gob ------------------------...
(kern-mk-sched 'sch_jim (list 0 0 trigrave-jims-bed "sleeping") (list 6 0 trigrave-tavern-table-1a "eating") (list 7 0 trigrave-forge "working") (list 12 0 trigrave-tavern-table-1a "eating") (list 13 0 trigrave-forge ...
f0785fa9a86c15fcd06670cb6192d8b3d9daf0dfb38baa3abfe9ef94bd93c4c5
aristidb/aws
Aws.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE BangPatterns # module Aws.Aws ( -- * Logging LogLevel(..) , Logger , defaultLog -- * Configuration , Configuration(..) , baseConfiguration , dbgConfiguration -- * Transaction runn...
null
https://raw.githubusercontent.com/aristidb/aws/a19741b4ee3d0f36f85c9d3680806f75834f636c/Aws/Aws.hs
haskell
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # * Logging * Configuration * Transaction runners ** Safe runners ** Unsafe runners ** URI runners * Iterated runners , awsIteratedAll | The severity of a log message, in rising order. | The interface for any logging function. Takes log level ...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE BangPatterns # module Aws.Aws LogLevel(..) , Logger , defaultLog , Configuration(..) , baseConfiguration , dbgConfiguration , aws , awsRef , pureAws , memoryAws , simpleAws , unsafeAws , unsafeAwsRef , awsUri , awsIteratedSource , awsIteratedSource' , awsIterat...
d92aefbb72920eaf5514e9e905f20585483695049d384c9fe5e8bea29c96d078
ephemient/aoc2018
Day1.hs
| Module : Day1 Description : < Day 1 : Chronal Calibration > Module: Day1 Description: < Day 1: Chronal Calibration> -} {-# LANGUAGE TransformListComp, TypeApplications #-} module Day1 (day1a, day1b) where import Control.Applicative ((<|>)) import Data.List (find, scanl', tails) import ...
null
https://raw.githubusercontent.com/ephemient/aoc2018/eb0d04193ccb6ad98ed8ad2253faeb3d503a5938/src/Day1.hs
haskell
# LANGUAGE TransformListComp, TypeApplications # | Returns a repeat if found within a single cycle; otherwise, the running sums are grouped by the
| Module : Day1 Description : < Day 1 : Chronal Calibration > Module: Day1 Description: < Day 1: Chronal Calibration> -} module Day1 (day1a, day1b) where import Control.Applicative ((<|>)) import Data.List (find, scanl', tails) import Data.IntSet (empty, insert, member) import Data.Maybe...
a270f8fa53d47a6dfdf8907686499218791040d7d52a4606bf1f1cdb9ce7fd71
quark-lang/quark
Entry.hs
# LANGUAGE TupleSections # # LANGUAGE LambdaCase # module Core.Entry where import Core.Quark import System.FilePath ( (</>), takeDirectory ) import qualified Data.Map as M import Core.Import.Duplicates (getImports) import Core.Import.Remover import Core.Inference.Type (runInfer) import Control.Monad.RWS (...
null
https://raw.githubusercontent.com/quark-lang/quark/15ccc341a795190536063d14365a47f20f8fd67b/app/Core/Entry.hs
haskell
# LANGUAGE TupleSections # # LANGUAGE LambdaCase # module Core.Entry where import Core.Quark import System.FilePath ( (</>), takeDirectory ) import qualified Data.Map as M import Core.Import.Duplicates (getImports) import Core.Import.Remover import Core.Inference.Type (runInfer) import Control.Monad.RWS (...
c9d6756bb2aea199d7b2ab643118116f7ab201df4acdb943d1d6a81ecc13fa8a
penpot/penpot
export.clj
(ns hooks.export (:require [clj-kondo.hooks-api :as api])) (defn export [{:keys [:node]}] (let [[_ sname] (:children node) result (api/list-node [(api/token-node (symbol "def")) (api/token-node (symbol (name (:value sname)))) sname])] {:node resul...
null
https://raw.githubusercontent.com/penpot/penpot/4e2dbdbebee6aed2eee6e91509fcf1b6da72fceb/.clj-kondo/hooks/export.clj
clojure
(prn "=====>" rtype) (prn (api/sexpr result))
(ns hooks.export (:require [clj-kondo.hooks-api :as api])) (defn export [{:keys [:node]}] (let [[_ sname] (:children node) result (api/list-node [(api/token-node (symbol "def")) (api/token-node (symbol (name (:value sname)))) sname])] {:node resul...
ea9d3a7146b49fc968e11f81b5b6cfe99a39d48c494ce73c45a039c637f232c2
iamFIREcracker/adventofcode
day22.lisp
(defpackage :aoc/2020/22 #.cl-user::*aoc-use*) (in-package :aoc/2020/22) (defun parse-decks (data) (let (groups current) (dolist (string (append data '(""))) (if (string= string "") (setf groups (cons (reverse current) groups) current nil) (setf current (cons string current)))) (list ...
null
https://raw.githubusercontent.com/iamFIREcracker/adventofcode/c395df5e15657f0b9be6ec555e68dc777b0eb7ab/src/2020/day22.lisp
lisp
(defpackage :aoc/2020/22 #.cl-user::*aoc-use*) (in-package :aoc/2020/22) (defun parse-decks (data) (let (groups current) (dolist (string (append data '(""))) (if (string= string "") (setf groups (cons (reverse current) groups) current nil) (setf current (cons string current)))) (list ...
065d68d5a142009564e7cccffea95e6349cb517c98d6e8f3f3b594d7995beabf
JoelSanchez/ventas
routes.cljs
(ns ventas.routes "Bidi wrapper and route utilities" (:require [accountant.core :as accountant] [bidi.bidi :as bidi] [cemerick.url :as url] [clojure.string :as str] [re-frame.core :as rf] [ventas-bidi-syntax.core :as bidi-syntax] [ventas.i18n :refer [i18n]] [ventas.page :as page] [ventas....
null
https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/src/cljs/ventas/routes.cljs
clojure
(ns ventas.routes "Bidi wrapper and route utilities" (:require [accountant.core :as accountant] [bidi.bidi :as bidi] [cemerick.url :as url] [clojure.string :as str] [re-frame.core :as rf] [ventas-bidi-syntax.core :as bidi-syntax] [ventas.i18n :refer [i18n]] [ventas.page :as page] [ventas....
fb53c59248839d7d76b9540ace04fd9193f072bc7722dc5f2d3bfa4d6ac0196c
xvw/planet
sector_test.ml
open Bedrock open Paperwork open Shapes open Test_tools open Error let invalid1 () = let qexp = Qexp.(node [ node [ tag "name"; string "test" ] ]) in match Sector.from_qexp qexp with | Ok _ -> failwith "should be invalid" | Error [ Undefined_field "desc"; Undefined_field "color" ] -> () | _ -> failwith "Inva...
null
https://raw.githubusercontent.com/xvw/planet/c2a77ea66f61cc76df78b9c2ad06d114795f3053/test/shapes_test/sector_test.ml
ocaml
open Bedrock open Paperwork open Shapes open Test_tools open Error let invalid1 () = let qexp = Qexp.(node [ node [ tag "name"; string "test" ] ]) in match Sector.from_qexp qexp with | Ok _ -> failwith "should be invalid" | Error [ Undefined_field "desc"; Undefined_field "color" ] -> () | _ -> failwith "Inva...
c5f4e0da224ff544f6f7cc6eed4ad586e8c5d95119cbef3d5b2a090f4b7a429e
askvortsov1/nittany_market
schema.ml
open Graphql_lwt let address = Schema.( obj "address" ~fields:(fun _ -> [ field "zipcode" ~args:Arg.[] ~typ:(non_null string) ~resolve:(fun _ (p : Models.Address.Address.t) -> p.zipcode); field "street_name" ~args:Arg.[] ~typ...
null
https://raw.githubusercontent.com/askvortsov1/nittany_market/08ffcad2bb2ead9aaeb85b22b88aa2af879e36ad/lib/graphql/schema.ml
ocaml
open Graphql_lwt let address = Schema.( obj "address" ~fields:(fun _ -> [ field "zipcode" ~args:Arg.[] ~typ:(non_null string) ~resolve:(fun _ (p : Models.Address.Address.t) -> p.zipcode); field "street_name" ~args:Arg.[] ~typ...
89b917784186ff8038ba39d09e86187596f84edb19a657a1936ef2d2720b53c5
jyh/metaprl
ma_basic.mli
extends Nuprl_basic
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/mesa/ma_basic.mli
ocaml
extends Nuprl_basic
f4cb727ed0651ebace44be1d11b57431779df120e713eb50af08c8ff60baf7ea
5outh/textlunky
Process.hs
module Control.Process( idP, (<.>), next, recursively, module Control.Process.Show, module Control.Process.Update, module Control.Process.Class ) where import Control.Process.Show import Control.Process.Update import Control.Process.Class import Types.Synonyms import Types.TextlunkyCommand import Types...
null
https://raw.githubusercontent.com/5outh/textlunky/8dd4d975ed86b761262e3026dd4c22a36b532104/src/Control/Process.hs
haskell
type Process state cmd r = which is interesting because we might be able to form something new from it, but this is on the backburner because I don't really care that much. Just think it's interesting for discussion later. process Id
module Control.Process( idP, (<.>), next, recursively, module Control.Process.Show, module Control.Process.Update, module Control.Process.Class ) where import Control.Process.Show import Control.Process.Update import Control.Process.Class import Types.Synonyms import Types.TextlunkyCommand import Types...
f3cfb7aef28b55198e39b002dc1fb7a9203aeaab2f28c37d1c1f948e09964d8f
jyp/MarXup
SimpleText.hs
module MarchUp.SimpleText (module Data.Monoid, element, textual) where import qualified MarchUp.Text as T import Data.Monoid import Data.Traversable import Data.Foldable import Control.Applicative type Text = T.Text String element :: Show a => a -> Text element = T.Elem . show textual = T.Text instance Show Text ...
null
https://raw.githubusercontent.com/jyp/MarXup/f9ff1d4aa076dd0844557001b61dff38c5a34a20/MarXup/SimpleText.hs
haskell
module MarchUp.SimpleText (module Data.Monoid, element, textual) where import qualified MarchUp.Text as T import Data.Monoid import Data.Traversable import Data.Foldable import Control.Applicative type Text = T.Text String element :: Show a => a -> Text element = T.Elem . show textual = T.Text instance Show Text ...
722599f365c3633a2072f8b3850a0efddc81480ca69d23e8893a725a3973d86b
melisgl/mgl-pax
foo-random-example.lisp
(mgl-pax:define-package :foo-random (:documentation "This package provides various utilities for random. See FOO-RANDOM:@FOO-RANDOM-MANUAL.") (:use #:common-lisp #:mgl-pax)) (in-package :foo-random) (defsection @foo-random-manual (:title "Foo Random manual") "Here you describe what's common to all the referen...
null
https://raw.githubusercontent.com/melisgl/mgl-pax/f0f421c04d05b77930af09b3f6c8ad574fb172cb/src/base/foo-random-example.lisp
lisp
This is a subsection.
(mgl-pax:define-package :foo-random (:documentation "This package provides various utilities for random. See FOO-RANDOM:@FOO-RANDOM-MANUAL.") (:use #:common-lisp #:mgl-pax)) (in-package :foo-random) (defsection @foo-random-manual (:title "Foo Random manual") "Here you describe what's common to all the referen...
0a788bf5601e436b9b034b4263b2a9d1b1b6f608ac6db1c73ce966686109d1c4
yallop/ocaml-charset
charset_bitops.ocaml.ml
* Copyright ( c ) 2022 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2022 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) external (.!()) : 'a array ->...
null
https://raw.githubusercontent.com/yallop/ocaml-charset/74f545621f89565f45925a16eda078914879b52c/lib/charset_bitops.ocaml.ml
ocaml
* Copyright ( c ) 2022 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2022 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) external (.!()) : 'a array ->...
c76b24fd0ee343a8cd6c896cefd2c9532b53a9985b6f10012417c71093535d2c
alsonkemp/turbinado-website
Edit.hs
markup= <div> <script type="text/javascript" src="/js/tiny_mce/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ mode : "exact", elements : "content", theme: "advanced", plugins : "safari,spellchecker,pagebreak,s...
null
https://raw.githubusercontent.com/alsonkemp/turbinado-website/310f38dd7d13cdb838e2ea6181c61521021c32b5/App/Views/Page/Edit.hs
haskell
markup= <div> <script type="text/javascript" src="/js/tiny_mce/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ mode : "exact", elements : "content", theme: "advanced", plugins : "safari,spellchecker,pagebreak,s...
f89b0a172790c5158b134aead5b8996bcd8bae405e53af859afcc9082045b2f1
OpenC2-org/ocas
ocas_app.erl
%%%------------------------------------------------------------------- Copyright ( c ) 2017 , sFractal Consulting , LLC 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....
null
https://raw.githubusercontent.com/OpenC2-org/ocas/c15132d9f37b1e0e29884456a520557c25b22f38/apps/ocas/src/ocas_app.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 i...
Copyright ( c ) 2017 , sFractal Consulting , LLC Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(ocas_app). -author("Duncan Sparrell"). -copyright("2016, sFractal Consulting, LLC"). -license(apache2). -behavi...
63cbe2b38d0d87f3cb96f922921864be7d8f9feb2103d142b3f7729e8e336d33
rtoy/ansi-cl-tests
some.lsp
;-*- Mode: Lisp -*- Author : Created : Fri Oct 18 07:07:07 2002 ;;;; Contains: Tests for SOME (in-package :cl-test) (deftest some.1 (some #'identity nil) nil) (deftest some.2 (some #'identity #()) nil) (deftest some.3 (let ((count 0)) (values (some #'(lambda (x) (incf count) (if (>...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/some.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for SOME Other specialized sequences Displaced vectors
Author : Created : Fri Oct 18 07:07:07 2002 (in-package :cl-test) (deftest some.1 (some #'identity nil) nil) (deftest some.2 (some #'identity #()) nil) (deftest some.3 (let ((count 0)) (values (some #'(lambda (x) (incf count) (if (>= x 10) x nil)) '(1 2 4 13 5 1)) coun...
1de5ac946462a7a6a5cb2a118648440067abfe9d8232293e7a92f173380e0a3b
HealthSamurai/dojo.clj
layout.cljs
(ns app.layout (:require [re-frame.core :as rf] [app.styles] [app.routes :refer [href]])) (rf/reg-sub ::navigation (fn [db _] {:title "INC" :menu [{:href (href "") :display "Home"} {:href (href "rest") :display "REST"} {:href (href "db") :display "DB"} ...
null
https://raw.githubusercontent.com/HealthSamurai/dojo.clj/94922640f534897ab2b181c608b54bfbb8351d7b/ui/src/app/layout.cljs
clojure
(ns app.layout (:require [re-frame.core :as rf] [app.styles] [app.routes :refer [href]])) (rf/reg-sub ::navigation (fn [db _] {:title "INC" :menu [{:href (href "") :display "Home"} {:href (href "rest") :display "REST"} {:href (href "db") :display "DB"} ...
9e135d148b48dc8f4a6984c693fe462436854b762736238b1c10c302207f7cb0
morloc-project/morloc
Namespace.hs
| Module : Morloc . Frontend . Namespace Description : All frontend types and datastructures Copyright : ( c ) , 2021 License : GPL-3 Maintainer : Stability : experimental Module : Morloc.Frontend.Namespace Description : All frontend types and datastructures Copyright : (c) Ze...
null
https://raw.githubusercontent.com/morloc-project/morloc/57b06c39f9b88e8930cb7162c5eeabf3a7175afc/library/Morloc/Frontend/Namespace.hs
haskell
rifraf * accessing state WARNING: silent bad things happen if this function does not copy all indices
| Module : Morloc . Frontend . Namespace Description : All frontend types and datastructures Copyright : ( c ) , 2021 License : GPL-3 Maintainer : Stability : experimental Module : Morloc.Frontend.Namespace Description : All frontend types and datastructures Copyright : (c) Ze...
1f45e039d61f89266edb2bce202bf99d934e0cc5153f62bc9c567e9efd214302
dyoo/whalesong
drag-and-drop-2.rkt
#lang whalesong (require whalesong/web-world whalesong/resource) (define-resource view.html) (define-resource style.css) ;; A small drag-and-drop example using the web-world library. ;; ;; The world consists of a set of shapes. It also has a reference ;; to the currently dragged shape, if one is being drag...
null
https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/examples/drag-and-drop/drag-and-drop-2.rkt
racket
A small drag-and-drop example using the web-world library. The world consists of a set of shapes. It also has a reference to the currently dragged shape, if one is being dragged. (U shape #f) A shape has an id and a position. add-fresh-shape: world view -> world Given a world, creates a new world within the bo...
#lang whalesong (require whalesong/web-world whalesong/resource) (define-resource view.html) (define-resource style.css) ( listof shape ) )) (define-struct shape (id x y)) (define (add-fresh-shape w v) (define-values (max-width max-height) (width-and-height v "playground")) (...