_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 |
|---|---|---|---|---|---|---|---|---|
c4b21139973db689a2855866e0239914b23b6fb6e26ffcbf6698202e323823b6 | 2600hz-archive/whistle | rabbit_exchange_type.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/rabbitmq_server-2.4.1/src/rabbit_exchange_type.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
called after de... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is VMware , Inc.
Copyright ( c ) 2007 - 2011 VMware , Inc. All rights reserved .
-module(rabbi... |
1ca40ff9b0622dd8b930afa84e235dd10f96e356ed32217479b12593a0aa0efe | aradarbel10/MyOwnTT | semantics.ml | open Common
module Syn = Syntax
type lvl = Lvl of int
(** Values use levels (counting the environment from the left) which gives us weakening for free. *)
(** We separate out of values a distinct subdomain [neut] for neutral values,
those which get "stuck" on variables. Intuitively, when the variables would
b... | null | https://raw.githubusercontent.com/aradarbel10/MyOwnTT/cd3ac399fc09510f569e1fff25cfda6982f58d7b/lib/semantics.ml | ocaml | * Values use levels (counting the environment from the left) which gives us weakening for free.
* We separate out of values a distinct subdomain [neut] for neutral values,
those which get "stuck" on variables. Intuitively, when the variables would
be expanded in the future, we'd be able to perform more β-reduc... | open Common
module Syn = Syntax
type lvl = Lvl of int
type value =
| Pi of name * value * closure
| Lam of name * value * closure
| Sig of tele
| Rcd of (name * value) list
| Prod of value list
| Tup of value list
| Uni
| Bool
| True
| False
| Nat
| NatZ
| NatS of value
| Neut of head * sp... |
87418626e761eeac79e533c76c72301df598df2da935d24d729934964ac025f5 | kowey/GenI | Internal.hs | -- GenI surface realiser
Copyright ( C ) 2005 - 2009 and
--
-- This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
... | null | https://raw.githubusercontent.com/kowey/GenI/570a6ef70e61a7cb01fe0fc29732cd9c1c8f2d7a/src/NLP/GenI/Lexicon/Internal.hs | haskell | GenI surface realiser
This program is free software; you can redistribute it and/or
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more det... | Copyright ( C ) 2005 - 2009 and
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 ... |
d3d9ec15617096bb20341728d229a0763e965af1beb25496fb0dd892ed77da38 | camlp5/camlp5 | pa_macro_gram.ml | (* camlp5r *)
(* pa_macro_gram.ml,v *)
Copyright ( c ) INRIA 2007 - 2017
(* #load "pa_macro.cmo" *)
(* #load "pa_extend.cmo" *)
(* #load "q_MLast.cmo" *)
open Pa_macro;;
open Pa_extend;;
Grammar.Unsafe.clear_entry rule_list;;
Grammar.Unsafe.clear_entry level_list;;
let must_flatten_opts ll =
List.fold_right
... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_src/meta/pa_macro_gram.ml | ocaml | camlp5r
pa_macro_gram.ml,v
#load "pa_macro.cmo"
#load "pa_extend.cmo"
#load "q_MLast.cmo" | Copyright ( c ) INRIA 2007 - 2017
open Pa_macro;;
open Pa_extend;;
Grammar.Unsafe.clear_entry rule_list;;
Grammar.Unsafe.clear_entry level_list;;
let must_flatten_opts ll =
List.fold_right
(fun levs acc ->
match levs with
None -> acc
| Some v -> v @ acc)
ll []
;;
Grammar.safe_ext... |
551162ed0f1c1c62776613c76cbcbe149ac6b8cd201fa45c6bfd2a75ba7abba2 | alexandroid000/improv | InertiaStamped.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Geometry_msgs.InertiaStamped where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.Ros... | null | https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Geometry_msgs/Ros/Geometry_msgs/InertiaStamped.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable # | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Geometry_msgs.InertiaStamped where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
import Ros.Internal.Msg.MsgInfo
import qualified GHC.Generics as... |
9403d14b8ced6abea1916008ec94bad64b48eaaad81bd967ed41d6765ffbf9e1 | madjestic/Haskell-OpenGL-Tutorial | Rendering.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
module NGL.Rendering where
import Graphics.Rendering.OpenGL as GL hiding (Color, Constant)
import Graphics.UI.GLFW as GLFW
import Control.Monad
import Control.Applicative
import System.Exit ( exitWith, ExitCode(..) )
import Foreign.Marshal.Array
import Foreign.... | null | https://raw.githubusercontent.com/madjestic/Haskell-OpenGL-Tutorial/9f685ddde9d6c5d2cc9c2c62f214ca0d43e717c7/tutorial10/NGL/Rendering.hs | haskell |
Declaring VBO: vertices
Declaring VBO: UVs
| # LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
module NGL.Rendering where
import Graphics.Rendering.OpenGL as GL hiding (Color, Constant)
import Graphics.UI.GLFW as GLFW
import Control.Monad
import Control.Applicative
import System.Exit ( exitWith, ExitCode(..) )
import Foreign.Marshal.Array
import Foreign.... |
1b6fdb65af7757893ff05893bc999fad8e90e1826e3b549cf6e6da99d02cfa7e | mirage/ptt | hm.ml | open Rresult
open Ptt_tuyau.Lwt_backend
open Lwt.Infix
let src = Logs.Src.create "ptt.hm"
module Log : Logs.LOG = (val Logs.src_log src)
module Make
(Random : Mirage_random.S)
(Time : Mirage_time.S)
(Mclock : Mirage_clock.MCLOCK)
(Pclock : Mirage_clock.PCLOCK)
(Resolver : Ptt.Sigs.RESOLVER with t... | null | https://raw.githubusercontent.com/mirage/ptt/92a2e6e9ecb0daec4eeea286de606aa3a0e2e1e4/lib/hm.ml | ocaml | TODO(dinosaure): save this result into the incoming email. | open Rresult
open Ptt_tuyau.Lwt_backend
open Lwt.Infix
let src = Logs.Src.create "ptt.hm"
module Log : Logs.LOG = (val Logs.src_log src)
module Make
(Random : Mirage_random.S)
(Time : Mirage_time.S)
(Mclock : Mirage_clock.MCLOCK)
(Pclock : Mirage_clock.PCLOCK)
(Resolver : Ptt.Sigs.RESOLVER with t... |
d55951a3a3eb0c535fcddd36c3cc86e1e2777c549977cadd1251615f673509b9 | trevorbernard/dinghy | core.clj | (ns dinghy.core
(:require [clojure.tools.logging :as log]
[clojure.tools.cli :refer [cli]])
(:gen-class))
(defn- parse-args
[args]
(cli args
["-h" "--help" "Show available parameters" :flag true]
["-c" "--cluster" "Comma separated list of nodes"]
["-p" "--port" "Listen on this ... | null | https://raw.githubusercontent.com/trevorbernard/dinghy/c35ab75ff6e6e569c85651a74c4435d86eee8775/src/dinghy/core.clj | clojure | (ns dinghy.core
(:require [clojure.tools.logging :as log]
[clojure.tools.cli :refer [cli]])
(:gen-class))
(defn- parse-args
[args]
(cli args
["-h" "--help" "Show available parameters" :flag true]
["-c" "--cluster" "Comma separated list of nodes"]
["-p" "--port" "Listen on this ... | |
4961cc818db0d701ed76a3d7f854a4faa59f70bb0a1165124e3b48c5990e2780 | RDTK/generator | options.lisp | ;;;; options.lisp --- Option info classes use in the commandline-options module.
;;;;
Copyright ( C ) 2017 , 2018 , 2019 Jan Moringen
;;;;
Author : < >
(cl:in-package #:build-generator.commandline-options)
;;; `option-info'
(defclass option-info ()
((option :initarg :option
:reader... | null | https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/commandline-options/options.lisp | lisp | options.lisp --- Option info classes use in the commandline-options module.
`option-info'
`named-without-argument-option-info'
`named-with-argument-option-info'
`positional-option-info' | Copyright ( C ) 2017 , 2018 , 2019 Jan Moringen
Author : < >
(cl:in-package #:build-generator.commandline-options)
(defclass option-info ()
((option :initarg :option
:reader option)
(designators :initarg :designators
:type list
:reade... |
b82c07ec1779a7e5d4ee5875455fab56d20446f4867efe721ea71a3d13b0279a | sondresl/AdventOfCode | Day02.hs | # LANGUAGE ViewPatterns #
module Day02 where
import Lib (tuple, intoEndo)
import Data.Monoid (Endo(..), Dual(..), appEndo)
import Linear (V3(..), _xy, _xz)
import Control.Lens (productOf, each)
encode :: (String, String) -> V3 Int -> V3 Int
encode (str, read -> v) =
case str of
"up" -> (+ V3 0 0 (-v))
"dow... | null | https://raw.githubusercontent.com/sondresl/AdventOfCode/ab30e8be110e424728511de51e389b1fc6a2f61a/2021/Haskell/src/Day02.hs | haskell | # LANGUAGE ViewPatterns #
module Day02 where
import Lib (tuple, intoEndo)
import Data.Monoid (Endo(..), Dual(..), appEndo)
import Linear (V3(..), _xy, _xz)
import Control.Lens (productOf, each)
encode :: (String, String) -> V3 Int -> V3 Int
encode (str, read -> v) =
case str of
"up" -> (+ V3 0 0 (-v))
"dow... | |
b2c064a28296ad7597cb5b22ad62a983d0fffd424cecc82f2a5739f658658e04 | ocaml-gospel/gospel | t6.mli | (**************************************************************************)
(* *)
GOSPEL -- A Specification Language for OCaml
(* *)
Copyright ( ... | null | https://raw.githubusercontent.com/ocaml-gospel/gospel/79841c510baeb396d9a695ae33b290899188380b/test/negative/t6.mli | ocaml | ************************************************************************
(as described in file LICE... | GOSPEL -- A Specification Language for OCaml
Copyright ( c ) 2018- The VOCaL Project
This software is free software , distributed under the MIT license
@ requires x > 0
variant x = 0
ensures x = 2
ensures x > 2
ensures x >... |
c77ba16fb7e1bd1275a454318e2f6aee7263f50c50899c36a87355ad8224d62e | RyanGlScott/text-show | TH.hs | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - orphans #
|
Module : TextShow . TH
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
Functions to mechanically derive ' TextShow ' , ' TextSho... | null | https://raw.githubusercontent.com/RyanGlScott/text-show/5ea297d0c7ae2d043f000c791cc12ac53f469944/src/TextShow/TH.hs | haskell | ----------------------------------------------------------------------------- | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - orphans #
|
Module : TextShow . TH
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
Functions to mechanically derive ' TextShow ' , ' TextSho... |
086787dc83ec168ee0cfc10e56fd34e33571ae83d8547aec54683bdfcddbab95 | ucsd-progsys/liquidhaskell | UnboundFunInSpec1.hs | {-@ LIQUID "--expect-error-containing=Illegal type specification for `UnboundFunInSpec1.foo`" @-}
module UnboundFunInSpec1 where
{-@ foo :: xs:_ -> {v:_ | this = rubbish } @-}
foo _ _ = 0
| null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/errors/UnboundFunInSpec1.hs | haskell | @ LIQUID "--expect-error-containing=Illegal type specification for `UnboundFunInSpec1.foo`" @
@ foo :: xs:_ -> {v:_ | this = rubbish } @ | module UnboundFunInSpec1 where
foo _ _ = 0
|
51c96f917a33fa23a9511f73ab93a834d0c330007109d2113f3574632f4bb16a | con-kitty/categorifier | Instances.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
-- | Orphan instances for the plugin test categories. This also re-exports the types for the
-- categories to make using it less fraught. I.e., if you need this... | null | https://raw.githubusercontent.com/con-kitty/categorifier/d8dc1106c4600c2168889519d2c3f843db2e9410/integrations/concat-extensions/integration-test/Categorifier/Test/ConCatExtensions/Instances.hs | haskell | | Orphan instances for the plugin test categories. This also re-exports the types for the
categories to make using it less fraught. I.e., if you need this, you should get the types from
Term
TotOrd | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
here rather than from " Categorifier . Test . Hask " , etc .
module Categorifier.Test.ConCatExtensions.Instances (Hask (..), Term (..), TotOrd (..)) where
im... |
2abd2bd3fd56d918b551be457f8feb4fbfa555f0d9018e95bd10013b56aa36d8 | zk/clojuredocs | mail.clj | (ns clojuredocs.mail
(:require [clj-http.client :as client]
[clojuredocs.util :as util]
[clojuredocs.config :as config]
[somnium.congomongo :as mon]))
(defn migrate-account-content [migration-key]
(format
"Hey There,
You're receiving this message because somebody (probabl... | null | https://raw.githubusercontent.com/zk/clojuredocs/28f5ee500f4349039ee81c70d7ac40acbb19e5d8/src/clj/clojuredocs/mail.clj | clojure | (ns clojuredocs.mail
(:require [clj-http.client :as client]
[clojuredocs.util :as util]
[clojuredocs.config :as config]
[somnium.congomongo :as mon]))
(defn migrate-account-content [migration-key]
(format
"Hey There,
You're receiving this message because somebody (probabl... | |
7b58c1f8ddd62d3a9613ef634731db67ffbc819c4241b9c35276197b6cbd6489 | mattdw/stemmers | porter.clj | An implementation of the algorithm , detailed at
;; </~martin/PorterStemmer/>
(ns stemmers.porter
(:require [clojure.string :as str]))
(def stem
^String
(let [c "[^aeiou]"
v "[aeiouy]"
cs (str c "[^aeiouy]*")
vs (str v "[aeiou]*")
mgr0 (re-pattern (str "^(" cs ")?" vs cs))
... | null | https://raw.githubusercontent.com/mattdw/stemmers/7a29b412352ebb604058b357ba332a8b53d0565f/src/stemmers/porter.clj | clojure | </~martin/PorterStemmer/> | An implementation of the algorithm , detailed at
(ns stemmers.porter
(:require [clojure.string :as str]))
(def stem
^String
(let [c "[^aeiou]"
v "[aeiouy]"
cs (str c "[^aeiouy]*")
vs (str v "[aeiou]*")
mgr0 (re-pattern (str "^(" cs ")?" vs cs))
meq1 (re-pattern (str "... |
1cb9ccf20c98630fc825fd34d5f981f68740ef12222589b3d93984d9dff15509 | jordanthayer/ocaml-search | meta_run.ml | * - Runs experiments on algorithms across all domains .
Whenever a new domain is added , meta_run will need to be updated so that
algorithms are checked against the new domain as well .
Jordan - August 2009
Whenever a new domain is added, meta_run will need to be updated so that
algorithms ... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/experiments/meta_run.ml | ocaml | ;
Rucksack_runs.do_optimistic_batches
~node_limit:node_limit ~time_limit:time_limit alg | * - Runs experiments on algorithms across all domains .
Whenever a new domain is added , meta_run will need to be updated so that
algorithms are checked against the new domain as well .
Jordan - August 2009
Whenever a new domain is added, meta_run will need to be updated so that
algorithms ... |
f03222419d6d7b1a03e5729fd2238a5f0d7ce7d49ac550a545d6a51285f1ac36 | funcool/rumext | core.cljs | (ns rumext.examples.core
(:require
;; [clojure.string :as str]
;; [goog.dom :as dom]
[rumext.alpha :as mf]
;; [rumext.examples.util :as util]
[rumext.examples.binary-clock :as binary-clock]
[rumext.examples.timer-reactive :as timer-reactive]
[rumext.examples.local-state :as local-state]
[rumex... | null | https://raw.githubusercontent.com/funcool/rumext/530a7ef960a6802961356ee6bf5bddea92cdbada/examples/rumext/examples/core.cljs | clojure | [clojure.string :as str]
[goog.dom :as dom]
[rumext.examples.util :as util]
[rumext.examples.errors :as errors]
[rumext.examples.portals :as portals] | (ns rumext.examples.core
(:require
[rumext.alpha :as mf]
[rumext.examples.binary-clock :as binary-clock]
[rumext.examples.timer-reactive :as timer-reactive]
[rumext.examples.local-state :as local-state]
[rumext.examples.refs :as refs]
[rumext.examples.controls :as controls]
[rumext.examples.board... |
1d1d75c2425ec85ccf03fd4c3bd6b757e13533f9f23f3db047a7cd8d346d77cf | kowainik/tomland | Integer.hs | module Test.Toml.Parser.Integer
( integerSpecs
) where
import Test.Hspec (Spec, context, describe, it)
import Test.Toml.Parser.Common (integerFailOn, parseInteger)
integerSpecs :: Spec
integerSpecs = describe "integerP" $ do
context "when the integer is in decimal representation" $ do
it "can pa... | null | https://raw.githubusercontent.com/kowainik/tomland/2b4bcc465b79873a61bccfc7131d423a9a0aec1d/test/Test/Toml/Parser/Integer.hs | haskell | module Test.Toml.Parser.Integer
( integerSpecs
) where
import Test.Hspec (Spec, context, describe, it)
import Test.Toml.Parser.Common (integerFailOn, parseInteger)
integerSpecs :: Spec
integerSpecs = describe "integerP" $ do
context "when the integer is in decimal representation" $ do
it "can pa... | |
467b0e311fae2b275216c1c91884f22599e32fa5c753499c56496b9e5040e323 | andersfugmann/ppx_protocol_conv | test_arrays.ml | open Sexplib.Std
module Make(Driver: Testable.Driver) = struct
module M = Testable.Make(Driver)
module EmptyArray : M.Testable = struct
let name = "SingleElem"
type t = int array
[@@deriving protocol ~driver:(module Driver), sexp]
let t = [||]
end
module Singleton : M.Testable = struct
let... | null | https://raw.githubusercontent.com/andersfugmann/ppx_protocol_conv/e93eb01ca8ba8c7dd734070316cd281a199dee0d/test/test_arrays.ml | ocaml | open Sexplib.Std
module Make(Driver: Testable.Driver) = struct
module M = Testable.Make(Driver)
module EmptyArray : M.Testable = struct
let name = "SingleElem"
type t = int array
[@@deriving protocol ~driver:(module Driver), sexp]
let t = [||]
end
module Singleton : M.Testable = struct
let... | |
b413198daf1e8fae159717fa32d3006550f780952b3b1475683214875de90a9c | gotthardp/lorawan-server | lorawan_connector_http.erl | %
Copyright ( c ) 2016 - 2019 < >
% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%
-module(lorawan_connector_http).
-behaviour(gen_server).
-export([start_connector/1, stop_connector/1]).
-export([start_link/1]).
-export([init/1, handle_call/3, handle_cast/2, hand... | null | https://raw.githubusercontent.com/gotthardp/lorawan-server/1a5c0f2f4d8238a54a326c57a5eb0e6015821b1d/src/lorawan_connector_http.erl | erlang |
All rights reserved.
nothing to do here
is running
should not be running
end of file | Copyright ( c ) 2016 - 2019 < >
Distributed under the terms of the MIT License . See the LICENSE file .
-module(lorawan_connector_http).
-behaviour(gen_server).
-export([start_connector/1, stop_connector/1]).
-export([start_link/1]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, cod... |
80eabd24ea5cb02d225d8e605f2c088f803837e540436e8d4a843f31a803ace5 | froggey/Mezzano | thread-pool.lisp | ;;;; A thread pool
(defpackage :mezzano.sync.thread-pool
(:use :cl)
(:local-nicknames (:sup :mezzano.supervisor))
(:export #:*default-keepalive-time*
#:thread-pool
#:work-item
#:make-thread-pool
#:thread-pool-add
#:thread-pool-add-many
#:thread-po... | null | https://raw.githubusercontent.com/froggey/Mezzano/9d34948fee1cfd54875ae909f12b3367a888f3cf/system/thread-pool.lisp | lisp | A thread pool
Catch tag that can be used as a throw target to
leave the current task.
Don't suspend when acquiring the thread-pool lock, this causes
recursive locking on it.
Move from active to idle.
Back to active from idle.
If there is no work available and there are more
unblocked threads than cores, then t... |
(defpackage :mezzano.sync.thread-pool
(:use :cl)
(:local-nicknames (:sup :mezzano.supervisor))
(:export #:*default-keepalive-time*
#:thread-pool
#:work-item
#:make-thread-pool
#:thread-pool-add
#:thread-pool-add-many
#:thread-pool-cancel-item
... |
5ef9f4e9d91dcbac40b743fc72d8bbf1a29445232bf1f88505d83a8279b27914 | shirok/Gauche | future.scm | ;;;
;;; control.future - future implementation
;;;
Copyright ( c ) 2020 - 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of source code must retain the a... | null | https://raw.githubusercontent.com/shirok/Gauche/b773899dbe0b2955e1c4f1daa066da874070c1e4/lib/control/future.scm | scheme |
control.future - future implementation
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following... | Copyright ( c ) 2020 - 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
re - raised when first ' future - get ' ... |
b7f504706429e206d19d5eeb4aab4e370302354859d90debe19fd2ea3181d992 | mwand/eopl3 | checker.scm | (module checker (lib "eopl.ss" "eopl")
(require "drscheme-init.scm")
(require "lang.scm")
(require "static-data-structures.scm")
(require "expand-type.scm")
(provide type-of)
;; check-equal-type! : Type * Type * Exp -> Unspecified
Page : 242
(define check-equal-type!
(lambda (ty1 ty2 exp)
(... | null | https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter8/abstract-types-lang/checker.scm | scheme | check-equal-type! : Type * Type * Exp -> Unspecified
report-unequal-types : Type * Type * Exp -> Unspecified
; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
moved to check-modules.scm
type-of-program : Program -> Type
(define type-of-program
(a-program (exp1)
(type-of exp1 (init-tenv))))))
type-of : Exp * T... | (module checker (lib "eopl.ss" "eopl")
(require "drscheme-init.scm")
(require "lang.scm")
(require "static-data-structures.scm")
(require "expand-type.scm")
(provide type-of)
Page : 242
(define check-equal-type!
(lambda (ty1 ty2 exp)
(when (not (equal? ty1 ty2))
(report-unequal-types ... |
1ede4024606b3435616da6f5ccd75f5c36ebbb5220ec723342032436dba31bc8 | binsec/haunted | region_bitvector.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/static/types/region_bitvector.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
52988025c3183818fa91f8ea223836c7d561fbd208a32854652f11ec637490e1 | nominolo/lambdachine | V76.hs | # LANGUAGE CPP #
# LANGUAGE NamedFieldPuns #
# LANGUAGE PatternGuards #
module Ghc.Api.V76
( module Ghc.Api.V76
, Phase(..)
, ModDetails
)
where
import HscTypes
import DriverPhases
--import HscMain
import Ghc.Api.V76Hsc
import ErrUtils
import Panic
import DynFlags
import Module
import SysTools
import Outputab... | null | https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/compiler/Ghc/Api/V76.hs | haskell | import HscMain
Set by -c or -no-link
When linking, the -o argument refers to the linker's output.
otherwise, we use it as the name for the pipeline's output.
-o foo applies to linker
-o foo applies to the file we are compiling now
^ Output should be to a temporary file: we're going to
run more compilation steps ... | # LANGUAGE CPP #
# LANGUAGE NamedFieldPuns #
# LANGUAGE PatternGuards #
module Ghc.Api.V76
( module Ghc.Api.V76
, Phase(..)
, ModDetails
)
where
import HscTypes
import DriverPhases
import Ghc.Api.V76Hsc
import ErrUtils
import Panic
import DynFlags
import Module
import SysTools
import Outputable
import FastStr... |
9c5ffffdb57ea8982983ecce7a622ae9775d1de8e04e9808aa0f26180260ae93 | bmeurer/ocamljit2 | loadprinter.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/debugger/loadprinter.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1997 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Format
val loadfile : f... |
89837fdf0a33c1359d80f4395d1c7323b4cba9cb09a74ef0f47e2ae0ffb466ea | Ericson2314/lighthouse | HpcParser.hs | {-# OPTIONS -fglasgow-exts -cpp #-}
# OPTIONS -w #
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
-- #Warnings
-- for details
module HpcParser where
import HpcLexer
#if __GLASGOW_HASKELL__ >= 50... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/utils/hpc/HpcParser.hs | haskell | # OPTIONS -fglasgow-exts -cpp #
The above warning supression flag is a temporary kludge.
While working on this module you are encouraged to remove it and fix
any warnings in the module. See
#Warnings
for details
# LINE 1 "GenericTemplate.hs" #
# LINE 1 "GenericTemplate.hs" #
# LINE 1 "<built-in>" #
# LINE 1 "<... | # OPTIONS -w #
module HpcParser where
import HpcLexer
#if __GLASGOW_HASKELL__ >= 503
import Data.Array
#else
import Array
#endif
#if __GLASGOW_HASKELL__ >= 503
import GHC.Exts
#else
import GlaExts
#endif
parser produced by Happy Version 1.16
newtype HappyAbsSyn = HappyAbsSyn HappyAny
#if __GLASGOW_HASKELL__ >= 6... |
bb197b03de6274246e04105eff206d70d5a328446761bae57ef30217badba822 | statebox/cql | Options.hs |
SPDX - License - Identifier : AGPL-3.0 - only
This file is part of ` statebox / cql ` , the categorical query language .
Copyright ( C ) 2019 <
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free So... | null | https://raw.githubusercontent.com/statebox/cql/b155e737ef4977ec753e44790f236686ff6a4558/src/Language/CQL/Options.hs | haskell | # LANGUAGE EmptyDataDeriving #
not needed for now
| Default values for String options.
| Default options.
| Returns a list of all enums in a given class.
| All the String options.
comment out options we can't handle yet.
| Always_Reload
| Schema_Only
| Query_Remove_Redundancy
| Import_As_Theory
| Impo... |
SPDX - License - Identifier : AGPL-3.0 - only
This file is part of ` statebox / cql ` , the categorical query language .
Copyright ( C ) 2019 <
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free So... |
ec7c788e7752a06703d96573ffae8c9950695a5438fbc215671031b480632adf | billosys/sockets | project.clj | (defproject systems.billo/sockets "0.1.1"
:description "A Clojure wrapper for the family of Java Socket classes"
:url ""
:license {
:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [
[org.clojure/clojure "1.9.0"]
[org.clojure/core.async "0.4.474"]
[potemkin "0.4.5"]
[system... | null | https://raw.githubusercontent.com/billosys/sockets/21a8949c6a0ed8c52ac590753e95354dc4629777/project.clj | clojure | (defproject systems.billo/sockets "0.1.1"
:description "A Clojure wrapper for the family of Java Socket classes"
:url ""
:license {
:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [
[org.clojure/clojure "1.9.0"]
[org.clojure/core.async "0.4.474"]
[potemkin "0.4.5"]
[system... | |
6ff7bfd783a3918d8489728b4f140a422149c94838c2696bb6479a258b514f83 | byteally/webapi | ParamSpec.hs | # OPTIONS_GHC -fno - warn - unused - binds #
# LANGUAGE MultiParamTypeClasses , TypeFamilies , OverloadedStrings , DataKinds , TypeOperators , TypeSynonymInstances , FlexibleInstances , DeriveGeneric #
module WebApi.ParamSpec (spec) where
import WebApi
import GHC.Generics
import Data.Text
import Test.Hspec
data User ... | null | https://raw.githubusercontent.com/byteally/webapi/8d712d0ae786475b177beacee32dc40db320af4c/webapi/tests/WebApi/ParamSpec.hs | haskell | When Maybe T is configure as param in contract , param overflow in case of Nothing : : Maybe T causes problem . One sol might be forcing a additional constraint like when a Maybe is configured in the contract
When Maybe T is configure as param in contract, param overflow in case of Nothing :: Maybe T causes problem... | # OPTIONS_GHC -fno - warn - unused - binds #
# LANGUAGE MultiParamTypeClasses , TypeFamilies , OverloadedStrings , DataKinds , TypeOperators , TypeSynonymInstances , FlexibleInstances , DeriveGeneric #
module WebApi.ParamSpec (spec) where
import WebApi
import GHC.Generics
import Data.Text
import Test.Hspec
data User ... |
c11f6443f455607da6ac79c9ebf14068eca72237209725d26a162f5d26613433 | tmattio/js-bindings | vscode_languageserver_protocol_protocol_show_document.ml | [@@@js.dummy "!! This code has been generated by gen_js_api !!"]
[@@@ocaml.warning "-7-32-39"]
[@@@ocaml.warning "-7-11-32-33-39"]
open Es5
open Vscode_jsonrpc
open Vscode_languageserver_types
open Vscode_languageserver_protocol_messages
module ShowDocumentClientCapabilities =
struct
type t = Ojs.t
let rec t_... | null | https://raw.githubusercontent.com/tmattio/js-bindings/ca3bd6a12db519c8de7f41b303f14cf70cfd4c5f/lib/vscode-languageserver-protocol/vscode_languageserver_protocol_protocol_show_document.ml | ocaml | [@@@js.dummy "!! This code has been generated by gen_js_api !!"]
[@@@ocaml.warning "-7-32-39"]
[@@@ocaml.warning "-7-11-32-33-39"]
open Es5
open Vscode_jsonrpc
open Vscode_languageserver_types
open Vscode_languageserver_protocol_messages
module ShowDocumentClientCapabilities =
struct
type t = Ojs.t
let rec t_... | |
c82e8ba91f36ff1c3349e9ebeaafb749b758bd9d1426ec8b654e62459dc293de | vlaaad/reveal | action.clj | (ns vlaaad.reveal.action
(:require [clojure.datafy :as d]
[vlaaad.reveal.stream :as stream]
[clojure.spec.alpha :as s]
[clojure.core.specs.alpha :as specs]
[vlaaad.reveal.event :as event]
[lambdaisland.deep-diff2.diff-impl :as diff])
(:import [clojure.lang... | null | https://raw.githubusercontent.com/vlaaad/reveal/d472efebaafe0ba94034fbe5d2d0a991aae8248e/src/vlaaad/reveal/action.clj | clojure | (ns vlaaad.reveal.action
(:require [clojure.datafy :as d]
[vlaaad.reveal.stream :as stream]
[clojure.spec.alpha :as s]
[clojure.core.specs.alpha :as specs]
[vlaaad.reveal.event :as event]
[lambdaisland.deep-diff2.diff-impl :as diff])
(:import [clojure.lang... | |
5959fd58683a3763cffb6c38b3b3f52778b8680f5c23f11fda417386c8569dbc | haskell/lsp | LocationSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module LocationSpec where
import Language.LSP.Types
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "isSubrangeOf" $ do
it "is true if the first range is totally inside the second range" $
isSubrangeOf (mkRange 1 2 ... | null | https://raw.githubusercontent.com/haskell/lsp/a41954e356117d8f5cb64b20e1a9d32e8fc6a884/lsp-types/test/LocationSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module LocationSpec where
import Language.LSP.Types
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "isSubrangeOf" $ do
it "is true if the first range is totally inside the second range" $
isSubrangeOf (mkRange 1 2 1 5) (mkRange 1 1 1 6) `shouldBe` T... |
89f79f1c87417a03d04f5246ee355ee7344ed0b59dab1c18790d9688b38fe906 | shayne-fletcher/zen | access.ml | let x = [`On; `Off];;
(*
val x : [> `Off | `On ] list = [`On; `Off]
- x is a list of values of a type that at least contain the
constructors `Off and `On
*)
let n = `Number 1;;
(*
val n : [> `Number of int ] = `Number 1
- n is a type that at least has the constructor `Number of int
*)
let f = function | `On -> 1 ... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/access/access.ml | ocaml |
val x : [> `Off | `On ] list = [`On; `Off]
- x is a list of values of a type that at least contain the
constructors `Off and `On
val n : [> `Number of int ] = `Number 1
- n is a type that at least has the constructor `Number of int
val f : [< `Number of int | `Off | `On ] -> int = <fun>
- The argument to f ha... | let x = [`On; `Off];;
let n = `Number 1;;
let f = function | `On -> 1 | `Off -> 0 | `Number n -> n;;
let f x = (x :> [`A | `B]);;
f : [ < ` A | ` B ] - > [ ` A | ` B ] = < fun >
- We see ` x ` needs to be coercible to type type [ ` A | ` B ]
- So , we read [ < ` A | ` B ] as a type that at most contains th... |
e59a6dc9a4ca9c453e01d94857596a080e6cc495793ada8b55b573eb6bd03a4c | dtgoitia/civil-autolisp | GetTrustedPaths.lsp | (defun c:zz ( / paths )
(DT:GetTrustedPaths)
( DT : StringToList " a " " . " )
( DT : StringToList " ... a.a ... a ... " " . " )
( DT : StringToList " .hi . I am.splitted.and .. very properly.splitted ..... a ... a. " " . " )
)
| null | https://raw.githubusercontent.com/dtgoitia/civil-autolisp/72d68139d372c84014d160f8e4918f062356349f/Dump%20folder/GetTrustedPaths.lsp | lisp | (defun c:zz ( / paths )
(DT:GetTrustedPaths)
( DT : StringToList " a " " . " )
( DT : StringToList " ... a.a ... a ... " " . " )
( DT : StringToList " .hi . I am.splitted.and .. very properly.splitted ..... a ... a. " " . " )
)
| |
01aa0f4715d772f9f42070602cc7e5fbfac9d47a33c64cffb9195d7afb6d23c4 | backtracking/bibtex2html | version.mli | (**************************************************************************)
(* bibtex2html - A BibTeX to HTML translator *)
Copyright ( C ) 1997 - 2014 and
(* *)
(* This software is free software; you can r... | null | https://raw.githubusercontent.com/backtracking/bibtex2html/7c9547da79a13c3accffc9947c846df96a6edd68/version.mli | ocaml | ************************************************************************
bibtex2html - A BibTeX to HTML translator
This software is free software; you can redistribute it and/or
... | Copyright ( C ) 1997 - 2014 and
modify it under the terms of the GNU General Public
License version 2 , as published by the Free Software Foundation .
See the GNU General Public License version 2 for more details
val version : string
val date : string
|
9d34855ea4d21624fea6eb018090c34301ab193cf6d8675c73297cab6cbea301 | pfdietz/ansi-test | listp.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Apr 19 22:03:37 2003
Contains : Tests of LISTP
(deftest listp-nil
(notnot-mv (listp nil))
t)
(deftest listp-symbol
(listp 'a)
nil)
(deftest listp-singleton-list
(notnot-mv (listp '(a)))
t)
(deftest listp-circular-list
(let ((x (cons nil n... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/cons/listp.lsp | lisp | -*- Mode: Lisp -*- | Author :
Created : Sat Apr 19 22:03:37 2003
Contains : Tests of LISTP
(deftest listp-nil
(notnot-mv (listp nil))
t)
(deftest listp-symbol
(listp 'a)
nil)
(deftest listp-singleton-list
(notnot-mv (listp '(a)))
t)
(deftest listp-circular-list
(let ((x (cons nil nil)))
(setf (cdr x) ... |
bfbde7a3cb4cff4f9c09ab36b64d30786616a1d2efb25f55b07c7c2dc4c25483 | wiseman/turboshrimp | navdata_test.clj | (ns com.lemondronor.turboshrimp.navdata-test
(:require [clojure.java.io :as io]
[clojure.test :refer :all]
[com.lemondronor.turboshrimp.navdata :as navdata]
[com.lemonodor.xio :as xio])
(:import (java.nio ByteBuffer ByteOrder)))
matrix 33 is 9 floats
vector 31 is 3 floats
(d... | null | https://raw.githubusercontent.com/wiseman/turboshrimp/a1f53003bd4afd084e1c9e8cb80109ba732854bc/test/com/lemondronor/turboshrimp/navdata_test.clj | clojure | Skip past the option ID and option size.
Skip past the option ID and option size.
(println "Benchmarking parse-navdata")
(criterium/bench (parse-navdata navdata-bytes))
(criterium/bench (:gps (parse-navdata navdata-bytes))) | (ns com.lemondronor.turboshrimp.navdata-test
(:require [clojure.java.io :as io]
[clojure.test :refer :all]
[com.lemondronor.turboshrimp.navdata :as navdata]
[com.lemonodor.xio :as xio])
(:import (java.nio ByteBuffer ByteOrder)))
matrix 33 is 9 floats
vector 31 is 3 floats
(d... |
dbf6111f787891cf162061bdc268dfa41da25ae72a024f160ee7b3a4acc6efb3 | 0day1day/bap | ssa.ml | *
Static Single Assignment form .
This is the intermediate language where most analysis should be happening .
@author
Static Single Assignment form.
This is the intermediate language where most analysis should be happening.
@author Ivan Jager
*)
open Big_int_Z
open Big_int_convenien... | null | https://raw.githubusercontent.com/0day1day/bap/eead3c03b5c9fb59d6b2c8ac1e1f3425f8601a2a/ocaml/ssa.ml | ocaml | type value =
| Var of var
| Lab of string
* Cast to a new type.
Should SSA have Lets?
* Joins variables that were assigned over different paths
* Assign the exp on the right to the
var on the left
* Jump to a label/address
* Conditional jump. If e1 is true, jumps to e2, otherwise jumps to e3
... | *
Static Single Assignment form .
This is the intermediate language where most analysis should be happening .
@author
Static Single Assignment form.
This is the intermediate language where most analysis should be happening.
@author Ivan Jager
*)
open Big_int_Z
open Big_int_convenien... |
6b79821c87ae0d09b78be1d5a73ab6a139aeb7e59cf5aec63fc34f1c99bdedca | GaloisInc/what4 | ABC.hs |
Module : What4.Solver . ABC
Copyright : ( c ) Galois , Inc 2014 - 2016
Maintainer : < : BSD3
Solver adapter and associcated operations for connecting the
Crucible simple builder backend to the ABC And - Inverter Graph ( AIG )
representation .
Module : W... | null | https://raw.githubusercontent.com/GaloisInc/what4/393ba786f41c49cc6b7bc0ea01374fad56efdaab/what4-abc/src/What4/Solver/ABC.hs | haskell | # LANGUAGE DoAndIfThenElse #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| Command to run sat solver.
are supported for the other types.
side condition
| Holds outputs in reverse order when used to write
AIGs
| Create a representation of the expression as Boolean variables.
--------... |
Module : What4.Solver . ABC
Copyright : ( c ) Galois , Inc 2014 - 2016
Maintainer : < : BSD3
Solver adapter and associcated operations for connecting the
Crucible simple builder backend to the ABC And - Inverter Graph ( AIG )
representation .
Module : W... |
21a6741b2915700e3c500ff1677814c4780532f0ec3c09b82d81f30ddd797c5b | aumouvantsillage/Hydromel-lang | fifo1-1.rkt | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
#lang racket
(require
racket/runtime-path
hydromel/support
"../common.rkt"
"fifo1-1.mel"
"fifo1-tests.rkt")
(define inst (fifo1 (un... | null | https://raw.githubusercontent.com/aumouvantsillage/Hydromel-lang/3bed7667b9474e24ed0afaff44f89189d8887b26/examples/fifo/fifo1-1.rkt | racket | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
#lang racket
(require
racket/runtime-path
hydromel/support
"../common.rkt"
"fifo1-1.mel"
"fifo1-tests.rkt")
(define inst (fifo1 (un... | |
675d8b79df1057f6a3b63158090b4866ac6e81974ba34db720ab2be02bf092e6 | lylek/vintage-basic | LineScanner_test.hs | module Language.VintageBasic.LineScanner_test where
import Test.HUnit
import Language.VintageBasic.Asserts
import Language.VintageBasic.LineScanner
import Language.VintageBasic.Result
assertRawParseResult = assertParseResult withLineAndCol ScanError rawLinesP
assertRawParseError = assertParseError withLineAndCol Sc... | null | https://raw.githubusercontent.com/lylek/vintage-basic/6cb46767aeb6d2c0b9da4175c7fa8c0ffc31b1c7/test/Language/VintageBasic/LineScanner_test.hs | haskell | module Language.VintageBasic.LineScanner_test where
import Test.HUnit
import Language.VintageBasic.Asserts
import Language.VintageBasic.LineScanner
import Language.VintageBasic.Result
assertRawParseResult = assertParseResult withLineAndCol ScanError rawLinesP
assertRawParseError = assertParseError withLineAndCol Sc... | |
3a3567cd1d6ba997a4b279f6b592e986e87ceb47e1912f2fafd008266ea4e866 | nixeagle/cl-github | network.lisp | (in-package :cl-github)
;;; Network API
(defgeneric show-network-meta (username repository &key login token)
(:documentation "Network meta information for USERNAME's REPOSITORY."))
(defgeneric show-network-data (username repository
&key network-meta login token
... | null | https://raw.githubusercontent.com/nixeagle/cl-github/19ba2477ea65e52e74e166482407ea96bee8e395/network.lisp | lisp | Network API | (in-package :cl-github)
(defgeneric show-network-meta (username repository &key login token)
(:documentation "Network meta information for USERNAME's REPOSITORY."))
(defgeneric show-network-data (username repository
&key network-meta login token
... |
bb07c4299d27d5be2b74c35501b4259088a9de7d208e8546d7fe8467f4661a1e | joelburget/lvca | Directed_graph.mli | open Lvca_util
module type Key_intf = sig
type t
include Base.Comparator.S with type t := t
include Base.Hashtbl.Key.S with type t := t
end
* Raised by [ topsort_exn ] if the graph is not a dag .
exception NotDag
module Int : sig
module Connected_components : sig
(** The output from connected component ... | null | https://raw.githubusercontent.com/joelburget/lvca/8d1282163623b3541eef021cdff92865890b0563/syntax/Directed_graph.mli | ocaml | * The output from connected component algorithm.
* Given an adjacency list, give the SCCs.
* The composition of [connected_components] and [make_sets].
* Topologically sort a graph given as an adjacency list.
* Topologically sort a graph given as an adjacency list.
* A graph is represented as a mapping from key to... | open Lvca_util
module type Key_intf = sig
type t
include Base.Comparator.S with type t := t
include Base.Hashtbl.Key.S with type t := t
end
* Raised by [ topsort_exn ] if the graph is not a dag .
exception NotDag
module Int : sig
module Connected_components : sig
type t =
* The number of found .
... |
5b627ae320e4313335719bf3abec0514742ae2d96348e8d79e6c03a569943b04 | janestreet/async | ppx_log_syntax.mli | (** @open *)
include
Ppx_log_types.S
with type t = Async_unix.Log.t
and type return_type = unit
and type Global.return_type = unit
(** If you wish you prevent global logging with ppx_log, you can open this module and any
use of global logging will return a warning type
`Do_not_use_because_it_will_not... | null | https://raw.githubusercontent.com/janestreet/async/209af88dff921a3883f62ea9bd4fdf95b9429072/src/ppx_log_syntax.mli | ocaml | * @open
* If you wish you prevent global logging with ppx_log, you can open this module and any
use of global logging will return a warning type
`Do_not_use_because_it_will_not_log (and will not actually log anything). | include
Ppx_log_types.S
with type t = Async_unix.Log.t
and type return_type = unit
and type Global.return_type = unit
module No_global : sig
module Ppx_log_syntax :
Ppx_log_types.S
with type t = Async_unix.Log.t
and type return_type = unit
and type Global.return_type = [ `Do_not_use_becau... |
3abc33be7dd5771c1c6518e6cc46647983aa0dbcef7c858ed194dd5b50d0abea | typeable/generic-arbitrary | NoTypecheckTest.hs | {-# OPTIONS_GHC -fdefer-type-errors #-}
{-# OPTIONS_GHC -Wno-deferred-type-errors #-}
-- | Test that infinite types has no Arbitrary instance
module NoTypecheckTest where
import Auxiliary
import GHC.Generics (Generic)
import Test.QuickCheck
import Test.Qui... | null | https://raw.githubusercontent.com/typeable/generic-arbitrary/107426a603375b9326ce1f3d312afe6f4d9c5f2f/test/NoTypecheckTest.hs | haskell | # OPTIONS_GHC -fdefer-type-errors #
# OPTIONS_GHC -Wno-deferred-type-errors #
| Test that infinite types has no Arbitrary instance
| Recursive infinite type which can not have valid Arbitrary instance
| Instance which must not compile, but we are using deferred type errors |
module NoTypecheckTest where
import Auxiliary
import GHC.Generics (Generic)
import Test.QuickCheck
import Test.QuickCheck.Arbitrary.Generic
data R = R R
deriving (Eq, Show, Generic)
instance Arbitrary R where
arbitrary = genericArbitrary
shrink = g... |
2ec5143c57620c17bf419da349cbed9affa855dea57ed12627f375aa2df1466d | matteobusi/incremental-mincaml | adder.ml | let rec make_adder (x : int) : int -> int =
let rec adder (y : int) : int = x + y in
adder in
print_int((make_adder 3) 7)
| null | https://raw.githubusercontent.com/matteobusi/incremental-mincaml/aebbaf3b918bab4b0398edbf01b43c63d8b7820d/src/fun/examples/adder.ml | ocaml | let rec make_adder (x : int) : int -> int =
let rec adder (y : int) : int = x + y in
adder in
print_int((make_adder 3) 7)
| |
0afd5513010a4ab40e0bf643230bf284ea872d1329a7a384e3f383f1d0957940 | bmeurer/ocaml-arm | location.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/parsing/location.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 .
$ Id$
Source code locations ( rang... |
f815b1ea372483c9ac921369e08f23aec1dbd7c77875e171a7ebb76c0dfe6450 | Elastifile/git-sling | Proposal.hs | {-# LANGUAGE OverloadedStrings #-}
module Sling.Proposal
( Proposal (..)
, ProposalStatus (..)
, ServerId (..)
, MergeType (..)
, ProposalType (..)
, Prefix (..)
, prefixFromText
, prefixToText
, toBranchName
, fromBranchName
, formatProposal
, parseProposal
) where
... | null | https://raw.githubusercontent.com/Elastifile/git-sling/a92f1836910c0a4d8105ca0dff9d1bd08e9bb181/server/src/Sling/Proposal.hs | haskell | # LANGUAGE OverloadedStrings #
not really a branch, but it will be used as a branch name | module Sling.Proposal
( Proposal (..)
, ProposalStatus (..)
, ServerId (..)
, MergeType (..)
, ProposalType (..)
, Prefix (..)
, prefixFromText
, prefixToText
, toBranchName
, fromBranchName
, formatProposal
, parseProposal
) where
import Data.Text ... |
5c0bac1bae51ad3978074ed9f95c65d7ac6a340ea9b17cc7db427db11b7f359f | ocsigen/ocaml-eliom | fib.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/misc/fib.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
let rec fib n =
if n < 2 then 1 else fib(n-1) + fib(n-2)
let _ =
let n =
if Array.length Sys.arg... |
71bdb2c03c49f5b919aac20231d1b40d5ee26056c127c294e24e5e2429208979 | macourtney/Dark-Exchange | accept_offer.clj | (ns darkexchange.model.actions.accept-offer
(:require [clojure.contrib.logging :as logging]
[darkexchange.model.actions.action-keys :as action-keys]
[darkexchange.model.identity :as identity-model]
[darkexchange.model.offer :as offer-model]
[darkexchange.model.trade :as... | null | https://raw.githubusercontent.com/macourtney/Dark-Exchange/1654d05cda0c81585da7b8e64f9ea3e2944b27f1/src/darkexchange/model/actions/accept_offer.clj | clojure | (ns darkexchange.model.actions.accept-offer
(:require [clojure.contrib.logging :as logging]
[darkexchange.model.actions.action-keys :as action-keys]
[darkexchange.model.identity :as identity-model]
[darkexchange.model.offer :as offer-model]
[darkexchange.model.trade :as... | |
4c8b7e8f1bd78fd9c0dfe81d1117d26c719a1ab80896f3facc31f2910f6b5259 | finnishtransportagency/harja | kustannussuunnitelma.cljc | (ns harja.data.hoito.kustannussuunnitelma
"Täällä voi määrritellä dataa, jota käytetään kustannussuunnitelmissa."
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[clojure.set :as clj-set]
[harja.pvm :as pvm]
[harja.domain.palvelut.budjettisuunnit... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/6170c269fefe11ce5bf93932e85b5c9a9edb4879/test/cljc/harja/data/hoito/kustannussuunnitelma.cljc | clojure | (ns harja.data.hoito.kustannussuunnitelma
"Täällä voi määrritellä dataa, jota käytetään kustannussuunnitelmissa."
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[clojure.set :as clj-set]
[harja.pvm :as pvm]
[harja.domain.palvelut.budjettisuunnit... | |
6054b5b32a817ca60d66880cc5523d5646474dd98964718e15ba900f6ecc7e34 | haskell-suite/haskell-src-exts | ParallelListComp.hs | # LANGUAGE ParallelListComp #
f xs ys zs = [ (x,y,z) | x <- xs | y <- ys, y > 2 | z <- zs ]
| null | https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/ParallelListComp.hs | haskell | # LANGUAGE ParallelListComp #
f xs ys zs = [ (x,y,z) | x <- xs | y <- ys, y > 2 | z <- zs ]
| |
774437296bd61a08d4bec0ebe41552051173901a97abd6f42d5c8cde2b71b8eb | r4vi/block-the-eu-cookie-shit-list | core.clj | (ns genlist.core
(:use [clojure.tools.cli :only (cli)]
[clojure.string :only (split-lines join replace-first)]
[clj-time.core :only (now)]
[clj-time.format :only (unparse formatter)]
[clj-message-digest.core :only (md5-base64)])
(:gen-class :main true))
(defn normalise-string
... | null | https://raw.githubusercontent.com/r4vi/block-the-eu-cookie-shit-list/cc0c8126ddb10398a4e31cebe34d192be274c3db/genlist/src/genlist/core.clj | clojure | else | (ns genlist.core
(:use [clojure.tools.cli :only (cli)]
[clojure.string :only (split-lines join replace-first)]
[clj-time.core :only (now)]
[clj-time.format :only (unparse formatter)]
[clj-message-digest.core :only (md5-base64)])
(:gen-class :main true))
(defn normalise-string
... |
b163551e2c3d8ab0fcd024b1e02dcb130b489aa68b0553d160da6bb17f4c9b4c | lucasvreis/org-mode-hs | Document.hs | | This was one of the first files that I wrote and is adapted from
--
So all credit where credit is due to and .
module Org.Parser.Document where
import Data.Text qualified as T
import Org.Parser.Common
import Org.Parser.Definitions
import Org.Parser.Elements
import Org.Parser.MarkupContexts
import Org.Parser... | null | https://raw.githubusercontent.com/lucasvreis/org-mode-hs/8eed3910638f379d55114995e0bc75a5915c4e98/org-parser/src/Org/Parser/Document.hs | haskell |
| Parse input as org document tree.
| Read an Org mode section and its contents. @lvl@
gives the minimum acceptable level of the heading.
Dealt with later
* Heading and document "subelements"
| Parse a to-do keyword that is registered in the state.
| TODO READ ABOUT PLANNING
| Read a single planning-related a... | | This was one of the first files that I wrote and is adapted from
So all credit where credit is due to and .
module Org.Parser.Document where
import Data.Text qualified as T
import Org.Parser.Common
import Org.Parser.Definitions
import Org.Parser.Elements
import Org.Parser.MarkupContexts
import Org.Parser.Obj... |
d7a1e968e90fbf813a1bbae1373ed78988d2ca85b8f15f45ab261f31485621f9 | janherich/chisel | curves_test.clj | (ns chisel.curves-test
(:require [clojure.test :refer :all]
[chisel.curves :as curves]))
(deftest resolve-points-test
(testing "Testing closed interval mapping of the resolve-points function"
(is (= (curves/resolve-points 5 identity)
'(0 1/4 1/2 3/4 1))))))
| null | https://raw.githubusercontent.com/janherich/chisel/9ea70cae5af4f0a8d0f2acd164e98dab19c77a36/test/chisel/curves_test.clj | clojure | (ns chisel.curves-test
(:require [clojure.test :refer :all]
[chisel.curves :as curves]))
(deftest resolve-points-test
(testing "Testing closed interval mapping of the resolve-points function"
(is (= (curves/resolve-points 5 identity)
'(0 1/4 1/2 3/4 1))))))
| |
1b91ab3d74885517c7464627654c619a914baf39d9d2ecaa08b9c8aa1012110b | imrehg/ypsilon | dynamic-wind.scm | Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
;; Reference:
;; R. Kent Dybvig / The Scheme Programming Language, Third Edition
Chapter 5 . Control Operations , Section 5.6 . Continuations
(define dynamic-wind
(... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/heap/boot/dynamic-wind.scm | scheme | Reference:
R. Kent Dybvig / The Scheme Programming Language, Third Edition | Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
Chapter 5 . Control Operations , Section 5.6 . Continuations
(define dynamic-wind
(lambda (in body out)
(in)
(current-dynamic-wind-record (cons (cons in out) ... |
54b4d0756ddbd53fe22848843863bdfc444adec9e511a084ac72ea5f342b4f29 | JoaoVasques/kafka-async | producer.clj | (ns kafka-async.producer
(import org.apache.kafka.clients.producer.KafkaProducer)
(import org.apache.kafka.clients.producer.ProducerRecord)
(import java.util.UUID)
(:require
[kafka-async.commons :as commons]
[clojure.core.async :as a :refer [>! <! >!! close! chan timeout go-loop]]))
(def producers
"CLo... | null | https://raw.githubusercontent.com/JoaoVasques/kafka-async/fa548418c3b0e486d0d2c3586367ed8dd3935a4d/src/kafka_async/producer.clj | clojure | (ns kafka-async.producer
(import org.apache.kafka.clients.producer.KafkaProducer)
(import org.apache.kafka.clients.producer.ProducerRecord)
(import java.util.UUID)
(:require
[kafka-async.commons :as commons]
[clojure.core.async :as a :refer [>! <! >!! close! chan timeout go-loop]]))
(def producers
"CLo... | |
0283b6e1871c3c3b4611cf401be50d904f72843276d3599ecb06303c22b1e43a | vbmithr/ocaml-websocket | websocket_async.ml |
* Copyright ( c ) 2012 - 2018 < >
*
* 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... | null | https://raw.githubusercontent.com/vbmithr/ocaml-websocket/a5d7cb0710e6df49cc0c328b2ed28be4d1a397b4/async/websocket_async.ml | ocaml | Immediately echo and pass this last message to the user
Run send_ping every heartbeat when heartbeat is set.
Remote endpoint closed connection. No further action
necessary here. |
* Copyright ( c ) 2012 - 2018 < >
*
* 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... |
bdef6bcb50277dd51ce4f7fe6068f95a2eeca56d212e2e9f1e75ad08ce493c69 | Glue42/gateway-modules | measurements.cljc | (ns gateway.common.measurements)
(defprotocol Measurements
(get-all [this])
(record! [this type measurement-name measurement-value]))
| null | https://raw.githubusercontent.com/Glue42/gateway-modules/be48a132134b5f9f41fd6a6067800da6be5e6eca/common/src/gateway/common/measurements.cljc | clojure | (ns gateway.common.measurements)
(defprotocol Measurements
(get-all [this])
(record! [this type measurement-name measurement-value]))
| |
c6cfc4d7b1bc98d5f5a861e733a242120e64cef94e6317faf71ee3feb09f10fb | ocaml-multicore/multicoretests | stm_tests.ml | open QCheck
open STM
* parallel STM tests of Bytes
module ByConf =
struct
type cmd =
| Length
| Get of int
| Set of int * char
| Sub of int * int
| Copy
| Fill of int * int * char
| To_seq
[@@deriving show { with_path = false }]
type state = char list
type sut = Bytes.t
let a... | null | https://raw.githubusercontent.com/ocaml-multicore/multicoretests/3e0f2ceb72eaf334e97252140ae5d40bf6461b96/src/bytes/stm_tests.ml | ocaml | hack: reusing int_gen for length
hack: reusing int_gen for length | open QCheck
open STM
* parallel STM tests of Bytes
module ByConf =
struct
type cmd =
| Length
| Get of int
| Set of int * char
| Sub of int * int
| Copy
| Fill of int * int * char
| To_seq
[@@deriving show { with_path = false }]
type state = char list
type sut = Bytes.t
let a... |
b77b604c34322ec41eed01b33fadae1da455f10b5d235acc1fdd9d880c67822b | dym/movitz | complexes.lisp | ;;;;------------------------------------------------------------------
;;;;
Copyright ( C ) 2008 ,
;;;;
;;;; Description: Complex numbers
Author :
;;;; Distribution: See the accompanying file COPYING.
;;;;
$ I d : complexes.lisp , v 1.4 2009 - 07 - 19 18:52:08 ffjeld Exp $
;;... | null | https://raw.githubusercontent.com/dym/movitz/56176e1ebe3eabc15c768df92eca7df3c197cb3d/losp/muerte/complexes.lisp | lisp | ------------------------------------------------------------------
Description: Complex numbers
Distribution: See the accompanying file COPYING.
------------------------------------------------------------------ | Copyright ( C ) 2008 ,
Author :
$ I d : complexes.lisp , v 1.4 2009 - 07 - 19 18:52:08 ffjeld Exp $
(require :muerte/basic-macros)
(require :muerte/defstruct)
(in-package muerte)
(provide :muerte/complexes)
(defstruct (complex (:constructor make-complex (realpart imagpart))
(:predicate ... |
583836a4bb0eeffcc3de7b0c0b8ac79234755f6fe5a21796c2d406cf2a483d9e | Frama-C/Frama-C-snapshot | pdg_state.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/pdg/pdg_state.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
77ad90460e263e6203332700e9397ac7fc3086c53b8a7644b88515cf1112d8dc | travisbrady/ocaml-vw | personalization_homework.ml | (*
* A quick test based on this homework assignment: /~jebara/6998/hw2.pdf
*)
open Core
let printf = Printf.printf
let sprintf = Printf.sprintf
let show_tables left right =
printf "\n";
let al = Float.Table.to_alist left |> List.sort ~compare:(fun a b -> Float.compare (fst a) (fst b)) in
List.iter al ~f:(fun ... | null | https://raw.githubusercontent.com/travisbrady/ocaml-vw/2c5ac40872a7bd4b921a8554f82f8783f5e2f88d/examples/personalization_homework.ml | ocaml |
* A quick test based on this homework assignment: /~jebara/6998/hw2.pdf
| open Core
let printf = Printf.printf
let sprintf = Printf.sprintf
let show_tables left right =
printf "\n";
let al = Float.Table.to_alist left |> List.sort ~compare:(fun a b -> Float.compare (fst a) (fst b)) in
List.iter al ~f:(fun (key, data) ->
match Float.Table.find right key with
| Some x -> printf ... |
247c37d18c4afcee9836a34e71bbeb9adb5f65f9859f54db6fdb9a5191b4163c | fission-codes/fission | WebSocket.hs | # OPTIONS_GHC -fno - warn - orphans #
module Fission.Web.Client.Internal.Orphanage.WebSocket () where
import RIO
import qualified RIO.ByteString.Lazy as Lazy
import qualified RIO.Partial as Partial
import qualified RIO.Text as Text
import qualified Data.Binary.Builde... | null | https://raw.githubusercontent.com/fission-codes/fission/7e69c0da210a77412c96631f5ff7ef1b38240d37/fission-web-client/library/Fission/Web/Client/Internal/Orphanage/WebSocket.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Fission.Web.Client.Internal.Orphanage.WebSocket () where
import RIO
import qualified RIO.ByteString.Lazy as Lazy
import qualified RIO.Partial as Partial
import qualified RIO.Text as Text
import qualified Data.Binary.Builde... | |
ab023ede0358c5b0416153a2696d1ac3fc6af87dc063ac3fbf4781e86e0e61a9 | 1Jajen1/Brokkr | PackedSpec.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
module Vector.PackedSpec where
import Test.Syd
import Test.Syd.Validity
import Control.Monad.ST
import qualified Foreign as FP
import Data.Word
import Control.Monad
import Data.Bits
import qualified Util.Vector.Packed as P
import qualified Test.QuickCheck as Gen
import... | null | https://raw.githubusercontent.com/1Jajen1/Brokkr/fe56efaf450f29a5571cc34fa01f7301678f3eaf/test/Vector/PackedSpec.hs | haskell | TODO Mask them into whatever bitsize we use
Generate random valid writes
Generate vectors
Next some dynamic sized vectors | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
module Vector.PackedSpec where
import Test.Syd
import Test.Syd.Validity
import Control.Monad.ST
import qualified Foreign as FP
import Data.Word
import Control.Monad
import Data.Bits
import qualified Util.Vector.Packed as P
import qualified Test.QuickCheck as Gen
import... |
0b6f717aa5b235da706a28b1b8eb847fa47b70dbd7542705c8f64086390de434 | mzp/coq-for-ipad | condition.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
and , INRI... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/otherlibs/threads/condition.ml | ocaml | *********************************************************************
Objective Caml
... | and , 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 GNU Library General Public License , with
$ I d : condition.ml 9547 2010 - 01 - 22 12:48:24Z ... |
170fa635eef7737e721d2bb70d1d99a188490a83bf500e6b581b5c4cce3d464b | uw-unsat/serval | common.rkt | #lang rosette
(require
"define.rkt"
"../base.rkt"
"../../lib/bvarith.rkt"
(prefix-in core: "../../lib/core.rkt"))
(provide
(all-defined-out)
(all-from-out
"define.rkt"
"../base.rkt"
"../../lib/bvarith.rkt"
"../../lib/core.rkt"))
(struct ptr (addr off size) #:transparent)
(define (notimpl... | null | https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/serval/riscv/interp/common.rkt | racket | #lang rosette
(require
"define.rkt"
"../base.rkt"
"../../lib/bvarith.rkt"
(prefix-in core: "../../lib/core.rkt"))
(provide
(all-defined-out)
(all-from-out
"define.rkt"
"../base.rkt"
"../../lib/bvarith.rkt"
"../../lib/core.rkt"))
(struct ptr (addr off size) #:transparent)
(define (notimpl... | |
2cdd45ae00b453326f8204ed9a19d3a3d41991ed4b26c15a31d95eecf055a2c5 | plum-umd/adapton.racket | adapton.rkt | #lang racket
;; This file contains the core of adapton, consisting of:
;; - definition of functions memoized for adapton
;; - creation of nodes when those functions are called
;; - force for nodes and cells
(require (prefix-in r: (only-in racket delay force equal-hash-code))
rackunit
"memo-table-mod... | null | https://raw.githubusercontent.com/plum-umd/adapton.racket/9ddfec8a22809cfb37fbbd8871a088fc3bd51787/adapton/adapton.rkt | racket | This file contains the core of adapton, consisting of:
- definition of functions memoized for adapton
- creation of nodes when those functions are called
- force for nodes and cells
This file contains the core of adapton, consisting of:
- definition of functions memoized for adapton
- creation of nodes when thos... | #lang racket
(require (prefix-in r: (only-in racket delay force equal-hash-code))
rackunit
"memo-table-modification-tools.rkt"
"graphing.rkt"
"data-structures.rkt")
(require (prefix-in r: (only-in racket delay force equal-hash-code))
rackunit
"memo-table-modifica... |
4087d83ea863b14496ed0f8c0dae1274af2723cf17550d74566bc30b2697eb29 | lightquake/itsa | Main.hs | {-# LANGUAGE CPP #-}
# LANGUAGE TemplateHaskell #
NOTE : Do n't modify this file unless you know what you are doing . If you are
new to snap , start with Site.hs and Application.hs . This file contains
boilerplate needed for dynamic reloading and is not meant for general
consumption .
Occas... | null | https://raw.githubusercontent.com/lightquake/itsa/76e1d3ebb8f84d90614b894c629471dbacf0b2d3/src/Main.hs | haskell | # LANGUAGE CPP #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
| This is the entry point for this web server application. It supports
easily switching between interpreting source and running statica... | # LANGUAGE TemplateHaskell #
NOTE : Do n't modify this file unless you know what you are doing . If you are
new to snap , start with Site.hs and Application.hs . This file contains
boilerplate needed for dynamic reloading and is not meant for general
consumption .
Occasionally if we modify the way the ... |
0f7665cf1a520f806a4bd83436524cf4479209050d98cbae3a97c9f15d333351 | duo-lang/duo-lang | Pattern.hs | module Resolution.Pattern
( resolvePattern
, fromVar
, analyzeInstancePattern
) where
import Control.Monad ( unless, when, zipWithM )
import Control.Monad.Except ( MonadError(throwError) )
import Control.Monad.Writer ( MonadWriter(tell) )
import Data.Text qualified as T
import Errors.Renamer
import Resolution... | null | https://raw.githubusercontent.com/duo-lang/duo-lang/449b7015683e0a40cc51df80011e45e13d3ca151/duo-lang-renamer/src/Resolution/Pattern.hs | haskell | -------------------------------------------------------------------------------
Resolve Pattern
-------------------------------------------------------------------------------
| Annotate every part of the pattern with information on whether it stands for
a producer or consumer.
Lookup up the arity information in th... | module Resolution.Pattern
( resolvePattern
, fromVar
, analyzeInstancePattern
) where
import Control.Monad ( unless, when, zipWithM )
import Control.Monad.Except ( MonadError(throwError) )
import Control.Monad.Writer ( MonadWriter(tell) )
import Data.Text qualified as T
import Errors.Renamer
import Resolution... |
815a25079995f4d643b3ce010e267ee864613fb77817bfe147b1d620217ea67b | exoscale/clojure-kubernetes-client | v1beta1_cron_job_status.clj | (ns clojure-kubernetes-client.specs.v1beta1-cron-job-status
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-reference :refer :all]
)
(:import (java.io File)))
(declare v1beta1-cron-job-status-data v1beta1-cron-job-st... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1beta1_cron_job_status.clj | clojure | (ns clojure-kubernetes-client.specs.v1beta1-cron-job-status
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-reference :refer :all]
)
(:import (java.io File)))
(declare v1beta1-cron-job-status-data v1beta1-cron-job-st... | |
cb40738ee0806fd61eda78305e7a740cc675f87eda425803dcc08441dbcba081 | tarides/ocaml-platform-installer | opam.mli | open Astring
open Import
module GlobalOpts : sig
type t = {
root : Fpath.t;
switch : string option; (** Whether to pass the [--switch] option. *)
env : string String.map option;
(** Environment to use when calling commands. *)
log_height : int option;
(** [log_height] determines how ... | null | https://raw.githubusercontent.com/tarides/ocaml-platform-installer/d24fa0590888673cc3b0eb828a3be484c0f8a8af/src/lib/opam.mli | ocaml | * Whether to pass the [--switch] option.
* Environment to use when calling commands.
* [log_height] determines how the output of an [opam] call should be
displayed. With [None], no output is displayed. With [Some h], the
[h] last lines are displayed.
* When [ocaml_version] is [None], create a... | open Astring
open Import
module GlobalOpts : sig
type t = {
root : Fpath.t;
env : string String.map option;
log_height : int option;
}
val v :
root:Fpath.t ->
?switch:string ->
?env:string String.map ->
?log_height:int ->
unit ->
t
val default : t
end
module Config : sig
... |
2173ecfe2bd2bea0a80207a9a48f70b9dd366f23ed736a0f554361b43b48ae3b | bobzhang/fan | fState.mli |
(** Experimental: state management for deriving *)
open Sig_util
(* when you do the iteration, you should do it in reverse order *)
val current_filters : (plugin_name * plugin) list ref
val reset_current_filters : unit -> unit
val keep : bool ref
val reset : unit -> unit
val gensym : ?pkg:string -> strin... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/cold/fState.mli | ocaml | * Experimental: state management for deriving
when you do the iteration, you should do it in reverse order |
open Sig_util
val current_filters : (plugin_name * plugin) list ref
val reset_current_filters : unit -> unit
val keep : bool ref
val reset : unit -> unit
val gensym : ?pkg:string -> string -> string
|
24a08773eb3ec494a0f4310cfd5bc57c74cae8902ef51e036f1e81d6c89e69e2 | alvatar/spheres | c-define-objc#.scm | ;;!!! Objective-C Utility Macros for Gambit Scheme
.author , March 19 , 2011
;;
;; This software is licensed under the WTFPL.
;;
;; These were developed while I was working on the Gambit Gaming
Engine ( ) . They should be helpful in easily wrapping existing
;; Objective-C APIs with Gambit Scheme.
;;
;;
;; somew... | null | https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/gambit/ffi/c-define-objc%23.scm | scheme | !!! Objective-C Utility Macros for Gambit Scheme
This software is licensed under the WTFPL.
These were developed while I was working on the Gambit Gaming
Objective-C APIs with Gambit Scheme.
somewhere in your Gambit source file.
The API is as follows:
(objc-method class-name (formaltype1 ...) return-type me... | .author , March 19 , 2011
Engine ( ) . They should be helpful in easily wrapping existing
( objc - method " " ( ( pointer " " ) bool ) int
" frobWithBarney : : " ) )
Then if Scheme - side you had a pointer to and a pointer
Procedures which wrap Objective - C methods in this... |
61d4a63f035cd36c2ae4efc2a37b494ba1d604a256cf8f023e767c6916c30357 | haskus/packages | CodePoint.hs | # LANGUAGE TypeFamilies #
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveLift #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE ViewPatterns #
# LANGUAGE BinaryLiterals #
-- | Unicode code-point
module Haskus.Text.Unicode.CodePoint
( CodePoint (..)
, CodePointRange
, pattern CodePointRange
, toUtf8
, fromUtf8
,... | null | https://raw.githubusercontent.com/haskus/packages/40ea6101cea84e2c1466bc55cdb22bed92f642a2/haskus-text/src/lib/Haskus/Text/Unicode/CodePoint.hs | haskell | # LANGUAGE DeriveLift #
| Unicode code-point
------------------------------------------------
Code-point
------------------------------------------------
| Code point
Number from 0 to 0x10FFFF
>>> CodePoint 0x1234
U+1234
>>> CodePoint 0x1234A
U+1234A
------------------------------------------------
Code-p... | # LANGUAGE TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE PatternSynonyms #
# LANGUAGE ViewPatterns #
# LANGUAGE BinaryLiterals #
module Haskus.Text.Unicode.CodePoint
( CodePoint (..)
, CodePointRange
, pattern CodePointRange
, toUtf8
, fromUtf8
, toModifiedUtf8
)
where
import Haskus.Number.Wor... |
8b21b4b14653f08c25999fcb387bf51e253fb86413b5621d185ad7d622997e76 | hanshuebner/bknr-web | billboard.lisp | (in-package :bknr.text)
(define-persistent-class billboard ()
((name :read
:index-type string-unique-index
:index-reader find-billboard
:index-values all-billboards)
(description :update :initform nil)
(articles :none :initform nil)
(always-show-all :update :initform nil))
(:documentation "messa... | null | https://raw.githubusercontent.com/hanshuebner/bknr-web/5c30b61818a2f02f6f2e5dc69fd77396ec3afc51/modules/text/billboard.lisp | lisp | (in-package :bknr.text)
(define-persistent-class billboard ()
((name :read
:index-type string-unique-index
:index-reader find-billboard
:index-values all-billboards)
(description :update :initform nil)
(articles :none :initform nil)
(always-show-all :update :initform nil))
(:documentation "messa... | |
0f8cb97ef90e6f055bb0b8c37074d48a21ecbe9ed71148c89eb7484a18a91997 | ocaml-ppx/ppx | result.ml | type ('a, 'error) t = ('a, 'error) Ppx_caml.result =
| Ok of 'a
| Error of 'error
let compare compare_a compare_error a b =
match a, b with
| Ok a, Ok b -> compare_a a b
| Ok _, Error _ -> Ordering.Lt
| Error _, Ok _ -> Ordering.Gt
| Error a, Error b -> compare_error a b
let ok x = Ok x
let is_ok = ... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/stdppx/result.ml | ocaml | type ('a, 'error) t = ('a, 'error) Ppx_caml.result =
| Ok of 'a
| Error of 'error
let compare compare_a compare_error a b =
match a, b with
| Ok a, Ok b -> compare_a a b
| Ok _, Error _ -> Ordering.Lt
| Error _, Ok _ -> Ordering.Gt
| Error a, Error b -> compare_error a b
let ok x = Ok x
let is_ok = ... | |
cda386c51770c5013bcd6cd66732a871cad7142356ae96fd46c8e1a9b639c3e7 | CryptoKami/cryptokami-core | Full.hs | # LANGUAGE CPP #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
module Pos.Diffusion.Full
( diffusionLayerFull
) where
import Nub (ordNub)
import Universum
import Control.Monad.Fix (MonadFix)
import qua... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lib/src/Pos/Diffusion/Full.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE RecordWildCards #
| The full diffusion layer.
against a monad, but we'd end up with a bunch of reader constraints over
the values that would otherwise appear in the Logic and Diffusion records.
That's to say, we'd have to do the same work anyway, but then even more
... | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
module Pos.Diffusion.Full
( diffusionLayerFull
) where
import Nub (ordNub)
import Universum
import Control.Monad.Fix (MonadFix)
import qualified Data.Map as M
import Data.Time.Units (Millisecond, Second... |
853f965544b44d2bc9ea54a273b0beb8926df175841d14ca619580270285b8e4 | orchid-hybrid/microKanren-sagittarius | table.scm | (define (make-table g)
artifically limit to 100
;; to help avoid crashes (maybe?)
(cons 'table (stream-take 100 (stream-map (lambda (k)
(walk* (var 0) (substitution k)))
((call/fresh g) initial-kanren)))))
(define (table-membero t q)
(unless (eq? (car t) 'table)
(error "not a table!"))
... | null | https://raw.githubusercontent.com/orchid-hybrid/microKanren-sagittarius/9e740bbf94ed2930f88bbcf32636d3480934cfbb/miruKanren/table.scm | scheme | to help avoid crashes (maybe?) | (define (make-table g)
artifically limit to 100
(cons 'table (stream-take 100 (stream-map (lambda (k)
(walk* (var 0) (substitution k)))
((call/fresh g) initial-kanren)))))
(define (table-membero t q)
(unless (eq? (car t) 'table)
(error "not a table!"))
(let loop ((t t))
(if (null? t)... |
f08c459851cd0e4ef84325ec87ee99657f73e5fd7e9689661f5a3fb87bd72e20 | senapk/funcional_arcade | solver.hs |
somaMaybe (Just x) (Just y) = Just(x + y)
somaMaybe (Just x) Nothing = Just(x)
somaMaybe Nothing (Just y) = Just(y)
somaMaybe Nothing Nothing = Nothing
main = do
print $ somaMaybe (Just 5) (Just 7) == Just(12)
print $ somaMaybe (Just 5) Nothing == Just(5)
print $ somaMaybe Nothing (Just 3) == Just(3)
... | null | https://raw.githubusercontent.com/senapk/funcional_arcade/7bfbd3d1407c5c8013550691d4fa048d74a53339/base/081/solver.hs | haskell |
somaMaybe (Just x) (Just y) = Just(x + y)
somaMaybe (Just x) Nothing = Just(x)
somaMaybe Nothing (Just y) = Just(y)
somaMaybe Nothing Nothing = Nothing
main = do
print $ somaMaybe (Just 5) (Just 7) == Just(12)
print $ somaMaybe (Just 5) Nothing == Just(5)
print $ somaMaybe Nothing (Just 3) == Just(3)
... | |
f95446033455f0b58094033546a40dc6c3c2e708044aec5c101bc1c8ea431fc4 | ml4tp/tcoq | redexpr.ml | (************************************************************************)
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/proofs/redexpr.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
call by value normalisation functio... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open CErrors
open Uti... |
5094489289d6f93047b4900dda3d07836647315f22853000aea7b8afdd0a78d0 | a13x/aberth | aberth.erl | Copyright ( c ) 2013 < >
%%
%% Permission to use, copy, modify, and/or 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 AUTHOR DISCLAIMS ALL... | null | https://raw.githubusercontent.com/a13x/aberth/e09b721b40782d337970aebe3d126e0ab27b1089/src/aberth.erl | erlang |
Permission to use, copy, modify, and/or 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.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2013 < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(aberth).
-export([start/0, stop/0]).
-export([start_... |
f02307db0537386a584278fbcb34756d17d497878cc8e65d1a8a805d22268140 | puppetlabs/puppetdb | pql_test.clj | (ns puppetlabs.puppetdb.pql-test
(:require [clojure.test :refer :all]
[puppetlabs.puppetdb.pql :as pql]))
(deftest test-pql->ast
(are [pql ast] (= (first (pql/pql->ast pql))
ast)
;; Some basic comparisons
"nodes { a = 'a' }"
["from" "nodes"
["=" "a" "a"]]
"no... | null | https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/test/puppetlabs/puppetdb/pql_test.clj | clojure | Some basic comparisons
Not
Null?
Strings & escaping
More complex expressions
Extractions
Functions
Subqueries
Modifiers
Paging
Inequality on dates | (ns puppetlabs.puppetdb.pql-test
(:require [clojure.test :refer :all]
[puppetlabs.puppetdb.pql :as pql]))
(deftest test-pql->ast
(are [pql ast] (= (first (pql/pql->ast pql))
ast)
"nodes { a = 'a' }"
["from" "nodes"
["=" "a" "a"]]
"nodes { a = 'a' }"
["from" "... |
e4b954f8aa87b7e57bd4781f5c91b7c50227a6a4553b70da5c88a62e155b7cb2 | YPares/Haskell-OpenGL3.1-Tutos | main.hs | {-# LANGUAGE ImplicitParams, RecordWildCards,
NoMonomorphismRestriction #-}
module Main where
import qualified Graphics.UI.GLFW as W
import Graphics.Rendering.OpenGL.Raw
import Control.Monad
import Control.Applicative
import Data.Function
import Foreign
import Foreign.C.String
withNewPtr f = alloca (\p... | null | https://raw.githubusercontent.com/YPares/Haskell-OpenGL3.1-Tutos/7a027b927d061fbd26138cb7357c40c4cacbc927/tutorial02/main.hs | haskell | # LANGUAGE ImplicitParams, RecordWildCards,
NoMonomorphismRestriction #
1st attribute: vertices
attribute 0 in the shader
coordinates type
normalized?
stride
vertex buffer offset
, W.displayOptions_openGLProfile = W.CoreProfile } |
module Main where
import qualified Graphics.UI.GLFW as W
import Graphics.Rendering.OpenGL.Raw
import Control.Monad
import Control.Applicative
import Data.Function
import Foreign
import Foreign.C.String
withNewPtr f = alloca (\p -> f p >> peek p)
checkStatus statusFlag glGetFn glInfoLogFn id = do
let fetch info =... |
1af0a31bb1ab513a25af70187820f0e32ce7c26940458e73da7eec14111c7871 | oakes/play-cljs-examples | prod.clj | (require
'[cljs.build.api :as api]
'[clojure.java.io :as io])
(defn delete-children-recursively! [f]
(when (.isDirectory f)
(doseq [f2 (.listFiles f)]
(delete-children-recursively! f2)))
(when (.exists f) (io/delete-file f)))
(def out-file "resources/public/main.js")
(def out-dir "resources/public/m... | null | https://raw.githubusercontent.com/oakes/play-cljs-examples/88716f19d3cd59c2bf7fb4029f5792e00014e10a/flappy-bird-clone/prod.clj | clojure | (require
'[cljs.build.api :as api]
'[clojure.java.io :as io])
(defn delete-children-recursively! [f]
(when (.isDirectory f)
(doseq [f2 (.listFiles f)]
(delete-children-recursively! f2)))
(when (.exists f) (io/delete-file f)))
(def out-file "resources/public/main.js")
(def out-dir "resources/public/m... | |
27483f1d9bbdf62a0feccb857fe0679864a98027ae4834efcb4637bdaa88ef01 | YoEight/lambda-database-experiment | Operation.hs | # LANGUAGE ExistentialQuantification #
{-# LANGUAGE GADTs #-}
--------------------------------------------------------------------------------
-- |
-- Module : Protocol.Operation
Copyright : ( C ) 2017
-- License : (see the file LICENSE)
--
Maintainer : < >
-- Stability : provisional
-- Por... | null | https://raw.githubusercontent.com/YoEight/lambda-database-experiment/da4fab8bd358fb8fb78412c805d6f5bc05854432/lambda-protocol/library/Protocol/Operation.hs | haskell | # LANGUAGE GADTs #
------------------------------------------------------------------------------
|
Module : Protocol.Operation
License : (see the file LICENSE)
Stability : provisional
Portability : non-portable
------------------------------------------------------------------------------
--... | # LANGUAGE ExistentialQuantification #
Copyright : ( C ) 2017
Maintainer : < >
module Protocol.Operation where
import Data.List.NonEmpty
import Lambda.Prelude
import Protocol.Package
import Protocol.Types
data Request a where
WriteEvents :: StreamName
-> ExpectedVersion
-> Non... |
2229e42ad658ce22d1435f6b94e0ee721b6f3fb2d7cb53dfd351a89c3b7c565a | anwarmamat/cmsc330fall18-public | disc.ml | (* Polymorphic Examples*)
let f x y = x :: [y]
let g p q = match (p, q) with
| ([], []) -> 1
| (_, _) -> 2
Chipotle record
type chipotle_order = { item : string; cost : float }
Given a list of Chipotle orders , find the most expensive cost . Return 0.0 for empty list .
let find_expensive (orders : chipotle_orde... | null | https://raw.githubusercontent.com/anwarmamat/cmsc330fall18-public/12585d98d45f954f75e2f78df3062444f5f97cf6/discussions/disc4/src/disc.ml | ocaml | Polymorphic Examples
Map and fold are defined here for you. You may use them.
Name record
Vector record
Write your own map function using the provided fold function |
let f x y = x :: [y]
let g p q = match (p, q) with
| ([], []) -> 1
| (_, _) -> 2
Chipotle record
type chipotle_order = { item : string; cost : float }
Given a list of Chipotle orders , find the most expensive cost . Return 0.0 for empty list .
let find_expensive (orders : chipotle_order list) : float =
failwi... |
05eaa47f00e4b291b9326a1866240fad54194e8a8c5d0bbb8221529c3ba20ea7 | brendanhay/amazonka | AccessControlRuleEffect.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE StrictData #-}
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
Derived from AWS service... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workmail/gen/Amazonka/WorkMail/Types/AccessControlRuleEffect.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Amazonka.WorkMail.Types.AccessControlRuleEffect
Stability : auto-generated | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
Derived from AWS service descriptions , licensed under Apache 2.0 .
Copyright : (... |
0c4c736b7d1e4001ff4ec41d8d2fd47c457daffd58ded60c5e6f4989fdb92d6c | Helium4Haskell/helium | Hiding2.hs | x :: Char
x = 'a'
y, z :: Int
y = 200
z = 300
data X = X
deriving Show
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/make/Hiding2.hs | haskell | x :: Char
x = 'a'
y, z :: Int
y = 200
z = 300
data X = X
deriving Show
| |
81b06503e52f37f60acd451898bb5177c4574d07ca5120300cc799a906893084 | immoh/clj-instagram | endpoints_test.clj | (ns clj-instagram.endpoints-test
(:require [midje.sweet :refer :all]
[clj-instagram.endpoints :as endpoints]))
(def opts {:access-token (System/getenv "CLJ_INSTAGRAM_ACCESS_TOKEN")
:client-secret (System/getenv "CLJ_INSTAGRAM_CLIENT_SECRET")})
;; Users
(fact
"Get user (self)" :integration
... | null | https://raw.githubusercontent.com/immoh/clj-instagram/cfd703ed74463a3b93fd40ea63f819c7218230e5/test/clj_instagram/endpoints_test.clj | clojure | Users
Relationships
Media
Comments
Likes
Tags
Locations | (ns clj-instagram.endpoints-test
(:require [midje.sweet :refer :all]
[clj-instagram.endpoints :as endpoints]))
(def opts {:access-token (System/getenv "CLJ_INSTAGRAM_ACCESS_TOKEN")
:client-secret (System/getenv "CLJ_INSTAGRAM_CLIENT_SECRET")})
(fact
"Get user (self)" :integration
(endpoi... |
c198b158df389e6911c904dd779ed52f2afef8ba2abe2a10dbf4d9c04c2aba82 | input-output-hk/plutus | Parser.hs | {-# LANGUAGE OverloadedStrings #-}
| Parsers for PIR terms in DefaultUni .
module PlutusIR.Parser
( parse
, program
, pType
, pTerm
, parseProgram
, Parser
, SourcePos
) where
import PlutusCore.Annotation
import PlutusCore.Default qualified as PLC (DefaultFun, DefaultUni)
import Plu... | null | https://raw.githubusercontent.com/input-output-hk/plutus/bb9b5a18c26476fbf6b2f446ab267706426fec3a/plutus-core/plutus-ir/src/PlutusIR/Parser.hs | haskell | # LANGUAGE OverloadedStrings #
| A parsable PIR pTerm.
A small type wrapper for parsers that are parametric in the type of term they parse
| Parse a PIR program. The resulting program will have fresh names. The
underlying monad must be capable of handling any parse errors. This passes
"test" to the parser as the ... |
| Parsers for PIR terms in DefaultUni .
module PlutusIR.Parser
( parse
, program
, pType
, pTerm
, parseProgram
, Parser
, SourcePos
) where
import PlutusCore.Annotation
import PlutusCore.Default qualified as PLC (DefaultFun, DefaultUni)
import PlutusCore.Parser hiding (parseProgram... |
c07dd9f7d597b8bdff498f7af2de5ca03331dcb8d1d4616caee40e0ea9aa56c1 | taktoa/hsdm | PAMTest.hs | module Main where
import System.HSDM.PAM
conversation :: [PamMessage] -> IO [PamResponse]
conversation m = do
print m
results <- mapM go m
return results
where
go (PamMessage str style) = do
print str
print style
return $ PamResponse "test"
main :: IO ()
main = do
putStrLn "... | null | https://raw.githubusercontent.com/taktoa/hsdm/e088ddbd20da76ac40450ae4cca9b1f87d042c58/haskell/src/PAMTest.hs | haskell | do things | module Main where
import System.HSDM.PAM
conversation :: [PamMessage] -> IO [PamResponse]
conversation m = do
print m
results <- mapM go m
return results
where
go (PamMessage str style) = do
print str
print style
return $ PamResponse "test"
main :: IO ()
main = do
putStrLn "... |
4d25f3f99ac5158261dd29030914b01df376d3ca34e38acd115e5fc85e8a5fca | FranklinChen/learn-you-some-erlang | kitty_server2_tests.erl | -module(kitty_server2_tests).
-record(cat, {name, color=green, description}). % stolen from kitty_server2.erl
-include_lib("eunit/include/eunit.hrl").
-define(CAT1, #cat{name=a, color=b, description=c}).
-define(CAT2, #cat{name=d, color=e, description=f}).
order_test() ->
Pid = kitty_server2:start_link(),
... | null | https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/tests/kitty_server2_tests.erl | erlang | stolen from kitty_server2.erl
| -module(kitty_server2_tests).
-include_lib("eunit/include/eunit.hrl").
-define(CAT1, #cat{name=a, color=b, description=c}).
-define(CAT2, #cat{name=d, color=e, description=f}).
order_test() ->
Pid = kitty_server2:start_link(),
?assertEqual(?CAT1, kitty_server2:order_cat(Pid, a, b, c)),
?assertEqual... |
b55ec5b9cf31786c5f32f1eee898a10eacab49ab1be2a054026c5ebca742acaa | ocaml/ocaml | compenv.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
Fabr... | null | https://raw.githubusercontent.com/ocaml/ocaml/949e2626c22b5fe8159cb29d47207d5621eabf90/driver/compenv.ml | ocaml | ************************************************************************
OCaml
... | Fabrice Le Fessant , EPI Gallium , INRIA Paris - Rocquencourt
Copyright 2013 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Clflags
exception Exit_with_status of int
let output_prefix name =
let oname =
... |
753a63939dcb7d22360c531046efeec8be0b9b11770db0563009c03ccfe3073a | kadena-io/chainweaver | Modal.hs | # LANGUAGE DataKinds #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
-- |
Copyright : ( C ) 2020 - 2022 Kadena
-- License : BSD-... | null | https://raw.githubusercontent.com/kadena-io/chainweaver/5d40e91411995e0a9a7e782d6bb2d89ac1c65d52/frontend/src/Frontend/UI/Modal.hs | haskell | # LANGUAGE OverloadedStrings #
|
License : BSD-style (see the file LICENSE)
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
| Ty... | # LANGUAGE DataKinds #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
Copyright : ( C ) 2020 - 2022 Kadena
module Frontend.UI.Modal
( Modal
, HasModalCfg (..)
, m... |
88f84d41a3ba68568bcf2466a13e58cfc0bfb61417d7a03fdc5a074de0743ca1 | michalkonecny/aern2 | Array.hs | # OPTIONS_GHC -fno - warn - orphans #
module ERC.Array where
import Debug.Trace (trace)
import Prelude
import Control.Monad.ST.Trans
import Control.Monad.Except
import GHC.TypeLits
import Text.Printf
import ERC.Monad
import ERC.Variables
import ERC.Integer
import ERC.Real
newtype REALn s (n :: Nat) =
REALn { ... | null | https://raw.githubusercontent.com/michalkonecny/aern2/1c8f12dfcb287bd8e3353802a94865d7c2c121ec/aern2-erc/src/ERC/Array.hs | haskell | initialise the array using items
initialise the array using items | # OPTIONS_GHC -fno - warn - orphans #
module ERC.Array where
import Debug.Trace (trace)
import Prelude
import Control.Monad.ST.Trans
import Control.Monad.Except
import GHC.TypeLits
import Text.Printf
import ERC.Monad
import ERC.Variables
import ERC.Integer
import ERC.Real
newtype REALn s (n :: Nat) =
REALn { ... |
fa9879d5bdd47c0814a19fee96fe0762d8dd040b01f35df9930d633c438f40b7 | sqor/riak-tools | riak_tools.erl | -module('riak_tools').
-export([file_link/2 , file_link_targets/2 , main/1 , backup_script/0 , multipart_upload/4 , s3_upload/2 , read_file/2 , tar/1 , tar/2 , tar_riakdb/0 , s3_small_upload/2 , , get_month_name/0 , get_weekly_name/0 , get_wday_name/0 ] ) .
-compile(export_all).
-define('VERSION', "1.0... | null | https://raw.githubusercontent.com/sqor/riak-tools/1d6c964bf789711534f078ba8c8a600a6ab4eda3/src/riak_tools.erl | erlang | io:format("begin ~p ~p ~n", [length(S1),length(S2)]),
While S1 is at least as long as S2 we check if S2 is its prefix, ... | -module('riak_tools').
-export([file_link/2 , file_link_targets/2 , main/1 , backup_script/0 , multipart_upload/4 , s3_upload/2 , read_file/2 , tar/1 , tar/2 , tar_riakdb/0 , s3_small_upload/2 , , get_month_name/0 , get_weekly_name/0 , get_wday_name/0 ] ) .
-compile(export_all).
-define('VERSION', "1.0... |
87567051a446da90e22c9aabd17bd957157b183845479a9717410f1d84df6f54 | RefactoringTools/HaRe | A3.hs | module A3 where
--Unfold 'sumSquares1'
import C3
main xs = case xs of
[] -> 0
[x:xs] -> x^pow + sumSquares1 xs
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/testing/unfoldDef/A3.hs | haskell | Unfold 'sumSquares1' | module A3 where
import C3
main xs = case xs of
[] -> 0
[x:xs] -> x^pow + sumSquares1 xs
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.