_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 |
|---|---|---|---|---|---|---|---|---|
fae5fc77aa79b601e46265370f69cfd650e38e1a704e46c01e27de3defc078a6 | kadena-io/pact | Time.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
-- |
Module : Pact . Native . Time
Copyright : ( C ) 2016
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
--
-- Date/time built-ins.
--
module P... | null | https://raw.githubusercontent.com/kadena-io/pact/3b221d5a9efb0f61fa2e63a88a766258991b2f29/src/Pact/Native/Time.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
|
License : BSD-style (see the file LICENSE)
Date/time built-ins.
| # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
Module : Pact . Native . Time
Copyright : ( C ) 2016
Maintainer : < >
module Pact.Native.Time
( timeDefs
, defAddTime
, defFormatTime
, parseTimeDef
, timeDef
) where
import Control.Monad
import Prelude... |
a4afbf46def3af88c180c562c03c29c0c6faebe60148912b54fd42739cb1e707 | sellout/quid-pro-quo | sbcl-encapsulate.lisp | (in-package #:quid-pro-quo)
(defmacro sb-encapsulate (name identifier fdefn arglist &body body)
(let ((old `(let ((,fdefn (eval (intern "BASIC-DEFINITION" "SB-INT")))
(,arglist (eval (intern "ARG-LIST" "SB-INT"))))
,@body))
(new `(lambda (,fdefn &rest ,arglist) ,@body)))
... | null | https://raw.githubusercontent.com/sellout/quid-pro-quo/c35156d5883efb15e21ad4db932a57e353f4d329/src/sbcl-encapsulate.lisp | lisp | SBCL > 1.1.16 (since c490156) | (in-package #:quid-pro-quo)
(defmacro sb-encapsulate (name identifier fdefn arglist &body body)
(let ((old `(let ((,fdefn (eval (intern "BASIC-DEFINITION" "SB-INT")))
(,arglist (eval (intern "ARG-LIST" "SB-INT"))))
,@body))
(new `(lambda (,fdefn &rest ,arglist) ,@body)))
... |
8855037ff3ef1b66cdc3bcf2dfb94aeb396039c5c264d46444ea530c5f05fd45 | bgamari/bayes-stack | DumpCINT.hs | {-# LANGUAGE OverloadedStrings #-}
import Control.Lens hiding (argument)
import Data.Foldable
import Data.Function (on)
import Data.List
import Data.Monoid
import Options.Applicative
import qualified Data.Map as M
import qualified Data.Set as S
import qualif... | null | https://raw.githubusercontent.com/bgamari/bayes-stack/020df7bb7263104fdea254e57d6c7daf7806da3e/network-topic-models/DumpCINT.hs | haskell | # LANGUAGE OverloadedStrings # |
import Control.Lens hiding (argument)
import Data.Foldable
import Data.Function (on)
import Data.List
import Data.Monoid
import Options.Applicative
import qualified Data.Map as M
import qualified Data.Set as S
import qualified Data.ByteString as BS
import q... |
84ffd22ebebdb2c36f9d4f3defffca8c9d4d76c3558e76d23d5ad9be7924a3df | gafiatulin/codewars | Bankerplan.hs | -- Banker's Plan
-- /
module Codewars.G964.Bankerplan where
fortune :: Int -> Double -> Int -> Int -> Double -> Bool
fortune f0 p c0 n i = (>=n) . length . takeWhile ((>0) . fst) . iterate f $ (f0, c0)
where i' = 1 + 0.01*i
p' = 1 + 0.01*p
f (f, c) = (fi - c, ci)
where fi = trun... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/Bankerplan.hs | haskell | Banker's Plan
/ |
module Codewars.G964.Bankerplan where
fortune :: Int -> Double -> Int -> Int -> Double -> Bool
fortune f0 p c0 n i = (>=n) . length . takeWhile ((>0) . fst) . iterate f $ (f0, c0)
where i' = 1 + 0.01*i
p' = 1 + 0.01*p
f (f, c) = (fi - c, ci)
where fi = truncate . (*p') . fromInt... |
f476f9a1ad58b6e6410aafd77750bf2641f735b02985a0a3191f204741726140 | lettier/movie-monad | CssStyle.hs |
Movie ( C ) 2018
lettier.com
Movie Monad
(C) 2018 David Lettier
lettier.com
-}
{-# LANGUAGE OverloadedStrings #-}
module CssStyle where
import Prelude
import Control.Monad
import Data.Word
import Data.Text
import qualified Data.ByteString
import qualified GI.Gdk
import qualified GI.Gtk
import qu... | null | https://raw.githubusercontent.com/lettier/movie-monad/9b0b75a2b31557e121baf11b6ceca9023c949c71/src/CssStyle.hs | haskell | # LANGUAGE OverloadedStrings # |
Movie ( C ) 2018
lettier.com
Movie Monad
(C) 2018 David Lettier
lettier.com
-}
module CssStyle where
import Prelude
import Control.Monad
import Data.Word
import Data.Text
import qualified Data.ByteString
import qualified GI.Gdk
import qualified GI.Gtk
import qualified Records as R
import Paths_... |
656fe74c50752c835c0b58ee4278203f1db3ab1a7715d517641621d8e26eb957 | MondayMorningHaskell/haskellings | Processor.hs | |
Module : Haskellings . Processor
Description : Functions for compiling and executing exercises .
License : :
These functions compile exercise files and , if applicable ,
run the generated executables to unit test them . The implementation
details are largely centered around constructing ... | null | https://raw.githubusercontent.com/MondayMorningHaskell/haskellings/3af722b1c69ac2eef4808d79951f3aa7b8ed67ec/src/Haskellings/Processor.hs | haskell | * Compiling exercises and running tests
* Executing an exercise for custom input
| Compiles the given exercise and, if applicable, runs the unit tests
or executable tests associated with it.
| 'Execute' an exercise, allowing the user to run the program
with their own input and examine the output. This only re... | |
Module : Haskellings . Processor
Description : Functions for compiling and executing exercises .
License : :
These functions compile exercise files and , if applicable ,
run the generated executables to unit test them . The implementation
details are largely centered around constructing ... |
bf9800b10ec4cef5c2dbd79d9a79acb21ec9ae54c4b72e17deed12316afb0836 | cabol/cross_db | xdb_query_conditions_SUITE.erl | -module(xdb_query_conditions_SUITE).
%% Common Test
-export([
all/0,
init_per_suite/1,
end_per_suite/1
]).
%% Test Cases
-include_lib("mixer/include/mixer.hrl").
-mixin([
{xdb_query_conditions_test, [
% CT
init_per_testcase/2,
end_per_testcase/2,
% Test Cases
t_all/1,
t_or_conditional... | null | https://raw.githubusercontent.com/cabol/cross_db/365bb3b6cffde1b4da7109ed2594a0a3f1a4a949/test/xdb_query_conditions_SUITE.erl | erlang | Common Test
Test Cases
CT
Test Cases
Test Cases
===================================================================
CT
===================================================================
===================================================================
Test Cases
===============================================... | -module(xdb_query_conditions_SUITE).
-export([
all/0,
init_per_suite/1,
end_per_suite/1
]).
-include_lib("mixer/include/mixer.hrl").
-mixin([
{xdb_query_conditions_test, [
init_per_testcase/2,
end_per_testcase/2,
t_all/1,
t_or_conditional/1,
t_and_conditional/1,
t_not_conditional/1,
... |
93ca4ca6b7126ea277351eb5779bd5dfc6b233e24c20605b55d08c458c88d703 | basho/basho_bench | basho_bench_driver_cassandra_cql.erl | %% -------------------------------------------------------------------
%%
%% basho_bench: Benchmarking Suite
%%
Copyright ( c ) 2009 - 2012 Basho Techonologies
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License... | null | https://raw.githubusercontent.com/basho/basho_bench/aa66398bb6a91645dbb97e91a236f3cdcd1f188f/src/basho_bench_driver_cassandra_cql.erl | erlang | -------------------------------------------------------------------
basho_bench: Benchmarking Suite
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
spe... | Copyright ( c ) 2009 - 2012 Basho Techonologies
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(basho_bench_driver_cass... |
f3d4de74d68d87b0c406790f87c14123a1cae3a956390bd03d591f7cf47dc7fb | interstar/Patterning-Core | sshapes.cljc | (ns patterning.sshapes
(:require [patterning.maths :as maths]
[clojure.data :refer [diff]]
[clojure.spec.alpha :as s]
[orchestra.spec.test :as stest]
)
#?(:clj (:require [patterning.macros :refer [optional-styled-primitive]])
:cljs (:require-macros [patterning.m... | null | https://raw.githubusercontent.com/interstar/Patterning-Core/4ff050026ed9d7ddf013e83444701599dfdbac73/src/cljc/patterning/sshapes.cljc | clojure | Shapes
Shape is a list of points
Styles (dictionaries of style info)
style is a dictionary of style hints eg. stroke, fill and stroke-weight
Adding styles to sshapes
SShape Transforms
Other processing | (ns patterning.sshapes
(:require [patterning.maths :as maths]
[clojure.data :refer [diff]]
[clojure.spec.alpha :as s]
[orchestra.spec.test :as stest]
)
#?(:clj (:require [patterning.macros :refer [optional-styled-primitive]])
:cljs (:require-macros [patterning.m... |
699931e8869d4d04ac532e80d28040ba6b591b641977747851b478a2835988fb | camlp5/camlp5 | exparser.ml | (* camlp5r *)
(* exparser.ml,v *)
Copyright ( c ) INRIA 2007 - 2017
(* #load "q_MLast.cmo" *)
type spat_comp =
SpTrm of MLast.loc * MLast.patt * MLast.expr option MLast.v
| SpNtr of MLast.loc * MLast.patt * MLast.expr
| SpLet of MLast.loc * MLast.patt * MLast.expr
| SpLhd of MLast.loc * MLast.patt list li... | null | https://raw.githubusercontent.com/camlp5/camlp5/467c1f97c5fa8aba343a4a15ffa24ad3cd55e4aa/ocaml_src/main/exparser.ml | ocaml | camlp5r
exparser.ml,v
#load "q_MLast.cmo"
Converting into AST
Streams | Copyright ( c ) INRIA 2007 - 2017
type spat_comp =
SpTrm of MLast.loc * MLast.patt * MLast.expr option MLast.v
| SpNtr of MLast.loc * MLast.patt * MLast.expr
| SpLet of MLast.loc * MLast.patt * MLast.expr
| SpLhd of MLast.loc * MLast.patt list list
| SpStr of MLast.loc * MLast.patt
;;
type sexp_comp =
... |
c3c0b999adb857e22badecda70523413acb78c7903a2e3330c7e11a3ba230965 | geneweb/geneweb | mergeIndOk.ml | Copyright ( c ) 1998 - 2007 INRIA
open Config
open Def
open Gwdb
open Util
let rec merge_lists l1 = function
| x2 :: l2 ->
if List.mem x2 l1 then merge_lists l1 l2 else merge_lists (l1 @ [ x2 ]) l2
| [] -> l1
let merge_strings base is1 sep is2 =
let n1 = sou base is1 in
let n2 = sou base is2 in
if ... | null | https://raw.githubusercontent.com/geneweb/geneweb/7b71f8f2f75e0e847818f821a0267938f38c9cf5/lib/mergeIndOk.ml | ocaml | de la fusion des évènements principaux. | Copyright ( c ) 1998 - 2007 INRIA
open Config
open Def
open Gwdb
open Util
let rec merge_lists l1 = function
| x2 :: l2 ->
if List.mem x2 l1 then merge_lists l1 l2 else merge_lists (l1 @ [ x2 ]) l2
| [] -> l1
let merge_strings base is1 sep is2 =
let n1 = sou base is1 in
let n2 = sou base is2 in
if ... |
8206efbc6d1b5af1e6ad0277d4385c3529feac787f89d670be22534f61abb9df | kupl/LearnML | original.ml | let rec sigma (f : int -> int) (a : int) (b : int) : int = 0
| null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/sigma/sub32/original.ml | ocaml | let rec sigma (f : int -> int) (a : int) (b : int) : int = 0
| |
e5751c16abda188cd23fb87b3ed0b942eeb39169aa4a578e357ce56ece9aae65 | gregnwosu/haskellbook | UnforcedBottom.hs | module UnforcedBottoms where
import Control.Exception
noWhammies :: IO (Either SomeException ())
noWhammies =
try undefined
megaButtums :: IO (Either SomeException ())
megaButtums =
try $ return undefined
-- The issue is that nonstrictness means burying the bottom in a return causes the bottom not to get fo... | null | https://raw.githubusercontent.com/gregnwosu/haskellbook/b21fb6772e58f07cff334d9c551d0477ec856897/chapter30/src/UnforcedBottom.hs | haskell | The issue is that nonstrictness means burying the bottom in a return causes the bottom not to get forced until youre already past the try resulting in an uncaught error inside the Right constructor. | module UnforcedBottoms where
import Control.Exception
noWhammies :: IO (Either SomeException ())
noWhammies =
try undefined
megaButtums :: IO (Either SomeException ())
megaButtums =
try $ return undefined
|
5d0ca2adafb8014a67779f8355a67af16e1c4dc4b4b501ac84ce23d619ae9d5e | tonyg/kali-scheme | defdata.scm | ; -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
Macros for defining data types .
; An ugly and unsafe macro for defining VM data structures.
;
; (DEFINE-PRIMITIVE-DATA-TYPE <name> <type... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/vm/defdata.scm | scheme | -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
An ugly and unsafe macro for defining VM data structures.
(DEFINE-PRIMITIVE-DATA-TYPE <name> <type> <immutable?> <constructor-name>
<slot>*)
<slot> ::= (<accessor-name>) | (<accessor-name> <modifier-name>)
(define-primitive-data-... | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
Macros for defining data types .
( define pair - size 3 )
( define ( set - car ! x ) ( d - vector - set ! x 0 ) )
( define ) ( d - vector - ref x 1 ) )
(define-syntax define-primi... |
5b064fa5964fc3e4b167736e2751476b0b3f35b79d75c9ef404cd0b884e9dd73 | philipcristiano/sssftp | sssftp_s3_parsing_test.erl | -module(sssftp_s3_parsing_test).
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
-define(MUT, sssftp_s3_parsing).
make_s3(Key) ->
[{key, Key}].
filter_empty_test() ->
?assertEqual({[], []},
?MUT:filter_s3_abs_path("uploads/user/", "/", [])).
filter_root_doesnt_show_root_te... | null | https://raw.githubusercontent.com/philipcristiano/sssftp/186a2a0f77ef0dec7966414a3173d4a66a32d796/test/sssftp_s3_parsing_test.erl | erlang | -module(sssftp_s3_parsing_test).
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
-define(MUT, sssftp_s3_parsing).
make_s3(Key) ->
[{key, Key}].
filter_empty_test() ->
?assertEqual({[], []},
?MUT:filter_s3_abs_path("uploads/user/", "/", [])).
filter_root_doesnt_show_root_te... | |
c768eefad36daa5b0262c6fbdddd140fefcd04f7a61ea0ac285e107dad0ae500 | oliyh/re-graph | figwheel_runner.cljs | ;; This test runner is intended to be run from the command line
(ns re-graph.figwheel-runner
(:require [re-graph.core-test]
[re-graph.integration-test]
[figwheel.main.testing :refer [run-tests-async]]))
(defn -main [& _args]
(run-tests-async 5000))
| null | https://raw.githubusercontent.com/oliyh/re-graph/2a1a06fdba6e458c1637a6922944061d422e633e/test/re_graph/figwheel_runner.cljs | clojure | This test runner is intended to be run from the command line | (ns re-graph.figwheel-runner
(:require [re-graph.core-test]
[re-graph.integration-test]
[figwheel.main.testing :refer [run-tests-async]]))
(defn -main [& _args]
(run-tests-async 5000))
|
5b8d021ad1a2d9752ad76f6abda946f031cf10c44629a90564cfdcf7ce12a7ab | erlyvideo/publisher | packet_codec.erl | @author < > [ ]
2010
%%% @doc RTSP and SIP coder/decoder module
%%% @end
@reference See < a href=" / erlmedia " target="_top"></a > for common information .
%%% @end
%%%
%%% This file is part of erlmedia.
%%%
%%% erlmedia is free software: you can redistribute it and/or modify
it under th... | null | https://raw.githubusercontent.com/erlyvideo/publisher/5bb2dfa6477c46160dc5fafcc030fc3f5340ec80/apps/erlmedia/src/packet_codec.erl | erlang | @doc RTSP and SIP coder/decoder module
@end
@end
This file is part of erlmedia.
erlmedia is free software: you can redistribute it and/or modify
(at your option) any later version.
erlmedia is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty o... | @author < > [ ]
2010
@reference See < a href=" / erlmedia " target="_top"></a > for common information .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General... |
57284923e78a3b01d4f9796f120582ce3d2cb7c3725f78a591cc15642c46335d | zenhack/mule | paths.mli | include module type of Paths_t
val sexp_of_t : t -> Sexp.t
val resolve_embed : here:string -> loc:Common_ast.Loc.t -> target:string -> string
val resolve_path : here:string -> loc:Common_ast.Loc.t -> target:string -> t
val base_filepath : t -> string
| null | https://raw.githubusercontent.com/zenhack/mule/f3e23342906d834abb9659c72a67c1405c936a00/src/mule/lib/paths.mli | ocaml | include module type of Paths_t
val sexp_of_t : t -> Sexp.t
val resolve_embed : here:string -> loc:Common_ast.Loc.t -> target:string -> string
val resolve_path : here:string -> loc:Common_ast.Loc.t -> target:string -> t
val base_filepath : t -> string
| |
590c5cfd74182b069f9f77f510a966256033f8a401c2be6715e92c91bbf0dc49 | JonasDuregard/sized-functors | Sized.hs |
|
This module provides the ' Sized ' class . Instances of this class are typically collection data types for infinite sets of values with a finite number of values of any given size .
A simple example is " Control . Enumerable . Count " that just counts the number of values of each size . " Control . Enumerable... | null | https://raw.githubusercontent.com/JonasDuregard/sized-functors/d76bb90ec31b915f9b2469e056a910c30eab5fa3/Control/Sized.hs | haskell | | A sized functor is an applicative functor extended with a notion of cost/size of contained values. This is useful for any type of bounded recursion over infinite sets, most notably for various kind of enumerations.
| Increases the cost/size of all values in the given set.
| Default: @pair a b = (,) <$> a <*> b@.... |
|
This module provides the ' Sized ' class . Instances of this class are typically collection data types for infinite sets of values with a finite number of values of any given size .
A simple example is " Control . Enumerable . Count " that just counts the number of values of each size . " Control . Enumerable... |
9a4eeb49806ae09ead932aa3510d0f41a618b148e1c0370881a697d04a931e45 | erlang/corba | tracer.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1999 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/ic/examples/pre_post_condition/tracer.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 1999 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
the corba backend .
-module(tracer).
-include("m.hrl").
-export([pre/3, post/4]).
-export([]).
pre(M, F, [Sta... |
c433d08a8959ed6563add63dd2a3c77c0d3939a45ae45a705712075124190ef1 | acieroid/scala-am | philosophers4.scm | ;; Dining philosophers problem
(letrec ((n 4) ; number of philosophers
(turns 5) ; number of turns to run
(forks (vector (new-lock) (new-lock) (new-lock) (new-lock)))
(pickup (lambda (left right)
(acquire (vector-ref forks (min left right)))
(acquire (vec... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/threads/variations/philosophers4.scm | scheme | Dining philosophers problem
number of philosophers
number of turns to run | (forks (vector (new-lock) (new-lock) (new-lock) (new-lock)))
(pickup (lambda (left right)
(acquire (vector-ref forks (min left right)))
(acquire (vector-ref forks (max left right)))))
(putdown (lambda (left right)
(release (vector-ref ... |
d6ba90de10d96d829c01e987d0d998fd64dd366e8a1bf39039fd0c2f226959d0 | troy-west/into | topic_test.clj | (ns operativ.kafka.topic-test
(:require [clojure.test :refer :all]
[operativ.kafka.topic :as topic]
[operativ.test.data :as data]))
;; TODO: Technical Challenge! Make the test pass.
(deftest sizes
(is (= data/sizes
(topic/sizes data/topics))))
;; TODO: Optional Bonus Extension!
(... | null | https://raw.githubusercontent.com/troy-west/into/d7a984f118660714a2c8f4ff08346650cf7cff8a/test/operativ/kafka/topic_test.clj | clojure | TODO: Technical Challenge! Make the test pass.
TODO: Optional Bonus Extension! | (ns operativ.kafka.topic-test
(:require [clojure.test :refer :all]
[operativ.kafka.topic :as topic]
[operativ.test.data :as data]))
(deftest sizes
(is (= data/sizes
(topic/sizes data/topics))))
(deftest categories
(is (= data/categories-physical
(topic/categories-phys... |
73db134e1dc6ff20fa6d65f93e6c881c2737379cfec1baedcd07a7cf4260e5b4 | neovimhaskell/nvim-hs | Neovim.hs | |
Module : Neovim
Description : API for the neovim plugin provider /nvim - hs/
Copyright : ( c )
License : Apache-2.0
Maintainer :
Stability : experimental
Portability : GHC ( due to )
This module should contain all the things you need to write neovim plugins in... | null | https://raw.githubusercontent.com/neovimhaskell/nvim-hs/9d0a040c24f060da57e47e1b720b99ad32e6dfc7/src/Neovim.hs | haskell | * Installation
$installation
* Tutorial
** Motivation
$overview
** Combining existing plugins
** Creating a plugin
$creatingplugins
** Subscribing to notifications or events
** Creating a stateful plugin
** Calling remote functions
$remote
* Unsorted exports
This section contains just a bunch of more or l... | |
Module : Neovim
Description : API for the neovim plugin provider /nvim - hs/
Copyright : ( c )
License : Apache-2.0
Maintainer :
Stability : experimental
Portability : GHC ( due to )
This module should contain all the things you need to write neovim plugins in... |
f4091790bafa1a85504676db7ad7b90739aedcfcca4248cddd15381d2235502c | finnishtransportagency/harja | yha_test.clj | (ns harja.palvelin.palvelut.yha-test
(:require [clojure.test :refer :all]
[harja.palvelin.komponentit.tietokanta :as tietokanta]
[harja.palvelin.komponentit.fim-test :refer [+testi-fim+]]
[harja.palvelin.palvelut.yllapitokohteet.paallystys :refer :all]
[harja.palvelin.i... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/c57d742beaff2bef7b30318819f07d4a13423404/test/clj/harja/palvelin/palvelut/yha_test.clj | clojure | (ns harja.palvelin.palvelut.yha-test
(:require [clojure.test :refer :all]
[harja.palvelin.komponentit.tietokanta :as tietokanta]
[harja.palvelin.komponentit.fim-test :refer [+testi-fim+]]
[harja.palvelin.palvelut.yllapitokohteet.paallystys :refer :all]
[harja.palvelin.i... | |
7c7dc1c546bf9ab2760e90971123279258f09779b4570cd875a734a97b74d3d2 | xh4/web-toolkit | class.lisp | (in-package :utility)
(defmacro replace-class-option (name key &rest values)
(with-gensyms (pos/s)
`(if-let ((,pos/s (position ,key ,name :key 'first)))
(setf (nth ,pos/s ,name) (list ,key ,@values))
(appendf ,name (list (list ,key ,@values))))))
(defmacro rewrite-class-option (name key &rest valu... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/utility/class.lisp | lisp | (in-package :utility)
(defmacro replace-class-option (name key &rest values)
(with-gensyms (pos/s)
`(if-let ((,pos/s (position ,key ,name :key 'first)))
(setf (nth ,pos/s ,name) (list ,key ,@values))
(appendf ,name (list (list ,key ,@values))))))
(defmacro rewrite-class-option (name key &rest valu... | |
c92ea0eb435d8bfbfc5ad805d0b271055a2899921ebfa190c5a1978c0952d9bc | borodust/trivial-gamekit | gamekit.lisp | (cl:in-package :trivial-gamekit.documentation)
(docstring (macro-function 'defgame)
"Defines a game class that can be passed to [`#'start`](#gamekit-start) to run
a game. `name` is the name of a class generated. `classes` are names of
superclasses, `slots` - standard class slots and `opts` are class options. So,
pr... | null | https://raw.githubusercontent.com/borodust/trivial-gamekit/17e4be8ff69e711346dddda0680677ca5bafc61b/docs/gamekit.lisp | lisp | some game related state
options
1 ) , stick
0 ) and stick right ( 1;0 ) . | (cl:in-package :trivial-gamekit.documentation)
(docstring (macro-function 'defgame)
"Defines a game class that can be passed to [`#'start`](#gamekit-start) to run
a game. `name` is the name of a class generated. `classes` are names of
superclasses, `slots` - standard class slots and `opts` are class options. So,
pr... |
d153e3b24da9a13d8728e363d939e399b61df2f746ac4f79359ecc312cab4f16 | LightAndLight/qtt | Unify.hs | # LANGUAGE LambdaCase #
module Unify where
import Bound.Class (Bound (..))
import Bound.Context (Context)
import qualified Bound.Context as Context
import Bound.Scope (Scope, fromScope)
import Bound.Var (Var (..), unvar, _F)
import Control.Lens.Fold ((^?))
import Data.Bool (bool)
import Data.Map (Map)
import qualifie... | null | https://raw.githubusercontent.com/LightAndLight/qtt/60d4d6ccae80267c59ff2c540a57e8fcb4ebfa4e/src/Unify.hs | haskell | (unvar (const Nothing) ctx)
a mapping from bound variables to terms is valid if it
maps bound variables to bound variables
a mapping from free variables to terms is valid as long
as it contains no bound variables | # LANGUAGE LambdaCase #
module Unify where
import Bound.Class (Bound (..))
import Bound.Context (Context)
import qualified Bound.Context as Context
import Bound.Scope (Scope, fromScope)
import Bound.Var (Var (..), unvar, _F)
import Control.Lens.Fold ((^?))
import Data.Bool (bool)
import Data.Map (Map)
import qualifie... |
eeeb1a323a3353129726d7cef521b03e343bcf41796ff178389771e0c948ccac | dinosaure/facteur | ex.ml | let () =
let magic = Magic.magic_init (Bytes.make 8 '\000') [ Magic.MIME_TYPE ] in
Magic.magic_load magic None ;
print_endline (Magic.magic_file magic Sys.argv.(1)) ;
Magic.magic_close magic
| null | https://raw.githubusercontent.com/dinosaure/facteur/d3f27e44107775cc699bfc62b209c2483e3675ac/bin/ex.ml | ocaml | let () =
let magic = Magic.magic_init (Bytes.make 8 '\000') [ Magic.MIME_TYPE ] in
Magic.magic_load magic None ;
print_endline (Magic.magic_file magic Sys.argv.(1)) ;
Magic.magic_close magic
| |
932482ed8d096d7b2371824c5fa49d3e34f199afa2f0abbbd66ae037d1f887e6 | fujita-y/digamma | show-gl-version.scm | (import (digamma gl) (digamma glut) (digamma c-types))
(glutInit (make-c-int (c-main-argc)) (c-main-argv))
(glutCreateWindow (string->utf8/nul "Digamma"))
(format #t "~a~%~!" (utf8->string (make-bytevector-mapping (glGetString GL_VERSION) 1024)))
| null | https://raw.githubusercontent.com/fujita-y/digamma/5a31f9fd67737fd857ada643d5548155a2ed0e76/toolbox/show-gl-version.scm | scheme | (import (digamma gl) (digamma glut) (digamma c-types))
(glutInit (make-c-int (c-main-argc)) (c-main-argv))
(glutCreateWindow (string->utf8/nul "Digamma"))
(format #t "~a~%~!" (utf8->string (make-bytevector-mapping (glGetString GL_VERSION) 1024)))
| |
59e107ea7328a1d977e05d0fa3aacdc57ff1a134c0593182329298f76210365a | ddellacosta/om-cookbook | project.clj | (defproject om-examples "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url ""
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2234"]
[org.clojure/core.async "0.1.303.0-886421-alpha"]
[om "0.6.4"]
[sablono "0.2.1... | null | https://raw.githubusercontent.com/ddellacosta/om-cookbook/fa123884c7d3023e2b4832d69bc69d9a9abacec7/project.clj | clojure | (defproject om-examples "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url ""
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/clojurescript "0.0-2234"]
[org.clojure/core.async "0.1.303.0-886421-alpha"]
[om "0.6.4"]
[sablono "0.2.1... | |
62638ab8cb452821f3d8c963bf013f30783a780eac3dc0d67d6a69633be6f9f4 | Feldspar/feldspar-language | Options.hs | --
Copyright ( c ) 2009 - 2011 , ERICSSON AB
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions are met:
--
-- * Redistributions of source code must retain the above copyright notice,
-- this ... | null | https://raw.githubusercontent.com/Feldspar/feldspar-language/499e4e42d462f436a5267ddf0c2f73d5741a8248/src/Feldspar/Compiler/Options.hs | haskell |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redi... | Copyright ( c ) 2009 - 2011 , ERICSSON AB
* Neither the name of the ERICSSON AB nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED . IN NO EVENT SHALL THE ... |
c1761856436e68e1176326e182122d523019073867302880c06fb81906f6e42d | lilactown/exo | helix.clj | (ns clj-kondo.lilactown.helix
(:require
[clj-kondo.hooks-api :as api]))
(defn $
"Macro analysis for `helix.core/$` & `helix.dom/*`."
[{:keys [node]}]
(let [[fn-sym & body] (-> node :children)
[component-sym body] (if (api/token-node? (first body))
[(first body) ... | null | https://raw.githubusercontent.com/lilactown/exo/1f10b467b05b826890a57e64e7b144a4140bd979/.clj-kondo/lilactown/helix/clj_kondo/lilactown/helix.clj | clojure | (ns clj-kondo.lilactown.helix
(:require
[clj-kondo.hooks-api :as api]))
(defn $
"Macro analysis for `helix.core/$` & `helix.dom/*`."
[{:keys [node]}]
(let [[fn-sym & body] (-> node :children)
[component-sym body] (if (api/token-node? (first body))
[(first body) ... | |
7ab8e64698062363d8f8e4ac3f77e5ad522e9b592354d1b8879462910d5f3f03 | dzaporozhets/clojure-web-application | db.clj | (ns sample.db)
(def db (or (System/getenv "DATABASE_URL")
"postgresql:5432/sample"))
| null | https://raw.githubusercontent.com/dzaporozhets/clojure-web-application/8d813fc95080a8ebc9532c0a4067f540f7f91553/src/sample/db.clj | clojure | (ns sample.db)
(def db (or (System/getenv "DATABASE_URL")
"postgresql:5432/sample"))
| |
a07974904c702f1c07b9c6aa5880c21bec4ec08d9f733ce0ac83583adb417762 | Helium4Haskell/helium | Thompson23.hs | empty :: [a] -> Bool
empty as = (as == [])
helium does not have a class Eq
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/simple/thompson/Thompson23.hs | haskell | empty :: [a] -> Bool
empty as = (as == [])
helium does not have a class Eq
| |
0781dd827347110e571d02d7de9821874ac628089e0ec1c862a6389766b7874f | dwayne/eopl3 | parser.rkt | #lang eopl
;; Program ::= Expression
;;
;; Expression ::= Number
;;
;; ::= Identifier
;;
;; ::= -(Expression, Expression)
;;
;; ::= zero?(Expression)
;;
;; ::= if Expression then Expression else Expression
;;
;; ::= cond {Expression ==> Expression}* end
;;
;; ... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/03-ch3/interpreters/racket/NAMELESS-PROC-3.38/parser.rkt | racket | Program ::= Expression
Expression ::= Number
::= Identifier
::= -(Expression, Expression)
::= zero?(Expression)
::= if Expression then Expression else Expression
::= cond {Expression ==> Expression}* end
::= let Identifier = Expression ... | #lang eopl
(provide
AST
program
a-program
expression expression?
const-exp
var-exp
diff-exp
zero?-exp
if-exp
cond-exp
let-exp
proc-exp
call-exp
nameless-var-exp
nameless-let-exp
nameless-proc-exp
Parser
parse)
(define scanner-spec
'((number (digit (arbno digit)) number)
(identifier (let... |
24440c779c2f0015f4ed0d7c6ddc776dda20344b59277d3ba7294186c34e6d74 | janestreet/memtrace_viewer_with_deps | time_range.mli | open! Core_kernel
type t =
{ lower_bound : Time_ns.Span.t option
; upper_bound : Time_ns.Span.t option
}
[@@deriving sexp, bin_io, equal]
val range : Time_ns.Span.t option -> Time_ns.Span.t option -> t
val all : t
val is_all : t -> bool
* Return -1 if the given value is less than the whole range , 0 if it 's w... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/common/time_range.mli | ocaml | * Return whether the range's lower bound is either [None] or [<= lower] and its upper
bound is either [None] or [>= upper]. | open! Core_kernel
type t =
{ lower_bound : Time_ns.Span.t option
; upper_bound : Time_ns.Span.t option
}
[@@deriving sexp, bin_io, equal]
val range : Time_ns.Span.t option -> Time_ns.Span.t option -> t
val all : t
val is_all : t -> bool
* Return -1 if the given value is less than the whole range , 0 if it 's w... |
2e016e9e350213c180e5b657710d36c512bf8e29688c4fe3a631a438a1847ecf | nikita-volkov/rebase | Unicode.hs | module Rebase.GHC.Unicode
(
module GHC.Unicode
)
where
import GHC.Unicode
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/GHC/Unicode.hs | haskell | module Rebase.GHC.Unicode
(
module GHC.Unicode
)
where
import GHC.Unicode
| |
28d1f4e5dc5c5b456d149ebf8c2df6315af156cbf002a110da396b02f484f0c7 | OCamlPro/ocp-indent | indentBlock.ml | (**************************************************************************)
(* *)
Copyright 2011
(* Copyright 2012,2015 OCamlPro *)
(* ... | null | https://raw.githubusercontent.com/OCamlPro/ocp-indent/7c4d434132cebc15a8213c8be9e7323692eb0a2b/src/indentBlock.ml | ocaml | ************************************************************************
Copyright 2012,2015 OCamlPro
All rights reserved.This f... | Copyright 2011
GNU Lesser General Public License version 2.1 with linking
is distributed in the hope that it will be useful ,
open Pos
open Nstream
open Approx_lexer
open Util
module Node = struct
type extension_kind = ExtNode | Attr
... |
f7b9cf7382747a66f2a6a0b7af99562438f58ecd04fbaed9704cd88c3dcf8a12 | richmit/mjrcalc | sup-lm-asdf.lisp | ;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;; @file sup-lm-asdf.lisp
@author < >
@brief Load... | null | https://raw.githubusercontent.com/richmit/mjrcalc/96f66d030034754e7d3421688ff201f4f1db4833/sup-lm-asdf.lisp | lisp | -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*-
@file sup-lm-asdf.lisp
@std Common Lisp
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
and/or other materials provid... | @author < >
@brief Load and use - package all * MJRCALC * packages via ADSF.@EOL
@parblock
Copyright ( c ) 1998,2002,2004,2007,2010,2011,2015 , < > All rights reserved .
1 . Redistributions of source code must retain the above copyright notice , this list of conditions , and the followin... |
2db5fe9a27681ef56a124bd4ad01531c7ab74f53b45a52157bd96cb498b660fe | SimulaVR/godot-haskell | EditorNavigationMeshGenerator.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Tools.EditorNavigationMeshGenerator
(Godot.Tools.EditorNa... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Tools/EditorNavigationMeshGenerator.hs | haskell | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Tools.EditorNavigationMeshGenerator
(Godot.Tools.EditorNa... | |
05b70530b6c577403938dfcb2605013326374e0903f5d0bfb8719fa307d0867a | monky-hs/monky | Dzen2.hs |
Copyright 2016
This file is part of .
is free software : you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version . ... | null | https://raw.githubusercontent.com/monky-hs/monky/5430352258622bdb0a54f6a197090cc4ef03102f/Monky/Outputs/Dzen2.hs | haskell | # LANGUAGE OverloadedStrings #
Assumes @" | "@ as divider
^The height of your dzen bar in pixel (required for block-drawing)
^Path to the directory cointaining your .xbm files.
in \<monkydir\>\/xbm\/
^The height of your dzen bar in pixel (for block drawing)
^The height of your dzen bar in pixel (required for bloc... |
Copyright 2016
This file is part of .
is free software : you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version . ... |
e32d82846e118d4234b6f862ebcee42038927c3a8b410f401db4f4f206b07c3b | kowainik/stan | Config.hs | # LANGUAGE ApplicativeDo #
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedLabels #-}
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
|
Copyright : ( c ) 2020 Kowainik
SPDX - License - Identifier :... | null | https://raw.githubusercontent.com/kowainik/stan/da36eac741466fe6f46dc3e56fca7806f8b41816/src/Stan/Config.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE OverloadedLabels #
* Data types
* Default
* Final stage
* Printing
* Apply config
| Main configuration type for the following purposes:
* Filtering inspections (including or ignoring) per scope (file,
directory, all)
| Type of 'Check': 'Include' or 'Exclude' '... | # LANGUAGE ApplicativeDo #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
|
Copyright : ( c ) 2020 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
@stan@ runtime configuration that allows cu... |
db695156bc19b90dc5605f49b020431845e8a02e466057dc8d815a6624dd87ff | BinaryAnalysisPlatform/bap | bap_core_theory_pass.mli | open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Bap_core_theory_definition
module type trans = functor (_ : Core) -> Core
val register :
?desc:string ->
?package:string -> string -> (module trans) -> unit
val lookup : Knowledge.Name.t -> (module trans)
val apply : Knowledge.Name.t list -> (module Core... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_core_theory/bap_core_theory_pass.mli | ocaml | open Core_kernel[@@warning "-D"]
open Bap_knowledge
open Bap_core_theory_definition
module type trans = functor (_ : Core) -> Core
val register :
?desc:string ->
?package:string -> string -> (module trans) -> unit
val lookup : Knowledge.Name.t -> (module trans)
val apply : Knowledge.Name.t list -> (module Core... | |
11d6b8a7fd1934692a6adb802e0b76d9930c3cbb9f0581940f4e2498e802bf5c | RokLenarcic/memento | caffeine.clj | (ns memento.caffeine
"Caffeine cache implementation."
{:author "Rok Lenarčič"}
(:require [memento.base :as b])
(:import (clojure.lang AFn)
(java.util Iterator)
(java.util.concurrent ConcurrentHashMap CompletableFuture ExecutionException)
(memento.base CacheKey EntryMeta ICache S... | null | https://raw.githubusercontent.com/RokLenarcic/memento/47b5129048d0cf9cad935a731cdd1b9c59101f48/src/memento/caffeine.clj | clojure | These are disallowed in Async caches
weak-values (.weakValues)
soft-values (.softValues)
not currently used because we don't build a loading cache
| (ns memento.caffeine
"Caffeine cache implementation."
{:author "Rok Lenarčič"}
(:require [memento.base :as b])
(:import (clojure.lang AFn)
(java.util Iterator)
(java.util.concurrent ConcurrentHashMap CompletableFuture ExecutionException)
(memento.base CacheKey EntryMeta ICache S... |
26d46d05fb5059f71caf7645ebbb815b9146528fc21b8d028e7176e80dadfb47 | NorfairKing/hastory | RegisterSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Hastory.Cli.Commands.RegisterSpec
( spec,
)
where
import Hastory.Cli.Commands.Register
import Hastory.Data.Server.DB
import Hastory.Data.Username
import Hastory.Server.TestUtils
import Servant.Client
import TestImport
spec :: Spec
spec =
se... | null | https://raw.githubusercontent.com/NorfairKing/hastory/35abbc79155bc7c5a0f6e0f3618c8b8bcd3889a1/hastory-cli/test/Hastory/Cli/Commands/RegisterSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
module Hastory.Cli.Commands.RegisterSpec
( spec,
)
where
import Hastory.Cli.Commands.Register
import Hastory.Data.Server.DB
import Hastory.Data.Username
import Hastory.Server.TestUtils
import Servant.Client
import TestImport
spec :: Spec
spec =
serverSpec
$ describe "register"
... |
f1443b95282800988bebc4bed8135ec57ec8eed9c4b711cbc2c774cead14ce8b | ogaml/ogaml | matrix2D.ml |
exception Matrix2D_exception of string
type t = (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array1.t
Utils , not exposed
let create () = Bigarray.Array1.create Bigarray.float32 Bigarray.c_layout 9
let get i j m = Bigarray.Array1.unsafe_get m (i + j*3) (* column major order *)
let set i j m v = Biga... | null | https://raw.githubusercontent.com/ogaml/ogaml/5e74597521abf7ba2833a9247e55780eabfbab78/src/math/matrix2D.ml | ocaml | column major order |
exception Matrix2D_exception of string
type t = (float, Bigarray.float32_elt, Bigarray.c_layout) Bigarray.Array1.t
Utils , not exposed
let create () = Bigarray.Array1.create Bigarray.float32 Bigarray.c_layout 9
let set i j m v = Bigarray.Array1.unsafe_set m (i + j*3) v
let to_bigarray m = m
let zero () =
le... |
3035d010812f4ef252ad3e90d2dee69c2c3a2f6d4bbcb4f45f8345280f853fd3 | haskell-mafia/boris | Results.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Test.IO.Boris.Store.Results where
import Boris.Core.Data
import Boris.Store.Results (Result (..))
import qualified Boris.Store.Results as Store
i... | null | https://raw.githubusercontent.com/haskell-mafia/boris/fb670071600e8b2d8dbb9191fcf6bf8488f83f5a/boris-store/test/Test/IO/Boris/Store/Results.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Test.IO.Boris.Store.Results where
import Boris.Core.Data
import Boris.Store.Results (Result (..))
import qualified Boris.Store.Results as Store
import Control.Monad.IO.Cl... |
218c91d39be3216fd61ced321d4078627b7e2b88484ac53a394d24a670fde96e | yesodweb/persistent | ToFromPersistValuesSpec.hs | {-# LANGUAGE DataKinds, ScopedTypeVariables #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUA... | null | https://raw.githubusercontent.com/yesodweb/persistent/eaf9d561a66a7b7a8fcbdf6bd0e9800fa525cc13/persistent/test/Database/Persist/TH/ToFromPersistValuesSpec.hs | haskell | # LANGUAGE DataKinds, ScopedTypeVariables #
# LANGUAGE OverloadedStrings #
DeriveAnyClass is not actually used by persistent-template
See
# LANGUAGE DeriveAnyClass # | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
#... |
8e4e7e611eafa0961349db97f2b6b0824491541181801c990034863042e294d5 | bpiel/guildsman | composite_nn.clj | (in-ns 'com.billpiel.guildsman.ops.composite)
based on nn_ops.py
(defn- mk-id
[^Graph g base-kw]
(-> base-kw
name
(str "_" (swap! (:counter g)
inc))
keyword))
(defn- mk-activation-template
[a]
(if (fn? a)
(a :$/input)
a))
(defn- mk-activation-plan
[templa... | null | https://raw.githubusercontent.com/bpiel/guildsman/59c9a7459de19525cfc54112f02127e0777a00ce/src/clj/com/billpiel/guildsman/ops/composite_nn.clj | clojure | (in-ns 'com.billpiel.guildsman.ops.composite)
based on nn_ops.py
(defn- mk-id
[^Graph g base-kw]
(-> base-kw
name
(str "_" (swap! (:counter g)
inc))
keyword))
(defn- mk-activation-template
[a]
(if (fn? a)
(a :$/input)
a))
(defn- mk-activation-plan
[templa... | |
f974756e57bd5b1c135f00a4137e6b02fc93881729342c384aa63a92979217ed | ekmett/ekmett.github.com | Ran.hs | module Control.Monad.CPS.Ran
( Ran(Ran,getRan)
) where
newtype Ran g h a = Ran { getRan :: forall b. (a -> g b) -> h b }
instance Functor (Ran g h) where
fmap f m = Ran (\k -> getRan m (k . f))
| null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/monad-cps/src/Control/Monad/CPS/Ran.hs | haskell | module Control.Monad.CPS.Ran
( Ran(Ran,getRan)
) where
newtype Ran g h a = Ran { getRan :: forall b. (a -> g b) -> h b }
instance Functor (Ran g h) where
fmap f m = Ran (\k -> getRan m (k . f))
| |
28d88abee74385b33bf3c13d527290ad55fc19769dfc149623ea2efb51c733f8 | gkaracha/quantcs-impl | TestSteve.hs |
* Example By , related to Okasaki 's Square Matrices
-- ----------------------------------------------------------------------------
data Nil (a :: *) = Nil
data Cons (n :: * -> *) (a :: *) = Cons a (n a)
data Square' (c :: (* -> *) -> (* -> *)) (n :: * -> *) (a :: *)
= Zero (n (n a)) | Succ (Square' c (c n)... | null | https://raw.githubusercontent.com/gkaracha/quantcs-impl/42f8726e2ad131c03c260003ff706c154635d1f4/Tests/TestSteve.hs | haskell | ----------------------------------------------------------------------------
| Simplified Eq class
instance ( forall m b.
Eq b => Eq (c m b)
, forall b.
Eq b => Eq (n b)
) => Eq (Square' c n a)
| Program expression |
* Example By , related to Okasaki 's Square Matrices
data Nil (a :: *) = Nil
data Cons (n :: * -> *) (a :: *) = Cons a (n a)
data Square' (c :: (* -> *) -> (* -> *)) (n :: * -> *) (a :: *)
= Zero (n (n a)) | Succ (Square' c (c n) a)
| Booleans
data Bool = True | False
class () => Eq (a :: *) where {
eq... |
4ca5b2e2de4e3d335e6c7dad16ac342b33b6d759b0dc5c077afcc6c045d0f30e | pkhuong/Napa-FFT3 | package.lisp | (defpackage "NAPA-FFT"
(:use)
(:export "COMPLEX-SAMPLE" "COMPLEX-SAMPLE-ARRAY"
"REAL-SAMPLE" "REAL-SAMPLE-ARRAY"
"DIRECTION" "SCALING" "WINDOWING"
"%ENSURE-TWIDDLES"
"%ENSURE-REVERSE" "GET-REVERSE"
"%ENSURE-FFT" "GET-FFT" "GET-WINDOWED-FFT"
"BIT-REV... | null | https://raw.githubusercontent.com/pkhuong/Napa-FFT3/f2d9614c7167da327c9ceebefb04ff6eae2d2236/package.lisp | lisp | (defpackage "NAPA-FFT"
(:use)
(:export "COMPLEX-SAMPLE" "COMPLEX-SAMPLE-ARRAY"
"REAL-SAMPLE" "REAL-SAMPLE-ARRAY"
"DIRECTION" "SCALING" "WINDOWING"
"%ENSURE-TWIDDLES"
"%ENSURE-REVERSE" "GET-REVERSE"
"%ENSURE-FFT" "GET-FFT" "GET-WINDOWED-FFT"
"BIT-REV... | |
58c19ead41a0ffc96665bdd86286806823d232087d8c6bffaef430004d4e6683 | acl2/acl2 | integer-operations@useless-runes.lsp | (C::VALUE-INTEGER->GET)
(C::INTEGERP-OF-VALUE-INTEGER->GET)
(C::VALUE-INTEGER->GET-BOUNDS
(52 2 (:REWRITE DEFAULT-<-1))
(41 2 (:REWRITE DEFAULT-<-2))
)
(C::VALUE-INTEGER->GET-OF-VALUE-FIX-VAL
(10 1 (:REWRITE C::VALUE-FIX-WHEN-VALUEP))
(5 1 (:REWRITE C::VALUEP-WHEN-VALUE-OPTIONP))
(3 3 (:TYPE-PRESCRIPTION C::VALUE... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/c/language/.sys/integer-operations%40useless-runes.lsp | lisp | (C::VALUE-INTEGER->GET)
(C::INTEGERP-OF-VALUE-INTEGER->GET)
(C::VALUE-INTEGER->GET-BOUNDS
(52 2 (:REWRITE DEFAULT-<-1))
(41 2 (:REWRITE DEFAULT-<-2))
)
(C::VALUE-INTEGER->GET-OF-VALUE-FIX-VAL
(10 1 (:REWRITE C::VALUE-FIX-WHEN-VALUEP))
(5 1 (:REWRITE C::VALUEP-WHEN-VALUE-OPTIONP))
(3 3 (:TYPE-PRESCRIPTION C::VALUE... | |
0279ebb7793a7d2246c64ae38608ac9fe4ab7ee07ce482ea3beb676ac9808e15 | fogus/thneed | associative.clj | (ns fogus.associative)
(defn dissoc-in [asc path]
(cond
(zero? (count path)) asc
(= 1 (count path)) (dissoc asc (first path))
:else
(let [[k & ks] path]
(if (contains? asc k)
(update asc k #(dissoc-in % ks))
asc))))
| null | https://raw.githubusercontent.com/fogus/thneed/953e22b5043853dfefec1f4c500135512f518a3a/src/fogus/associative.clj | clojure | (ns fogus.associative)
(defn dissoc-in [asc path]
(cond
(zero? (count path)) asc
(= 1 (count path)) (dissoc asc (first path))
:else
(let [[k & ks] path]
(if (contains? asc k)
(update asc k #(dissoc-in % ks))
asc))))
| |
880e4fa80c8f34a8828f946a742826375a9d60bcdd0302e6306d5a35f908aa83 | dwayne/eopl3 | parser.rkt | #lang eopl
;; Program ::= Expression
;;
;; Expression ::= Number
;;
;; ::= Identifier
;;
;; ::= -(Expression, Expression)
;;
;; ::= div(Expression, Expression)
;;
;; ::= zero?(Expression)
;;
;; ::= cons(Expression, Expression)
;;
;; ::= car(Expressio... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/05-ch5/interpreters/racket/EXCEPTIONS-5.38/parser.rkt | racket | Program ::= Expression
Expression ::= Number
::= Identifier
::= -(Expression, Expression)
::= div(Expression, Expression)
::= zero?(Expression)
::= cons(Expression, Expression)
::= car(Expression)
::= cdr(Expression)
... | #lang eopl
: : = let { Identifier = Expression } * in Expression
(provide
AST
program
a-program
expression expression?
const-exp
var-exp
diff-exp
div-exp
zero?-exp
cons-exp
car-exp
cdr-exp
null?-exp
emptylist-exp
list-exp
if-exp
let-exp
proc-exp
letrec-exp
call-exp
try-exp
raise-... |
7c41a1d5583efb17ce48f8d7ee32b104131f6186f38bb8e238caddc849b04de0 | locusmath/locus | object.clj | (ns locus.additive.ringoid.core.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.con.core.setpart :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]... | null | https://raw.githubusercontent.com/locusmath/locus/12061072ccfe6a28f87eb8bd4489397dcf4b93d8/src/clojure/locus/additive/ringoid/core/object.clj | clojure | A ringoid is an Ab-enriched category. This is the horizontal categorification of the abstract
algebraic concept of a ring.
Underlying multirelations of ringoids as categories
Ontology of ringoids | (ns locus.additive.ringoid.core.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.con.core.setpart :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]... |
f1aeef33125dd52fce8ee3a096630e476ebdc46ad47ace2fddd1bd87f845f9a4 | savonet/ocaml-taglib | discover.ml | module C = Configurator.V1
let check_class_code =
Printf.sprintf {|
#include <%s>
int main()
{
%s *x = NULL;
return 0;
}
|}
let () =
C.main ~name:"taglib-pkg-config" (fun c ->
let default : C.Pkg_config.package_conf =
{ libs = ["-ltaglib"]; cflags = [] }
in
let conf =
match ... | null | https://raw.githubusercontent.com/savonet/ocaml-taglib/deef16226ec6cce8675c36ab8a764bd65eb893d5/src/config/discover.ml | ocaml | module C = Configurator.V1
let check_class_code =
Printf.sprintf {|
#include <%s>
int main()
{
%s *x = NULL;
return 0;
}
|}
let () =
C.main ~name:"taglib-pkg-config" (fun c ->
let default : C.Pkg_config.package_conf =
{ libs = ["-ltaglib"]; cflags = [] }
in
let conf =
match ... | |
18596e1b1f9e125eefc290820685b47a0a3bb56da144a1208dfc80dde3079cf2 | klutometis/clrs | set.scm | (define-record-type :set
(make-set head tail)
set?
(head set-head set-set-head!)
(tail set-tail set-set-tail!))
(define-record-type :set-member
(make-set-member datum representative next)
set-member?
(datum set-member-datum)
(representative set-member-representative set-set-member-representative!)
(n... | null | https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/23.2/set.scm | scheme | (debug (if member (set-member-datum member))) | (define-record-type :set
(make-set head tail)
set?
(head set-head set-set-head!)
(tail set-tail set-set-tail!))
(define-record-type :set-member
(make-set-member datum representative next)
set-member?
(datum set-member-datum)
(representative set-member-representative set-set-member-representative!)
(n... |
1be878a4f487b10b559a454b6167b7365f94739ca4346fce66abcdc6c20b20f3 | input-output-hk/cardano-ledger | Core.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ConstrainedClassMethods #
# LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Cardano.Ledger.Alonzo.Core (
AlonzoEraTxOut (..),
AlonzoEraTxBody (..),
Script... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/49a84725c4c2ecabc80f6dac215881bc23920962/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Core.hs | haskell | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE ConstrainedClassMethods #
# LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Cardano.Ledger.Alonzo.Core (
AlonzoEraTxOut (..),
AlonzoEraTxBody (..),
Script... | |
7ff6ded90e0e016b5fe0a2275b4d21e38bb27f81a74529f9f637baa178cc37d0 | avsm/ocaml-yaml | m.ml | Copyright ( c ) 2017 Anil Madhavapeddy < >
*
* 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... | null | https://raw.githubusercontent.com/avsm/ocaml-yaml/3f883dee5986a7f27db5b026bab265f844789d5e/types/lib/m.ml | ocaml | Copyright ( c ) 2017 Anil Madhavapeddy < >
*
* 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... | |
1d081b306fc502c8f781ec2c460dfdfd5899f39b6869d85d8cfde396c624d915 | dgiot/dgiot | emqx_flapping_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2019 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/dgiot/dgiot/c601555e45f38d02aafc308b18a9e28c543b6f2c/test/emqx_flapping_SUITE.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2019 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_flapping_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-include_lib(... |
dba0cae4e6ddd09b27cde37755423f9ac28e57c4fd3718f1cf551c1a88962d42 | austinbirch/roam-cljs-example | roam.cljs | (ns roam-cljs-example.roam
(:require [applied-science.js-interop :as j]))
(defn q
([query]
(let [serialised-query (pr-str query)]
(-> (j/apply (j/get js/window :roamAlphaAPI)
:q
(to-array (into [serialised-query])))
(js->clj :keywordize-keys true))))
([query &... | null | https://raw.githubusercontent.com/austinbirch/roam-cljs-example/36743083a2953fc29f36041bbc06e1ce12e7a342/src/roam_cljs_example/roam.cljs | clojure | (ns roam-cljs-example.roam
(:require [applied-science.js-interop :as j]))
(defn q
([query]
(let [serialised-query (pr-str query)]
(-> (j/apply (j/get js/window :roamAlphaAPI)
:q
(to-array (into [serialised-query])))
(js->clj :keywordize-keys true))))
([query &... | |
0e421eab9bf30dd0f14f9886e7e4f54434a85d578e6ffcd797154c042ad3c711 | yogthos/components-example | subscriptions.cljs | (ns components-example.subscriptions
(:require [re-frame.core :refer [reg-sub]]))
(reg-sub
:page
(fn [db _]
(:page db)))
(reg-sub
:document
(fn [db [_ path]]
(let [doc (:document db)]
(if path (get-in doc path) doc))))
| null | https://raw.githubusercontent.com/yogthos/components-example/c369bde7916b6d15cb6a8b4ab05c562e16755b2a/src/cljs/components_example/subscriptions.cljs | clojure | (ns components-example.subscriptions
(:require [re-frame.core :refer [reg-sub]]))
(reg-sub
:page
(fn [db _]
(:page db)))
(reg-sub
:document
(fn [db [_ path]]
(let [doc (:document db)]
(if path (get-in doc path) doc))))
| |
c08c43067460fcdc38d2a668611d43dd1b20b9c67842b055167068a5870c6ba7 | phantomics/seed | seed.lisp | ;;;; seed.lisp
(in-package #:seed)
;; the routes below are examples, routing will be fully implemented later
(router base
(grammar-check :host "-service.seed"
:system :grammar-check)
(spell-check :host "-service.seed"
:system :spell-check))
(let ((contact-list nil))
(contact-create-in contact-lis... | null | https://raw.githubusercontent.com/phantomics/seed/f128969c671c078543574395d6b23a1a5f2723f8/seed.lisp | lisp | seed.lisp
the routes below are examples, routing will be fully implemented later |
(in-package #:seed)
(router base
(grammar-check :host "-service.seed"
:system :grammar-check)
(spell-check :host "-service.seed"
:system :spell-check))
(let ((contact-list nil))
(contact-create-in contact-list main-contact :port 8055 :root "./")
(defun contact-open ()
(contact-open-in cont... |
5f6e6a8c30477e63d7e32bd274626ebbcdcb5a3413f11ce7ed76468ca76bd5b8 | rescript-lang/rescript-compiler | res_parser.mli | module Scanner = Res_scanner
module Token = Res_token
module Grammar = Res_grammar
module Reporting = Res_reporting
module Diagnostics = Res_diagnostics
module Comment = Res_comment
type mode = ParseForTypeChecker | Default
type regionStatus = Report | Silent
type t = {
mode: mode;
mutable scanner: Scanner.t;
... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/6e345ff6e256620a4b4fb4b8713a86bee5114e75/res_syntax/src/res_parser.mli | ocaml | module Scanner = Res_scanner
module Token = Res_token
module Grammar = Res_grammar
module Reporting = Res_reporting
module Diagnostics = Res_diagnostics
module Comment = Res_comment
type mode = ParseForTypeChecker | Default
type regionStatus = Report | Silent
type t = {
mode: mode;
mutable scanner: Scanner.t;
... | |
6e5180115c669840242354a492e152976666db300168bc04b72d665768befa51 | avsm/eeww | connection.ml | open Dispatch
type t
external network_connection_create : Endpoint.t -> Parameters.t -> t
= "ocaml_network_connection_create"
external network_connection_set_queue : Queue.t -> t -> unit
= "ocaml_network_connection_set_queue"
external network_connection_retain : t -> unit
= "ocaml_network_connection_retain"
... | null | https://raw.githubusercontent.com/avsm/eeww/ab64c5391b67fb3f5b1d3de5e0a5a5cb4c80207b/lib/network/lib/connection.ml | ocaml | open Dispatch
type t
external network_connection_create : Endpoint.t -> Parameters.t -> t
= "ocaml_network_connection_create"
external network_connection_set_queue : Queue.t -> t -> unit
= "ocaml_network_connection_set_queue"
external network_connection_retain : t -> unit
= "ocaml_network_connection_retain"
... | |
55018e4c8df19cb4eaafee951fc1261344b91d7ceee98d8afd6e1c46b8776b51 | pfdietz/ansi-test | atanh.lsp | ;-*- Mode: Lisp -*-
Author :
Created : We d Feb 11 19:26:25 2004
;;;; Contains: Tests of ATANH
(deftest atanh.1
(let ((result (atanh 0)))
(or (eqlt result 0)
(eqlt result 0.0)))
t)
(deftest atanh.2
(loop for type in '(short-float single-float double-float long-float)
for zer... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/numbers/atanh.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of ATANH
Add accuracy tests here
Error tests | Author :
Created : We d Feb 11 19:26:25 2004
(deftest atanh.1
(let ((result (atanh 0)))
(or (eqlt result 0)
(eqlt result 0.0)))
t)
(deftest atanh.2
(loop for type in '(short-float single-float double-float long-float)
for zero = (coerce 0 type)
unless (equal (multiple-va... |
2cf307846e93e54eadae0775a9725caff076b9a72bc9019b088f85e6e4bf7814 | dparis/gen-phzr | signal.cljs | (ns phzr.signal
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [remove]))
(defn ->Signal
"A Signal is an event dispatch mechansim that supports broadcasting to multiple listeners.
Event listeners are... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/signal.cljs | clojure | ` | (ns phzr.signal
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [remove]))
(defn ->Signal
"A Signal is an event dispatch mechansim that supports broadcasting to multiple listeners.
Event listeners are... |
bcdd0c8b6fa96e3680d835292cabc8f35c21beb83b405657524f4377d057c86d | hidaris/thinking-dumps | stlc-model.rkt | #lang racket/base
(require redex racket/match)
(provide stlc typeof)
(define-language stlc
; expressions
(e x
(λ (x τ) e)
(e e)
(if0 e e e)
(+ e e)
number
(e as τ)
(inl e)
(inr e)
(case e of
(inl x) => e
! (inr x) => e))
; types
(τ num
(τ -> τ)... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/semantic/stlc%2Bsum/stlc-model.rkt | racket | expressions
types
value forms | #lang racket/base
(require redex racket/match)
(provide stlc typeof)
(define-language stlc
(e x
(λ (x τ) e)
(e e)
(if0 e e e)
(+ e e)
number
(e as τ)
(inl e)
(inr e)
(case e of
(inl x) => e
! (inr x) => e))
(τ num
(τ -> τ)
(τ + τ))
(v numbe... |
e56d76d9df05a0be7ef24871d3ac2f48e00c624eebcb2b556bdc96e8bf42686f | blacktaxi/inversion | Fingering.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE StandaloneDeriving #
module Fingering where
import qualified Data.Map as M
import Data.List (sortBy)
import Data.Ord (comparing)
import Instrument (Instrument (..), GuitarString (..), StringName, FretNumber)
import Note (Note (..), Octave (..), absSem... | null | https://raw.githubusercontent.com/blacktaxi/inversion/f11aa90d6fe6ab7a1f7fa3c3b19bfcf5c1fca451/src/Fingering.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE ConstraintKinds # | # LANGUAGE StandaloneDeriving #
module Fingering where
import qualified Data.Map as M
import Data.List (sortBy)
import Data.Ord (comparing)
import Instrument (Instrument (..), GuitarString (..), StringName, FretNumber)
import Note (Note (..), Octave (..), absSemitone)
newtype Fret = Fret FretNumber
deriving (Eq,... |
bb0b1293c1bcba6e39bded181538bbf886de1be9ee0cf488698c62c2c6da421c | krisajenkins/petrol | messages.cljs | (ns petrol-examples.spotify.messages)
(defrecord ChangeSearchTerm [term])
(defrecord Search [])
(defrecord SearchResults [body])
| null | https://raw.githubusercontent.com/krisajenkins/petrol/607166ab48cf6193b6ad00bcd63bd3ff7f3958f7/examples/src/petrol-examples/spotify/messages.cljs | clojure | (ns petrol-examples.spotify.messages)
(defrecord ChangeSearchTerm [term])
(defrecord Search [])
(defrecord SearchResults [body])
| |
1cac1fdf7096d39a8adcb5d70829fa52723f8c6d5d7040b5b48b52c51af1b754 | Davorak/PandocFilters | pandocDotFilter.hs | #!/usr/bin/env runhaskell
import Text.Pandoc.JSON
import System.Process
import Control.Concurrent
import Data.List
main :: IO ()
main = toJSONFilter insertDot
-- | Poor mans function to get a file extension
getFileExtension fileName = reverse ext
where
(ext, _) = break (=='.') . reverse $ fileName
insertDot ... | null | https://raw.githubusercontent.com/Davorak/PandocFilters/288a9fb1b566b13a8ae21f869ef384e32972c446/filters/pandocDotFilter.hs | haskell | | Poor mans function to get a file extension | #!/usr/bin/env runhaskell
import Text.Pandoc.JSON
import System.Process
import Control.Concurrent
import Data.List
main :: IO ()
main = toJSONFilter insertDot
getFileExtension fileName = reverse ext
where
(ext, _) = break (=='.') . reverse $ fileName
insertDot :: Block -> IO Block
insertDot (CodeBlock (ident... |
6e5d07efb230614a755ef746ecd6751c1e2128170b6522f2e15c574b7f8ef047 | rethab/h-gpgme | Gen.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : Crypto . Gpgme . Key . Gen
License : Public Domain
Maintainer :
Stability : experimental
Portability : untested
Key generation for h - gpgme .
It is suggested to import as qualified . For example :
> import qualified Crypto . Gpgme ... | null | https://raw.githubusercontent.com/rethab/h-gpgme/72c8bb6bde6b379272da911e0d7aa9be2450acc6/src/Crypto/Gpgme/Key/Gen.hs | haskell | # LANGUAGE OverloadedStrings #
* Usage
* Parameters
** BitSize
** ExpireDate
* Other
| Key generation parameters.
See: -GPG-key-generation.html
^ Add custom XML
| Default parameters
Intended to be used to build custom paramemters.
> params = (def :: GenKeyParams) { keyType = Just Dsa }
See tests for wor... |
|
Module : Crypto . Gpgme . Key . Gen
License : Public Domain
Maintainer :
Stability : experimental
Portability : untested
Key generation for h - gpgme .
It is suggested to import as qualified . For example :
> import qualified Crypto . Gpgme . Key . Gen as G
Module : Cr... |
c7589d6d9b385162fac461f0bf8430db078ec9f612f45aa4e373dfde3b35e91f | projectcs13/sensor-cloud | virtual_stream_process_supervisor.erl | @author < >
%% [www.csproj13.student.it.uu.se]
%% @version 1.0
[ Copyright information ]
%%
%% @doc == virtual_stream_process_supervisor ==
%% This module represents a virtual stream process supervisor which
%% initializes all virtual stream processes and puts them under its
%% supervision.
%%
%% @end
-modu... | null | https://raw.githubusercontent.com/projectcs13/sensor-cloud/0302bd74b2e62fddbd832fb4c7a27b9c62852b90/src/pubsub/virtual_stream_process_supervisor.erl | erlang | [www.csproj13.student.it.uu.se]
@version 1.0
@doc == virtual_stream_process_supervisor ==
This module represents a virtual stream process supervisor which
initializes all virtual stream processes and puts them under its
supervision.
@end
====================================================================
... | @author < >
[ Copyright information ]
-module(virtual_stream_process_supervisor).
-include_lib("erlastic_search.hrl").
-include_lib("json.hrl").
-include_lib("common.hrl").
-include("debug.hrl").
-behaviour(supervisor).
-export([init/1]).
-export([start_link/0, start_processes/0, add_child/3, terminate_chil... |
0ff340479746ac796028790d8a98b162bae058d6b46ce86289e2c4cef3d41567 | s-expressionists/Cleavir | type-information.lisp | (cl:in-package #:cleavir-environment)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Function TYPE-EXPAND.
;;;
Performs type macroexpansion ( macros being defined by DEFTYPE )
;;; in the given environment. Only top-level, but should expand
;;; repeatedly. That is to say, this is macroexp... | null | https://raw.githubusercontent.com/s-expressionists/Cleavir/3a63a6c30b75a47841c6a5fddd0b5207de32c437/Environment/type-information.lisp | lisp |
Function TYPE-EXPAND.
in the given environment. Only top-level, but should expand
repeatedly. That is to say, this is macroexpand, not
macroexpand-1 or macroexpand-all.
Function FIND-CLASS.
parameters so as to allow client specialization.
Default method: Use CL:FIND-CLASS.
These functions serve to conv... | (cl:in-package #:cleavir-environment)
Performs type macroexpansion ( macros being defined by DEFTYPE )
(defgeneric type-expand (environment type-specifier))
(defmethod type-expand ((env entry) type-specifier)
(type-expand (next env) type-specifier))
As CL : FIND - CLASS , but a generic function with different... |
84a9861fc7318f5bfb8d71868b9b0ee99ffe675a8534694d2291b5fdb489f1d7 | manuel-serrano/bigloo | import2.scm | (module import2
(export x)
(export (import-test2)))
(define x 2)
(define (import-test2)
'import-test2)
| null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/recette/import2.scm | scheme | (module import2
(export x)
(export (import-test2)))
(define x 2)
(define (import-test2)
'import-test2)
| |
fd3b46f9c1878cfb1008479d4a139a95d1b4d8d22e187d9e4edd1afa5ff348e9 | racket/errortrace | backtrace-nontail.rkt | #lang racket/base
(require errortrace/errortrace-lib)
(define m
#'(module m racket/base
(define (foo3 x)
(/ x "1"))
(define (foo2 x)
(foo3 x))
(define (foo1 x)
(list (foo2 x)))
(define (foo0 x)
(car (foo1 x)))
(+ 1 (foo0 3))))
(define ns (make-bas... | null | https://raw.githubusercontent.com/racket/errortrace/914f26aa07f97b4aaecea41f5881ac442df93a42/errortrace-test/tests/errortrace/backtrace-nontail.rkt | racket | #lang racket/base
(require errortrace/errortrace-lib)
(define m
#'(module m racket/base
(define (foo3 x)
(/ x "1"))
(define (foo2 x)
(foo3 x))
(define (foo1 x)
(list (foo2 x)))
(define (foo0 x)
(car (foo1 x)))
(+ 1 (foo0 3))))
(define ns (make-bas... | |
f918864a2b00d0d19e8b8e9a0e3c55343198828c5d8033ec40a7ff7d5a21f9d4 | xxyzz/SICP | Exercise_4_69.rkt | #lang racket/base
(assert! (rule (son-of ?m ?s)
(or (son ?m ?s)
(and (wife ?m ?w) ;; find m's wife's son
(son ?w ?s)))))
(assert! (rule (grandson ?g ?s)
(and (son-of ?f ?s)
(son-of ?g ?f))))
(assert! (rule (last-pair (?x) (?... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/4_Metalinguistic_Abstraction/4.4_Logic_Programming/Exercise_4_69.rkt | racket | find m's wife's son
Query results:
Query results: | #lang racket/base
(assert! (rule (son-of ?m ?s)
(or (son ?m ?s)
(son ?w ?s)))))
(assert! (rule (grandson ?g ?s)
(and (son-of ?f ?s)
(son-of ?g ?f))))
(assert! (rule (last-pair (?x) (?x))))
(assert! (rule (last-pair (?u . ?v) (?x))
... |
9d1320d471bcc951bedc04caedb23b23a7eedfabc3ace17a42d181088c34bacf | tweag/asterius | T13536.hs | import Debug.Trace
newtype Id a = Id a
unId True _ = Nothing -- make lazy
unId False (Just (Id x)) = (Just x)
unId False Nothing = Nothing
# NOINLINE unId #
val n = trace "evaluated once, as it should" (Just (Id n))
# NOINLINE val #
foo b n = unId b (val n)
# NOINLINE foo #
main = print (foo False 1)
| null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/simplStg/T13536.hs | haskell | make lazy | import Debug.Trace
newtype Id a = Id a
unId False (Just (Id x)) = (Just x)
unId False Nothing = Nothing
# NOINLINE unId #
val n = trace "evaluated once, as it should" (Just (Id n))
# NOINLINE val #
foo b n = unId b (val n)
# NOINLINE foo #
main = print (foo False 1)
|
e00514866da22e31cf85f210162506d95d8b64a88eaca75c99cd9be07dbaf627 | ocsigen/ocsimore | eliom_icalendar.ml | open Lwt
(*XXX Can we share with Eliom_atom ?*)
let get_etag c = Some (Digest.to_hex (Digest.string c))
open Ocsigen_http_frame
let result_of_content c =
let c = Icalendar.calendar c in
let md5 = get_etag c in
let default_result = default_result () in
{default_result with
res_content_length = Some (I... | null | https://raw.githubusercontent.com/ocsigen/ocsimore/8eeaf043ed6f1f167a96cbdc5f72a5225d9516d5/src/announce/eliom_icalendar.ml | ocaml | XXX Can we share with Eliom_atom ? | open Lwt
let get_etag c = Some (Digest.to_hex (Digest.string c))
open Ocsigen_http_frame
let result_of_content c =
let c = Icalendar.calendar c in
let md5 = get_etag c in
let default_result = default_result () in
{default_result with
res_content_length = Some (Int64.of_int (String.length c));
re... |
078c4b8dd2c92cb6dec36560e7550d80848ebec543d8a73f61963763b1201718 | AdaCore/why3 | detect_polymorphism.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/74914e765153d7eb4b34cd0246a623719f4aa670/src/transform/detect_polymorphism.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
open Decl
open Theory
let debug = Debug.register_info_flag "detect_poly"
~desc:"Print@ debugging@ messag... |
dea02bd090bc19d9b66f2b0a827ca4f13aff09b8059f90644858d9baea73b883 | themoritz/diener | Logger.hs | {-# LANGUAGE OverloadedStrings #-}
module Diener.Logger
( withLogger
, LogFunction
, Settings (..)
, MonadLogger
, monadLoggerLog
) where
import Control.Exception.Base (bracket)
import Control.Monad.Logger
import Control.Monad.Reader
import qualified Data.ByteString.Char8 as... | null | https://raw.githubusercontent.com/themoritz/diener/31f7de2a2d8a8dedcd117a8f69a2f0a993a64ee2/src/Diener/Logger.hs | haskell | # LANGUAGE OverloadedStrings # |
module Diener.Logger
( withLogger
, LogFunction
, Settings (..)
, MonadLogger
, monadLoggerLog
) where
import Control.Exception.Base (bracket)
import Control.Monad.Logger
import Control.Monad.Reader
import qualified Data.ByteString.Char8 as Char8 (putStrLn)
import ... |
25ec57282421da6b91aa387b912456a254f41a10e231b8da8943eea95b978cee | input-output-hk/cardano-sl | Parser.hs | # LANGUAGE RecursiveDo #
module Lang.Parser
( parse
, ParseError(..)
) where
import Universum
import Control.Applicative.Combinators.NonEmpty (sepBy1)
import Control.Lens (Getting)
import Data.Loc (Span)
import Data.Monoid (First)
import ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/auxx/src/Lang/Parser.hs | haskell | # LANGUAGE RecursiveDo #
module Lang.Parser
( parse
, ParseError(..)
) where
import Universum
import Control.Applicative.Combinators.NonEmpty (sepBy1)
import Control.Lens (Getting)
import Data.Loc (Span)
import Data.Monoid (First)
import ... | |
77790e9bb1d8b6583c4142d0fdb52d886277e53ca808d4611975ad018f30e4cd | heyoka/faxe | http_lib.erl | %%%-------------------------------------------------------------------
@author
( C ) 2021 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 13 . Sep 2021 19:58
%%%-------------------------------------------------------------------
-module(http_lib).
-author("heyoka").
%% API
-export([user_agent/0, basic_auth_heade... | null | https://raw.githubusercontent.com/heyoka/faxe/96df63b021152b25261d08fd5c2d0deb16e0dedb/apps/faxe/src/lib/http_lib.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API | @author
( C ) 2021 , < COMPANY >
Created : 13 . Sep 2021 19:58
-module(http_lib).
-author("heyoka").
-export([user_agent/0, basic_auth_header/2, user_agent_header/0]).
-spec user_agent() -> iodata().
user_agent() ->
{ok, Vsn} = application:get_key(vsn),
[<<"faxe/">>, Vsn].
user_agent_header() ->
[{<<"u... |
0773e588d57b5aa103d0c6183b65b43f7e1eb910b2566345ee06edac0453fae7 | AhaMove/metabase-http-driver | project.clj | (defproject metabase/http-driver "1.0.0"
:min-lein-version "2.5.0"
:dependencies
[[com.jayway.jsonpath/json-path "2.4.0"]]
:jvm-opts
["-XX:+IgnoreUnrecognizedVMOptions"
"--add-modules java.xml.bind"]
:profiles
{:provided
{:dependencies
[[org.clojure/clojure "1.10.1"]
[metabase-core "1.0.... | null | https://raw.githubusercontent.com/AhaMove/metabase-http-driver/2118931021fb3cfe9dcb60582b8a3f140eb699ba/project.clj | clojure | (defproject metabase/http-driver "1.0.0"
:min-lein-version "2.5.0"
:dependencies
[[com.jayway.jsonpath/json-path "2.4.0"]]
:jvm-opts
["-XX:+IgnoreUnrecognizedVMOptions"
"--add-modules java.xml.bind"]
:profiles
{:provided
{:dependencies
[[org.clojure/clojure "1.10.1"]
[metabase-core "1.0.... | |
56c77e198e1eb23b00787ce01d3d8b12d0ba34b11bcb98ce63bba18a8799963e | lhartikk/ClojureREPL | eval.clj | (ns clojurerepl.models.eval
(:require [clojail.testers :refer [secure-tester-without-def blanket]]
[clojail.core :refer [sandbox]]
[clojure.stacktrace :refer [root-cause]]
[noir.session :as session])
(:import java.io.StringWriter
java.util.concurrent.TimeoutException))
(defn... | null | https://raw.githubusercontent.com/lhartikk/ClojureREPL/997732578a1cfa0a39f739dbd4f8722a0ab5833d/src/clojurerepl/models/eval.clj | clojure | (ns clojurerepl.models.eval
(:require [clojail.testers :refer [secure-tester-without-def blanket]]
[clojail.core :refer [sandbox]]
[clojure.stacktrace :refer [root-cause]]
[noir.session :as session])
(:import java.io.StringWriter
java.util.concurrent.TimeoutException))
(defn... | |
651cf75c050d0a9f5e24e0352c91cb9406d45b7e4d657d04c92ae816f3f68da6 | FlowForwarding/LINC-Switch | linc_us4_oe_queue_tests.erl | %%------------------------------------------------------------------------------
Copyright 2012 FlowForwarding.org
%%
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
%%... | null | https://raw.githubusercontent.com/FlowForwarding/LINC-Switch/9c28e7c8677c03440a62023292dd700fef0c3420/apps/linc_us4_oe/test/linc_us4_oe_queue_tests.erl | erlang | ------------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eithe... | Copyright 2012 FlowForwarding.org
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Erlang Solutions Ltd. < >
2012 FlowForwarding.org
-module(linc_us4_oe_queue_tests).
-import(linc_us4_oe_test_utils, [mock/1,
... |
3cbd520bfaac06e72b28e1e7598bbf11bc07692974432aaf6d172cea7adce88c | zero-one-group/geni | customer_segmentation.clj | (ns examples.customer-segmentation
(:require
[zero-one.geni.core :as g]
[zero-one.geni.ml :as ml]))
TODO : need to first get this data before we can read them
(def invoices
(g/->kebab-columns (g/read-csv! "data/online_retail_ii")))
(g/print-schema invoices)
; root
; |-- invoice: string (nullable = true)
... | null | https://raw.githubusercontent.com/zero-one-group/geni/4dbabf8315d85cc1526e04bca7e4cb7b75c21ac1/examples/customer_segmentation.clj | clojure | root
|-- invoice: string (nullable = true)
|-- stock-code: string (nullable = true)
|-- description: string (nullable = true)
|-- quantity: integer (nullable = true)
|-- invoice-date: string (nullable = true)
|-- price: double (nullable = true)
|-- customer-id: integer (nullable = true)
|-- country: st... | (ns examples.customer-segmentation
(:require
[zero-one.geni.core :as g]
[zero-one.geni.ml :as ml]))
TODO : need to first get this data before we can read them
(def invoices
(g/->kebab-columns (g/read-csv! "data/online_retail_ii")))
(g/print-schema invoices)
(g/count invoices)
1067371
(-> invoices (g/l... |
c964129d513413452465af7694310c29d4c16ffff3cdfb3c903d804036c4bd35 | REMath/mit_16.399 | scriptfile.ml |
module A = struct
module type A_signature =
sig
type entier
val i : unit -> entier
val p : entier -> unit
end;;
end;;
module B : sig
open A;;
module B : A_signature;;
end = struct
open A;;
module B_implementation =
struct
type entier = int
let c = ref 1
let i () = c := !c + !c ; !c
let p v = p... | null | https://raw.githubusercontent.com/REMath/mit_16.399/3f395d6a9dfa1ed232d307c3c542df3dbd5b614a/project/OCaml/programs/separate-compilation/scriptfile.ml | ocaml |
module A = struct
module type A_signature =
sig
type entier
val i : unit -> entier
val p : entier -> unit
end;;
end;;
module B : sig
open A;;
module B : A_signature;;
end = struct
open A;;
module B_implementation =
struct
type entier = int
let c = ref 1
let i () = c := !c + !c ; !c
let p v = p... | |
9a73ddbb6a60a940fe6ad45294292594c8246fb54cab16a23117012a9db4fc0b | Gertjan423/KHC | Unique.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
{-# LANGUAGE CPP #-}
-- ----------------------------------------------------------------------------
-- |
The technique for generating new Uniques is based on
--
1 . The paper '' On Generati... | null | https://raw.githubusercontent.com/Gertjan423/KHC/07d00ebaab5245f632eff8ae7930711a44259192/Utils/Unique.hs | haskell | # LANGUAGE CPP #
----------------------------------------------------------------------------
|
-supply-0.6
----------------------------------------------------------------------------
* The Unique data type
* Taking uniques from supplies
* Generating new supplies from existing ones
* C... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
The technique for generating new Uniques is based on
1 . The paper '' On Generating Unique Names ''
by , , and and .
2 . The implementation of Data . Supply by Iavor Diatchki
Function naming an... |
54b3e343485930d58cb9015e6e467fff84d9bdc3fda9bba7bf0e9e652a4bd28b | jeromesimeon/Galax | schema_simplification.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/schema/schema_simplification.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : schema_simplification.ml , v 1.12 2007/02/01 22:08:53 simeon Exp $
Module : Schema_simplification
Description :
This modules implements simplification rewritings over
type . Those rewritings preserve the semantics... |
610f4ac4d6fa8ce559c4d44aaec845263e5af22d9019a9d938a1b22aa7c7e28b | na4zagin3/satyrographos | build.ml | open Core
open Satyrographos
module P = Shexp_process
let read_module ~outf ~verbose ~build_module ~buildscript_path =
let src_dir = Filename.dirname buildscript_path in
let p = BuildScript.read_module ~src_dir build_module in
if verbose
then begin Format.fprintf outf "Read library:@.";
[%sexp_of: Library... | null | https://raw.githubusercontent.com/na4zagin3/satyrographos/4898324106df61e558e08093dbf4a02adfb219d6/src/command/build.ml | ocaml | open Core
open Satyrographos
module P = Shexp_process
let read_module ~outf ~verbose ~build_module ~buildscript_path =
let src_dir = Filename.dirname buildscript_path in
let p = BuildScript.read_module ~src_dir build_module in
if verbose
then begin Format.fprintf outf "Read library:@.";
[%sexp_of: Library... | |
7bd884dc59689a9f6ce1881c650413865973d15117d6dfc85ebc6f8702f01ad8 | charlieg/Sparser | loader.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(CL-USER COMMON-LISP) -*-
Copyright ( c ) 2009 BBNT Solutions LLC . All Rights Reserved
copyright ( c ) 2010 -- all rights reserved ; ; ; $ Id$
;;;
;;; File: "loader"
;;; Module: "objects/import
version : November 2010
initiated 8/27/09 . Elab... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/import/loader.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(CL-USER COMMON-LISP) -*-
; ; $ Id$
File: "loader"
Module: "objects/import
part of expunging the no-longer valid poirot code. | Copyright ( c ) 2009 BBNT Solutions LLC . All Rights Reserved
version : November 2010
initiated 8/27/09 . Elaborated through 8/31 . Zeroed it out 11/16/10 as
(in-package :sparser)
|
72b41ac456674828c576a076b6d5e1047f43848f59ca7668beaa5e80f51b1ddc | anuragsoni/postgres-protocol | frontend.mli | BSD 3 - Clause License
Copyright ( c ) 2020 , All rights reserved .
Redistribution and use in source and binary forms , with or without modification , are
permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the above copyright notice , thi... | null | https://raw.githubusercontent.com/anuragsoni/postgres-protocol/e3e1743c138e527a2285dfd1eb240f49fd764b25/postgres/frontend.mli | ocaml | BSD 3 - Clause License
Copyright ( c ) 2020 , All rights reserved .
Redistribution and use in source and binary forms , with or without modification , are
permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the above copyright notice , thi... | |
c92258ea1137c518cd389efb2adca1b58dd79093fe51d5af47461bcbccf6205e | bittide/bittide-hardware | Print.hs | SPDX - FileCopyrightText : 2022 Google LLC
--
SPDX - License - Identifier : Apache-2.0
-- | Println-debugging during simulation
module ContranomySim.Print ( hookPrint, getDataBytes ) where
import Clash.Prelude
import qualified Data.ByteString as BS
import Data.Foldable (traverse_)
import qu... | null | https://raw.githubusercontent.com/bittide/bittide-hardware/b44dac8ee0fb14b0c6a94fcbe830fdd8d140bec4/contranomy-sim/src/ContranomySim/Print.hs | haskell |
| Println-debugging during simulation
^ How many bytes to sample
^ Address
^ Data
^ Address
^ Data | SPDX - FileCopyrightText : 2022 Google LLC
SPDX - License - Identifier : Apache-2.0
module ContranomySim.Print ( hookPrint, getDataBytes ) where
import Clash.Prelude
import qualified Data.ByteString as BS
import Data.Foldable (traverse_)
import qualified Data.List as L
import ... |
7655def3fa25bc22a456b801a16b9342b28e87c2914a04dacf004c90bc0b381c | fetburner/Coq2SML | proof_type.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/proofs/proof_type.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* This module defines the structure ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Environ
open Evd
open Na... |
50de4c9e3c23098fcb1ae787179ac51cdca0b6fe3c4dd485e2de4ca5c059b17e | nkaretnikov/OOHaskell | CovariantReturn.hs | {-# LANGUAGE EmptyDataDecls #-}
{-# OPTIONS_GHC -fcontext-stack=100 #-}
OOHaskell ( C ) 2004 , 2005 , , ,
Straightforward experiments with covariant return types , as in Java 5 .
We note that covariant return types are type - safe and conceptually not
very challenging . ( The situation is all differen... | null | https://raw.githubusercontent.com/nkaretnikov/OOHaskell/ddf42cfa62f8bd27643ff6db136dec6c14466232/samples/CovariantReturn.hs | haskell | # LANGUAGE EmptyDataDecls #
# OPTIONS_GHC -fcontext-stack=100 #
Various labels
A base class for rectangles
We refine the rectangles into squares.
We extend rectangles into cuboids.
This shows that cube is substitutable for a cuboid.
let cuboids = [aCuboid, aCube] -- Type error!
The following would raise a type e... |
OOHaskell ( C ) 2004 , 2005 , , ,
Straightforward experiments with covariant return types , as in Java 5 .
We note that covariant return types are type - safe and conceptually not
very challenging . ( The situation is all different to covariant
argument types , which are dealt with in CovariantArgs.... |
ab3ca9b78463e3c185030ffbd1f6b7bf200603725d1b9bb543f011c2eb012f34 | lukeg101/lplzoo | Main.hs | |
Module : Main
Description : The Main access point for SystemF.
Copyright : ( c ) , 2019
License : GPL-3
Maintainer :
Stability : stable
Portability : POSIX
The " Main " module provides the access point for running SystemF. This is
targeted by main when compiled and run .
Mod... | null | https://raw.githubusercontent.com/lukeg101/lplzoo/463ca93f22f018ee07bdc18d84b3b0c966d51766/SystemF/Main.hs | haskell | | Simple System F Repl | |
Module : Main
Description : The Main access point for SystemF.
Copyright : ( c ) , 2019
License : GPL-3
Maintainer :
Stability : stable
Portability : POSIX
The " Main " module provides the access point for running SystemF. This is
targeted by main when compiled and run .
Mod... |
7a5a3a9ad52c04b0230105e5ba0bf2a5a0dc04ae49712a8d5b101d0870dc7cfc | lazy-cat-io/metaverse | storage.cljs | (ns metaverse.renderer.storage
(:require
[metaverse.common.utils.string :refer [keyword->string]]
[metaverse.common.utils.transit :as t]
[re-frame.core :as rf]))
(defn set-item!
[key item]
(when-some [key (keyword->string key)]
(let [item (t/write item)]
(.setItem js/localStorage key item)... | null | https://raw.githubusercontent.com/lazy-cat-io/metaverse/4c566278d253ce6b85e4644b2fdec93dab58355c/src/main/clojure/metaverse/renderer/storage.cljs | clojure | (ns metaverse.renderer.storage
(:require
[metaverse.common.utils.string :refer [keyword->string]]
[metaverse.common.utils.transit :as t]
[re-frame.core :as rf]))
(defn set-item!
[key item]
(when-some [key (keyword->string key)]
(let [item (t/write item)]
(.setItem js/localStorage key item)... | |
fedad5a50afecf37be06a29c9a1e4999213e0f389d7fbb8c919f16d841a22606 | paulrzcz/hquantlib | TimeSeries.hs | module QuantLib.TimeSeries
( module QuantLib.TimeSeries
) where
import QuantLib.Prices(IntervalPrice)
import Data.Time.LocalTime
import qualified Data.Map as M
-- | Time series
type TimeSeries m = M.Map LocalTime m
-- | Interval price time series
type IntervalPriceSeries = TimeSeries IntervalPrice | null | https://raw.githubusercontent.com/paulrzcz/hquantlib/7689b93fa9724b44755148b104ec6c6916d241c3/src/QuantLib/TimeSeries.hs | haskell | | Time series
| Interval price time series | module QuantLib.TimeSeries
( module QuantLib.TimeSeries
) where
import QuantLib.Prices(IntervalPrice)
import Data.Time.LocalTime
import qualified Data.Map as M
type TimeSeries m = M.Map LocalTime m
type IntervalPriceSeries = TimeSeries IntervalPrice |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.