_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
f341fd50a8c8a257f6e46357dfe8881376c11dde52f91e94c2a883c232023e3d
georgefst/evdev
Uinput.hs
-- | Create virtual input devices. module Evdev.Uinput ( Device, newDevice, writeEvent, writeBatch, defaultDeviceOpts, DeviceOpts (..), deviceSyspath, deviceDevnode, -- * Re-exports from 'Evdev' AbsInfo (..), Event(..), EventData(..), KeyEvent(..), EventCode(..),...
null
https://raw.githubusercontent.com/georgefst/evdev/49a073fcda1bf6d68821a8312b61ef03dd9ceddb/evdev/src/Evdev/Uinput.hs
haskell
| Create virtual input devices. * Re-exports from 'Evdev' | A `uinput` device. | Create a new `uinput` device. | Device name | Write a single event. Doesn't issue a sync event, so: @writeEvent dev e /= writeBatch dev [e]@.
module Evdev.Uinput ( Device, newDevice, writeEvent, writeBatch, defaultDeviceOpts, DeviceOpts (..), deviceSyspath, deviceDevnode, AbsInfo (..), Event(..), EventData(..), KeyEvent(..), EventCode(..), EventValue(..), ) where import Control.Monad import Data.Tuple...
25a6cc2aac62ec9b59e91af239e5ebc894c3c45468373ec8e1e0d27ec1b42bda
vert-x/mod-lang-clojure
server.clj
Copyright 2013 the original author or authors . ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, sof...
null
https://raw.githubusercontent.com/vert-x/mod-lang-clojure/dcf713460b8f46c08d0db6e7bf8537f1dd91f297/examples/proxy/server.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing pe...
Copyright 2013 the original author or authors . distributed under the License is distributed on an " AS IS " BASIS , (ns example.proxy.server (:require [vertx.http :as http] [vertx.buffer :as buf] [vertx.stream :as stream])) (defn req-handler [req] (println "Got request:" (.uri req)) ...
d3689698e4db7f0a635f158cb8d974d037601edaa4993f2a51c5952c62f7c4d8
fizruk/miso-aframe
Cursor.hs
# LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} module Miso.AFrame.Core.Primitives.Cursor where import Data.Aeson (ToJSON(..)) import GHC.Generics (Generic) import Miso.AFrame.Core.Types import Miso.AFrame.Core.Internal.Utils data CursorAttrs = CursorAttrs { cursorFuse :: Maybe Bool , cursor...
null
https://raw.githubusercontent.com/fizruk/miso-aframe/eb608e86fd71f01b397cde04124ff3a949e843be/src/Miso/AFrame/Core/Primitives/Cursor.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DeriveGeneric # module Miso.AFrame.Core.Primitives.Cursor where import Data.Aeson (ToJSON(..)) import GHC.Generics (Generic) import Miso.AFrame.Core.Types import Miso.AFrame.Core.Internal.Utils data CursorAttrs = CursorAttrs { cursorFuse :: Maybe Bool , cursorFuseTimeout :: Maybe Milliseconds ...
f73dfea2c998143a68a16af966ff3f7c123666b1023c266fe6e7c3909aaea9b9
godfat/sandbox
fix2.hs
module Main where sieve :: Int -> [Int] -> [Int] sieve n xs = filter (\x -> (mod x n) /= 0) xs fix2 :: [Int] -> [Int] fix2 [] = [] fix2 (x:xs) = x : fix2 (sieve x xs) main = print (fix2 [2..] !! 2000)
null
https://raw.githubusercontent.com/godfat/sandbox/eb6294238f92543339adfdfb4ba88586ba0e82b8/haskell/exercise2/fix2.hs
haskell
module Main where sieve :: Int -> [Int] -> [Int] sieve n xs = filter (\x -> (mod x n) /= 0) xs fix2 :: [Int] -> [Int] fix2 [] = [] fix2 (x:xs) = x : fix2 (sieve x xs) main = print (fix2 [2..] !! 2000)
a1893f41512472086e215a80b7c6f6925cb7a7764122770ff14594384edb1a9f
yakovzaytsev/screamer-plus
t2l-screamer-export.lisp
(in-package :t2l) (define-box om-all-memberv (x sequence &optional (remove-nil t)) :initvals '(nil nil t) :indoc '("" "" "") :icon 324 :doc "" (cond ((null x) (memberv nil sequence)) ((listp x) (apply #'andv (mapcar #'(lambda (y) (memberv y sequence)) (if remo...
null
https://raw.githubusercontent.com/yakovzaytsev/screamer-plus/08b4fccb4f4b68f7acc2a2f609d368711748d94e/examples/t2l-screamer-export.lisp
lisp
(in-package :t2l) (define-box om-all-memberv (x sequence &optional (remove-nil t)) :initvals '(nil nil t) :indoc '("" "" "") :icon 324 :doc "" (cond ((null x) (memberv nil sequence)) ((listp x) (apply #'andv (mapcar #'(lambda (y) (memberv y sequence)) (if remo...
0591f3011cede7ebae496f9fc049be6c170a1488513742e9511689a632940301
deepfire/holotype
Main.hs
# LANGUAGE UnicodeSyntax # module Main (main) where import Reflex.GLFW (basicGL33Host) import Holotype (holotype) -- | An FRP implementation meets a FRP network. main ∷ IO () main = basicGL33Host "a simple holotype" holotype
null
https://raw.githubusercontent.com/deepfire/holotype/d33052f588b74616560b81616ffc4a0142f8a617/Main.hs
haskell
| An FRP implementation meets a FRP network.
# LANGUAGE UnicodeSyntax # module Main (main) where import Reflex.GLFW (basicGL33Host) import Holotype (holotype) main ∷ IO () main = basicGL33Host "a simple holotype" holotype
d8b52e01e8b2d42b8ddd053f7f548df39f9af5084c80d5645569755c85fdf92c
tfeb/tfeb-lisp-hax
test-iterate.lisp
;;;; Tests for iterate ;;; to check I am actually getting it right ;;; #+org.tfeb.tools.require-module (org.tfeb.tools.require-module:needs :org.tfeb.hax.iterate #+Quicklisp ("parachute" :fallback ql:quickload)) (defpackage :org.tfeb.hax.iterate/test (:use :cl :org.tfeb.hax.iterate :org.shirakumo.parachute)) ...
null
https://raw.githubusercontent.com/tfeb/tfeb-lisp-hax/79d580f57d897c5e034012d777e853cf372c61b6/test/test-iterate.lisp
lisp
Tests for iterate to check I am actually getting it right Just confirm that ITERATE is like LET because I was confused about this for ever.
#+org.tfeb.tools.require-module (org.tfeb.tools.require-module:needs :org.tfeb.hax.iterate #+Quicklisp ("parachute" :fallback ql:quickload)) (defpackage :org.tfeb.hax.iterate/test (:use :cl :org.tfeb.hax.iterate :org.shirakumo.parachute)) (in-package :org.tfeb.hax.iterate/test) (define-test "org.tfeb.hax.it...
4dc3702a093ff9c0e46c43f0188f55448999ed655e65b75ae22239df89230620
ChildsplayOSU/bogl
Error.hs
{-# LANGUAGE OverloadedStrings #-} {-| Description : The top-level error data types. Specific error types are nested within these. -} module Error.Error where import Error.TypeError import Data.Aeson hiding (Error) import Text.Parsec.Pos -- | A top-level error data type that contains information that all errors sh...
null
https://raw.githubusercontent.com/ChildsplayOSU/bogl/8c649689bf26543be1a7ec72787b9c013ecb754f/src/Error/Error.hs
haskell
# LANGUAGE OverloadedStrings # | Description : The top-level error data types. Specific error types are nested within these. | A top-level error data type that contains information that all errors should have ^ more specific error information ^ error id; for future use ^ error position Note: the error code functi...
module Error.Error where import Error.TypeError import Data.Aeson hiding (Error) import Text.Parsec.Pos data Error = Error { } deriving (Eq) instance Show Error where show (Error (TE e@(InputMismatch _ _ _)) _ _) = show e show (Error (TE e) _ p) = "Type error in " ++ srcname ++ show e ...
a42183d092971fd37e84ea205b6241e767c35c604093cc348b895fe7ed1d78f4
dizzyd/erlang-mysql-driver
mysql_auth.erl
%%% coding: latin-1 %%%------------------------------------------------------------------- %%% File : mysql_auth.erl Author : < > . : MySQL client authentication functions . Created : 4 Aug 2005 by < > %%% Note : All MySQL code was written by , originally %%% in the file mysql.erl ...
null
https://raw.githubusercontent.com/dizzyd/erlang-mysql-driver/051f22e1cbe130061b43273a14217c659e6b860d/src/mysql_auth.erl
erlang
coding: latin-1 ------------------------------------------------------------------- File : mysql_auth.erl in the file mysql.erl - I just moved it here. See the file COPYING ------------------------------------------------------------------- -----------------------------------------------------------...
Author : < > . : MySQL client authentication functions . Created : 4 Aug 2005 by < > Note : All MySQL code was written by , originally Copyright ( c ) 2001 - 2004 Kungliga Tekniska H � gskolan -module(mysql_auth). External exports ( should only be used by the ' mysql_conn ' module ) -expor...
23b7208c2f9d7bd316dfd738c991f01b283b75a4ce8e0bb527795409fc45826e
janestreet/base
test_maybe_bound.ml
open! Import open! Maybe_bound let%test_unit "bounds_crossed" = let a, b, c, d = Incl 1, Excl 1, Incl 3, Excl 3 in let cases = [ a, a, false ; a, b, false ; a, c, false ; a, d, false ; b, a, false ; b, b, false ; b, c, false ; b, d, false ; c, a, true ; c, b, true ; c, c...
null
https://raw.githubusercontent.com/janestreet/base/221b085f3fcd77597f8245b4d73de3970b238e71/test/test_maybe_bound.ml
ocaml
open! Import open! Maybe_bound let%test_unit "bounds_crossed" = let a, b, c, d = Incl 1, Excl 1, Incl 3, Excl 3 in let cases = [ a, a, false ; a, b, false ; a, c, false ; a, d, false ; b, a, false ; b, b, false ; b, c, false ; b, d, false ; c, a, true ; c, b, true ; c, c...
d30c44307398aaa48b9c6cd979fe20110de3f4d7bf289dda4d9e90ec5e4574ea
input-output-hk/plutus
Data.hs
-- editorconfig-checker-disable-file -- | Built-in @pair@ and related functions. {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # {-# LANGUAGE TypeOperators #-} module PlutusCore.StdLib.Data.Data ( dataTy , caseData ) where import Prelude hiding (uncurry) import PlutusCore.Core imp...
null
https://raw.githubusercontent.com/input-output-hk/plutus/c8d4364d0e639fef4d5b93f7d6c0912d992b54f9/plutus-core/plutus-core/stdlib/PlutusCore/StdLib/Data/Data.hs
haskell
editorconfig-checker-disable-file | Built-in @pair@ and related functions. # LANGUAGE OverloadedStrings # # LANGUAGE TypeOperators # > /\(r :: *) -> > \(fConstr : integer -> list data -> r) > (fI : integer -> r) > (fB : bytestring -> r) -> > chooseData > d > ...
# LANGUAGE TypeApplications # module PlutusCore.StdLib.Data.Data ( dataTy , caseData ) where import Prelude hiding (uncurry) import PlutusCore.Core import PlutusCore.Data import PlutusCore.Default import PlutusCore.MkPlc import PlutusCore.Name import PlutusCore.Quote import Data.ByteString (ByteStrin...
712f333e9c0675e0f13d370df939cfc58ef0d0c940f804792fed328e9c03ea74
fluree/fluree.crypto
pkcs7_test.cljs
(ns fluree.crypto.pkcs7-test (:require [cljs.test :refer [deftest is testing run-tests]] [alphabase.core :as alphabase] [fluree.crypto.pkcs7 :refer [byte? bytes? compare-bytes encode decode]])) (deftest test-byte? (is (not (byte? 256))) (is (not (byte? "foo"))) (is (byte? 0)) (is (byt...
null
https://raw.githubusercontent.com/fluree/fluree.crypto/1b4e0c7b34963f374603abc0e305e38dc1e668d4/test/fluree/crypto/pkcs7_test.cljs
clojure
(ns fluree.crypto.pkcs7-test (:require [cljs.test :refer [deftest is testing run-tests]] [alphabase.core :as alphabase] [fluree.crypto.pkcs7 :refer [byte? bytes? compare-bytes encode decode]])) (deftest test-byte? (is (not (byte? 256))) (is (not (byte? "foo"))) (is (byte? 0)) (is (byt...
d4bf079a29696c1924d3623878174dc9373bffdddc4bdb9cfcd44ed5a2eb3521
brendanhay/gogol
Get.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-plus-domains/gen/Gogol/PlusDomains/People/Get.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Get a person\'s profile. /See:/ </+/domains/ Google+ Domains API Reference> for @plusDomains.people.get@. * Resource ** Constructing a Request | A resource alias for @plusDomains.people.get@ method which the 'PlusDomainsPeop...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
0d342764cd40746e7df20e2c017d8be207f2d41a135cef2d1fd5aa9fc5ded04e
clojure/core.typed
free_in.clj
Copyright ( c ) , contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;...
null
https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/src/clojure/core/typed/checker/free_in.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , contributors . (ns ^:skip-wiki clojure.core.typed.checker.free-in (:require [clojure.core.typed.checker.fold-rep :as fold] [clojure.core.typed.checker.type-rep :as r] clojure.core.typed.checker.object-rep clojure.core.typed.checker.filter-rep) (:impo...
ad4fd3892776759fbae66378e6aaf11e18b7d5c25222fd79287fa5b5727354c5
m4dc4p/haskelldb
DBDirect.hs
import Database.HaskellDB.FlatDB import Database.HaskellDB.DBDirect main :: IO () main = dbdirect driver
null
https://raw.githubusercontent.com/m4dc4p/haskelldb/a1fbc8a2eca8c70ebe382bf4c022275836d9d510/driver-flat/DBDirect.hs
haskell
import Database.HaskellDB.FlatDB import Database.HaskellDB.DBDirect main :: IO () main = dbdirect driver
8a592daac9aa64de44fc5f5cc49079e458359e2881e49f5faaccb13ea71fc77c
jiesoul/soul-talk
routes.clj
(ns soul-talk.reply.routes (:require [compojure.api.sweet :refer :all] [compojure.api.meta :refer [restructure-param]] [soul-talk.reply.handler :as reply] [soul-talk.spec.core :refer [Result]] [soul-talk.middleware :as m])) (defmethod restructure-param :auth-app-key ...
null
https://raw.githubusercontent.com/jiesoul/soul-talk/630de08c6549b206d59023764d5f2576d97d1030/api/src/soul_talk/reply/routes.clj
clojure
auth
(ns soul-talk.reply.routes (:require [compojure.api.sweet :refer :all] [compojure.api.meta :refer [restructure-param]] [soul-talk.reply.handler :as reply] [soul-talk.spec.core :refer [Result]] [soul-talk.middleware :as m])) (defmethod restructure-param :auth-app-key ...
26214bd89f7ebbe899efaa981713fd9d67287c4ddb501e803cc8883763f7cba8
twosigma/satellite
project.clj
Copyright 2015 TWO SIGMA OPEN SOURCE , LLC ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software ...
null
https://raw.githubusercontent.com/twosigma/satellite/d29d982f054d4f87ff47b4f94d23faa26a9b3fe4/satellite-slave/project.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
Copyright 2015 TWO SIGMA OPEN SOURCE , LLC distributed under the License is distributed on an " AS IS " BASIS , (defproject satellite-slave "0.2.0-SNAPSHOT" :description "Monitoring and alerting for Mesos" :url "-slave" :license {:name "Apache License, Version 2.0" :url ""} :dependencies [[org....
7ef5b6284585100f6aed54373056a0bc0452bfbab577bce944014fe43818ee64
patricoferris/ocaml-multicore-monorepo
fuzz_rfc4648.ml
open Crowbar let pp_chr = let escaped = function ' ' .. '~' as c -> String.make 1 c | _ -> "." in Fmt.using escaped Fmt.string let pp_scalar : type buffer. get:(buffer -> int -> char) -> length:(buffer -> int) -> buffer Fmt.t = fun ~get ~length ppf b -> let l = length b in for i = 0 to l / 16 do ...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/ocaml-base64/fuzz/fuzz_rfc4648.ml
ocaml
x0 = decode(input) && x1 = decode(encode(x0)) && x0 = x1
open Crowbar let pp_chr = let escaped = function ' ' .. '~' as c -> String.make 1 c | _ -> "." in Fmt.using escaped Fmt.string let pp_scalar : type buffer. get:(buffer -> int -> char) -> length:(buffer -> int) -> buffer Fmt.t = fun ~get ~length ppf b -> let l = length b in for i = 0 to l / 16 do ...
5af79d043a5036476a183b6f62e5b1c41d972791202d8abfc78ba9a7ec780801
HealthSamurai/dojo.clj
25_threading_macros_test.clj
(ns koans.25-threading-macros-test (:require [koans.engine :refer :all])) (def a-list '(1 2 3 4 5)) (def a-list-with-maps '({:a 1} {:a 2} {:a 3})) (defn function-that-takes-a-map [map a b] (get map :a)) (defn function-that-takes-a-coll [a b coll] (map :a coll)) (meditations "We can use thread first for...
null
https://raw.githubusercontent.com/HealthSamurai/dojo.clj/94922640f534897ab2b181c608b54bfbb8351d7b/test/koans/25_threading_macros_test.clj
clojure
(ns koans.25-threading-macros-test (:require [koans.engine :refer :all])) (def a-list '(1 2 3 4 5)) (def a-list-with-maps '({:a 1} {:a 2} {:a 3})) (defn function-that-takes-a-map [map a b] (get map :a)) (defn function-that-takes-a-coll [a b coll] (map :a coll)) (meditations "We can use thread first for...
22c4e0b904283f66b433f701e0973ac029ae365491dc2a3ef7c08191fda07d45
esobchenko/probix
probix_web.erl
-module(probix_web). -export([start/1, stop/0, dispatch_request/1, handle/4]). -include("probix.hrl"). -include_lib("eunit/include/eunit.hrl"). start(Options) -> log4erl:info(http_logger, "~p", [Options]), mochiweb_http:start([{name, ?MODULE}, {loop, {?MODULE, dispatch_request}} | Options]). stop() -> mochiwe...
null
https://raw.githubusercontent.com/esobchenko/probix/d4c955bafb47b20eae0e8ce32bde705bb3a9f72b/src/probix_web.erl
erlang
-module(probix_web). -export([start/1, stop/0, dispatch_request/1, handle/4]). -include("probix.hrl"). -include_lib("eunit/include/eunit.hrl"). start(Options) -> log4erl:info(http_logger, "~p", [Options]), mochiweb_http:start([{name, ?MODULE}, {loop, {?MODULE, dispatch_request}} | Options]). stop() -> mochiwe...
9978e5c7bc3552aefbb57d1d80979968ab16afb6b6c9c15b1ad9afeb362f8a0c
input-output-hk/cardano-ledger
TxOut.hs
# LANGUAGE DataKinds # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/2d45db3fbfc5b1a557d2e91c2752ebc50ce1079e/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxOut.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # Constructors are not exported for safety: # UNPACK # Payment Addr # UNPACK # Payment Addr # UNPACK # Payment Addr # UNPACK # DataHash # UNPACK # DataHash # UNPACK # DataHash # UNPACK # DataHash # UNPACK # # UNP...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE Und...
db2eb81770e245dbec7f1d49c05456f4299a71fa7be2b9a5f4cb6c43453d277f
pjones/themoviedb
Configuration.hs
-- | -- -- Copyright: -- This file is part of the package themoviedb. It is subject to -- the license terms in the LICENSE file found in the top-level -- directory of this distribution and at: -- -- -- -- No part of this package, including this file, may be copied, -- modified, propagated, or distribute...
null
https://raw.githubusercontent.com/pjones/themoviedb/1b3f34cafda360cd26f44808cd4d311b691afa8e/src/Network/API/TheMovieDB/Internal/Configuration.hs
haskell
| Copyright: This file is part of the package themoviedb. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at: No part of this package, including this file, may be copied, modified, propagated, or distributed except according to ...
License : MIT Internal configuration information for TheMovieDB API . module Network.API.TheMovieDB.Internal.Configuration ( Configuration (..), posterURLs, ) where import Data.Aeson According to the API documentation for TheMovieDB , you should cache the ' Configuration ' value and only request it ev...
206492043a8a52fdc88768c5e5a0cd325debf241e6afb51e30b2022782b3eaf1
gfredericks/vcr-clj
core.clj
(ns vcr-clj.core (:require [vcr-clj.cassettes :refer [cassette-exists? read-cassette write-cassette]])) (defn ^:private var-name [var] (let [{:keys [ns name]} (meta var)] (str ns "/" name))) (defn ^:private add-meta-from "Return...
null
https://raw.githubusercontent.com/gfredericks/vcr-clj/adb94d56512e270abc00ff84fe2da98882aede88/src/vcr_clj/core.clj
clojure
defaulting this to true so that calls on other threads can be recorded, e.g. when running a web server whose handler makes calls that ought to be recorded. TODO: add the ability to configure whether out-of-order calls are allowed, or repeat calls, or such and such. I guess currently we aren't recording actual arg...
(ns vcr-clj.core (:require [vcr-clj.cassettes :refer [cassette-exists? read-cassette write-cassette]])) (defn ^:private var-name [var] (let [{:keys [ns name]} (meta var)] (str ns "/" name))) (defn ^:private add-meta-from "Return...
57b24e3abcb8be9516da2fbf102135d4fa2ef4172dce773979b6fc847cafd84e
squaresLab/genprog-code
template.ml
* * Copyright ( c ) 2012 - 2018 , * < > * < > * < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are ...
null
https://raw.githubusercontent.com/squaresLab/genprog-code/7982415b347529efee02190ab9ba6bd7eda6195e/src/template.ml
ocaml
* this implements support for template-based repairs. Initially templates were only supported in [Cilrep.cilRep], though any representation can be extended to handle them. However, this means much of the concrete code in this module is CIL-specific Note that lval is used improperly, here, since an lval ...
* * Copyright ( c ) 2012 - 2018 , * < > * < > * < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are ...
81343539d20c050f69691e47e881d7c13b8d54afc0ae5c2032f48d66e42449bb
bragful/ephp
ephp_parser_string.erl
-module(ephp_parser_string). -author(''). -include("ephp.hrl"). -include("ephp_parser.hrl"). -export([string/3]). -import(ephp_parser, [add_pos/2, new_line/1, add_line/2, variable/3, throw_error/3, new_line/2, enclosed_level/1, unclosed_level/1,...
null
https://raw.githubusercontent.com/bragful/ephp/119f1760a5cdf4c8b6a01739e852c7183af7acff/src/ephp_parser_string.erl
erlang
-module(ephp_parser_string). -author(''). -include("ephp.hrl"). -include("ephp_parser.hrl"). -export([string/3]). -import(ephp_parser, [add_pos/2, new_line/1, add_line/2, variable/3, throw_error/3, new_line/2, enclosed_level/1, unclosed_level/1,...
86e625417d7d4b4dcc1fbda1ef798701f0a1b7c022e2e68cc253b80f22f5e530
BillHallahan/G2
FromJust.hs
module Bad where {-@ f :: x:Int -> {y:Maybe Int | x == fromJust y} @-} f :: Int -> Maybe Int f = Just
null
https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/test_files/Pos/FromJust.hs
haskell
@ f :: x:Int -> {y:Maybe Int | x == fromJust y} @
module Bad where f :: Int -> Maybe Int f = Just
27f0a3cc92193fff78c8cb8e52574174eca7125da74672fcd81862efea7fba13
yogthos/graal-web-app-example
core.clj
(ns server.core (:require [config.core :refer [load-env]] [hiccup.page :as hiccup] [mount.core :refer [defstate] :as mount] [org.httpkit.server :as http] [reitit.ring :as ring] [ring.middleware.defaults :refer [wrap-defaults api-defaults]] [ring.util.response :as response]) (:gen-class)) ...
null
https://raw.githubusercontent.com/yogthos/graal-web-app-example/2b258102597d9b45d415fea822bc4a9291a2b777/src/server/core.clj
clojure
GraalVM resource scheme
(ns server.core (:require [config.core :refer [load-env]] [hiccup.page :as hiccup] [mount.core :refer [defstate] :as mount] [org.httpkit.server :as http] [reitit.ring :as ring] [ring.middleware.defaults :refer [wrap-defaults api-defaults]] [ring.util.response :as response]) (:gen-class)) ...
e270d57db6066f001cc2179874d1d6958f5bc971b58422ceea963e2534444e41
YoshikuniJujo/test_haskell
Main.hs
# LANGUAGE LambdaCase # # OPTIONS_GHC -Wall -fno - warn - tabs # module Main where import System.Environment import qualified Tr main :: IO () main = getArgs >>= \case ["tr", "-r", src, dst, fp] -> do Tr.rec src dst fp _ -> error "no such command"
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/0f9ec06a48e5c44af92ed901c6e25c79b47a7bb1/tools/yjutils/app/Main.hs
haskell
# LANGUAGE LambdaCase # # OPTIONS_GHC -Wall -fno - warn - tabs # module Main where import System.Environment import qualified Tr main :: IO () main = getArgs >>= \case ["tr", "-r", src, dst, fp] -> do Tr.rec src dst fp _ -> error "no such command"
67a128b88a91cde0a26cf15f9733690ae8b99d39e3fe0c6b2a394476ec390c7c
ekmett/grid
Symantics.hs
# LANGUAGE FunctionalDependencies # # LANGUAGE UndecidableInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE RebindableSyntax # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE KindSignatures # # LANGUAGE TypeOperators # # LANGU...
null
https://raw.githubusercontent.com/ekmett/grid/6acb6f424a5efa2d9591a4c6fa3d7efc9e465dd8/Grid/Symantics.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE Rank2Types # # LANGUAGE GADTs # * Syntax/Semantics * Closed terms Helper functions a lightweight syntax/semantics
# LANGUAGE FunctionalDependencies # # LANGUAGE UndecidableInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE RebindableSyntax # # LANGUAGE KindSignatures # # LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # # LANGUAGE Tru...
03b1a4d980afef43871ab363676e67f4189328cd70a92c9bad25e1c5ba78d0bc
protz/mezzo
UnaryBinders.ml
type ('x, 'i, 'o) pat = 'x * 'i open Obj let map fx fi _ ((x, i) as p) = let x' = fx x in let i' = fi i in if magic (==) x x' && magic (==) i i' then magic p else x', i' let fold fx fi fo (x, i) accu = let accu = fx x accu in let accu = fi i accu in accu
null
https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/alphaLib/UnaryBinders.ml
ocaml
type ('x, 'i, 'o) pat = 'x * 'i open Obj let map fx fi _ ((x, i) as p) = let x' = fx x in let i' = fi i in if magic (==) x x' && magic (==) i i' then magic p else x', i' let fold fx fi fo (x, i) accu = let accu = fx x accu in let accu = fi i accu in accu
708bea2cbb49962095f926d8aa6e7d9fcdbb5e6696d2a4040172b5577af6f7df
dsheets/codoc
codocDoc.mli
* Copyright ( c ) 2014 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/dsheets/codoc/382077cf3e7e20e478bd97cc0b348e0b2ec926db/lib/codocDoc.mli
ocaml
TODO: time? TODO: use signature identifier when doc-ock-xml supports it
* Copyright ( c ) 2014 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
b65ed0dd70a59649e2674ba319b8652e37f2acccab1ce64214a5cc3e8f04a65b
tisnik/clojure-examples
project.clj
; ( C ) Copyright 2021 ; ; All rights reserved. This program and the accompanying materials ; are made available under the terms of the Eclipse Public License v1.0 ; which accompanies this distribution, and is available at -v10.html ; ; Contributors: ; (defproject git-test1 "0.1.0-SNAPSHOT" :d...
null
https://raw.githubusercontent.com/tisnik/clojure-examples/78061b533c0755d0165002961334bbe98d994087/git-test1/project.clj
clojure
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors:
( C ) Copyright 2021 -v10.html (defproject git-test1 "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.10.1"] [clj-jgit "0.8.0"] [clj...
8f7268a92114499c0ad786102c965b0b0af5d98e2ee337b40b63c95b29ee7e52
haskell/stylish-haskell
Tests.hs
# LANGUAGE RecordWildCards # module Language.Haskell.Stylish.Config.Tests ( tests ) where -------------------------------------------------------------------------------- import qualified Data.Aeson.Types as Aeson import qualified Data.ByteString.Lazy.Char8 as BL8 import qualified ...
null
https://raw.githubusercontent.com/haskell/stylish-haskell/628cf06a6e8b55b56b36df33edc8f5f9f2415aa9/tests/Language/Haskell/Stylish/Config/Tests.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ----...
# LANGUAGE RecordWildCards # module Language.Haskell.Stylish.Config.Tests ( tests ) where import qualified Data.Aeson.Types as Aeson import qualified Data.ByteString.Lazy.Char8 as BL8 import qualified Data.Set as Set import qualified Data.YAML.Aeson ...
fa1b42ba7a6aacf1d6e14cf8f40ea531ec4f9559ba77176a668cce57a04ae88e
ktakashi/sagittarius-scheme
mt-random.scm
;; The test case is automatically generated. (import (rnrs) (rename (sagittarius crypto random) (random-generator-read-random-bytes read-random-bytes)) (math mt-random) (srfi :64 testing) (srfi :18)) (define seed (uint-list->bytevector '(#x12345 #x23456 #x34567 #x45678) (endianness native) 8)) (define ...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/9aecac6e95589345d768e6bfcd76efb7d7a691eb/test/tests/math/mt-random.scm
scheme
The test case is automatically generated.
(import (rnrs) (rename (sagittarius crypto random) (random-generator-read-random-bytes read-random-bytes)) (math mt-random) (srfi :64 testing) (srfi :18)) (define seed (uint-list->bytevector '(#x12345 #x23456 #x34567 #x45678) (endianness native) 8)) (define prng (pseudo-random-generator MT :seed seed))...
215819aab5063426e4a1cd59dfc125bb2c4f08a961faa1810575ec8dbcf3b529
facebook/duckling
ES_AR.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory . -------------...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Ranking/Classifiers/ES_AR.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant --------------------------------------------------------------- Auto-generated by regenClassifiers DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW W...
Copyright ( c ) 2016 - present , Facebook , Inc. of patent rights can be found in the PATENTS file in the same directory . @generated module Duckling.Ranking.Classifiers.ES_AR (classifiers) where import Data.String import Prelude import qualified Data.HashMap.Strict as HashMap import Duckling.Ranking.Types cla...
2f21a6969a3f1588c1734220bfc5d1449247ae1d70a0aa3a1df9cee8f26b8e17
pokepay/trivial-battery
mac.lisp
(defpackage #:trivial-battery/os/mac (:use #:cl) (:import-from #:xmls) (:import-from #:assoc-utils #:aget) (:import-from #:uiop) (:export #:battery-info)) (in-package #:trivial-battery/os/mac) (defun get-response-xml () (with-output-to-string (s) (uiop:run-program '("ioreg" "-n" "AppleS...
null
https://raw.githubusercontent.com/pokepay/trivial-battery/318c9da88b4d11d3f33062e0fd09be660a383404/os/mac.lisp
lisp
(defpackage #:trivial-battery/os/mac (:use #:cl) (:import-from #:xmls) (:import-from #:assoc-utils #:aget) (:import-from #:uiop) (:export #:battery-info)) (in-package #:trivial-battery/os/mac) (defun get-response-xml () (with-output-to-string (s) (uiop:run-program '("ioreg" "-n" "AppleS...
77ed788755c88dbc2b929c227460b836ac8d95e71b88184023354a811ca03893
GrammaTech/sel
lisp.lisp
(defpackage :software-evolution-library/test/lisp (:nicknames :sel/test/lisp) (:use :gt/full :software-evolution-library/test/util :stefil+ #+gt :testbot :software-evolution-library :software-evolution-library/software/parseable :software-evolution-library/software/lisp) (:import-from :asdf ...
null
https://raw.githubusercontent.com/GrammaTech/sel/a59174c02a454e8d588614e221cf281260cf12f8/test/lisp.lisp
lisp
Set up a readtable using cl-interpol (with interpolation disabled).. This gives us a nice way of quoting Lisp code as reader sees it as a string. Utility Tests was (use-ecl-byte-compiler-p) object file Trivial, only the expression is kept. Impossible, the whole guard is removed. Strings with `#.' converted to...
(defpackage :software-evolution-library/test/lisp (:nicknames :sel/test/lisp) (:use :gt/full :software-evolution-library/test/util :stefil+ #+gt :testbot :software-evolution-library :software-evolution-library/software/parseable :software-evolution-library/software/lisp) (:import-from :asdf ...
382956536975fe0803be299f351e3ade03f1aea850acabea7d75a43c8e57d5c6
VisionsGlobalEmpowerment/webchange
state.cljs
(ns webchange.admin.pages.account-edit.state (:require [re-frame.core :as re-frame] [re-frame.std-interceptors :as i] [webchange.admin.routes :as routes] [webchange.admin.state :as state] [webchange.state.warehouse :as warehouse] [webchange.utils.date :refer [date-str->locale-date]] [webch...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/cdf34622aca23e7b7bc94214a38b0bddb2d37969/src/cljs/webchange/admin/pages/account_edit/state.cljs
clojure
Account Loading Child removing
(ns webchange.admin.pages.account-edit.state (:require [re-frame.core :as re-frame] [re-frame.std-interceptors :as i] [webchange.admin.routes :as routes] [webchange.admin.state :as state] [webchange.state.warehouse :as warehouse] [webchange.utils.date :refer [date-str->locale-date]] [webch...
f03c78b6733929e81a57ebbc2a90ebcf93ff2dae6c51bab267fb0f58b9859b2f
reflectionalist/S9fES
and-letstar.scm
Scheme 9 from Empty Space , Function Library By , ; Placed in the Public Domain ; ; (and-let* <binding> ... <body>) ==> object ; ; (load-from-library "and-letstar.scm") ; ; Each <binding> has the form (<variable> <expression>) and binds ; the given <variable> to the normal form of <expression>. ; ; Like LET*,...
null
https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/and-letstar.scm
scheme
Placed in the Public Domain (and-let* <binding> ... <body>) ==> object (load-from-library "and-letstar.scm") Each <binding> has the form (<variable> <expression>) and binds the given <variable> to the normal form of <expression>. Like LET*, AND-LET* evaluates its <binding>s in sequence, so each <expression...
Scheme 9 from Empty Space , Function Library By , # F immediately as soon as one of its < expression > s evaluates to # F. Example : ( and - let * ( ( a ' ( ( x . 1 ) ) ) ( cdr a ) ) = = > 1 ( and - let * ( ( a ' ( ( x . 1 ) ) ) ( a...
2ee76f4d8509992078c9ccc3657476d96b5d3a3b151a73cdf0c26a5083a9027e
jeromesimeon/Galax
schema_dtd_import.ml
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/schema/schema_dtd_import.ml
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : schema_dtd_import.ml , v 1.4 2007/02/01 22:08:53 simeon Exp $ Module : Schema_dtd_import Description : This module imports a DTD as a set of XML Schema declarations . Description: This module imports a DTD as a...
d257f443c47976cc858ac7294e6d00d9980875efa9314062ac0bed6d2d20e237
ghc/packages-Cabal
PackageHash.hs
{-# LANGUAGE RecordWildCards, NamedFieldPuns #-} # LANGUAGE DeriveDataTypeable , DeriveGeneric # -- | Functions to calculate nix-style hashes for package ids. -- -- The basic idea is simple, hash the combination of: -- -- * the package tarball -- * the ids of all the direct dependencies -- * other local configur...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-install/Distribution/Client/PackageHash.hs
haskell
# LANGUAGE RecordWildCards, NamedFieldPuns # | Functions to calculate nix-style hashes for package ids. The basic idea is simple, hash the combination of: * the package tarball * the ids of all the direct dependencies * other local configuration (flags, profiling, etc) * Calculating package hashes ** Pl...
# LANGUAGE DeriveDataTypeable , DeriveGeneric # module Distribution.Client.PackageHash ( PackageHashInputs(..), PackageHashConfigInputs(..), PackageSourceHash, hashedInstalledPackageId, hashPackageHashInputs, renderPackageHashInputs, hashedInstalledPackageIdLong, hashedInstalledPackageI...
c0b00fc4fc379744fd2ba6a34eca4063b3077954e4b496b4891100d9463c097e
macourtney/Conjure
project.clj
(defproject org.conjure/conjure-script-model "1.0.1-SNAPSHOT" :description "The generator and destroyers for the view files." :dependencies [[org.conjure/conjure-model "1.0.1-SNAPSHOT"] [org.conjure/conjure-test "1.0.1-SNAPSHOT"]])
null
https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_script_model/project.clj
clojure
(defproject org.conjure/conjure-script-model "1.0.1-SNAPSHOT" :description "The generator and destroyers for the view files." :dependencies [[org.conjure/conjure-model "1.0.1-SNAPSHOT"] [org.conjure/conjure-test "1.0.1-SNAPSHOT"]])
a2ceaeedd219c6a98b732ee303138ae267d3726724ac6407a3705ff872b59a40
scarvalhojr/haskellbook
Main.hs
module Main where import Hello import DogsRule import System.IO main :: IO () main = do hSetBuffering stdout NoBuffering putStr "What's your name? " name <- getLine sayHello name dogs
null
https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter13/hello/exe/Main.hs
haskell
module Main where import Hello import DogsRule import System.IO main :: IO () main = do hSetBuffering stdout NoBuffering putStr "What's your name? " name <- getLine sayHello name dogs
80a28a11071bba88e2e8a10fea83e5584d0a6f3f80cfef92c70f61748ae1e430
DerekCuevas/interview-cake-clj
core_test.clj
(ns in-place-shuffle.core-test (:require [clojure.test :refer :all] [in-place-shuffle.core :refer :all])) (def vector-a [1 2]) (def vector-b [1 2 3]) (def vector-c [6 7 2 9 8 1 3]) (def vector-d [23 88 6 54 23 40 91 66 78 20 12 102]) (def edge-a []) (def edge-b [3]) (deftest fisher-yates-shuffle-test ...
null
https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/in-place-shuffle/test/in_place_shuffle/core_test.clj
clojure
(ns in-place-shuffle.core-test (:require [clojure.test :refer :all] [in-place-shuffle.core :refer :all])) (def vector-a [1 2]) (def vector-b [1 2 3]) (def vector-c [6 7 2 9 8 1 3]) (def vector-d [23 88 6 54 23 40 91 66 78 20 12 102]) (def edge-a []) (def edge-b [3]) (deftest fisher-yates-shuffle-test ...
c40fd8a9c9a4904c0538d78aeecfe56d409df52decf890e0bb7b68e811a373cf
jordanthayer/ocaml-search
eqvclass.ml
$ I d : eqvclass.ml , v 1.1 2003/06/27 21:14:18 ruml Exp $ equivalence classes equivalence classes *) type ('a, 'b) t = ('a, 'b Dset.t) Hashtbl.t (** implemented as a hash table of sets *) let create () = Hashtbl.create 16 let get_class rep ec = try Hashtbl.find ec rep with...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/wrutils/eqvclass.ml
ocaml
* implemented as a hash table of sets representative is not added to the class before each class, start with [] in each class, accumulate objects after each class, accumulate lists start with no lists
$ I d : eqvclass.ml , v 1.1 2003/06/27 21:14:18 ruml Exp $ equivalence classes equivalence classes *) type ('a, 'b) t = ('a, 'b Dset.t) Hashtbl.t let create () = Hashtbl.create 16 let get_class rep ec = try Hashtbl.find ec rep with Not_found -> let n = Dset.create 16 in ...
fed671de5943d202ab25b3abd8bcb668de6e723b33501ce9a98fa00d7ec8dce2
serras/munihac-2020-miso
Main.hs
# language NamedFieldPuns # {-# language OverloadedStrings #-} # language RecordWildCards # module Main where import System.Random import Data.Time.LocalTime import Miso import Miso.String (MisoString, toMisoString) main :: IO () main = startApp App { .. } where initialAction = None model =...
null
https://raw.githubusercontent.com/serras/munihac-2020-miso/ab91ced84877a6b0b938d89eeaaaea29b25ffb15/code/1-simple-events/web/Main.hs
haskell
# language OverloadedStrings #
# language NamedFieldPuns # # language RecordWildCards # module Main where import System.Random import Data.Time.LocalTime import Miso import Miso.String (MisoString, toMisoString) main :: IO () main = startApp App { .. } where initialAction = None model = initialItems update = u...
5b7153afce0ad939b9b625828a1e1ef54680fcbf3473b0c756df0e4184fa2279
synduce/Synduce
sum.ml
type 'a clist = | CNil | Single of 'a | Concat of 'a clist * 'a clist type 'a list = | Nil | Cons of 'a * 'a list let rec sum = function | Nil -> 0 | Cons (hd, tl) -> hd + sum tl [@@ensures fun x -> x > 0] ;; let rec clist_to_list = function | CNil -> Nil | Single a -> Cons (a, Nil) | Concat (x...
null
https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/parse_examples/sum.ml
ocaml
type 'a clist = | CNil | Single of 'a | Concat of 'a clist * 'a clist type 'a list = | Nil | Cons of 'a * 'a list let rec sum = function | Nil -> 0 | Cons (hd, tl) -> hd + sum tl [@@ensures fun x -> x > 0] ;; let rec clist_to_list = function | CNil -> Nil | Single a -> Cons (a, Nil) | Concat (x...
ec405f3d0ef6bde3f634277527fc5818f442ae1ea764487df585f3204b81dc0d
Mesabloo/HaSM
Generator.hs
# LANGUAGE TemplateHaskell , GADTs , BinaryLiterals # module Language.HaSM.CodeGen.Generators.X86.Generator where import Language.HaSM.CodeGen.Core import Language.HaSM.Syntax hiding (Label, Id) import qualified Language.HaSM.Syntax as Syn (Instruction(Label)) import Language.HaSM.CodeGen.Generators.X86.Encoder (toBy...
null
https://raw.githubusercontent.com/Mesabloo/HaSM/7d75f0a81055d1e9c9dd0d351f3e9b9c00c7dadd/src/Language/HaSM/CodeGen/Generators/X86/Generator.hs
haskell
# LANGUAGE TemplateHaskell , GADTs , BinaryLiterals # module Language.HaSM.CodeGen.Generators.X86.Generator where import Language.HaSM.CodeGen.Core import Language.HaSM.Syntax hiding (Label, Id) import qualified Language.HaSM.Syntax as Syn (Instruction(Label)) import Language.HaSM.CodeGen.Generators.X86.Encoder (toBy...
fa4c6ef42660124b7eecd20d944f130c52cd433fc24fafcffda1609857353328
Metaxal/bazaar
info.rkt
#lang info (define deps '("base" "data-lib" "define2" "draw-lib" "gui-lib" "images" "math-lib" "net-lib" "plot-gui-lib" "plot-lib" "racket-index" "rackunit-lib" "scribble-lib" "slideshow-lib" "srfi-lite-lib" )) (define test-omit-paths '("slideshow/examples" "gui/exa...
null
https://raw.githubusercontent.com/Metaxal/bazaar/9c464a62ecb2d1b86abe65e26b65305b494bdace/info.rkt
racket
#lang info (define deps '("base" "data-lib" "define2" "draw-lib" "gui-lib" "images" "math-lib" "net-lib" "plot-gui-lib" "plot-lib" "racket-index" "rackunit-lib" "scribble-lib" "slideshow-lib" "srfi-lite-lib" )) (define test-omit-paths '("slideshow/examples" "gui/exa...
c89c76c91905e3d60463a6697c5c3b28d4abc7fdb01fb89ef8e2b4d7a9439dfc
TerrorJack/ghc-alter
TimerManager.hs
# LANGUAGE Trustworthy # # LANGUAGE BangPatterns , CPP , ExistentialQuantification , NoImplicitPrelude , TypeSynonymInstances , FlexibleInstances # , CPP , ExistentialQuantification , NoImplicitPrelude , Typ...
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/GHC/Event/TimerManager.hs
haskell
* Types * Creation * Running * Registering interest in timeout events ---------------------------------------------------------------------- Imports ---------------------------------------------------------------------- Types | A timeout registration cookie. | Callback invoked on timeout events. | A priority s...
# LANGUAGE Trustworthy # # LANGUAGE BangPatterns , CPP , ExistentialQuantification , NoImplicitPrelude , TypeSynonymInstances , FlexibleInstances # , CPP , ExistentialQuantification , NoImplicitPrelude , Typ...
d9fe56d0e3258b758ba7a22798cb0d465c3ad655f9db28893c1659963c9bb962
savonet/ocaml-mm
MMFFmpeg.mli
class reader_of_file : string -> Video.IO.Reader.t class writer_to_file : string -> float -> int -> int -> int -> Video.IO.Writer.t
null
https://raw.githubusercontent.com/savonet/ocaml-mm/916b007cc7cc4bf250e6f71203bb36afb4ed8634/external/deprecated/MMFFmpeg.mli
ocaml
class reader_of_file : string -> Video.IO.Reader.t class writer_to_file : string -> float -> int -> int -> int -> Video.IO.Writer.t
22ad37f464c12c5f91fcc9b55583e2847e3c05731f0395977078bde8f3073400
rm-hull/project-euler
euler047.clj
EULER # 047 ;; ========== The first two consecutive numbers to have two distinct prime ;; factors are: ;; 14 = 2 x 7 15 = 3 x 5 ;; The first three consecutive numbers to have three distinct ;; prime factors are: ;; 644 = 2² x 7 x 23 645 = 3 x 5 x 43 646 = 2 x 17 x 19 . ;; Find the firs...
null
https://raw.githubusercontent.com/rm-hull/project-euler/04e689e87a1844cfd83229bb4628051e3ac6a325/src/euler047.clj
clojure
========== factors are: prime factors are:
EULER # 047 The first two consecutive numbers to have two distinct prime 14 = 2 x 7 15 = 3 x 5 The first three consecutive numbers to have three distinct 644 = 2² x 7 x 23 645 = 3 x 5 x 43 646 = 2 x 17 x 19 . Find the first four consecutive integers to have four distinct primes factor...
b891a8dd61d7e21dac09c028dc50ed957ebcf6deefe653549799a947428330a2
schemedoc/implementation-metadata
guile.scm
(short-title "Guile") (title "GNU Guile") (based-on "scm") (homepage-url "/") (wikipedia en "GNU Guile") (issue-tracker-url "") (repology "guile") (person "Aubrey Jaffer") (person "Tom Lord") (person "Miles Bader") (person "Andy Wingo") (person "Ludovic Courtès") (person "Jim Blandy") (documentation (title "Refere...
null
https://raw.githubusercontent.com/schemedoc/implementation-metadata/6280d9c4c73833dc5bd1c9bef9b45be6ea5beb68/schemes/guile.scm
scheme
(short-title "Guile") (title "GNU Guile") (based-on "scm") (homepage-url "/") (wikipedia en "GNU Guile") (issue-tracker-url "") (repology "guile") (person "Aubrey Jaffer") (person "Tom Lord") (person "Miles Bader") (person "Andy Wingo") (person "Ludovic Courtès") (person "Jim Blandy") (documentation (title "Refere...
2703f73cd6c9cff75dd72449450bc9927a4a0a36029f2e8098fb72cf447f80ea
vii/dysfunkycom
bitmap-font-definition.lisp
(in-package #:lispbuilder-sdl) (defclass bitmap-font-definition (font-definition) ((char-width :accessor char-width :initform nil :initarg :width) (char-height :accessor char-height :initform nil :initarg :height) (char-pitch :reader char-pitch :initform nil :initarg :pitch) (data :accessor data :in...
null
https://raw.githubusercontent.com/vii/dysfunkycom/a493fa72662b79e7c4e70361ad0ea3c7235b6166/addons/lispbuilder-sdl/sdl/bitmap-font-definition.lisp
lisp
(in-package #:lispbuilder-sdl) (defclass bitmap-font-definition (font-definition) ((char-width :accessor char-width :initform nil :initarg :width) (char-height :accessor char-height :initform nil :initarg :height) (char-pitch :reader char-pitch :initform nil :initarg :pitch) (data :accessor data :in...
feb5badbe8c5ffdd896ce9bb41316725b822377e06625a42d4fd1ff84765ad0f
fukamachi/prove
list.lisp
(in-package :cl-user) (defpackage prove.reporter.list (:use :cl :prove.report :prove.reporter) (:import-from :prove.color :with-color) (:export :list-reporter :report-expected-line)) (in-package :prove.reporter.list) (defclass list-reporter (reporter) ()) (defmethod fo...
null
https://raw.githubusercontent.com/fukamachi/prove/5d71f02795b89e36f34e8c7d50e69b67ec6ca2de/src/reporter/list.lisp
lisp
format/indent Do nothing
(in-package :cl-user) (defpackage prove.reporter.list (:use :cl :prove.report :prove.reporter) (:import-from :prove.color :with-color) (:export :list-reporter :report-expected-line)) (in-package :prove.reporter.list) (defclass list-reporter (reporter) ()) (defmethod fo...
c52e1abe1df112361b093d8fb16365e252385594d7444ffa6e4b0ba9322ccd11
reflex-frp/reflex
Headless.hs
# LANGUAGE LambdaCase # # LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeFamilies # {-# LANGUAGE ConstraintKinds #-} module Reflex.Host.Headless where import Control.Concurrent.Chan (newChan, readChan) import Control.Monad (unless) import Control.Monad.Fix (MonadFix, fix) import Control.Monad....
null
https://raw.githubusercontent.com/reflex-frp/reflex/04e43cda2e113eb9df5df5d13613a7b6744fd14f/src/Reflex/Host/Headless.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE ConstraintKinds # | Run a headless FRP network. Inside the action, you will most probably use classes to interface the FRP network with the outside world. Useful for testing. Each headless network runs on its own spider timeline. ^ The action to be run in the headless FRP network....
# LANGUAGE LambdaCase # # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # module Reflex.Host.Headless where import Control.Concurrent.Chan (newChan, readChan) import Control.Monad (unless) import Control.Monad.Fix (MonadFix, fix) import Control.Monad.IO.Class (MonadIO, liftIO) import Control.Monad.Primitive (Pr...
975751a05c35d62866ed55fa7998ac0505ffb4c2588aca39eceff59665b660b8
odo/ramjet
ramjet_app.erl
-module(ramjet_app). -behaviour(application). %% Application callbacks -export([start/2, stop/1]). %% =================================================================== %% Application callbacks %% =================================================================== start(_StartType, _StartArgs) -> ramjet_sup:st...
null
https://raw.githubusercontent.com/odo/ramjet/e0453169abf574f81045c88bd1a43c143d977049/src/ramjet_app.erl
erlang
Application callbacks =================================================================== Application callbacks ===================================================================
-module(ramjet_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> ramjet_sup:start_link(). stop(_State) -> ok.
467abe0bc22e740711a79fe28225f31d1e07837a25a217cac8f65e303c8dcdb9
Eventuria/demonstration-gsd
Command.hs
# LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE GADTs #-} # LANGUAGE InstanceSigs # {-# LANGUAGE RankNTypes #-} module Eventuria.GSD.Write.Model.Commands.Command where import Data.Text import GHC.Gene...
null
https://raw.githubusercontent.com/Eventuria/demonstration-gsd/5c7692b310086bc172d3fd4e1eaf09ae51ea468f/src/Eventuria/GSD/Write/Model/Commands/Command.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE GADTs # # LANGUAGE RankNTypes # Dynamic Types Pattern
# LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE DeriveGeneric # # LANGUAGE InstanceSigs # module Eventuria.GSD.Write.Model.Commands.Command where import Data.Text import GHC.Generics import Eventuria.GSD.Write.Model.Core import Eventuria.Libraries.CQRS.Write.Aggr...
b364452655202c7da77854aaec95e96f1941af56199a43220cf66fe5b7a4b823
gcv/appengine-magic
local_env_helpers.clj
(ns appengine-magic.local-env-helpers (:use appengine-magic.utils) (:import java.io.File [com.google.apphosting.api ApiProxy ApiProxy$Environment] [com.google.appengine.tools.development ApiProxyLocalFactory ApiProxyLocalImpl LocalServerEnvironment] com.google.appengine....
null
https://raw.githubusercontent.com/gcv/appengine-magic/facc9fe4945b3becd772d6b053844e572dcc1c73/src/appengine_magic/local_env_helpers.clj
clojure
Set datastore properties for optional features This installs a thread environment onto the REPL thread and allows App Engine API calls to work in the REPL.
(ns appengine-magic.local-env-helpers (:use appengine-magic.utils) (:import java.io.File [com.google.apphosting.api ApiProxy ApiProxy$Environment] [com.google.appengine.tools.development ApiProxyLocalFactory ApiProxyLocalImpl LocalServerEnvironment] com.google.appengine....
512261e0825b761c748ca0e7dec78d501446eb5d532f527d6bc00b5ef79dc512
yogthos/compojure-template
project.clj
(defproject {{name}} "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :dependencies [[org.clojure/clojure "1.10.0"] [compojure "1.6.1"] [hiccup "1.0.5"] [ring-server "0.5.0"]] :plugins [[lein-ring "0.12.5"]] :ring {:handler {{name}}.handler/ap...
null
https://raw.githubusercontent.com/yogthos/compojure-template/2a4bdcb9cdda972b7966bf7e5a5f9b61a2bbda47/src/leiningen/new/compojure_app/project.clj
clojure
(defproject {{name}} "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :dependencies [[org.clojure/clojure "1.10.0"] [compojure "1.6.1"] [hiccup "1.0.5"] [ring-server "0.5.0"]] :plugins [[lein-ring "0.12.5"]] :ring {:handler {{name}}.handler/ap...
72fb43f0fee087df7accb3f773fdf5ec5cfd0cc6c7b25a334d2cb21aa21cb886
racket/deinprogramm
random.rkt
#lang scheme/base (provide make-random-generator random-generator-next random-generator-split random-integer random-real) (require srfi/9) (define-syntax define-record-discloser (syntax-rules () ((define-record-discloser ?:type ?discloser) (values)))) (require scheme/include) (include "random.scm...
null
https://raw.githubusercontent.com/racket/deinprogramm/e9fb68455641ae7d409ddb48f5e584c9d014ef4f/deinprogramm-signature/deinprogramm/quickcheck/random.rkt
racket
#lang scheme/base (provide make-random-generator random-generator-next random-generator-split random-integer random-real) (require srfi/9) (define-syntax define-record-discloser (syntax-rules () ((define-record-discloser ?:type ?discloser) (values)))) (require scheme/include) (include "random.scm...
ce11e65ebb431ea4ddd23278176dafac6a645fc5d97f27777765dc1a0255b01d
klntsky/haskell-holes-th
Holes.hs
# LANGUAGE TemplateHaskell # # LANGUAGE CPP # -- | TIP solver for simply typed lambda calculus to automatically infer code from type definitions. module Language.Haskell.Holes ( hole ) where import Data.Function import Control.Monad.Trans.State import Control.Monad.Trans.Except impor...
null
https://raw.githubusercontent.com/klntsky/haskell-holes-th/f95bcad84805fd9ec7756574e8cf14688dc55ff8/src/Language/Haskell/Holes.hs
haskell
| TIP solver for simply typed lambda calculus to automatically infer code from type definitions. | Message type for code inference errors. | List of assumptions | Infinite list of unique variable names. # INLINE runEnv # If we are dealing with `acd -> csq`, extract pattern and context from the antecedent, then pr...
# LANGUAGE TemplateHaskell # # LANGUAGE CPP # module Language.Haskell.Holes ( hole ) where import Data.Function import Control.Monad.Trans.State import Control.Monad.Trans.Except import Control.Monad.Trans.Class import Control.Arrow import Control.Applic...
498b6af9653a070bd6aed3710543ada351abc04715e7ef3be9a352a56c10978c
soegaard/metapict
shapes.rkt
#lang racket/base ;;; Curves with common shapes. center ( 0,0 ) radius 1 center ( 0,0 ) diameter 1 ( radius 1/2 ) halfcircle ; upper part of fullcircle right part of halfcircle side length 1 , first quadrant arc ; arc of circle of radius r from f to t (f and t is in rad...
null
https://raw.githubusercontent.com/soegaard/metapict/47ae265f73cbb92ff3e7bdd61e49f4af17597fdf/metapict/shapes.rkt
racket
Curves with common shapes. upper part of fullcircle arc of circle of radius r from f to t (f and t is in radian) or: (arc c a b) arc with center c from a to b same, f and t in degrees circle with center (x0,y0) and radius r ellipse with center (x0,y0) and width w and height h sector of radius r with angles from...
#lang racket/base center ( 0,0 ) radius 1 center ( 0,0 ) diameter 1 ( radius 1/2 ) right part of halfcircle side length 1 , first quadrant ( arc - from p start stop radius ) arc starts at p angles are in degrees ellipse-arc rectangle given two opposite points , or point and diagonal vector ...
4cd3dbffb1de6014e5b99577db3c8426d9a3189f529374948f46b6415f54fc0c
bufferswap/ViralityEngine
thread-pool.lisp
(in-package #:virality) (global-vars:define-global-var =thread-pool= nil) ;; Implementation of THREAD-POOL (defun make-thread-pool () (let* ((worker-count (or =threads= =cpu-count=)) (thread-pool (make-instance 'thread-pool :worker-count worker-count))) (setf lparallel:*kernel* (lparallel:make-kernel ...
null
https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/core-early/thread-pool.lisp
lisp
Implementation of THREAD-POOL TODO: The below functions are not fully baked yet. The live recompilation queue needs some work to make it more generic and easier to work with. See
(in-package #:virality) (global-vars:define-global-var =thread-pool= nil) (defun make-thread-pool () (let* ((worker-count (or =threads= =cpu-count=)) (thread-pool (make-instance 'thread-pool :worker-count worker-count))) (setf lparallel:*kernel* (lparallel:make-kernel worker-count) =thread-p...
073d067c70d6f9e6d2030455ec3f838b10cb35a74126e63b5962a4dd5abecf8c
kaoskorobase/mescaline
Binding.hs
{-# LANGUAGE CPP , ExistentialQuantification , FlexibleInstances , MultiParamTypeClasses #-} module Mescaline.Pattern.Binding ( Binding , mkBinding , value , pattern , BindingMap , Bindings , empty , boolean , coord , event , scalar , HasBindings ( .. ) -- , ...
null
https://raw.githubusercontent.com/kaoskorobase/mescaline/13554fc4826d0c977d0010c0b4fb74ba12ced6b9/lib/mescaline-patterns/src/Mescaline/Pattern/Binding.hs
haskell
# LANGUAGE CPP , ExistentialQuantification , FlexibleInstances , MultiParamTypeClasses # , HasBindingMap(..) , ofType import Debug.Trace | Compiler environment. ^Bool pattern bindings. ^Coord pattern bindings. ^Event pattern bindings. ^Scalar pattern bindings. trace (...
module Mescaline.Pattern.Binding ( Binding , mkBinding , value , pattern , BindingMap , Bindings , empty , boolean , coord , event , scalar , HasBindings ( .. ) , pbinding , pbind ) where #include "Accessor.h" import Data.Accessor import qualified Data.IntMap as Map import ...
e3b89084bfa7d2260028b0b92e6d3fd0e96ed3d57de547672ce260580374842c
metosin/ring-swagger
core_test.clj
(ns ring.swagger.core-test (:require [midje.sweet :refer :all] [schema.core :as s] [ring.swagger.test-utils :as test-utils] [ring.swagger.core :as rsc] [linked.core :as linked])) (s/defschema OrderedSchema (linked/map :id Long ...
null
https://raw.githubusercontent.com/metosin/ring-swagger/0ef9046174dec0ebd4cbf97d6cc5c6846ef11996/test/ring/swagger/core_test.clj
clojure
Route generation Common
(ns ring.swagger.core-test (:require [midje.sweet :refer :all] [schema.core :as s] [ring.swagger.test-utils :as test-utils] [ring.swagger.core :as rsc] [linked.core :as linked])) (s/defschema OrderedSchema (linked/map :id Long ...
3c6eccd7bf739fd984c0e826c0f90a8ab645d6081bf1eff0eb0e06adaa2b07d1
stchang/mlish
mlish+gadt-tests.rkt
#lang mlish (require mlish/gadt rackunit/turnstile) (define-gadt (Expr A) [I :: Int -> (Expr Int)] [B :: Bool -> (Expr Bool)] [Add :: (Expr Int) (Expr Int) -> (Expr Int)] [Mul :: (Expr Int) (Expr Int) -> (Expr Int)] [Eq :: (Expr Int) (Expr Int) -> (Expr Bool)]) (check-type (I 10) : (Expr Int))...
null
https://raw.githubusercontent.com/stchang/mlish/1c79d71b686fc734b7994eb9d412f84d518a64b1/mlish-test/tests/mlish/mlish%2Bgadt-tests.rkt
racket
Int Bool Int Int Bool wont complain about missing clauses bc all Int cases covered Int Int wont complain about missing clauses bc all Int cases covered - TODO: extra cases ok? should this be err? Int cant get here Int wont complain about missing clauses exhaustiveness fail Int Int remainin...
#lang mlish (require mlish/gadt rackunit/turnstile) (define-gadt (Expr A) [I :: Int -> (Expr Int)] [B :: Bool -> (Expr Bool)] [Add :: (Expr Int) (Expr Int) -> (Expr Int)] [Mul :: (Expr Int) (Expr Int) -> (Expr Int)] [Eq :: (Expr Int) (Expr Int) -> (Expr Bool)]) (check-type (I 10) : (Expr Int))...
67a05b203bda5481933517b496f5f51c7c9beca9b60e91d48396d27ce9903ada
ghcjs/jsaddle-dom
MediaStream.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.MediaStream (newMediaStream, newMediaStream', newMediaStream'', getAudioTracks, getAudioTracks_, getVideoTr...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/MediaStream.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/webkitMediaStream.getTrackById Mozilla webkitMediaStream.getTrackById documentation> | <-US/docs/Web/API/webkitMediaStream.getTrackById Mozilla webkitMediaStream.getTrackById documentation> | <-US/docs/...
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.MediaStream (newMediaStream, newMediaStream', newMediaStream'', getAudioTracks, getAudioTracks_, getVideoTracks, getVideoTracks_, getTracks, getTracks_, getTrackById, getTrackById_, addTrack, remove...
f09559540764020c4696f92068ecca00eef74466cf1003b2d7feb3f9c3e833e3
mattsta/stripe-erlang
stripe_currency.erl
-*- mode : erlang;erlang - indent - level : 2;indent - tabs - mode : nil -*- ex : ft = erlang ts=2 sw=2 et -module(stripe_currency). -include("stripe.hrl"). -export([load/0, load/1]). -export([exists/1]). -export([stripe_price/3]). -export([stripe_price_all/2]). -export([convert/3]). -type currency_dict() :: dic...
null
https://raw.githubusercontent.com/mattsta/stripe-erlang/94e3dc3d34f586e3d7791ff1080a251d49005de3/src/stripe_currency.erl
erlang
-------------------------------------------------------------------- Currency Loading -------------------------------------------------------------------- -------------------------------------------------------------------- Currency Conversion -------------------------------------------------------------------- Get...
-*- mode : erlang;erlang - indent - level : 2;indent - tabs - mode : nil -*- ex : ft = erlang ts=2 sw=2 et -module(stripe_currency). -include("stripe.hrl"). -export([load/0, load/1]). -export([exists/1]). -export([stripe_price/3]). -export([stripe_price_all/2]). -export([convert/3]). -type currency_dict() :: dic...
3b2ade9bf524971d2f701701d940fedfa79d956a29bb4e7ef0dbda011fca2ff5
unisonweb/unison
Reflog.hs
# LANGUAGE ViewPatterns # module U.Codebase.Reflog where import Data.Bifoldable import Data.Bifunctor import Data.Bitraversable import Data.Time (UTCTime) data Entry causal text = Entry { time :: UTCTime, fromRootCausalHash :: causal, toRootCausalHash :: causal, reason :: text } instance Bifunctor E...
null
https://raw.githubusercontent.com/unisonweb/unison/695ac11b69c09d5b705ccbc0ad39ab04ff244ce3/codebase2/codebase/U/Codebase/Reflog.hs
haskell
# LANGUAGE ViewPatterns # module U.Codebase.Reflog where import Data.Bifoldable import Data.Bifunctor import Data.Bitraversable import Data.Time (UTCTime) data Entry causal text = Entry { time :: UTCTime, fromRootCausalHash :: causal, toRootCausalHash :: causal, reason :: text } instance Bifunctor E...
ef2908e3fc87162b44e7214be082fd86a106d07e5bfbdce117643f2661191c49
bsaleil/lc
etape3-make-vector.scm
(println (vector? (make-vector 0))) (println (vector-length (make-vector 0))) (println (vector? (make-vector 5))) (println (vector-length (make-vector 5))) ;#t 0 ;#t 5
null
https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/unit-tests/IFT3065/3/etape3-make-vector.scm
scheme
#t #t
(println (vector? (make-vector 0))) (println (vector-length (make-vector 0))) (println (vector? (make-vector 5))) (println (vector-length (make-vector 5))) 0 5
9ceeefdf33c03a94d89e9018a4c722986487e794a53979d7e71eee3f5359554b
death/zonquerer
resources.lisp
;;;; +----------------------------------------------------------------+ ;;;; | zonquerer | ;;;; +----------------------------------------------------------------+ | Copyright ( C ) 2021 death | ;;;; | ...
null
https://raw.githubusercontent.com/death/zonquerer/2a0ff29b9d974fc66addb9126f1638f4d5d071cb/resources.lisp
lisp
+----------------------------------------------------------------+ | zonquerer | +----------------------------------------------------------------+ | | | This program is free software: you can redist...
| Copyright ( C ) 2021 death | | modify it under the terms of the GNU Affero General Public | | License as published by the Free Software Foundation , either | | version 3 of the License , or ( at your option ) any later | (defpackage #:zonquerer/resources...
1f8d1ce9a469ad6a5929b6c4f08144208cdaa5c6fa036fc4e63e9008276ef692
AndrasKovacs/cubeval
IVarSet.hs
module IVarSet where import Data.Bits import qualified LvlSet as LS import Common import Interval newtype IVarSet = IVarSet LS.LvlSet deriving (Eq, Bits, Semigroup, Monoid, Show) via LS.LvlSet singleton :: IVar -> IVarSet singleton = coerce LS.singleton # inline singleton # insert :: IVar -> IVarSet -> IVarSet ...
null
https://raw.githubusercontent.com/AndrasKovacs/cubeval/daf5965b8d587af0f7619ae25b6f7e5880f89778/src/IVarSet.hs
haskell
# inline insert # # inline insertI # # inline delete # # inline member # # inline fromList # # inline foldl #
module IVarSet where import Data.Bits import qualified LvlSet as LS import Common import Interval newtype IVarSet = IVarSet LS.LvlSet deriving (Eq, Bits, Semigroup, Monoid, Show) via LS.LvlSet singleton :: IVar -> IVarSet singleton = coerce LS.singleton # inline singleton # insert :: IVar -> IVarSet -> IVarSet ...
8ff459224c501e4023ea9e28adc7f0ce696a7110c967bdaa520c13607d8e9184
clojure-emacs/refactor-nrepl
one.clj
(ns com.example.one (:require [com.example.two :as two :refer [foo]] [com.example.four :as four])) (defn bar [] (str "bar" (two/foo))) (defn from-registry [k] (k four/registry)) ;; Tries reproducing -emacs/clj-refactor.el/issues/485 (set! *warn-on-reflection* true)
null
https://raw.githubusercontent.com/clojure-emacs/refactor-nrepl/b237c209242eb6061aa458910a8f855f2d83e62b/testproject/src/com/example/one.clj
clojure
Tries reproducing -emacs/clj-refactor.el/issues/485
(ns com.example.one (:require [com.example.two :as two :refer [foo]] [com.example.four :as four])) (defn bar [] (str "bar" (two/foo))) (defn from-registry [k] (k four/registry)) (set! *warn-on-reflection* true)
d412fa0c4846b64db971003335a2c46cebb97315f01cc431debbaa3cf93cab27
97jaz/hamt
array.rkt
#lang racket/base (provide array-length array-ref array array-replace array-insert array-remove) (require racket/performance-hint) (require racket/require (for-syntax racket/base) (filtered-in (λ (name) (regexp-replace #rx"unsafe-" name "")) ...
null
https://raw.githubusercontent.com/97jaz/hamt/561cb6a447e9766dcb8abf2c01b30b87d91135f5/data/hamt/array.rkt
racket
#lang racket/base (provide array-length array-ref array array-replace array-insert array-remove) (require racket/performance-hint) (require racket/require (for-syntax racket/base) (filtered-in (λ (name) (regexp-replace #rx"unsafe-" name "")) ...
095893b0576ff0f4b638d8492bc713f49b432d5907a4bc7f4b2ec3590649f607
SchornacklabSLCU/amfinder
uIFileChooser.ml
AMFinder - ui / uIFileChooser.ml * * MIT License * Copyright ( c ) 2021 * * 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 witho...
null
https://raw.githubusercontent.com/SchornacklabSLCU/amfinder/1053045b431b9e9e85a7bcebea2e38cda92a8dcd/amfbrowser/sources/ui/uIFileChooser.ml
ocaml
Other commands do not seem to affect window size. Should not raise an error. * The open button is not active when no file is selected.
AMFinder - ui / uIFileChooser.ml * * MIT License * Copyright ( c ) 2021 * * 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 witho...
e13c07ae4323a1ada749ae69b794471eea3b7d5827fafdeb4d4697262d2301df
mlabs-haskell/ogmios-datum-cache
Alonzo.hs
module Block.Types.Alonzo ( TxOut (..), Transaction (..), RawTransaction (..), BlockHeader (..), Block (..), datumsInTransaction, ) where -- This module is intended to be imported qualified import Data.Aeson (FromJSON (parseJSON), withObject, (.:), (.:?)) import Data.ByteString (ByteString) import Data.In...
null
https://raw.githubusercontent.com/mlabs-haskell/ogmios-datum-cache/201891d9843c951f95bb3ae3c812b8799384bc71/src/Block/Types/Alonzo.hs
haskell
This module is intended to be imported qualified
module Block.Types.Alonzo ( TxOut (..), Transaction (..), RawTransaction (..), BlockHeader (..), Block (..), datumsInTransaction, ) where import Data.Aeson (FromJSON (parseJSON), withObject, (.:), (.:?)) import Data.ByteString (ByteString) import Data.Int (Int64) import Data.Map (Map) import Data.Text (Te...
3ee3ef22645e711e849197ddf751b850ffbea15941b14754398e7d5810e4352d
craigl64/clim-ccl
pkg.lisp
;; -*- mode: common-lisp; package: cl-user -*- ;; ;; ;; See the file LICENSE for the full license governing this code. ;; (defpackage :wnn (:use :clim-lisp :clim-utils :clim :silica :ff) (:import-from :excl #:if*) (:export #:jserver #:jserver-login #:jserver-host #:jserver-lang #:*jserver-timeout...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/wnn/pkg.lisp
lisp
-*- mode: common-lisp; package: cl-user -*- See the file LICENSE for the full license governing this code.
(defpackage :wnn (:use :clim-lisp :clim-utils :clim :silica :ff) (:import-from :excl #:if*) (:export #:jserver #:jserver-login #:jserver-host #:jserver-lang #:*jserver-timeout* #:open-jserver #:bunsetu-suu #:get-kanji #:get-yomi #:*wnn-unique* #:select-bunsetu #:bunsetu-kouho-...
1a02c3fe9791ac63329746370f27b0ce5f49e20e8956a276703f6c9e6d8af405
tweag/lagoon
AppSkeleton.hs
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -2.0 -- Unless required by applicable law or agreed to in writing, software distributed under th...
null
https://raw.githubusercontent.com/tweag/lagoon/2ef0440db810f4f45dbed160b369daf41d92bfa4/src/frontend/src/Lagoon/Client/AppSkeleton.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permiss...
Copyright 2020 Pfizer Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module Lagoon.Client.AppSkeleton ( SkeletonCmdline(..) , ClientConfig(..) , Port , appSkeleton , parseSkeletonCmdline , InvalidConf...
3cf1032c114f593ac1d851bde83f3074f44b81a6aef68442bbb7eb9bff759d34
ocaml/ocamlbuild
f.ml
(***********************************************************************) (* *) (* ocamlbuild *) (* *) , , projet Galliu...
null
https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/test/test3/f.ml
ocaml
********************************************************************* ocamlbuild ...
, , projet Gallium , INRIA Rocquencourt Copyright 2007 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with let _ = Unix.stat
ba52432559b4dc20166c5e74bbe6b291ccaa508202aa62f298aff4e5743419b3
JoeKennedy/fantasy
DraftSettings.hs
module Handler.League.DraftSettings where import Import import Handler.League.Setup import Handler.League.Layout ---------- -- Form -- ---------- draftSettingsForm :: UserId -> Entity Season -> Maybe DraftSettings -> Form DraftSettings draftSettingsForm currentUserId (Entity seasonId season) draftSettings extra = do...
null
https://raw.githubusercontent.com/JoeKennedy/fantasy/eb9dc9bf6074be5c5ca951e323c6497676424dda/Handler/League/DraftSettings.hs
haskell
-------- Form -- -------- ---------- Routes -- ---------- ----------- Helpers -- -----------
module Handler.League.DraftSettings where import Import import Handler.League.Setup import Handler.League.Layout draftSettingsForm :: UserId -> Entity Season -> Maybe DraftSettings -> Form DraftSettings draftSettingsForm currentUserId (Entity seasonId season) draftSettings extra = do let draftOrderTypeOptionsToU...
2d04aaf206b06c1303839e0ef115b6eb1216d371cca1b7821699974e2e9a55cb
ijvcms/chuanqi_dev
scene_hjzc_lib.erl
%%%------------------------------------------------------------------- @author zhengsiying ( C ) 2015 , < COMPANY > %%% @doc %%% 场景管理模块 %%% @end Created : 27 . 七月 2015 上午10:57 %%%------------------------------------------------------------------- -module(scene_hjzc_lib). -include("common.hrl"). -include("recor...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/scene/scene_hjzc_lib.erl
erlang
------------------------------------------------------------------- @doc 场景管理模块 @end ------------------------------------------------------------------- API callbacks ==================================================================== API functions =============================================================...
@author zhengsiying ( C ) 2015 , < COMPANY > Created : 27 . 七月 2015 上午10:57 -module(scene_hjzc_lib). -include("common.hrl"). -include("record.hrl"). -include("config.hrl"). -include("cache.hrl"). -include("proto.hrl"). -include("language_config.hrl"). -include("log_type_config.hrl"). -include("spec.hrl"). -expo...
365b144882676edc8dedfeed76d548dd6b9d76daff11c8004d97598873995009
Gandalf-/coreutils
Which.hs
module Coreutils.Which where -- which -- -- look for the arguments on $PATH import Control.Monad import Data.Maybe import System.Directory import System.Exit import Coreutils.Util data Which = Which instance Util Which where run _ = which which :: [String] ->...
null
https://raw.githubusercontent.com/Gandalf-/coreutils/59afa0254a40cd6c3a24396340dbd257ba691491/Coreutils/Which.hs
haskell
which look for the arguments on $PATH
module Coreutils.Which where import Control.Monad import Data.Maybe import System.Directory import System.Exit import Coreutils.Util data Which = Which instance Util Which where run _ = which which :: [String] -> IO () which args = do paths <- mapM fi...
1c6814e176653cb9942cfe931e569dcb8e1e541164c0abfdbc86362a8bb80678
emaphis/HtDP2e-solutions
10_03_lists_in_lists.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname 10_03_lists_in_lists) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeat...
null
https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/2-Arbitrarily-Large-Data/10-More-on-Lists/10_03_lists_in_lists.rkt
racket
about the language level of this file in a form that our tools can easily process. (read-file "ttt.txt") String -> String produces the content of file f as a string (define (read-file f) ...) String -> List-of-string produces the content of file f as a list of strings, (define (read-lines f) ...) String -> List-o...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname 10_03_lists_in_lists) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) HtDP 2e - 10 More on Lists 10.3 Lists in Lists ...
511b0ee4cb552fdbed1d436c06555cb7d5e53d2a85ed1d2133f0030cb5a19e00
sonowz/advent-of-code-haskell
Day22.hs
import Data.Function import Data.List import Data.Maybe import Data.Hashable import Data.Vector (Vector, (!), (!?)) import qualified Data.Vector as Vec import Debug.Trace inf :: Int inf = 10000000 lim :: Int -> Int lim = min inf ($$) :: a -> (a -> b) -> b ($$) = flip ($) updateB :: Vector (Vector a) -> (Int, Int) -...
null
https://raw.githubusercontent.com/sonowz/advent-of-code-haskell/6cec825c5172bbec687aab510e43832e6f2c0372/Y2018/Day22.hs
haskell
Start with torch Currently implemented by 'trace' function End with torch
import Data.Function import Data.List import Data.Maybe import Data.Hashable import Data.Vector (Vector, (!), (!?)) import qualified Data.Vector as Vec import Debug.Trace inf :: Int inf = 10000000 lim :: Int -> Int lim = min inf ($$) :: a -> (a -> b) -> b ($$) = flip ($) updateB :: Vector (Vector a) -> (Int, Int) -...
d687d7d362f3e593966dec05cfa6da86fe4a5e76795ee4028a9daffa862e87ca
ajk/specialist-server
core_test.clj
(ns specialist-server.core-test (:require [clojure.test :refer :all] [clojure.java.io :as io] [clojure.spec.alpha :as s] [clojure.pprint :refer [pprint]] [specialist-server.type :as t] [specialist-server.core :refer [server]])) (def schema-query (-> "test/_...
null
https://raw.githubusercontent.com/ajk/specialist-server/1997ab3746cb730ca882e338d43836db6c997663/test/specialist_server/core_test.clj
clojure
(ns specialist-server.core-test (:require [clojure.test :refer :all] [clojure.java.io :as io] [clojure.spec.alpha :as s] [clojure.pprint :refer [pprint]] [specialist-server.type :as t] [specialist-server.core :refer [server]])) (def schema-query (-> "test/_...
e88069768617637819e10a49534023cd0bbaf00275b0b3e8f361cfd0344ce390
technomancy/leiningen
temp.clj
(ns leiningen.new.{{artifact-id}} (:require [leiningen.new.templates :as tmpl] [leiningen.core.main :as main])) (def render (tmpl/renderer "{{sanitized}}")) (defn {{artifact-id}} "FIXME: write documentation" [name] (let [data {:name name :sanitized (tmpl/name-to-path name)}] (mai...
null
https://raw.githubusercontent.com/technomancy/leiningen/24fb93936133bd7fc30c393c127e9e69bb5f2392/resources/leiningen/new/template/temp.clj
clojure
(ns leiningen.new.{{artifact-id}} (:require [leiningen.new.templates :as tmpl] [leiningen.core.main :as main])) (def render (tmpl/renderer "{{sanitized}}")) (defn {{artifact-id}} "FIXME: write documentation" [name] (let [data {:name name :sanitized (tmpl/name-to-path name)}] (mai...
6643ad57f9d0710c0801556b345ca05038d3b12c0aded7dcca13db5cc883cb18
droundy/iolaus-broken
PatchChoices.hs
Copyright ( C ) 2002 - 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 , or ( at your option ) -- any later version. -- -- This program is distributed in the hope ...
null
https://raw.githubusercontent.com/droundy/iolaus-broken/e40c001f3c5a106bf39f437d6349858e7e9bf51e/Iolaus/PatchChoices.hs
haskell
This program is free software; you can redistribute it and/or modify any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more...
Copyright ( C ) 2002 - 2004 it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 , or ( at your option ) You should have received a copy of the GNU General Public License the Free Software Foundation , Inc. , 51 Franklin Street , Fifth Floor , ...
49b540cbf86da5b5e1a78ac09abdff26fceb9187eae31eb51ad06bf64b48ec39
AlexanderMann/unclogging
unclogging_test.clj
(ns alexandermann.unclogging-test "Herein, wherever we are setting up tests to look for output, we use FATAL level. This is not because things are _actually_ fatal but rather that when comparing logging levels, and looking to avoid filtering due to, we wish to use the largest such level." (:require [alexander...
null
https://raw.githubusercontent.com/AlexanderMann/unclogging/3cb60c8929175de1970a15cd53cd84fb73dc6e95/test/alexandermann/unclogging_test.clj
clojure
(ns alexandermann.unclogging-test "Herein, wherever we are setting up tests to look for output, we use FATAL level. This is not because things are _actually_ fatal but rather that when comparing logging levels, and looking to avoid filtering due to, we wish to use the largest such level." (:require [alexander...
963ca8bb346d1a5ea60fc02fb81fc548782b0b9699542874051c27fdb3dff1fd
AccelerateHS/accelerate-examples
Main.hs
# LANGUAGE PatternGuards # An implementation of PageRank based off of -- implementation (/). -- import Config import Count import Rank import Data.Array.Accelerate.Examples.Internal import Control.Monad import Data.Label ( get ) main :: IO () main = do beg...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/pagerank/Main.hs
haskell
implementation (/).
# LANGUAGE PatternGuards # An implementation of PageRank based off of import Config import Count import Rank import Data.Array.Accelerate.Examples.Internal import Control.Monad import Data.Label ( get ) main :: IO () main = do beginMonitoring (conf, opts...
98e37a6f2649e091f11bd72cb70c162d912a14c9fae999669e64d5082ba5130a
gorillalabs/neo4j-clj
20171023123241_renameSeedUser.clj
(ns joplin.neo4j.migrators.20171023123241-renameSeedUser (:use [joplin.neo4j.database]) (:require [neo4j-clj.core :refer :all])) (defquery alter-seed-user-name "MATCH (u:SeedUser) SET u.name=$name") (defn up [db] (with-connection db session (alter-seed-user-name session {:name "MigratedSeeder"}...
null
https://raw.githubusercontent.com/gorillalabs/neo4j-clj/f3f5e1632a23de06d4dd4b7b680c8ab06a7c10fc/test/joplin/neo4j/migrators/20171023123241_renameSeedUser.clj
clojure
(ns joplin.neo4j.migrators.20171023123241-renameSeedUser (:use [joplin.neo4j.database]) (:require [neo4j-clj.core :refer :all])) (defquery alter-seed-user-name "MATCH (u:SeedUser) SET u.name=$name") (defn up [db] (with-connection db session (alter-seed-user-name session {:name "MigratedSeeder"}...
ee80f3599fc5669cbdd69a5adfe20b8d952d0e6fd30942c81b061705de954434
mbenke/zpf2013
Prim.hs
module MyParsec2c.Prim where import Control.Monad type ParseError = String unexpected :: String -> ParseError unexpected s = "unexpected " ++ s expected :: String -> ParseError expected s = "expected " ++ s unknownError :: ParseError unknownError = "Unknown error" type State = [Char] data Reply a = Ok a State | Err...
null
https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/Parse1/MyParsec2c/Prim.hs
haskell
or check (p EOF)
module MyParsec2c.Prim where import Control.Monad type ParseError = String unexpected :: String -> ParseError unexpected s = "unexpected " ++ s expected :: String -> ParseError expected s = "expected " ++ s unknownError :: ParseError unknownError = "Unknown error" type State = [Char] data Reply a = Ok a State | Err...
bb19ed099632b9211404c3bfb4acb1babac3ccec2126d7440ac27aec4a6c32d1
JohnLato/language-objc
Tokens.hs
{-# OPTIONS #-} ----------------------------------------------------------------------------- -- | -- Module : Language.ObjC.Parser.Tokens Copyright : [ 1999 .. 2004 ] 2005 2012 -- License : BSD-style -- Maintainer : -- Portability : portable -- -- C To...
null
https://raw.githubusercontent.com/JohnLato/language-objc/8e9455f15b32229f7caf13769c8945d8544c79f0/src/Language/ObjC/Parser/Tokens.hs
haskell
# OPTIONS # --------------------------------------------------------------------------- | Module : Language.ObjC.Parser.Tokens License : BSD-style Maintainer : Portability : portable C Tokens for the C lexer. --------------------------------------------------------------------------- token def...
Copyright : [ 1999 .. 2004 ] 2005 2012 module Language.ObjC.Parser.Tokens ( CToken(..) ,posLenOfTok ,GnuCTok(..) ,ObjCTok(..) ) where import Language.ObjC.Data.Position (Position, Pos(..) ,PosLength, unPosLength) import La...
db826c34671b9df5528c9140ec77705ec9c842b389fd6f48d8f93bf6901006f4
HaskellZhangSong/Introduction_to_Haskell_2ed_source
Parser.hs
# LANGUAGE FlexibleContexts , UndecidableInstances # import Control.Arrow import qualified Control.Category as Cat import Data.List (union) data StaticParser s = SP Bool [s] newtype DynamicParser s a b = DP {runDP :: (a, [s]) -> (b, [s])} data Parser s a b = P {static :: (StaticParser s) ,dynam...
null
https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell_2ed_source/140c50fdccfe608fe499ecf2d8a3732f531173f5/C23/Parser.hs
haskell
# LANGUAGE FlexibleContexts , UndecidableInstances # import Control.Arrow import qualified Control.Category as Cat import Data.List (union) data StaticParser s = SP Bool [s] newtype DynamicParser s a b = DP {runDP :: (a, [s]) -> (b, [s])} data Parser s a b = P {static :: (StaticParser s) ,dynam...
65360daa84c95b806ae69daa09b2ede9eaed0af834253b4fae4a24458f9c8a89
falsetru/htdp
32.3.1.scm
#lang racket (provide example-board) ; board is (vectorof (vectorof hole)) ; hole is bool (true: hole, false: peg) move is ( listof 3 pos ) ; start-position, mid-point end-position pos is ( listof 2 numbers ) (define example-board (vector (vector #f) (vector #f #f) (vector #f #f...
null
https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/32/32.3.1.scm
scheme
board is (vectorof (vectorof hole)) hole is bool (true: hole, false: peg) start-position, mid-point end-position
#lang racket (provide example-board) move is ( listof 3 pos ) pos is ( listof 2 numbers ) (define example-board (vector (vector #f) (vector #f #f) (vector #f #f #t) (vector #f #f #f #f))) (define example-move '((0 0) (1 1) (2 2)))
c785267504abf6a742fb8d9bf31812c3645fde287d63d087da5ebcddca614bb8
binghe/fm-plugin-tools
color-objects.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : FM - PLUGIN - TOOLS ; Base : 10 -*- $ Header : /usr / local / cvsrep / fm - plugin - tools / color - objects.lisp , v 1.5 2010/07/22 09:38:05 edi Exp $ Copyright ( c ) 2006 - 2010 , Dr. . All rights reserved . ;;; Redistribution and use in source and bina...
null
https://raw.githubusercontent.com/binghe/fm-plugin-tools/e6caa97c7827726b0c1f5c6fa0cf68688a63edc4/color-objects.lisp
lisp
Syntax : COMMON - LISP ; Package : FM - PLUGIN - TOOLS ; Base : 10 -*- 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 conditio...
$ Header : /usr / local / cvsrep / fm - plugin - tools / color - objects.lisp , v 1.5 2010/07/22 09:38:05 edi Exp $ Copyright ( c ) 2006 - 2010 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABIL...
8cf082072cf7f371a3aeacd835e0de6d24b28107939f2ceb0a6a98faa3f79b9f
melange-re/melange
gpr_1484.ml
type t external clearNodeValue : t -> (_ [@bs.as {json|null|json}]) -> unit = "nodeValue" [@@bs.set] (* TODO: more test cases *) (* external clearNodeValue2 : *) (* t -> (_ [@bs.as {json|null|json}]) -> int -> unit = *) (* "nodeValue" [@@bs.set] *) let test x = clearNodeValue x
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/gpr_1484.ml
ocaml
TODO: more test cases external clearNodeValue2 : t -> (_ [@bs.as {json|null|json}]) -> int -> unit = "nodeValue" [@@bs.set]
type t external clearNodeValue : t -> (_ [@bs.as {json|null|json}]) -> unit = "nodeValue" [@@bs.set] let test x = clearNodeValue x
ebdeb65d89486d2eec35ee13d28358838b484b996aad090a1b33c901fcc93e45
Carnap/Carnap
Util.hs
module Carnap.Calculi.NaturalDeduction.Util where import Carnap.Calculi.NaturalDeduction.Syntax import Text.Parsec import Data.Map (Map,(!),keys) parseRuleTable :: Map String (Parsec String u [r]) -> (Parsec String u [r]) parseRuleTable m = do r <- choice (map (try . string) (keys m)) m ! r
null
https://raw.githubusercontent.com/Carnap/Carnap/99546e377008247c5a1e8de1e294aac8e22584d7/Carnap/src/Carnap/Calculi/NaturalDeduction/Util.hs
haskell
module Carnap.Calculi.NaturalDeduction.Util where import Carnap.Calculi.NaturalDeduction.Syntax import Text.Parsec import Data.Map (Map,(!),keys) parseRuleTable :: Map String (Parsec String u [r]) -> (Parsec String u [r]) parseRuleTable m = do r <- choice (map (try . string) (keys m)) m ! r
d2fea076a47398b9c802093308bca793ef13f4ef814ac25b44e471c1faca038f
typelead/intellij-eta
IFileElementType.hs
module FFI.Com.IntelliJ.Psi.Tree.IFileElementType where import P import FFI.Com.IntelliJ.Lang.Language data {-# CLASS "com.intellij.psi.tree.IFileElementType" #-} IFileElementType = IFileElementType (Object# IFileElementType) deriving Class foreign import java unsafe "@new" newIFileElementType :: (a <: Languag...
null
https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/main/eta/FFI/Com/IntelliJ/Psi/Tree/IFileElementType.hs
haskell
# CLASS "com.intellij.psi.tree.IFileElementType" #
module FFI.Com.IntelliJ.Psi.Tree.IFileElementType where import P import FFI.Com.IntelliJ.Lang.Language IFileElementType = IFileElementType (Object# IFileElementType) deriving Class foreign import java unsafe "@new" newIFileElementType :: (a <: Language) => a -> Java b IFileElementType
9cc3e86c4cac9321671faa732188e580e7f461442cb5103360bbadf56b8cc44f
tomprimozic/type-systems
propagate.ml
Parts of this file are based on code from reference implementation of HMF , available at ( as of 2014/04/04 ) -us/um/people/daan/download/hmf-prototype-ref.zip Parts of this file are based on code from Daan Leijen's reference implementation of HMF, available at (as of 2014/04/04) -us/um/people/daan/dow...
null
https://raw.githubusercontent.com/tomprimozic/type-systems/4403586a897ee94cb8f0de039aeee8ef1ecef968/first_class_polymorphism/propagate.ml
ocaml
equivalent to `some[a] a`
Parts of this file are based on code from reference implementation of HMF , available at ( as of 2014/04/04 ) -us/um/people/daan/download/hmf-prototype-ref.zip Parts of this file are based on code from Daan Leijen's reference implementation of HMF, available at (as of 2014/04/04) -us/um/people/daan/dow...