_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 |
|---|---|---|---|---|---|---|---|---|
4dbec09d867b98e404b9ea9e6d5686e603e02fde09b98433a48053b9be5f6202 | ocaml-flambda/ocaml-jst | odoc_value.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/ocamldoc/odoc_value.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module Name = Odoc_name
type t_value = {
val_name : Name.t ;
mutable val_info : Odoc_types.info o... |
c59da4c1196861994d80630b39c095951b03d0a684d40f5ee6df1a2a9d0b1591 | Helium4Haskell/helium | Generator5.hs |
main :: [()]
main = [() | (True, _) <- []]
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticwarnings/Generator5.hs | haskell |
main :: [()]
main = [() | (True, _) <- []]
| |
42a73b13c26f8bc441d49a829798c54d1de4f144c01ddc9b1709745fce5fbe96 | zfoh/haskell-beginners-projects | Slack.hs | | This module contains code for sending messages to the Slack channel .
{-# LANGUAGE OverloadedStrings #-}
module WebWatch.Slack
( sendLinks
) where
import Data.Aeson ((.=))
import qualified Data.Aeson as Aeson
import Data.Monoid ((<>))
import qualifi... | null | https://raw.githubusercontent.com/zfoh/haskell-beginners-projects/84f3b828b898413e25afda2910289393c7b20994/webwatch/src/WebWatch/Slack.hs | haskell | # LANGUAGE OverloadedStrings #
^ Special access URL
^ Links
Create payload
We create an initial request by parsing the URL
But we need to set a few more details:
We perform the request (but we can ignore the result). | | This module contains code for sending messages to the Slack channel .
module WebWatch.Slack
( sendLinks
) where
import Data.Aeson ((.=))
import qualified Data.Aeson as Aeson
import Data.Monoid ((<>))
import qualified Data.Text as T
imp... |
8dff779916e7e536ca3f42998c78782f53a41452997b539fbb765da1bd924e7a | dvcrn/proton | core.cljs | (ns proton.layers.tools.terminal.core
(:require [proton.lib.helpers :as helpers])
(:use [proton.layers.base :only [init-layer! get-initial-config get-keybindings get-packages get-keymaps describe-mode]]))
(defmethod init-layer! :tools/terminal
[_ {:keys [config layers]}]
(helpers/console! "init" :tools/termina... | null | https://raw.githubusercontent.com/dvcrn/proton/427d83ffdb61d84a04e3d30032b792a9cfbfc53f/src/cljs/proton/layers/tools/terminal/core.cljs | clojure | (ns proton.layers.tools.terminal.core
(:require [proton.lib.helpers :as helpers])
(:use [proton.layers.base :only [init-layer! get-initial-config get-keybindings get-packages get-keymaps describe-mode]]))
(defmethod init-layer! :tools/terminal
[_ {:keys [config layers]}]
(helpers/console! "init" :tools/termina... | |
342bd00120eabdf73a71b19f6fe1ba5a68ca929f74b9660face3a73a3c15d0fd | mirage/mmap | test.ml | open Bigarray_compat
(* Test harness *)
let error_occurred = ref false
let function_tested = ref ""
let testing_function s =
function_tested := s;
print_newline();
print_string s;
print_newline()
let test test_number answer correct_answer =
flush stdout;
flush stderr;
if answer <> correct_answer... | null | https://raw.githubusercontent.com/mirage/mmap/75e9fbfb68cb90e12449851e5d027a42088567be/test/test.ml | ocaml | Test harness
Tests
Insufficient permissions
******** End of test ******** | open Bigarray_compat
let error_occurred = ref false
let function_tested = ref ""
let testing_function s =
function_tested := s;
print_newline();
print_string s;
print_newline()
let test test_number answer correct_answer =
flush stdout;
flush stderr;
if answer <> correct_answer then begin
Prin... |
c4c153121905e54cec01e060ec8d9ae1dcbe858eb82fc3c8a49a69e1f372fc2b | khotyn/4clojure-answer | 111-crossword-puzzle.clj | (fn [word board]
(letfn [(check-valid [word line]
(if (some #{\#} line)
(true? (some true? (map #(check-valid word %) (re-seq #"[^#]*" (apply str line)))))
(if (= (count word) (count line))
(if (and (seq word) (seq line))
(if (or (= \_ (first l... | null | https://raw.githubusercontent.com/khotyn/4clojure-answer/3de82d732faedceafac4f1585a72d0712fe5d3c6/111-crossword-puzzle.clj | clojure | (fn [word board]
(letfn [(check-valid [word line]
(if (some #{\#} line)
(true? (some true? (map #(check-valid word %) (re-seq #"[^#]*" (apply str line)))))
(if (= (count word) (count line))
(if (and (seq word) (seq line))
(if (or (= \_ (first l... | |
65e1e3fc040b203a9d47f3156c67b5f7de6b3cf71f835805db72d103bcbd3940 | thoughtbot/carnival | TaskMain.hs | import Prelude (IO)
import Application (taskMain)
main :: IO ()
main = taskMain
| null | https://raw.githubusercontent.com/thoughtbot/carnival/1cd4bd02ea6884b86020029257ab69ec3892a168/app/TaskMain.hs | haskell | import Prelude (IO)
import Application (taskMain)
main :: IO ()
main = taskMain
| |
6d8f3d899474ff76195dc09a2e0fa2d128f2a41d0ab9a6bb013751e728565c49 | coast-framework/db | q_test.clj | (ns db.q-test
(:require [db.q :as q]
[clojure.test :refer [deftest testing is]]))
(deftest sql-map-test
(testing "sql-map with subquery"
(is (= (q/sql-map '[:select * :from accounts :order-by created-at desc])
'{:select [*]
:from [accounts]
:order-by [created-at... | null | https://raw.githubusercontent.com/coast-framework/db/e738cd6402a89c591363ac6f3e7a6e08bcc28a0e/test/db/q_test.clj | clojure | (ns db.q-test
(:require [db.q :as q]
[clojure.test :refer [deftest testing is]]))
(deftest sql-map-test
(testing "sql-map with subquery"
(is (= (q/sql-map '[:select * :from accounts :order-by created-at desc])
'{:select [*]
:from [accounts]
:order-by [created-at... | |
45b8b37ae3a3c8cc494f2bd002c621358a0e2161ed01dc19e3659781480fe5c8 | janestreet/core | string.ml | open! Import
include Base.String
These two are needed because [ include Identifiable . Extend ] ( present later in the file )
binds new [ Map ] and [ Set ] modules .
binds new [Map] and [Set] modules. *)
module Stable = struct
module V1 = struct
module T = struct
include Base.String
type ... | null | https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/src/string.ml | ocaml | open! Import
include Base.String
These two are needed because [ include Identifiable . Extend ] ( present later in the file )
binds new [ Map ] and [ Set ] modules .
binds new [Map] and [Set] modules. *)
module Stable = struct
module V1 = struct
module T = struct
include Base.String
type ... | |
4f0f7beb71b64c101e351421ac2df4124faf6c7eed269d1727bb0327f33256f2 | rfkm/zou | route_provider.clj | (ns zou.web.routing.route-provider
(:require [bidi.bidi :as bidi]
[zou.util.namespace :as un]))
(defrecord SimpleRouteProvider [spec]
bidi/RouteProvider
(routes [this]
(cond
(var? spec) (deref spec)
(symbol? spec) (deref (un/resolve-var spec))
(fn? spec) (spec)
:else spec)... | null | https://raw.githubusercontent.com/rfkm/zou/228feefae3e008f56806589cb8019511981f7b01/web/src/zou/web/routing/route_provider.clj | clojure | (ns zou.web.routing.route-provider
(:require [bidi.bidi :as bidi]
[zou.util.namespace :as un]))
(defrecord SimpleRouteProvider [spec]
bidi/RouteProvider
(routes [this]
(cond
(var? spec) (deref spec)
(symbol? spec) (deref (un/resolve-var spec))
(fn? spec) (spec)
:else spec)... | |
5a28cd2d021adbf3a09d5af97bd7ae8c0f556e70ff861a4ee1406993abdbd0a0 | runa-labs/clj-hazelcast | core.clj | (ns clj-hazelcast.core
(:require
[clj-kryo.core :as kryo])
(:import
(com.hazelcast.core Hazelcast HazelcastInstance EntryListener ItemListener
IMap IList EntryEvent)
(com.hazelcast.config XmlConfigBuilder Config TcpIpConfig)
(java.util Collection Set List Map HashSet Queue)
jav... | null | https://raw.githubusercontent.com/runa-labs/clj-hazelcast/ba577984796e6e8e876554b10c6ebbb763ca5b44/src/clj_hazelcast/core.clj | clojure | (init)
queue related | (ns clj-hazelcast.core
(:require
[clj-kryo.core :as kryo])
(:import
(com.hazelcast.core Hazelcast HazelcastInstance EntryListener ItemListener
IMap IList EntryEvent)
(com.hazelcast.config XmlConfigBuilder Config TcpIpConfig)
(java.util Collection Set List Map HashSet Queue)
jav... |
e039f58b626a4ad3b3d3ed1a439e6f2f9e34f6be28fcbc73fe0370b745a22e42 | janestreet/ppx_pattern_bind | ppx_pattern_bind.mli | open Ppxlib
val replace_variable
: f:(label loc -> [ `Remove | `Rename of label ])
-> pattern
-> pattern
(* Bind each non-wildcard variable of each pattern to the expression which
projects the bound expression to the variable's component. *)
val project_pattern_variables
: assume_exhaustive:bool
-> mod... | null | https://raw.githubusercontent.com/janestreet/ppx_pattern_bind/204b0255b2cf6d931079f4c458eeb563139085e2/src/ppx_pattern_bind.mli | ocaml | Bind each non-wildcard variable of each pattern to the expression which
projects the bound expression to the variable's component. | open Ppxlib
val replace_variable
: f:(label loc -> [ `Remove | `Rename of label ])
-> pattern
-> pattern
val project_pattern_variables
: assume_exhaustive:bool
-> modul:longident loc option
-> with_location:bool
-> value_binding list
-> value_binding loc list
Produces a match - like expression wh... |
9d8af5613f5cb4bcf63378523ce31b76e471910dcd919db9ea7d04869af53055 | mvr/at | Abelian.hs | # LANGUAGE FlexibleContexts #
module Math.ValueCategory.Abelian where
import Math.ValueCategory
import Math.ValueCategory.Additive (AdditiveCategory (zero))
class AdditiveCategory a => AbelianCategory a where
kernel :: Arrow a -> Arrow a
Given f : A - > B , f ' : A ' - > B ' and : A - > A ' such that TODO , th... | null | https://raw.githubusercontent.com/mvr/at/f08b25ee2d83f761fd288a66f05dad1943879db1/src/Math/ValueCategory/Abelian.hs | haskell | # LANGUAGE FlexibleContexts #
module Math.ValueCategory.Abelian where
import Math.ValueCategory
import Math.ValueCategory.Additive (AdditiveCategory (zero))
class AdditiveCategory a => AbelianCategory a where
kernel :: Arrow a -> Arrow a
Given f : A - > B , f ' : A ' - > B ' and : A - > A ' such that TODO , th... | |
919512203ed2a55fde902903a7de0bc32973a860f2055c2981ba7de56422bc87 | inguardians/kismapping | KismetSQLite.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
module Kismapping.Input.KismetSQLite
( readGpsSQLite
) where
import Control.Applicative
import Control.Monad
import Control.Monad.Catch
import Control.Monad.Except
import Control.Monad.Trans.Either
import Data.Aeson (FromJSON, Value(..), (.:), decodeS... | null | https://raw.githubusercontent.com/inguardians/kismapping/98b8511cb60595db45f89746d4586bd9d3a60e6a/library/Kismapping/Input/KismetSQLite.hs | haskell | # LANGUAGE OverloadedStrings #
SELECT * FROM devices WHERE type = "Wi-Fi AP"
or, if we want to do the filtering ourselves. | # LANGUAGE FlexibleContexts #
module Kismapping.Input.KismetSQLite
( readGpsSQLite
) where
import Control.Applicative
import Control.Monad
import Control.Monad.Catch
import Control.Monad.Except
import Control.Monad.Trans.Either
import Data.Aeson (FromJSON, Value(..), (.:), decodeStrict', parseJSON)
import Data.Fold... |
b7c5464811e1a61514b0734cd669f3929c9683a1692f29b603509d56ea4e87ab | serras/lambdaconf-2015-web | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Main where
import Data.Aeson hiding (json)
import Web.Spock.Safe
data Person = Person { name :: String
, age :: Integer
, address :: String
}
listPeople :: [Person]
listPeo... | null | https://raw.githubusercontent.com/serras/lambdaconf-2015-web/ec29b8b47dfb8ee33b09a0c18caceb6247e5a413/ex1-json/src/Main.hs | haskell | # LANGUAGE OverloadedStrings #
/hello/:name
/allow/:age | # LANGUAGE ScopedTypeVariables #
module Main where
import Data.Aeson hiding (json)
import Web.Spock.Safe
data Person = Person { name :: String
, age :: Integer
, address :: String
}
listPeople :: [Person]
listPeople = [ Person "Fulanito" 30 "Boul... |
78fa2c20cc33dfab944b04a335554f1909dc44aae022268a730773ad0d9b275e | anton-k/sharc-timbre | BassTrombone.hs | module Sharc.Instruments.BassTrombone (bassTrombone) where
import Sharc.Types
bassTrombone :: Instr
bassTrombone = Instr
"bass_trombone"
"Bass Trombone"
(Legend "McGill" "2" "24")
(Range
(InstrRange
(HarmonicFreq 1 (Pitch 43.65 17 "f1"))
(Pitch 43.65 17 "f1")
... | null | https://raw.githubusercontent.com/anton-k/sharc-timbre/14be260021c02f31905b3e63269f582030a45c8d/src/Sharc/Instruments/BassTrombone.hs | haskell | module Sharc.Instruments.BassTrombone (bassTrombone) where
import Sharc.Types
bassTrombone :: Instr
bassTrombone = Instr
"bass_trombone"
"Bass Trombone"
(Legend "McGill" "2" "24")
(Range
(InstrRange
(HarmonicFreq 1 (Pitch 43.65 17 "f1"))
(Pitch 43.65 17 "f1")
... | |
4cac67e5fdc8c4c47805e1f4186dc0d12344206c999592557760a60f2e03fe5c | apibot-org/apibot | loading.cljs | (ns apibot.views.loading)
(defn loading
[*app-state]
[:div {:style {:padding-top "15vh"}}
[:div.jumbotron
{:style {:text-align "center"}}
[:h1 "Loading..."]
[:p "Apibot is loading, please wait."]]])
| null | https://raw.githubusercontent.com/apibot-org/apibot/26c77c688980549a8deceeeb39f01108be016435/src/cljs/apibot/views/loading.cljs | clojure | (ns apibot.views.loading)
(defn loading
[*app-state]
[:div {:style {:padding-top "15vh"}}
[:div.jumbotron
{:style {:text-align "center"}}
[:h1 "Loading..."]
[:p "Apibot is loading, please wait."]]])
| |
de56244a50e28d2a9b619050756bbc1fa6e8e489c9756e041b21a7e3a665324b | clj-commons/zprint-clj | core.cljs | (ns zprint-clj.core
(:require
[cljs.reader :refer [read-string]]
[goog.object :as gobj]
[zprint.core :as zprint]))
(set! *warn-on-infer* true)
(def fs (js/require "fs"))
(def os (js/require "os"))
Zprint Options
;; -----------------------------------------------------------------------------
(def ^:... | null | https://raw.githubusercontent.com/clj-commons/zprint-clj/3d6488df74f74f2ef0ee17b7b22f9a174a350410/src/zprint_clj/core.cljs | clojure | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Main
-----------------------------------------------------------------------------
do not apply default zprint options when .zprintrc is found | (ns zprint-clj.core
(:require
[cljs.reader :refer [read-string]]
[goog.object :as gobj]
[zprint.core :as zprint]))
(set! *warn-on-infer* true)
(def fs (js/require "fs"))
(def os (js/require "os"))
Zprint Options
(def ^:private no-hang
{:do-in-hang? false,
:binding {:hang? false},
:extend {:h... |
82ce8d6b3b39868fb89a21631197aa8b29bd0ab8aad210d49eb712c3a705dc1c | generateme/fastmath | interpolation_examples.clj | (ns fastmath.interpolation-examples
(:require [fastmath.interpolation :refer :all]
[fastmath.core :as m]
[metadoc.examples :refer :all]
[fastmath.kernel :as k]))
(defsnippet fastmath.interpolation interpolate
"1d interpolation"
(let [fun (fn [x] (m/sin (* x (* 0.5 (m/cos (inc ... | null | https://raw.githubusercontent.com/generateme/fastmath/2eb38baffe73077bab331a20449d9d7596af7059/metadoc/fastmath/interpolation_examples.clj | clojure | 2d | (ns fastmath.interpolation-examples
(:require [fastmath.interpolation :refer :all]
[fastmath.core :as m]
[metadoc.examples :refer :all]
[fastmath.kernel :as k]))
(defsnippet fastmath.interpolation interpolate
"1d interpolation"
(let [fun (fn [x] (m/sin (* x (* 0.5 (m/cos (inc ... |
6c4b5b67a6da2c0d05bdf67d503283b2b0b97076b2e7f1af91db3147a4d380fa | letmaik/monadiccp | Linear.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE ScopedTypeVariables #
module Data.Linear (
Linear,
integerToLinear,
constToLinear,
termToLinear,
linearOpLinear ,
-- linearOpLinears,
linearToConst,
linearToTerm,
linearMultiply,
linearMult,... | null | https://raw.githubusercontent.com/letmaik/monadiccp/fe4498e46a7b9d9e387fd5e4ed5d0749a89d0188/src/Data/Linear.hs | haskell | linearOpLinears,
linearOpLinears l = foldr (\(c,t) a -> linearOpLinear 1 a c t) (integerToLinear 0) l | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE ScopedTypeVariables #
module Data.Linear (
Linear,
integerToLinear,
constToLinear,
termToLinear,
linearOpLinear ,
linearToConst,
linearToTerm,
linearMultiply,
linearMult,
linearToList, line... |
5ffc50aef21912029c9f098c8b8d6af9616b3ef96caef7d3caf2326e1f09dad3 | jackfirth/rebellion | enumerating-test.rkt | #lang racket/base
(module+ test
(require rackunit
rebellion/collection/list
rebellion/private/static-name
rebellion/streaming/transducer
rebellion/streaming/transducer/testing))
;@------------------------------------------------------------------------------
(module+ tes... | null | https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/streaming/transducer/private/enumerating-test.rkt | racket | @------------------------------------------------------------------------------ | #lang racket/base
(module+ test
(require rackunit
rebellion/collection/list
rebellion/private/static-name
rebellion/streaming/transducer
rebellion/streaming/transducer/testing))
(module+ test
(test-case (name-string enumerating)
(define inputs "cat")
(define ex... |
3559fa7444c949527472be59e1672510734797ca606dab2c2a2184363b4bf5a9 | charlieg/Sparser | item-walk.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1994 -- all rights reserved
;;;
;;; File: "item walk"
Module : " interface;workbench : "
version : September 1994
initiated 7/20/94 v2.3 . 8/30 adapted to ' display - records '
;; 9/14 tweeked operations o... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/interface/workbench/item-walk.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "item walk"
9/14 tweeked operations on initial call
------------
state vars
------------
----------------
initialization
----------------
called from Select-corresponding-edge/s-for-unit to initialize the
values of the buttons and of the ... | copyright ( c ) 1994 -- all rights reserved
Module : " interface;workbench : "
version : September 1994
initiated 7/20/94 v2.3 . 8/30 adapted to ' display - records '
(in-package :sparser)
(defvar *item-walk/item-list* nil
"Holds the entire list of items -- mostly as a reference list.")
... |
3983a43720df4f75a96a3445eddfdd5cb92c425b04e4808af8f2c9b7f7086e7a | cstar/ejabberd-old | ejabberd_service.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_service.erl
Author : < >
Purpose : External component management ( XEP-0114 )
Created : 6 Dec 2002 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
%%%
%%% This program is free software;... | null | https://raw.githubusercontent.com/cstar/ejabberd-old/559f8b6b0a935710fe93e9afacb4270d6d6ea00f/src/ejabberd_service.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_service.erl
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without e... | Author : < >
Purpose : External component management ( XEP-0114 )
Created : 6 Dec 2002 by < >
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have re... |
a5f5cb4302dbd03e749252e979b6742fef93fa52914587202511c90510e34efb | mlabs-haskell/bot-plutus-interface | UtxoParser.hs | module BotPlutusInterface.UtxoParser (
feeParser,
tokenNameParser,
) where
import Control.Applicative (optional)
import Control.Monad (mzero, void)
import Data.Aeson.Extras (tryDecode)
import Data.Attoparsec.ByteString.Char8 (isSpace)
import Data.Attoparsec.Text (
Parser,
char,
choice,
decimal,
option,
... | null | https://raw.githubusercontent.com/mlabs-haskell/bot-plutus-interface/67db4a65a5e4474829f3bf53a78591cc64004584/src/BotPlutusInterface/UtxoParser.hs | haskell | module BotPlutusInterface.UtxoParser (
feeParser,
tokenNameParser,
) where
import Control.Applicative (optional)
import Control.Monad (mzero, void)
import Data.Aeson.Extras (tryDecode)
import Data.Attoparsec.ByteString.Char8 (isSpace)
import Data.Attoparsec.Text (
Parser,
char,
choice,
decimal,
option,
... | |
ce735cf3df26b26e30d1202a55a4f8cc0aa1379ff56a34e323aca16fe69ec19c | samrushing/irken-compiler | genffi.scm | ;; -*- Mode: Irken -*-
;; Build an interface file. foo_ffi.scm is an s-expression
;; data file detailing the sizes and offsets of all structs/unions,
;; and also contains function signatures and constant definitions
;; needed by the runtime (in the case of the VM) and at compile time
( when using the C or backends... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/ffi/gen/genffi.scm | scheme | -*- Mode: Irken -*-
Build an interface file. foo_ffi.scm is an s-expression
data file detailing the sizes and offsets of all structs/unions,
and also contains function signatures and constant definitions
needed by the runtime (in the case of the VM) and at compile time
We can't use lib/basis.scm here, because we... |
( when using the C or backends ) .
' unsafe ' FFI 's like posix that use constants / structs / etc
(require "lib/core.scm")
(require "lib/pair.scm")
(require "lib/string.scm")
(require "lib/format.scm")
(require "lib/symbol.scm")
(%backend bytecode (require "lib/vmffi.scm"))
(require "lib/queue.scm")
(require "... |
6618059b5270da5f85334bb0956e0acc363423b57a86c13b970f6c3b59ada793 | realworldocaml/book | parse_error_reason_intf.ml | open! Base
* Subset of the [ Parsexp . Parse_error . Reason.t ] type *
module T = struct
type t =
| Automaton_in_error_state
| Comment_token_in_unquoted_atom
| Unexpected_char_parsing_dec_escape
| Unexpected_char_parsing_hex_escape
| Unexpected_character_after_cr
| Unterminated_block_comment... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/parsexp/symbolic_automaton/src/parse_error_reason_intf.ml | ocaml | open! Base
* Subset of the [ Parsexp . Parse_error . Reason.t ] type *
module T = struct
type t =
| Automaton_in_error_state
| Comment_token_in_unquoted_atom
| Unexpected_char_parsing_dec_escape
| Unexpected_char_parsing_hex_escape
| Unexpected_character_after_cr
| Unterminated_block_comment... | |
c17785d0bb7dfb16b16c562d7ff5a77f7e972e06aa6aec158a7bbda6fa359c0d | nd/sicp | 2.48.scm | (define (make-segment start end)
(cons start end))
(define (start-segment s)
(car s))
(define (end-segment s)
(cdr s)) | null | https://raw.githubusercontent.com/nd/sicp/d8587a0403d95af7c7bcf59b812f98c4f8550afd/ch02/2.48.scm | scheme | (define (make-segment start end)
(cons start end))
(define (start-segment s)
(car s))
(define (end-segment s)
(cdr s)) | |
b8d4754a1230b14384b2adc21a49ef12ec222a5030a53f59a303439a40c3ff81 | ds-wizard/engine-backend | Detail_Bundle_GET.hs | module Wizard.Api.Handler.Locale.Detail_Bundle_GET where
import Servant
import Shared.Api.Handler.Common
import Shared.Model.Context.TransactionState
import Wizard.Api.Handler.Common
import Wizard.Api.Resource.TemporaryFile.TemporaryFileDTO
import Wizard.Api.Resource.TemporaryFile.TemporaryFileJM ()
import Wizard.Mod... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/090f4f3460e8df128e88e2c3ce266b165e4a0a50/engine-wizard/src/Wizard/Api/Handler/Locale/Detail_Bundle_GET.hs | haskell | module Wizard.Api.Handler.Locale.Detail_Bundle_GET where
import Servant
import Shared.Api.Handler.Common
import Shared.Model.Context.TransactionState
import Wizard.Api.Handler.Common
import Wizard.Api.Resource.TemporaryFile.TemporaryFileDTO
import Wizard.Api.Resource.TemporaryFile.TemporaryFileJM ()
import Wizard.Mod... | |
9fb3f3b731b0ba511cebbe3b5d806a74c81f29ef847d3ed1690917a3836237c0 | justinethier/cyclone | test.scm | ;;;; Cyclone Scheme
;;;;
;;;;
Copyright ( c ) 2014 - 2021 ,
;;;; All rights reserved.
;;;;
;;;; This module contains unit tests for (cyclone test)
;;;;
(import
(scheme base)
(cyclone test))
(test-group
"assert"
(test-assert #t)
)
(test-group
"not"
(test-not #f)
)
(test-exit)
| null | https://raw.githubusercontent.com/justinethier/cyclone/b69b65756b99c28e13dc5fd34583893aa6290519/tests/test.scm | scheme | Cyclone Scheme
All rights reserved.
This module contains unit tests for (cyclone test)
| Copyright ( c ) 2014 - 2021 ,
(import
(scheme base)
(cyclone test))
(test-group
"assert"
(test-assert #t)
)
(test-group
"not"
(test-not #f)
)
(test-exit)
|
7e99869148d925fab1e665df25b74ebbdd93540a7da73625bf3dc42fcd00ee84 | danicuki/Erlang-Chat | lib_chan_mm.erl | %% ---
Excerpted from " Programming Erlang " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for any purpose.
%%... | null | https://raw.githubusercontent.com/danicuki/Erlang-Chat/386e4cc52956f014a8f1dcf3f4d5741baf7220ed/chat/lib_chan_mm.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
---
To the controlling process
From any process
... | Excerpted from " Programming Erlang " ,
published by The Pragmatic Bookshelf .
Protocol
{ chan , , Term }
{ chan_closed , }
-module(lib_chan_mm).
-export([loop/2, send/2, close/1, controller/2, set_trace/2, trace_with_tag/2]).
send(Pid, Term) -> Pid ! {send, Term}.
close(Pid) ... |
120ef91eee7f085e55a5d13def5a72ba44a9155db4ff614510303599d1f42bfa | FranklinChen/hugs98-plus-Sep2006 | Scale.hs | {-# OPTIONS -Wall -Werror #-}
-- #hide
module Data.Time.Clock.Scale
(
-- * Universal Time
| Time as measured by the earth .
UniversalTime(..),
-- * Absolute intervals
DiffTime
) where
import Data.Fixed
| The Modified Julian Date is the day with the fraction of the day , measured from UT midnight .
It 's u... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/time/Data/Time/Clock/Scale.hs | haskell | # OPTIONS -Wall -Werror #
#hide
* Universal Time
* Absolute intervals
| This is a length of time, as measured by a clock.
Conversion functions will treat it as seconds.
necessary because H98 doesn't have "cunning newtype" derivation
necessary because H98 doesn't have "cunning newtype" derivation
necessary becau... |
module Data.Time.Clock.Scale
(
| Time as measured by the earth .
UniversalTime(..),
DiffTime
) where
import Data.Fixed
| The Modified Julian Date is the day with the fraction of the day , measured from UT midnight .
It 's used to represent UT1 , which is time as measured by the earth 's rotation , adjusted ... |
788cc84b798130baccaf113ac389b61bc9f66f738ca7e6b7d494dfce747108f1 | Hans-Halverson/myte | asm_liveness_analysis.ml | open Asm
open Asm_builders
class virtual liveness_analyzer (func : Function.t) =
object (this)
method virtual prev_blocks : BlockMMap.t
method virtual use_blocks : OBMMap.t
method virtual def_blocks : OBMMap.t
method virtual use_before_def_blocks : OBMMap.t
method virtual init : unit -> unit
... | null | https://raw.githubusercontent.com/Hans-Halverson/myte/b49b710e35dd4029773062fb2e443b876a0eafb8/src/asm/asm_liveness_analysis.ml | ocaml | Calculate use and def blocks for each item
Propagate a single variable backwards through the program, building liveness sets as we go
Stop backwards propagation if we reach a block that has already been visited or where the
var is defined (unless the var is used in the block before it is defined in the ... | open Asm
open Asm_builders
class virtual liveness_analyzer (func : Function.t) =
object (this)
method virtual prev_blocks : BlockMMap.t
method virtual use_blocks : OBMMap.t
method virtual def_blocks : OBMMap.t
method virtual use_before_def_blocks : OBMMap.t
method virtual init : unit -> unit
... |
bd6a81c5f1143da46379581a77c1ff240170c97bd67bdd865e257d9349ab79c8 | serokell/derivery | derivery_hook.erl | -module(derivery_hook).
-export([execute/2]).
execute(Req0, #{}) ->
{ok, Body, Req1} = cowboy_req:read_body(Req0),
{ok, authenticate(Body, Req1), #{}}.
authenticate(Body, Req) ->
{ok, Secret} = application:get_env(derivery, github_secret),
Signature0 = cowboy_req:header(<<"x-hub-signature">>, Req),
... | null | https://raw.githubusercontent.com/serokell/derivery/f6983904acf551635e1f4686e662bab49c3cb8d6/src/derivery_hook.erl | erlang | -module(derivery_hook).
-export([execute/2]).
execute(Req0, #{}) ->
{ok, Body, Req1} = cowboy_req:read_body(Req0),
{ok, authenticate(Body, Req1), #{}}.
authenticate(Body, Req) ->
{ok, Secret} = application:get_env(derivery, github_secret),
Signature0 = cowboy_req:header(<<"x-hub-signature">>, Req),
... | |
7a7ce84317b330374daeefed604ad8ff9e2f4b077a938a11fb48484db5c2007d | mroman42/mikrokosmos | Block.hs | module Stlc.Block
( Block
, textBlock
, deductionBlock
, box
)
where
import Data.Semigroup hiding (diff)
newtype Block = Block { getBlock :: [String] }
deriving (Eq, Ord)
instance Semigroup Block where
(<>) = joinBlocks
instance Monoid Block where
mempty = Block [[]]
mappend = (<>) -- redundant ... | null | https://raw.githubusercontent.com/mroman42/mikrokosmos/fa3f9d5ebd9d62a6be44731ae867d020aa082a69/source/Stlc/Block.hs | haskell | redundant starting with base-4.11 / GHC 8.4
| Horizontal join
| Vertical join
| Inserts a text into a text block
| Draws a logical inference in a text block
| Draws a box around a text block | module Stlc.Block
( Block
, textBlock
, deductionBlock
, box
)
where
import Data.Semigroup hiding (diff)
newtype Block = Block { getBlock :: [String] }
deriving (Eq, Ord)
instance Semigroup Block where
(<>) = joinBlocks
instance Monoid Block where
mempty = Block [[]]
instance Show Block where
... |
6e3ffa943d301256ae13da7518117c814c314ca4547acc0209fbd70a15e01e91 | ralt/lxc-wrapper | cli.lisp | (in-package #:lxc-wrapper-test)
(5am:in-suite cli)
(5am:test test-clean-stars
(5am:is-true (string= "foo" (lxc-wrapper::clean-stars "*foo*"))))
(5am:test test-help
(5am:is-true (eq (type-of #'lxc-wrapper::help) 'function))
(multiple-value-bind (fn present)
(gethash "HELP" lxc-wrapper::*commands*)
(de... | null | https://raw.githubusercontent.com/ralt/lxc-wrapper/16f34432e2cfa8dcb7fa1a5383930143085dc1e0/test/cli.lisp | lisp | (in-package #:lxc-wrapper-test)
(5am:in-suite cli)
(5am:test test-clean-stars
(5am:is-true (string= "foo" (lxc-wrapper::clean-stars "*foo*"))))
(5am:test test-help
(5am:is-true (eq (type-of #'lxc-wrapper::help) 'function))
(multiple-value-bind (fn present)
(gethash "HELP" lxc-wrapper::*commands*)
(de... | |
3ff2fb00667150498151ce468f5a95defb6dc04547be565a5810e86b096623d6 | alainfrisch/ppx_drivers | ppx_driver.ml | The package ppx_drivers is released under the terms of an MIT - like
(* license. See the attached LICENSE file. *)
Copyright 2013 by and LexiFi .
A basic ppx driver , which dynlinks AST rewriters specified on its
command - line and run all of them . Sy... | null | https://raw.githubusercontent.com/alainfrisch/ppx_drivers/2f1f2b5efd2b864933a49d9246aa6a68e40cc6af/ppx_driver.ml | ocaml | license. See the attached LICENSE file. | The package ppx_drivers is released under the terms of an MIT - like
Copyright 2013 by and LexiFi .
A basic ppx driver , which dynlinks AST rewriters specified on its
command - line and run all of them . Syntax of the command - line :
./ppx_driver [ -v ] pkg arg ... arg ... |
0006ff59594f4cfd09553cb685fa76cf2a57aa6153a67a13945fd516286b35fe | samrocketman/home | StarScape_LIMN24.scm | is meant to creat a StarScape ( hopefull it will be a succesful script )
;
;For any info/idea/suggestions email me at <>
;Thanks to saulgoode from the GIMP Talk forums for helping me to debug this script
(define (script-fu-starscape width height seed XDensity YDensity incolor)
(let*
(
(i... | null | https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/StarScape_LIMN24.scm | scheme |
For any info/idea/suggestions email me at <>
Thanks to saulgoode from the GIMP Talk forums for helping me to debug this script
Define new variable for later usage
Add Black Layer
Select All
Fill With Black - Had problms using the fill function so i used colorize instead
In Order to create the Stars we will use the hur... | is meant to creat a StarScape ( hopefull it will be a succesful script )
(define (script-fu-starscape width height seed XDensity YDensity incolor)
(let*
(
(img (car
(gimp-image-new width height RGB)))
(layerone (car
(gimp-layer-new
... |
bf24d94aded6458f17f757d4e924035ffd94c51f46edea7824aa5cbde60cce76 | haskell-servant/servant | IsSecure.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
module Servant.API.IsSecure
( -- $issecure
IsSecure(..)
) where
import Data.Typeable
(Typeable)
import GHC.Generics
(Generic)
-- | Was this request made over an SSL connection?
--
-- Note... | null | https://raw.githubusercontent.com/haskell-servant/servant/d06b65c4e6116f992debbac2eeeb83eafb960321/servant/src/Servant/API/IsSecure.hs | haskell | # LANGUAGE DeriveDataTypeable #
$issecure
| Was this request made over an SSL connection?
Note that this value will not tell you if the client originally
made this request over SSL, but rather whether the current
connection is SSL. The distinction lies with reverse proxies.
In many cases, the client will connect... | # LANGUAGE DeriveGeneric #
module Servant.API.IsSecure
IsSecure(..)
) where
import Data.Typeable
(Typeable)
import GHC.Generics
(Generic)
but connect to the WAI handler without SSL . In such a case ,
the handlers would get ' NotSecure ' , but from ... |
4ce34ac5c0038d2638df882f1eb3a7548fc2b49aba38aa14410dfa061382e74b | openvstorage/alba | syncfs.ml |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Foreign
open Ctypes
TODO : make a view for Lwt_unix.file_descr ( exa... | null | https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/tools/syncfs.ml | ocaml | val string : string typ |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Foreign
open Ctypes
TODO : make a view for Lwt_unix.file_descr ( exa... |
8721c7660357c6b03ce93340e63b8b441a614cfe77a84efa6f9066633ae7c2f2 | pyrmont/pondent | about.cljs | (ns pondent.pages.about
(:require [clojure.string :as string]))
(def content
"
Pondent is a client-side utility for adding Markdown-formatted files to a
GitHub repository.
It's primary use is for adding blog posts to the repository of a Jekyll- or
Hugo-powered blog. It will add frontmatter that encodes t... | null | https://raw.githubusercontent.com/pyrmont/pondent/446adb8aaa62916b20fa34fb0cf5c419bb06f07c/src/pondent/pages/about.cljs | clojure | (ns pondent.pages.about
(:require [clojure.string :as string]))
(def content
"
Pondent is a client-side utility for adding Markdown-formatted files to a
GitHub repository.
It's primary use is for adding blog posts to the repository of a Jekyll- or
Hugo-powered blog. It will add frontmatter that encodes t... | |
0c6861efba7dec75ddf8bf680760112b6500169725fb531353bfee7d79737a4c | adrieng/pulsar | parser_error.ml | This file is part of Pulsar , a temporal functional language .
* Copyright ( C ) 2017
*
* This program is free software : you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation , either version 3 of the License , or ... | null | https://raw.githubusercontent.com/adrieng/pulsar/c3901388659d9c7978b04dce0815e3ff9aea1a0c/pulsar-lib/parser_error.ml | ocaml | This file is part of Pulsar , a temporal functional language .
* Copyright ( C ) 2017
*
* This program is free software : you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation , either version 3 of the License , or ... | |
f7c1a4a63dbdacb70e67ea5a5b399fc790d208a88b42d3f8cb4ba85e86b09c11 | cxxxr/lisp-preprocessor | in-template.lisp | (defpackage :lisp-preprocessor-tests.in-template
(:use :cl)
(:export :object
:object-reader))
(in-package :lisp-preprocessor-tests.in-template)
(defclass object ()
((reader
:initarg :reader
:reader object-reader
:initform 0)))
| null | https://raw.githubusercontent.com/cxxxr/lisp-preprocessor/cbed5952f3d98c84448c52d12255df9580451383/tests/in-template.lisp | lisp | (defpackage :lisp-preprocessor-tests.in-template
(:use :cl)
(:export :object
:object-reader))
(in-package :lisp-preprocessor-tests.in-template)
(defclass object ()
((reader
:initarg :reader
:reader object-reader
:initform 0)))
| |
2aff5a496a3b5dc836001e568a1699a50e00997bb54a5bc7ac7c39bf28432253 | OlivierSohn/hamazed | Spec.hs |
main :: IO ()
main = do
putStrLn "" -- for readablilty
| null | https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-particlesystem/test/Spec.hs | haskell | for readablilty |
main :: IO ()
main = do
|
5a2a37c1b42f6ede76b599d6f70d5f17d78b843c860fcd6da353b81dd98e058a | FrankKair/kindle-highlights | kindle.mli | module Library : sig
type ('a, 'b) t
(* Creates a library given a list of string (lines) *)
val build : string list -> ('a, 'b) t
(* List with book titles *)
val books : ('a, 'b) t -> string list
(* Quotes associated with a book title *)
val quotes : ('a, 'b) t -> string -> string list
end
| null | https://raw.githubusercontent.com/FrankKair/kindle-highlights/2a39c7bad4b50856f518d12a847dd29c4f9ad434/lib/kindle.mli | ocaml | Creates a library given a list of string (lines)
List with book titles
Quotes associated with a book title | module Library : sig
type ('a, 'b) t
val build : string list -> ('a, 'b) t
val books : ('a, 'b) t -> string list
val quotes : ('a, 'b) t -> string -> string list
end
|
3796e864813bbcb1ff6256e50ce26069f853ee52fe2808dd4533e047b61f993d | alaricsp/chicken-scheme | files.scm | ;;;; files.scm - File and pathname operations
;
Copyright ( c ) 2000 - 2007 ,
Copyright ( c ) 2008 - 2009 , The Chicken Team
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions
; are met:
;
; Redistri... | null | https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/files.scm | scheme | files.scm - File and pathname operations
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and th... | Copyright ( c ) 2000 - 2007 ,
Copyright ( c ) 2008 - 2009 , The Chicken Team
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDERS OR FOR ANY DIRECT ,
INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES
( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT... |
150c8a67017ffc8fbf2588fe51778610ad5ca8f69f04a8ee2a4d72ff722d60db | haskellfoundation/error-message-index | Main2.hs | module Main2 where
import SomeDisplayLibrary (Display (..))
myFunction :: Bool -> Int
myFunction x =
if x
then 42
else 54
myDisplayedAppliedFunction :: String
myDisplayedAppliedFunction = display (myFunction True)
newtype BoolFun a = BoolFun (Bool -> a)
instance Display a => Display (BoolFun a) where
d... | null | https://raw.githubusercontent.com/haskellfoundation/error-message-index/6b80c2fe6d8d2941190bda587bcea6f775ded0a4/message-index/messages/GHC-64725/display/after/Main2.hs | haskell | module Main2 where
import SomeDisplayLibrary (Display (..))
myFunction :: Bool -> Int
myFunction x =
if x
then 42
else 54
myDisplayedAppliedFunction :: String
myDisplayedAppliedFunction = display (myFunction True)
newtype BoolFun a = BoolFun (Bool -> a)
instance Display a => Display (BoolFun a) where
d... | |
7e4979b610208cbaa9f848e42a98f84ac206ddc31201d10cf449a8146e34b2c1 | weyrick/roadsend-php | php-gdk.scm | ;; ***** BEGIN LICENSE BLOCK *****
Roadsend PHP Compiler Runtime Libraries
Copyright ( C ) 2007 Roadsend , 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 ; either version 2.... | null | https://raw.githubusercontent.com/weyrick/roadsend-php/d6301a897b1a02d7a85bdb915bea91d0991eb158/runtime/ext/gtk2/php-gdk.scm | scheme | ***** BEGIN LICENSE BLOCK *****
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
either version 2.1
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | Roadsend PHP Compiler Runtime Libraries
Copyright ( C ) 2007 Roadsend , Inc.
of the License , or ( at your option ) any later version .
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
Foundation , Inc. , 51 Franklin Street , Fifth... |
344e64c382e6aa7015200052d2856135690c5cc636bbe1077baaf8d88b250cc4 | udem-dlteam/ribbit | max-tc.scm | ;; Ribbit Scheme runtime library.
This is the " max - tc " version with most of the R4RS predefined procedures
;; and dynamic type checking.
;;;----------------------------------------------------------------------------
;; Remember versions of primitives with no dynamic type checking.
(define %< <)
(define %+ +)... | null | https://raw.githubusercontent.com/udem-dlteam/ribbit/d0082a08df12efca921d37daf04d64fb4ad63b78/src/lib/max-tc.scm | scheme | Ribbit Scheme runtime library.
and dynamic type checking.
----------------------------------------------------------------------------
Remember versions of primitives with no dynamic type checking.
----------------------------------------------------------------------------
------------------------------------------... |
This is the " max - tc " version with most of the R4RS predefined procedures
(define %< <)
(define %+ +)
(define %- -)
(define %* *)
(define %quotient quotient)
Implementation of Ribbit Scheme types using the RVM operations .
(define pair-type 0)
(define procedure-type 1)
(define symbol-type 2)
(defi... |
c3ba107d5441034098ae75e9cbc49b1e9c4ed36b2de564be441316a1c0e50469 | joinr/spork | legacy.clj | ;;the original sketch implementation, based on
;;reified IShapes and function composition.
;;The updated sketch actually uses a
;;map-based data abstraction to define
;;the scene, which lets us do cooler stuff
;;like compile spork sketchs into compatible
piccolo2d scenes . This ns exists for
;;supported legacy sketch... | null | https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/src/spork/sketch/legacy.clj | clojure | the original sketch implementation, based on
reified IShapes and function composition.
The updated sketch actually uses a
map-based data abstraction to define
the scene, which lets us do cooler stuff
like compile spork sketchs into compatible
supported legacy sketches, as in
spork.examples.activityvis and may be
remove... | piccolo2d scenes . This ns exists for
(ns spork.sketch.legacy
(:require [spork.graphics2d.canvas :as canvas :refer :all ]
[spork.protocols [spatial :as space]]
[spork.graphics2d [image :as image]
[swing :as provider]
[font :as f]
[stro... |
78fec1dbf6597dbbe22f1b279a51567427103c450afef0768f25498260697ae2 | BekaValentine/SimpleFP | TypeChecking.hs | {-# OPTIONS -Wall #-}
# LANGUAGE TypeFamilies #
module Record.Unification.TypeChecking where
import Control.Applicative ((<$>))
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.State
import Data.List (nubBy,find,nub)
import Abs
import Eval
import Plicity
import Scope
import TypeChecker
im... | null | https://raw.githubusercontent.com/BekaValentine/SimpleFP/3cff456be9f0b99509e5cbe809be1055009b32df/src/Record/Unification/TypeChecking.hs | haskell | # OPTIONS -Wall #
Definitions
Contexts
Unifying Type Checkers
Type Inference
Type Checking
\{y} -> M : {y : A} -> B
\{y} -> M : (x : A) -> B
type checking succees exactly when checkification succeeds
and there is a substitution for every meta-variable | # LANGUAGE TypeFamilies #
module Record.Unification.TypeChecking where
import Control.Applicative ((<$>))
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.State
import Data.List (nubBy,find,nub)
import Abs
import Eval
import Plicity
import Scope
import TypeChecker
import Record.Core.Abstr... |
7413ae655985e6ee6c0dcfb9e1c66727c173906e6639230d4c7feea45e1e4148 | wavewave/hoodle | Coroutine.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module Hoodle.Type.Coroutine where
import Control.Concurrent (MVar)
import Control.Error.Util (hoistEither)
import Control.Lens ((%~), (.~), (^.))
import Control.Monad (void)
import Control.Monad.... | null | https://raw.githubusercontent.com/wavewave/hoodle/bdd86574274a310c8ed4ab0a05543825ec642801/core/src/Hoodle/Type/Coroutine.hs | haskell | # LANGUAGE GADTs #
|
|
|
|
|
|
|
|
|
|
| | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module Hoodle.Type.Coroutine where
import Control.Concurrent (MVar)
import Control.Error.Util (hoistEither)
import Control.Lens ((%~), (.~), (^.))
import Control.Monad (void)
import Control.Monad.Reader (ReaderT (..))
i... |
191dbc0da70a09f46328aeb2dd41e41ba6b9ba9501e8122b372b276b6d23f268 | lingnand/VIMonad | Operations.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleInstances , MultiParamTypeClasses , PatternGuards , TypeSynonymInstances #
-- --------------------------------------------------------------------------
-- |
-- Module : XMonad.Operations
Copyright : ( c ) 2007
-- License : BSD3-style (see LI... | null | https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/xmonad/src/XMonad/Operations.hs | haskell | --------------------------------------------------------------------------
|
Module : XMonad.Operations
License : BSD3-style (see LICENSE)
Stability : unstable
---------------------------------------------------------------------------
-------------------------------------------------------------... | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleInstances , MultiParamTypeClasses , PatternGuards , TypeSynonymInstances #
Copyright : ( c ) 2007
Maintainer :
Portability : not portable , Typeable deriving , mtl ,
Operations .
module XMonad.Operations where
import XMonad.Core
import X... |
a9f774cc054a61b5df8c400c05e48d56ac61238f4966c5d629135a1d614bf9f3 | Bluehouse-Technology/grpc_client | grpc_client_sup.erl | %%%-------------------------------------------------------------------
Licensed to the Apache Software Foundation ( ASF ) under one
%%% or more contributor license agreements. See the NOTICE file
%%% distributed with this work for additional information
%%% regarding copyright ownership. The ASF licenses this file
... | null | https://raw.githubusercontent.com/Bluehouse-Technology/grpc_client/cc5f47a954d0286144678f37a3ad1db70377d3f4/src/grpc_client_sup.erl | erlang | -------------------------------------------------------------------
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"License"); you may not use this file except in compliance
-2.0
Unle... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
with the License . You may obtain a copy of the License at
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(grpc_clie... |
0c90efcaea0a3cffb6204c3c5371f762dd6b53f985bf5e01a3975749c9da2ee1 | upenn-cis1xx/camelot | display.ml | open Canonical
let string_of_warnloc : Warn.warn_loc -> string =
fun {file; line_start; line_end; col_start; col_end} ->
"File " ^ file ^ ", " ^
(if line_start = line_end then
"line " ^ (string_of_int line_start)
else
"lines " ^ (string_of_int line_start) ^ "-" ^ (string_of_int line_end)
) ^ ", "... | null | https://raw.githubusercontent.com/upenn-cis1xx/camelot/2d7e8db8abb8c1ad8187bfeb94499fe1746bb664/lib/report/display.ml | ocaml | Utility display methods
TODO: in the mli file, don't expose these methods
Display methods to expose
TODO: Write an mli file exposing as appropriate | open Canonical
let string_of_warnloc : Warn.warn_loc -> string =
fun {file; line_start; line_end; col_start; col_end} ->
"File " ^ file ^ ", " ^
(if line_start = line_end then
"line " ^ (string_of_int line_start)
else
"lines " ^ (string_of_int line_start) ^ "-" ^ (string_of_int line_end)
) ^ ", "... |
f9bf2f33f82e0f6e4a648bfccbebd2c728a2d0cc2437f544ba4ad2c26fad5881 | NorfairKing/intray | Permission.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE ExistentialQuantification #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
module Intray.Data.Permission where
import Autodocodec
import Data.Aeson
import Data.Set (Set)
import qualified Data.Set as S
impor... | null | https://raw.githubusercontent.com/NorfairKing/intray/b1b4c14c1a4e419d2a1bf96d757780981229a1e2/intray-data/src/Intray/Data/Permission.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE ExistentialQuantification #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
module Intray.Data.Permission where
import Autodocodec
import Data.Aeson
import Data.Set (Set)
import qualified Data.Set as S
import qualified Data.Text as T
import D... |
f511a2270dc7045f7731883c1fc8ffa085b6d68129d2209452e03ecf16d45aeb | achirkin/vulkan | VK_EXT_custom_border_color.hs | # OPTIONS_HADDOCK not - home #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE MagicHash #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE Strict #-}
{-# LANGUAGE ViewPatterns #-}
module Graphics.Vulkan.Ext.VK_EXT_custom_border_color
* Vulkan extension : @VK_EXT_custom_border_color@
-- |
-... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_EXT_custom_border_color.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE MagicHash #
# LANGUAGE Strict #
# LANGUAGE ViewPatterns #
|
supported: @vulkan@
author: @EXT@
type: @device@
Extension number: @288@
> #include "vk_platform.h" | # OPTIONS_HADDOCK not - home #
# LANGUAGE PatternSynonyms #
module Graphics.Vulkan.Ext.VK_EXT_custom_border_color
* Vulkan extension : @VK_EXT_custom_border_color@
contact :
module Graphics.Vulkan.Marshal, AHardwareBuffer(),
ANativeWindow(), CAMetalLayer(), VkBool32(..), VkDeviceAddress(..),
... |
7cff5215b141785f0c4c1480ae1a87fde88a9e61157c183f3929c6dd82f3b68f | mojombo/yaws | smtp.erl |
File : smtp.erl ( ~jb / work / yaws / applications / mail / src / smtp.erl )
Author :
Created : Tue Feb 24 23:15:59 2004
% Purpose:
-module('smtp').
-author('').
-export([send/6]).
%% Example
%
% smtp:send("mail.bevemyr.com", "",
% ["",""],
% "Test Subject",
% "My... | null | https://raw.githubusercontent.com/mojombo/yaws/f75fde80f1e35a87335f21d0983e3285eb665f17/applications/mail/src/smtp.erl | erlang | Purpose:
Example
smtp:send("mail.bevemyr.com", "",
["",""],
"Test Subject",
"My Message", [{"file1.txt","text/plain","hej hopp igen"}]).
make sure the address has <> around itself
add > at the end of address, if it is not present
Add an . at all lines starting with a dot.
|
File : smtp.erl ( ~jb / work / yaws / applications / mail / src / smtp.erl )
Author :
Created : Tue Feb 24 23:15:59 2004
-module('smtp').
-author('').
-export([send/6]).
send(Server, From, To, Subject, Message, Attached) ->
{ok, Port} = smtp_init(Server, From, To),
Boundar... |
d2a5f88075ce36b2e6afbc7ffad9f391dba6bacdf1631864f81d8572de5494dc | anoma/juvix | Compile.hs | module Commands.Extra.Compile where
import Commands.Base
import Commands.Extra.Compile.Options
import Data.ByteString qualified as BS
import Data.FileEmbed qualified as FE
import Juvix.Extra.Paths
import System.Environment
import System.Process qualified as P
runCommand :: forall r. (Members '[Embed IO, App] r) => Co... | null | https://raw.githubusercontent.com/anoma/juvix/92042fa10c7dac83b53e5bd867a5489046ae82af/app/Commands/Extra/Compile.hs | haskell | module Commands.Extra.Compile where
import Commands.Base
import Commands.Extra.Compile.Options
import Data.ByteString qualified as BS
import Data.FileEmbed qualified as FE
import Juvix.Extra.Paths
import System.Environment
import System.Process qualified as P
runCommand :: forall r. (Members '[Embed IO, App] r) => Co... | |
2cbb33da9e73d1af1b40f1711ebc82310f1151683bb90338f2c96032f37b3d7f | fetburner/Coq2SML | coqdep_common.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/tools/coqdep_common.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
val option_c : bool ref
val o... |
102a85e8698656332bcb37454f71a6e28f3f8241d7af1b7d03746665215cc849 | kuis-isle3sw/IoPLMaterials | syntax.ml | ML interpreter / type reconstruction
type id = string
type binOp = Plus | Mult | Lt
type exp =
Var of id
| ILit of int
| BLit of bool
| BinOp of binOp * exp * exp
| IfExp of exp * exp * exp
type program =
Exp of exp
type tyvar = int
type ty =
TyInt
| TyBool
| TyVar of tyvar
| TyFun of ty... | null | https://raw.githubusercontent.com/kuis-isle3sw/IoPLMaterials/cb834816fde6e6e2a5fa4c898724c8f9a3bae809/textbook/interpreter/src/syntax.ml | ocaml | ML interpreter / type reconstruction
type id = string
type binOp = Plus | Mult | Lt
type exp =
Var of id
| ILit of int
| BLit of bool
| BinOp of binOp * exp * exp
| IfExp of exp * exp * exp
type program =
Exp of exp
type tyvar = int
type ty =
TyInt
| TyBool
| TyVar of tyvar
| TyFun of ty... | |
f69f7b3866316c7f7ae75298088c24e35eb257c1252fc37b02ad067b44aee493 | prepor/condo | condo_system.mli | open! Core.Std
open! Async.Std
type t
val create :
docker_endpoint: Async_http.addr ->
docker_config: string option ->
state_path: string ->
expose_state: [`No | `Consul of (Async_http.addr * string)] ->
host: string option ->
t Deferred.t
val docker : t -> Condo_docker.t
val place_snapshot : t -> name:s... | null | https://raw.githubusercontent.com/prepor/condo/b9a16829e6ffef10df2fefdadf143b56d33f0b97/src/condo_system.mli | ocaml | open! Core.Std
open! Async.Std
type t
val create :
docker_endpoint: Async_http.addr ->
docker_config: string option ->
state_path: string ->
expose_state: [`No | `Consul of (Async_http.addr * string)] ->
host: string option ->
t Deferred.t
val docker : t -> Condo_docker.t
val place_snapshot : t -> name:s... | |
995bdb154a72a7a0c701da8599183b688988a9e939569055722a4ede878c5eb2 | travelping/ekub | ekub_yaml_test.erl | -module(ekub_yaml_test).
-include_lib("eunit/include/eunit.hrl").
-define(M, ekub_yaml).
-define(Yaml, "
apiVersion: v1
kind: Pod
metadata:
name: pod-example
annotations:
annotation1: |
value1
value2
annotation2: \"\"
annotation3: ''
annotat... | null | https://raw.githubusercontent.com/travelping/ekub/05e8ebb8a27c71a4b7ba18f467ed6dcb3b3cac4c/src/ekub_yaml_test.erl | erlang | -module(ekub_yaml_test).
-include_lib("eunit/include/eunit.hrl").
-define(M, ekub_yaml).
-define(Yaml, "
apiVersion: v1
kind: Pod
metadata:
name: pod-example
annotations:
annotation1: |
value1
value2
annotation2: \"\"
annotation3: ''
annotat... | |
6136f7bc50cc8ffa1eed6ef39c8e75df28ce32bfe36e512872cacab6585d5878 | ciderpunx/57-exercises-for-programmers | P19BMI.hs | module P19BMI where
import Text.Printf (printf)
import Library
-- TODO: Make a GUI
main :: IO ()
main = do
u <- promptNonNegNum "Units 1. ft, in/lb; 2: in/lb; 3: kg,cm; default 2: " :: IO Integer
b <- case u of
1 -> ftInInput
3 -> cmInput
_ -> inInput
putStrLn $ formatBMI b
data H... | null | https://raw.githubusercontent.com/ciderpunx/57-exercises-for-programmers/25958ab80cc3edc29756d3bddd2d89815fd390bf/src/P19BMI.hs | haskell | TODO: Make a GUI | module P19BMI where
import Text.Printf (printf)
import Library
main :: IO ()
main = do
u <- promptNonNegNum "Units 1. ft, in/lb; 2: in/lb; 3: kg,cm; default 2: " :: IO Integer
b <- case u of
1 -> ftInInput
3 -> cmInput
_ -> inInput
putStrLn $ formatBMI b
data Height = Inches Doubl... |
a0e3aec3debdcbd01f1ff4b896d9b660ed168d70bb7f9c78f72c9a45103b4c60 | clash-lang/clash-compiler | ResetLow.hs | # LANGUAGE LambdaCase #
module ResetLow where
import Clash.Explicit.Prelude
import Clash.Explicit.Testbench
createDomain vSystem{vName="SystemLow", vResetPolarity=ActiveLow}
testInput :: Vec 7 (Signed 8)
testInput = 1 :> 2 :> 3 :> 4 :> 5 :> 6 :> 7 :> Nil
resetInput
:: KnownDomain dom
=> Clock dom
-> Reset do... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Signal/ResetLow.hs | haskell | it's not _really_ dead code. | # LANGUAGE LambdaCase #
module ResetLow where
import Clash.Explicit.Prelude
import Clash.Explicit.Testbench
createDomain vSystem{vName="SystemLow", vResetPolarity=ActiveLow}
testInput :: Vec 7 (Signed 8)
testInput = 1 :> 2 :> 3 :> 4 :> 5 :> 6 :> 7 :> Nil
resetInput
:: KnownDomain dom
=> Clock dom
-> Reset do... |
eac1d7d033cc287071b85074271c4fe005ab252221de2900e165513ac6468a56 | bjornbm/astro | TestTopocentric.hs | {-# LANGUAGE TypeSynonymInstances #-}
module Astro.Place.TestTopocentric where
import Numeric.Units.Dimensional.Prelude
import Numeric.Units.Dimensional.LinearAlgebra
import qualified Prelude
import Astro.Coords
import Astro.Place
import Astro.Place.Topocentric
import Astro.Place.ReferenceEllipsoid
import Astro.Util ... | null | https://raw.githubusercontent.com/bjornbm/astro/f4fb2c4b739a0a8f68f51aa154285120d2230c30/test/Astro/Place/TestTopocentric.hs | haskell | # LANGUAGE TypeSynonymInstances #
Properties
==========
Driver
======
Prior failures
==============
Now test inputs are checked for degeneracy. This property verifies
that the degenerary test catches the original problematic case.
---------------
The below tests failed because poor geometries (e.g., flat elli... |
module Astro.Place.TestTopocentric where
import Numeric.Units.Dimensional.Prelude
import Numeric.Units.Dimensional.LinearAlgebra
import qualified Prelude
import Astro.Coords
import Astro.Place
import Astro.Place.Topocentric
import Astro.Place.ReferenceEllipsoid
import Astro.Util (perfectGEO, sexagesimalAngle)
import ... |
e3ffa6552a95c9697df538df1ae547838f80dffef6c6da9f713867f0d6f6bcda | mangpo/greenthumb | optimize.rkt | #lang racket
(require "arm-parser.rkt"
"main.rkt")
(define size (make-parameter #f))
(define cores (make-parameter 6))
(define search-type (make-parameter `hybrid))
(define mode (make-parameter `syn))
(define dir (make-parameter "output"))
(define time-limit (make-parameter 3600))
(define input-file (make-p... | null | https://raw.githubusercontent.com/mangpo/greenthumb/7a8626205879af8c788f9927eeff643f4ddc5cde/arm/optimize.rkt | racket | return the argument as a filename to compile | #lang racket
(require "arm-parser.rkt"
"main.rkt")
(define size (make-parameter #f))
(define cores (make-parameter 6))
(define search-type (make-parameter `hybrid))
(define mode (make-parameter `syn))
(define dir (make-parameter "output"))
(define time-limit (make-parameter 3600))
(define input-file (make-p... |
8932447da7c717a8da4682a2ac5faa30f851b00e9b14cb1c45c4f4dfcc8a4147 | MrEbbinghaus/Todoish | http_server.clj | (ns todoish.server-components.http-server
(:require
[todoish.server-components.config :refer [config]]
[todoish.server-components.middleware :refer [middleware]]
[mount.core :refer [defstate]]
[clojure.pprint :refer [pprint]]
[org.httpkit.server :as http-kit]
[taoensso.timbre :as log]))
(defs... | null | https://raw.githubusercontent.com/MrEbbinghaus/Todoish/42c5a8e575c19937e4ed3332b738e5f35e847f07/src/main/todoish/server_components/http_server.clj | clojure | (ns todoish.server-components.http-server
(:require
[todoish.server-components.config :refer [config]]
[todoish.server-components.middleware :refer [middleware]]
[mount.core :refer [defstate]]
[clojure.pprint :refer [pprint]]
[org.httpkit.server :as http-kit]
[taoensso.timbre :as log]))
(defs... | |
f0b18e947b3a43ddc4e81cb127829eeedde7579397aeba061d7efd674a4b8d51 | manuel-serrano/hop | wiki_syntax.scm | ;*=====================================================================*/
* serrano / prgm / project / hop/3.0.x / runtime / wiki_syntax.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/runtime/wiki_syntax.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The HOP wiki syntax tools */
*===========================... | * serrano / prgm / project / hop/3.0.x / runtime / wiki_syntax.scm * /
* Author : * /
* Creation : Mon Apr 3 07:05:06 2006 * /
* Last change : Thu Aug 27 07:21:08 2015 ( serrano ) * /
* Copyr... |
0a0c46888ad7b9ce841d15c3e27211d36095298a458d392cbb5f4d106b6d5c18 | HaxeFoundation/ocamllibs | swfParser.ml |
* This file is part of SwfLib
* Copyright ( c)2004
*
* 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 ... | null | https://raw.githubusercontent.com/HaxeFoundation/ocamllibs/97e498e1b3bc2b3f08cfcae874b8529e4292bc3d/swflib/swfParser.ml | ocaml | ************************************************************************
TOOLS
************************************************************************
LENGTH
po_move
************************************************************************
*******************************************************************... |
* This file is part of SwfLib
* Copyright ( c)2004
*
* 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 ... |
04be07b54b06f12ec19bd6bdf972841eb778b3d8b8229d78a8425a2fcd75b259 | nikomatsakis/a-mir-formality | feature-gate.rkt | #lang racket
(require redex/reduction-semantics
"grammar.rkt")
(provide crate-has-feature
if-crate-has-feature
)
(define-metafunction formality-decl
;; Determines if a given crate has declared a given feature gate.
crate-has-feature : CrateDecls CrateId FeatureId -> boolean
((crate-ha... | null | https://raw.githubusercontent.com/nikomatsakis/a-mir-formality/71be4d5c4bd5e91d326277eaedd19a7abe3ac76a/racket-src/decl/feature-gate.rkt | racket | Determines if a given crate has declared a given feature gate.
Returns an empty list unless the crate has the given feature. | #lang racket
(require redex/reduction-semantics
"grammar.rkt")
(provide crate-has-feature
if-crate-has-feature
)
(define-metafunction formality-decl
crate-has-feature : CrateDecls CrateId FeatureId -> boolean
((crate-has-feature CrateDecls CrateId FeatureId)
#t
(where (_ ... Crat... |
f969f4b873858ac4e3fab5d3cc3407c0784b010f82b6eb7080c2e1b5439f13f8 | GrammaTech/sel | bindings-1.lisp | (flet ((f (a b)
(+ a b))
(g (c)
(- c)))
(let* ((a (f 10 10))
(b (g a)))
(* b b)))
| null | https://raw.githubusercontent.com/GrammaTech/sel/a59174c02a454e8d588614e221cf281260cf12f8/test/etc/lisp-scopes/bindings-1.lisp | lisp | (flet ((f (a b)
(+ a b))
(g (c)
(- c)))
(let* ((a (f 10 10))
(b (g a)))
(* b b)))
| |
38783d678f8687fd00a151350fac7e34ffc48f6afd91e701a462079391fbe40d | autolwe/autolwe | nondet.ml | * Nondeterministic computations ( aka lazy lists )
(* ** Imports and logging*)
open Lazy
open Abbrevs
open Util
let mk_log level = mk_logger "Util.Nondet" level "nondet.ml"
let log_i = mk_log Bolt.Level.INFO
* * Nondeterminism -----------------------------------------------------------------------
* --------... | null | https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Util/nondet.ml | ocaml | ** Imports and logging
** Useful functions
* ----------------------------------------------------------------------- | * Nondeterministic computations ( aka lazy lists )
open Lazy
open Abbrevs
open Util
let mk_log level = mk_logger "Util.Nondet" level "nondet.ml"
let log_i = mk_log Bolt.Level.INFO
* * Nondeterminism -----------------------------------------------------------------------
* ------------------------------------... |
abc984e816c775f7b6ab8127eb926d390b81c4b4a71155b2ecf2d08553f05743 | ekmett/ekmett.github.com | Test.hs | # LANGUAGE TypeFamilies , MultiParamTypeClasses , FlexibleContexts , MagicHash , UndecidableInstances , GeneralizedNewtypeDeriving , FlexibleInstances #
module Test where
import Prelude hiding (curry,fst,snd,uncurry)
import qualified Prelude
class Tuple p where
type Fst p :: *
type Snd p :: *
fst :: p -> ... | null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/Test.hs | haskell | | Construct a new pair.
| 'uncurry' converts a curried function to a function on pairs.
| Convert an adaptive pair to a regular polymorphic tuple
| Convert a regular polymorphic tuple to an adaptive pair
newtype wrapper to allow uniform derivations
now the class for pairs
type Pair a b = P (a,b) | # LANGUAGE TypeFamilies , MultiParamTypeClasses , FlexibleContexts , MagicHash , UndecidableInstances , GeneralizedNewtypeDeriving , FlexibleInstances #
module Test where
import Prelude hiding (curry,fst,snd,uncurry)
import qualified Prelude
class Tuple p where
type Fst p :: *
type Snd p :: *
fst :: p -> ... |
4fc5c0a17058e1daa49c47ee66e68d944c0eeead382a65a11a68bdb18e3698b4 | joeyates/sloccount-clojure | core.clj | (ns sloccount.core
(:gen-class
:state app-state
:init init)
(:use [sloccount.files] [sloccount.line_types])
(:import (java.io.File)))
Utilities
(defn merge-sums [totals results]
(merge-with + totals results))
(defn count-lines [file]
(reduce
#(merge-sums %1 {%2 1})
{} (sloccount.line_types/l... | null | https://raw.githubusercontent.com/joeyates/sloccount-clojure/a3d3b6ccc17105d358b60dc47405b8fe2d4fed51/src/sloccount/core.clj | clojure | (ns sloccount.core
(:gen-class
:state app-state
:init init)
(:use [sloccount.files] [sloccount.line_types])
(:import (java.io.File)))
Utilities
(defn merge-sums [totals results]
(merge-with + totals results))
(defn count-lines [file]
(reduce
#(merge-sums %1 {%2 1})
{} (sloccount.line_types/l... | |
e8f54ccba1093b4f6b1c4877d9440597616335e656ed10ff0b35ecfed89a9ce6 | michaelzenz/jecci | sets.clj | (ns jecci.utils.dbms.sets
(:refer-clojure :exclude [test])
(:require [clojure.string :as str]
[jepsen [client :as client]
[checker :as checker]
[generator :as gen]]
[knossos.op :as op]
[jecci.utils.dbms.sql :as s]))
(defrecord SetClient [conn translatio... | null | https://raw.githubusercontent.com/michaelzenz/jecci/81ee068601c31a14fe642f93d30223c2a8ced04d/src/jecci/utils/dbms/sets.clj | clojure | (ns jecci.utils.dbms.sets
(:refer-clojure :exclude [test])
(:require [clojure.string :as str]
[jepsen [client :as client]
[checker :as checker]
[generator :as gen]]
[knossos.op :as op]
[jecci.utils.dbms.sql :as s]))
(defrecord SetClient [conn translatio... | |
71a971805cdb2d801087fc9d8e6c22f53f85146dc94495a87b200704d6b2b7d4 | rudolph-miller/dyna | request.lisp | (in-package :cl-user)
(defpackage dyna.request
(:use :cl
:annot.class
:dyna.util)
(:import-from :ironclad
:digest-sequence
:byte-array-to-hex-string)
(:export :make-request))
(in-package :dyna.request)
(syntax:use-syntax :annot)
@export
@export-accessors
(defstru... | null | https://raw.githubusercontent.com/rudolph-miller/dyna/d8cf27bc7428e3ac578ed704ff72de98582d89e0/src/request.lisp | lisp | (in-package :cl-user)
(defpackage dyna.request
(:use :cl
:annot.class
:dyna.util)
(:import-from :ironclad
:digest-sequence
:byte-array-to-hex-string)
(:export :make-request))
(in-package :dyna.request)
(syntax:use-syntax :annot)
@export
@export-accessors
(defstru... | |
cf53a2e94b9b5e4d46eccab74e8e1680160b7e6caa9187c55c5d553f675f7d37 | thobbs/genartlib | project.clj | (defproject genartlib "0.1.22"
:description "Utilities and common tasks for generative artwork"
:url ""
:license {:name "MIT"
:url ""}
:dependencies [[org.clojure/clojure "1.10.1"]
[org.apache.commons/commons-math3 "3.3"]
[quil "3.1.0"]]
:deploy-repositories [["re... | null | https://raw.githubusercontent.com/thobbs/genartlib/032f685b326ef56235e1dc1198cacf02264d3c39/project.clj | clojure | (defproject genartlib "0.1.22"
:description "Utilities and common tasks for generative artwork"
:url ""
:license {:name "MIT"
:url ""}
:dependencies [[org.clojure/clojure "1.10.1"]
[org.apache.commons/commons-math3 "3.3"]
[quil "3.1.0"]]
:deploy-repositories [["re... | |
24403e18f69efd86b4eda29c33399e2d155e90af8e3b9a8b410b236e5e31ec43 | dyzsr/ocaml-selectml | t022-pushconstint.ml | TEST
include tool - ocaml - lib
flags = " -w -a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
let _ = () in -1;;
*
0
1 PUSHCONSTINT -1
3 POP ... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tool-ocaml/t022-pushconstint.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w -a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w -a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
let _ = () in -1;;
*
0
1 PUSHCONSTINT -1
3 POP ... | |
b3be92dc16dd0fe87a2ef1af4290e4e50160fb57c74afdbe15530e083e3d48ab | mflatt/plai-typed | untyped.rkt | #lang racket/base
(require (for-syntax racket/base
racket/require-transform)
(except-in "main.rkt"
#%module-begin #%top-interaction
define-syntax define-syntax-rule
require typed-in opaque-type-in
module+)
... | null | https://raw.githubusercontent.com/mflatt/plai-typed/419102db1e44b74dea9daf7a75e9b0e2b9c97d05/plai-typed/untyped.rkt | racket | #lang racket/base
(require (for-syntax racket/base
racket/require-transform)
(except-in "main.rkt"
#%module-begin #%top-interaction
define-syntax define-syntax-rule
require typed-in opaque-type-in
module+)
... | |
2326afdb024a6baff66bc18d69f87a76e3a764b4ebd987fb9437d528597efb24 | mdsebald/link_blox_app | lblx_gpio_di.erl | %%% @doc
BLOCKTYPE
GPIO Digital Input
%%% DESCRIPTION
Configure a GPIO Pin as a Digital Input block
%%% LINKS
-plus-and-raspi2/README.md
%%% @end
-module(lblx_gpio_di).
-author("Mark Sebald").
-include("../block_state.hrl").
%% ====================================================================
%% API... | null | https://raw.githubusercontent.com/mdsebald/link_blox_app/64034fa5854759ad16625b93e3dde65a9c65f615/src/block_types/lblx_gpio_di.erl | erlang | @doc
DESCRIPTION
LINKS
@end
====================================================================
API functions
====================================================================
Merge the block type specific, Config, Input, and Output attributes
with the common Config, Input, and Output attributes, that al... | BLOCKTYPE
GPIO Digital Input
Configure a GPIO Pin as a Digital Input block
-plus-and-raspi2/README.md
-module(lblx_gpio_di).
-author("Mark Sebald").
-include("../block_state.hrl").
-export([groups/0, version/0]).
-export([create/2, create/4, create/5, upgrade/1, initialize/1, execute/2, delete/1]).
-expo... |
b76ce6f80c4eb3930002ba92bd77f7a34458217347247e3e0b5645dc45440414 | backtracking/mlpost | palatino.ml | open Mlpost
open Picture
open Command
let hello = tex "Hello"
let () =
Metapost.emit "palatino"
(seq
[
hello;
shift (Point.cmp (-1., -1.)) hello;
shift (Point.cmp (1., 1.)) hello;
shift (Point.cmp (-1., 1.)) hello;
shift (Point.cmp (1., -1.)) hello;
])
| null | https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/test/palatino.ml | ocaml | open Mlpost
open Picture
open Command
let hello = tex "Hello"
let () =
Metapost.emit "palatino"
(seq
[
hello;
shift (Point.cmp (-1., -1.)) hello;
shift (Point.cmp (1., 1.)) hello;
shift (Point.cmp (-1., 1.)) hello;
shift (Point.cmp (1., -1.)) hello;
])
| |
a37867626f6b0ef143a304149ac8d31b5ed8998ba104d8caa22f11b586a00664 | fulcrologic/semantic-ui-wrapper | dropdown.cljs | (ns fulcrologic.semantic-ui.workspaces.dropdown
(:require [com.fulcrologic.fulcro.components :as fp]
[com.fulcrologic.fulcro.dom :as dom]
[nubank.workspaces.core :as ws]
[nubank.workspaces.card-types.fulcro3 :as ct.fulcro]
[com.fulcrologic.semantic-ui.modules.dropdown.u... | null | https://raw.githubusercontent.com/fulcrologic/semantic-ui-wrapper/7bd53f445bc4ca7e052c69596dc089282671df6c/src/workspaces/fulcrologic/semantic_ui/workspaces/dropdown.cljs | clojure | (ns fulcrologic.semantic-ui.workspaces.dropdown
(:require [com.fulcrologic.fulcro.components :as fp]
[com.fulcrologic.fulcro.dom :as dom]
[nubank.workspaces.core :as ws]
[nubank.workspaces.card-types.fulcro3 :as ct.fulcro]
[com.fulcrologic.semantic-ui.modules.dropdown.u... | |
34c4e53a2b2f6c75913f5e63404bd3e1b5a3b6b10e14734d4789bf61135a3869 | getong/getong_code_snippet | code_lock.erl | -module(code_lock).
-define(NAME, code_lock).
%-define(BEFORE_REWRITE, true).
-ifdef(BEFORE_REWRITE).
-behaviour(gen_fsm).
-else.
-behaviour(gen_statem).
-endif.
-export([start_link/1, button/1, stop/0]).
-ifdef(BEFORE_REWRITE).
-export([init/1, locked/2, open/2, handle_sync_event/4, handle_event/3,
handle_info/3,... | null | https://raw.githubusercontent.com/getong/getong_code_snippet/cd740c1b56f7f30920d705c5470faf540fd00a31/erlang_code/gen_statem/code_lock.erl | erlang | -define(BEFORE_REWRITE, true).
Add callback__mode/0
Change arity of the state functions
Remove handle_info/3
send_event is asynchronous and becomes a cast
sync_send is synchronous and becomes call
all_state is handled by callback code in gen_statem
state_functions mode is the mode most similar to
gen_fsm. There... | -module(code_lock).
-define(NAME, code_lock).
-ifdef(BEFORE_REWRITE).
-behaviour(gen_fsm).
-else.
-behaviour(gen_statem).
-endif.
-export([start_link/1, button/1, stop/0]).
-ifdef(BEFORE_REWRITE).
-export([init/1, locked/2, open/2, handle_sync_event/4, handle_event/3,
handle_info/3, terminate/3, code_change/4]).
-... |
f713b925b40dfda5f47ec430960204df0e0027023dfe1c855d7da2d00cbb5ebc | cryptosense/ocaml-mock | mock_ounit.ml | let rec cmp_list cmp a b =
match (a, b) with
| ([], []) -> true
| ([], _::_) -> false
| (_::_, []) -> false
| ha::ta, hb::tb -> cmp ha hb && cmp_list cmp ta tb
let list_printer show l =
"[" ^ String.concat ", " (List.map show l) ^ "]"
let assert_calls_are ~ctxt ~cmp ~printer expected mock =
let got = Mo... | null | https://raw.githubusercontent.com/cryptosense/ocaml-mock/17c080a542d3b5b0c7a78d52e914ac49bf1475fe/src_ounit/mock_ounit.ml | ocaml | let rec cmp_list cmp a b =
match (a, b) with
| ([], []) -> true
| ([], _::_) -> false
| (_::_, []) -> false
| ha::ta, hb::tb -> cmp ha hb && cmp_list cmp ta tb
let list_printer show l =
"[" ^ String.concat ", " (List.map show l) ^ "]"
let assert_calls_are ~ctxt ~cmp ~printer expected mock =
let got = Mo... | |
025b70976a1ac7bbf43e577f90d4f3bf3e6db54062f668d15471342265357a43 | qitab/ace.core | ix.lisp | Copyright 2020 Google LLC
;;;
Use of this source code is governed by an MIT - style
;;; license that can be found in the LICENSE file or at
;;; .
;;; Arithmetic and boolean operations on the vector index type.
;;;
(defpackage #:ace.core.ix
(:import-from #:ace.core.vector #:index)
(:export
#:mod #:rem #:tru... | null | https://raw.githubusercontent.com/qitab/ace.core/e6eb21ff67b0c5eaec21c9b543b6dce18d7c8e6d/ix.lisp | lisp |
license that can be found in the LICENSE file or at
.
Arithmetic and boolean operations on the vector index type.
Compile the operations without safety unless in the debug build. | Copyright 2020 Google LLC
Use of this source code is governed by an MIT - style
(defpackage #:ace.core.ix
(:import-from #:ace.core.vector #:index)
(:export
#:mod #:rem #:truncate #:floor #:ceiling
#:+ #:- #:* #:/ #:incf #:decf #:1+ #:1-
#:max #:min #:maxf #:minf
#:minusp #:zerop #:plusp #:oddp #:... |
6d9e3620d55ed91e9d92253ff1bbd68726c6c3f923f5f1938dd2e811fe8adc29 | berberman/nvfetcher | VersionSource.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Config.VersionSource
( versionSourceCodec,
versionSourceKeys,
)
where
import Data.Foldable (asum)
import Data.Text (Text)
import qualified Data.Text as T
import Data.Tuple.Extra (uncurry3)
import Lens.Micro
import L... | null | https://raw.githubusercontent.com/berberman/nvfetcher/706829d95b74617eee0cb799fae91983e7b05bcc/app/Config/VersionSource.hs | haskell | # LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----------------------------------------------------... | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
module Config.VersionSource
( versionSourceCodec,
versionSourceKeys,
)
where
import Data.Foldable (asum)
import Data.Text (Text)
import qualified Data.Text as T
import Data.Tuple.Extra (uncurry3)
import Lens.Micro
import Lens.Micro.Extras (view)
import NvFe... |
d169645be06ce5dfed4c61a861d8f4d1d504c68073b4904c9bed788189ad583b | agentultra/adventure-engine | Objects.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
module Adventure.Engine.Objects where
import Control.Lens
import... | null | https://raw.githubusercontent.com/agentultra/adventure-engine/90b2befac04f3b745d186ef61bfea97d651f320c/src/Adventure/Engine/Objects.hs | haskell | # LANGUAGE DeriveAnyClass #
Orphan Instances | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
module Adventure.Engine.Objects where
import Control.Lens
import qualified Data.Aeson as JSON
im... |
b975656486b3e778aae9b2c51fde8d5d037b3fc7ec8fb4c1cadf9da88faaa35b | racket/math | bigfloat-log-arithmetic.rkt | #lang typed/racket/base
(require "bigfloat-struct.rkt")
(provide bflog* bflog/ bflog+ bflog- bflog1- bflogb)
(: bflog* (Bigfloat Bigfloat -> Bigfloat))
(define (bflog* log-x log-y) (bf+ log-x log-y))
(: bflog/ (Bigfloat Bigfloat -> Bigfloat))
(define (bflog/ log-x log-y) (bf- log-x log-y))
(: bflog+ (Bigfloat Bigf... | null | https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-lib/math/private/bigfloat/bigfloat-log-arithmetic.rkt | racket | #lang typed/racket/base
(require "bigfloat-struct.rkt")
(provide bflog* bflog/ bflog+ bflog- bflog1- bflogb)
(: bflog* (Bigfloat Bigfloat -> Bigfloat))
(define (bflog* log-x log-y) (bf+ log-x log-y))
(: bflog/ (Bigfloat Bigfloat -> Bigfloat))
(define (bflog/ log-x log-y) (bf- log-x log-y))
(: bflog+ (Bigfloat Bigf... | |
ba79aeaf5aab30f69dfe49069030bfb3e8ce5a2dfde53bdd83cf99a652303366 | giorgidze/Hydra | ErrM.hs | # OPTIONS -w #
-- BNF Converter: Error Monad
Copyright ( C ) 2004 Author :
-- This file comes with NO WARRANTY and may be used FOR ANY PURPOSE.
module Hydra.BNFC.ErrM where
the Error monad : like Maybe type with error msgs
import Control.Monad (MonadPlus(..), liftM)
data Err a = Ok a | Bad String
derivi... | null | https://raw.githubusercontent.com/giorgidze/Hydra/e5b59d0baff27f06368caeb1e9860f1395913ca5/src/Hydra/BNFC/ErrM.hs | haskell | BNF Converter: Error Monad
This file comes with NO WARRANTY and may be used FOR ANY PURPOSE. | # OPTIONS -w #
Copyright ( C ) 2004 Author :
module Hydra.BNFC.ErrM where
the Error monad : like Maybe type with error msgs
import Control.Monad (MonadPlus(..), liftM)
data Err a = Ok a | Bad String
deriving (Read, Show, Eq, Ord)
instance Monad Err where
return = Ok
fail = Bad
Ok a >... |
1b1067969e205b6a9779abb23bf493424337f3a1e8da3b25a8e83fd9b8250a04 | koka-lang/koka | Unique.hs | -----------------------------------------------------------------------------
Copyright 2012 - 2021 , Microsoft Research , .
--
-- This is free software; you can redistribute it and/or modify it under the
terms of the Apache License , Version 2.0 . A copy of the License can be
-- found in the LICENSE file at the ... | null | https://raw.githubusercontent.com/koka-lang/koka/56392a92b0a2668f91af814b4c1fdbc0728f3911/src/Common/Unique.hs | haskell | ---------------------------------------------------------------------------
This is free software; you can redistribute it and/or modify it under the
found in the LICENSE file at the root of this distribution.
---------------------------------------------------------------------------
Useful monad classes.
---... | Copyright 2012 - 2021 , Microsoft Research , .
terms of the Apache License , Version 2.0 . A copy of the License can be
HasUnique(updateUnique,setUnique,unique,uniques,uniqueId,uniqueIds,uniqueName)
, Unique, runUnique, runUniqueWith, liftUnique, withUnique
... |
a4177aaf84c2ef370e7e64648287566aeb5c5b5d12aed0995981d830ac84e153 | helium/ebus-gatt | gatt_descriptor_pf.erl | -module(gatt_descriptor_pf).
-behavior(gatt_descriptor).
-export([uuid/1, init/2, flags/1, read_value/1, format_to_int/1]).
-record(state, {
format :: format(),
exponent=0 :: non_neg_integer(),
unit=0 :: non_neg_integer(),
name_space=1 :: 0 | 1,
... | null | https://raw.githubusercontent.com/helium/ebus-gatt/92732d7d7c153e46f4a7b9bde46c676b8d8476fd/src/gatt_descriptor_pf.erl | erlang | <<Val::64/float>>
<<Val::64/float>> | -module(gatt_descriptor_pf).
-behavior(gatt_descriptor).
-export([uuid/1, init/2, flags/1, read_value/1, format_to_int/1]).
-record(state, {
format :: format(),
exponent=0 :: non_neg_integer(),
unit=0 :: non_neg_integer(),
name_space=1 :: 0 | 1,
... |
2f442726f00e144e83adc7136cc9016e26d6abb8810413b0905922e0febe8179 | holyjak/fulcro-billing-app | employee.cljc | (ns billing-app.model.billing.invoice.employee
(:refer-clojure :exclude [name])
(:require
#?@(:clj
[[com.wsscode.pathom.connect :as pc :refer [defmutation]]
[billing-app.components.database-queries :as queries]
[billing-app.model.cache :as dev]]
:cljs
[[com.fulcrologic.... | null | https://raw.githubusercontent.com/holyjak/fulcro-billing-app/568bf28552989e1e611773b2d946c9990e1edc3d/src/shared/billing_app/model/billing/invoice/employee.cljc | clojure | (ns billing-app.model.billing.invoice.employee
(:refer-clojure :exclude [name])
(:require
#?@(:clj
[[com.wsscode.pathom.connect :as pc :refer [defmutation]]
[billing-app.components.database-queries :as queries]
[billing-app.model.cache :as dev]]
:cljs
[[com.fulcrologic.... | |
6030eb73b180f6b23430d86a5543d39ba218d5ef3cbe5e9915c5650b81fde57a | rabbitmq/erlando | maybe_m.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/rabbitmq/erlando/1c1ef25a9bc228671b32b4a6ee30c7525314b1fd/src/maybe_m.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
| The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is Erlando .
The Initial Developer of the Original Code is VMware , Inc.
Copyright ( c ) 2011 - 2013 VMware , Inc. All rights reserved .
-module(maybe_... |
ced837849942c578d28170eddac1e5b356a8d2c6ef77e5bfd440d84c1260e18f | tfausak/advent-of-code | 1.hs | -- stack --resolver ghc-8.6.3 script
main
= print
. (\ x -> x :: Int)
. sum
. map
( uncurry (-)
. foldr
(\ x (hi, lo) -> (max hi x, min lo x))
(minBound, maxBound)
. map read
. words
)
. lines
=<< readFile "input.txt"
| null | https://raw.githubusercontent.com/tfausak/advent-of-code/26f0d9726b019ff7b97fa7e0f2f995269b399578/2017/2/1.hs | haskell | stack --resolver ghc-8.6.3 script | main
= print
. (\ x -> x :: Int)
. sum
. map
( uncurry (-)
. foldr
(\ x (hi, lo) -> (max hi x, min lo x))
(minBound, maxBound)
. map read
. words
)
. lines
=<< readFile "input.txt"
|
1d4a76cd6bf56b45832f357c36a2760d45c8d58b2e0106b36aa0db8b6eecd4f6 | gedge-platform/gedge-platform | ra_log_ets.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2017 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
%% @hidden
-module(ra_log_ets).
-behaviour(gen_ser... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/ra/src/ra_log_ets.erl | erlang |
@hidden
ra_log_ets - owns mem_table ETS tables
===================================================================
API functions
===================================================================
===================================================================
gen_server callbacks
============================... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2017 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(ra_log_ets).
-behaviour(gen_server).
-export([s... |
45a8f515608c160a6639463ea817cecb8e8443a399148f4274f7da07d1c0afd7 | hackinghat/cl-mysql | integration-test.lisp | ;;;; -*- Mode: Lisp -*-
$ Id$
;;;;
Copyright ( c ) 2009 < >
;;;;
;;;; Permission is hereby granted, free of charge, to any person obtaining
;;;; a copy of this software and associated documentation files (the
" Software " ) , to deal in the Software without restriction , including
;;;; without limitation the... | null | https://raw.githubusercontent.com/hackinghat/cl-mysql/3fbf6e1421484f64c5bcf2ff3c4b96c6f0414f09/integration-test.lisp | lisp | -*- Mode: Lisp -*-
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall b... | $ Id$
Copyright ( c ) 2009 < >
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
included in all copies or substantial portions of the Softwa... |
117b4756ebc89b92c671b01c7680ccfc0c60c3827765d1785e4cfdcf6a1782c7 | fyquah/hardcaml_zprize | full_controller.ml | open Base
open Core
open Hardcaml
open Signal
include struct
open Pippenger
module Controller = Controller
module Scalar = Scalar
end
include struct
open Hardcaml_xilinx
module Dual_port_ram = Dual_port_ram
module Ram_port = Ram_port
end
module Make (Config : sig
module Top_config : Config.S
val pip... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/zprize/msm_pippenger/hardcaml/src/full_controller.ml | ocaml | open Base
open Core
open Hardcaml
open Signal
include struct
open Pippenger
module Controller = Controller
module Scalar = Scalar
end
include struct
open Hardcaml_xilinx
module Dual_port_ram = Dual_port_ram
module Ram_port = Ram_port
end
module Make (Config : sig
module Top_config : Config.S
val pip... | |
d1f7497741eb1a7386a9404f2a798e64fe248b06ce900e5102f8189e0c67b183 | roelvandijk/numerals | TestData.hs | |
[ @ISO639 - 1@ ] lb
[ @ISO639 - 2@ ] ltz
[ @ISO639 - 3@ ] ltz
[ @Native name@ ]
[ @English name@ ] Luxembourgish
[@ISO639-1@] lb
[@ISO639-2@] ltz
[@ISO639-3@] ltz
[@Native name@] Lëtzebuergesch
[@English name@] Luxembourgish
-}
module T... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src-test/Text/Numeral/Language/LTZ/TestData.hs | haskell | ------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Test data
---------------------------------------------------------------... | |
[ @ISO639 - 1@ ] lb
[ @ISO639 - 2@ ] ltz
[ @ISO639 - 3@ ] ltz
[ @Native name@ ]
[ @English name@ ] Luxembourgish
[@ISO639-1@] lb
[@ISO639-2@] ltz
[@ISO639-3@] ltz
[@Native name@] Lëtzebuergesch
[@English name@] Luxembourgish
-}
module T... |
2f2094d6368834c0c3fedd6f162e8f8452f7c11d9a62b1a091655766b006317d | camfort/fortran-src | SemanticTypesSpec.hs | module Language.Fortran.Analysis.SemanticTypesSpec where
import Test.Hspec
import TestUtil
import Language.Fortran.Analysis.SemanticTypes
import Language.Fortran.AST
import Language.Fortran.Version
spec :: Spec
spec = do
describe "Semantic types" $ do
it "recovers DOUBLE PRECISION for REAL(8) in Fortran 77" $ ... | null | https://raw.githubusercontent.com/camfort/fortran-src/0c5fdf7437a7a35d0966511c1b57b04ed616a1ab/test/Language/Fortran/Analysis/SemanticTypesSpec.hs | haskell | module Language.Fortran.Analysis.SemanticTypesSpec where
import Test.Hspec
import TestUtil
import Language.Fortran.Analysis.SemanticTypes
import Language.Fortran.AST
import Language.Fortran.Version
spec :: Spec
spec = do
describe "Semantic types" $ do
it "recovers DOUBLE PRECISION for REAL(8) in Fortran 77" $ ... | |
405783c720a12aee8207beb99b0724bd6bbf786814046630c497123dafc16847 | Decentralized-Pictures/T4L3NT | storage_sigs.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_protocol/storage_sigs.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2019 - 2020 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WI... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.