_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 |
|---|---|---|---|---|---|---|---|---|
367a1dd049e3a346648491bc40fd3a7ad096f7a60eb08184f3e5d6ea5377a3f8 | lispbuilder/lispbuilder | procedural-primitives.lisp |
(in-package #:rm)
(defclass procedural-primitive (primitive)())
(defclass sphere-primitive (procedural-primitive)()
(:default-initargs
:fp (rm-cffi::rm-Primitive-New :rm-spheres)))
(defclass cone-primitive (procedural-primitive)()
(:default-initargs
:fp (rm-cffi::rm-Primitive-New :rm-cones)))
(defclass c... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-openrm/openrm/procedural-primitives.lisp | lisp |
(in-package #:rm)
(defclass procedural-primitive (primitive)())
(defclass sphere-primitive (procedural-primitive)()
(:default-initargs
:fp (rm-cffi::rm-Primitive-New :rm-spheres)))
(defclass cone-primitive (procedural-primitive)()
(:default-initargs
:fp (rm-cffi::rm-Primitive-New :rm-cones)))
(defclass c... | |
133180a5a6fdc786cf675dfed25f6050da43f8e9795f0785f9fe46d6c2e74685 | kindista/kindista | conversations.lisp | Copyright 2012 - 2015 CommonGoods Network , Inc.
;;;
This file is part of Kindista .
;;;
Kindista is free software : you can redistribute it and/or 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 you... | null | https://raw.githubusercontent.com/kindista/kindista/60da1325e628841721200aa00e4de5f9687c0adb/src/features/conversations.lisp | lisp |
(at your option) any later version.
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
License for more details.
(when (eq type :conversation)
(html (:a :href (strcat "/conversations/" id "/leave") "leave conversation")))
removed unti... | Copyright 2012 - 2015 CommonGoods Network , Inc.
This file is part of Kindista .
Kindista is free software : you can redistribute it and/or 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
Kindista is distr... |
d50084a93ccfc350afbfa8350ab1bc6345bb7e580f51bf2913adbb9429e167ec | Factual/skuld | bin.clj | (ns skuld.bin
(:use [clj-helix.logging :only [mute]]
[clojure.tools.cli :only [cli]]
clojure.tools.logging)
(:require [skuld.admin :as admin]
[skuld.node :as node]
[skuld.flake :as flake]
[skuld.http])
(:import (sun.misc Signal SignalHandler))
(:gen-class))
(... | null | https://raw.githubusercontent.com/Factual/skuld/79599f9b13aee35c680183d6bf9e2fcbfde1d7c7/src/skuld/bin.clj | clojure | Cluster configuration | (ns skuld.bin
(:use [clj-helix.logging :only [mute]]
[clojure.tools.cli :only [cli]]
clojure.tools.logging)
(:require [skuld.admin :as admin]
[skuld.node :as node]
[skuld.flake :as flake]
[skuld.http])
(:import (sun.misc Signal SignalHandler))
(:gen-class))
(... |
253b701898ab70c3f8efbf3b9b205c51fe72139a69248b9ccfdea59e1696da38 | flodihn/NextGen | recv_loop.erl | -module(recv_loop).
-export([
recv_loop/3
]).
-include("state.hrl").
-include("protocol.hrl").
-define(TIMEOUT, 200).
recv_loop(Owner, Socket, #recv_state{id=Id, bytes_recv=BytesRecv,
cmds_recv=CmdsRecv, resp_times=RespTimes,
debug_output=DebugOutput} = State) ->
Since we do n't need flow controle... | null | https://raw.githubusercontent.com/flodihn/NextGen/3da1c3ee0d8f658383bdf5fccbdd49ace3cdb323/TestSuite/src/recv_loop.erl | erlang | data is received.
io:format("Got ping ms: ~p.~n", [Diff/1000]),
Diff = binary_time_to_diff(BinTime),
io:format("OBJ_DIR ms: ~p.~n", [Diff/1000]),
io:format("OBJ_SPEED ms: ~p.~n", [Diff/1000]), | -module(recv_loop).
-export([
recv_loop/3
]).
-include("state.hrl").
-include("protocol.hrl").
-define(TIMEOUT, 200).
recv_loop(Owner, Socket, #recv_state{id=Id, bytes_recv=BytesRecv,
cmds_recv=CmdsRecv, resp_times=RespTimes,
debug_output=DebugOutput} = State) ->
Since we do n't need flow controle... |
54afcbd7eb5e056b79f3dfab7911751d4007f353a948e7396fbba4618b55326a | 8c6794b6/haskell-sc-scratch | TTF.hs | # LANGUAGE NoMonomorphismRestriction #
|
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : :
Stability : unstable
Portability : non - portable
Lecture : < -final/course/TTF.hs >
Module : $Header$
CopyRight : (c) 8c6794b6
License : BSD3
Maintainer :
Stability : ... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/Oleg/TTF/Course/TTF.hs | haskell | th3_eval :: (Int -> Int) -> Int
Int -> Int -> Int | # LANGUAGE NoMonomorphismRestriction #
|
Module : $ Header$
CopyRight : ( c ) 8c6794b6
License : :
Stability : unstable
Portability : non - portable
Lecture : < -final/course/TTF.hs >
Module : $Header$
CopyRight : (c) 8c6794b6
License : BSD3
Maintainer :
Stability : ... |
07f8b90f88b04fb8a6c391f527e23efee24f13e12c38d89941301a01cc341d9c | careercup/CtCI-6th-Edition-Clojure | chapter_2_q6.clj | (ns ^{:author "Leeor Engel"}
chapter-2.chapter-2-q6)
(defn palindrome? [l]
(= l (reverse l))) | null | https://raw.githubusercontent.com/careercup/CtCI-6th-Edition-Clojure/ef151b94978af82fb3e0b1b0cd084d910870c52a/src/chapter_2/chapter_2_q6.clj | clojure | (ns ^{:author "Leeor Engel"}
chapter-2.chapter-2-q6)
(defn palindrome? [l]
(= l (reverse l))) | |
056989c7d3357754a484109ab46ee7eb7888e6696282cdfa1adc587d1fa22498 | nakagami/efirebirdsql | efirebirdsql_conv_tests.erl | The MIT License ( MIT )
Copyright ( c ) 2021 Hajime Nakagami< >
-module(efirebirdsql_conv_tests).
-include_lib("eunit/include/eunit.hrl").
params_to_blr_test() ->
Firebird 2.5
{Blr, Value} = efirebirdsql_conv:params_to_blr(11, maps:new(), [nil]),
?assertEqual("0502040002000E00000700FF4C", efirebirdsql_... | null | https://raw.githubusercontent.com/nakagami/efirebirdsql/ab14ff8b8e4d856086d828a7f5b44f4b8436dce5/test/efirebirdsql_conv_tests.erl | erlang | The MIT License ( MIT )
Copyright ( c ) 2021 Hajime Nakagami< >
-module(efirebirdsql_conv_tests).
-include_lib("eunit/include/eunit.hrl").
params_to_blr_test() ->
Firebird 2.5
{Blr, Value} = efirebirdsql_conv:params_to_blr(11, maps:new(), [nil]),
?assertEqual("0502040002000E00000700FF4C", efirebirdsql_... | |
1886945a63a6f27539df74291367b49b423a80c4dbce47cde1822dd782fd296d | cirodrig/triolet | Driver.hs |
module SystemF.Datatypes.Driver
(overriddenSerializerTypes,
computeDataTypeInfo,
addLayoutVariablesToTypeEnvironment
)
where
import Control.DeepSeq
import Control.Monad
import Control.Monad.Trans
import qualified Data.IntMap as IntMap
import Data.Maybe
import Debug.Trace
import Text.Pret... | null | https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/SystemF/Datatypes/Driver.hs | haskell | | Type constructors that do not use auto-generated serializer and
deserializer functions. The serializer and deserializer functions
are explicitly defined.
List of (tycon, (serializer, deserializer)) tuples.
This information is used when generating serializer/deserializer code.
| Primitive value types. ... |
module SystemF.Datatypes.Driver
(overriddenSerializerTypes,
computeDataTypeInfo,
addLayoutVariablesToTypeEnvironment
)
where
import Control.DeepSeq
import Control.Monad
import Control.Monad.Trans
import qualified Data.IntMap as IntMap
import Data.Maybe
import Debug.Trace
import Text.Pret... |
026f6bed2a1fbbf6b2909ceeec8e9653cb84964e7f2e451c30e1f9ea46d0f3df | fccm/glMLite | wrap.ml | Copyright ( c ) 1993 - 1997 , Silicon Graphics , Inc.
* ALL RIGHTS RESERVED
* Permission to use , copy , modify , and distribute this software for
* any purpose and without fee is hereby granted , provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and t... | null | https://raw.githubusercontent.com/fccm/glMLite/c52cd806909581e49d9b660195576c8a932f6d33/RedBook-Samples/wrap.ml | ocaml | Create checkerboard texture
escape | Copyright ( c ) 1993 - 1997 , Silicon Graphics , Inc.
* ALL RIGHTS RESERVED
* Permission to use , copy , modify , and distribute this software for
* any purpose and without fee is hereby granted , provided that the above
* copyright notice appear in all copies and that both the copyright notice
* and t... |
05258324799bd6e1d659609db6542c3f2763d5eaa03122271a5e52c5a37317b8 | liquidz/clj-jwt | sign.clj | (ns clj-jwt.sign
(:require
[clj-jwt.base64 :refer [url-safe-encode-str url-safe-decode]]
[crypto.equality :refer [eq?]]))
HMAC
(defn- hmac-sign
"Function to sign data with HMAC algorithm."
[alg key body & {:keys [charset] :or {charset "UTF-8"}}]
(let [hmac-key (javax.crypto.spec.SecretKeySpec. (.get... | null | https://raw.githubusercontent.com/liquidz/clj-jwt/8a339824504593c417eca508ca31539202108e32/src/clj_jwt/sign.clj | clojure | (ns clj-jwt.sign
(:require
[clj-jwt.base64 :refer [url-safe-encode-str url-safe-decode]]
[crypto.equality :refer [eq?]]))
HMAC
(defn- hmac-sign
"Function to sign data with HMAC algorithm."
[alg key body & {:keys [charset] :or {charset "UTF-8"}}]
(let [hmac-key (javax.crypto.spec.SecretKeySpec. (.get... | |
58aca9b51adfd151cfaaaa7c52d678fedf813b72a2fff905a5a08c3b762d4fa8 | brawnski/git-annex | Fix.hs | git - annex command
-
- Copyright 2010 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.Fix where
import Control.Monad.State (liftIO)
import System.Posix.Files
import System.Directory... | null | https://raw.githubusercontent.com/brawnski/git-annex/8b847517a810d384a79178124b9766141b89bc17/Command/Fix.hs | haskell | Fixes the symlink to an annexed file. | git - annex command
-
- Copyright 2010 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Command.Fix where
import Control.Monad.State (liftIO)
import System.Posix.Files
import System.Directory... |
bb81a3dd1276c20f5654efb9065c528f160c3d2eb9a63946d24d098907c5dcb7 | malcolmreynolds/GSLL | bernoulli.lisp | distribution
, Sat Nov 25 2006 - 16:59
Time - stamp : < 2009 - 05 - 26 22:56:49EDT bernoulli.lisp >
$ Id$
(in-package :gsl)
(defmfun sample
((generator random-number-generator) (type (eql 'bernoulli))
&key probability)
"gsl_ran_bernoulli"
(((mpointer generator) :pointer) (probability :double))... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/random/bernoulli.lisp | lisp | Examples and unit test | distribution
, Sat Nov 25 2006 - 16:59
Time - stamp : < 2009 - 05 - 26 22:56:49EDT bernoulli.lisp >
$ Id$
(in-package :gsl)
(defmfun sample
((generator random-number-generator) (type (eql 'bernoulli))
&key probability)
"gsl_ran_bernoulli"
(((mpointer generator) :pointer) (probability :double))... |
8fd87db257808ab1b57f3c691cc69a171d304cd068445b46d98f46d40607da70 | robrix/sequoia | Biadjunction.hs | # LANGUAGE FunctionalDependencies #
module Sequoia.Biadjunction
( -- * Biadjunctions
Biadjunction(..)
-- * Defaults
, bileftAdjunctDisjConj
, birightAdjunctDisjConj
, leftAdjunctBiadjunction
, rightAdjunctBiadjunction
) where
import Data.Bifunctor
import Sequoia.Bifunctor.Join
import Sequoia.Birepresentable
import... | null | https://raw.githubusercontent.com/robrix/sequoia/79bbcb79531cc110253f00ab4b2b529dae00b2eb/src/Sequoia/Biadjunction.hs | haskell | * Biadjunctions
* Defaults
Biadjunctions
Defaults | # LANGUAGE FunctionalDependencies #
module Sequoia.Biadjunction
Biadjunction(..)
, bileftAdjunctDisjConj
, birightAdjunctDisjConj
, leftAdjunctBiadjunction
, rightAdjunctBiadjunction
) where
import Data.Bifunctor
import Sequoia.Bifunctor.Join
import Sequoia.Birepresentable
import Sequoia.Conjunction
import Sequoia.D... |
8c80815b4d8b8da2e11cc4421f0ad33b880843808fe387369dd238b6f22ea2a4 | nervous-systems/iris-examples | common.clj | (ns iris-examples.common
(:require [cognitect.transit :as transit]
[clojure.tools.cli :as cli])
(:import [java.io ByteArrayOutputStream ByteArrayInputStream]))
(def topic "iris-examples/pub-sub/events")
(def bit-service "bit-service")
(defn pack-message [m]
(let [o (ByteArrayOutputStream.)]
(tra... | null | https://raw.githubusercontent.com/nervous-systems/iris-examples/37d8a3b13047ee0630f0ca975280406ed0533e58/src/iris_examples/common.clj | clojure | (ns iris-examples.common
(:require [cognitect.transit :as transit]
[clojure.tools.cli :as cli])
(:import [java.io ByteArrayOutputStream ByteArrayInputStream]))
(def topic "iris-examples/pub-sub/events")
(def bit-service "bit-service")
(defn pack-message [m]
(let [o (ByteArrayOutputStream.)]
(tra... | |
578ddca37b307c0b37c0549f09ce14cfbde46392e6856f349841c5d8ae1caf37 | lley154/cardano-lottery | Main-scripts.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE StandaloneDeriving #
{-# LANGUAGE TypeFamilies #-}
module Main
( main
, ExportT... | null | https://raw.githubusercontent.com/lley154/cardano-lottery/e7f714472d869b336acf4c90303319498e493b4e/scripts/Main-scripts.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
| `uncurry3` converts a curried function to a function on triples. | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
module Main
( main
, ExportTx(..)
) where
import qualified Cardano.Api as C
import Data.Default (Default (..))
impor... |
008f0b35ac9cca0e3e0760774d7affc8b9d692ee5240f0165d5c1a23363215de | fugue/fregot | Comment.hs | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
module Fregot.Lex... | null | https://raw.githubusercontent.com/fugue/fregot/c3d87f37c43558761d5f6ac758d2f1a4117adb3e/lib/Fregot/Lexer/Comment.hs | haskell | |
Copyright : ( c ) 2020 Fugue , Inc.
License : Apache License , version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
Copyright : (c) 2020 Fugue, Inc.
License : Apache License, version 2.0
Maintainer :
Stability : experimental
Portability : POSIX
-}
module Fregot.Lex... | |
94f2f12f7fa77d23a8c580ce7117b608afdac47139bafcc7eb74c828d00a9c1a | danielholmes/wolf3d-haskell | Main.hs | module Wolf3D.Main (
createMain
) where
import Wolf3D.Runner
import Wolf3D.UI
import Wolf3D.WorldData
import Wolf3D.Display.Data
import qualified SDL
import Data.StateVar (($=))
type Scale = Int
createMain :: Scale -> World -> (SDL.Renderer -> IO (SimRun -> IO ())) -> IO ()
createMain s initWorld createRender = do... | null | https://raw.githubusercontent.com/danielholmes/wolf3d-haskell/de934f657f1fb4351591448bb4e25aaa4923571f/src/Wolf3D/Main.hs | haskell | Original native size | module Wolf3D.Main (
createMain
) where
import Wolf3D.Runner
import Wolf3D.UI
import Wolf3D.WorldData
import Wolf3D.Display.Data
import qualified SDL
import Data.StateVar (($=))
type Scale = Int
createMain :: Scale -> World -> (SDL.Renderer -> IO (SimRun -> IO ())) -> IO ()
createMain s initWorld createRender = do... |
940852240ddfbea44be16b3650c20df3c4e9a35c111cbec6936d5b5f5cd670c4 | klutometis/clrs | 11.1-3.scm | (require-extension
syntax-case
check
vector-lib)
(require '../11.1/section)
(require '../10.2/section)
(import section-11.1)
(import section-10.2)
(let ((table (make-mda-table 2))
(e1 (make-da-element 0 (make-dlink 1 #f #f)))
(e2 (make-da-element 0 (make-dlink 2 #f #f)))
(e3 (make-da-element 1 (mak... | null | https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/11.1/11.1-3.scm | scheme | (require-extension
syntax-case
check
vector-lib)
(require '../11.1/section)
(require '../10.2/section)
(import section-11.1)
(import section-10.2)
(let ((table (make-mda-table 2))
(e1 (make-da-element 0 (make-dlink 1 #f #f)))
(e2 (make-da-element 0 (make-dlink 2 #f #f)))
(e3 (make-da-element 1 (mak... | |
69b37039968a975d43bcd00f3eac9db75b22faa16a8a334edab0036eb38b7c90 | aliter/aliter | zone_master.erl | -module(zone_master).
-behaviour(gen_server).
-include("include/records.hrl").
-export([start_link/1]).
-export([
init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-export([tick/0]).
-record(state, {npc_id, servers}).
start_link(Conf) ->
log:debug("Star... | null | https://raw.githubusercontent.com/aliter/aliter/03c7d395d5812887aecdca20b16369f8a8abd278/src/zone/zone_master.erl | erlang | -module(zone_master).
-behaviour(gen_server).
-include("include/records.hrl").
-export([start_link/1]).
-export([
init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-export([tick/0]).
-record(state, {npc_id, servers}).
start_link(Conf) ->
log:debug("Star... | |
e787f389a7bcfa5aaa2186d5f205026425a4ff42c6ccc6f2b75b125d2d561228 | mirage/ptt-deployer | logging.ml | module Metrics = struct
open Prometheus
let namespace = "baseimages"
let subsystem = "logs"
let inc_messages =
let help = "Total number of messages logged" in
let c =
Counter.v_labels ~label_names:[ "level"; "src" ] ~help ~namespace
~subsystem "messages_total"
in
fun lvl src ->
... | null | https://raw.githubusercontent.com/mirage/ptt-deployer/9a2bd4464c6dbc189ba1331adeaedc73defe01d2/src/logging.ml | ocaml | module Metrics = struct
open Prometheus
let namespace = "baseimages"
let subsystem = "logs"
let inc_messages =
let help = "Total number of messages logged" in
let c =
Counter.v_labels ~label_names:[ "level"; "src" ] ~help ~namespace
~subsystem "messages_total"
in
fun lvl src ->
... | |
44155c5723f0e9b7702a1fde79c717a27d1eeb673523ffd5f384324b5d922d67 | Gandalf-/coreutils | LsSpec.hs | module LsSpec where
import Coreutils.Ls
import Data.Maybe
import Data.Time
import Test.Hspec
spec :: Spec
spec = parallel $ do
describe "sorting" $ do
it "defaults" $ do
let rt = getRuntime defaultOptions
sorter rt [entry "b", entry "a", entr... | null | https://raw.githubusercontent.com/Gandalf-/coreutils/5b489febfbe6dfa56b1c894ede3d85c5001d2c0d/test/LsSpec.hs | haskell | module LsSpec where
import Coreutils.Ls
import Data.Maybe
import Data.Time
import Test.Hspec
spec :: Spec
spec = parallel $ do
describe "sorting" $ do
it "defaults" $ do
let rt = getRuntime defaultOptions
sorter rt [entry "b", entry "a", entr... | |
1ce21a49527df1ba4359d317e5b69356bacb47d8d4625d4aea0ef76e0f2d43a0 | hjcapple/reading-sicp | exercise_1_30.scm | #lang racket
P40 - [ 练习 1.30 ]
(define (sum term a next b)
(define (iter a ret)
(if (> a b)
ret
(iter (next a) (+ (term a) ret))))
(iter a 0))
;;;;;;;;;;;;;;;;;;;
(module* test #f
(require rackunit)
(define (inc n) (+ n 1))
(define (identity x) x)
(check-equal? (sum identity 1 in... | null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_1/exercise_1_30.scm | scheme | #lang racket
P40 - [ 练习 1.30 ]
(define (sum term a next b)
(define (iter a ret)
(if (> a b)
ret
(iter (next a) (+ (term a) ret))))
(iter a 0))
(module* test #f
(require rackunit)
(define (inc n) (+ n 1))
(define (identity x) x)
(check-equal? (sum identity 1 inc 100) 5050)
)
| |
1e8d3b5e2478a19e7163b75ac7e1d7dc26a5741085dc97f2b8c39dfc8a2e4184 | bravit/hid-examples | maybe.hs | import Text.Read (readMaybe)
type Name = String
type Phone = String
type Location = String
type PhoneNumbers = [(Name, Phone)]
type Locations = [(Phone, Location)]
doubleStrNumber1 :: (Num a, Read a) => String -> Maybe a
doubleStrNumber1 str =
case readMaybe str of
Just x -> Just (2*x)
Nothing -> Nothing
d... | null | https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/ch05/maybe.hs | haskell | import Text.Read (readMaybe)
type Name = String
type Phone = String
type Location = String
type PhoneNumbers = [(Name, Phone)]
type Locations = [(Phone, Location)]
doubleStrNumber1 :: (Num a, Read a) => String -> Maybe a
doubleStrNumber1 str =
case readMaybe str of
Just x -> Just (2*x)
Nothing -> Nothing
d... | |
c4adc0fbfc63e6d70fc2a1cda588ba9e0c9ae892c63e6eb7e861e46b4da4eb07 | reagent-project/reagent-template | doo_runner.cljs | (ns {{project-ns}}.doo-runner
(:require [doo.runner :refer-macros [doo-tests]]
[{{project-ns}}.core-test]))
(doo-tests '{{project-ns}}.core-test)
| null | https://raw.githubusercontent.com/reagent-project/reagent-template/c769c6806540a9faafec36c27b07a1c86ae5eff7/resources/leiningen/new/reagent/runners/doo_runner.cljs | clojure | (ns {{project-ns}}.doo-runner
(:require [doo.runner :refer-macros [doo-tests]]
[{{project-ns}}.core-test]))
(doo-tests '{{project-ns}}.core-test)
| |
0448c91133ed2b9d5928d7de7f65f53bd857c0df96c57a99a1e2862aa513b886 | mbutterick/beautiful-racket | main.rkt | #lang racket/base
(module reader racket/base
(require "reader.rkt")
(provide (all-from-out "reader.rkt"))) | null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/txtadv-demo/main.rkt | racket | #lang racket/base
(module reader racket/base
(require "reader.rkt")
(provide (all-from-out "reader.rkt"))) | |
a41f4f4dd803de1f4cb1d9ad9c1c35858dd9d54842b5153d37ebe593abf0cb2a | JHU-PL-Lab/jaylang | sum.ml | (*
USED: PLDI2011 as sum
USED: PEPM2013 as sum
*)
let rec sum n =
if n <= 0
then 0
else n + sum (n-1)
let main n =
assert (n <= sum n)
| null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/mochi/sum.ml | ocaml |
USED: PLDI2011 as sum
USED: PEPM2013 as sum
| let rec sum n =
if n <= 0
then 0
else n + sum (n-1)
let main n =
assert (n <= sum n)
|
753ca94c8bd60f245af5f8ac0f7ca7faf40ee0de88c44bfee00a9f55a1148bf7 | annapawlicka/om-data-vis | handler.clj | (ns om-data-vis.handler
(:use compojure.core)
(:require [compojure.handler :as handler]
[compojure.route :as route]
[liberator.core :refer [resource defresource]]
[liberator.representation :refer (ring-response as-response)]
[clojure.java.io :as io]
[cloju... | null | https://raw.githubusercontent.com/annapawlicka/om-data-vis/4e0323cf4a58bc90e12f9ce99ed3b7cc21c0a5b6/src/om_data_vis/handler.clj | clojure | Data - for quick demo only. Should be replaced with database, CSV, etc. ;; | (ns om-data-vis.handler
(:use compojure.core)
(:require [compojure.handler :as handler]
[compojure.route :as route]
[liberator.core :refer [resource defresource]]
[liberator.representation :refer (ring-response as-response)]
[clojure.java.io :as io]
[cloju... |
f39b5300f5c2d3d690bbb8ae2ef5d925bea11318953fedb1ca72b4e3de8497ad | pjones/byline | menu.hs | -- |
--
-- Copyright:
-- This file is part of the package byline. 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 exc... | null | https://raw.githubusercontent.com/pjones/byline/e975c1d6787acb7019d86cf9e29746796e4a5134/examples/menu.hs | haskell | |
Copyright:
This file is part of the package byline. 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 the
... | module Main
( main,
)
where
import Byline.Menu
import qualified Data.List.NonEmpty as NonEmpty
data Item
= Fruit Text
| Vegetable Text
deriving (Show)
instance ToStylizedText Item where
toStylizedText item = case item of
Fruit name -> text name <> (" (fruit)" & fg red)
Vegetable name -> text name... |
1b7b68c903ff7343f6f35dc7ce4fb01f4879896baf01a33902917967db495d18 | ds-wizard/engine-backend | PackageBundleAudit.hs | module Wizard.Service.Package.Bundle.PackageBundleAudit where
import Wizard.Model.Context.AppContext
import Wizard.Service.Audit.AuditService
auditPackageBundleExport :: String -> AppContextM ()
auditPackageBundleExport = logAudit "package_bundle" "export"
auditPackageBundlePullFromRegistry :: String -> AppContextM ... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/090f4f3460e8df128e88e2c3ce266b165e4a0a50/engine-wizard/src/Wizard/Service/Package/Bundle/PackageBundleAudit.hs | haskell | module Wizard.Service.Package.Bundle.PackageBundleAudit where
import Wizard.Model.Context.AppContext
import Wizard.Service.Audit.AuditService
auditPackageBundleExport :: String -> AppContextM ()
auditPackageBundleExport = logAudit "package_bundle" "export"
auditPackageBundlePullFromRegistry :: String -> AppContextM ... | |
5a6e1abd061e33ff576dbe7cfc4080ad1ec0bf903ff4362554fdf4a50bb3c1cd | dfinity/motoko | hover_tests.ml | module Lsp = Lsp.Lsp_t
let extract_cursor input =
let cursor_pos = ref (0, 0) in
String.split_on_char '\n' input
|> List.mapi (fun line_num line ->
match String.index_opt line '|' with
| Some column_num ->
cursor_pos := (line_num, column_num);
line |> String.split_on_c... | null | https://raw.githubusercontent.com/dfinity/motoko/399b8e8b0b47890388cd38ee0ace7638d9092b1a/src/languageServer/hover_tests.ml | ocaml | module Lsp = Lsp.Lsp_t
let extract_cursor input =
let cursor_pos = ref (0, 0) in
String.split_on_char '\n' input
|> List.mapi (fun line_num line ->
match String.index_opt line '|' with
| Some column_num ->
cursor_pos := (line_num, column_num);
line |> String.split_on_c... | |
982ce1dd6f567634909f53c50d2b996ab584d80973baee1c587975b8c3d31bfc | racket/racket7 | misc.rkt |
;;----------------------------------------------------------------------
# % misc : file utilities , etc . - remaining functions
(module misc '#%kernel
(#%require "small-scheme.rkt" "define.rkt" "path.rkt" "old-path.rkt"
"path-list.rkt" "executable-path.rkt"
"reading-param.rkt"
... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/racket/private/misc.rkt | racket | ----------------------------------------------------------------------
-------------------------------------------------------------------------
-------------------------------------------------------------------------
-------------------------------------------------------------------------
This prompt catches all... |
# % misc : file utilities , etc . - remaining functions
(module misc '#%kernel
(#%require "small-scheme.rkt" "define.rkt" "path.rkt" "old-path.rkt"
"path-list.rkt" "executable-path.rkt"
"reading-param.rkt"
(for-syntax '#%kernel "qq-and-or.rkt" "stx.rkt" "stxcase-scheme.rkt" ... |
2f58c92d5c2f2f0c7a1b26d65ad055333338effb3f0efb8a16a0f6362a5d234e | antitypical/Surface | Surface.hs | # LANGUAGE FlexibleInstances , FlexibleContexts #
module Surface (
module Surface',
lambda,
Surface.pi,
(-->),
apply,
checkHasFunctionType,
checkIsFunctionType,
checkIsType,
) where
import Prelude hiding (pi)
import Data.Binding as Surface'
import Data.Expression as Surface'
import Data.Name as Surface... | null | https://raw.githubusercontent.com/antitypical/Surface/9f36a39da8b93ff6f5bdf00af402bcc536f6e382/src/Surface.hs | haskell | >),
| Construct a lambda from a type and a function from an argument variable to the resulting term. The variable will be picked automatically. The parameter type will be checked against `Type`, but there are no constraints on the type of the result.
> bodyType
| Construct a pi type from a type and a function from an... | # LANGUAGE FlexibleInstances , FlexibleContexts #
module Surface (
module Surface',
lambda,
Surface.pi,
apply,
checkHasFunctionType,
checkIsFunctionType,
checkIsType,
) where
import Prelude hiding (pi)
import Data.Binding as Surface'
import Data.Expression as Surface'
import Data.Name as Surface'
import ... |
8d71c0893afbbc4cdd55406ac32edfbe2dccea675b939a0dc494c0029bb82667 | caiorss/Functional-Programming | BookStore2.hs |
type CardHolder = String
type CardNumber = String
type Address = [String]
type CustomerID = Int
data BillingInfo = CreditCard CardNumber CardHolder Address
| CashOnDelivery
| Invoice CustomerID
deriving (Show)
| null | https://raw.githubusercontent.com/caiorss/Functional-Programming/ef3526898e3014e9c99bf495033ff36a4530503d/haskell/rwh/ch03/BookStore2.hs | haskell |
type CardHolder = String
type CardNumber = String
type Address = [String]
type CustomerID = Int
data BillingInfo = CreditCard CardNumber CardHolder Address
| CashOnDelivery
| Invoice CustomerID
deriving (Show)
| |
fa99f5af1a4afbf1c4c0acff624795f07efb2fb2567006bed76ae7bdbdae587e | may-liu/qtalk | http_set_user_profile.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(http_set_user_profile).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-include("logger.hrl").
-include("ejb_http_server.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
{Method, _} = cowboy_req:met... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/scripts/ejb_http_server/src/http_set_user_profile.erl | erlang | Feel free to use, reuse and abuse the code in this file. | -module(http_set_user_profile).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
-include("logger.hrl").
-include("ejb_http_server.hrl").
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
{Method, _} = cowboy_req:method(Req),
catch ejb_monitor:monitor_count(<<"http_set_us... |
0b187a8d3f1560fab1b1ae698a6f6673fd3d250ae0c7623928db88fd1c4268af | haroldcarr/learn-haskell-coq-ml-etc | S5Logging.hs | #!/usr/bin/env stack
-- stack --resolver lts-8.12 script
# OPTIONS_GHC -fno - warn - missing - signatures #
# OPTIONS_GHC -fno - warn - type - defaults #
{-# LANGUAGE OverloadedStrings #-}
module S5Logging where
import Control.Exception.Safe (onException)
import Control.Monad.IO.Cla... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/course/2017-05-snoyman-applied-haskell-at-lambdaconf/S5Logging.hs | haskell | stack --resolver lts-8.12 script
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
# OPTIONS_GHC -fno - warn - missing - signatures #
# OPTIONS_GHC -fno - warn - type - defaults #
module S5Logging where
import Control.Exception.Safe (onException)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Logger.CallStack (lo... |
99dd4e686ebb06f366c373cf1901f859a17925fe8f674055b5f37bb4a554167b | davexunit/guile-allegro5 | time.scm | (define-module (allegro time)
#:use-module (system foreign)
#:use-module (rnrs bytevectors)
#:use-module (ice-9 format)
#:use-module (allegro utils)
#:export (al-get-time
al-create-timeout
al-rest
al-rest))
(define-wrapped-pointer-type <allegro-timeout>
allegro-timeout?
... | null | https://raw.githubusercontent.com/davexunit/guile-allegro5/614ecc978e034f7b7ba5bd23e27111c8fef81b56/allegro/time.scm | scheme | (define-module (allegro time)
#:use-module (system foreign)
#:use-module (rnrs bytevectors)
#:use-module (ice-9 format)
#:use-module (allegro utils)
#:export (al-get-time
al-create-timeout
al-rest
al-rest))
(define-wrapped-pointer-type <allegro-timeout>
allegro-timeout?
... | |
e65e91175f4a61cb4c375308b08a3008d853943b5a9e3a2400a0cde6c1247f28 | shirok/Gauche | r7rs-aux.scm | ;;
;; Additional R7RS tests that hasn't covered by other tests
NB : Most R7RS - large libraries are tested via its srfi counterparts .
;;
;; This is called after ext/* are tested.
;;
(use gauche.test)
(test-start "r7rs-aux")
(test-section "scheme.bytevector")
;; scheme.bytevector exports a few conflicting symbols,... | null | https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/test/r7rs-aux.scm | scheme |
Additional R7RS tests that hasn't covered by other tests
This is called after ext/* are tested.
scheme.bytevector exports a few conflicting symbols, so we isolate it. | NB : Most R7RS - large libraries are tested via its srfi counterparts .
(use gauche.test)
(test-start "r7rs-aux")
(test-section "scheme.bytevector")
(define-module bytevector-test
(use gauche.test)
(use scheme.bytevector)
(test-module 'scheme.bytevector)
(let1 lis '(big big-endian little little-endian arm... |
7732fcc1f51a8b8069eb832dcc4de697054c9c7eb043e6462c3585caf4c6cd7c | edicl/cl-who | specials.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - WHO ; Base : 10 -*-
$ Header : /usr / local / cvsrep / cl - who / specials.lisp , v 1.6 2009/01/26 11:10:49 edi Exp $
Copyright ( c ) 2003 - 2009 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; m... | null | https://raw.githubusercontent.com/edicl/cl-who/0d3826475133271ee8c590937136c1bc41b8cbe0/specials.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - WHO ; 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 conditions and the ... | $ Header : /usr / local / cvsrep / cl - who / specials.lisp , v 1.6 2009/01/26 11:10:49 edi Exp $
Copyright ( c ) 2003 - 2009 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :... |
e49d71ab3b4112db3139a095fab9b2457279d92e3dcd89c369d459a424f25a99 | sg2002/lilypond-cheatsheets | cheatsheets-fns.scm | (use-modules (srfi srfi-1))
(define (is-sharp? note)
(let ((note-list (string->list note)))
(if (and (> (length note-list) 1)
(char=? (cadr note-list) #\i))
#t #f)))
(define (tone-name note)
(let ((note-list (string->list note)))
(if (is-sharp? note)
(string (car note-list) #\... | null | https://raw.githubusercontent.com/sg2002/lilypond-cheatsheets/6cb4d02f0248616241e628cd191c190b217d580f/cheatsheets-fns.scm | scheme | (use-modules (srfi srfi-1))
(define (is-sharp? note)
(let ((note-list (string->list note)))
(if (and (> (length note-list) 1)
(char=? (cadr note-list) #\i))
#t #f)))
(define (tone-name note)
(let ((note-list (string->list note)))
(if (is-sharp? note)
(string (car note-list) #\... | |
d3b365e07fdfef0c6133b15e73634e2e9b73f4f669c659e630b0b1be4085185f | tov/dssl2 | test.rkt | #lang dssl2
test 'a test':
assert 1 + 1 == 2
assert 2 + 2 == 4
| null | https://raw.githubusercontent.com/tov/dssl2/105d18069465781bd9b87466f8336d5ce9e9a0f3/test/dssl2/test.rkt | racket | #lang dssl2
test 'a test':
assert 1 + 1 == 2
assert 2 + 2 == 4
| |
b44d05eb1160fb1855c9c16998a3a4d836f053e35f4f79b262dde6ca6e12b12d | nomnom-insights/nomnom.lockjaw | protocol.clj | (ns lockjaw.protocol)
(defprotocol Lockjaw
(acquire! [this]
"Tries to get a lock for given component ID")
(acquire-by-name! [this lock-name]
"Converts passed name to ID and tries to aquire a lock for it")
(acquired? [this]
"Checks if lock was already acquired")
(acquired-by-name? [this lock-name]
... | null | https://raw.githubusercontent.com/nomnom-insights/nomnom.lockjaw/8d568d1ec36054ca25e798613ccd3e1d229c94cf/src/lockjaw/protocol.clj | clojure | (ns lockjaw.protocol)
(defprotocol Lockjaw
(acquire! [this]
"Tries to get a lock for given component ID")
(acquire-by-name! [this lock-name]
"Converts passed name to ID and tries to aquire a lock for it")
(acquired? [this]
"Checks if lock was already acquired")
(acquired-by-name? [this lock-name]
... | |
2011983732b6249046211da717b63d2b2be2befd2e2bd2acde37484cc9a48ac4 | xvw/planet | picture.ml | open Bedrock
open Util
open Paperwork
type t =
{ name : string
; description : string
; date : Timetable.Day.t
; tools : string list
; tags : string list
; place : (string * string) option
; image : string
; thumbnail : string option
}
let new_picture name description date tools tags place image thu... | null | https://raw.githubusercontent.com/xvw/planet/c2a77ea66f61cc76df78b9c2ad06d114795f3053/src/shapes/picture.ml | ocaml | open Bedrock
open Util
open Paperwork
type t =
{ name : string
; description : string
; date : Timetable.Day.t
; tools : string list
; tags : string list
; place : (string * string) option
; image : string
; thumbnail : string option
}
let new_picture name description date tools tags place image thu... | |
482d14acb8a43398a53e916ef947e1bb92ca6c69e99205723ad37adbea908bd4 | theodormoroianu/SecondYearCourses | varList.hs |
- Limbajul si Interpretorul
type M = []
showM :: Show a => M a -> String
showM = foldMap (\a -> show a ++ " ")
type Name = String
data Term = Var Name
| Con Integer
| Term :+: Term
| Lam Name Term
| App Term Term
| Fail
| Amb Term Term
deriving (Show)... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/FLP/laborator/lab4/varList.hs | haskell |
- Limbajul si Interpretorul
type M = []
showM :: Show a => M a -> String
showM = foldMap (\a -> show a ++ " ")
type Name = String
data Term = Var Name
| Con Integer
| Term :+: Term
| Lam Name Term
| App Term Term
| Fail
| Amb Term Term
deriving (Show)... | |
38ecc595a71c071e422fb2a3ced0185f469abbb15772d2c43221db00490e0d99 | ruricolist/serapeum | control-flow.lisp | (in-package :serapeum)
(defmacro eval-always (&body body)
"Shorthand for
(eval-when (:compile-toplevel :load-toplevel :execute) ...)"
`(eval-when (:compile-toplevel :load-toplevel :execute)
,@body))
(defmacro eval-and-compile (&body body)
"Emacs's `eval-and-compile'.
Alias for `eval-always'."
`(e... | null | https://raw.githubusercontent.com/ruricolist/serapeum/712cc0fdf5cca9ae2bc82e086f3ee609f99e8d78/control-flow.lisp | lisp | Remember (member) is also the bottom type.
Should we do redundancy checking? Is there any Lisp that doesn't
already warn about that?
Check that every clause type is a subtype of TYPE.
Only warn about definition when the type could
be defined.
Check that the clause types form an exhaustive partition of TYPE.
TOD... | (in-package :serapeum)
(defmacro eval-always (&body body)
"Shorthand for
(eval-when (:compile-toplevel :load-toplevel :execute) ...)"
`(eval-when (:compile-toplevel :load-toplevel :execute)
,@body))
(defmacro eval-and-compile (&body body)
"Emacs's `eval-and-compile'.
Alias for `eval-always'."
`(e... |
716dd7edc89401b395c3b5c0c782dbdb3ce09184a1fe593cbb99d4635b6173f7 | Netflix/PigPen | functional_test.clj | ;;
;;
Copyright 2013 - 2015 Netflix , 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 ... | null | https://raw.githubusercontent.com/Netflix/PigPen/18d461d9b2ee6c1bb7eee7324889d32757fc7513/pigpen-core/src/test/clojure/pigpen/functional_test.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 speci... | Copyright 2013 - 2015 Netflix , Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns pigpen.functional-test
(:refer-clojure :exclude [read]))
(defprotocol TestHarness
(data
[this data]
"Create mock input with specified data")
(dump
[this command]
"Execute the co... |
cb5c859743f2cddbee3a35f909622237da88cb2d9b80c4d9189fe4eaf3e347d3 | rbkmoney/hellgate | hg_invoice_adjustment_tests_SUITE.erl | -module(hg_invoice_adjustment_tests_SUITE).
-include("hg_ct_domain.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("damsel/include/dmsl_payment_processing_thrift.hrl").
-include_lib("damsel/include/dmsl_payment_processing_errors_thrift.hrl").
-include_lib("stdlib/include/assert.hrl").
-export([all/0]... | null | https://raw.githubusercontent.com/rbkmoney/hellgate/e1932c161a7c1fd9830cfcd42de5154229b74686/apps/hellgate/test/hg_invoice_adjustment_tests_SUITE.erl | erlang | tests descriptions
starting/stopping
_ = dbg:tracer(),
_ = dbg:p(all, c),
_ = dbg:tpl({'hg_invoice_payment', 'p', '_'}, x),
ADJ
ADJ | -module(hg_invoice_adjustment_tests_SUITE).
-include("hg_ct_domain.hrl").
-include_lib("common_test/include/ct.hrl").
-include_lib("damsel/include/dmsl_payment_processing_thrift.hrl").
-include_lib("damsel/include/dmsl_payment_processing_errors_thrift.hrl").
-include_lib("stdlib/include/assert.hrl").
-export([all/0]... |
831c36ed445a39b4997fa0c1a655ebb999671b4b2af9b79e9e373adb45b6808d | mu-chaco/ReWire | test3.hs | import ReWire
import ReWire.Bits
tick :: ReT Bit W8 (StT W8 I) Bit
tick = lift get >>= \ x -> signal x
go :: ReT Bit W8 (StT W8 I) ()
go = do
b <- tick
case b of
S -> go
C -> go
start :: ReT Bit W8 I ()
start = extrude go zeroW8
main = undefined
| null | https://raw.githubusercontent.com/mu-chaco/ReWire/a8dcea6ab0989474988a758179a1d876e2c32370/tests/regression/test3.hs | haskell | import ReWire
import ReWire.Bits
tick :: ReT Bit W8 (StT W8 I) Bit
tick = lift get >>= \ x -> signal x
go :: ReT Bit W8 (StT W8 I) ()
go = do
b <- tick
case b of
S -> go
C -> go
start :: ReT Bit W8 I ()
start = extrude go zeroW8
main = undefined
| |
b8c88968fd1ba93d38662845da7d9b237e8655c7523414216afb9195823394bf | mstksg/nonempty-containers | Internal.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS_HADDOCK not-home #-}
-- |
Module : Data . IntSet . NonEmpty . Internal
-- Copyright : (c) Justin Le 2018
-- License : BSD3
--
Maintainer :
-- Stability : experimental
-- Porta... | null | https://raw.githubusercontent.com/mstksg/nonempty-containers/d875a3b4a21137f21896ca529860c193d6a38f21/src/Data/IntSet/NonEmpty/Internal.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE ViewPatterns #
# OPTIONS_HADDOCK not-home #
|
Copyright : (c) Justin Le 2018
License : BSD3
Stability : experimental
Portability : non-portable
the abstraction of 'NEIntSet' and produce unsound sets, so be wary!
exists ... |
Module : Data . IntSet . NonEmpty . Internal
Maintainer :
Unsafe internal - use functions used in the implementation of
" Data . IntSet . NonEmpty " . These functions can potentially be used to break
module Data.IntSet.NonEmpty.Internal (
NEIntSet(..)
, Key
, nonEmptySet
, withNonEmpty
,... |
41e06dcf937f305d85b9ddb3c6adc7213b9a181134b66d94b98746068003354a | UU-ComputerScience/uhc | FloatingFloat1.hs | {- ----------------------------------------------------------------------------------------
what : Floating functions, on Float
expected: all ok
---------------------------------------------------------------------------------------- -}
module FloatingFloat1 where
main
= do p sin (pi / 2)
p sin (pi ... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/FloatingFloat1.hs | haskell | ----------------------------------------------------------------------------------------
what : Floating functions, on Float
expected: all ok
---------------------------------------------------------------------------------------- |
module FloatingFloat1 where
main
= do p sin (pi / 2)
p sin (pi / 4)
p cos (pi / 2)
p cos (pi / 4)
p tan (pi / 2)
p tan (pi / 4)
p asin 1
p acos 1
p atan 1
p exp 1
p log (exp 2)
p sqrt 2
p sqrt 4
p sinh 1
p cosh 1
... |
2d4213ded03d46608bc4268a4b5c24db87f16416360e117c0155cc2ff97754e5 | cdepillabout/servant-static-th | Server.hs | # LANGUAGE QuasiQuotes #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TemplateHaskell #
module Servant.Static.TH.Internal.Server where
import Data.Foldable (foldl1)
import Data.List.NonEmpty (NonEmpty((:|)))
import Language.Haskell.TH
(Dec, Exp, Q, appE, clause, conT, funD, mkName, normalB,
runIO, sigD)
impo... | null | https://raw.githubusercontent.com/cdepillabout/servant-static-th/5ec0027ed2faa6f8c42a2259a963f52e6b30edad/src/Servant/Static/TH/Internal/Server.hs | haskell | # LANGUAGE RankNTypes #
content to serve on the root
content to serve on the path "index.html"
| Take a template directory argument as a 'FilePath' and create a 'ServerT'
function that serves the files under the directory. Empty directories will
be ignored. 'index.html' files will also be served at the root.
No... | # LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
module Servant.Static.TH.Internal.Server where
import Data.Foldable (foldl1)
import Data.List.NonEmpty (NonEmpty((:|)))
import Language.Haskell.TH
(Dec, Exp, Q, appE, clause, conT, funD, mkName, normalB,
runIO, sigD)
import Language.Haskell.TH.Synta... |
56ca29933f91edd2e02cacc3206d37a6dfcec3002690d7c47271d58899048f2a | anoma/juvix | Negative.hs | module Core.Eval.Negative where
import Base
import Core.Eval.Base
data NegTest = NegTest
{ _name :: String,
_relDir :: Path Rel Dir,
_file :: Path Rel File
}
root :: Path Abs Dir
root = relToProject $(mkRelDir "tests/Core/negative")
testDescr :: NegTest -> TestDescr
testDescr NegTest {..} =
let tRoot ... | null | https://raw.githubusercontent.com/anoma/juvix/af63c36574da981e62d72b3c985fff2ba6266e8b/test/Core/Eval/Negative.hs | haskell | module Core.Eval.Negative where
import Base
import Core.Eval.Base
data NegTest = NegTest
{ _name :: String,
_relDir :: Path Rel Dir,
_file :: Path Rel File
}
root :: Path Abs Dir
root = relToProject $(mkRelDir "tests/Core/negative")
testDescr :: NegTest -> TestDescr
testDescr NegTest {..} =
let tRoot ... | |
6023824907e7b148f68a308448f98f39fb113991160c98fb352403402d9659b2 | graninas/Pragmatic-Type-Level-Design | DataActions.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeOperators #-}
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE TypeFamilies #-}
# LANGUAGE PolyKinds #
{-# LANGUAGE KindSignatures #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances ... | null | https://raw.githubusercontent.com/graninas/Pragmatic-Type-Level-Design/a7e051ed9d664c6986323336a0ad2132a3fa3f1c/demo-apps/auction/src/Auction/Language/DataActions.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE TypeFamilies #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
Should valName be a Symbol?
custom methods
custom methods
Helpers
Custom methods
Custom methods | # LANGUAGE FunctionalDependencies #
# LANGUAGE PolyKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
module Auction.Language.DataActions where
import TypeLevelDSL.Language.Action
import GHC.TypeLits (Symbol, Nat)
data LotName
data LotDescr
data GetPayloadValue... |
9ca9fffc4629f3cb7f5c95c5520a92dc74f5e158f4e9da68fdc9bdb972da41d6 | awslabs/s2n-bignum | bignum_montmul_p256k1_alt.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_montmul_p256k1_alt.ml | ocaml | =========================================================================
Montgomery multiply mod p_256k1, the field characteristic for secp256k1.
=========================================================================
*** print_literal_from_elf "x86/secp256k1/bignum_montmul_p256k1_alt.o";;
***
PUSH (% rbx) ... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
let bignum_montmul_p256k1_alt_mc =
define_assert_from_elf "bignu... |
8149e56f3a30eaf888385dddc20e40fe05d58f071cc6f22f2d7d41d13b93273b | yesodweb/wai | CleanPath.hs | # LANGUAGE CPP #
module Network.Wai.Middleware.CleanPath
( cleanPath
) where
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy as L
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid (mconcat)
#endif
import Data.Text (Text)
import Network.HTTP.Types (hLocation, status301)
import N... | null | https://raw.githubusercontent.com/yesodweb/wai/5d1fd4926d0f210eb77c2bc0e546cb3cca6bc197/wai-extra/Network/Wai/Middleware/CleanPath.hs | haskell | include the query string if present | # LANGUAGE CPP #
module Network.Wai.Middleware.CleanPath
( cleanPath
) where
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy as L
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid (mconcat)
#endif
import Data.Text (Text)
import Network.HTTP.Types (hLocation, status301)
import N... |
6b5995c5f3a3ae901c46790841bfea83038a4a29192b80fdd57387194d549be4 | spurious/snd-mirror | tread.scm | (load "write.scm")
(load "s7test-block.so" (sublet (curlet) (cons 'init_func 'block_init)))
(set! (*s7* 'print-length) 8) ; :readable should ignore this
(set! (*s7* 'default-hash-table-length) 4)
( set ! ( * s7 * ' heap - size ) ( * 10 1024000 ) )
(define (tester)
(do ((baddies 0)
(size 3 (+ size 1)))
... | null | https://raw.githubusercontent.com/spurious/snd-mirror/8e7a643c840592797c29384ffe07c87ba5c0a3eb/tools/tread.scm | scheme | :readable should ignore this | (load "write.scm")
(load "s7test-block.so" (sublet (curlet) (cons 'init_func 'block_init)))
(set! (*s7* 'default-hash-table-length) 4)
( set ! ( * s7 * ' heap - size ) ( * 10 1024000 ) )
(define (tester)
(do ((baddies 0)
(size 3 (+ size 1)))
((= size 4))
(format *stderr* "~%-------- ~D --------~%" ... |
473648c97f1dcf96baae59100e2b2e35e15fd53bb3966b1c5459cbd5796a9781 | TristeFigure/shuriken | pprint_meta_test.clj | (ns shuriken.monkey-patches.pprint-meta-test
(:require [clojure.test :refer :all]
[clojure.pprint :refer [pprint]]
[shuriken.monkey-patches.pprint-meta]))
(deftest test-pprint-meta
(binding [clojure.pprint/*print-meta* true]
(testing "works globally"
(let [coll ^{:meta 1} [' ^{:me... | null | https://raw.githubusercontent.com/TristeFigure/shuriken/cd36dd2a4005c85260125d89d5a3f475d248e6e4/test/shuriken/monkey_patches/pprint_meta_test.clj | clojure | (ns shuriken.monkey-patches.pprint-meta-test
(:require [clojure.test :refer :all]
[clojure.pprint :refer [pprint]]
[shuriken.monkey-patches.pprint-meta]))
(deftest test-pprint-meta
(binding [clojure.pprint/*print-meta* true]
(testing "works globally"
(let [coll ^{:meta 1} [' ^{:me... | |
b32b0da923a93fcf9bc3c45c1575753b4db3220d440051540628f6efd9aed037 | bufferswap/ViralityEngine | camera-following.lisp | (in-package #:virality.component)
(v:define-component following-camera ()
((%slave :reader slave)
(%target-actor :accessor target-actor
:initarg :target-actor)
(%target-transform :reader target-transform)
(%offset :reader offset
:initarg :offset
:initform (v3:zero))... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/components/camera-following.lisp | lisp | (in-package #:virality.component)
(v:define-component following-camera ()
((%slave :reader slave)
(%target-actor :accessor target-actor
:initarg :target-actor)
(%target-transform :reader target-transform)
(%offset :reader offset
:initarg :offset
:initform (v3:zero))... | |
2e3d35d3000f6c271f738220041a1a79cf860237a20d01e176c5e5ed248af922 | ocaml/odoc | test.mli | module CanonicalTest : sig
module Base__List : sig
type 'a t
val id : 'a t -> 'a t
end
module Base__ : sig
module List = Base__List
(** @canonical Test.CanonicalTest.Base.List *)
end
module Base : sig
module List = Base__.List
end
module Base_Tests : sig
module C : module type ... | null | https://raw.githubusercontent.com/ocaml/odoc/45c73070c9f45d305d84fa6a9cbd73025b321944/test/xref2/hidden_modules.t/test.mli | ocaml | * @canonical Test.CanonicalTest.Base.List
* We can't reference [Base__] because it's hidden.
{!List.t} ([List.t]) should resolve. | module CanonicalTest : sig
module Base__List : sig
type 'a t
val id : 'a t -> 'a t
end
module Base__ : sig
module List = Base__List
end
module Base : sig
module List = Base__.List
end
module Base_Tests : sig
module C : module type of Base__.List
open Base__
module L = List... |
32bf5c8160c675f8cfa720c34275116800ec4d080c72d47169c9291ee23ddcdd | flyspeck/flyspeck | glpk_link.ml | (* ========================================================================== *)
FLYSPECK - BOOK FORMALIZATION
(* *)
Linear Programming Link ... | null | https://raw.githubusercontent.com/flyspeck/flyspeck/05bd66666b4b641f49e5131a37830f4881f39db9/formal_lp/glpk/glpk_link.ml | ocaml | ==========================================================================
==========================================================================
This file contains material that does not depend on the details of the LP.
list proce... | FLYSPECK - BOOK FORMALIZATION
Linear Programming Link
Author :
Date : 2010 - 05 - 19
... |
48578504074d921774fd9931b7e38df0c991a2915cf7cc66ae9dc5ebe0f06d5e | Rotaerk/vulkanTest | GLFW.hs | module Graphics.VulkanAux.GLFW where
import Data.Acquire.Local
import Data.Function
import Foreign.Marshal.Alloc
import Foreign.Ptr
import Foreign.Storable
import qualified Graphics.UI.GLFW as GLFW
import Graphics.Vulkan.Core_1_0
import Graphics.Vulkan.Ext.VK_KHR_surface
import Graphics.VulkanAux.Exception
newVulkanG... | null | https://raw.githubusercontent.com/Rotaerk/vulkanTest/228007f3f56ce4200f9fe841ac85292cae044c97/sandbox/sandbox/src/Graphics/VulkanAux/GLFW.hs | haskell | module Graphics.VulkanAux.GLFW where
import Data.Acquire.Local
import Data.Function
import Foreign.Marshal.Alloc
import Foreign.Ptr
import Foreign.Storable
import qualified Graphics.UI.GLFW as GLFW
import Graphics.Vulkan.Core_1_0
import Graphics.Vulkan.Ext.VK_KHR_surface
import Graphics.VulkanAux.Exception
newVulkanG... | |
288aeca7d04b51bae3330fd93369e2053834b4f2cda54c518be70908026c2db3 | lamdu/lamdu | Expr.hs | module Lamdu.GUI.Expr
( make
) where
import GUI.Momentu (Responsive)
import qualified GUI.Momentu as M
import qualified GUI.Momentu.Element as Element
import qualified GUI.Momentu.State as GuiState
import qualified Lamdu.GUI.Expr.ApplyEdit as ApplyEdit
import qualified Lamdu.GUI.Expr.FragmentEdit as ... | null | https://raw.githubusercontent.com/lamdu/lamdu/5b15688e53ccbf7448ff11134b3e51ed082c6b6c/src/Lamdu/GUI/Expr.hs | haskell | module Lamdu.GUI.Expr
( make
) where
import GUI.Momentu (Responsive)
import qualified GUI.Momentu as M
import qualified GUI.Momentu.Element as Element
import qualified GUI.Momentu.State as GuiState
import qualified Lamdu.GUI.Expr.ApplyEdit as ApplyEdit
import qualified Lamdu.GUI.Expr.FragmentEdit as ... | |
659652caf08f71a0f5a5926e2410f3fce0647849fce2a894f15a56c13f7f2e4b | hyperfiddle/rcf | rcf_test.cljc | (ns hyperfiddle.rcf-test
(:require [clojure.test :as t :refer [deftest is testing]]
[hyperfiddle.rcf :as rcf :refer [tests]]
[matcher-combinators.test]
#_[hyperfiddle.rcf.analyzer :as ana])
#?(:clj (:import [clojure.lang ExceptionInfo]))
#?(:cljs (:require-macros [hyperfiddle.r... | null | https://raw.githubusercontent.com/hyperfiddle/rcf/6d859fee548d5a2c80cf60ba5b0b4ff803e69f18/test/hyperfiddle/rcf_test.cljc | clojure | evaluated now
interpreted as if evaluated after code emission
escaping interpretation
read and evaluated as usual
also check multi arity
inlining `thrower` leads to "unreachable code" warning
For an unknown reason, `macroexpand-1` acts as identity when runnning
tests without a repl.
(let [gen rcf/*generate... | (ns hyperfiddle.rcf-test
(:require [clojure.test :as t :refer [deftest is testing]]
[hyperfiddle.rcf :as rcf :refer [tests]]
[matcher-combinators.test]
#_[hyperfiddle.rcf.analyzer :as ana])
#?(:clj (:import [clojure.lang ExceptionInfo]))
#?(:cljs (:require-macros [hyperfiddle.r... |
9b6de5600d203a4205a14368a6e16409d775a93c4705aa11f25db3ce62381675 | ygrek/mldonkey | mp3_ui.mli | (**************************************************************************)
Copyright 2003 , 2002 b8_bavard , , , b52_simon INRIA
(* *)
(* This file is part of mldonkey. *)
(* ... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/utils/mp3tagui/mp3_ui.mli | ocaml | ************************************************************************
This file is part of mldonkey.
or (at your option) any ... | Copyright 2003 , 2002 b8_bavard , , , b52_simon INRIA
is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation ; either version 2 of the License ,
is distributed in the hope ... |
187a19dffe11549bc5168310a22c339d23d36a224a67e7b1136343216af1395f | haskell-suite/haskell-src-exts | NegativePatterns.hs | f 1 = -1
f (-1) = 1
f ( - 2) = 2
f ( - 3) = 3
data Z a = Higher a a | Same a a | Lower a a
infixr 7 `Higher`
infixr 6 `Same`
infixr 5 `Lower`
g :: Z Int -> ()
g ( -1 `Higher` x) = ()
g ( - 2 `Same` x) = ()
g ( - 3 `Lower` x) = ()
| null | https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/NegativePatterns.hs | haskell | f 1 = -1
f (-1) = 1
f ( - 2) = 2
f ( - 3) = 3
data Z a = Higher a a | Same a a | Lower a a
infixr 7 `Higher`
infixr 6 `Same`
infixr 5 `Lower`
g :: Z Int -> ()
g ( -1 `Higher` x) = ()
g ( - 2 `Same` x) = ()
g ( - 3 `Lower` x) = ()
| |
a93e5ab0090ab1ab527cf184c99b43ac5b66e27fb9ee2c71dc5cc324ed2f756e | funcool/promesa | exec_test.clj | (ns promesa.tests.exec-test
(:require
[promesa.core :as p]
[promesa.exec.bulkhead :as pbh]
[promesa.exec :as px]
[clojure.test :as t]))
(t/use-fixtures
:each
(fn [next]
(binding [px/*default-executor* (px/forkjoin-executor)]
(next)
(.shutdown px/*default-executor*))))
(def ^:dynamic ... | null | https://raw.githubusercontent.com/funcool/promesa/84d727721506af5656f334ba43672445e675e7fe/test/promesa/tests/exec_test.clj | clojure | (ns promesa.tests.exec-test
(:require
[promesa.core :as p]
[promesa.exec.bulkhead :as pbh]
[promesa.exec :as px]
[clojure.test :as t]))
(t/use-fixtures
:each
(fn [next]
(binding [px/*default-executor* (px/forkjoin-executor)]
(next)
(.shutdown px/*default-executor*))))
(def ^:dynamic ... | |
576ba447a8e5b798f419687f3f9efb1cfde38e7876c241939c74c83a6c25dfea | simplegeo/erlang | sofs_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2001 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/stdlib/test/sofs_SUITE.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2001 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(sofs_SUITE).
-ifdef(debug).
-defi... |
481c124efee79c03ba9de924dcfde8fd7781311653cf958983670ff090b5d481 | unnohideyuki/bunny | sample163.hs | main = print [1, 2, 3]
| null | https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample163.hs | haskell | main = print [1, 2, 3]
| |
2593380a004d5fccf53d5e51dc9ba0e971a6c26d016cd1473922011015fc62a7 | project-oak/hafnium-verification | Mleak_buckets.ml |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/IR/Mleak_buckets.ml | ocaml | * This module handles buckets of memory leaks in Objective-C/C++
Returns whether a memory leak should be raised for a C++ object.
If ml_buckets contains cpp, then check leaks from C++ objects. |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... |
c94a627a8b864e6c049d50fc422cb2669e7a6707b24ce46906a59974c57d3aae | faylang/fay | SkipLetTypes.hs | module SkipLetType where
main = let t :: Bool
t = True
in print t
| null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/SkipLetTypes.hs | haskell | module SkipLetType where
main = let t :: Bool
t = True
in print t
| |
c8f209f6585bf4bfe7beeddec68031c978fda94f860a300e2c6129d90ea421a2 | scicloj/notespace | config.clj | (ns scicloj.notespace.v4.config)
(def *config
(atom {:debug? false
:last-eval? true
:summary? true
:header? true
:notebook? true
:note-layout :vertical}))
(defn set! [new-config]
(reset! *config new-config))
(defn merge! [new-config]
(swap! *config merge new-config... | null | https://raw.githubusercontent.com/scicloj/notespace/534b3ba08200a9227d6c362c8ce42cb2805595ca/src/scicloj/notespace/v4/config.clj | clojure | (ns scicloj.notespace.v4.config)
(def *config
(atom {:debug? false
:last-eval? true
:summary? true
:header? true
:notebook? true
:note-layout :vertical}))
(defn set! [new-config]
(reset! *config new-config))
(defn merge! [new-config]
(swap! *config merge new-config... | |
392f90f1404bce18e9cdcfb47052ccc9b30e7766609c7f62586acf07e1be264b | marcoonroad/twostep | api_interface.ml | open Alcotest
module String = Base.String
module TOTP = Twostep.TOTP
module HOTP = Twostep.HOTP
let _drop_spaces text = String.filter ~f:(( != ) ' ') text
let _char_is_base32 char =
char == 'A'
|| char == 'B'
|| char == 'C'
|| char == 'D'
|| char == 'E'
|| char == 'F'
|| char == 'G'
|| char == 'H'
|... | null | https://raw.githubusercontent.com/marcoonroad/twostep/090ce0dddbd2016b28bb145e3f8bcbea08ef60fc/test/api_interface.ml | ocaml | **************************************************************************
**************************************************************************
************************************************************************** | open Alcotest
module String = Base.String
module TOTP = Twostep.TOTP
module HOTP = Twostep.HOTP
let _drop_spaces text = String.filter ~f:(( != ) ' ') text
let _char_is_base32 char =
char == 'A'
|| char == 'B'
|| char == 'C'
|| char == 'D'
|| char == 'E'
|| char == 'F'
|| char == 'G'
|| char == 'H'
|... |
790b90d1df1e4e4ffe91b470bf3b82d6ed7310a0ea0e77b4037fd49b6839e4e6 | spectrum-finance/cardano-dex-sdk-haskell | Main.hs | module Main where
import qualified Data.Text.Encoding as E
import Test.Tasty
import Test.Tasty.HUnit
import Spec.Pool as PS
main :: IO ()
main = do
defaultMain tests
tests = testGroup "DexCore"
[ PS.toFromLedgerPoolTests
, PS.checkDeposit
, PS.checkRedeem
, PS.checkSwap
, PS.initialLiquidityTests
, ... | null | https://raw.githubusercontent.com/spectrum-finance/cardano-dex-sdk-haskell/c769f92aeb348b5fb7d6fb74a447fe18e9fadb38/dex-core/test/Main.hs | haskell | module Main where
import qualified Data.Text.Encoding as E
import Test.Tasty
import Test.Tasty.HUnit
import Spec.Pool as PS
main :: IO ()
main = do
defaultMain tests
tests = testGroup "DexCore"
[ PS.toFromLedgerPoolTests
, PS.checkDeposit
, PS.checkRedeem
, PS.checkSwap
, PS.initialLiquidityTests
, ... | |
f3be193d713eeeccaf408b54643cd025418a4f47a4416562ee10629a1f9c9a92 | input-output-hk/cardano-sl | Block.hs | # LANGUAGE RecordWildCards #
module Statistics.Block
( BlockHeader (..)
, blockHeadersF
, blockChain
, blockChainF
, txBlocksF
, inBlockChainF
, txCntInChainF
, TxFate (..)
, txFateF
) where
import Control.Foldl (Fold (..), fold)
import qualified Data.Map.Lazy as ML
i... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/tools/post-mortem/src/Statistics/Block.hs | haskell | # LANGUAGE RecordWildCards #
module Statistics.Block
( BlockHeader (..)
, blockHeadersF
, blockChain
, blockChainF
, txBlocksF
, inBlockChainF
, txCntInChainF
, TxFate (..)
, txFateF
) where
import Control.Foldl (Fold (..), fold)
import qualified Data.Map.Lazy as ML
i... | |
f1482d928fb15220e0e3ea4fc3ac906fcfb160336829a8a54666811470cbf903 | mstksg/backprop-learn | Combinator.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE InstanceSigs #
# LANGUAG... | null | https://raw.githubusercontent.com/mstksg/backprop-learn/59aea530a0fad45de6d18b9a723914d1d66dc222/old2/src/Backprop/Learn/Model/Combinator.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE FlexibleContexts #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeInType ... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternSynonyms #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplicati... |
93b91b11c7470beff80e5504358946ba5e20927eef8ae1d9edd2bc71dd09cce4 | avsm/platform | opamEnv.ml | (**************************************************************************)
(* *)
Copyright 2012 - 2015 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/state/opamEnv.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2015 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
open OpamTypes
open OpamStateTypes
open OpamTypesBase
open OpamStd.Op
open OpamFilename.Op
le... |
992587c7b134b1c01bd5e381b93ed647978e5fc49ad1d9b86999ac020a8d9563 | haroldcarr/learn-haskell-coq-ml-etc | ch_07_8.hs |
Created : 2015 Apr 20 ( Mon ) 12:59:55 by .
Last Modified : 2015 Apr 22 ( We d ) 17:52:44 by .
Created : 2015 Apr 20 (Mon) 12:59:55 by Harold Carr.
Last Modified : 2015 Apr 22 (Wed) 17:52:44 by Harold Carr.
-}
module Ch_07_8 where
import Data.Char (chr, ord)
import Te... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/book/2007-Programming_in_Haskell-1st_Edition-Graham_Hutton/ch_07_8.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
f x : (foldr f [] xs)
TODO bad definition
--------------------------------------------... |
Created : 2015 Apr 20 ( Mon ) 12:59:55 by .
Last Modified : 2015 Apr 22 ( We d ) 17:52:44 by .
Created : 2015 Apr 20 (Mon) 12:59:55 by Harold Carr.
Last Modified : 2015 Apr 22 (Wed) 17:52:44 by Harold Carr.
-}
module Ch_07_8 where
import Data.Char (chr, ord)
import Te... |
fe29985a6b9b5d3287202db9466cc73d246f16d8f2be20ea2b95b5b4e0780f7c | acfoltzer/minecraft-data | Region.hs | module Game.Minecraft.Region where
import Codec.Compression.Zlib
import Control.Applicative
import Control.Monad
import Data.Bits
import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as L
import Data.Serialize
import qualified Data.Serialize.Builder as Builder
import Data.Vector (Vector)
import ... | null | https://raw.githubusercontent.com/acfoltzer/minecraft-data/bd08d2eee862de0443d8ac409b4eb8cf4a373ff1/Game/Minecraft/Region.hs | haskell | | The (X,Z) coordinates specifying a 'Chunk'
| The (X,Z) coordinates specifying a 'Region'
| A region contains a collection of 'Chunk's
TODO: Replace bytestring with actual chunk data
| Don't care about timestamps yet
that chunk
containing that region | module Game.Minecraft.Region where
import Codec.Compression.Zlib
import Control.Applicative
import Control.Monad
import Data.Bits
import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as L
import Data.Serialize
import qualified Data.Serialize.Builder as Builder
import Data.Vector (Vector)
import ... |
e1637646e0c68a87649c3ace3d3fa6d69f7c0c0987b1e5eb59cbbd7c95f4ca6e | anoma/juvix | Options.hs | module Commands.Dev.Internal.Arity.Options where
import CommonOptions
newtype InternalArityOptions = InternalArityOptions
{ _internalArityInputFile :: AppPath File
}
deriving stock (Data)
makeLenses ''InternalArityOptions
parseInternalArity :: Parser InternalArityOptions
parseInternalArity = do
_internalAri... | null | https://raw.githubusercontent.com/anoma/juvix/af63c36574da981e62d72b3c985fff2ba6266e8b/app/Commands/Dev/Internal/Arity/Options.hs | haskell | module Commands.Dev.Internal.Arity.Options where
import CommonOptions
newtype InternalArityOptions = InternalArityOptions
{ _internalArityInputFile :: AppPath File
}
deriving stock (Data)
makeLenses ''InternalArityOptions
parseInternalArity :: Parser InternalArityOptions
parseInternalArity = do
_internalAri... | |
62145296a344135bc1e680eea28a942ff5049507c1fcc9d2d609c603ad5883dd | abdulapopoola/SICPBook | Ex2.21.scm | #lang planet neil/sicp
(define (map proc items)
(if (null? items)
nil
(cons (proc (car items))
(map proc (cdr items)))))
(define (square x) (* x x))
(define (square-list items)
(if (null? items)
nil
(cons (square (car items))
(square-list (cdr items)))))
(define (... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%202/2.2/Ex2.21.scm | scheme | Using inbuilt map - (map square items) | #lang planet neil/sicp
(define (map proc items)
(if (null? items)
nil
(cons (proc (car items))
(map proc (cdr items)))))
(define (square x) (* x x))
(define (square-list items)
(if (null? items)
nil
(cons (square (car items))
(square-list (cdr items)))))
(define (... |
dd0dca2047c6d04c8b145075378b0e5a5a6f191b065b0162d83985a225728b3d | gldubc/cast-machine | abstract.ml | (* open Types *)
open Syntax
open Primitives
open Types.Print
module Abstract = struct
include Eager
module Env = struct
include Hashtbl.Make(struct
type t = var
let equal = (=)
let hash = Hashtbl.hash
end)
end
type c = tau * tau
(* a bit hacky, done... | null | https://raw.githubusercontent.com/gldubc/cast-machine/34d79c324cd0a9aff52865ead19e74126b96daaa/src/abstract.ml | ocaml | open Types
a bit hacky, done in order to define u, v and env properly
type 'b id = 'b
in print_endline (show_v v) | open Syntax
open Primitives
open Types.Print
module Abstract = struct
include Eager
module Env = struct
include Hashtbl.Make(struct
type t = var
let equal = (=)
let hash = Hashtbl.hash
end)
end
type c = tau * tau
type 'a au = [ `Cst of b | `Cls of va... |
b0ee3b23fe3da0ba65e3c4c3c6a133797ca087f2c0219c675967255ae46af71e | pariyatti/kosa | header.clj | (ns kosa.layouts.shared.header
(:require [hiccup2.core :as h]
[buddy.auth :as auth]))
(def logout-js
"This is a rather weird hack to drop Basic HTTP Auth credentials
from the client. Adapted from the bookmarklet suggested here:
-to-log-out-user-from-web-site-using-basic-authentication"
"javascr... | null | https://raw.githubusercontent.com/pariyatti/kosa/68099ccb830b99a9d0ead81ccfd878ba72020e78/src/kosa/layouts/shared/header.clj | clojure |
") | (ns kosa.layouts.shared.header
(:require [hiccup2.core :as h]
[buddy.auth :as auth]))
(def logout-js
"This is a rather weird hack to drop Basic HTTP Auth credentials
from the client. Adapted from the bookmarklet suggested here:
-to-log-out-user-from-web-site-using-basic-authentication"
"javascr... |
d7ab49f21537d8f9736b04633949d980b2d9ed4c8889c66f52f931927d1d6bba | helium/blockchain-core | icdf_eqc.erl | %%%-----------------------------------------------------------------------------
%% Evaluate probabilistic accuracy of calculating inverse cumulative distritbution
%% function.
%%
%% - Generate a random list: [{Weight: float, Node: binary}, ...]
%%
%% - Check that the number of times a node gets picked is roughly equal... | null | https://raw.githubusercontent.com/helium/blockchain-core/9011de7537ecfd737074b85b7b16e7d8e1ceef00/eqc/icdf_eqc.erl | erlang | -----------------------------------------------------------------------------
Evaluate probabilistic accuracy of calculating inverse cumulative distritbution
function.
- Generate a random list: [{Weight: float, Node: binary}, ...]
- Check that the number of times a node gets picked is roughly equal to it's
weigh... |
-module(icdf_eqc).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([prop_icdf_check/0]).
prop_icdf_check() ->
?FORALL({Population, Iterations, Hash}, {gen_population(), gen_iterations(), binary(32)},
begin
Entropy = blockchain_utils:rand_state(Ha... |
f7eb6791773c6549c1eee1407e3c2ed036c0fddb6b62b7f2925cf88973c23890 | dmitryvk/sbcl-win32-threads | primtype.lisp | ;;;; machine-independent aspects of the object representation and
;;;; primitive types
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/generic/primtype.lisp | lisp | machine-independent aspects of the object representation and
primitive types
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
primitive type definitions
primitive integer types that fit in ... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!VM")
(/show0 "primtype.lisp 17")
(!def-primitive-type t (descriptor-reg))
(/show0 "primtype.lisp 20")
(se... |
80440defd2fc25c0ff87d199c68adbeda51a3860dd3a46190e9b74e3bc4b1cb6 | dsheets/ocaml-unix-time | unix_time_types.ml |
* Copyright ( c ) 2016 < >
*
* 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/ocaml-unix-time/b3f1db3185b04dce1f8704ec0d82687f95307802/lib_gen/unix_time_types.ml | ocaml |
* Copyright ( c ) 2016 < >
*
* 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... | |
5c99ceb9339493598dc35675f90604f7a14678d85340be7013c7317317632af5 | xmonad/xmonad-contrib | DynamicWorkspaceGroups.hs | -----------------------------------------------------------------------------
-- |
Module : XMonad . Actions . DynamicWorkspaceGroups
-- Description : Dynamically manage workspace groups in multi-head setups.
Copyright : ( c ) 2009
-- License : BSD-style (see LICENSE)
--
-- Maintainer : <>
--... | null | https://raw.githubusercontent.com/xmonad/xmonad-contrib/3058d1ca22d565b2fa93227fdde44d8626d6f75d/XMonad/Actions/DynamicWorkspaceGroups.hs | haskell | ---------------------------------------------------------------------------
|
Description : Dynamically manage workspace groups in multi-head setups.
License : BSD-style (see LICENSE)
Maintainer : <>
Stability : experimental
Portability : unportable
Dynamically manage \"workspace groups\", sets of ... | Module : XMonad . Actions . DynamicWorkspaceGroups
Copyright : ( c ) 2009
module XMonad.Actions.DynamicWorkspaceGroups
WSGroupId
, addRawWSGroup
, addWSGroup
, addCurrentWSGroup
, forgetWSGroup
, viewWSGroup
, promptWSGroupView
, promptWSGroupAdd
, promptWSGr... |
53c141d440ba2519a5a9434c01e077390a4e1ba0115622694f5ae3c1fe027204 | jakemcc/sicp-study | ex2_54.clj | Exercise 2.54
;
Two lists are said to be equal ? if they contain
; equal elements arranged in the same order. Implement equal? for
; lists of symbols
(use 'clojure.test)
(def equal? =)
(deftest equal?-works
(is (= true (equal? '(a b c) '(a b c))))
(is (= false (equal? '(a b) '(a b z))))
(is (= false (equal? ... | null | https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section2.3/ex2_54.clj | clojure |
equal elements arranged in the same order. Implement equal? for
lists of symbols | Exercise 2.54
Two lists are said to be equal ? if they contain
(use 'clojure.test)
(def equal? =)
(deftest equal?-works
(is (= true (equal? '(a b c) '(a b c))))
(is (= false (equal? '(a b) '(a b z))))
(is (= false (equal? '(b a c) '(b a d)))))
(run-tests)
(defn equal? [x y]
"equal? defined using recursion ... |
b0bdea5af916a67b7039ad98a663463ef9b01ba50fb1bf627ef1aa7c55344135 | marhop/pandoc-unicode-math | UnicodeToLatex.hs | {-# LANGUAGE OverloadedStrings #-}
module UnicodeToLatex where
import Data.Char (isAlphaNum)
import Data.Map.Strict (findWithDefault, (!?))
import Data.Text (Text, cons, singleton, snoc, uncons)
import qualified Data.Text as T
import Text.Pandoc.JSON (toJSONFilter)
import MathFilter
import Symbols
main :: IO ()
mai... | null | https://raw.githubusercontent.com/marhop/pandoc-unicode-math/51e374d83d77a26946c3528b1295dd848fe5d7c9/src/UnicodeToLatex.hs | haskell | # LANGUAGE OverloadedStrings #
| Replace Unicode math symbols in a string by equivalent Latex commands.
Examples:
* α → \alpha
* ℕ → \mathbb{N}
Sensible whitespace is added where necessary:
* λx → \lambda x
* αβ → \alpha\beta |
module UnicodeToLatex where
import Data.Char (isAlphaNum)
import Data.Map.Strict (findWithDefault, (!?))
import Data.Text (Text, cons, singleton, snoc, uncons)
import qualified Data.Text as T
import Text.Pandoc.JSON (toJSONFilter)
import MathFilter
import Symbols
main :: IO ()
main = toJSONFilter (mathFilter unicod... |
b72f1d821300845b5c554d1a48f588a926c2fc7e7e6032952e6cb05312889aa7 | bmeurer/ocaml-arm | debugger_config.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cr... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/debugger/debugger_config.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
OCaml port by and
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
... |
e5610cf018638392596db77e205ddb080edeb489618b33bb3b48b7575f1786ce | Elzair/nazghul | basic-night-time.scm |
(define hour 00)
(define minutes 45)
(define time-in-minutes (+ (* hour 60) minutes))
(kern-set-clock
0 ; year
0 ; month
0 ; week
0 ; day
hour ; hour
minutes ; minutes(
)
(kern-mk-astral-body
'sun ; tag
"Fyer (the sun)" ; name
1 ; relative astronomical distance
1 ... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.001/tests/basic-night-time.scm | scheme | year
month
week
day
hour
minutes(
tag
name
relative astronomical distance
minutes per phase (n/a for sun)
minutes per degree
initial arc
initial phase
script interface
phases: |
(define hour 00)
(define minutes 45)
(define time-in-minutes (+ (* hour 60) minutes))
(kern-set-clock
)
(kern-mk-astral-body
(list
(list s_sun 255 "full")
)
)
|
627e5cbc659e9fe06c422057bcadf29029c9dea4751b46d3bc2d1214b31d9948 | sph-mn/sph-lib | other.scm | (define-module (sph list other))
(use-modules (srfi srfi-1) (rnrs sorting) (sph) (sph alist) (sph hashtable) (sph list))
(export group group-recursively
list-ref-random list-ref-randomise-cycle
list-replace-from-hashtable randomise sph-list-other-description)
(define sph-list-other-description
"additional list ... | null | https://raw.githubusercontent.com/sph-mn/sph-lib/c7daf74f42d6bd1304f49c2fef89dcd6dd94fdc9/modules/sph/list/other.scm | scheme | (define-module (sph list other))
(use-modules (srfi srfi-1) (rnrs sorting) (sph) (sph alist) (sph hashtable) (sph list))
(export group group-recursively
list-ref-random list-ref-randomise-cycle
list-replace-from-hashtable randomise sph-list-other-description)
(define sph-list-other-description
"additional list ... | |
74c6a4e39c889d3dbd8bafb3aba8c0dbb70de6d90b354883bfbd9a65f377f62e | eatonphil/owebl | handler.ml | open Response
open Rule
type t = < getResponse: Request.t -> Response.r >
class handler (rule: RouteRule.t) (response: Response.t) =
object(self)
method getResponse (request: Request.t) : Response.r =
match rule#matches request with
| RouteRule.Match -> response#getResponse request... | null | https://raw.githubusercontent.com/eatonphil/owebl/deb9794606a36ea831a260bfe3812e23c0a70fce/src/handler.ml | ocaml | open Response
open Rule
type t = < getResponse: Request.t -> Response.r >
class handler (rule: RouteRule.t) (response: Response.t) =
object(self)
method getResponse (request: Request.t) : Response.r =
match rule#matches request with
| RouteRule.Match -> response#getResponse request... | |
100fcc2d011d30b2f1028cb332bea9aa5052d1794b1cb2d51dc14d96ca4ae4b5 | b0-system/brzo | tool.ml |
let () = ignore (Cap.sayno)
let () = Printf.printf "The answer is: %d\n" (Q.answer ())
| null | https://raw.githubusercontent.com/b0-system/brzo/79d316a5024025a0112a8569a6335241b4620da8/examples/ocaml-deps/tool.ml | ocaml |
let () = ignore (Cap.sayno)
let () = Printf.printf "The answer is: %d\n" (Q.answer ())
| |
8a47727f1ea6534f3be1c9c5b6110d22bc6c6ac21e6f6b309e4632968db19099 | videolang/interactive-syntax | context-text.rkt | #lang racket/base
(provide (rename-out [editor-reader reader]))
(require racket/class
wxme)
(define editor-reader%
(class* object% (snip-reader<%>)
(super-new)
(define/public (read-header version stream) (void))
(define/public (read-snip text-only? version stream)
(define text (send strea... | null | https://raw.githubusercontent.com/videolang/interactive-syntax/8c13d83ac0f5dbd624d59083b32f765952d1d440/editor/private/context-text.rkt | racket | <- fix? | #lang racket/base
(provide (rename-out [editor-reader reader]))
(require racket/class
wxme)
(define editor-reader%
(class* object% (snip-reader<%>)
(super-new)
(define/public (read-header version stream) (void))
(define/public (read-snip text-only? version stream)
(define text (send strea... |
fd6ebaa786cabaf7ee001935492f98fa78cdb0adf6200522eda1fc549fd7ea88 | jrm-code-project/LISP-Machine | editst.lisp |
;; -*- Mode: Lisp; Package: System-Internals -*-
;; Lisp Machine Editor Stream
;; The rubout handler implemented here is a crock since it duplicates
;; the functions of ZWEI. However, this editor is implemented in terms of stream
;; operations, and thus can be used from consoles other than the
local Lisp Machine ... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/gjc/editst.lisp | lisp | -*- Mode: Lisp; Package: System-Internals -*-
Lisp Machine Editor Stream
The rubout handler implemented here is a crock since it duplicates
the functions of ZWEI. However, this editor is implemented in terms of stream
operations, and thus can be used from consoles other than the
UTILS .
There are a couple ideas ... |
local Lisp Machine console . This file makes use of the definitions
In addition , it makes it easy to have one editor stream work for
on a given monitor . The editor stream would then bind these two
TV - STREAM -- a bi - directional stream to the Lisp Machine console . Special
stream which talks... |
6182ac5f4a7d8cb9a8b8b29fd018426d248d026150046dc411334f2efc6a8ee0 | Oblosys/proxima | Ag.hs | module Main where
import System (getArgs, getProgName, exitFailure)
import System.Console.GetOpt (usageInfo)
import List (isSuffixOf)
import Monad (zipWithM_)
import Data.Maybe
import qualified Data.Set as Set
import qualified Data.Map as... | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/uuagc/src/Ag.hs | haskell | the other 1000 or so parse errors are usually not that informative
alternative module gen
conventional module gen | module Main where
import System (getArgs, getProgName, exitFailure)
import System.Console.GetOpt (usageInfo)
import List (isSuffixOf)
import Monad (zipWithM_)
import Data.Maybe
import qualified Data.Set as Set
import qualified Data.Map as... |
689cbbb9e017dfda0865d5bf752a1242ac8c16868aca6e2d7f40973110061986 | ghcjs/ghcjs-dom | GlobalCrypto.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.GlobalCrypto
(js_getCrypto, getCrypto, GlobalCrypto(..), gTypeGlobalCrypto,
IsG... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/GlobalCrypto.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.GlobalCrypto
(js_getCrypto, getCrypto, GlobalCrypto(..), gTypeGlobalCrypto,
IsGlobalCrypto, toGlobalCrypto)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float,... |
0394c35d0ab4bac9630744048172189252471e15e26176885186e09eca87a98d | CryptoKami/cryptokami-core | Instances.hs | # LANGUAGE TypeOperators #
-- | Miscellaneous instances, etc. Related to the main blockchain of course.
module Pos.Core.Block.Main.Instances
(
) where
import Universum
import qualified Data.Text.Buildable as Buildable
import Formatting (bprint, build, int, stext, (%))
import ... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/core/Pos/Core/Block/Main/Instances.hs | haskell | | Miscellaneous instances, etc. Related to the main blockchain of course.
instead of @Bi MainBlockHeader@. We compute header's hash by | # LANGUAGE TypeOperators #
module Pos.Core.Block.Main.Instances
(
) where
import Universum
import qualified Data.Text.Buildable as Buildable
import Formatting (bprint, build, int, stext, (%))
import Serokell.Util (Color (Magenta), colorize, listJson)
import Pos... |
24099c02f97af38f611b04921dbd403d430f43767a08112918da9fa4a6e820bf | jeapostrophe/adqc | stx.rkt | #lang racket/base
(require (for-syntax racket/base
racket/contract/base
racket/dict
racket/generic
racket/list
racket/syntax
syntax/id-table)
racket/contract/base
racket/list
... | null | https://raw.githubusercontent.com/jeapostrophe/adqc/59030f17f603356786a2cf19b78e54ccb1181848/stx.rkt | racket | XXX This module should use plus not ast (i.e. the thing that does
type checking, termination checking, and resource analysis). And
plus should have an "any" type that causes inference, and that
should be supported here.
XXX Should these macros record the src location in the data
structure some how? (perhaps plus ... | #lang racket/base
(require (for-syntax racket/base
racket/contract/base
racket/dict
racket/generic
racket/list
racket/syntax
syntax/id-table)
racket/contract/base
racket/list
... |
1657b8ac947d2440d396ecbecf020067872bb2ce00286f84e6aa4c258402bfa6 | okuoku/nausicaa | test-msgcat.sps | -*- coding : utf-8 - unix -*-
;;;
Part of : / Scheme
Contents : tests for msgcat
Date : Tue May 18 , 2010
;;;
;;;Abstract
;;;
;;;
;;;
Copyright ( c ) 2010 < >
;;;
;;;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 F... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/tests/test-msgcat.sps | scheme |
Abstract
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
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warra... | -*- coding : utf-8 - unix -*-
Part of : / Scheme
Contents : tests for msgcat
Date : Tue May 18 , 2010
Copyright ( c ) 2010 < >
the Free Software Foundation , either version 3 of the License , or ( at
General Public License for more details .
You should have received a copy of the GNU General Public Licens... |
ab81775e3d18a4d90ec8ceebaae3bf9843c5f95954aaadd9953160ebcaab2133 | biocad/hasbolt-extras | Converters.hs | # LANGUAGE RecordWildCards #
{-# LANGUAGE CPP #-}
# LANGUAGE TemplateHaskell #
module Database.Bolt.Extras.Template.Internal.Converters
(
makeNodeLike
, makeNodeLikeWith
, makeURelationLike
, makeURelationLikeWith
) where
import Data.Map.Strict (fromList, member, notMembe... | null | https://raw.githubusercontent.com/biocad/hasbolt-extras/961726eb1cecfd252952b761317e477ad6bcbc28/src/Database/Bolt/Extras/Template/Internal/Converters.hs | haskell | # LANGUAGE CPP #
Requires class name, @SomeType@ name and names of the class functions (@phi@ and @phiInv@).
Describes conversions into and from 'Node'.
| Another example of @bijective@ class is 'URelationLike'.
Describes conversions into and from 'URelationship'.
Each field is transformed into 'Tex... | # LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Database.Bolt.Extras.Template.Internal.Converters
(
makeNodeLike
, makeNodeLikeWith
, makeURelationLike
, makeURelationLikeWith
) where
import Data.Map.Strict (fromList, member, notMember, (!))
import Data.Tex... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.