_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 |
|---|---|---|---|---|---|---|---|---|
257d6f5bae739596600a5f5d27feacae9789b8fb1f86b3fc3f27049f463b40cb | rtoy/ansi-cl-tests | in-package.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Apr 25 08:06:03 1998
;;;; Contains: Tests of IN-PACKAGE
(in-package :cl-test)
(declaim (optimize (safety 3)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; in-package
(deftest in-package.1
(let ((*package* *package*))
(safely-delete-package "H")
(mak... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/in-package.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of IN-PACKAGE
in-package | Author :
Created : Sat Apr 25 08:06:03 1998
(in-package :cl-test)
(declaim (optimize (safety 3)))
(deftest in-package.1
(let ((*package* *package*))
(safely-delete-package "H")
(make-package "H" :use ())
(let ((p2 (in-package "H")))
(and (eqt p2 (find-package "H"))
(eqt *pac... |
bc4a9c3019a647543cd31b4b68ae13d9eb4986efb31a7cc9de849f5dfbab88df | alesaccoia/festival_flinger | tokenpos.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;
Centre for Speech Technology Research ; ;
University of Edinburgh , UK ; ;
;;; ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/tokenpos.scm | scheme |
;;
;
;
Copyright (c) 1996,1997 ;;
;
;;
Permission is hereby granted, free of charge, to use and distribute ;;
this softwar... |
(defvar token_most_common
'(
sym numeric month to day in the of on and writes a years from
for jst at million by is was gmt page he that than more since as when
with but after about or his i has it date no died number bst who miles
university some people an only w year have ago were are pages up days
months hours minu... |
4053e1fd3fad8693e0d3881a520d0ea822b8368575b80e3518d9943224099de5 | lisp-korea/sicp | ex-4-1-byulparan.scm |
(define true #t)
(define false #f)
(define (true? x)
(not (eq? x false)))
(define (false? x)
(eq? x false))
4.1.1 언어실행기의 알짜배기
(define (my-eval exp env)
(cond ((self-evaluating? exp) exp)
((variable? exp) (lookup-variable-value exp env))
((quoted? exp) (text-of-quotation exp))
((assignment? exp) (eval-as... | null | https://raw.githubusercontent.com/lisp-korea/sicp/4cdc1b1d858c6da7c9f4ec925ff4a724f36041cc/ch04/4.1/ex-4-1-byulparan.scm | scheme | 조건식
잇단식
덮어쓰기와 정의
--->
<----
4.1.2 식을 나타내는 방법
덮어쓰기
정의
lambda
if
begin
프로시져 적용
이끌어낸 식 derived expression
a.
b.
derived expression
(or (= 2 2) (= 3 2))
normal let syntax
procedure definition with let
-_-;;
-_-;;
술어 검사 하기
프로시져 표현
환경연산
환경연산
4.1.4 언어실행기를 보통 프로그램처럼 돌려보기
너무 어렵다...........=_= |
(define true #t)
(define false #f)
(define (true? x)
(not (eq? x false)))
(define (false? x)
(eq? x false))
4.1.1 언어실행기의 알짜배기
(define (my-eval exp env)
(cond ((self-evaluating? exp) exp)
((variable? exp) (lookup-variable-value exp env))
((quoted? exp) (text-of-quotation exp))
((assignment? exp) (eval-as... |
21a1419306ab53a072278851cc7bba00583034d523a95a227a033ed789395ae6 | migae/datastore | emaps.clj | (ns test.emaps
(:refer-clojure :exclude [name hash])
(:import [com.google.appengine.tools.development.testing
LocalServiceTestHelper
LocalServiceTestConfig
LocalMemcacheServiceTestConfig
LocalMemcacheServiceTestConfig$SizeUnit
LocalMailServiceTestConfig
... | null | https://raw.githubusercontent.com/migae/datastore/61b2fc243cfd95956d531a57c86ea58eb19af7b7/test/clj/test/emaps.clj | clojure | (:use [clj-logging-config.log4j])
[migae.datastore :as ds]
[ring-zombie.core :as zombie]))
(defn- make-local-services-fixture-fn [services hook-helper]
(ds/init)
(use-fixtures :once (fn [test-fn] (dss/get-datastore-service) (test-fn)))
(log/trace "e1 " (ds/dump e1))
(binding [*print-meta* true]
ignor... | (ns test.emaps
(:refer-clojure :exclude [name hash])
(:import [com.google.appengine.tools.development.testing
LocalServiceTestHelper
LocalServiceTestConfig
LocalMemcacheServiceTestConfig
LocalMemcacheServiceTestConfig$SizeUnit
LocalMailServiceTestConfig
... |
4ba07f68d2c733539a030b4af0f2cb06d989322eab6f5c9fb6491913b4999731 | igorhvr/bedlam | mklibcat.scm | ;"mklibcat.scm" Build catalog for SLIB
Copyright ( C ) 1997 , 1998 , 1999 , 2000 , 2001 , 2002 , 2003
;
;Permission to copy this software, to modify it, to redistribute it,
;to distribute modified versions, and to use it for any purpose is
;granted, subject to the following restrictions and understandings.
;
1 . An... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/mklibcat.scm | scheme | "mklibcat.scm" Build catalog for SLIB
Permission to copy this software, to modify it, to redistribute it,
to distribute modified versions, and to use it for any purpose is
granted, subject to the following restrictions and understandings.
in full.
this software will be error-free, and I am under no obligation to
pro... | Copyright ( C ) 1997 , 1998 , 1999 , 2000 , 2001 , 2002 , 2003
1 . Any copy made of this software must include this copyright notice
2 . I have made no warranty or representation that the operation of
3 . In conjunction with products arising from the use of this
(let ((catpath (in-vicinity (implementation-vici... |
d79ebb6e8c2b9db6c727f77f6aaacda7a4ba33fa0e7616d2bd5816e459ea83b3 | dag/all-about-monads | exercise2.hs | Author :
Maintainer : < >
Time - stamp : < Mon Nov 17 20:48:07 2003 >
License : GPL
Maintainer: Jeff Newbern <>
Time-stamp: <Mon Nov 17 20:48:07 2003>
License: GPL
-}
DESCRIPTION
Exercise 2 - Combining Monadic Values
Write functions parent and grandparent with signa... | null | https://raw.githubusercontent.com/dag/all-about-monads/f5efbe7276a090cb1a3ce7ebb97ac28b1b13572e/examples/exercise2.hs | haskell | everything you need to know about sheep
we show sheep by name
we can use do-notation to build complicated sequences
here are the new functions
Why couldn't we write:
grandparent s = do p <- parent s
Hint: What if a sheep's mother had no parents but its father did,
this builds our sheep family tree | Author :
Maintainer : < >
Time - stamp : < Mon Nov 17 20:48:07 2003 >
License : GPL
Maintainer: Jeff Newbern <>
Time-stamp: <Mon Nov 17 20:48:07 2003>
License: GPL
-}
DESCRIPTION
Exercise 2 - Combining Monadic Values
Write functions parent and grandparent with signa... |
10d26472d83a5b951240a0252b8689600d69d450761f1898f68d77cfa0c0bedf | spechub/Hets | Earley.hs | |
Module : ./Common / Earley.hs
Description : generic analysis , using an parser
Copyright : and Uni Bremen 2003 - 2005
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
Generic analysis , using an parser ... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Common/Earley.hs | haskell | * special tokens for special ids
* resolution chart
| update token positions.
return remaining positions
| update positions in 'Id'.
return remaining positions
no special index type anymore (assuming not much more development)
the info Int denotes fast precedence
the rule to match
additional precedence info f... | |
Module : ./Common / Earley.hs
Description : generic analysis , using an parser
Copyright : and Uni Bremen 2003 - 2005
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
Generic analysis , using an parser ... |
580dd95367098bb5447b4f83a0602b0bf041aa9fe77a97022742ff8cd3d6cef9 | chenyukang/eopl | tests.scm | (module tests mzscheme
(provide tests-for-run tests-for-check)
;;;;;;;;;;;;;;;; tests ;;;;;;;;;;;;;;;;
(define tests-for-run
'(
;; simple arithmetic
(positive-const "11" 11)
(negative-const "-33" -33)
(simple-arith-1 "-(44,33)" 11)
;; nested arithmetic
... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter7/checked/tests.scm | scheme | tests ;;;;;;;;;;;;;;;;
simple arithmetic
nested arithmetic
simple variables
simple unbound variables
simple conditionals
test dynamic typechecking
make sure that the test and both arms get evaluated
properly.
and make sure the other arm doesn't get evaluated.
simple let
check nested let and shad... | (module tests mzscheme
(provide tests-for-run tests-for-check)
(define tests-for-run
'(
(positive-const "11" 11)
(negative-const "-33" -33)
(simple-arith-1 "-(44,33)" 11)
(nested-arith-left "-(-(44,33),22)" -11)
(nested-arith-right "-(55, -(22,11))" 44)
... |
c4e76e75b6d4d801db9484d712c5871a452be2ad447f9ca54a38ca5dbb256fc4 | babashka/pod-babashka-lanterna | lanterna.cljc | #?(:bb (require '[babashka.pods :refer [load-pod]]))
#?(:bb
test pod with JVM :
( load - pod [ " " " trampoline " " run " " -m " " pod.babashka.lanterna " ] { : transport : socket } )
(load-pod ["./pod-babashka-lanterna"] {:transport :socket})
:clj nil
)
#?(:bb (require '[pod.babashka.lanterna.terminal :a... | null | https://raw.githubusercontent.com/babashka/pod-babashka-lanterna/b05aaf6e29310e5fd3a3ad3931857df68529cce3/lanterna.cljc | clojure | #?(:bb (require '[babashka.pods :refer [load-pod]]))
#?(:bb
test pod with JVM :
( load - pod [ " " " trampoline " " run " " -m " " pod.babashka.lanterna " ] { : transport : socket } )
(load-pod ["./pod-babashka-lanterna"] {:transport :socket})
:clj nil
)
#?(:bb (require '[pod.babashka.lanterna.terminal :a... | |
d55faae41d9332ee8a5bc8e1a2cfc84d3dcd025ac9ce4f337a4e73e7f6aeeaa2 | jjmrocha/kill-bill | examples.erl | -module(examples).
-export([start/0]).
start() ->
ok = application:start(crypto),
ok = application:start(syntax_tools),
ok = application:start(compiler),
ok = application:start(ranch),
ok = application:start(cowlib),
ok = application:start(cowboy),
ok = application:start(erlydtl),
ok = base_deps:boot_apps(),
... | null | https://raw.githubusercontent.com/jjmrocha/kill-bill/1ba409c39524f2b47ff1338214bc9b4de3f2659e/examples/src/examples.erl | erlang | -module(examples).
-export([start/0]).
start() ->
ok = application:start(crypto),
ok = application:start(syntax_tools),
ok = application:start(compiler),
ok = application:start(ranch),
ok = application:start(cowlib),
ok = application:start(cowboy),
ok = application:start(erlydtl),
ok = base_deps:boot_apps(),
... | |
c4a264c1d919a3264effa2c8c64e614d8f86b50824d7f27d2d02228681c1f0bc | Eonblast/Scalaxis | yaws_revproxy.erl | %%%-------------------------------------------------------------------
%%% File : yaws_revproxy.erl
%%% Author : <>
%%% Description : reverse proxy
%%%
Created : 3 Dec 2003 by < >
%%%-------------------------------------------------------------------
-module(yaws_revproxy).
-include("../include/yaws.hrl").... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/contrib/yaws/src/yaws_revproxy.erl | erlang | -------------------------------------------------------------------
File : yaws_revproxy.erl
Author : <>
Description : reverse proxy
-------------------------------------------------------------------
reverse proxy implementation.
TODO: Activate proxy keep-alive with a new option ?
Proxy socket definition
... | Created : 3 Dec 2003 by < >
-module(yaws_revproxy).
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").
-export([init/6, ploop/5]).
-define(proxy_keepalive, false).
MREMOND : TODO : Check if redirection works properly ( this is
this is nontrivial to fix .... |
2bce476660458573b1c776363e65859ae6d13d6ad8de08c57321d6261d11fb87 | ocaml-flambda/flambda-backend | coeffects.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/28dd98c2ec4b40a885d4e29260e5fb9e1157f407/middle_end/flambda2/terms/coeffects.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
and , Jane Street Europe
Copyright 1996 Institut National de Recherche en Informatique et
Copyright 2017 - -2019 Jane Street Group LLC
the GNU Lesser General Public License version 2.1... |
fbc966412e92828304e1878d02cdcfb22411ff81154483c406b7aacc43963ff6 | aggieben/weblocks | shared.lisp |
(in-package :weblocks-test)
;;; Define classes for introspection testing
(defclass address ()
((id :initarg :id)
(street :reader address-street :initarg :street :initform "100 Broadway")
(city :reader address-city :initarg :city :initform "New York")
(state :type us-state :initarg :state :initform "NY")))
... | null | https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/test/fixtures/shared.lisp | lisp | Define classes for introspection testing
Create instances for introspection testing
helper to create complex site layout
Some dummy typespecs
dummy-exported-type needs to be exported for
invalid-input-error-message tests to work properly
A class to test behavior on unbound slots |
(in-package :weblocks-test)
(defclass address ()
((id :initarg :id)
(street :reader address-street :initarg :street :initform "100 Broadway")
(city :reader address-city :initarg :city :initform "New York")
(state :type us-state :initarg :state :initform "NY")))
(defparameter *home-address* (make-instance ... |
932d9316adfa3c81845183c543dc687940f01fcf6a0632a141c53b3fcd965f18 | hellonico/origami-fun | siemensstar.clj | (ns opencv4.siemensstar
(:require [opencv4.core :refer :all] [opencv4.utils :as u] [opencv4.colors.rgb :as color]))
; -a-siemens-star-in-opencv-and-c
(defn siemens-star
([ radius nb-pieces] (siemens-star radius nb-pieces [color/cyan-4-]))
([ radius nb-pieces colors]
(let [
star (new-mat (* 2 radi... | null | https://raw.githubusercontent.com/hellonico/origami-fun/80117788530d942eaa9a80e2995b37409fa24889/test/opencv4/siemensstar.clj | clojure | -a-siemens-star-in-opencv-and-c
| (ns opencv4.siemensstar
(:require [opencv4.core :refer :all] [opencv4.utils :as u] [opencv4.colors.rgb :as color]))
(defn siemens-star
([ radius nb-pieces] (siemens-star radius nb-pieces [color/cyan-4-]))
([ radius nb-pieces colors]
(let [
star (new-mat (* 2 radius) (* 2 radius) CV_8UC3 color/whit... |
a763a50f83a0fd751fad3268be7f578573dbb505a4795ab48a8437bd5704bb9d | TrustInSoft/tis-interpreter | bool3.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Aorai plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/aorai/bool3.mli | ocaml | ************************************************************************
alternatives)
Automatique) ... | Modified by TrustInSoft
This file is part of Aorai plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
( Institut National de Recherche en Informatique et en ... |
a15affe1d01a8228bb475b4b7dc315f23bb2006d2ed26f57d9b6ff07fa2986f3 | kazu-yamamoto/dns | Memo.hs | # LANGUAGE RecordWildCards #
module Network.DNS.Memo where
import qualified Control.Reaper as R
import qualified Data.ByteString as B
import qualified Data.CaseInsensitive as CI
import Data.Hourglass (Elapsed)
import Data.OrdPSQ (OrdPSQ)
import qualified Data.OrdPSQ as PSQ
import Time.System (timeCurrent)
import Net... | null | https://raw.githubusercontent.com/kazu-yamamoto/dns/26c88f775247fdcc32fb4fe750ae22a5a1a6750e/internal/Network/DNS/Memo.hs | haskell | Theoretically speaking, atMostView itself is good enough for pruning.
But auto-update assumes a list based db which does not provide atMost
functions. So, we need to do this redundant way.
No copying required for the rest, but avoiding a wildcard pattern match
so that if more option types are added in the future, ... | # LANGUAGE RecordWildCards #
module Network.DNS.Memo where
import qualified Control.Reaper as R
import qualified Data.ByteString as B
import qualified Data.CaseInsensitive as CI
import Data.Hourglass (Elapsed)
import Data.OrdPSQ (OrdPSQ)
import qualified Data.OrdPSQ as PSQ
import Time.System (timeCurrent)
import Net... |
04139802c3ca28e1a1b041339cef186f2f26373fcdb4d74cdd2fe9274027d0dd | c-cube/ocaml-containers | CCPersistentHashtbl.mli | (* This file is free software, part of containers. See file "license" for more details. *)
* Persistent hash - table on top of 's hashtables
Almost as efficient as the regular type , but with a persistent
interface ( rewinding changes to get back in the past history ) . This is
mostly useful for b... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/data/CCPersistentHashtbl.mli | ocaml | This file is free software, part of containers. See file "license" for more details.
* Create a new hashtable, with the given initial capacity.
* Is the table empty?
* Find the value for this key, or fails.
@raise Not_found if the key is not present in the table.
* Synonym to {!find} with flipped arguments. ... |
* Persistent hash - table on top of 's hashtables
Almost as efficient as the regular type , but with a persistent
interface ( rewinding changes to get back in the past history ) . This is
mostly useful for backtracking - like uses , or forward uses ( never using
old values ) .
This mo... |
d50aa2a6720754611d476fca4a1686b80e3b986ad723897a4e47a865ee47ce58 | mejgun/haskell-tdlib | StickerSets.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.StickerSets where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.StickerSetInfo as StickerSetInfo
import qualified Utils as U
-- |
| Represents a list of sticker sets @total_count Approximate total number of st... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/ddcb47043c7a339b4e5995355e5d5a228e21ccb0/src/TD/Data/StickerSets.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
|
| |
module TD.Data.StickerSets where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.StickerSetInfo as StickerSetInfo
import qualified Utils as U
| Represents a list of sticker sets @total_count Approximate total number of sticker sets found @sets List of sticker sets
... |
1218defdf44a801243fff5c49f1238d41ca194ecf175b691752c813c48ab52cc | hasktorch/hasktorch | StdArray.hs |
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
module Torch.Internal.Managed.Type.StdArray where
import Foreign.C.String
import Foreign.C.... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/6233c173e1dd9fd7218fd13b104da15fc457f67e/libtorch-ffi/src/Torch/Internal/Managed/Type/StdArray.hs | haskell | # LANGUAGE OverloadedStrings # |
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
module Torch.Internal.Managed.Type.StdArray where
import Foreign.C.String
import Foreign.C.Types
import Foreign
import Torch.I... |
a1962cf99f4e14e914acf62928a831bcad33717585efc4d930751aa4e0f33dc8 | EMSL-NMR-EPR/Haskell-MFAPipe-Executable | ContributionMatrix.hs | module MFAPipe.Csv.Types.ContributionMatrix
( ContributionMatrixRecords(..)
, ContributionMatrixRecord(..)
, encode
, encodeWith
) where
import Control.Applicative (liftA2)
import Data.ByteString.Lazy (ByteString)
import qualified Data.Csv
import Data.Csv (ToField(), ToNamedRecord(toNamed... | null | https://raw.githubusercontent.com/EMSL-NMR-EPR/Haskell-MFAPipe-Executable/8a7fd13202d3b6b7380af52d86e851e995a9b53e/MFAPipe/app/MFAPipe/Csv/Types/ContributionMatrix.hs | haskell | module MFAPipe.Csv.Types.ContributionMatrix
( ContributionMatrixRecords(..)
, ContributionMatrixRecord(..)
, encode
, encodeWith
) where
import Control.Applicative (liftA2)
import Data.ByteString.Lazy (ByteString)
import qualified Data.Csv
import Data.Csv (ToField(), ToNamedRecord(toNamed... | |
53e27e5024696a78302c7d6c17c57de09f3efe23b1742799a171756a02181377 | ocaml-ppx/ocamlformat | issue114.ml | let () = (f ()).(2) <- e
| null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/test/passing/tests/issue114.ml | ocaml | let () = (f ()).(2) <- e
| |
0ed391ffc7ca963804b38589fd1cfbcbd226e02392e87574f31b4f6cf4123200 | argp/bap | disasm.ml | (** General disassembly stuff *)
open Arch
let arch_to_x86_mode = function
| X86_32 -> Disasm_i386.X86
| X86_64 -> Disasm_i386.X8664
let disasm_instr arch = Disasm_i386.disasm_instr (arch_to_x86_mode arch)
let is_temp = Var_temp.is_temp
let is_decode_error = function
| Ast.Special(s, _, _) when BatString.sta... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/disasm.ml | ocaml | * General disassembly stuff |
open Arch
let arch_to_x86_mode = function
| X86_32 -> Disasm_i386.X86
| X86_64 -> Disasm_i386.X8664
let disasm_instr arch = Disasm_i386.disasm_instr (arch_to_x86_mode arch)
let is_temp = Var_temp.is_temp
let is_decode_error = function
| Ast.Special(s, _, _) when BatString.starts_with s "Unknown instruction" ... |
781b51133532c68af763504a7ec5a0f5263d5292726d128263d253de35bea5c9 | xapi-project/xen-api | sm.ml |
* Copyright ( C ) 2006 - 2009 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 describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/fa6f118fb512a2c90159368a1a0bc1cc730c895b/ocaml/xapi/sm.ml | ocaml | ***************************************************************************
* Scans the plugin directory and registers everything it finds there
***************************************************************************
XXX: need to move this somewhere else eventually
***********************************************... |
* Copyright ( C ) 2006 - 2009 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 describe... |
a1075876333b4cfae76ad7370ed7e3f8a004fe8d6bc3bd8881882c1af7eedb47 | racket/drracket | gui.rkt | #lang racket/base
(require racket/gui/base
racket/class)
(provide find-labelled-window
find-labelled-windows
whitespace-string=?)
;; whitespace-string=? : string string -> boolean
determines if two strings are equal , up to their whitespace .
;; each string is required to... | null | https://raw.githubusercontent.com/racket/drracket/2d7c2cded99e630a69f05fb135d1bf7543096a23/drracket-test/tests/drracket/private/gui.rkt | racket | whitespace-string=? : string string -> boolean
each string is required to have whitespace in the same place,
but not necessarily the same kinds or amount.
whitespace? : char -> boolean
deteremines if `c' is whitespace
only-whitespace? : string number -> boolean
returns true if string only contains whitespace, fr... | #lang racket/base
(require racket/gui/base
racket/class)
(provide find-labelled-window
find-labelled-windows
whitespace-string=?)
determines if two strings are equal , up to their whitespace .
(define (whitespace-string=? string1 string2)
(let loop ([i 0]
... |
1382a949a07c25b5fb75e3330de0bc3c0148a6d5b18ea59469460333e56b4fda | kaizhang/Taiji | NGS.hs | # LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Bio.Pipeline.NGS
( BWAOpts
, BWAOptSetter
, bwaCores
, bwaSeedLen
, bwaMax... | null | https://raw.githubusercontent.com/kaizhang/Taiji/f6a050ba0ee6acb6077435566669279455cef350/bio-pipelines/src/Bio/Pipeline/NGS.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell #
------------------------------------------------------------------------------
DNA-seq
------------------------------------------------------------------------------
^ number of cpu cores
^ seed length, equivalent t... | # LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedLists #
module Bio.Pipeline.NGS
( BWAOpts
, BWAOptSetter
, bwaCores
, bwaSeedLen
, bwaMaxMis
, bwaReadTrim
, defaultBWAOpts
, bwaMkIndex
, bwaAlign
, filterBam
, removeDuplicates
... |
c3854a8aed9de1deed0848e85ebbb88b697649bdbcc5e906a27e83681332b55f | sharplispers/montezuma | conjunction-scorer.lisp | (in-package #:montezuma)
;;?? <<
;;?? next?, do-next, score, init, sort-scorers
(defclass conjunction-scorer (scorer)
((scorers :initform (make-scorers-array) :reader scorers)
(first-time-p :initform T :reader first-time-p)
(more-p :initform T :reader more-p)
... | null | https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/src/search/conjunction-scorer.lisp | lisp | ?? <<
?? next?, do-next, score, init, sort-scorers
(let ((new-scorers (coerce scorers 'list))) | (in-package #:montezuma)
(defclass conjunction-scorer (scorer)
((scorers :initform (make-scorers-array) :reader scorers)
(first-time-p :initform T :reader first-time-p)
(more-p :initform T :reader more-p)
(coord)))
(defun make-scorers-array ()
(make-arra... |
dbd00538893869ff377b5b3e99d0c399a6e27a0403d420abdfb92e13d9bbd68e | oshyshko/uio | test_s3.clj | (ns uio.fs.test-s3
(:require [uio.impl :refer :all]
[uio.fs.s3 :refer :all]
[midje.sweet :refer :all]))
(facts "path-no-slash works"
(path-no-slash "foo@host:8080/some-dir/file.txt?arg=value")
=> "some-dir/file.txt") | null | https://raw.githubusercontent.com/oshyshko/uio/4e73ec5da0be1764e449ccc86e567ec701862332/test/uio/fs/test_s3.clj | clojure | (ns uio.fs.test-s3
(:require [uio.impl :refer :all]
[uio.fs.s3 :refer :all]
[midje.sweet :refer :all]))
(facts "path-no-slash works"
(path-no-slash "foo@host:8080/some-dir/file.txt?arg=value")
=> "some-dir/file.txt") | |
674c252c94ad4518a0e8c05d595b19221a234dbe665bbde09828a80a762ac1f5 | TrustInSoft/tis-interpreter | RefUsage.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/RefUsage.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
4afb9ef50af17b201f264e1da813ff77b6912a42dd40afb3fdf0b70c0f2e4d72 | Dasudian/DSDIN | dsdhttp_ws_test_utils.erl | -module(dsdhttp_ws_test_utils).
-behaviour(websocket_client).
%% API
-export([start_link/2,
start_link_channel/4,
start_channel/4,
set_role/2,
send/3, send/4, send/5,
send_tagged/4,
register_test_for_event/3,
register_test_for_events/3,
unregister... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdhttp/test/dsdhttp_ws_test_utils.erl | erlang | API
behaviour exports
when an WS event occours, the registered process will receive a message in
the mailbox. Message structure will be:
had registered. This message is consumed by wait_for_event/2,3
consumes messages from the mailbox:
consumes messages from the mailbox:
consumes messages from the mailbox:
for... | -module(dsdhttp_ws_test_utils).
-behaviour(websocket_client).
-export([start_link/2,
start_link_channel/4,
start_channel/4,
set_role/2,
send/3, send/4, send/5,
send_tagged/4,
register_test_for_event/3,
register_test_for_events/3,
unregister_test_f... |
ea166e837b81b657e3edd8f8b47627cbf2c658136fa85bd0c38747e6872f5e8a | robrix/sequoia | Sequent.hs | module Sequoia.Sequent
*
Seq(getSeq)
-- * Construction
, liftLR
, lowerLR
, seq
, seqExp
, seqCoexp
, seqFn
-- * Elimination
, evalSeq
, runSeq
, runSeqFn
, elimSeq
-- * Effectful sequents
, runSeqT
, SeqT(..)
) where
import Control.Arrow as Arrow hiding ((>>>), (|||))
import Control.Cat... | null | https://raw.githubusercontent.com/robrix/sequoia/5c151e05ce8f02ad1dcd0d67c193c2d5800ee136/src/Sequoia/Sequent.hs | haskell | * Construction
* Elimination
* Effectful sequents
Sequents
Construction
Elimination
Effectful sequents
< _Γ) g), _Γ)) Cat.>>> app
Structural rules
Contextual rules
Assertion
Negation
Additive
Logical biconditional/exclusive disjunction
Implication
Quantification
Recursion
Polarity shifts | module Sequoia.Sequent
*
Seq(getSeq)
, liftLR
, lowerLR
, seq
, seqExp
, seqCoexp
, seqFn
, evalSeq
, runSeq
, runSeqFn
, elimSeq
, runSeqT
, SeqT(..)
) where
import Control.Arrow as Arrow hiding ((>>>), (|||))
import Control.Category (Category(id))
import qualified Control.Category as Cat
imp... |
bc4c4a79bc6450fddc01f1bc12af2012493948f8238bf5d706842ceed8fe1852 | haskell/ghcide | Error.hs | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
module Development.IDE.GHC.Error
(
-- * Producing Diagnostic values
diagFromErrMsgs
, diagFromErrMsg
, diagFromString
, diagFromStrings
, diagFromGhcException
, catchSrcErrors
-- * utilities... | null | https://raw.githubusercontent.com/haskell/ghcide/3ef4ef99c4b9cde867d29180c32586947df64b9e/src/Development/IDE/GHC/Error.hs | haskell | * Producing Diagnostic values
* utilities working with spans
* utilities working with severities
not shown in the IDE, but useful for ghcide developers
| Extract a file name from a GHC SrcSpan (use message for unhelpful ones)
FIXME This may not be an _absolute_ file name, needs fixing.
"Warning" level are droppe... | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
module Development.IDE.GHC.Error
(
diagFromErrMsgs
, diagFromErrMsg
, diagFromString
, diagFromStrings
, diagFromGhcException
, catchSrcErrors
, srcSpanToLocation
, srcSpanToRange
, realSrcS... |
0a18f1547263f2bfe0a66c415d1d746a0da600cec799d2164fdbfd718bbab1c7 | cpeikert/Lol | Factored.hs | |
Module : Crypto . Lol . Factored
Description : Type - level factored naturals .
Copyright : ( c ) , 2011 - 2017
, 2011 - 2017
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
\ ( \def\lcm{\text{lcm } } \ )
This module defines t... | null | https://raw.githubusercontent.com/cpeikert/Lol/4416ac4f03b0bff08cb1115c72a45eed1fa48ec3/lol/Crypto/Lol/Factored.hs | haskell | # LANGUAGE DataKinds #
* Convenient synonyms for 'Factored', 'PrimePower', and 'Prime' types | |
Module : Crypto . Lol . Factored
Description : Type - level factored naturals .
Copyright : ( c ) , 2011 - 2017
, 2011 - 2017
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
\ ( \def\lcm{\text{lcm } } \ )
This module defines t... |
eab4f9d2534cd0e1955ef89459ad7359effc35a106caad89dc1195523956a433 | incoherentsoftware/defect-process | MainMenu.hs | module Menu.MainMenu
( mkMainMenuData
, drawMainMenu
, mainMenuMain
) where
import Control.Monad (void, when)
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.State (StateT, evalStateT, get, lift, put)
import Data.Functor ((<&>))
import Data.Maybe (isJust)
... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/688680814b0189bf0b792cd99e0d1bd0f7f2f9d9/src/Menu/MainMenu.hs | haskell | module Menu.MainMenu
( mkMainMenuData
, drawMainMenu
, mainMenuMain
) where
import Control.Monad (void, when)
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.State (StateT, evalStateT, get, lift, put)
import Data.Functor ((<&>))
import Data.Maybe (isJust)
... | |
d46bb488d34ca809a3fed52840db122dd7e4291d86cfcee5eda1ade4b3ed77b2 | joedevivo/chatterbox | h2_frame_settings.erl | -module(h2_frame_settings).
-include("http2.hrl").
-behaviour(h2_frame).
-export(
[
format/1,
read_binary/2,
send/1,
send/2,
ack/0,
ack/1,
to_binary/1,
overlay/2,
validate/1
]).
TODO
-type payload() :: #settings{} | {settings, proplist()}.
-type frame() :: {h2_frame:header(),... | null | https://raw.githubusercontent.com/joedevivo/chatterbox/560f2c71a151716512781f0f6196a8a9ff678852/src/h2_frame_settings.erl | erlang | An endpoint that receives a SETTINGS frame with any unknown or unsupported identifier
MUST ignore that setting | -module(h2_frame_settings).
-include("http2.hrl").
-behaviour(h2_frame).
-export(
[
format/1,
read_binary/2,
send/1,
send/2,
ack/0,
ack/1,
to_binary/1,
overlay/2,
validate/1
]).
TODO
-type payload() :: #settings{} | {settings, proplist()}.
-type frame() :: {h2_frame:header(),... |
001f1765d08f16c35b7c46b94136569e26342851f560240f4a4d3d3c7ea7f86b | PapenfussLab/bioshake | SomaticSniper.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
module Bioshake.SomaticSniper where
import Bioshake
import Bioshake.Internal.SomaticSniper
import Bioshake.TH
import Data.List
imp... | null | https://raw.githubusercontent.com/PapenfussLab/bioshake/afeb7219b171e242b6e9bb9e99e2f80c0a099aff/Bioshake/SomaticSniper.hs | haskell | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators # | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Bioshake.SomaticSniper where
import Bioshake
import Bioshake.Internal.SomaticSniper
import Bioshake.TH
import Data.List
import Development.Shake
import Development.Shake.FilePath
$... |
558ac25bee00a3ebd124ad83153fd5156cc1b30690e7c56defff4f7802632d66 | lispunion/code-formatter | main.scm | (include "etc.scm")
(include "format.scm")
(module main ()
(import scheme)
(import chicken.base)
(import chicken.io)
(import chicken.module)
(import chicken.port)
(import chicken.process-context)
(import chicken.string)
(import chicken.sort)
(import callable-data-structures)
(import srfi-1)
(import srfi-13)
... | null | https://raw.githubusercontent.com/lispunion/code-formatter/3eb95c83b9971b555f12a5f621d9121c5bfa5042/main.scm | scheme | Include everything else
Options
Format | (include "etc.scm")
(include "format.scm")
(module main ()
(import scheme)
(import chicken.base)
(import chicken.io)
(import chicken.module)
(import chicken.port)
(import chicken.process-context)
(import chicken.string)
(import chicken.sort)
(import callable-data-structures)
(import srfi-1)
(import srfi-13)
... |
60638701bf524a8e82f56b5148d23d7618683a86eae82b611fa3e6a682780ae5 | ocamllabs/ocaml-modular-implicits | t172-pushenvacc4.ml | open Lib;;
let x = 5 in
let y = 4 in
let z = 3 in
let a = 2 in
let f _ = a + z + y + x in
if f 0 <> 14 then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 BRANCH 21
11 ENVACC1
12 PUSHENVACC2
13 PUSHENVACC3
... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t172-pushenvacc4.ml | ocaml | open Lib;;
let x = 5 in
let y = 4 in
let z = 3 in
let a = 2 in
let f _ = a + z + y + x in
if f 0 <> 14 then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 BRANCH 21
11 ENVACC1
12 PUSHENVACC2
13 PUSHENVACC3
... | |
48324bb17d332ce20eb7b4bf8c61fad49d6d3aace3c1e3a0573f8b36773b47b8 | haskellweekly/haskellweekly | Markdown.hs | module HW.Markdown
( Markdown,
fromText,
toHtml,
)
where
import qualified CMark
import qualified Data.Text as Text
type Markdown = CMark.Node
fromText :: Text.Text -> Markdown
fromText = CMark.commonmarkToNode options
toHtml :: Markdown -> Text.Text
toHtml = CMark.nodeToHtml []
| Options only need to... | null | https://raw.githubusercontent.com/haskellweekly/haskellweekly/615526de6f1e590fff3bac5a7911aaaacf149b09/source/library/HW/Markdown.hs | haskell | HTML. | module HW.Markdown
( Markdown,
fromText,
toHtml,
)
where
import qualified CMark
import qualified Data.Text as Text
type Markdown = CMark.Node
fromText :: Text.Text -> Markdown
fromText = CMark.commonmarkToNode options
toHtml :: Markdown -> Text.Text
toHtml = CMark.nodeToHtml []
| Options only need to... |
dca22f72f1d9e3890c9ff58a8ec30910cb7db6fed88605ac217d3d5c334bb003 | lspitzner/brittany | Test283.hs | layoutWriteNewlineBlock
:: ( MonadMultiWriter Text.Builder.Builder m
, MonadMultiState LayoutState m
, MonadMultiWriter (Seq String) m
)
=> m ()
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test283.hs | haskell | layoutWriteNewlineBlock
:: ( MonadMultiWriter Text.Builder.Builder m
, MonadMultiState LayoutState m
, MonadMultiWriter (Seq String) m
)
=> m ()
| |
64d3e43dc87abd0fc723a0689bbeaa7d509f4317c7feaa1f41f8271dd07ed56a | dagit/logict-sequence | Internal.hs | # LANGUAGE CPP #
#include "logict-sequence.h"
# LANGUAGE ViewPatterns #
{-# LANGUAGE GADTs #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveTraversable #-}
#if __GLASGOW_HASKELL__ < 710
# LANG... | null | https://raw.githubusercontent.com/dagit/logict-sequence/5b0563e88989261842e8c40bd90c6635f9762291/src/Control/Monad/Logic/Sequence/Internal.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE DeriveTraversable #
# LANGUAGE RankNTypes #
We need this for now to work around
/-/issues/22549 which otherwise causes
-fdicts-strict with that version.
OPTIONS_GHC -ddump-simpl -dsuppress-coercions #
| Based on the LogicT improvements in the paper, Reflection without
Remorse. Code i... | # LANGUAGE CPP #
#include "logict-sequence.h"
# LANGUAGE ViewPatterns #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE DeriveGeneric #
#if __GLASGOW_HASKELL__ < 710
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveFunctor #
#endif
# ... |
e522d75f5440e9eaa7710de4123ed34996a36ac7d45b01b044e7da9781f169cd | alekcz/pcp | core_test.clj | (ns pcp.core-test
(:require [clojure.test :refer [deftest is testing]]
[clojure.java.io :as io]
[pcp.resp :as resp]
[pcp.core :as core]
[clojure.string :as str])
(:import [java.io File]))
(deftest read-source-test
(testing "Test reading source"
(is (= "(def si... | null | https://raw.githubusercontent.com/alekcz/pcp/deae9f52908de876564da5e84f452ca37917ea6b/test/pcp/core_test.clj | clojure | (ns pcp.core-test
(:require [clojure.test :refer [deftest is testing]]
[clojure.java.io :as io]
[pcp.resp :as resp]
[pcp.core :as core]
[clojure.string :as str])
(:import [java.io File]))
(deftest read-source-test
(testing "Test reading source"
(is (= "(def si... | |
9ceca89311f9b20d322d1a700ac9b62e895dd851806ac3828b6c4c7e3a99bafc | avsm/ocaml-orm-sqlite | stress.ml | TYPE_CONV_PATH "Stress"
type t = { a : int; b : int } with orm
open OUnit
open Printf
open Test_utils
let time = Unix.gettimeofday
let name = "stress.db"
let time_of fn =
let t1 = time () in
let r = fn () in
let t2 = time () in
t2 -. t1, r
let test_bench name () =
let db = open_db t_init name in
let t... | null | https://raw.githubusercontent.com/avsm/ocaml-orm-sqlite/0c41dee6e254abd75706edcb785f657bfe55d08b/lib_test/stress.ml | ocaml | get all the elements in the database | TYPE_CONV_PATH "Stress"
type t = { a : int; b : int } with orm
open OUnit
open Printf
open Test_utils
let time = Unix.gettimeofday
let name = "stress.db"
let time_of fn =
let t1 = time () in
let r = fn () in
let t2 = time () in
t2 -. t1, r
let test_bench name () =
let db = open_db t_init name in
let t... |
30f98a8686c68a57a91b74aaf57210fa72c288e24d32be7aa49abbe3ebed1538 | franks42/naclj | uri_util_test.clj | (ns naclj.uri-util-test
(:require
[clojure.test :refer :all]
[naclj.uri-util :refer :all]
))
;;setup
;;; tests
;
(deftest urn-test-1
(testing "urn"
(is (= (urn? (java.net.URI. "urn:abc:def:xyz")) true)
)))
(deftest urn-test-2
(testing "urn's"
(let [u "urn:abc:def:xyz"]
(is (= (urn? u) tr... | null | https://raw.githubusercontent.com/franks42/naclj/0658915a860513340c5036fd759cc71510f91879/test/naclj/uri_util_test.clj | clojure | setup
tests
| (ns naclj.uri-util-test
(:require
[clojure.test :refer :all]
[naclj.uri-util :refer :all]
))
(deftest urn-test-1
(testing "urn"
(is (= (urn? (java.net.URI. "urn:abc:def:xyz")) true)
)))
(deftest urn-test-2
(testing "urn's"
(let [u "urn:abc:def:xyz"]
(is (= (urn? u) true))
(is (= (urn... |
38a24c30c4e41c24acfff5704153a639dd37b0ef28817107044c1177695ef62b | chefy-io/clojure-katas | bayesian.clj | (ns clojure-katas.bayesian
(:use incanter.core incanter.stats
incanter.io incanter.bayes incanter.charts)
(:require [clojure-katas.core :as core]))
(def critical-rating
($ :rating (read-dataset "./data/oscar_critical_rating.csv"
:header true)))
(def audience-rating
($ :rating (read-data... | null | https://raw.githubusercontent.com/chefy-io/clojure-katas/81efe02dfe5add9e10146e10dd2b34f072f7686e/src/clojure_katas/optional/bayesian.clj | clojure | assume data | (ns clojure-katas.bayesian
(:use incanter.core incanter.stats
incanter.io incanter.bayes incanter.charts)
(:require [clojure-katas.core :as core]))
(def critical-rating
($ :rating (read-dataset "./data/oscar_critical_rating.csv"
:header true)))
(def audience-rating
($ :rating (read-data... |
ee09d4bc5496c852b3473fe61e61e8f78afee0d989335f1b7191b103563433f3 | tezos/tezos-mirror | test_fuzzing_list_against_stdlib.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2023 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/83da643f3bc9f5c00505393070a23d2b0323a6d0/src/lib_lwt_result_stdlib/test/test_fuzzing_list_against_stdlib.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2023 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
761b8d522eb28c1f5e262006a285cee6bd6ed89458f6b2b0e060caeab3fac7fe | anik545/OwlPPL | test_plot.ml | (* TODO: figure out what to put here *)
open Ppl
open Core
open Core *)
let tests : unit Alcotest.test list = [ ("", []) ]
| null | https://raw.githubusercontent.com/anik545/OwlPPL/ad650219769d5f32564cc771d63c9a52289043a5/ppl/test/unit_tests/test_plot.ml | ocaml | TODO: figure out what to put here | open Ppl
open Core
open Core *)
let tests : unit Alcotest.test list = [ ("", []) ]
|
4c62d6c231401ee597a40883b5b8e10549c3998945cc07156db50d4605f8cd30 | fredlund/McErlang | tests.erl | -module(tests).
-language(erlang).
-export([module_tests/0]).
-export([does_request/3,does_release/3]).
-export([scenario/2,loop/1]).
-include("mce_opts.hrl").
-include("test.hrl").
module_tests() ->
[
#test{name=?MODULE_STRING++":"++"2excl_nofail"++"@examples/locker_v5",
precode=define_monprop(monprop),
ru... | null | https://raw.githubusercontent.com/fredlund/McErlang/25b38a38a729fdb3c3d2afb9be016bbb14237792/examples/Locker/tests.erl | erlang | -module(tests).
-language(erlang).
-export([module_tests/0]).
-export([does_request/3,does_release/3]).
-export([scenario/2,loop/1]).
-include("mce_opts.hrl").
-include("test.hrl").
module_tests() ->
[
#test{name=?MODULE_STRING++":"++"2excl_nofail"++"@examples/locker_v5",
precode=define_monprop(monprop),
ru... | |
bebf221ba5efa91147c7569843a35ad3d1a1a928a74bd76583b711a1802d43ae | shayan-najd/NativeMetaprogramming | Misc.hs | module Options.Misc where
import Types
miscOptions :: [Flag]
miscOptions =
[ flag { flagName = "-jN"
, flagDescription =
"When compiling with :ghc-flag:`--make`, compile ⟨N⟩ modules in parallel."
, flagType = DynamicFlag
}
, flag { flagName = "-fno-hi-version-check"
... | null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/utils/mkUserGuidePart/Options/Misc.hs | haskell | module Options.Misc where
import Types
miscOptions :: [Flag]
miscOptions =
[ flag { flagName = "-jN"
, flagDescription =
"When compiling with :ghc-flag:`--make`, compile ⟨N⟩ modules in parallel."
, flagType = DynamicFlag
}
, flag { flagName = "-fno-hi-version-check"
... | |
7a8218966d720e59c743ee26e85547009a9e63a6ba9c82bc569ddb0d73c533ff | aiya000/haskell-examples | Nat.hs | # LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
import Data.Proxy (Proxy(..))
import GHC.TypeLits
type family Succ (n :: Nat) :: Nat where
Succ n = n + 1
type A = Succ 0
main :: IO ()
main = do
print $ natVal (Proxy :: Proxy... | null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Language/Haskell/Extension/Room/Nat.hs | haskell | {output} | # LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
import Data.Proxy (Proxy(..))
import GHC.TypeLits
type family Succ (n :: Nat) :: Nat where
Succ n = n + 1
type A = Succ 0
main :: IO ()
main = do
print $ natVal (Proxy :: Proxy... |
9c42e47d55480f4a6ddf02ea03438f5fb88d47feb24ed015dbf48b7e0c849e7b | mstewartgallus/hs-callbypushvalue | SimplifyForce.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Cbpv.SimplifyForce (Simplifier, extract) where
import Cbpv
import Common
import Control.Category
import HasCall
import HasCode
import HasConstants
import HasData
import HasLet
import HasTerminal
import HasTu... | null | https://raw.githubusercontent.com/mstewartgallus/hs-callbypushvalue/d8770b7e9e444e1261901f5ee435fcefb0f7ad75/src/Cbpv/SimplifyForce.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes # | # LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Cbpv.SimplifyForce (Simplifier, extract) where
import Cbpv
import Common
import Control.Category
import HasCall
import HasCode
import HasConstants
import HasData
import HasLet
import HasTerminal
import HasTuple
import NatTrans
import Path
import Prelude hidi... |
b6d6531a0c538d04d7e3ed8b08f0a3aa06c1ec8c933e74ae46f6c502c5e390ff | erlang/otp | openssl_session_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2022 . 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 applicab... | null | https://raw.githubusercontent.com/erlang/otp/daccb908c6d46bef5b1129fac66e1cdacb5e0568/lib/ssl/test/openssl_session_SUITE.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 Ericsson AB 2008 - 2022 . 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(openssl_session_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([all/0,
groups/0,
... |
7b42849f3b95822c39290768b3eb38525292997fee14dda3453f120fd240ad96 | mfoemmel/erlang-otp | wxIcon.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxIcon.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxIcon).
-include("wxe.hrl").
-ex... |
df2f69ef6ced6c21757827d104f1c8d818f333f3be70343451e77fc9b140146b | ocaml-multicore/eio | eio__core.mli | (** Private internal module. Use {!Eio} instead. *)
* @canonical Eio . Switch
module Switch : sig
* Many resources in Eio ( such as fibers and file handles ) require a switch to
be provided when they are created . The resource can not outlive its switch .
If a function wants to create such resources ,... | null | https://raw.githubusercontent.com/ocaml-multicore/eio/62568f7895af7a470f53978a5d55ad70279bbf7c/lib_eio/core/eio__core.mli | ocaml | * Private internal module. Use {!Eio} instead.
[flow] will have been closed by this point
* A switch contains a group of fibers and other resources (such as open file handles).
* [run fn] runs [fn] with a fresh switch (initially on).
When [fn] finishes, [run] waits for all fibers registered with the switch t... |
* @canonical Eio . Switch
module Switch : sig
* Many resources in Eio ( such as fibers and file handles ) require a switch to
be provided when they are created . The resource can not outlive its switch .
If a function wants to create such resources , and was not passed a switch
as an argument ... |
f2a0861c96abd0872dec3c557704587ee7d23345202bf93f560bb44ddf342654 | hamidreza-s/Tnesia | tnesia_tql.erl | -module(tnesia_tql).
-export([]).
-include("tnesia.hrl").
-include("types.hrl").
%%====================================================================
%%
%%====================================================================
%%--------------------------------------------------------------------
%%
%%------------... | null | https://raw.githubusercontent.com/hamidreza-s/Tnesia/52a3a88a52b423fbc5959978c0bba61654166d47/src/tnesia_tql.erl | erlang | ====================================================================
====================================================================
--------------------------------------------------------------------
-------------------------------------------------------------------- | -module(tnesia_tql).
-export([]).
-include("tnesia.hrl").
-include("types.hrl").
|
16462f35ad858324ce2e0b6a27cbd238d342533eb017cef3bd8aa30f922d5f71 | exercism/clojurescript | example.cljs | (ns bob)
(defn response-for [] ;; argument goes here...
;; your code goes here...
)
| null | https://raw.githubusercontent.com/exercism/clojurescript/7700a33e17a798f6320aad01fb59a637bd21e12b/exercises/practice/bob/.meta/src/example.cljs | clojure | argument goes here...
your code goes here... | (ns bob)
)
|
94884087bcdc3af56234b6ad0d43e92bac784e2e1e3853ec15504b278ffe9528 | conreality/conreality | device.ml | (* This is free and unencumbered software released into the public domain. *)
open Prelude
class virtual interface = object (self)
method reset = ()
method parent = (None : interface option)
method is_privileged = false (* a sensible default *)
method virtual driver_name : string
method virtual device_n... | null | https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/consensus/machinery/device.ml | ocaml | This is free and unencumbered software released into the public domain.
a sensible default |
open Prelude
class virtual interface = object (self)
method reset = ()
method parent = (None : interface option)
method virtual driver_name : string
method virtual device_name : string
method device_path =
let device_name = [self#device_name] in
match self#parent with
| None -> device_nam... |
05a2c6fee9f8715bf293e9eac996273687b53baf59976c384357de8d4718e27f | muoncore/photon | functions_test.clj | (ns photon.current.functions-test
(:require [photon.exec :as exec]
[serializable.fn :as sfn]
[clojure.tools.logging :as log])
(:use midje.sweet))
(binding [exec/*nashorn-cache* false]
(fact "A simple function is correctly converted (clojure)"
(let [f (:computable
(ex... | null | https://raw.githubusercontent.com/muoncore/photon/622e664f8712de32b9a3c6f3ce2d5e445f31d8b4/test/photon/current/functions_test.clj | clojure | (ns photon.current.functions-test
(:require [photon.exec :as exec]
[serializable.fn :as sfn]
[clojure.tools.logging :as log])
(:use midje.sweet))
(binding [exec/*nashorn-cache* false]
(fact "A simple function is correctly converted (clojure)"
(let [f (:computable
(ex... | |
2fdd4bb51a79e17dbd067aa340ff3e11986712e42f7d9b65ee65a06949c4ece2 | fumieval/extensible | effect.hs | # LANGUAGE TemplateHaskell , DataKinds , TypeOperators , PolyKinds , FlexibleContexts #
# OPTIONS_GHC -fno - warn - simplifiable - class - constraints #
import Data.Extensible
import Control.Monad.IO.Class
import Control.Monad.Trans.Writer.Strict
import Control.Monad.Skeleton
decEffectSuite [d|
data Example x where
... | null | https://raw.githubusercontent.com/fumieval/extensible/6b119e922c1c109c2812d4ad3a2153838528c39d/examples/effect.hs | haskell | | Object-like stateful handler | # LANGUAGE TemplateHaskell , DataKinds , TypeOperators , PolyKinds , FlexibleContexts #
# OPTIONS_GHC -fno - warn - simplifiable - class - constraints #
import Data.Extensible
import Control.Monad.IO.Class
import Control.Monad.Trans.Writer.Strict
import Control.Monad.Skeleton
decEffectSuite [d|
data Example x where
... |
672386d26cb9b329a27501bceea824828cc599a44d4cdd5ee7efb5399c6083af | unclebob/AdventOfCode2021 | core_spec.clj | (ns day7.core-spec
(:require [speclj.core :refer :all]
[day7.core :refer :all]))
(describe "parse input"
(it "parses the input"
(should= [1 2 3] (parse-input "1,2,3\n"))))
(describe "utilities"
(it "should calculate mean"
(should= 2 (mean [1 2 3])))
(it "should find distances from a poin... | null | https://raw.githubusercontent.com/unclebob/AdventOfCode2021/fab0b7b1cf890ffda29b436c28f1ae4adeb22241/day7/spec/day7/core_spec.clj | clojure | (ns day7.core-spec
(:require [speclj.core :refer :all]
[day7.core :refer :all]))
(describe "parse input"
(it "parses the input"
(should= [1 2 3] (parse-input "1,2,3\n"))))
(describe "utilities"
(it "should calculate mean"
(should= 2 (mean [1 2 3])))
(it "should find distances from a poin... | |
18a76fa69d09b54e1b2670474016825c2f1951e9ab7cdede6b00e7964e2203fe | jyp/topics | SimplePolish.hs | Copyright ( c ) JP Bernardy 2008
| This is a re - implementation of the " Polish Parsers " in a clearer way . ( imho )
{-# OPTIONS -fglasgow-exts #-}
module SimplePolish (Process, Void,
symbol, eof, lookNext, runPolish,
runP, progress, evalR,
P) where... | null | https://raw.githubusercontent.com/jyp/topics/8442d82711a02ba1356fd4eca598d1368684fa69/Parsers/SimplePolish.hs | haskell | # OPTIONS -fglasgow-exts #
avoid failure
| Right-eval a fully defined process
| A parser. (This is actually a parsing process segment)
| A complete process
| Run a parser.
| Parse a symbol
This is the eof!
------------------------------------------------
Extra stuff
| Pre-compute a left-prefix of some steps (a... | Copyright ( c ) JP Bernardy 2008
| This is a re - implementation of the " Polish Parsers " in a clearer way . ( imho )
module SimplePolish (Process, Void,
symbol, eof, lookNext, runPolish,
runP, progress, evalR,
P) where
import Control.Applicative
imp... |
1dfb0ffc6c596abae7eb6cf12a25a88df189737521ea7607a28929dea76d9ee8 | hercules-ci/hercules-ci-agent | CreateOrganization.hs | {-# LANGUAGE DeriveAnyClass #-}
module Hercules.API.Organizations.CreateOrganization where
import Hercules.API.Accounts.Account (Account)
import Hercules.API.Prelude
data CreateOrganization = CreateOrganization
{ displayName :: Text,
primaryAccountId :: Id Account
}
deriving (Generic, Show, Eq, NFData, ToJ... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/216a1d178d57471b05f60bf3e21ce46d3fdc5f94/hercules-ci-api/src/Hercules/API/Organizations/CreateOrganization.hs | haskell | # LANGUAGE DeriveAnyClass # |
module Hercules.API.Organizations.CreateOrganization where
import Hercules.API.Accounts.Account (Account)
import Hercules.API.Prelude
data CreateOrganization = CreateOrganization
{ displayName :: Text,
primaryAccountId :: Id Account
}
deriving (Generic, Show, Eq, NFData, ToJSON, FromJSON, ToSchema)
|
1f39fa1282848612bfdaebccb115ef7cdfc8b8ace37e2e4e686554b2b77d6ed5 | MaskRay/OJHaskell | 67.hs | main = print . head . foldr1 f . map (map read . words) . lines =<< getContents
where f x y = zipWith3 (\x y z -> x + max y z) x y $ tail y | null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Project%20Euler/67.hs | haskell | main = print . head . foldr1 f . map (map read . words) . lines =<< getContents
where f x y = zipWith3 (\x y z -> x + max y z) x y $ tail y | |
5dec3c1463f1a25ae5aa035e79766c5fbfd5a888d388c302d42a43044b27afd4 | anurudhp/CPHaskell | 1666.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE LambdaCase #
--
-- Building Roads
{-# LANGUAGE Rank2Types #-}
import Control.Applicative (liftA2)
import Control.Arrow ((>>>))
import Control.Monad.ST
import Control.Monad.State
import Data.Array.MArray
import Data.Array.ST
import Data.Array.Unboxed
import qualified Data.ByteS... | null | https://raw.githubusercontent.com/anurudhp/CPHaskell/a5f23f61b144b83488c5a721274db6e322b005dd/contests/cses/1666.hs | haskell | # LANGUAGE BangPatterns #
Building Roads
# LANGUAGE Rank2Types # | # LANGUAGE LambdaCase #
import Control.Applicative (liftA2)
import Control.Arrow ((>>>))
import Control.Monad.ST
import Control.Monad.State
import Data.Array.MArray
import Data.Array.ST
import Data.Array.Unboxed
import qualified Data.ByteString.Lazy.Char8 as C
import Data.Maybe (catMaybes, fromJust)
type Scanner = St... |
dceb76bf32bc11f40f97ea6d299498aad3a5431a2a6ae2dbeb00eae05b3e9489 | mirage/ocaml-dns-forward | dns_forward_server.ml |
* Copyright ( C ) 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/ocaml-dns-forward/1b253cbf0e1c15b80facbb13ced762a0dfa99bdf/lib/dns_forward_server.ml | ocaml |
* Copyright ( C ) 2016 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | |
bd3557a91cd2ebb32efa4afb2e290c30503582e37e0ac54099c68855cbb60d07 | coot/free-algebras | Abelian.hs | # LANGUAGE CPP #
# LANGUAGE TypeFamilies #
-- 'Option' will be removed in 'ghc-9.2'.
# OPTIONS_GHC -Wno - deprecations #
module Data.Semigroup.Abelian
( AbelianSemigroup
, FreeAbelianSemigroup
, toNonEmpty
, fromNonEmpty
) where
import Data.IntSet (IntSet)
import Dat... | null | https://raw.githubusercontent.com/coot/free-algebras/2dbab377daf4c22c28f7752cb96f042045a90ac9/src/Data/Semigroup/Abelian.hs | haskell | 'Option' will be removed in 'ghc-9.2'.
| Class of commutative monoids, e.g. with additional law:
@
a <> b = b <> a
@
| Free abelian semigroup is isomorphic to a non empty map with keys @a@ and
values positive natural numbers.
It is a monad on the full subcategory which satisfies the `Ord` constraint,
instan... | # LANGUAGE CPP #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wno - deprecations #
module Data.Semigroup.Abelian
( AbelianSemigroup
, FreeAbelianSemigroup
, toNonEmpty
, fromNonEmpty
) where
import Data.IntSet (IntSet)
import Data.List.NonEmpty (NonEmpty)
import qualifie... |
2672861780d8d704366aaf292b96e29469c1bc1f6d4e893b57121313ffe7e65f | bsansouci/bsb-native | genprintval.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cr... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/toplevel/genprintval.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Types
open Format
module type OBJ =... |
dcc363bcbba4d3121f72e323da3ef5ff19e9d3e0271ef0aa49b53c3f7df65024 | irr/erl-tutorials | ts_app.erl | -module(ts_app).
-vsn(1.0).
-author('').
-behaviour(application).
-export([start/0, start/2, stop/1]).
-include("ts.hrl").
start() ->
application:start(?APP).
start(_StartType, _StartArgs) ->
case 'ts_sup':start_link() of
{ok, Pid} ->
{ok, Pid};
Error ->
Error
end.
stop(_State) ->
ok.
| null | https://raw.githubusercontent.com/irr/erl-tutorials/da68b1c08baf6bdf46e7e8d3381d796e93c0357c/ts/ts2/src/ts_app.erl | erlang | -module(ts_app).
-vsn(1.0).
-author('').
-behaviour(application).
-export([start/0, start/2, stop/1]).
-include("ts.hrl").
start() ->
application:start(?APP).
start(_StartType, _StartArgs) ->
case 'ts_sup':start_link() of
{ok, Pid} ->
{ok, Pid};
Error ->
Error
end.
stop(_State) ->
ok.
| |
6e97b40f71d902a287a997ea36cd7c712101fbdcdf2193b2374be72d708845d7 | acieroid/scala-am | fact-indep.scm | ;; Expected result: #t
(letrec ((fact (lambda (n)
(if (= n 0)
1
(* n (fact (- n 1))))))
(t1 (fork (fact 5)))
(t2 (fork (fact 4))))
(= (+ (join t1) (join t2)) 144))
| null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/threads/fact-indep.scm | scheme | Expected result: #t | (letrec ((fact (lambda (n)
(if (= n 0)
1
(* n (fact (- n 1))))))
(t1 (fork (fact 5)))
(t2 (fork (fact 4))))
(= (+ (join t1) (join t2)) 144))
|
31e36ba555e00e116980d8673e395eab13d4beee79567143f42221073577029d | mirage/mirage-www-deployment | config.ml |
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/mirage-www-deployment/ef439e79be8fb8b475021c72af3c781a8bd42cfa/xen/bc917bcaaf90fe052019c5b82dbb968df107233a/config.ml | ocaml | Hack to make the image name parametrized
With tls
Without tls
package ~ocamlfind:["rrd"] ~min:"1.0.1" "xapi-rrd";
package "c3" ;
let tracing = mprof_trace ~size:10000 () in |
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
9528b6c8c8f76194adfe9e041943ad5c85851dd5ee6fa013dd4a5736df1f672f | noinia/hgeometry | ConvexSpec.hs | # LANGUAGE ScopedTypeVariables #
module Geometry.Polygon.Convex.ConvexSpec (spec) where
import Algorithms.Geometry.ConvexHull.GrahamScan (convexHull)
import qualified Algorithms.Geometry.Diameter.Naive as Naive
import Control.Arrow ((&&&))
import Control.Lens ... | null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/test/src/Geometry/Polygon/Convex/ConvexSpec.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
Points that lie on straight lines between vertices are a corner case.
Make sure that they work as expected.
Check that Convex.diameter gives the same result as... | # LANGUAGE ScopedTypeVariables #
module Geometry.Polygon.Convex.ConvexSpec (spec) where
import Algorithms.Geometry.ConvexHull.GrahamScan (convexHull)
import qualified Algorithms.Geometry.Diameter.Naive as Naive
import Control.Arrow ((&&&))
import Control.Lens ... |
f1abb0e7cad04a02388cb2451fb901193c6ce16515dd0145745fdea85bb6f58e | daveliepmann/vdquil | ch3data.clj | Data for exercises in Chapter 3
(ns vdquil.chapter3.ch3data)
;; In the interests of hewing close to the original exercises,
;; I kept the data sources separate. If this were an actual project
;; I would prefer to do the preprocessing to combine them
;; into a single definition.
;; Location, name, and random data w... | null | https://raw.githubusercontent.com/daveliepmann/vdquil/f40788ff7634870a9a5f1dc4ca3df8543beaf00b/src/vdquil/chapter3/ch3data.clj | clojure | In the interests of hewing close to the original exercises,
I kept the data sources separate. If this were an actual project
I would prefer to do the preprocessing to combine them
into a single definition.
Location, name, and random data was:
- copied from the source files into emacs,
- stripped of tabs using ... | Data for exercises in Chapter 3
(ns vdquil.chapter3.ch3data)
(def location-data
{"AL" [439 270]
"AK" [94 325]
"AZ" [148 241]
"AR" [368 247]
"CA" [56 176]
"CO" [220 183]
"CT" [576 120]
"DE" [556 166]
"FL" [510 331]
"GA" [478 267]
"HI" [232 380]
"ID" [143 101]
"IL" [405 168]
... |
50c67c587f2ae487f752c1526371ca7897756ab96db0583b856e10cbb32223f9 | datastax/cass-config-builder | yaml.clj | ;; Copyright DataStax, Inc.
;; Please see the included license file for details.
(ns lcm.utils.yaml
(:require [clojure.walk :as walk])
(:import [org.yaml.snakeyaml Yaml DumperOptions DumperOptions$FlowStyle]))
(defprotocol YamlReader
(decode [data keywords?]))
(defn- decode-key
[k keywords?]
(if keywords?
... | null | https://raw.githubusercontent.com/datastax/cass-config-builder/88623cca0c09b510a6e363c4c7579ffa7d773344/src/lcm/utils/yaml.clj | clojure | Copyright DataStax, Inc.
Please see the included license file for details. |
(ns lcm.utils.yaml
(:require [clojure.walk :as walk])
(:import [org.yaml.snakeyaml Yaml DumperOptions DumperOptions$FlowStyle]))
(defprotocol YamlReader
(decode [data keywords?]))
(defn- decode-key
[k keywords?]
(if keywords?
(keyword k)
k))
(extend-protocol YamlReader
java.util.LinkedHashMap
... |
d95a8740cacec229a90dbd44972cb4fd82450d848ca7c0f3978da14be3a619f8 | hipsleek/hipsleek | deadcodeelim.ml | Eliminate assignment instructions whose results are not
used
used *)
open Cil
open Cilint
open Pretty
open Expcompare
module E = Errormsg
module RD = Reachingdefs
module UD = Usedef
module IH = Inthash
module S = Stats
module IS = Set.Make(
struct
type t = int
let compare = compare
end)
let de... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/cil/src/ext/deadcodeelim.ml | ocaml | This function should be set by the client if it
* knows of functions returning a result that have
* no side effects. If the result is not used, then
* the call will be eliminated.
the set of used definition ids
a mapping d -> {u_1,...,u_n} where d is a
* definition id, and the u's are definition
* ids corresp... | Eliminate assignment instructions whose results are not
used
used *)
open Cil
open Cilint
open Pretty
open Expcompare
module E = Errormsg
module RD = Reachingdefs
module UD = Usedef
module IH = Inthash
module S = Stats
module IS = Set.Make(
struct
type t = int
let compare = compare
end)
let de... |
c6b94eba3d97755aec4614f7a2ff54dbc94fedf13444d17aade48a00a2a772e2 | sg2342/ocaml-rfc6287 | top.ml | (* #use this to setup the interactive environment. *)
#require "nocrypto, nocrypto.unix, astring, hex, rresult";;
#directory "_build/lib";;
#load_rec "rfc6287.cmo";;
let _ = Nocrypto_entropy_unix.initialize ();;
# let suite = . R.get_ok ( Rfc6287.t_of_string " OCRA-1 : - 6 : C - QN08 - PSHA1 " ) ; ;
val suit... | null | https://raw.githubusercontent.com/sg2342/ocaml-rfc6287/19f2a332e9dff82a402d55c43e3965ac27b38879/top.ml | ocaml | #use this to setup the interactive environment. |
#require "nocrypto, nocrypto.unix, astring, hex, rresult";;
#directory "_build/lib";;
#load_rec "rfc6287.cmo";;
let _ = Nocrypto_entropy_unix.initialize ();;
# let suite = . R.get_ok ( Rfc6287.t_of_string " OCRA-1 : - 6 : C - QN08 - PSHA1 " ) ; ;
val suite : = < abstr >
# let q = Rfc6287.challenge suite ;... |
e4f0b95a71ac50834db2f42d736d6993e2f9d1c91661045926e443cbb7f3f9fe | clojure-garden/clojure-garden | subs.cljs | (ns platform.ui.router.subs
(:require
[re-frame.core :as rf]
[reitit.frontend.easy :as rfe]))
(rf/reg-sub
:navigation/router
(fn [db _]
(:router db)))
(rf/reg-sub
:navigation/route
(fn [db _]
(get-in db [:navigation :route])))
(rf/reg-sub
:navigation/route-name
:<- [:navigation/route... | null | https://raw.githubusercontent.com/clojure-garden/clojure-garden/9c58ce33f91aeab5f7bd0d16647ecc450ba8967f/modules/frontend/src/platform/ui/router/subs.cljs | clojure | (ns platform.ui.router.subs
(:require
[re-frame.core :as rf]
[reitit.frontend.easy :as rfe]))
(rf/reg-sub
:navigation/router
(fn [db _]
(:router db)))
(rf/reg-sub
:navigation/route
(fn [db _]
(get-in db [:navigation :route])))
(rf/reg-sub
:navigation/route-name
:<- [:navigation/route... | |
8bf54a1c276f243aa13aebe3916d5ed2526a46d10ec8cb11b773ecf6c4673fd9 | magnars/emacsrocks.com | user.clj | (ns user
(:require [clojure.java.io :as io]
[clojure.pprint :refer [pprint pp print-table]]
[clojure.reflect]
[clojure.repl :refer :all]
[clojure.set :as set]
[clojure.string :as str]
[emacs-rocks.system]
[quick-reset.core :refer [sto... | null | https://raw.githubusercontent.com/magnars/emacsrocks.com/3f2adbb1cf785943b1c713ac7854db3f0a44dfec/dev/user.clj | clojure | (ns user
(:require [clojure.java.io :as io]
[clojure.pprint :refer [pprint pp print-table]]
[clojure.reflect]
[clojure.repl :refer :all]
[clojure.set :as set]
[clojure.string :as str]
[emacs-rocks.system]
[quick-reset.core :refer [sto... | |
eb55a467890f9a35b36acc25900af1c0aee7108eb6978d587cdcb9faf7bd14ff | tamarin-prover/tamarin-prover | Pattern.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE PatternGuards #
-- |
Copyright : ( c ) 2019
-- License : GPL v3 (see LICENSE)
--
Maintainer : < >
P... | null | https://raw.githubusercontent.com/tamarin-prover/tamarin-prover/b14a9e06f20c36a4811944f9216d8826eaa68eab/lib/theory/src/Theory/Sapic/Pattern.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveAnyClass #
|
License : GPL v3 (see LICENSE)
types
converters
utitlities
import Theory.Model.Fact
| Pattern variables either bind new variables or match with existing
| Translate Pattern into term
| Check a pattern for validity w.r.t. a set of variabl... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DeriveGeneric #
# LANGUAGE PatternGuards #
Copyright : ( c ) 2019
Maintainer : < >
Portability : GHC only
Data types for SAPIC processes in theories
module Theory.Sapic.Pattern (
PatternSapicLVar(..... |
113d4121110ce1c818412650df9fe06b2a4f55465a413261a7b8307f560e80ef | jaspervdj/advent-of-code | BranchAndBound.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module AdventOfCode.BranchAndBound
( BranchAndBound (..)
, branchAndBound
) where
import Data.List (foldl')
class BranchAndBound b where
type Score b
score :: b -> Score b
potential :: b -> Score b
next :: b ->... | null | https://raw.githubusercontent.com/jaspervdj/advent-of-code/f8852427abd5889a68a5305391a2fd7f2e56e899/lib/hs/AdventOfCode/BranchAndBound.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module AdventOfCode.BranchAndBound
( BranchAndBound (..)
, branchAndBound
) where
import Data.List (foldl')
class BranchAndBound b where
type Score b
score :: b -> Score b
potential :: b -> Score b
next :: b ->... | |
0ed3519e9647c4228b44acacbfb9db3b585b7b122994d39108105a81c1835c1b | tweag/asterius | T7014.hs | # LANGUAGE CPP #
module Main where
import Data.Bits
test_and1 :: Word -> Word
test_and1 x = x .&. 0
test_and2 :: Word -> Word
test_and2 x = 0 .&. x
test_or1 :: Word -> Word
test_or1 x = x .|. 0
test_or2 :: Word -> Word
test_or2 x = 0 .|. x
test_shiftL :: Word -> Word
test_shiftL x = shiftL x 0
test_shiftR :: Wo... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/numeric/T7014.hs | haskell | # LANGUAGE CPP #
module Main where
import Data.Bits
test_and1 :: Word -> Word
test_and1 x = x .&. 0
test_and2 :: Word -> Word
test_and2 x = 0 .&. x
test_or1 :: Word -> Word
test_or1 x = x .|. 0
test_or2 :: Word -> Word
test_or2 x = 0 .|. x
test_shiftL :: Word -> Word
test_shiftL x = shiftL x 0
test_shiftR :: Wo... | |
6d738b7740894badd6413cab5750529f6c611e4e21a7dd535c6773b7da0e5969 | ocaml/oasis-db | ODBPkg.ml |
* Packages
@author
@author Sylvain Le Gall
*)
open Lwt
open Sexplib.Conv
type t1 = string with sexp
type t =
{
pkg_name: string;
pkg_watch: string option;
} with sexp
type vt =
| V1 of t1
| V2 of t with sexp
let make nm =
nm
let upgrade ~ctxt =
function
... | null | https://raw.githubusercontent.com/ocaml/oasis-db/f8b19d431102b5c5b7dced00a5242a5366ad263f/src/lib/ODBPkg.ml | ocaml | * Load from file
* Dump to file
* Load from channel
* Dump to channel |
* Packages
@author
@author Sylvain Le Gall
*)
open Lwt
open Sexplib.Conv
type t1 = string with sexp
type t =
{
pkg_name: string;
pkg_watch: string option;
} with sexp
type vt =
| V1 of t1
| V2 of t with sexp
let make nm =
nm
let upgrade ~ctxt =
function
... |
85bf60ba25dd052128a8ecc4fda70010d608be2a03ebc4627a68a92cc859041e | haskell-opengl/OpenGLRaw | FramebufferObjectCompatibility.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ARB.FramebufferObjectCompatibility
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
-... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ARB/FramebufferObjectCompatibility.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.ARB.FramebufferObjectCompatibility
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* E... | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.ARB.FramebufferObjectCompatibility (
glGetARBFramebufferObject,
gl_ARB_framebuffer_object,
pattern GL_COLOR_ATTACHMENT0,
pattern GL_COLOR_ATTACHMENT1,
pattern GL_COLOR_ATTACHMENT10,
pattern GL_COLOR_AT... |
337a522e9c8af0879908f7e44b8e451d11d9ef3fe9ad75b9de6f126963c3a7c5 | paurkedal/confero | prereq.ml | Copyright ( C ) 2022 < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any later version , with the ... | null | https://raw.githubusercontent.com/paurkedal/confero/f6bef263f072699957514bbd433b91d512de17a0/lib/prereq.ml | ocaml | Copyright ( C ) 2022 < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any later version , with the ... | |
f05f8ca18ba54c43acb5566f5672e78e7f6414192d2daaed005cc976568df153 | zxymike93/SICP | 258.rkt | #lang sicp
问题a,只需要将 predicate / constructor / selector 对应地改为 list 中间即可 。
;; helper
(define (memq s t)
(cond [(null? t) #f]
[(eq? s (car t)) t]
[else (memq s (cdr t))]))
(define (memp s t)
(define (iter s t p)
(cond [(null? t) #f]
[(eq? s (car t)) p]
[else (iter s (cdr t)... | null | https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/chapter2/258.rkt | racket | helper
predicate
constructor
selector
application
tests | #lang sicp
问题a,只需要将 predicate / constructor / selector 对应地改为 list 中间即可 。
(define (memq s t)
(cond [(null? t) #f]
[(eq? s (car t)) t]
[else (memq s (cdr t))]))
(define (memp s t)
(define (iter s t p)
(cond [(null? t) #f]
[(eq? s (car t)) p]
[else (iter s (cdr t) (append p... |
f83332bb6c47d2887bfb927261937966561434f6e11c05904dcf48dc0992688f | bennn/dissertation | problem.rkt | #lang racket/base
(require racket/class ;sugar/container sugar/debug
racket/contract racket/match racket/generator racket/list)
(require "domain.rkt" "helper.rkt" "constraint.rkt" "solver.rkt")
(provide (all-defined-out))
;; Class used to define a problem and retrieve solutions
(define/contract problem%
(cl... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/quadT/base/csp/problem.rkt | racket | sugar/container sugar/debug
Class used to define a problem and retrieve solutions
use method rather than manually set up fields
implement object printing
Reset the current problem definition
Set the problem solver currently in use
Get the problem solver currently in use
Add a variable to the problem
Contract in... | #lang racket/base
racket/contract racket/match racket/generator racket/list)
(require "domain.rkt" "helper.rkt" "constraint.rkt" "solver.rkt")
(provide (all-defined-out))
(define/contract problem%
(class/c [reset (->m void?)]
[set-solver (solver%? . ->m . void?)]
[get-solver (->m solve... |
a823945d4b492cd3d9ad40841cd3462530f87247606293c4ead8b0c17c234706 | cognitect-labs/onto | query_test.clj | (ns onto.query-test
(:require [datomic.api :as d]
[db-util.in-memory-db :as imdb :refer [*conn* using]]
[onto.core :as o]
[onto.examples.employment :refer :all]
[onto.examples.henleys :refer :all]
[onto.examples.labeling :refer :all]
[onto.exampl... | null | https://raw.githubusercontent.com/cognitect-labs/onto/56eee1833254b902ec7bcf6b82d36e611c1ae207/test/onto/query_test.clj | clojure | (use-fixtures :once (imdb/with-fixed-in-mem-db bootstrap))
Broken at least as early as Datomic 0.9.5656 | (ns onto.query-test
(:require [datomic.api :as d]
[db-util.in-memory-db :as imdb :refer [*conn* using]]
[onto.core :as o]
[onto.examples.employment :refer :all]
[onto.examples.henleys :refer :all]
[onto.examples.labeling :refer :all]
[onto.exampl... |
ba66643a8a127681f72be5b4ec8c156475edce045ee710c9eb2d8c1b4e8b90b2 | zwizwa/rai | tools.rkt | #lang racket/base
(require racket/list
racket/pretty
racket/dict
racket/promise
racket/control
racket/match
racket/sequence
racket/stream
racket/promise
racket/math
syntax/id-table
"number.rkt"
)
(provide (all-d... | null | https://raw.githubusercontent.com/zwizwa/rai/6bcacb7da4172971816027fd88a0209adbd60e30/tools.rkt | racket | This is annoying. The "spliced" structure of keywords makes it
hard to build abstractions on top of it.
((k1 v1) (k2 v2) ...) -> (#:k1 (k1 v1) #:k2 (k2 v2) ...)
I like mutation of accumulators stored in a lexical context.
Threading context through tree iterations is just too painful.
Save to list wrapped in para... | #lang racket/base
(require racket/list
racket/pretty
racket/dict
racket/promise
racket/control
racket/match
racket/sequence
racket/stream
racket/promise
racket/math
syntax/id-table
"number.rkt"
)
(provide (all-d... |
746b5e293c6735bd43255b1a6847238ab4311cdbb5913257de1e7ec7ce7ec721 | garrigue/labltk | lexical.mli | (*************************************************************************)
(* *)
(* OCaml LablTk library *)
(* *)
,... | null | https://raw.githubusercontent.com/garrigue/labltk/c7f50b4faed57f1ac03cb3c9aedc35b10d36bdb6/browser/lexical.mli | ocaml | ***********************************************************************
OCaml LablTk library
... | , Kyoto University RIMS
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
This file is distributed under the terms of the GNU Library
$ Id$
open Widget
val init_tags : ... |
2c4be2bea294f4c14044c12a526c91e7b52d66faf6032418a9cd035d738886dc | Jarzka/stylefy | hoverbox.cljs | (ns stylefy.examples.reagent.hoverbox
(:require [reagent.core :as r]
[garden.stylesheet :refer [at-media]]
[stylefy.core :as stylefy :refer [use-style use-sub-style]]))
(def mobile-media-query {:max-width "550px"})
(def hoverbox-style
{:width "500px"
:height "200px"
:padding "33px"
... | null | https://raw.githubusercontent.com/Jarzka/stylefy/332af0c666a4fee1a0bf4419e8e0e4fd69685eb8/examples/reagent/src/cljs/stylefy/examples/reagent/hoverbox.cljs | clojure | Manual mode is a powerful way to define styles for child components when you absolutely need to write
custom CSS selectors. However, great power comes with a great responsibility. | (ns stylefy.examples.reagent.hoverbox
(:require [reagent.core :as r]
[garden.stylesheet :refer [at-media]]
[stylefy.core :as stylefy :refer [use-style use-sub-style]]))
(def mobile-media-query {:max-width "550px"})
(def hoverbox-style
{:width "500px"
:height "200px"
:padding "33px"
... |
a028997a8ce303b9c35451a0e58d753c8553941d3fa3bbb81ed8e94ee1bdda57 | janestreet/async | try_with.ml | open! Core
open! Async_kernel
let print_sexp sexp = Printf.printf "%s\n" (sexp |> Sexp.to_string_hum)
let () =
Int_conversions.sexp_of_int_style := `Underscores;
let _info = Info.of_string "foo" in
let ivars = ref [] in
let num_iters = 1_000 in
Gc.full_major ();
let minor_before = Gc.minor_words () in
l... | null | https://raw.githubusercontent.com/janestreet/async/56d8d18f61e010fbb975ce3c6df2ab4cc86f6543/bench/try_with.ml | ocaml | open! Core
open! Async_kernel
let print_sexp sexp = Printf.printf "%s\n" (sexp |> Sexp.to_string_hum)
let () =
Int_conversions.sexp_of_int_style := `Underscores;
let _info = Info.of_string "foo" in
let ivars = ref [] in
let num_iters = 1_000 in
Gc.full_major ();
let minor_before = Gc.minor_words () in
l... | |
25e73b9d993dd13c4ba43d43a027ea4512cb0ff18ac2b6a7a7efc538c398ba2d | MichaelDrogalis/voluble | compile.clj | (ns io.mdrogalis.voluble.compile
(:require [io.mdrogalis.voluble.generate :as g]))
(defn sort-strategies [strategies]
(sort-by (juxt :strategy :qualified?) strategies))
(defn compile-generator-strategy [generators]
(let [sorted-seq (sort-strategies generators)
sorted-ks (map #(select-keys % [:strategy :... | null | https://raw.githubusercontent.com/MichaelDrogalis/voluble/e3e46f739271de955b50b1e7d9972e5fd593b870/src/clj/io/mdrogalis/voluble/compile.clj | clojure | (ns io.mdrogalis.voluble.compile
(:require [io.mdrogalis.voluble.generate :as g]))
(defn sort-strategies [strategies]
(sort-by (juxt :strategy :qualified?) strategies))
(defn compile-generator-strategy [generators]
(let [sorted-seq (sort-strategies generators)
sorted-ks (map #(select-keys % [:strategy :... | |
1091668ad0e53638b0dae5bdcc557baca831207a35102561dc33662de21c619e | ff-notes/ff | Extra.hs | module Data.Aeson.Extra (module Data.Aeson, module Data.Aeson.Extra) where
import Data.Aeson
untaggedSum :: Options
untaggedSum = defaultOptions{sumEncoding = UntaggedValue}
singletonObjectSum :: Options
singletonObjectSum = defaultOptions{sumEncoding = ObjectWithSingleField}
| null | https://raw.githubusercontent.com/ff-notes/ff/0cc3a3c00854dfe3767b3fdbfccbe2efeafc44b7/ff-core/lib/Data/Aeson/Extra.hs | haskell | module Data.Aeson.Extra (module Data.Aeson, module Data.Aeson.Extra) where
import Data.Aeson
untaggedSum :: Options
untaggedSum = defaultOptions{sumEncoding = UntaggedValue}
singletonObjectSum :: Options
singletonObjectSum = defaultOptions{sumEncoding = ObjectWithSingleField}
| |
1ca5a0a2161b55773f1d0ace32422cdf53ecb0364b28b8c56507877829dc41a0 | ml4tp/tcoq | reduction.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/checker/reduction.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
********************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Cic
open Term
open Envir... |
b69397720a4e0f11112ab0b151c9990937ec1480f0d7bd0f982a36049d47df5d | GillianPlatform/Gillian | exec_map.ml | * A map of execution of a function ( symbolic or otherwise ) .
This is represented in a tree structure , where each node represents a command .
Each command node comes in one of these forms :
- Normal ( { ! Cmd } ) - a normal command with one command node as its child .
- Branching ( { ! BranchCmd } )... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/c794de7417f29e3c23146f9958ead7e4ad0216ce/GillianCore/debugging/utils/exec_map.ml | ocaml | */*
*/*
* The "kind" of a command in an exec map
* A command that doesn't branch or terminate
* A branching command
* A terminating command
* Maps a list of branches to [Normal] if empty, or [Branch]
* An exec map / node in an exec map; takes the following type parameters:
- ['branch_case]: the type that identif... | * A map of execution of a function ( symbolic or otherwise ) .
This is represented in a tree structure , where each node represents a command .
Each command node comes in one of these forms :
- Normal ( { ! Cmd } ) - a normal command with one command node as its child .
- Branching ( { ! BranchCmd } )... |
f33220c47ac4825ad182038e485b34250fbc6e202c598f5b554563ad73e5b262 | JacquesCarette/Drasil | DrasilState.hs | # LANGUAGE TemplateHaskell , TupleSections #
module Language.Drasil.Code.Imperative.DrasilState (
GenState, DrasilState(..), designLog, inMod, MatchedSpaces, ModExportMap,
ClassDefinitionMap, modExportMap, clsDefMap, addToDesignLog, addLoggedSpace
) where
import Language.Drasil
import GOOL.Drasil (ScopeTag(..), C... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/ba99df20c97e1a830ce0ab518459cc47f7b01485/code/drasil-code/lib/Language/Drasil/Code/Imperative/DrasilState.hs | haskell | | Type for the mapping between 'Space's and 'CodeType's.
| Variable/function name maps to module name.
| Variable/function name maps to class name.
| Abbreviation used throughout generator.
| Private State, used to push these options around the generator.
Choices
Reference materials
Stateful
| Determines wheth... | # LANGUAGE TemplateHaskell , TupleSections #
module Language.Drasil.Code.Imperative.DrasilState (
GenState, DrasilState(..), designLog, inMod, MatchedSpaces, ModExportMap,
ClassDefinitionMap, modExportMap, clsDefMap, addToDesignLog, addLoggedSpace
) where
import Language.Drasil
import GOOL.Drasil (ScopeTag(..), C... |
c536ec9c9f477c42792cf3454a9dac1d73d3dafb050f42448364baf96faa623d | octaspace/ipfs | ipfs.erl | -module(ipfs).
-behaviour(gen_server).
-export([start_link/1]).
-export([stop/1]).
-export([ls/2]).
-export([ls/3]).
-export([add/2]).
-export([add/3]).
-export([cat/2]).
-export([cat/3]).
-export([get/3]).
-export([get/4]).
-export([init/1]).
-export([handle_call/3]).
-export([handle_cast/2]).
-export([handle_info... | null | https://raw.githubusercontent.com/octaspace/ipfs/e8a96e27327144885eb5af96498b3f06df70816a/src/ipfs.erl | erlang | -module(ipfs).
-behaviour(gen_server).
-export([start_link/1]).
-export([stop/1]).
-export([ls/2]).
-export([ls/3]).
-export([add/2]).
-export([add/3]).
-export([cat/2]).
-export([cat/3]).
-export([get/3]).
-export([get/4]).
-export([init/1]).
-export([handle_call/3]).
-export([handle_cast/2]).
-export([handle_info... | |
953503b14948690304f9a270a000ea3756467a7e8ba26d15e303b5d4ed00d9ca | freizl/dive-into-haskell | Vehicles.hs | -- |
module Vehicles where
data Price = Price Integer deriving (Eq, Show)
data Manufacturer = Mini | Mazda | Tata
deriving (Show, Eq)
data Airline = PapuAir | CatapultsR'Us | TakeYourChancesUnited
deriving (Show, Eq)
type Size = Int
data Vehicle =
Car Manufacturer Price
| Plane Airline Size
deriving (Eq... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/readings/haskell-book/11/Vehicles.hs | haskell | | |
module Vehicles where
data Price = Price Integer deriving (Eq, Show)
data Manufacturer = Mini | Mazda | Tata
deriving (Show, Eq)
data Airline = PapuAir | CatapultsR'Us | TakeYourChancesUnited
deriving (Show, Eq)
type Size = Int
data Vehicle =
Car Manufacturer Price
| Plane Airline Size
deriving (Eq, Sho... |
bc2a58acb845674894f31436729f0c0cf3e92439bac787faae1b9dda5ad86f2c | RobBlackwell/cl-azure | servicebus.lisp | ;;;; servicebus.lisp
Copyright ( c ) 2012 , . All rights reserved .
(in-package #:cl-azure)
Experimental support for the Windows Azure Service Bus
;;;; -us/library/windowsazure/ee732537.aspx
Define a protocol for dealing with Servicebus credentials
(defgeneric service-namespace (servicebus-credentials))
(... | null | https://raw.githubusercontent.com/RobBlackwell/cl-azure/03b097256d85ea09f090987c0c833c61eb7b9b5d/servicebus.lisp | lisp | servicebus.lisp
-us/library/windowsazure/ee732537.aspx
and a default implementation
Note that the realm used when requesting a token uses the HTTP scheme, even though
calls to the service are always issued over HTTPS
-us/library/windowsazure/hh780718.aspx
-us/library/windowsazure/hh780754.aspx
-us/library/wind... | Copyright ( c ) 2012 , . All rights reserved .
(in-package #:cl-azure)
Experimental support for the Windows Azure Service Bus
Define a protocol for dealing with Servicebus credentials
(defgeneric service-namespace (servicebus-credentials))
(defgeneric issuer-name (servicebus-credentials))
(defgeneric issu... |
1448d3d23ab21c52e3c39e176e950d16edb9bd9e5db158da294299dee1684044 | sondresl/AdventOfCode | Day18-old.hs | module Day18Old where
import Data.List
import Data.Char
import Data.Maybe
import Control.Lens
import Data.Bifunctor
import qualified Data.Set as S
import qualified Data.PQueue.Prio.Min as P
import qualified Data.Map.Strict as M
import Debug.Trace
-- Definitions
data Object = Key Char
| Door Char
... | null | https://raw.githubusercontent.com/sondresl/AdventOfCode/51525441795417f31b3eb67a690aa5534d1e699b/2019/Haskell/src/Day18-old.hs | haskell | Definitions
Parsing and drawing
| Make the initial queue for a labyrinth
Cannot fail
Finished
For multiple labyrinths
where
lab3 <- parseLab <$> readFile "test3.in"
lab1 <- parseLab <$> readFile "test1.in"
lab <- parseLab <$> readFile "data/input-2019-18-2.txt"
print $ solveB lab | module Day18Old where
import Data.List
import Data.Char
import Data.Maybe
import Control.Lens
import Data.Bifunctor
import qualified Data.Set as S
import qualified Data.PQueue.Prio.Min as P
import qualified Data.Map.Strict as M
import Debug.Trace
data Object = Key Char
| Door Char
| Path
... |
eb29f9489696fef3aabf5a0a0ac067ef32f48b01ef4992efab9cefb9d9487123 | well-typed/large-records | R000.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
module After.Sized.R000 where
| null | https://raw.githubusercontent.com/well-typed/large-records/0e8ecf7e8459569e5af6843fee84ff80a3bc54cf/large-records-benchmarks/bench/after/After/Sized/R000.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings # | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module After.Sized.R000 where
|
7edfdc838df209b01f386a5b12cde2ae2235f7f52b192265687fe427cc6af92b | Enecuum/Node | ControlFlow.hs | module Enecuum.Testing.Core.Interpreters.ControlFlow where
import Enecuum.Prelude
import qualified Enecuum.Core.ControlFlow.Language as L
interpretControlFlowF :: L.ControlFlowF a -> IO a
interpretControlFlowF (L.Delay i next) = do
threadDelay i
pure $ next ()
runControlFlow :: Free L.ControlFlowF ... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/test/test-framework/Enecuum/Testing/Core/Interpreters/ControlFlow.hs | haskell | module Enecuum.Testing.Core.Interpreters.ControlFlow where
import Enecuum.Prelude
import qualified Enecuum.Core.ControlFlow.Language as L
interpretControlFlowF :: L.ControlFlowF a -> IO a
interpretControlFlowF (L.Delay i next) = do
threadDelay i
pure $ next ()
runControlFlow :: Free L.ControlFlowF ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.