_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 |
|---|---|---|---|---|---|---|---|---|
82b9c192b45b4e4cd80645b5e5407bede28e1eb833cde57437b5790731420500 | LeventErkok/sbvPlugin | T10.hs | {-# OPTIONS_GHC -fplugin=Data.SBV.Plugin #-}
module T10 where
import Data.SBV.Plugin
g :: Integer -> Integer
g x = x * 2 + 12
{-# ANN f theorem #-}
f :: Integer -> Bool
f x = g x < g (x+1)
| null | https://raw.githubusercontent.com/LeventErkok/sbvPlugin/b6a6e94cd237a4f64f985783931bd7656e7a6a69/tests/T10.hs | haskell | # OPTIONS_GHC -fplugin=Data.SBV.Plugin #
# ANN f theorem # |
module T10 where
import Data.SBV.Plugin
g :: Integer -> Integer
g x = x * 2 + 12
f :: Integer -> Bool
f x = g x < g (x+1)
|
9fa8a1ab619fb6ade09f6fd5e7b8fd639ec048428da27cd1ca29bb50c5b42c72 | flexsurfer/re-frisk | template.cljs | (ns ^{:mranderson/inlined true} re-frisk.inlined-deps.reagent.v1v0v0.reagent.impl.template
(:require [react :as react]
[clojure.string :as string]
[re-frisk.inlined-deps.reagent.v1v0v0.reagent.impl.util :as util :refer [named?]]
[re-frisk.inlined-deps.reagent.v1v0v0.reagent.impl.co... | null | https://raw.githubusercontent.com/flexsurfer/re-frisk/638d820c84e23be79b8c52f8f136a611d942443f/re-frisk/src/re_frisk/inlined_deps/reagent/v1v0v0/reagent/impl/template.cljs | clojure | Common utilities
Props conversion
TODO: Move prop-name caches to the compiler object, if this
conversion can be configured.
Previous few functions copied for custom elements,
without mapping from class to className etc.
Only use ID from tag keyword if no :id in props already
Merge classes
Note: someone might u... | (ns ^{:mranderson/inlined true} re-frisk.inlined-deps.reagent.v1v0v0.reagent.impl.template
(:require [react :as react]
[clojure.string :as string]
[re-frisk.inlined-deps.reagent.v1v0v0.reagent.impl.util :as util :refer [named?]]
[re-frisk.inlined-deps.reagent.v1v0v0.reagent.impl.co... |
f04accfbdeceaa8123a271b5afaacf182d4236fafaeccdd701bd3d2c1a0a38eb | PataphysicalSociety/soupault | rose_tree.ml | Multi - way tree used by the ToC module
(* List helper functions *)
module List_utils = struct
let rec remove p xs =
match xs with
| [] -> []
| y :: ys ->
if (p y) then ys
else y :: (remove p ys)
let rec replace p x xs =
match xs with
| [] -> raise Not_found
| y :: ys ->
... | null | https://raw.githubusercontent.com/PataphysicalSociety/soupault/7e580f082bdda09f3b280a943162efe0abcdab8b/src/rose_tree.ml | ocaml | List helper functions
Actual tree
Unique identifier for unambiguous references to nodes.
Actual data of the node.
Replaces an immediate child
Multi-level insertion capable of creating sub-nodes if needed
The automaton for building a tree from a flat list | Multi - way tree used by the ToC module
module List_utils = struct
let rec remove p xs =
match xs with
| [] -> []
| y :: ys ->
if (p y) then ys
else y :: (remove p ys)
let rec replace p x xs =
match xs with
| [] -> raise Not_found
| y :: ys ->
if (p y) then x :: ys
... |
1f208e1fac8e4747ed91a2d7c4a3f53b3d8049a46dd460599a1106bf3dc065bb | avsm/mirage-duniverse | xs_client_lwt.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/xenstore/client_lwt/xs_client_lwt.ml | ocaml | we never care about events or ordering, only paths
we need to stop watching and clean up
* Register that a watched path has been changed
* Return a set of modified paths, or an empty set if we're cancelling
* Called to shutdown the watcher and trigger an orderly cleanup
Represents a single acive connection to a... |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... |
e945f98dd4ee73bfb13121288d5fc4af5162638d2221d485c771ff36abdeb7aa | MalloZup/fullrocketmetal | scheduler.clj | (ns fullrocketmetal.scheduler
(:require
[clojurewerkz.quartzite.triggers :as t]
[clojurewerkz.quartzite.jobs :as j]
[clojurewerkz.quartzite.conversion :as qc]
[clojurewerkz.quartzite.jobs :refer [defjob]]
[clojurewerkz.quartzite.schedule.cron :as qcron]
... | null | https://raw.githubusercontent.com/MalloZup/fullrocketmetal/6029a2d2bf6c59910611650e7adaaf7b4c3697ae/src/fullrocketmetal/scheduler.clj | clojure | (ns fullrocketmetal.scheduler
(:require
[clojurewerkz.quartzite.triggers :as t]
[clojurewerkz.quartzite.jobs :as j]
[clojurewerkz.quartzite.conversion :as qc]
[clojurewerkz.quartzite.jobs :refer [defjob]]
[clojurewerkz.quartzite.schedule.cron :as qcron]
... | |
0aaf01875662f350fe33909c3b6d1d812453df1eeed9e471c2cee44d761aefd6 | artyom-poptsov/guile-dsv | table.scm | ;;; table.scm -- Procedures to print fancy tables in a console.
Copyright ( C ) 2021 - 2022 Artyom V. Poptsov < >
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the... | null | https://raw.githubusercontent.com/artyom-poptsov/guile-dsv/8cb9690708bcb7448b28031f3b9b682680389172/modules/dsv/table.scm | scheme | table.scm -- Procedures to print fancy tables in a console.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
The program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FI... |
Copyright ( C ) 2021 - 2022 Artyom V. Poptsov < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(define-module (dsv table)
#:use-module (scheme... |
5e97031a8e0ad90379c34b83d1293d18578f0a8f129bd7bd284ee7ec20afa898 | blarney-lang/actora | StackIR.hs | -- Stack intermediate representation
module StackIR where
import Data.Map as M
import Data.Set as S
import Data.List as L
-- Some meaningful type names, for readability
type Arity = Int
type StackOffset = Int
type InstrAddr = Int
type NumAtoms = Int
type PopAmount = Int
type ErrorCode = String
-- An instruction poi... | null | https://raw.githubusercontent.com/blarney-lang/actora/a5380662a55952c19f82e08c4dce25ad98390bdf/compiler/StackIR.hs | haskell | Stack intermediate representation
Some meaningful type names, for readability
An instruction pointer before linking is a label,
and after linking is an address
Atoms are words residing on the stack and heap
Primitive operators
Instruction set
Branch conditions
Replace labels with addresses
Compute mapping fro... |
module StackIR where
import Data.Map as M
import Data.Set as S
import Data.List as L
type Arity = Int
type StackOffset = Int
type InstrAddr = Int
type NumAtoms = Int
type PopAmount = Int
type ErrorCode = String
data InstrPtr =
InstrLabel String
| InstrAddr InstrAddr
deriving (Eq, Ord, Show)
data Atom =
... |
5b14b09ba0c6ebeb9e2cd64bd7783a217e0a4234553ac60ee6fd67082e7bacc4 | ichko/fmi-fp-2020-21 | Main.hs | module Main where
import Logic (maybeUpdateGame)
import Rendering (firstTurn, showGame)
import Text.Read (readMaybe)
import Types
( Game (Game, state),
GameState (GameOver),
Player (..),
Position,
)
loop :: Game -> IO ()
loop g@Game {state = GameOver _} = putStrLn $ showGame g
loop gs = do
putStrLn ... | null | https://raw.githubusercontent.com/ichko/fmi-fp-2020-21/83dea8db7666e7a8a372d82301d71c79d5b798ff/week-05/TicTacToe/Main.hs | haskell | module Main where
import Logic (maybeUpdateGame)
import Rendering (firstTurn, showGame)
import Text.Read (readMaybe)
import Types
( Game (Game, state),
GameState (GameOver),
Player (..),
Position,
)
loop :: Game -> IO ()
loop g@Game {state = GameOver _} = putStrLn $ showGame g
loop gs = do
putStrLn ... | |
d1e22562673b3cb9c5484ef33f25d550b43b840b59d9e558909a3e7e37363189 | atdixon/thurber | thurber.clj | (ns thurber
(:refer-clojure :exclude [filter partial])
(:require [camel-snake-kebab.core :as csk]
[clojure.data.json :as json]
[clojure.string :as str]
[clojure.walk :as walk]
[taoensso.nippy :as nippy]
[clojure.tools.logging :as log])
(:import (org.apac... | null | https://raw.githubusercontent.com/atdixon/thurber/38b86a683e446f2deed55fad157476ae05940d50/src/thurber.clj | clojure | --
--
but we want them to stay
--
--
--
--
--
Note: we promote all args from provided fn-like to args passed to filter-impl;
they must be seen at the top level; filter-impl will relay them to the fn-.
--
note: as we are prepending lexical scope symbols even
it will precede and therefore still be masked... | (ns thurber
(:refer-clojure :exclude [filter partial])
(:require [camel-snake-kebab.core :as csk]
[clojure.data.json :as json]
[clojure.string :as str]
[clojure.walk :as walk]
[taoensso.nippy :as nippy]
[clojure.tools.logging :as log])
(:import (org.apac... |
0b521d30acbce30da84c20c5a3be0146a7a23dc3973977017412d9d0830adcc4 | diagrams/diagrams-haddock | Test.hs | # LANGUAGE CPP #
module Test (exported) where
#ifdef INSIDE
-- | <<diagrams/blah.svg#diagram=blah>>
--
> blah = pad 1.1 $ square 1
--
#endif
-- | <<diagrams/d'.svg#diagram=d'>>
--
> d ' = pad 1.1 $ circle 1
--
exported = putStrLn "blah"
| null | https://raw.githubusercontent.com/diagrams/diagrams-haddock/29067d968a6097aa9d648b566c234d924a97bd86/test/simpleCabalCPP/src/Test.hs | haskell | | <<diagrams/blah.svg#diagram=blah>>
| <<diagrams/d'.svg#diagram=d'>>
| # LANGUAGE CPP #
module Test (exported) where
#ifdef INSIDE
> blah = pad 1.1 $ square 1
#endif
> d ' = pad 1.1 $ circle 1
exported = putStrLn "blah"
|
cf7faca18191a33ee5edca5b35c0e264e4273f481d3210db4f5412601b1eceba | brownplt/LambdaS5 | ljs_restore_id.ml | open Prelude
open Ljs_syntax
open Ljs_opt
open Exp_util
open Ljs_analyze_env
This phase will try to restore JavaScript identifier , for example ,
restore ` var ` from % context['var ' ] .
This phase needs to know the existance of all properties of context
before the actual transformation .
This... | null | https://raw.githubusercontent.com/brownplt/LambdaS5/f0bf5c7baf1daa4ead4e398ba7d430bedb7de9cf/src/optimization/ljs_restore_id.ml | ocaml | set this variable to true if the restoration should be only applied
on code in strict mode
assume: obj follows let
checking whether all functions are in strict mode does not work.
because 'with' expression can appear on top level.
distinct top-level window and in function window
on top level, we shou... | open Prelude
open Ljs_syntax
open Ljs_opt
open Exp_util
open Ljs_analyze_env
This phase will try to restore JavaScript identifier , for example ,
restore ` var ` from % context['var ' ] .
This phase needs to know the existance of all properties of context
before the actual transformation .
This... |
083f8f364dc1a474f5fe3f12b5bb2f15d05ea3e346edfd840f277d9c3952156e | DanielG/kvm-in-a-box | Udev.hs | module Udev where
import Types
import Resource
import Control.Applicative
import Data.List
import Data.List.Split
import Data.Maybe
lvmOwnerResources :: [Vm] -> SomeResource
lvmOwnerResources vms = SomeResource $ FileResource {
rPath = "/etc/udev/rules.d/60-kib.rules",
rPerms = ((Nothing, Nothing), Just "644... | null | https://raw.githubusercontent.com/DanielG/kvm-in-a-box/6bf71bb389a19806fac2f32a2c6d92261fb649e1/src/Udev.hs | haskell | module Udev where
import Types
import Resource
import Control.Applicative
import Data.List
import Data.List.Split
import Data.Maybe
lvmOwnerResources :: [Vm] -> SomeResource
lvmOwnerResources vms = SomeResource $ FileResource {
rPath = "/etc/udev/rules.d/60-kib.rules",
rPerms = ((Nothing, Nothing), Just "644... | |
5d7f9931fa77ab42c6bde6f322a733fa082d065efb6e7ff8e603531458db4bc8 | emqx/emqx | emqx_shared_sub.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2018 - 2023 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/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/src/emqx_shared_sub.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 ) 2018 - 2023 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_shared_sub).
-behaviour(gen_server).
-include("emqx.hrl").
-include("emqx_mqtt.hr... |
e30deedd756661aa7320cc29758c27203300f8e8ca7c1accb95e3a03b15eb697 | Cyrik/omni-trace | omni_trace.cljc | (ns cyrik.omni-trace
(:require [cljs.test]
[cyrik.omni-trace.graph :as flame]
[cyrik.omni-trace.instrument :as i]
[cyrik.omni-trace.tree :as tree]
[net.cgrand.macrovich :as macros]
#?(:clj [cyrik.omni-trace.deep-trace :as deep])
#?(:clj [cyrik.om... | null | https://raw.githubusercontent.com/Cyrik/omni-trace/977e32b10dd932e3ba0492254e00cfdd1a292e59/src/cyrik/omni_trace.cljc | clojure | fix nil namespaces | (ns cyrik.omni-trace
(:require [cljs.test]
[cyrik.omni-trace.graph :as flame]
[cyrik.omni-trace.instrument :as i]
[cyrik.omni-trace.tree :as tree]
[net.cgrand.macrovich :as macros]
#?(:clj [cyrik.omni-trace.deep-trace :as deep])
#?(:clj [cyrik.om... |
662c31ee69413ce4ac3588b3dde9871c2239903527b816f8356c95f424e052f5 | KonnexionsGmbH/oranif | cover_tests.erl | -module(cover_tests).
-include_lib("eunit/include/eunit.hrl").
%-------------------------------------------------------------------------------
MACROs
%-------------------------------------------------------------------------------
-define(DPI_MAJOR_VERSION, 3).
-define(DPI_MINOR_VERSION, 0).
-define(EXEC_STMT(_Co... | null | https://raw.githubusercontent.com/KonnexionsGmbH/oranif/b51a979c4b102d1b180e08bba498c9e15ec650cc/test/cover_tests.erl | erlang | -------------------------------------------------------------------------------
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Context APIs
------------------------------------------------------------------... | -module(cover_tests).
-include_lib("eunit/include/eunit.hrl").
MACROs
-define(DPI_MAJOR_VERSION, 3).
-define(DPI_MINOR_VERSION, 0).
-define(EXEC_STMT(_Conn, _Sql),
(fun() ->
__Stmt = dpiCall(
TestCtx, conn_prepareStmt, [_Conn, false, _Sql, <<>>]
),
__StmtExecResult = (catch ... |
9df1715af62d22644082f56204c3bd2c4f0706bb8b64ab3bf06c2cb7f915b640 | adamschoenemann/clofrp | Fixtures.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE NamedFieldPuns #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE TypeApplications #
module Fixtures where
import CloFRP.QuasiQuoter
import NeatInterpolation
import qualified CloFRP.Parser.Expr as P
-- import qualified CloFRP.Parser.Type as P
import... | null | https://raw.githubusercontent.com/adamschoenemann/clofrp/c26f86aec2cdb8fa7fd317acd13f7d77af984bd3/test-suite/Fixtures.hs | haskell | # LANGUAGE OverloadedStrings #
import qualified CloFRP.Parser.Type as P
applicative structure
functor
x has type |>k (b k, u)
see if you can do this better with let generalization
applicative structure
|>k functor
fixpoint above with full types
applyfix = \rec ->
case x of
| Put b sp... | # LANGUAGE QuasiQuotes #
# LANGUAGE NamedFieldPuns #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE TypeApplications #
module Fixtures where
import CloFRP.QuasiQuoter
import NeatInterpolation
import qualified CloFRP.Parser.Expr as P
import qualified CloFRP.Parser.Decl as P
import qualified CloFRP.Parser.Prog as P
imp... |
f856858c064984cd2c2dca6ba5ef9b6851d692bebccedbd832fe4db231ad0d9b | reflectionalist/S9fES | soccat.scm | #! /usr/local/bin/s9 -f
; soccat -- connect to remote hosts
By , 2010
; Placed in the Public Domain
;
; Usage: soccat [-i] host port/service
;
; Read a request from default input and send it to the specific
; remote host. Simultaneously pass input from the remote host to
; the default output. In interactive mode ... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/prog/soccat.scm | scheme | soccat -- connect to remote hosts
Placed in the Public Domain
Usage: soccat [-i] host port/service
Read a request from default input and send it to the specific
remote host. Simultaneously pass input from the remote host to
the default output. In interactive mode reconnect automatically
when the remote side br... | #! /usr/local/bin/s9 -f
By , 2010
(load-from-library "read-line.scm")
(load-from-library "displaystar.scm")
(load-from-library "flush-output-port.scm")
(load-from-library "parse-optionsb.scm")
(define (soccat reconnect host port)
(let* ((s (sys:inet-connect host port))
(in (sys:make-input-port s))... |
1490bc88b4512ae2214e4646926f3a1610cfd08441edd61d4af895e1bb159de0 | gsakkas/rite | 3573.ml |
let pipe fs =
let f a x = a x in let base x y = x y in List.fold_left f base fs;;
fix
let pipe fs = let f a x = x in let base x y = x y in List.fold_left f base fs ; ;
let pipe fs = let f a x = x in let base x y = x y in List.fold_left f base fs;;
*)
changed spans
( 3,15)-(3,18 )
x
VarG
(3,15... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/3573.ml | ocaml |
let pipe fs =
let f a x = a x in let base x y = x y in List.fold_left f base fs;;
fix
let pipe fs = let f a x = x in let base x y = x y in List.fold_left f base fs ; ;
let pipe fs = let f a x = x in let base x y = x y in List.fold_left f base fs;;
*)
changed spans
( 3,15)-(3,18 )
x
VarG
(3,15... | |
170b1cfd4132ee0556302984810fcfa79186309c712c2ea55d95bafe9add8386 | nmunro/cl-tutorials | main.lisp | (defpackage hangman
(:use :cl))
(in-package :hangman)
(defun pick-sitcom (sitcoms)
(nth (random (length sitcoms) (make-random-state t)) sitcoms))
(defun get-letter (guessed-letters)
(format t "Please enter a letter: ")
(let ((in (read-line)))
(cond
; If the user just hit enter
((= 0 (length i... | null | https://raw.githubusercontent.com/nmunro/cl-tutorials/e42f879edb01456f3cf0d159b0042e8e61f1b02e/3-hangman/src/main.lisp | lisp | If the user just hit enter | (defpackage hangman
(:use :cl))
(in-package :hangman)
(defun pick-sitcom (sitcoms)
(nth (random (length sitcoms) (make-random-state t)) sitcoms))
(defun get-letter (guessed-letters)
(format t "Please enter a letter: ")
(let ((in (read-line)))
(cond
((= 0 (length in))
(get-letter g:uessed-let... |
c24b2fbe19671098af55095433220af36d74d5a53e8116b47f8c3890e6a73609 | luqui/manifesto | Nav.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
module Nav where
import Grammar hiding (Tree)
import... | null | https://raw.githubusercontent.com/luqui/manifesto/09a70581376295c14d24f8cd0771941d7a613361/Nav.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
Each level of the context stores the grammar associated with that level.
There is probably a missing case in a chain of ≪|≫s. | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
module Nav where
import Grammar hiding (Tree)
import qualified Rank2
import qualified Data.Functor.Differentiable.Rank2 as D
import ... |
2ec15c95e477f694474152d3ec073268883a4cdc941ac6a625eba17bb82f9575 | drewnoff/openintro-gorilla-incanter | project.clj | (defproject inf-for-categorical-data "0.1.0-SNAPSHOT"
:description "OenIntro lab 'Inference for Categorical data'"
:url "-repl.org/view.html?source=github&user=drewnoff&repo=openintro-gorilla-incanter&path=/inf-for-categorical-data/src/openintro/inf-for-categorical-data.clj"
:license {:name "CC-BY-SA"
... | null | https://raw.githubusercontent.com/drewnoff/openintro-gorilla-incanter/cb9688d5624bb54649073fdf0e1672047dbff391/inf-for-categorical-data/project.clj | clojure | (defproject inf-for-categorical-data "0.1.0-SNAPSHOT"
:description "OenIntro lab 'Inference for Categorical data'"
:url "-repl.org/view.html?source=github&user=drewnoff&repo=openintro-gorilla-incanter&path=/inf-for-categorical-data/src/openintro/inf-for-categorical-data.clj"
:license {:name "CC-BY-SA"
... | |
6163ac7cf0e86e751e04ad498f2f8f66e31a6a5b8a34353d0721eb94fd10281a | herd/herdtools7 | testHash.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/c3b5079aed4bf9d92a5c7de04ef3638d6af0f8c0/lib/testHash.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2013 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
43baa4f17578b3fe6deff1638ab8588388dd4fa9a39272e20fc4f1599f04be80 | lilyball/projecteuler-ocaml | sieve.mli | type sieve
type primality = Prime | Composite | Unknown
val make : int -> sieve
val size : sieve -> int
val primality : int -> sieve -> primality
val mark_prime : int -> sieve -> unit
val find_prime : int -> sieve -> int
val iter : (int -> unit) -> sieve -> unit
(** iterates over all the primes in the sieve *)
val fold... | null | https://raw.githubusercontent.com/lilyball/projecteuler-ocaml/a88ed8355b565ad0726cfcac4916d2b80512da7a/sieve.mli | ocaml | * iterates over all the primes in the sieve
* equivalent to a List.fold_left with a list of all primes in the sieve | type sieve
type primality = Prime | Composite | Unknown
val make : int -> sieve
val size : sieve -> int
val primality : int -> sieve -> primality
val mark_prime : int -> sieve -> unit
val find_prime : int -> sieve -> int
val iter : (int -> unit) -> sieve -> unit
val fold : (int -> 'a -> 'a) -> 'a -> sieve -> 'a
excepti... |
7b645cc967bdf505fdf5ae329faab953f6b58806e1aa5cd8f55ab8f9fd2dae4b | racket/gui | gl-refresh.rkt | #lang racket/gui
(require sgl)
(define c%
(class canvas%
(inherit with-gl-context swap-gl-buffers)
(define/override (on-paint)
(with-gl-context
(lambda ()
(gl-clear-color (random) (random) (random) 1)
(gl-clear 'color-buffer-bit)
(swap-gl-buffers)
(gl... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-test/tests/gracket/gl-refresh.rkt | racket | #lang racket/gui
(require sgl)
(define c%
(class canvas%
(inherit with-gl-context swap-gl-buffers)
(define/override (on-paint)
(with-gl-context
(lambda ()
(gl-clear-color (random) (random) (random) 1)
(gl-clear 'color-buffer-bit)
(swap-gl-buffers)
(gl... | |
0ed5f12c48925210c59050ec573f24a3a60c845f5dc81d8b0178d27b7a8dadf4 | rtrusso/scp | build.scm | (need build/rules)
(define output-root "out/")
(define (out . args)
(path-append output-root (apply string-append args)))
(define (scm-command command)
(string-append "scm -b -r5 -q -lrun-scm.scm "
command))
(define (scm-interp-command input output)
(scm-command (string-append "sc... | null | https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/build.scm | scheme | (need build/rules)
(define output-root "out/")
(define (out . args)
(path-append output-root (apply string-append args)))
(define (scm-command command)
(string-append "scm -b -r5 -q -lrun-scm.scm "
command))
(define (scm-interp-command input output)
(scm-command (string-append "sc... | |
6c72bf060853ccacd1ddab7ad34c3cd4fb55b3bd68f310727dc3ef800e55bea3 | tel/saltine | ChaCha20Poly1305.hs | # LANGUAGE DeriveDataTypeable , , DeriveGeneric , ForeignFunctionInterface #
-- |
-- Module : Crypto.Saltine.Internal.AEAD.ChaCha20Poly1305
Copyright : ( c ) 2021
License : MIT
--
-- Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
module Crypto.Saltine.Internal.AEAD.Cha... | null | https://raw.githubusercontent.com/tel/saltine/531997fb4b884bbc15eda56cca88d0f207c4329e/src/Crypto/Saltine/Internal/AEAD/ChaCha20Poly1305.hs | haskell | |
Module : Crypto.Saltine.Internal.AEAD.ChaCha20Poly1305
Maintainer :
Stability : experimental
Portability : non-portable
| An opaque 'ChaCha20Poly1305' cryptographic key.
| An opaque 'ChaCha20Poly1305' nonce.
| Size of a ChaCha20-Poly1305 key
| Size of a ChaCha20-Poly1305 nonce
| Size of a ChaCha2... | # LANGUAGE DeriveDataTypeable , , DeriveGeneric , ForeignFunctionInterface #
Copyright : ( c ) 2021
License : MIT
module Crypto.Saltine.Internal.AEAD.ChaCha20Poly1305 (
aead_chacha20poly1305_keybytes
, aead_chacha20poly1305_npubbytes
, aead_chacha20poly1305_abytes
, c_aead
, c_aead_open
, c... |
12b5118ad64d782681d0dc28c035df21c881731932361abca88d716275dadf18 | tonyg/kali-scheme | graph.scm | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
; Code to print out module dependencies in a format readable by the
graph layout program AT&T DOT Release 1.0 . ( for information on DOT call
the AT&T Software Technology Center Common Support ... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/debug/graph.scm | scheme | Code to print out module dependencies in a format readable by the
Follow link script up to the actual linking
(load-configuration "scheme/interfaces.scm")
(load-configuration "scheme/packages.scm")
(flatload initial-structures)
(load "build/initial.scm")
Load this and run it
(load "scheme/debug/graph.scm")
(depe... | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
graph layout program AT&T DOT Release 1.0 . ( for information on DOT call
the AT&T Software Technology Center Common Support Hotline ( 908 ) 582 - 7009 )
setenv SDE_LICENSE_FILE /pls / local... |
68f3822b5cbb87c4463e0c9bf44fafe09bb7a098f8f9fb7a8cf1e890cb4c17d8 | uim/uim | annotation-filter.scm | ;;; annotation-filter.scm: generic filter for uim
;;;
Copyright ( c ) 2010 - 2013 uim Project
;;;
;;; 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 cod... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/annotation-filter.scm | scheme | annotation-filter.scm: generic filter for uim
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions ... | Copyright ( c ) 2010 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR... |
efadc40d66ead249dc1e6cbf0676b29b39770721cf5a2deb7a77d6eba95a1883 | RBornat/jape | sequent.mli |
Copyright ( C ) 2003 - 19
This file is part of the proof engine , which is part of .
is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either ver... | null | https://raw.githubusercontent.com/RBornat/jape/afe9f207e89e965636b43ef8fad38fd1f69737ae/distrib/camlengine/sequent.mli | ocaml | stile, left, right |
Copyright ( C ) 2003 - 19
This file is part of the proof engine , which is part of .
is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either ver... |
bfcde5393c88562698ab7e2b812afe1b9188e95475fdd362bc7d332896c037cc | Vaguery/klapaucius | string_test.clj | (ns push.type.base.string_test
(:use midje.sweet)
(:use [push.util.test-helpers])
(:use [push.type.item.string])
)
(fact "string-type has :name ':string'"
(:name string-type) => :string)
(fact "string-type has the correct :recognizer"
(:recognizer (:router string-type)) => (exactly string?))
(fact "st... | null | https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/test/push/type/base/string_test.clj | clojure | utilities | (ns push.type.base.string_test
(:use midje.sweet)
(:use [push.util.test-helpers])
(:use [push.type.item.string])
)
(fact "string-type has :name ':string'"
(:name string-type) => :string)
(fact "string-type has the correct :recognizer"
(:recognizer (:router string-type)) => (exactly string?))
(fact "st... |
00ae1abd4638a7127878490e52d2253e562441c2e86d0dc5687b65b2d4031e2f | bobzhang/fan | metafn.ml |
open Astfn
%fans{keep off;
derive
(MetaObj
MetaExpr
class primitive = object
method int _loc (i:int) = %ep{$int':i}
method int32 _loc (i:int32) = %ep{$int32':i}
method int64 _loc (i:int64) = %ep{$int64':i}
method nativeint _loc (i:nativeint) = %ep{$nativeint':i}
method float _loc (i:fl... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/main/metafn.ml | ocaml | default use [meta_loc] for expession
FIXME -- nested include the error message is confusing
local variables:
end: |
open Astfn
%fans{keep off;
derive
(MetaObj
MetaExpr
class primitive = object
method int _loc (i:int) = %ep{$int':i}
method int32 _loc (i:int32) = %ep{$int32':i}
method int64 _loc (i:int64) = %ep{$int64':i}
method nativeint _loc (i:nativeint) = %ep{$nativeint':i}
method float _loc (i:fl... |
2a46b362e61720e2d2f6a6a8f9bbbb24ac57b2c72b874cb91d1a1b6efc690a9e | gfour/gic | add90.hs | result :: Int
result = repeat2 10000 addsx2 30;
addsx2 :: Int -> Int
addsx2 z = f sq z ;
sq :: Int -> Int
sq c = c * c ;
add :: Int -> Int -> Int
add a b = a + b ;
f :: (Int -> Int) -> Int -> Int
f s x = if (x <= 0) then s x else f (add (s x)) (x-1) ;
repeat2 :: Int -> (Int -> Int) -> Int -> Int
repeat2 n f a = re... | null | https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/Examples/Data/add90.hs | haskell | result :: Int
result = repeat2 10000 addsx2 30;
addsx2 :: Int -> Int
addsx2 z = f sq z ;
sq :: Int -> Int
sq c = c * c ;
add :: Int -> Int -> Int
add a b = a + b ;
f :: (Int -> Int) -> Int -> Int
f s x = if (x <= 0) then s x else f (add (s x)) (x-1) ;
repeat2 :: Int -> (Int -> Int) -> Int -> Int
repeat2 n f a = re... | |
a455def0f03b507bff901d855a5057c07fb1be90bf6b1c408557d7f0b274a2e7 | egison/typed-egison | MathOutput.hs | |
Module : Language . . MathOutput
Copyright : : MIT
This module provides utility functions .
Module : Language.Egison.MathOutput
Copyright : Satoshi Egi
Licence : MIT
This module provides utility functions.
-}
module Language.Egison.MathOutput (mathExprToHaskell, mathExprToAs... | null | https://raw.githubusercontent.com/egison/typed-egison/42c94a916226436b65b623fdcb8a8d3b7010c984/hs-src/Language/Egison/MathOutput.hs | haskell |
Show (AsciiMath)
Show (Latex)
| |
Module : Language . . MathOutput
Copyright : : MIT
This module provides utility functions .
Module : Language.Egison.MathOutput
Copyright : Satoshi Egi
Licence : MIT
This module provides utility functions.
-}
module Language.Egison.MathOutput (mathExprToHaskell, mathExprToAs... |
d9947abb164a87e9606c08dadffedf0d366d6ef2aba2c78f797fa44d095ce89e | kappelmann/eidi2_repetitorium_tum | SparseVectorTest.ml | open SparseVector
let _ = if empty<>[] then failwith "Your empty method is not working correctly"
let v = [1;2;3;0;1;0;5;(-10)]
let v = sb_vektor v
let expected = [(0,1);(1,2);(2,3);(4,1);(6,5);(7,(-10))]
let b = v=expected
let _ = if not b then failwith "Your sb_vektor method is not working correctly"
let t = set 3 0... | null | https://raw.githubusercontent.com/kappelmann/eidi2_repetitorium_tum/1d16bbc498487a85960e0d83152249eb13944611/2016/sparse_vector/exercises/SparseVectorTest.ml | ocaml | open SparseVector
let _ = if empty<>[] then failwith "Your empty method is not working correctly"
let v = [1;2;3;0;1;0;5;(-10)]
let v = sb_vektor v
let expected = [(0,1);(1,2);(2,3);(4,1);(6,5);(7,(-10))]
let b = v=expected
let _ = if not b then failwith "Your sb_vektor method is not working correctly"
let t = set 3 0... | |
0164ce3125c241773fb0fc3f0e68f577522f9ca03d3773f350341a98cdf178da | rabbitmq/rabbitmq-management | rabbit_mgmt_wm_topic_permission.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_mgmt_wm_topic_permission).
-expor... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-management/543906f01ccd0344aff648f21bb6b5156b2a2ca2/src/rabbit_mgmt_wm_topic_permission.erl | erlang |
--------------------------------------------------------------------
-------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mgmt_wm_topic_permission).
-export([ini... |
ce75e23ac67b4cea35d81fc4fbfce30bad1b0d0f0f5e0364a1fa374d78b8accb | jordanthayer/ocaml-search | restart_chooser.ml |
little module for choosing actions . Extremely basic value
iteration . Useful for solving a K - arm bandit problem , used here to
select restart predicates for a beam search .
Randomly selects actions for the first k*5 actions , then selects
randomly with chance 1 / n otherwise selects greedi... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/beam/restart_chooser.ml | ocaml |
little module for choosing actions . Extremely basic value
iteration . Useful for solving a K - arm bandit problem , used here to
select restart predicates for a beam search .
Randomly selects actions for the first k*5 actions , then selects
randomly with chance 1 / n otherwise selects greedi... | |
2dd4c8b02bc4ac043d36e090e77faddc66bdc63c2fa17ab133f83a8634eec503 | racket/libs | info.rkt | #lang setup/infotab
SPDX - License - Identifier : ( Apache-2.0 OR MIT )
;; THIS FILE IS AUTO-GENERATED FROM racket/src/native-libs/install.rkt
(define install-platform "ppc-macosx")
(define copy-foreign-libs '("PSMTabBarControl.framework" "libatk-1.0.0.dylib"))
(define compile-omit-paths '("PSMTabBarControl.framew... | null | https://raw.githubusercontent.com/racket/libs/ebcea119197dc0cb86be1ccbbfbe5806f7280976/gui-ppc-macosx/racket/gui/info.rkt | racket | THIS FILE IS AUTO-GENERATED FROM racket/src/native-libs/install.rkt | #lang setup/infotab
SPDX - License - Identifier : ( Apache-2.0 OR MIT )
(define install-platform "ppc-macosx")
(define copy-foreign-libs '("PSMTabBarControl.framework" "libatk-1.0.0.dylib"))
(define compile-omit-paths '("PSMTabBarControl.framework"))
|
069ffb1afe9843a27c06a47c25b568032211ad19339846d75554884af3e12213 | xapi-project/ocaml-qmp | common.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/xapi-project/ocaml-qmp/1036d976dc0ef8ca75507fed195a1c03e4091fe9/cli/common.ml | ocaml |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | |
47dae7da76413d097c2d780fd876538b61d1fe414b8c9ac2fdb62d081df4d561 | GaloisInc/macaw | ARMSemantics.hs | {-# OPTIONS_GHC -w -ddump-splices -ddump-to-file -dth-dec-file #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - unused - matches #
module Data.Macaw... | null | https://raw.githubusercontent.com/GaloisInc/macaw/d1d71fd973f802483e93dffc968dfbdde12fab59/macaw-aarch32/src/Data/Macaw/ARM/Semantics/ARMSemantics.hs | haskell | # OPTIONS_GHC -w -ddump-splices -ddump-to-file -dth-dec-file #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes # | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - unused - matches #
module Data.Macaw.ARM.Semantics.ARMSemantics
( execInstruction
)
where
import qualified Data.ByteString as BS
import quali... |
d09d3484e779ffdb4b7e50b202f187a4c5744f95daf40e461abaa6ee266c641c | hstreamdb/hstream | Error.hs | module DiffFlow.Error where
import Control.Exception
import Data.Text (Text)
data DiffFlowError
= BasicTypesError Text
| BuildGraphError Text
| RunShardError Text
| ImpossibleError
| UnknownError Text
deriving Show
instance Exception DiffFlowError
| null | https://raw.githubusercontent.com/hstreamdb/hstream/95d4c142cce13c595716ce05d1a8ed3a7e417e51/hstream-diffflow/src/DiffFlow/Error.hs | haskell | module DiffFlow.Error where
import Control.Exception
import Data.Text (Text)
data DiffFlowError
= BasicTypesError Text
| BuildGraphError Text
| RunShardError Text
| ImpossibleError
| UnknownError Text
deriving Show
instance Exception DiffFlowError
| |
0e4f3763460f92bc18f94b3b57ef37d84ce8f4dfc1b302fef9922778881f38e4 | janestreet/shexp | prim.ml | open Import
module Args = struct
module Spec = struct
module Arg = struct
type 'a t =
| A of ('a -> Sexp.t)
| L of string * ('a -> Sexp.t)
| O of string * ('a -> Sexp.t) * 'a
end
type 'a t =
| [] : 'a t
| ( :: ) : 'a Arg.t * 'b t -> ('a -> 'b) t
end
We use ... | null | https://raw.githubusercontent.com/janestreet/shexp/635989a9065f94e309707f113d6647dc62d6932f/process-lib/src/prim.ml | ocaml | open Import
module Args = struct
module Spec = struct
module Arg = struct
type 'a t =
| A of ('a -> Sexp.t)
| L of string * ('a -> Sexp.t)
| O of string * ('a -> Sexp.t) * 'a
end
type 'a t =
| [] : 'a t
| ( :: ) : 'a Arg.t * 'b t -> ('a -> 'b) t
end
We use ... | |
a9c5ba7f20f10d3e233523dbe91eabeb927cf391058c5594f4a3a4b29db1eff4 | rpeszek/typed-encoding | UTF8.hs | # LANGUAGE DataKinds #
--{-# LANGUAGE KindSignatures #-}
# LANGUAGE PolyKinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
--{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE PartialTypeSignatures #
{ - # LANGUA... | null | https://raw.githubusercontent.com/rpeszek/typed-encoding/441f9f3bbf849f485f82eae66402ee2fd7b47a34/src/Data/TypedEncoding/Instances/Restriction/UTF8.hs | haskell | {-# LANGUAGE KindSignatures #-}
{-# LANGUAGE OverloadedStrings #-}
conversion to @Text@ to work.
* reexported for backward compatibility, will be removed in the future
$setup
>>> :set -XScopedTypeVariables -XKindSignatures -XMultiParamTypeClasses -XDataKinds -XPolyKinds -XPartialTypeSignatures -XFlexibleInstances... | # LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE PartialTypeSignatures #
{ - # LANGUAGE TypeApplications # - }
| ' UTF-8 ' encoding with additional assum... |
196193f8dffe6b52ec869727f28f70e23a63dd22bfd3db1228afcab8d534d714 | thoughtstem/racket-blocks | main.rkt | #lang racket
(module reader syntax/module-reader
racket-bricks/racket-bricks-module
#:wrapper1 (lambda (t)
(define exp-t (t))
(define (brick-snip? b)
(and
(object? b)
(member 'code-s (field-names b))))
(define (repl... | null | https://raw.githubusercontent.com/thoughtstem/racket-blocks/e3653cac8500883e91feefd6462cb413751d0c16/racket-bricks/main.rkt | racket | is-a? doesn't work? For some reason the class is returned as #f from
(object-info thing) | #lang racket
(module reader syntax/module-reader
racket-bricks/racket-bricks-module
#:wrapper1 (lambda (t)
(define exp-t (t))
(define (brick-snip? b)
(and
(object? b)
(member 'code-s (field-names b))))
(define (repl... |
3551fc36fc28c5d89c786c9bddc765c726e16371e5d911644d6dd81ae2a6a217 | unnohideyuki/bunny | sample321.hs | main = print $ 2^3 `div` 2^2 `div` 2
| null | https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample321.hs | haskell | main = print $ 2^3 `div` 2^2 `div` 2
| |
957ee7be39bb4aef1e90273bc127683b15680f38f3f5fef9a8bf60501dc76fce | VisionsGlobalEmpowerment/webchange | onset_and_rime.clj | (ns webchange.templates.library.onset-and-rime
(:require
[webchange.templates.core :as core]
[webchange.templates.utils.common :as common]))
(def template-options
[{:type "note"
:text "Bring together onset and rime to form a word. Choose the words and writing used below along with an image for the word... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/118ba5ee407ba1261bac40a6ba5729ccda6e8150/src/clj/webchange/templates/library/onset_and_rime.clj | clojure | (ns webchange.templates.library.onset-and-rime
(:require
[webchange.templates.core :as core]
[webchange.templates.utils.common :as common]))
(def template-options
[{:type "note"
:text "Bring together onset and rime to form a word. Choose the words and writing used below along with an image for the word... | |
67741cea72d92a8541391531b2b0edb854df019092e483fcdabef72ad090b5e0 | hemmi/coq2scala | btermdn.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/tactics/btermdn.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Discrimination nets with bounded d... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Term
open Pattern
open N... |
094b87e36c90b8927122e82480c11ab9e593ba3e3fd504bfa273b1b4416a94b8 | maximedenes/native-coq | refine.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/tactics/refine.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
pour debugger
pp_mm mm ++ fnl () ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
JCF -- 6 janvier 1998 EXP... |
f36ff6b39464b02f225ce898108cdc02cb1b7778c3effcf830b085af068e4712 | markhibberd/postmark | Request.hs | {-# LANGUAGE GADTs, GADTSyntax #-}
module Network.Api.Postmark.Request (
PostmarkRequest (..),
PostmarkRequest'
) where
import Network.Api.Postmark.Error
import Data.Aeson
import Data.Text
import Network.Api.Support
import Network.HTTP.Types
data PostmarkRequest e a where
PostmarkRequest :: (FromJSON e, FromJ... | null | https://raw.githubusercontent.com/markhibberd/postmark/2eb6087bbb19421f1dd765b973702f37c1d386e9/src/Network/Api/Postmark/Request.hs | haskell | # LANGUAGE GADTs, GADTSyntax # | module Network.Api.Postmark.Request (
PostmarkRequest (..),
PostmarkRequest'
) where
import Network.Api.Postmark.Error
import Data.Aeson
import Data.Text
import Network.Api.Support
import Network.HTTP.Types
data PostmarkRequest e a where
PostmarkRequest :: (FromJSON e, FromJSON a) => StdMethod -> Text -> Requ... |
55478682402a57a058ec3285bfc112042a8fc0c63dcb5bf43c27822c5fc5dac1 | DKurilo/hackerrank | solution.hs | # LANGUAGE FlexibleInstances , UndecidableInstances , DuplicateRecordFields #
module Main where
import Control.Monad
import Data.Array
import Data.Bits
import Data.List
import Data.List.Split
import Data.Set
import Debug.Trace
import System.Environment
import System.IO
import System.IO.Unsafe
import Debug.Trace
-- ... | null | https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/2d-array/solution.hs | haskell | Complete the hourglassSum function below.
error
hPutStrLn fptr $ show result | # LANGUAGE FlexibleInstances , UndecidableInstances , DuplicateRecordFields #
module Main where
import Control.Monad
import Data.Array
import Data.Bits
import Data.List
import Data.List.Split
import Data.Set
import Debug.Trace
import System.Environment
import System.IO
import System.IO.Unsafe
import Debug.Trace
hou... |
4cb50a888879f6266049a4121e75d080cc3154d747ced6f3a8d27371ee037387 | uwplse/PUMPKIN-PATCH | expansion.ml | (* Expanding proof categories *)
open Stateutils
open Names
open Environ
open Evd
open Constr
open Proofcat
open Proofcatterms
open Evaluation
open Utilities
open Debruijn
open Declarations
open Indutils
open Contextutils
open Convertibility
open Envutils
open Inference
open Checking
(* --- Type definitions --- *)
t... | null | https://raw.githubusercontent.com/uwplse/PUMPKIN-PATCH/73fd77ba49388fdc72702a252a8fa8f071a8e1ea/plugin/src/compilation/expansion.ml | ocaml | Expanding proof categories
--- Type definitions ---
--- Terms and types ---
Expand a product type exactly once
Expand a lambda term exactly once
* Expand an inductive type
* This is unfinished, and currently unused for any benchmarks
--- Contexts ---
* Expand a term exactly once
* Default to using f ... |
open Stateutils
open Names
open Environ
open Evd
open Constr
open Proofcat
open Proofcatterms
open Evaluation
open Utilities
open Debruijn
open Declarations
open Indutils
open Contextutils
open Convertibility
open Envutils
open Inference
open Checking
type 'a expansion_strategy = 'a -> evar_map -> 'a state
let exp... |
adba6357e5df03c862e918d94ddd7fc6c1934f34467faa62c5d7432941b37708 | basho/riak_test | mapred_verify_rt.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2012 Basho Technologies , Inc.
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/mapred_verify_rt.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2012 Basho Technologies , Inc.
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(mapred_verify_rt).
-be... |
a00b97e98f697ffde049af28c938db1173d7083021996cde69dc51d24bb89933 | sneeuwballen/benchpress | Task_queue.ml |
* { 1 Task queue for the server }
open Common
module M = CCLock
module Log = (val Logs.src_log (Logs.Src.create "benchpress.task-queue"))
type job = {
j_uuid: string;
j_action: Action.t;
j_task: Task.t; (* task this action comes from *)
j_interrupted: bool M.t;
mutable j_started_time: float; (* -1. if not... | null | https://raw.githubusercontent.com/sneeuwballen/benchpress/180692844c7680d391fb97ea348084fe9b143ea1/src/core/Task_queue.ml | ocaml | task this action comes from
-1. if not started
TODO: replace the blocking queue with a custom thing with priorities
last seen+descr
run the job
cleanup |
* { 1 Task queue for the server }
open Common
module M = CCLock
module Log = (val Logs.src_log (Logs.Src.create "benchpress.task-queue"))
type job = {
j_uuid: string;
j_action: Action.t;
j_interrupted: bool M.t;
mutable j_percent_completion: int;
mutable j_eta: float;
}
module Job = struct
type t = job... |
2cf410b0b75daa9ecb9ebd463ffd399f647ee67319efb4393dff5bd0e46e5700 | cachix/cachix | SigningKeyCreate.hs | module Cachix.Types.SigningKeyCreate
( SigningKeyCreate (..),
)
where
import Data.Aeson
( FromJSON,
ToJSON,
)
import Data.Swagger
import Protolude
| that a signing secret key was created , by sharing the public key .
newtype SigningKeyCreate = SigningKeyCreate
{ publicKey :: Text
}
deriving (Show... | null | https://raw.githubusercontent.com/cachix/cachix/9ab7727239262e3727081278c1a988245053f454/cachix-api/src/Cachix/Types/SigningKeyCreate.hs | haskell | module Cachix.Types.SigningKeyCreate
( SigningKeyCreate (..),
)
where
import Data.Aeson
( FromJSON,
ToJSON,
)
import Data.Swagger
import Protolude
| that a signing secret key was created , by sharing the public key .
newtype SigningKeyCreate = SigningKeyCreate
{ publicKey :: Text
}
deriving (Show... | |
fc2f139a65b7ece36fdce10bfcb775dfcf24f8e568b1c10a663dbdc49d46acb8 | mzp/coq-ide-for-ios | tactic_debug.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/proofs/tactic_debug.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
This module intends to be a beginni... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : tactic_debug.ml 133... |
3c3229048d80c27a7aec73bd4d5d26cf89a53ae0b290b37ceed62d693d62f80d | craff/simple_httpd | compile_headers_tbl.ml |
let filename =
if Array.length Sys.argv <> 2 then
begin
Printf.eprintf "usage: %s path_to_field_names.csv" Sys.argv.(0);
exit 1
end;
Sys.argv.(1)
let ch = open_in filename
let _ = input_line ch
let rec fn acc =
try
let line = input_line ch in
if String.length line > 0 && Char.lower... | null | https://raw.githubusercontent.com/craff/simple_httpd/fdd326dca29e1b3bd94b60291d38f829c8f8b9e2/src/gen/compile_headers_tbl.ml | ocaml |
let filename =
if Array.length Sys.argv <> 2 then
begin
Printf.eprintf "usage: %s path_to_field_names.csv" Sys.argv.(0);
exit 1
end;
Sys.argv.(1)
let ch = open_in filename
let _ = input_line ch
let rec fn acc =
try
let line = input_line ch in
if String.length line > 0 && Char.lower... | |
0e3fce492b64430083b32edbca13d010aa026cb931aad5c397f99f5cecbc3799 | emina/rosette | websynthlib.rkt | #lang rosette
(require "dom.rkt")
(provide (except-out (all-defined-out) tags))
(define-syntax-rule (define-tags ts)
(tags ts))
(define tag? integer?)
(define tags (make-parameter (cons (hash "" 0) (vector ""))
(lambda (vs)
(cons
... | null | https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/sdsl/websynth/websynthlib.rkt | racket | Convert the final evaluated solution into a zpath string
(string-append "/" (string-join (remove* (list "") (cdr zpath_list)) "/")))
Mask function
Zip
Found at -taste-of-racket/ in the comments. | #lang rosette
(require "dom.rkt")
(provide (except-out (all-defined-out) tags))
(define-syntax-rule (define-tags ts)
(tags ts))
(define tag? integer?)
(define tags (make-parameter (cons (hash "" 0) (vector ""))
(lambda (vs)
(cons
... |
665d82ca88760214ea66cfe68709e35b0634847fed7ef84e20120f5acb853144 | Average-user/gozar | views.cljs | (ns gozar.views
(:require [reagent.core :as r]
[gozar.util :as u]
[goog.events :as events]
[gozar.sgfparser :as parser]
[re-frame.core :as re-frame]))
(def r 0.46)
(defn distance [[a b] [c d]]
(let [abs (fn [x] (if (< x 0) (* -1 x) x))]
(+ (abs (- a c)) (abs (- ... | null | https://raw.githubusercontent.com/Average-user/gozar/102a184bfb41f44a5ee1bc2aa03a63d72290592e/src/cljs/gozar/views.cljs | clojure | (ns gozar.views
(:require [reagent.core :as r]
[gozar.util :as u]
[goog.events :as events]
[gozar.sgfparser :as parser]
[re-frame.core :as re-frame]))
(def r 0.46)
(defn distance [[a b] [c d]]
(let [abs (fn [x] (if (< x 0) (* -1 x) x))]
(+ (abs (- a c)) (abs (- ... | |
bb6b4edf903269871a086e7e4bc89bdd4ee48ac8cb5c51b8594b1ba9f484c4e7 | thelema/ocaml-community | odoc_info.mli | (***********************************************************************)
(* *)
(* OCamldoc *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/ocamldoc/odoc_info.mli | ocaml | *********************************************************************
OCamldoc
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 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 .
type ref_kind = Odoc_types.ref_kind =
... |
f9cf78388de1ab5c2f7766b3978cf75ad35a04860051b4df8d8916bd982b9cbb | hodur-org/hodur-example-app | graphql.clj | (ns hodur-example-app.graphql
(:require [camel-snake-kebab.core :refer [->kebab-case-keyword]]
[camel-snake-kebab.extras :refer [transform-keys]]
[cheshire.core :as cheshire]
[com.walmartlabs.lacinia :as lacinia]))
(def ^:private cors-headers
{"Access-Control-Allow-Origin" "*"
... | null | https://raw.githubusercontent.com/hodur-org/hodur-example-app/e327080de31ecbd32319794eec84b38f0bd5ec41/src/hodur_example_app/graphql.clj | clojure | adding headers to context to be used for feature flag override
we are supporting both "raw" GraphQL queries inside of request body
request headers and body is included in response for debugging purposes
we can remove it later if needed
| (ns hodur-example-app.graphql
(:require [camel-snake-kebab.core :refer [->kebab-case-keyword]]
[camel-snake-kebab.extras :refer [transform-keys]]
[cheshire.core :as cheshire]
[com.walmartlabs.lacinia :as lacinia]))
(def ^:private cors-headers
{"Access-Control-Allow-Origin" "*"
... |
520fd37a4c7168f899c76fdc2c1f55ef5fa10c57df49fc78cac799f765c1747a | Liutos/Project-Euler | pro8.lisp | (defun digstr-prod (digstr)
(apply #'* (map 'list #'(lambda (c)
(- (char-code c) (char-code #\0)))
digstr)))
(defun pro8 (digit-string)
(let ((max 0))
(dotimes (i 996)
(let ((num (digstr-prod (subseq digit-string i (+ 5 i)))))
(if (> num max)
(setf max num))))
max))
(with-open-file ... | null | https://raw.githubusercontent.com/Liutos/Project-Euler/dd59940099ae37f971df1d74c4b7c78131fd5470/lisp/pro8.lisp | lisp | (defun digstr-prod (digstr)
(apply #'* (map 'list #'(lambda (c)
(- (char-code c) (char-code #\0)))
digstr)))
(defun pro8 (digit-string)
(let ((max 0))
(dotimes (i 996)
(let ((num (digstr-prod (subseq digit-string i (+ 5 i)))))
(if (> num max)
(setf max num))))
max))
(with-open-file ... | |
c2e15a5c822677f44dc8c29cce6afc64bf5ce282e434eef8294a8390ee04d134 | bennn/dissertation | main.rkt | #lang typed/racket
(require require-typed-check
"data-adaptor.rkt")
(require/typed/check "const.rkt"
[WORLD (-> World)])
(require/typed/check "motion.rkt"
[reset! (-> Void)]
[world->world (World . -> . World)])
(require/typed/check "... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/snake/typed/main.rkt | racket | #lang typed/racket
(require require-typed-check
"data-adaptor.rkt")
(require/typed/check "const.rkt"
[WORLD (-> World)])
(require/typed/check "motion.rkt"
[reset! (-> Void)]
[world->world (World . -> . World)])
(require/typed/check "... | |
b978d98364e3e7e743008a9fd4464daf2cd9ce7f9f2ac253a939cb97d0189a04 | ocamllabs/ocaml-modular-implicits | outcometree.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Crista... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/typing/outcometree.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 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 .
These types represent messages that the top... |
311217f3e492ea530c146bd7c6d295463199f2de3495bf81baf21169c22119c6 | input-output-hk/marlowe-cardano | Types.hs | -----------------------------------------------------------------------------
--
-- Module : $Headers
License : Apache 2.0
--
-- Stability : Experimental
Portability : Portable
--
| types for the test service client .
--
--------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/16d1e16b0aac74e63f090fca4fc1a40104b7b573/marlowe-test/src/Spec/Marlowe/Service/Types.hs | haskell | ---------------------------------------------------------------------------
Module : $Headers
Stability : Experimental
---------------------------------------------------------------------------
# LANGUAGE OverloadedStrings #
* Types | License : Apache 2.0
Portability : Portable
| types for the test service client .
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
module Spec.Marlowe.Service.Types
Request(..)
, Response(..)
, Seed(..)
, Size(..)
) where
import Control.Appli... |
7adf841f64a81122daff554b79b2d5d74acf4b9a1e851b984b99584942a618cb | OCamlPro/freeton_wallet | commandAccountInfo.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2021 OCamlPro SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/freeton_wallet/b97877379e51d96cb3544141d386d502348cfca9/src/freeton_wallet_lib/commandAccountInfo.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2021 OCamlPro SAS
Public License version 2.1 , with the special exception on linking
open Ezcmd.V2
open EZCMD.TYPES
open Types
let get_key_info key ~json ~secrets =
if json then
let json = EzEncoding.construct ~compact:false Encoding.key key in
... |
bbcccb4407de1a0e740e4dd5046176026d2a2308032701af02b228df15da1faf | Gbury/archsat | semantics.ml | This file is free software , part of Archsat . See file " LICENSE " for more details .
Semantic extensions
(* ************************************************************************ *)
let section = Section.make ~parent:Type.section "addons"
type ext = {
builtins : In.language -> Type.builtin_symbols;
}
let ... | null | https://raw.githubusercontent.com/Gbury/archsat/322fbefa4a58023ddafb3fa1a51f8199c25cde3d/src/input/semantics.ml | ocaml | ************************************************************************
Addons
************************************************************************
Instantiate the extension functor
Convenience function to get the builtin function for type-checking | This file is free software , part of Archsat . See file " LICENSE " for more details .
Semantic extensions
let section = Section.make ~parent:Type.section "addons"
type ext = {
builtins : In.language -> Type.builtin_symbols;
}
let default = fun _ _ _ _ -> None
let mk_ext
?(tptp=default)
?(smtlib=defa... |
e3f0d1f306eef2b022be52d626c01150fcb48bc2d1b8559a77bfb7637a9bab81 | snmsts/cl-langserver | start-slynk.lisp | ;;; This file is intended to be loaded by an implementation to
;;; get a running slynk server
e.g. sbcl --load start-slynk.lisp
;;;
Default port is 4005
;;; For additional slynk-side configurations see
6.2 section of the Slime user manual .
(load (make-pathname :name "slynk-loader" :type "lisp"
... | null | https://raw.githubusercontent.com/snmsts/cl-langserver/3b1246a5d0bd58459e7a64708f820bf718cf7175/src/helitage/start-slynk.lisp | lisp | This file is intended to be loaded by an implementation to
get a running slynk server
For additional slynk-side configurations see
delete any existing SLYNK packages
reload SLYNK, even if the SLYNK package already exists
if non-nil the connection won't be closed
after connecting | e.g. sbcl --load start-slynk.lisp
Default port is 4005
6.2 section of the Slime user manual .
(load (make-pathname :name "slynk-loader" :type "lisp"
:defaults *load-truename*))
(ls-loader:init
(ls-base:create-server :port 4005
:dont-close t)
|
04d2e689321e6a808fb153a73fe528615c59ef64f4dda0a92b4b4cf8e20658ca | g1eny0ung/github-colorful-contributions-graph | core.cljs | (ns ^:figwheel-hooks github-colorful-contributions.core
(:require [goog.dom :as gdom]
[reagent.dom :as rdom]
[github-colorful-contributions.components.header :refer [header]]
[github-colorful-contributions.components.panel :refer [panel]]
[github-colorful-contributions.... | null | https://raw.githubusercontent.com/g1eny0ung/github-colorful-contributions-graph/e7cf654ea43c71109e0fa28d1a625371cfbdd9fc/src/github_colorful_contributions/core.cljs | clojure | conditionally start your application based on the presence of an "app" element
this is particularly helpful for testing this ns without launching the app
specify reload hook with ^:after-load metadata
optionally touch your app-state to force rerendering depending on
your application
(swap! app-state update-in [:_... | (ns ^:figwheel-hooks github-colorful-contributions.core
(:require [goog.dom :as gdom]
[reagent.dom :as rdom]
[github-colorful-contributions.components.header :refer [header]]
[github-colorful-contributions.components.panel :refer [panel]]
[github-colorful-contributions.... |
093c22f56ea6ff43697eb3928aa88ad2805c23cb7a75b5f54f0b704092b0da3c | pirapira/coq2rust | workerPool.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/stm/workerPool.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
manager checks for a request of ter... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
type worker_id = string
type... |
170ad26dc3e27bc58f4a17ae91d2e3fd5f1e0ed08ad245a36de191ae68750c13 | janestreet/universe | ml_bundle.ml | open! Core
open! Async
type t =
{ ml : string
; mli : string option
; module_name : string
}
[@@deriving sexp, compare] [@@sexp.allow_extra_fields]
type tmp_t =
{ mutable tmp_ml : string option
; mutable tmp_mli : string option
; tmp_module_name : string
}
let valid_module_name s =
... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ocaml_plugin/src/ml_bundle.ml | ocaml | same behaviour as before | open! Core
open! Async
type t =
{ ml : string
; mli : string option
; module_name : string
}
[@@deriving sexp, compare] [@@sexp.allow_extra_fields]
type tmp_t =
{ mutable tmp_ml : string option
; mutable tmp_mli : string option
; tmp_module_name : string
}
let valid_module_name s =
... |
9e58d93514979a390a6ef48e29afb4c13150bbfa1997f5201622156d9ae7cc10 | RedPRL/asai | LspEio.mli | open Eio
module RPC := Jsonrpc
* An abstract type representing all of the various resources required to run the LSP server .
type io
(** Initialize the abstract io type. *)
val init : Stdenv.t -> io
* Receive a JSON RPC packet on stdin .
val recv : io -> RPC.Packet.t option
(** Send a JSON RPC packet on stdout. *)
... | null | https://raw.githubusercontent.com/RedPRL/asai/949cf80c2971474931f3a890c51bcb1a0ad687c0/src/lsp/LspEio.mli | ocaml | * Initialize the abstract io type.
* Send a JSON RPC packet on stdout. | open Eio
module RPC := Jsonrpc
* An abstract type representing all of the various resources required to run the LSP server .
type io
val init : Stdenv.t -> io
* Receive a JSON RPC packet on stdin .
val recv : io -> RPC.Packet.t option
val send : io -> RPC.Packet.t -> unit
|
978563a2966e98c3a3d4ab2194f9d95203cd695640c2db0c7bf421f4052c11f8 | nuprl/gradual-typing-performance | structs-tree-contains.rkt | #lang typed/racket/base
(provide tree-contains?)
;; -----------------------------------------------------------------------------
(require "data-node-adapted.rkt"
"data-label-adapted.rkt"
"data-suffix-tree-adapted.rkt"
benchmark-util)
(require/typed/check "structs-node-follow-k.rkt"
[nod... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/micro/suffixtree/typed/structs-tree-contains.rkt | racket | -----------------------------------------------------------------------------
=============================================================================
tree-contains?: tree label -> boolean
Returns true if the tree contains the given label. | #lang typed/racket/base
(provide tree-contains?)
(require "data-node-adapted.rkt"
"data-label-adapted.rkt"
"data-suffix-tree-adapted.rkt"
benchmark-util)
(require/typed/check "structs-node-follow-k.rkt"
[node-follow/k (-> Node
Label
(-> Node Bool... |
9a1f08a16b3ccaef95a5600d145d09a8dcbf683859161d62c1f5e2cb0d52f9bf | discus-lang/ddc | TransformModX.hs |
-- | Helper for transforming the bindings in a module
module DDC.Core.Transform.TransformModX
( transformModX
, transformModLet
)
where
import DDC.Core.Module
import DDC.Core.Exp.Annot
import Control.Arrow
-- | Apply transform to each expression let binding in module
transformModX :: (Exp ... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Transform/TransformModX.hs | haskell | | Helper for transforming the bindings in a module
| Apply transform to each expression let binding in module
| Apply transform to each expression let binding in module, with bind too |
module DDC.Core.Transform.TransformModX
( transformModX
, transformModLet
)
where
import DDC.Core.Module
import DDC.Core.Exp.Annot
import Control.Arrow
transformModX :: (Exp a n -> Exp a n)
-> Module a n
-> Module a n
transformModX f mm
= transformModLet (c... |
83b2a6a944b696cd1e49e4653d5a426f2fb836ed686c17eaff1164baaf800e94 | biocad/openapi3 | CommonTestTypes.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE QuasiQuotes #-}
# LANGUAGE ScopedTypeVariables #
module Data.OpenApi.CommonTestTypes where
import Prelude ()
import Prelude.Compat
import Data.Aeson (ToJSON (..), ToJSONKey (..), Value)
import Data... | null | https://raw.githubusercontent.com/biocad/openapi3/acc5ea71a3c58e0f8b25861f6b6feab2cf0cb87e/test/Data/OpenApi/CommonTestTypes.hs | haskell | # LANGUAGE QuasiQuotes #
========================================================================
Unit type
========================================================================
========================================================================
=====================================================... | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
module Data.OpenApi.CommonTestTypes where
import Prelude ()
import Prelude.Compat
import Data.Aeson (ToJSON (..), ToJSONKey (..), Value)
import Data.Aeson.QQ.Simple
import Dat... |
894c6bb0b9dd5dfb3b281b756b2368e608763a499ae000c7fbe59ed7fa9c19bc | slegrand45/examples_ocsigen | main.ml | open Lwt.Infix
open Types
open Js_of_ocaml
let main _ =
let doc = Dom_html.document in
let parent =
Js.Opt.get (doc##getElementById(Js.string "main"))
(fun () -> assert false)
in
let m = Model.empty_game in
let rp = React.S.create m in
Dom.appendChild parent (Js_of_ocaml_tyxml.Tyxml_js.To_dom.of_... | null | https://raw.githubusercontent.com/slegrand45/examples_ocsigen/e2f5efe57caf7a644795ac6b14f6d6e04168e4be/jsoo/tic-tac-toe/main.ml | ocaml | open Lwt.Infix
open Types
open Js_of_ocaml
let main _ =
let doc = Dom_html.document in
let parent =
Js.Opt.get (doc##getElementById(Js.string "main"))
(fun () -> assert false)
in
let m = Model.empty_game in
let rp = React.S.create m in
Dom.appendChild parent (Js_of_ocaml_tyxml.Tyxml_js.To_dom.of_... | |
f3ecdcf76a9e9206f2dbdc2d49028bc02317c7cdb77670217fcc1e490a05c269 | smallmelon/sdzmmo | log.erl | %%%-----------------------------------
%%% @Module : log
@Author : xhg
%%% @Email :
@Created : 2010.07.23
%%% @Description: 公共函数
%%%-----------------------------------
-module(log).
-include("record.hrl").
-export([
log_stren/7,
log_quality_up/6,
log_quality_out/6,
... | null | https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/lib/log.erl | erlang | -----------------------------------
@Module : log
@Email :
@Description: 公共函数
-----------------------------------
装备品质升级日志
装备品质石拆除日志
装备打孔日志
宝石合成日志
宝石镶嵌日志
宝石拆除日志
装备洗炼日志
消费日志
| @Author : xhg
@Created : 2010.07.23
-module(log).
-include("record.hrl").
-export([
log_stren/7,
log_quality_up/6,
log_quality_out/6,
log_hole/4,
log_compose/6,
log_inlay/5,
log_backout/3,
log_wash/3,
log_consume/4
]).
... |
b6a4d9da9f5406ae7203aa7e6a10d76df6dd12d2d52d3ff31f2bc7b71b66fd61 | timjs/tophat-haskell | Log.hs | # LANGUAGE TemplateHaskell #
module Polysemy.Log
( -- * Effect
Log (..),
Severity (..),
-- * Actions
log,
-- * Interpretations
logToOutput,
logToIO,
)
where
import Polysemy
import Polysemy.Output
---- Effect --------------------------------------------------------------------
data ... | null | https://raw.githubusercontent.com/timjs/tophat-haskell/665d620ded5b61c454b6c50b8590f0d3f21c055f/src/Polysemy/Log.hs | haskell | * Effect
* Actions
* Interpretations
-- Effect --------------------------------------------------------------------
-- Interpretations ----------------------------------------------------------- | # LANGUAGE TemplateHaskell #
module Polysemy.Log
Log (..),
Severity (..),
log,
logToOutput,
logToIO,
)
where
import Polysemy
import Polysemy.Output
data Severity
= Error
| Warning
| Info
instance Display Severity where
display = \case
Error -> "!!"
Warning -> "**"
Info -... |
d6dac196ef10c12654e84484d50efe3a159df101dcdbea0956c4267c356161d8 | beamparticle/beamparticle | beamparticle_highperf_http_handler.erl | %%%-------------------------------------------------------------------
@author neerajsharma
( C ) 2017 , < >
%%% @doc
%%%
%%% @end
%%% %CopyrightBegin%
%%%
Copyright < > 2017 .
All Rights Reserved .
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file ... | null | https://raw.githubusercontent.com/beamparticle/beamparticle/65dcea1569d06b331b08cd9f8018ece4b176b690/src/beamparticle_highperf_http_handler.erl | erlang | -------------------------------------------------------------------
@doc
@end
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIO... | @author neerajsharma
( C ) 2017 , < >
Copyright < > 2017 .
All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(beamparticle_highperf_http_handler).
-behaviour(ranch_protocol).
-inclu... |
c6a99af199c8733744ad6446fa03bc171a3bc70616e291254606be2842f3839a | imrehg/ypsilon | hseparator.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gtk hseparator)
(export gtk_hseparator_get_type
gtk_hseparator_new)
(import (rnrs) (ypsilon ffi))
(define lib-name
(co... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gtk/hseparator.scm | scheme | [end] | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon gtk hseparator)
(export gtk_hseparator_get_type
gtk_hseparator_new)
(import (rnrs) (ypsilon ffi))
(define lib-name
(co... |
cb8f84c61a3063f099dc100f9441cb11d8c1db75a6afb2b86a2ac3eab0b4f9c5 | input-output-hk/Alonzo-testnet | plutus-helloworld-bytestring.hs |
import Prelude
import System.Environment
import Cardano.Api
import Cardano.Api.Shelley
import Data.Aeson (encode)
import qualified Data.ByteString.Short as SBS
import qualified Plutus.V1.Ledger.Api as Plutus
import Plutus.V1.Ledger.Contexts
import ... | null | https://raw.githubusercontent.com/input-output-hk/Alonzo-testnet/ddfe8f077570c6a7530123dfa29feb171061f3db/resources/plutus-sources/plutus-helloworld/app/plutus-helloworld-bytestring.hs | haskell |
import Prelude
import System.Environment
import Cardano.Api
import Cardano.Api.Shelley
import Data.Aeson (encode)
import qualified Data.ByteString.Short as SBS
import qualified Plutus.V1.Ledger.Api as Plutus
import Plutus.V1.Ledger.Contexts
import ... | |
0eb6175a78863abf4a7da43cbd5e7f039e934c37c542ff50c11af4a610c4b502 | ku-fpg/haskino | HelloLawrence.hs | {-# OPTIONS_GHC -fplugin=System.Hardware.Haskino.ShallowDeepPlugin #-}
-------------------------------------------------------------------------------
-- |
Module : System . Hardware . Haskino . SamplePrograms . . ScheduledLCDE
Copyright : ( c ) University of Kansas
-- License : BSD3
-- Stability... | null | https://raw.githubusercontent.com/ku-fpg/haskino/9a0709c92c2da9b9371e292b00fd076e5539eb18/legacy/Rewrite/HelloLawrence.hs | haskell | # OPTIONS_GHC -fplugin=System.Hardware.Haskino.ShallowDeepPlugin #
-----------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
Creates a scheduled task on the Arduino which alternates writing 'Rock',
-----------------------------------------------... | Module : System . Hardware . Haskino . SamplePrograms . . ScheduledLCDE
Copyright : ( c ) University of Kansas
' Chalk ' and ' ' to the LCD screen every second and a half .
Note : This example requires a Mega2560 board , as the Uno boards do not have
enough RAM .
module Main where
module Sys... |
e9821019bf956061139c6667e438fde0dc8fc920b48761f118dbb2cf543a4a0d | bet365/soap | soap_cowboy_protocol.erl | %%
%% %CopyrightBegin%
%%
Copyright Hillside Technology Ltd. 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 ap... | null | https://raw.githubusercontent.com/bet365/soap/856b5c418d8d40a6b5bcbbe3fd390c6a0b8d4f18/src/soap_cowboy_protocol.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 lan... | Copyright Hillside Technology Ltd. 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 ,
version 1.0 and 2.0 . There are separate modules for the 2 versions that
-module(soap_cowboy_protocol).
-e... |
bbc4f3435de299c4209fdf6c063e44a859e9e105c8dd8898030a5c6d808a33bd | informatimago/lisp | thread.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : thread.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; Exports threads manipulation commands.
;;;;
... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/tools/thread.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Exports threads manipulation commands.
LEGAL
This program is free software: you can redistribute it and/or modify
(at your option) any... | FILE : thread.lisp
USER - INTERFACE :
< PJB > < >
MODIFICATIONS
2015 - 02 - 23 < PJB > Added this header .
AGPL3
Copyright 2015 - 2016
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 o... |
70e25e26b987a75540b77a7fc944bd9dd6cbb00e96baa746e2e1ddab6bf22044 | modular-macros/ocaml-macros | t310-alloc-2.ml | open Lib;;
let v = Array.make 200000 2 in
let t = ref 0 in
Array.iter (fun x -> t := !t + x) v;
if !t <> 400000 then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 BRANCH 746
11 RESTART
12 GRAB 1
14 ACC0
1... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/tool-ocaml/t310-alloc-2.ml | ocaml | open Lib;;
let v = Array.make 200000 2 in
let t = ref 0 in
Array.iter (fun x -> t := !t + x) v;
if !t <> 400000 then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 BRANCH 746
11 RESTART
12 GRAB 1
14 ACC0
1... | |
1cf9b2d829748b54394c0f5b339e6045062e4361a4e47497b0a749dd7a5946c7 | avsm/platform | element.ml | TyXML
*
* Copyright ( C ) 2016
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your op... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/tyxml.4.3.0/ppx/element.ml | ocaml | Using metaquot here avoids fiddling with labels. | TyXML
*
* Copyright ( C ) 2016
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your op... |
2e33c884a917901a4fc5ba9c7d8dcdac1b6701a9ba042efe4df7b720926e6f74 | ucsd-progsys/dsolve | heap.mli | (**************************************************************************)
(* *)
Copyright ( C )
(* *)
(* This software is free software;... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/utils/heap.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | Copyright ( C )
modify it under the terms of the GNU Library General Public
License version 2 , with the special exception on linking
module type Ordered = sig
type t
val compare : t -> t -> int
end
exception EmptyHeap
S Imperative implementat... |
9e88dfdb1f7ab066ffd9eccfac0136536b6da5b8437fc188ca0d4277de1166c2 | spawngrid/htoad | erlydtl_runtime.erl | -module(erlydtl_runtime).
-compile(export_all).
-define(IFCHANGED_CONTEXT_VARIABLE, erlydtl_ifchanged_context).
find_value(_, undefined) ->
undefined;
find_value(Key, Fun) when is_function(Fun, 1) ->
Fun(Key);
find_value(Key, L) when is_list(L) ->
case proplists:get_value(Key, L) of
undefined ->
... | null | https://raw.githubusercontent.com/spawngrid/htoad/f0c7dfbd911b29fb0c406b7c26606f553af11194/deps/erlydtl/src/erlydtl_runtime.erl | erlang | -module(erlydtl_runtime).
-compile(export_all).
-define(IFCHANGED_CONTEXT_VARIABLE, erlydtl_ifchanged_context).
find_value(_, undefined) ->
undefined;
find_value(Key, Fun) when is_function(Fun, 1) ->
Fun(Key);
find_value(Key, L) when is_list(L) ->
case proplists:get_value(Key, L) of
undefined ->
... | |
3a1128ef1b78dd0721b0949427ce4b1734aedd2ca88c7711d0e03af2dc4465a1 | mbenelli/klio | charsets#.scm | ;; charsets#.scm - Srfi-14 char-set library
;;
Copyright ( c ) 2010 by < >
All Rights Reserved .
(namespace
("charsets#"
; predicates & comparison
char-set?
char-set=
char-set<=
char-set-hash
; iterating over character set... | null | https://raw.githubusercontent.com/mbenelli/klio/33c11700d6080de44a22a27a5147f97899583f6e/klio/charsets%23.scm | scheme | charsets#.scm - Srfi-14 char-set library
predicates & comparison
iterating over character sets
creating character sets
querying character sets
character-set algebra
standard character sets | Copyright ( c ) 2010 by < >
All Rights Reserved .
(namespace
("charsets#"
char-set?
char-set=
char-set<=
char-set-hash
char-set-cursor
char-set-ref
char-set-cursor-next
end-of-char-set?
char-set-fold
char-set-unfold
char-set-unfold!
char-set-for-each
char-set-map
char-set-copy
... |
954e33cece4b76cfb31f4e82d1fd3141b860149d7accf181e246b866fb5a37df | jaydchan/tawny-karyotype | karyotype_test.clj | The contents of this file are subject to the LGPL License , Version 3.0 .
Copyright ( C ) 2013 , Newcastle University
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of ... | null | https://raw.githubusercontent.com/jaydchan/tawny-karyotype/3a875e5ef7de9372aee70d9e6cc8c22fc5187544/test/ncl/karyotype/karyotype_test.clj | clojure | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public Li... | The contents of this file are subject to the LGPL License , Version 3.0 .
Copyright ( C ) 2013 , Newcastle University
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 ... |
367c60943d0ae57a02ce15e7aae29a81655a067addc9283075239aabc6008992 | haroldcarr/learn-haskell-coq-ml-etc | philosophers.hs | -- generated by HCPN NetEdit v0.0
module Unnamed where
import SimpleHCPN
import GuiHCPN
import List (intersperse)
-- declarations
-- markings
data Mark = Mark {
phil1_ready :: [()]
, phil1_has_both :: [()]
, phil1_has_right :: [()]
, fork2 :: [()]
, fork1 :: [()]
, fork3 :: [()]
, phil... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/playpen/hcpn/examples/philosophers.hs | haskell | generated by HCPN NetEdit v0.0
declarations
markings
transition actions
transitions
initial marking
end of net code
| module Unnamed where
import SimpleHCPN
import GuiHCPN
import List (intersperse)
data Mark = Mark {
phil1_ready :: [()]
, phil1_has_both :: [()]
, phil1_has_right :: [()]
, fork2 :: [()]
, fork1 :: [()]
, fork3 :: [()]
, phil3_ready :: [()]
, phil3_has_both :: [()]
, phil3_has_right ... |
604ff1654873275c198cc37f875e13aa9fff1d34190ef32ee13204ff7b993864 | mirage/ocaml-git | hkt.ml | * This is a module used to share functionality needed by modules that
contain higher - kinded type behavior .
= Higher - Kinded Types
contain higher-kinded type behavior.
HKT = Higher-Kinded Types *)
module HKT = struct
type t
external inj : 'a -> 'b = "%identity"
external prj : 'a -> 'b =... | null | https://raw.githubusercontent.com/mirage/ocaml-git/37c9ef41944b5b19117c34eee83ca672bb63f482/src/not-so-smart/hkt.ml | ocaml | * This is a module used to share functionality needed by modules that
contain higher - kinded type behavior .
= Higher - Kinded Types
contain higher-kinded type behavior.
HKT = Higher-Kinded Types *)
module HKT = struct
type t
external inj : 'a -> 'b = "%identity"
external prj : 'a -> 'b =... | |
4a61a5beb90a1d7070d2f167fd72f76ab727eb372c056c08128c6ba239fbccf8 | anoma/juvix | Paths.hs | module Juvix.Extra.Paths
( module Juvix.Extra.Paths,
module Juvix.Extra.Paths.Base,
)
where
import Juvix.Extra.Paths.Base
import Juvix.Prelude.Base
import Juvix.Prelude.Path
import Language.Haskell.TH.Syntax
relToProject :: Path Rel a -> Path Abs a
relToProject r = $(projectPath) <//> r
assetsDir :: [(Path R... | null | https://raw.githubusercontent.com/anoma/juvix/22027f137c96845cb91c08d510e63fa4bc3f06e2/src/Juvix/Extra/Paths.hs | haskell | | Given a relative file from the root of the project, checks that the file
exists and returns the absolute path | module Juvix.Extra.Paths
( module Juvix.Extra.Paths,
module Juvix.Extra.Paths.Base,
)
where
import Juvix.Extra.Paths.Base
import Juvix.Prelude.Base
import Juvix.Prelude.Path
import Language.Haskell.TH.Syntax
relToProject :: Path Rel a -> Path Abs a
relToProject r = $(projectPath) <//> r
assetsDir :: [(Path R... |
f589b24da58d27ff4edc8ba4a44643b1867418705ed4a364112ccdf9e79a680d | cjohansen/dumdom | dev.cljs | (ns dumdom.dev
(:require [dumdom.core :as dumdom :refer [defcomponent]]
[dumdom.dom :as d]
[snabbdom :as snabbdom]))
(enable-console-print!)
(def app (js/document.getElementById "app"))
(defonce store (atom {:things [{:text "Thing 1"
:id :t1}
... | null | https://raw.githubusercontent.com/cjohansen/dumdom/75c4d049bd9721a483bdbe0900f9c6f65cded19c/dev/dumdom/dev.cljs | clojure | (ns dumdom.dev
(:require [dumdom.core :as dumdom :refer [defcomponent]]
[dumdom.dom :as d]
[snabbdom :as snabbdom]))
(enable-console-print!)
(def app (js/document.getElementById "app"))
(defonce store (atom {:things [{:text "Thing 1"
:id :t1}
... | |
b584ff65d6d130cc9a909760961c186e6905198375941ad31885ef350e4a9a4a | phillord/tawny-owl | type.clj | The contents of this file are subject to the LGPL License , Version 3.0 .
Copyright ( C ) 2012 , 2013 , 2014 , 2017 , Newcastle University
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Lesser General Public License as published by
the Free Software Foun... | null | https://raw.githubusercontent.com/phillord/tawny-owl/331e14b838a42adebbd325f80f60830fa0915d76/src/tawny/type.clj | clojure | This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHA... | The contents of this file are subject to the LGPL License , Version 3.0 .
Copyright ( C ) 2012 , 2013 , 2014 , 2017 , Newcastle University
the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Les... |
368209db13c9a29536675c37de0ea7e98d9d8947fefb16e648024b987fca7eb3 | bgamari/io-uring | PVar.hs | # LANGUAGE UnboxedTuples #
# LANGUAGE MagicHash #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE ScopedTypeVariables #
module System.Linux.IO.URing.PVar
( PVar
, newPVar
, Prim(..)
) where
import GHC.Exts
import GHC.IO
import GHC.Word
data PVar a = PVar (MutableByteArray# RealWorld)
class Prim a where
sizeOf ::... | null | https://raw.githubusercontent.com/bgamari/io-uring/3917e39ac9915daa72b59f523fa0cb118eb10784/src/System/Linux/IO/URing/PVar.hs | haskell | # LANGUAGE BangPatterns # | # LANGUAGE UnboxedTuples #
# LANGUAGE MagicHash #
# LANGUAGE ScopedTypeVariables #
module System.Linux.IO.URing.PVar
( PVar
, newPVar
, Prim(..)
) where
import GHC.Exts
import GHC.IO
import GHC.Word
data PVar a = PVar (MutableByteArray# RealWorld)
class Prim a where
sizeOf :: a -> Int
readPVar :: PVar a... |
7a313b13890d1dbb2cd50fc586a2735c8620b1db614827aa09059542d5499166 | k3nn7/algoliasearch-client-erlang | algolia_index_test.erl | -module(algolia_index_test).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
add_object_test() ->
Object = #{<<"content">> => <<"foo bar">>},
ExpectedRequest = {write, post, "/1/indexes/baz", Object},
ExpectedResult = {ok,
#{<<"createdAt">> => <<"2016-01-24T08:34:47.700Z">>,
<<"objectID"... | null | https://raw.githubusercontent.com/k3nn7/algoliasearch-client-erlang/640f3da5161975a77f45f563ebab22edbf1fb021/test/algolia_index_test.erl | erlang | -module(algolia_index_test).
-compile(export_all).
-include_lib("eunit/include/eunit.hrl").
add_object_test() ->
Object = #{<<"content">> => <<"foo bar">>},
ExpectedRequest = {write, post, "/1/indexes/baz", Object},
ExpectedResult = {ok,
#{<<"createdAt">> => <<"2016-01-24T08:34:47.700Z">>,
<<"objectID"... | |
3dc652de358601843d812cbc334d0272342440cb6b56a9378f03a26b7a4f6ffb | soulomoon/SICP | Exercise4.35.scm | Exercise 4.35 : Write a procedure an - integer - between that returns an integer between two given bounds . This can be used to implement a procedure that finds Pythagorean triples , i.e. , triples of integers ( i , j , ) between the given bounds such that i≤ji≤j and i2+j2 = k2i2+j2 = k2 , as follows :
; (defin... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter4/Exercise4.35.scm | scheme | (define (a-pythagorean-triple-between low high)
(let ((i (an-integer-between low high)))
(let ((j (an-integer-between i high)))
(let ((k (an-integer-between j high)))
(require (= (+ (* i i) (* j j))
(* k k)))
(list i j k)))))
memory limit : 128 MB .
> | Exercise 4.35 : Write a procedure an - integer - between that returns an integer between two given bounds . This can be used to implement a procedure that finds Pythagorean triples , i.e. , triples of integers ( i , j , ) between the given bounds such that i≤ji≤j and i2+j2 = k2i2+j2 = k2 , as follows :
#lang s... |
d51411749b4eb39e2fc2ecc7014e143c9ac940726ebef1f87f269ef0406ebeb6 | AstRonin/sgi | sgi.erl | -module(sgi).
-compile(export_all).
-spec pv(Key, List) -> term() when
Key :: term(),
List :: [term()].
pv(K, L) -> pv(K, L, undefined).
-spec pv(Key, List, Default) -> term() when
Key :: term(),
List :: [term()],
Default :: term().
pv(K, L, D) -> proplists:get_value(K, L, D).
-spec mv(Key, Map) ... | null | https://raw.githubusercontent.com/AstRonin/sgi/3854b62b6ce46ba71abd1e76e9cf5200dc0b1df3/src/sgi.erl | erlang | -module(sgi).
-compile(export_all).
-spec pv(Key, List) -> term() when
Key :: term(),
List :: [term()].
pv(K, L) -> pv(K, L, undefined).
-spec pv(Key, List, Default) -> term() when
Key :: term(),
List :: [term()],
Default :: term().
pv(K, L, D) -> proplists:get_value(K, L, D).
-spec mv(Key, Map) ... | |
2ac7ae473dc32dbe01e3f17efa02fd82d2ba6f48eae36482bb6f8ea79051c311 | tqtezos/minter-sdk | Collections.hs | module Test.Swaps.Collections where
import Prelude hiding (swap, toStrict)
import qualified Data.Sized as Sized (toList)
import qualified Data.Set as Set
import Hedgehog (Gen, Property, forAll, property)
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
import qualified Lorentz.Contract... | null | https://raw.githubusercontent.com/tqtezos/minter-sdk/6239f6ee8435977085c00c194224d4223386841a/packages/minter-contracts/test-hs/Test/Swaps/Collections.hs | haskell | --------------------------------------------------------------------------
Permit Tests
--------------------------------------------------------------------------
----------------------------------------------------------------------------
-- Swap + Burn Tests Using Offchain_accept
------------------------------------... | module Test.Swaps.Collections where
import Prelude hiding (swap, toStrict)
import qualified Data.Sized as Sized (toList)
import qualified Data.Set as Set
import Hedgehog (Gen, Property, forAll, property)
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range
import qualified Lorentz.Contract... |
389ebbc832081f58125398524a47111a1b76f805208686f6666ae31edd3bf9ef | exoscale/clojure-kubernetes-client | v1_event_list.clj | (ns clojure-kubernetes-client.specs.v1-event-list
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-event :refer :all]
[clojure-kubernetes-client.specs.v1-list-meta :refer :all]
)
(:import (java.io File)))
(declar... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_event_list.clj | clojure | (ns clojure-kubernetes-client.specs.v1-event-list
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-event :refer :all]
[clojure-kubernetes-client.specs.v1-list-meta :refer :all]
)
(:import (java.io File)))
(declar... | |
21a6ae5ddd6cbb1ccf2fc8c3242129eef43647859fbf9ae873a24b691a4225fe | pkamenarsky/knit | Eot.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
-- | @generics-eot@ tries to be a library for datatype generic programming
-- that is easy to understand. "eot" stands for "eithers of tuples".
--
A tutorial on ho... | null | https://raw.githubusercontent.com/pkamenarsky/knit/fc1f73f46f34db871cf3a5c7639d336cafe93cb9/vendor/generics-eot/src/Generics/Eot.hs | haskell | | @generics-eot@ tries to be a library for datatype generic programming
that is easy to understand. "eot" stands for "eithers of tuples".
-eot.readthedocs.io/.
* Meta Information
* Useful Re-exports
| An instance (@'HasEot' a@) allows us to
- convert values of an arbitrary algebraic datatype @a@ to and from a ... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
A tutorial on how to use @generics - eot@ can be found here :
module Generics.Eot (
HasEot(..),
Named(..),
Datatype(..),
Constructor(..),
Fields(..),
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.