_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 |
|---|---|---|---|---|---|---|---|---|
e84cbfedf9123d25c85f938ed8256147e70aa325d054fc451cc20dcfa691902b | modular-macros/ocaml-macros | typemod.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/typing/typemod.mli | 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
open Types
open Format
val type_module:
Env.t -> Parsetree.module_expr -> Typedtree.module_expr... |
9d78301b40b7c10cfca194d613ae99148197e93b55873e0765e0a447f7ddf744 | bytekid/mkbtt | ackbo.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/processors/src/termination/orderings/ackbo.ml | ocaml | ** OPENS *******************************************************************
** MODULES *****************************************************************
** INCLUDES ***************************************************************
** FUNCTIONS **************************************************************
** TYPES *****... | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either ve... |
1b2c3f0a2cde9d600fd0dc64fb5bedeaae4ee03385deaa6259c69c28726e5990 | argumatronic/argumatronic | site.hs | --------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
import Control.Applicative ((<$>), Alternative (..))
import Data.Maybe (fromMaybe)
import Data.Monoid ((<>))
import Data.List (isPrefixOf, isSuffixOf, sortBy, intercalate)
impor... | null | https://raw.githubusercontent.com/argumatronic/argumatronic/d4fa44b12a552ec5db4547f0105c4d611ee61dab/site.hs | haskell | ------------------------------------------------------------------------------
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
deployCommand = "./bin/deploy.sh" -- this would be better ?
----------------------------------------------------------------------... | import Control.Applicative ((<$>), Alternative (..))
import Data.Maybe (fromMaybe)
import Data.Monoid ((<>))
import Data.List (isPrefixOf, isSuffixOf, sortBy, intercalate)
import Data.Time.Format (parseTimeM, defaultTimeLocale)
import Data.Time.Clock (UTCTime)
import System.FilePath ... |
efbc07bf3d34ba740e7456c4c57a76e38f6c09aee080e62423047826db41b0cc | supki/libjenkins | rename-jobs.hs | # LANGUAGE CPP #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
-- | Rename jobs matching supplied pattern
module Main (main) where
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative -- base
#endif
import Control.Lens -- lens
import Control... | null | https://raw.githubusercontent.com/supki/libjenkins/2f3dfd8a5dff3a15250c0fe096e251f1aa9a98b0/example/rename-jobs.hs | haskell | # LANGUAGE OverloadedStrings #
| Rename jobs matching supplied pattern
base
lens
base
lens-aeson
base
base
base
text
text
text
envparse
libjenkins
base
base
base
something bad happened, show it!
| Prompt to rename all jobs matching pattern
prompt for every matching job
if user agrees then voodoo com... | # LANGUAGE CPP #
# LANGUAGE NamedFieldPuns #
module Main (main) where
#if __GLASGOW_HASKELL__ < 710
#endif
import Jenkins.Rest (Jenkins, JenkinsException, (-?-), (-=-), (-/-), liftIO)
# ANN module ( " HLint : ignore Use camelCase " : : String ) #
main :: IO ()
main = do
o : n : _
<- getArgs
con... |
6b0bb72f3096b776533656ea174ec3f0654a7bd6cc2bec3b7b560a16fb5603e5 | eWert-Online/OSnap | OSnap_Browser.mli | module Actions = OSnap_Browser_Actions
module Launcher = OSnap_Browser_Launcher
module Target = OSnap_Browser_Target
module Download = OSnap_Browser_Download
type t = OSnap_Browser_Types.t
| null | https://raw.githubusercontent.com/eWert-Online/OSnap/9010a45469ef069fffec2c9d992a7bc0808f04d8/lib/OSnap_Browser/OSnap_Browser.mli | ocaml | module Actions = OSnap_Browser_Actions
module Launcher = OSnap_Browser_Launcher
module Target = OSnap_Browser_Target
module Download = OSnap_Browser_Download
type t = OSnap_Browser_Types.t
| |
23cf1d0bf740a5b2cebd55499b63af500c86a05e0422954a70faa6dd46b9c512 | xsc/lein-ancient | reader_test.clj | (ns leiningen.ancient.artifact.reader-test
(:require [clojure.test :refer :all]
[leiningen.ancient.utils :refer [with-temp-file]]
[leiningen.ancient.artifact
[reader :refer :all]]
[clojure.java.io :as io])
(:import [java.io File]))
;; ## Tests
(deftest t-project-fi... | null | https://raw.githubusercontent.com/xsc/lein-ancient/ddcb0a1d655eda37daa47bea63e5eee72985a1ed/test/leiningen/ancient/artifact/reader_test.clj | clojure | ## Tests
#composite-profiles | (ns leiningen.ancient.artifact.reader-test
(:require [clojure.test :refer :all]
[leiningen.ancient.utils :refer [with-temp-file]]
[leiningen.ancient.artifact
[reader :refer :all]]
[clojure.java.io :as io])
(:import [java.io File]))
(deftest t-project-file-parsing
... |
17a694f7d9d0319c1380b991d1723707fdb2bf9ae1d8788bcc6626e828960ebf | tarides/current-albatross-deployer | stager.ml | open Lwt.Syntax
type 'a staged = {
live : 'a;
(* value kept alive by the stager *)
current : 'a; (* current value like if the stager didn't exist *)
}
module type S = sig
type t
val digest : t -> string
val marshal : t -> string
val unmarshal : string -> t
val pp : t Fmt.t
end
module Op (M : S) = st... | null | https://raw.githubusercontent.com/tarides/current-albatross-deployer/f4e7b88edf2c2d71a571178466d34048dad57bf7/example/stager.ml | ocaml | value kept alive by the stager
current value like if the stager didn't exist | open Lwt.Syntax
type 'a staged = {
live : 'a;
}
module type S = sig
type t
val digest : t -> string
val marshal : t -> string
val unmarshal : string -> t
val pp : t Fmt.t
end
module Op (M : S) = struct
type nonrec t = Value of M.t
module Key = struct
type t = string
let digest = Fun.id
e... |
3e6a882aca19ee0e07f9e9e51bbc36788b8a2e8679eddb4949359d984806ccc8 | bgamari/pandoc-lens | Lens.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
-- | This provides a variety of optics for traversing and
destructuring Pandoc documents .
--
Note that both ' Inline ' , ' Block ' , and ' MetaValue ' have ' Plated ' instances
-- which are useful for traversing the AST.
module Text.Pandoc.Lens
( -- * Doc... | null | https://raw.githubusercontent.com/bgamari/pandoc-lens/07c526cca8aef9b14d2aed3e3d2e080e5104c092/Text/Pandoc/Lens.hs | haskell | # LANGUAGE RankNTypes #
| This provides a variety of optics for traversing and
which are useful for traversing the AST.
* Documents
* Blocks
| Prisms are provided for the constructors of 'Block'
as well as a 'Plated' instance.
| Prisms are provided for the constructors of 'Inline'
as well as a 'Plated' instanc... | # LANGUAGE TypeFamilies #
destructuring Pandoc documents .
Note that both ' Inline ' , ' Block ' , and ' MetaValue ' have ' Plated ' instances
module Text.Pandoc.Lens
Pandoc
, body
, meta
, Block
, blockInlines
, _Plain
, _Para
, _CodeBlock
, _BlockQuote
, _OrderedList
... |
65134b0aa24ff6b2cb8e61ab5759cdee2123a8a9cddf6a624f0c55584d14cf12 | input-output-hk/project-icarus-importer | ClientTypes.hs | -- | Arbitrary instances for client types
module Pos.Arbitrary.Wallet.Web.ClientTypes
(
) where
import Universum
import qualified Data.ByteString.Char8 as B8
import qualified Serokell.Util.Base64 as B64
import Test.QuickCheck (Arbitrary (..), vectorOf)
import Pos.Wallet.Web.State (W... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet/src/Pos/Arbitrary/Wallet/Web/ClientTypes.hs | haskell | | Arbitrary instances for client types
@deriveLvl2KeyPair@ should be used for this instance
but it's extremely slow |
module Pos.Arbitrary.Wallet.Web.ClientTypes
(
) where
import Universum
import qualified Data.ByteString.Char8 as B8
import qualified Serokell.Util.Base64 as B64
import Test.QuickCheck (Arbitrary (..), vectorOf)
import Pos.Wallet.Web.State (WAddressMeta(..))
import Pos.Wall... |
e397ec56c23a58bcbfa16c8573f194c728e1a0db4499c93191a8c4b05846b7dc | lumihq/persistent-documentation | Documentation.hs | # LANGUAGE CPP #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingVia #-}
{-# LANGUAGE EmptyCase #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE Flexibl... | null | https://raw.githubusercontent.com/lumihq/persistent-documentation/134aa80dd6a0e51b90b40f5e30a147b23ed52582/src/Database/Persist/Documentation.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE EmptyCase #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE QuantifiedConstraints #
... | # LANGUAGE CPP #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE InstanceSigs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses ... |
27176f7c49bede9ab678364082123722d9935c9abcb286ce8fd4ab2470df6af7 | Heasummn/Crab-ML | crabPasses.ml | This module controls the stages of passes within the Compiler
Stage 1 passes convert the Parse Tree to the AST incrementally
Stage 2 passes modify the AST .
Stage 3 passes are run on the AST after it has been typed
Stage 1 passes convert the Parse Tree to the AST incrementally
Stage 2 passes modify the... | null | https://raw.githubusercontent.com/Heasummn/Crab-ML/45a79373a620878b9c24464a7e009ecf3ea7f908/src/CrabPasses/crabPasses.ml | ocaml | This module controls the stages of passes within the Compiler
Stage 1 passes convert the Parse Tree to the AST incrementally
Stage 2 passes modify the AST .
Stage 3 passes are run on the AST after it has been typed
Stage 1 passes convert the Parse Tree to the AST incrementally
Stage 2 passes modify the... | |
9edbf423acadaf097856a22f9a2561f7bc50302420ceb107ffddc979711923c2 | aligusnet/mltool | UtilsTest.hs | module MachineLearning.UtilsTest
(
tests
)
where
import Test.Framework (testGroup)
import Test.Framework.Providers.HUnit
import Test.HUnit
import Test.HUnit.Approx
import Test.HUnit.Plus
import MachineLearning.Types (Vector, Matrix)
import qualified Numeric.LinearAlgebra as LA
import qualified Data.Vector.Storable... | null | https://raw.githubusercontent.com/aligusnet/mltool/92d74c4cc79221bfdcfb76aa058a2e8992ecfe2b/test/MachineLearning/UtilsTest.hs | haskell | module MachineLearning.UtilsTest
(
tests
)
where
import Test.Framework (testGroup)
import Test.Framework.Providers.HUnit
import Test.HUnit
import Test.HUnit.Approx
import Test.HUnit.Plus
import MachineLearning.Types (Vector, Matrix)
import qualified Numeric.LinearAlgebra as LA
import qualified Data.Vector.Storable... | |
f0cd881f6c5754d656b48b8403d5fbbbfbbbd3e5cede62d10d3f08d807054422 | mzp/coq-ruby | environ.mli | open Names
open Term
(* Environments *)
type globals = {
env_constants : Declarations.constant_body Cmap.t;
env_inductives : Declarations.mutual_inductive_body KNmap.t;
env_modules : Declarations.module_body MPmap.t;
env_modtypes : Declarations.module_type_body MPmap.t;
env_alias : module_path MPmap.t;
}
ty... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/checker/environ.mli | ocaml | Environments
Engagement
de Bruijn variables
Named variables
Constants
Inductives
Modules | open Names
open Term
type globals = {
env_constants : Declarations.constant_body Cmap.t;
env_inductives : Declarations.mutual_inductive_body KNmap.t;
env_modules : Declarations.module_body MPmap.t;
env_modtypes : Declarations.module_type_body MPmap.t;
env_alias : module_path MPmap.t;
}
type stratification =... |
131c571867a3e9b6901b56de7bb8f110841f8b77009a4363f57548b1b81f96a9 | ocaml-dune/fiber | fiber_bench.ml | open Stdune
open Fiber.O
let n = 1000
let%bench_fun "bind" =
fun () ->
Fiber.run
~iter:(fun () -> assert false)
(let rec loop = function
| 0 -> Fiber.return ()
| n -> Fiber.return () >>= fun () -> loop (n - 1)
in
loop n)
let%bench_fun "create ivar and immediately read" =
fun () ->... | null | https://raw.githubusercontent.com/ocaml-dune/fiber/5563b588c1313f128eafa74d66f0626c9128d34d/fiber/bench/fiber_bench.ml | ocaml | some pools are used to run many fibers | open Stdune
open Fiber.O
let n = 1000
let%bench_fun "bind" =
fun () ->
Fiber.run
~iter:(fun () -> assert false)
(let rec loop = function
| 0 -> Fiber.return ()
| n -> Fiber.return () >>= fun () -> loop (n - 1)
in
loop n)
let%bench_fun "create ivar and immediately read" =
fun () ->... |
3dc439ca3a848d13eccfddc059061e0ca6835d7ad4c13ad4719218ca305394ed | mark-watson/lisp_practical_semantic_web | package.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
Name : package.lisp
;;;; Purpose: Package definition file for cl-geonames-test
Programmer : < >
;;;;
This file , pa... | null | https://raw.githubusercontent.com/mark-watson/lisp_practical_semantic_web/2d9d5bb06b574ab0bff15664fe747a5b99e1fb1b/utils/cl-geonames/test/package.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
*************************************************************************
FILE IDENTIFICATION
Purpose: Package definition file for cl-geonames-test
clitter users are granted the rights to distribute and use this software
(), also known as the LLGPL.
*******... |
Name : package.lisp
Programmer : < >
This file , part of cl - geonames , is Copyright ( c ) 2008 by
as governed by the terms of the Lisp Lesser GNU Public License
(defpackage :cl-geonames-test
(:use :cl)
(:documentation "Unit Tests for cl-geonames package.")
(:export #:run-cl-geoname... |
a819e95cf654e1d539534d69e6f2c0e4dd9307644f17a58fbfb0546ff21184f3 | fujita-y/ypsilon | comparators.scm | #!nobacktrace
(library (srfi :128 comparators)
(export comparator? comparator-ordered? comparator-hashable?
make-comparator
make-pair-comparator make-list-comparator make-vector-comparator
make-eq-comparator make-eqv-comparator make-equal-comparator
boolean-hash char-hash char-... | null | https://raw.githubusercontent.com/fujita-y/ypsilon/c68af44bad59eb26114c060d1689d8fe65cc895f/sitelib/srfi/%253a128/comparators.scm | scheme | #!nobacktrace
(library (srfi :128 comparators)
(export comparator? comparator-ordered? comparator-hashable?
make-comparator
make-pair-comparator make-list-comparator make-vector-comparator
make-eq-comparator make-eqv-comparator make-equal-comparator
boolean-hash char-hash char-... | |
2a7b843f16832fde93b0f67e4193a007be3e8189ce14f7d75002ed86f8d04078 | bobbae/gosling-emacs | mh-keymap.ml | ; Create key bindings for mhe.
;
(progn ch
(save-excursion
(temp-use-buffer "mh-temp")
(setq needs-checkpointing 0)
(define-keymap "&mh-keymap")
(use-local-map "&mh-keymap")
(setq ch 0)
(while (<= ch 127)
(if (= (global-binding-of ch) "self-insert")
(local-bind-to-key "&mh-summary" ch))
(setq ch ... | null | https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/lib/maclib/purdue/mh-keymap.ml | ocaml | ; Create key bindings for mhe.
;
(progn ch
(save-excursion
(temp-use-buffer "mh-temp")
(setq needs-checkpointing 0)
(define-keymap "&mh-keymap")
(use-local-map "&mh-keymap")
(setq ch 0)
(while (<= ch 127)
(if (= (global-binding-of ch) "self-insert")
(local-bind-to-key "&mh-summary" ch))
(setq ch ... | |
eb8c8a2d1071a339ca5c48e008f9f983cdee4e5ecdf133c73ad57ffedbdca4c5 | lemmaandrew/CodingBatHaskell | commonTwo.hs | From
Start with two arrays of strings , a and b , each in alphabetical order , possibly with
duplicates . Return the count of the number of strings which appear in both arrays . The best
\"linear\ " solution makes a single pass over both arrays , taking advantage of the fact that
they are in alphabetical ord... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/AP-1/commonTwo.hs | haskell | From
Start with two arrays of strings , a and b , each in alphabetical order , possibly with
duplicates . Return the count of the number of strings which appear in both arrays . The best
\"linear\ " solution makes a single pass over both arrays , taking advantage of the fact that
they are in alphabetical ord... | |
873f3ea37385264277452331f0bc19500d0be8fb816cbe4bc57f10dde98bfb30 | chaw/r7rs-libs | timer-6.sps | Timer example
;; from
Listing 6 translated into Scheme
(import (scheme base)
(scheme process-context)
(rebottled pstk))
(let* ((tk (tk-start))
(scale (tk 'create-widget 'scale 'from: 1 'to: 45
'orient: 'horizontal))
(message-window (lambda ()
... | null | https://raw.githubusercontent.com/chaw/r7rs-libs/b8b625c36b040ff3d4b723e4346629a8a0e8d6c2/rebottled-examples/pstk/timer-6.sps | scheme | from | Timer example
Listing 6 translated into Scheme
(import (scheme base)
(scheme process-context)
(rebottled pstk))
(let* ((tk (tk-start))
(scale (tk 'create-widget 'scale 'from: 1 'to: 45
'orient: 'horizontal))
(message-window (lambda ()
(let* ((... |
6ca455b93968f350a0512b0e52c924dc7e1b865d8ba223212fd0c436bd92bdcd | tweag/funflow2 | Util.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE OverloadedLists #
| ' Util ' contains various utility functions used throughout . API.Client 's internals .
module Docker.API.Client.Internal.Util where
import Data.Binary.Get (getWord32be, getWord8, runGet)
import Control.Monad.IO.Class (MonadIO)
import qualified Data... | null | https://raw.githubusercontent.com/tweag/funflow2/642cbb6a1eb3c03b31fe32d22886e4eba4b877cc/docker-client/src/Docker/API/Client/Internal/Util.hs | haskell | # LANGUAGE OverloadedStrings #
| Conduit helper which checks the length of the input bytestring and reads data from upstream
and returns the corresponding stream type.
See /#operation/ContainerAttach
This whole thing could be recursive
This ensures that we have at least as much data as our section (could be more)
... | # LANGUAGE OverloadedLists #
| ' Util ' contains various utility functions used throughout . API.Client 's internals .
module Docker.API.Client.Internal.Util where
import Data.Binary.Get (getWord32be, getWord8, runGet)
import Control.Monad.IO.Class (MonadIO)
import qualified Data.ByteString.Char8 as B
import quali... |
4a6b9057cdc6a6b4c63eacce1f947a8891d9cc89484041f6401ece3ead86e749 | UU-ComputerScience/js-asteroids | var_ty_args.hs | main :: IO ()
main = do
putStrLn "var_ty_args"
varTyArgs " "
varTyArgsStr "Bar"
varTyArgsInt 123
foreign import " varTyArgs(% * ) " varTyArgs : : a - > IO ( )
foreign import jscript "varTyArgs(%*)" varTyArgsStr :: String -> IO ()
foreign import jscript "varTyArgs(%*)" varTyArgsInt :: Int -> IO ()
| null | https://raw.githubusercontent.com/UU-ComputerScience/js-asteroids/b7015d8ad4aa57ff30f2631e0945462f6e1ef47a/uhc-js/tests/works/var_ty_args/var_ty_args.hs | haskell | main :: IO ()
main = do
putStrLn "var_ty_args"
varTyArgs " "
varTyArgsStr "Bar"
varTyArgsInt 123
foreign import " varTyArgs(% * ) " varTyArgs : : a - > IO ( )
foreign import jscript "varTyArgs(%*)" varTyArgsStr :: String -> IO ()
foreign import jscript "varTyArgs(%*)" varTyArgsInt :: Int -> IO ()
| |
f363814d9c3982f14c5e429096dd4f4914539e33f556adf2b454bd2b31832220 | teknql/aave | core_test.cljc | (ns aave.core-test
(:require [aave.core :as sut]
#?(:clj [clojure.test :as t :refer [deftest testing is]]
:cljs [cljs.test :as t :include-macros true])))
| null | https://raw.githubusercontent.com/teknql/aave/f0f0d687042cbe55711877c30f8ace658046c051/test/aave/core_test.cljc | clojure | (ns aave.core-test
(:require [aave.core :as sut]
#?(:clj [clojure.test :as t :refer [deftest testing is]]
:cljs [cljs.test :as t :include-macros true])))
| |
107caa359af6fbb313ae38dc56e76e5157c3f5243cc6432afbf81cb68e8c692b | Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator | Pet.hs | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiWayIf #-}
-- | Contains the types generated from the schema Pet
module OpenAPI.Types.Pet where
import qualified Prelude as GHC.Intege... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator/d3e9c7db4d8b15de9136007a9b9519a7bd8e2199/example/generatedCode/src/OpenAPI/Types/Pet.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE MultiWayIf #
| Contains the types generated from the schema Pet
# SOURCE #
# SOURCE #
| category
| id
| name
| photoUrls
| status: pet status in the store
| tags
| Create a new 'Pet' with all required fields.
^ 'petName'
^ 'petPhotoUrls'
pet status in the store... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module OpenAPI.Types.Pet where
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
import qualified Control.Monad.Fail
import qualified Data.Aeson
import q... |
7d838554e062055622e2363766e0f7e7c0a48474b0fce4fad42b8f3b8db4842b | jeapostrophe/exp | macro-kohlbecker.rkt | #lang racket
(define (term x)
(if (zero? x)
0
(list 'app
x
(term (sub1 x))
(term (sub1 x)))))
(struct painted (x c) #:transparent)
(define paintings-k 0)
(define (paint c t)
(match t
[(? list?)
(set! paintings-k (add1 paintings-k))
(map (λ (st) (paint c st)) t)... | null | https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/macro-kohlbecker.rkt | racket | open : expanded-term -> name left right | #lang racket
(define (term x)
(if (zero? x)
0
(list 'app
x
(term (sub1 x))
(term (sub1 x)))))
(struct painted (x c) #:transparent)
(define paintings-k 0)
(define (paint c t)
(match t
[(? list?)
(set! paintings-k (add1 paintings-k))
(map (λ (st) (paint c st)) t)... |
afe0f4ae2bcb4633c3969f57d770bcf948292bd1a3bbc32d63f1434b19204a72 | xvw/preface | result.ml | open Preface_core.Fun
type ('a, 'b) t = ('a, 'b) result =
| Ok of 'a
| Error of 'b
let pure x = Ok x
module Bifunctor = Preface_make.Bifunctor.Via_bimap (struct
type nonrec ('a, 'b) t = ('a, 'b) t
let bimap f g = function Ok x -> Ok (f x) | Error x -> Error (g x)
end)
module Functor = Preface_make.Indexed_... | null | https://raw.githubusercontent.com/xvw/preface/51892a7ce2ddfef69de963265da3617968cdb7ad/lib/preface_stdlib/result.ml | ocaml | open Preface_core.Fun
type ('a, 'b) t = ('a, 'b) result =
| Ok of 'a
| Error of 'b
let pure x = Ok x
module Bifunctor = Preface_make.Bifunctor.Via_bimap (struct
type nonrec ('a, 'b) t = ('a, 'b) t
let bimap f g = function Ok x -> Ok (f x) | Error x -> Error (g x)
end)
module Functor = Preface_make.Indexed_... | |
553e6e05a60189e1e4522838df19311249ec905b89aba535250a072ad9c546e0 | ParaPhrase/skel | sk_feedback_receiver.erl | %%%----------------------------------------------------------------------------
@author < >
2012 University of St Andrews ( See LICENCE )
@headerfile " skel.hrl "
%%%
%%% @doc This module contains Feedback skeleton filter logic.
%%%
%%% The Feedback skeleton repeatedly passes output from its inner-workflow
... | null | https://raw.githubusercontent.com/ParaPhrase/skel/bf55de94e64354592ea335f4375f4b40607baf43/src/sk_feedback_receiver.erl | erlang | ----------------------------------------------------------------------------
@doc This module contains Feedback skeleton filter logic.
The Feedback skeleton repeatedly passes output from its inner-workflow
back into said workflow until a given constraint-checking function fails.
The receiver receives inputs fr... | @author < >
2012 University of St Andrews ( See LICENCE )
@headerfile " skel.hrl "
-module(sk_feedback_receiver).
-export([
start/4
]).
-include("skel.hrl").
-define(counter, sk_feedback_bicounter).
-spec start(reference(), pid(), pid(), pid()) -> 'eos'.
start(Ref, CounterPid, FilterPid, ... |
de9b17009b842d9859ce37b98c47c0de7727ec86db4464cfbb729faf41f11793 | justinmeiners/exercises | 3_38.scm |
Total $ 100
(define balanced 100)
1 . desposits $ 10
(set! balance (+ balance 10))
2 . withdraws $ 20
(set! balance (- balance 20))
3 . withdraws half
(set! balance (- balance (/ balance 2)))
A ) List all the different possible values for balance after these three transations have been completed ... | null | https://raw.githubusercontent.com/justinmeiners/exercises/9491bc16925eae12e048ccd3f424b870ebdc73aa/sicp/3/3_38.scm | scheme |
- 20 - 40
there are other orders of events, but only these possible outcomes |
Total $ 100
(define balanced 100)
1 . desposits $ 10
(set! balance (+ balance 10))
2 . withdraws $ 20
(set! balance (- balance 20))
3 . withdraws half
(set! balance (- balance (/ balance 2)))
1 .
+ 10 = 110
- 20 = 90
/ 2 = 45
2 .
/ 2 = 50
+ 10 = 60
3 .
+ 10 = 110
/ 2 = 55
-... |
220a25ec084ad97ec9526e263ffaac3723bed02f772ab4ede152eff85f7aedd2 | kseo/poly_constraints | Type.hs | module Type where
newtype TVar = TV String
deriving (Show, Eq, Ord)
data Type
= TVar TVar
| TCon String
| TArr Type Type
deriving (Show, Eq, Ord)
data Scheme = Forall [TVar] Type
deriving (Show, Eq, Ord)
typeInt, typeBool :: Type
typeInt = TCon "Int"
typeBool = TCon "Bool"
| null | https://raw.githubusercontent.com/kseo/poly_constraints/897240cd56b5aefae6f46aa445db055652a18b5b/src/Type.hs | haskell | module Type where
newtype TVar = TV String
deriving (Show, Eq, Ord)
data Type
= TVar TVar
| TCon String
| TArr Type Type
deriving (Show, Eq, Ord)
data Scheme = Forall [TVar] Type
deriving (Show, Eq, Ord)
typeInt, typeBool :: Type
typeInt = TCon "Int"
typeBool = TCon "Bool"
| |
c9b6a3b71f9b38c10d0f4b14153affe9f607a8ac0f64f13adca01eb4f77f546b | sKabYY/palestra | p20.scm | (define (same-parity a . l)
(define (filter0 predicate l)
(cond ((null? l)
'())
((predicate (car l))
(cons (car l) (filter0 predicate (cdr l))))
(else
(filter0 predicate (cdr l)))))
(if (even? a)
(filter0 even? (cons a l))
(filter0 odd? (cons a l))))... | null | https://raw.githubusercontent.com/sKabYY/palestra/0906cc3a1fb786093a388d5ae7d59120f5aae16c/old1/sicp/2/p20.scm | scheme | (define (same-parity a . l)
(define (filter0 predicate l)
(cond ((null? l)
'())
((predicate (car l))
(cons (car l) (filter0 predicate (cdr l))))
(else
(filter0 predicate (cdr l)))))
(if (even? a)
(filter0 even? (cons a l))
(filter0 odd? (cons a l))))... | |
870ede2fd4c4f3e55e776ca9bc3c7382777df50eec8ac3f4e646fb32c574c92f | rpt/gen_tcp_server | gen_tcp_server_tests.erl | %%------------------------------------------------------------------------------
Copyright 2012
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless requir... | null | https://raw.githubusercontent.com/rpt/gen_tcp_server/8f1f0daa35fbca6db9781c8df20187ca139857dc/test/gen_tcp_server_tests.erl | erlang | ------------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eithe... | Copyright 2012
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
2012
@doc Eunit test suite for gen_tcp_server .
-module(gen_tcp_server_tests).
-export([handle_accept/1,
handle_tcp/3]).
-... |
21c1b127fbfd07167c0681eeada66f23fa5f5bf8e0fd962b8cb1df8d9e58450a | finnishtransportagency/harja | tarkastukset_api_test.clj | (ns harja.palvelin.integraatiot.api.tarkastukset-api-test
(:require [clojure.test :refer [deftest testing is use-fixtures compose-fixtures join-fixtures]]
[harja.testi :refer :all]
[taoensso.timbre :as log]
[harja.palvelin.integraatiot.api.tarkastukset :as api-tarkastukset]
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/e2efee6c0391ac16e9b92a683798c095f58de801/test/clj/harja/palvelin/integraatiot/api/tarkastukset_api_test.clj | clojure | Tarkastuksen tiedot vain päivitetään | (ns harja.palvelin.integraatiot.api.tarkastukset-api-test
(:require [clojure.test :refer [deftest testing is use-fixtures compose-fixtures join-fixtures]]
[harja.testi :refer :all]
[taoensso.timbre :as log]
[harja.palvelin.integraatiot.api.tarkastukset :as api-tarkastukset]
... |
c9e84e03b2893b983e9dc7eca4796dfaa354d59702d06f9ecbf23e95dddbe676 | dmitryvk/sbcl-win32-threads | sb-executable.lisp | (cl:defpackage :sb-executable
(:use :cl :sb-ext :sb-alien)
(:export :make-executable :copy-stream)
;; (what else should we be exporting?)
)
(cl:in-package :sb-executable)
(defvar *stream-buffer-size* 8192)
(defun copy-stream (from to &key (element-type (stream-element-type from) element-type-passed-p))
"Cop... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/contrib/sb-executable/sb-executable.lisp | lisp | (what else should we be exporting?) | (cl:defpackage :sb-executable
(:use :cl :sb-ext :sb-alien)
(:export :make-executable :copy-stream)
)
(cl:in-package :sb-executable)
(defvar *stream-buffer-size* 8192)
(defun copy-stream (from to &key (element-type (stream-element-type from) element-type-passed-p))
"Copy into TO from FROM until end of the inpu... |
e0a917db119fd76a9c961bb6d552cce151b8fdd7528fdb79bb362d03d5ac28f8 | chrisdone/prana | Numeric.hs | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude , MagicHash #
-----------------------------------------------------------------------------
-- |
-- Module : Numeric
Copyright : ( c ) The University of Glasgow 2002
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : ... | null | https://raw.githubusercontent.com/chrisdone/prana/f2e45538937d326aff562b6d49296eaedd015662/prana-boot/packages/base-4.11.1.0/Numeric.hs | haskell | ---------------------------------------------------------------------------
|
Module : Numeric
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
Odds and ends, mostly functions for reading and showing
'RealFloat'-like kind o... | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude , MagicHash #
Copyright : ( c ) The University of Glasgow 2002
module Numeric (
showSigned,
showIntAtBase,
showInt,
showHex,
showOct,
showEFloat,
showFFloat,
showGFloat,
showFFloatA... |
0d101c67fd5d86fed0a5dfa6b450260ca1040bfa3da4bfdc4f20fa825d9a471c | quchen/generative-art | Render.hs | module Circuits.Render (
renderWires
, renderProcessGeometry
, ColorScheme(..)
, purple
, grey
, pitchBlackForDebugging
) where
import Data.Set (Set)
import qualified Data.Vector as V
import Graphics.Rendering.Cairo as C hiding (x, y)
import... | null | https://raw.githubusercontent.com/quchen/generative-art/4385ba132bef51de52f974bb68338b581fa8e973/showcases/circuits/Circuits/Render.hs | haskell | module Circuits.Render (
renderWires
, renderProcessGeometry
, ColorScheme(..)
, purple
, grey
, pitchBlackForDebugging
) where
import Data.Set (Set)
import qualified Data.Vector as V
import Graphics.Rendering.Cairo as C hiding (x, y)
import... | |
896906d99f74fbe5fe3d923270406ba8c62191351f1b5af705c202cfb676de96 | tibbe/event | IntMap.hs | {-# LANGUAGE BangPatterns #-}
module Main where
import Criterion.Main
import System.Event.IntMap (IntMap)
import qualified System.Event.IntMap as IM
main = defaultMain
[ bench "insert10k" $ whnf ascFrom n
]
where
-- Number of elements
n = 10000
-- | Create an integer map with keys in ascending orde... | null | https://raw.githubusercontent.com/tibbe/event/2ca43e49327aa7854396b800ff4184d8b00a69f0/benchmarks/IntMap.hs | haskell | # LANGUAGE BangPatterns #
Number of elements
| Create an integer map with keys in ascending order starting at 0 | module Main where
import Criterion.Main
import System.Event.IntMap (IntMap)
import qualified System.Event.IntMap as IM
main = defaultMain
[ bench "insert10k" $ whnf ascFrom n
]
where
n = 10000
and ending at @max@ ( exclusive . )
ascFrom :: Int -> IntMap Int
ascFrom max = go 0 IM.empty
where
go ... |
8acf8b0f0e15665e74fa232b6ea491e7e42bee9367a6fbdf2fa48f64b4bbac68 | backtracking/ocamlgraph | cliquetree.ml | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/src/cliquetree.ml | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
module Cl... |
5465c127d756e8ff439879348a79f60b1ec62fd9323ca83b8e450dfd32f33c59 | mbj/stratosphere | SizeConstraintStatementProperty.hs | module Stratosphere.WAFv2.RuleGroup.SizeConstraintStatementProperty (
module Exports, SizeConstraintStatementProperty(..),
mkSizeConstraintStatementProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-}... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/wafv2/gen/Stratosphere/WAFv2/RuleGroup/SizeConstraintStatementProperty.hs | haskell | # SOURCE #
# SOURCE # | module Stratosphere.WAFv2.RuleGroup.SizeConstraintStatementProperty (
module Exports, SizeConstraintStatementProperty(..),
mkSizeConstraintStatementProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.R... |
b64bd8b14622a966994cb41f44f5e0978c87777b4e7c63e74fda7c3cd7833f75 | vikram/lisplibraries | getenv.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
Name : getenv.lisp
;;;; Purpose: UFFI Example file to get environment variable
Programmer :
Date Started : Feb 200... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/uffi-1.5.17/tests/getenv.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
*************************************************************************
FILE IDENTIFICATION
Purpose: UFFI Example file to get environment variable
************************************************************************* | Name : getenv.lisp
Programmer :
Date Started : Feb 2002
$ I d : getenv.lisp 10608 2005 - 07 - 01 00:39:48Z
This file , part of UFFI , is Copyright ( c ) 2002 - 2005 by
(in-package #:uffi-tests)
(uffi:def-function ("getenv" c-getenv)
((name :cstring))
:returning :cstring)
(uf... |
9eb43ea69a8a486a3a305ed9fe5574a6642e43edd02d76fcbeffe2131eed5493 | panicz/grasp | space.scm | (import (srfi :11))
(import (define-type))
(import (define-interface))
(import (hash-table))
(import (define-property))
(import (define-object))
(import (define-cache))
(import (keyword-arguments))
(import (fundamental))
(import (indexable))
(import (infix))
(import (examples))
(import (match))
(import (for))
(import (... | null | https://raw.githubusercontent.com/panicz/grasp/7badf508a4f38d49cba285bc44dbe13681728beb/src/space.scm | scheme | we need to restore the coordinates to
the-traverse's reference frame
In the following property definitions, we'd like
the input to be of type "cons", rather than "pair",
but at this point it isn't yet defined.
a cell is "dotted?" naturally when it is
a pair whose "tail" isn't a list (so for example,
if it's a s... | (import (srfi :11))
(import (define-type))
(import (define-interface))
(import (hash-table))
(import (define-property))
(import (define-object))
(import (define-cache))
(import (keyword-arguments))
(import (fundamental))
(import (indexable))
(import (infix))
(import (examples))
(import (match))
(import (for))
(import (... |
a303be8e5b97521e3dd98a38af1ccfcbe4ebc7b87887895942e8fa9206357ab8 | janestreet/core | test_binable.ml | open! Core
open! Import
open! Binable
let%test_unit _ =
let module M = struct
type t = int [@@deriving bin_io]
end
in
let m = (module M : S with type t = int) in
List.iter
[ Int.min_value; Int.min_value / 2; -1; 0; 1; Int.max_value / 2; Int.max_value ]
~f:(fun i ->
let check name of_x to_x ... | null | https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/test/test_binable.ml | ocaml | open! Core
open! Import
open! Binable
let%test_unit _ =
let module M = struct
type t = int [@@deriving bin_io]
end
in
let m = (module M : S with type t = int) in
List.iter
[ Int.min_value; Int.min_value / 2; -1; 0; 1; Int.max_value / 2; Int.max_value ]
~f:(fun i ->
let check name of_x to_x ... | |
27878f21f7ff8fdd2a695b14f1dcc91d3d09fe62a69601f0ab1fafbba0912c84 | fyquah/hardcaml_zprize | gf_intf.ml | open Base
open Hardcaml
(** Goldilocks field arithmetic. *)
module type S = sig
type t [@@deriving sexp_of, compare, equal]
* { 2 Constants }
* Solinas prime [ 2 ^ 64 - 2 ^ 31 + 1 ]
val modulus : t
val zero : t
val one : t
val two : t
val of_z : Z.t -> t
val to_z : t -> Z.t
* { 2 Arithmetic operation... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/hardcaml_ntt/src/gf_intf.ml | ocaml | * Goldilocks field arithmetic.
* Hardware implementations of the field arithmetic.
* Big number based reference implementation of the field arithmetic.
* Display as hex.
* Invert the element
* Raise the element to the given integer power.
* Create a random field element.
* Bits based hardware implementation.
* ... | open Base
open Hardcaml
module type S = sig
type t [@@deriving sexp_of, compare, equal]
* { 2 Constants }
* Solinas prime [ 2 ^ 64 - 2 ^ 31 + 1 ]
val modulus : t
val zero : t
val one : t
val two : t
val of_z : Z.t -> t
val to_z : t -> Z.t
* { 2 Arithmetic operations }
val ( + ) : t -> t -> t
val... |
a3a59274bb12e4d5c1f0f0ff6ff608cb052f8526f6e067b0f0060826acdec37c | aaronallen8455/hi-fi | MissingField.hs | #!/usr/bin/env cabal
{- cabal:
build-depends:
base
-}
# OPTIONS_GHC -fplugin HiFi #
import HiFi
data TestRec = TestRec
{ f1 :: Bool
, f2 :: Int
, f3 :: String
}
hkd :: HKD TestRec Maybe
hkd = mkHKD
{ f1 = Just True
, f2 = Just 9
}
main :: IO ()
main = pure ()
| null | https://raw.githubusercontent.com/aaronallen8455/hi-fi/8dece5086a3c5b2bd8bc335dbd7c5d253e78d9e1/type-error-test/MissingField.hs | haskell | cabal:
build-depends:
base
| #!/usr/bin/env cabal
# OPTIONS_GHC -fplugin HiFi #
import HiFi
data TestRec = TestRec
{ f1 :: Bool
, f2 :: Int
, f3 :: String
}
hkd :: HKD TestRec Maybe
hkd = mkHKD
{ f1 = Just True
, f2 = Just 9
}
main :: IO ()
main = pure ()
|
64ec175de935cef967b196f83cda8e48a35de447a31b9be9a7efea93797380cb | eait-itig/rdpproxy | nms.erl | %%
%% rdpproxy
%% remote desktop proxy
%%
Copyright 2020 < >
The University of Queensland
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions
%% are met:
1 . Redistributions of source code must re... | null | https://raw.githubusercontent.com/eait-itig/rdpproxy/67cd36f22216f7d4f6c9cf259cf55cab38fc6bfb/src/nms.erl | erlang |
rdpproxy
remote desktop proxy
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the followi... | Copyright 2020 < >
The University of Queensland
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS OR
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENT... |
ba1b531034501bba569d97ee757bc01a6f7fa5688c2b669076a52de6dbc47df8 | threatgrid/ctia | helpers.clj | (ns ctia.schemas.graphql.helpers
(:require [clojure
[walk :as walk :refer [stringify-keys]]]
[ctia.graphql.delayed :as delayed]
[ctia.schemas.core :refer [AnyGraphQLTypeResolver
AnyRealizeFnResult
GraphQ... | null | https://raw.githubusercontent.com/threatgrid/ctia/ae7d940e323a99dde747e37e2be2898d7705dcaa/src/ctia/schemas/graphql/helpers.clj | clojure | fast-path for readers
generate a new graphql value, or coordinate with another thread doing the same
may be run on another thread
unsure if reachable
if the field is a Fragment, replace it with its definition
if a field has sub selections, fetch them
compute a selection list with (when available)
field name and ... | (ns ctia.schemas.graphql.helpers
(:require [clojure
[walk :as walk :refer [stringify-keys]]]
[ctia.graphql.delayed :as delayed]
[ctia.schemas.core :refer [AnyGraphQLTypeResolver
AnyRealizeFnResult
GraphQ... |
24c61aa78f6dd546d02db0ef3b81de9461c8cb82583e7c9c8156920492a4d40a | diogoalexandrefranco/cl-cache-tables | cl-cache-tables.lisp | (in-package :cache)
(defstruct
(cache-table
(:constructor make-cache-table
(&key (test #'eql)
(rehash-size 1.5)
(rehash-threshold 0.75)
(size 1024)
&aux (hash (make-hash-table :test test
:size size
... | null | https://raw.githubusercontent.com/diogoalexandrefranco/cl-cache-tables/584632197e925255c0198ea2c5b580fcda11e63d/cl-cache-tables.lisp | lisp | didn't expire | (in-package :cache)
(defstruct
(cache-table
(:constructor make-cache-table
(&key (test #'eql)
(rehash-size 1.5)
(rehash-threshold 0.75)
(size 1024)
&aux (hash (make-hash-table :test test
:size size
... |
51d18bd4736789aa89695cdc68d3b5be37afeb82c57df142db513720bb4bc027 | kupl/FixML | sub39.ml | type exp =
| V of var
| P of var * exp
| C of exp * exp
and var = string
let rec helpcheck : exp -> exp list
= fun exp ->
match exp with
| P(a,b) -> (V a)::helpcheck(b)
| C(a,b) -> helpcheck(a)@helpcheck(b)
| V(a) -> []
let rec varcheck : exp -> exp list
= fun exp ->
match exp with
| V(a) -> (V a)::[]
| C(a,b... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/wellformedness/wellformedness/submissions/sub39.ml | ocaml | type exp =
| V of var
| P of var * exp
| C of exp * exp
and var = string
let rec helpcheck : exp -> exp list
= fun exp ->
match exp with
| P(a,b) -> (V a)::helpcheck(b)
| C(a,b) -> helpcheck(a)@helpcheck(b)
| V(a) -> []
let rec varcheck : exp -> exp list
= fun exp ->
match exp with
| V(a) -> (V a)::[]
| C(a,b... | |
71d327305091658915bf1a62fb079d0453b7018a1ffcba1ea641b280271973c6 | typedbyte/switch | Main.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Main where
-- base
import Control.Monad (forM_, void)
-- switch
import Device.Nintendo.Switch
import ControllerTest (ackInputMode, leftTest, sensorTest)
main :: IO ()
main = do
putStrLn "-----------------------------------------------------------... | null | https://raw.githubusercontent.com/typedbyte/switch/f83ca31619cbc81ec7a7862f60543855ebbc1c85/test/LeftJoyCon/Main.hs | haskell | base
switch
ack
ack
ack
ack | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Main where
import Control.Monad (forM_, void)
import Device.Nintendo.Switch
import ControllerTest (ackInputMode, leftTest, sensorTest)
main :: IO ()
main = do
putStrLn "------------------------------------------------------------------"
putStrL... |
bea6451625590a0a6e6fcf56c07c61dd7a3fa83f69bb6c634f279264f4d052c4 | Breezeemr/hitch | node.cljs | (ns hitch.mutable.node
(:require [hitch.oldprotocols :as oldproto]
[hitch.protocol :as proto]))
(defonce NODE-NOT-RESOLVED-SENTINEL
(reify
Object
(toString [_] "NODE-NOT-RESOLVED-SENTINEL")
IPrintWithWriter
(-pr-writer [_ writer opts]
(-w... | null | https://raw.githubusercontent.com/Breezeemr/hitch/79efea3cbf601a56060237fd9add2c0b68024a03/src/hitch/mutable/node.cljs | clojure | unwrap references
(-write writer " :dependents ")
(pr-writer dependents #_(into #{} (map #(.-selector %)) dependents) writer opts)
(-write writer " :refs ")
(pr-writer refs #_(into #{} (map #(.-selector %)) refs) writer opts) | (ns hitch.mutable.node
(:require [hitch.oldprotocols :as oldproto]
[hitch.protocol :as proto]))
(defonce NODE-NOT-RESOLVED-SENTINEL
(reify
Object
(toString [_] "NODE-NOT-RESOLVED-SENTINEL")
IPrintWithWriter
(-pr-writer [_ writer opts]
(-w... |
c5bafff3a9905808dd0fd974cf196cd1551865d77e33032e6a1a348738ea46c0 | uw-unsat/leanette-popl22-artifact | memory.rkt | #lang rosette
(require rackunit rackunit/text-ui rosette/lib/roseunit
"../model/memory.rkt" "../model/work.rkt"
"../model/reals.rkt" "../model/pointers.rkt"
"../model/context.rkt" "../model/buffer.rkt" "../model/flags.rkt")
(define (read-write-only-buffer)
(parameterize ([current-contex... | null | https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/synthcl/test/memory.rkt | racket | #lang rosette
(require rackunit rackunit/text-ui rosette/lib/roseunit
"../model/memory.rkt" "../model/work.rkt"
"../model/reals.rkt" "../model/pointers.rkt"
"../model/context.rkt" "../model/buffer.rkt" "../model/flags.rkt")
(define (read-write-only-buffer)
(parameterize ([current-contex... | |
4930e021d25c9c6b0e58bea7f8f59050977f4e31b1ac450aa8d94eb4d575f32a | zippy/anansi | portal.clj | ;(ns
# ^{:author " "
; :doc "Portal receptor"}
; anansi.commons-room.portal
; (:use [anansi.ceptr]))
;
;(defmethod manifest :portal [_r & [target-addr]]
; {:target (if (nil? target-addr) 0 target-addr)} )
( defmethod state : portal [ _ r full ? ]
; (assoc (state-convert _r full?)
; ... | null | https://raw.githubusercontent.com/zippy/anansi/881aa279e5e7836f3002fc2ef7623f2ee1860c9a/src/anansi/commons_room/portal.clj | clojure | (ns
:doc "Portal receptor"}
anansi.commons-room.portal
(:use [anansi.ceptr]))
(defmethod manifest :portal [_r & [target-addr]]
{:target (if (nil? target-addr) 0 target-addr)} )
(assoc (state-convert _r full?)
:target (contents _r :target)))
(let [r (do-restore state pare... | # ^{:author " "
( defmethod state : portal [ _ r full ? ]
( defmethod restore : portal [ state parent ]
|
7f872cc35395bc90d87a7974eac55ceff2b00a35b9da7c4d641bfdb02869d1f0 | jcouyang/dhall-aws-cloudformation | Cloudformation.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
module Dhall.Cloudformation where
import Control.Applicative ((<|>))
import Control.Arrow (Arrow ((&&&)))
import Data... | null | https://raw.githubusercontent.com/jcouyang/dhall-aws-cloudformation/63e70dd56af66c00115b13b78798c406e384d07e/src/Dhall/Cloudformation.hs | haskell | # LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
| -resource-specification-format.html | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE TupleSections #
module Dhall.Cloudformation where
import Control.Applicative ((<|>))
import Control.Arrow (Arrow ((&&&)))
import Data.Aeson
import Data.Aeson.Types
import Data.Foldabl... |
a7b0797e5711f8a0bbf361ac6562968f3e500a4fe0dc27ad6d93427fdbbc0961 | ghc/packages-dph | Solver.hs | # LANGUAGE BangPatterns , PatternGuards #
-- | The list version of the solver also builds the bounding box at every
-- node of the tree, which is good for visualisation.
module Solver.VectorBH.Solver
( MassPoint (..)
, BoundingBox (..)
, BHTree (..)
, calcAccels
, buildTree
, findBounds)
where
import Common.Bo... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-examples/examples/real/NBody/Solver/VectorBH/Solver.hs | haskell | | The list version of the solver also builds the bounding box at every
node of the tree, which is good for visualisation.
# UNPACK #
minimum of hight and width of cell
# UNPACK #
# UNPACK #
# UNPACK #
| Compute the acclerations on all these points.
| Find the coordinates of the bounding box that contains these p... | # LANGUAGE BangPatterns , PatternGuards #
module Solver.VectorBH.Solver
( MassPoint (..)
, BoundingBox (..)
, BHTree (..)
, calcAccels
, buildTree
, findBounds)
where
import Common.Body
import Data.Vector.Unboxed (Vector)
import qualified Data.Vector.Unboxed as V
type BoundingBox
= (Double, Double, Double,... |
d8654664ffdeaf0eb8139bf184c72be1dfad013784001b78ed1a28af2b205458 | mirage/mirage-time | time.mli |
* Copyright ( c ) 2017 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/mirage-time/5eaf7267d8e52622d9888b3cd756d6def8a5c277/unix/time.mli | ocaml | * Implementation of the [Mirage_time.S] signature for the unix backend. |
* Copyright ( c ) 2017 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
1580d06297dd8395ccb674c1e5d101e647a933c05ba50efa065feaf82614a184 | k0001/exinst | Base.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
{-# LANGUAGE TypeInType #-}
# LANGU... | null | https://raw.githubusercontent.com/k0001/exinst/7ea28e5de5afc27c18757ad65650be53df488862/exinst-base/lib/Exinst/Base.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE TypeInType #
'Dict1', 'Dict2', 'Dict3' and 'Dict4' instances are available.
See the README file for more general documentation: #readme
------------------------------------------------------------------------------
Show
Internal wrappers used to avoid writing the string mani... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orpha... |
7f8a2327ed84ba7af0a5ea5afbee4e14894d47acf7235b9b183beea0d771d0b0 | mhuebert/re-db | datomic.clj | (ns re-db.integrations.datomic
(:require [datomic.api :as d]
[re-db.triplestore :as ts]
[re-db.util :as u])
(:import [datomic.peer LocalConnection Connection]
[datomic.db Db]
[datomic Datom]))
(defn- v [^Datom d] (.-v d))
(extend-type Db
ts/ITripleStore
(eav
(... | null | https://raw.githubusercontent.com/mhuebert/re-db/c2a1ffa54e5530bfcb9d47813136dde6ed34c6b7/src/main/re_db/integrations/datomic.clj | clojure | (ns re-db.integrations.datomic
(:require [datomic.api :as d]
[re-db.triplestore :as ts]
[re-db.util :as u])
(:import [datomic.peer LocalConnection Connection]
[datomic.db Db]
[datomic Datom]))
(defn- v [^Datom d] (.-v d))
(extend-type Db
ts/ITripleStore
(eav
(... | |
f4786c7c5e47df619239b95e286ad5cf9e592e639ec65de08cfad127891ce2b8 | facebook/pyre-check | basicTest.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/9abc0ffc5ae10538a512c25e6930a216b23db33a/source/code_navigation_server/test/basicTest.ml | ocaml | Consuming the stop request would make the server terminate itself immeidately, bypassing this
eternal-wait.
Now that foo is no longer tracked as an open file, this should error.
This location point to empty space.
This location points to an empty space
This location points to `test.x`
This location po... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
795effdbbcd955683417e9c8f1d1a74d44bf4a95884d97eb4fbf6b7e5cc474de | RyanGlScott/text-show | TypesSpec.hs | # LANGUAGE CPP #
|
Module : Spec . System . .
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
@hspec@ tests for data types in the " System . . Types " module .
Module: Spec.System.Posix.T... | null | https://raw.githubusercontent.com/RyanGlScott/text-show/5ea297d0c7ae2d043f000c791cc12ac53f469944/tests/Spec/System/Posix/TypesSpec.hs | haskell | # LANGUAGE CPP #
|
Module : Spec . System . .
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
@hspec@ tests for data types in the " System . . Types " module .
Module: Spec.System.Posix.T... | |
c4d344f7d7618d6f309d5a9d4e446edaa005fb3ebd65181e4c352dfc50a62a20 | lijunsong/fl-compiler | utils.ml | open Syntax
open Batteries
let cmp_list2 f l1 l2 =
List.length l1 = List.length l2 &&
List.for_all2 f l1 l2
let rec ast_equal ast1 ast2 =
match ast1, ast2 with
| String (_, a), String (_, b) -> a = b
| Int (_, a), Int(_, b) -> a = b
| Nil (_), Nil (_) -> true
| Var (_, a), Var(_, b) -> ast_var_equal a... | null | https://raw.githubusercontent.com/lijunsong/fl-compiler/6d2938855012a7a0a8767dc342f6abb454c43eec/tests/utils.ml | ocaml | In our impl, l1 and l2 can be the same | open Syntax
open Batteries
let cmp_list2 f l1 l2 =
List.length l1 = List.length l2 &&
List.for_all2 f l1 l2
let rec ast_equal ast1 ast2 =
match ast1, ast2 with
| String (_, a), String (_, b) -> a = b
| Int (_, a), Int(_, b) -> a = b
| Nil (_), Nil (_) -> true
| Var (_, a), Var(_, b) -> ast_var_equal a... |
f45ff9307cca9e7430461a047fb94d70b95807daf087d71160a2a0baf159598a | tnelson/Margrave | queries.scm | ;; To load Margrave.
You might have to change the path to where you have installed .
(load-relative "../../code/Margrave.scm")
To include 's functions in this namespace .
(require margrave)
;; To remove the timing printouts, uncomment the following line.
;(define time (lambda (x) x)
;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/tnelson/Margrave/24192875df8d1092fab5caa0b9cf0d8de57f4787/old-xacml/queries.scm | scheme | To load Margrave.
To remove the timing printouts, uncomment the following line.
(define time (lambda (x) x)
property. If the property holds, they return true. Otherwise, they call the fail-thunk,
which is the last argument to these functions. They pass in the counter-examples to
the fail-thunk.
This will ... | You might have to change the path to where you have installed .
(load-relative "../../code/Margrave.scm")
To include 's functions in this namespace .
(require margrave)
A note about avc - false - test and avc - implication - test
These two functions are for testing . They test for the avc - false ? and... |
5c4eed7651e790a0f7e5d43d0304552a701f491b344823aff2040ccb6adcd6a3 | ElvishJerricco/fraxl | Main.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
module Main where
import Control.Concurrent
import Control.Monad.Fraxl
import... | null | https://raw.githubusercontent.com/ElvishJerricco/fraxl/12b3be244686f9bf7c41c605cdd54c0f8559d03e/examples/src/Main.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts # | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
module Main where
import Control.Concurrent
import Control.Monad.Fraxl
import Control.Monad.IO.Class
import Control.Monad.State
main :... |
4a7ea26f62d7d4b7d83f631e69004e0bf3e093b317ac423ee9e3fa4b3d2bb869 | apache/couchdb-rebar | foo.erl | -module(foo).
-export([start_link/0,
start_link/1,
init/1,
terminate/2,
handle_info/2,
handle_call/3,
handle_cast/2,
code_change/3]).
-behavior(gen_server).
-include("foo_core.hrl").
-include("foo_extra.hrl").
-include_lib("kernel/include/file.hrl").
-r... | null | https://raw.githubusercontent.com/apache/couchdb-rebar/8578221c20d0caa3deb724e5622a924045ffa8bf/inttest/erlc/src/foo.erl | erlang | -module(foo).
-export([start_link/0,
start_link/1,
init/1,
terminate/2,
handle_info/2,
handle_call/3,
handle_cast/2,
code_change/3]).
-behavior(gen_server).
-include("foo_core.hrl").
-include("foo_extra.hrl").
-include_lib("kernel/include/file.hrl").
-r... | |
1c9fa7ed94d34aacc586517017445f7792a7f55c817b510c917a59cc9dfe3960 | brokensandals/irc-indexer | setup.clj | (ns irc-indexer.setup
(require [cheshire.core :as json]
[clj-http.client :as client]))
(def ^:private ^{:doc "Index and mapping settings for elasticsearch."} index-spec
{:settings
{:analysis
{:analyzer
{:default {:type "english"}}}}
:mappings
{:transcript
{:properties
... | null | https://raw.githubusercontent.com/brokensandals/irc-indexer/1ca2b7adc4d0841d4c6745fbb52e3519cd778a50/src/irc_indexer/setup.clj | clojure | (ns irc-indexer.setup
(require [cheshire.core :as json]
[clj-http.client :as client]))
(def ^:private ^{:doc "Index and mapping settings for elasticsearch."} index-spec
{:settings
{:analysis
{:analyzer
{:default {:type "english"}}}}
:mappings
{:transcript
{:properties
... | |
d92c6214f9fb58b794f68c99623a679b068a869132226937a7a0cd377b0847c9 | ndmitchell/weeder | Str-String.hs |
module Str(
Str,
linesCR, stripPrefix,
readFileUTF8,
S.null, S.isPrefixOf, S.drop, S.span, S.length, toList, S.all, S.uncons,
ugly, showLength
) where
import Data.List.Extra as S
import System.IO.Extra
type Str = String
toList = id
showLength x = show x
linesCR = lines
ugly :: Integral a =... | null | https://raw.githubusercontent.com/ndmitchell/weeder/3bc7ee09de6faf34cd60a0f4554aa1baf36f25e8/str/Str-String.hs | haskell |
module Str(
Str,
linesCR, stripPrefix,
readFileUTF8,
S.null, S.isPrefixOf, S.drop, S.span, S.length, toList, S.all, S.uncons,
ugly, showLength
) where
import Data.List.Extra as S
import System.IO.Extra
type Str = String
toList = id
showLength x = show x
linesCR = lines
ugly :: Integral a =... | |
056fe0df12497ca33fe497ebde8aeb152f6e5fc7d7f33297433f53b4e21cf272 | namin/biohacker | nd-inter.lisp | ;; nd-inter.lisp
(defstruct (nd (:PRINT-FUNCTION nd-print-procedure))
title ; Pretty name
Pointer to its LTRE
(debugging nil) ; Show basic operations
(log nil) ; File to log progress and results.
rules ; Which rules to use:
; :just-reactions
; :extended-reactio... | null | https://raw.githubusercontent.com/namin/biohacker/6b5da4c51c9caa6b5e1a68b046af171708d1af64/network-debugger/nd-inter.lisp | lisp | nd-inter.lisp
Pretty name
Show basic operations
File to log progress and results.
Which rules to use:
:just-reactions
:extended-reactions (support for :unknown genes and reversible reactions)
:just-pathways
Whether reactions, enzymes and pathways can still be added
An association list of (experiment-name . fi... | (defstruct (nd (:PRINT-FUNCTION nd-print-procedure))
Pointer to its LTRE
)
(defun nd-print-procedure (nd st ignore)
(declare (ignore ignore))
(format st "<network-debugger: ~A (~A)>" (nd-title nd) (if (nd-network-closed? nd) 'closed 'open)))
(defmacro with-ND (nd &rest forms)
`(let ((*ND* ,nd))
(with... |
3d1cee015bc9794beffaf95b7b7467962a10af6147abf5a4061a880d710d69a4 | mfoemmel/erlang-otp | ordsets.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/stdlib/src/ordsets.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(ordsets).
-export([new/0,is_set/1... |
4e7201c6b9a5065929d05a095b801caba04347287b69df6fedb25415efc33805 | slipstream/SlipStreamServer | resource_metadata_action_test.cljc | (ns com.sixsq.slipstream.ssclj.resources.spec.resource-metadata-action-test
(:require
[clojure.test :refer [are deftest is]]
[com.sixsq.slipstream.ssclj.resources.spec.resource-metadata-action :as spec]
[com.sixsq.slipstream.ssclj.resources.spec.spec-test-utils :as stu]))
(def valid {:name "my-... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/test/com/sixsq/slipstream/ssclj/resources/spec/resource_metadata_action_test.cljc | clojure | action
action vector | (ns com.sixsq.slipstream.ssclj.resources.spec.resource-metadata-action-test
(:require
[clojure.test :refer [are deftest is]]
[com.sixsq.slipstream.ssclj.resources.spec.resource-metadata-action :as spec]
[com.sixsq.slipstream.ssclj.resources.spec.spec-test-utils :as stu]))
(def valid {:name "my-... |
3f8385ae81d9c52305c5d8c878387cf49c9bef31d4bf308898bc112b9f92f165 | zcaudate/hara | protocol.clj | (ns hara.core.base.protocol
(:require [hara.core.base.inheritance :as inheritance]
[hara.core.base.error :as error]))
(defn protocol-interface
"returns the java interface for a given protocol
(protocol-interface state/IStateGet)
=> hara.protocol.state.IStateGet"
{:added "3.0"}
[protocol]
... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/core/base/protocol.clj | clojure | (ns hara.core.base.protocol
(:require [hara.core.base.inheritance :as inheritance]
[hara.core.base.error :as error]))
(defn protocol-interface
"returns the java interface for a given protocol
(protocol-interface state/IStateGet)
=> hara.protocol.state.IStateGet"
{:added "3.0"}
[protocol]
... | |
58f94e38e0fa295ecc4116f7580242fd9a8c62e973cd92a2b3dc93f08080e81a | nikita-volkov/rebase | Sum.hs | module Rebase.Data.Functor.Sum
(
module Data.Functor.Sum
)
where
import Data.Functor.Sum
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Data/Functor/Sum.hs | haskell | module Rebase.Data.Functor.Sum
(
module Data.Functor.Sum
)
where
import Data.Functor.Sum
| |
6ef9f3922e12fab475d9164d900f3d71bfe17dfab0facc8729286ee05a56db1a | smaccoun/beam-servant | Login.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE TemplateHaskell #-}
module Models.Login where
import AppPrelude
import Data.Aeson
import Models.Credentials
data Login = Login { email :: Email , password :: Password }
deriving (Eq, Show, Read, Generic)
instance FromJS... | null | https://raw.githubusercontent.com/smaccoun/beam-servant/1560f81c56ca7a324be1ee68208fb05c4dfea844/src/Models/Login.hs | haskell | # LANGUAGE TemplateHaskell # | # LANGUAGE GeneralizedNewtypeDeriving #
module Models.Login where
import AppPrelude
import Data.Aeson
import Models.Credentials
data Login = Login { email :: Email , password :: Password }
deriving (Eq, Show, Read, Generic)
instance FromJSON Login
|
294878186676d22a112a005cd41ca211543c46e7e8721b041cd2f2bcd4f84ac1 | gafiatulin/codewars | Peano.hs | -- Peano numbers
module Haskell.Codewars.Peano where
import Prelude hiding (even, odd, div, compare, Num, Int, Integer, Float, Double, Rational, Word)
data Peano = Zero | Succ Peano deriving (Eq, Show)
add, sub, mul, div :: Peano -> Peano -> Peano
add p1 Zero = p1
add Zero p2 = p2
add p1 (Succ p2) = add (Succ p1... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/5%20kyu/Peano.hs | haskell | Peano numbers |
module Haskell.Codewars.Peano where
import Prelude hiding (even, odd, div, compare, Num, Int, Integer, Float, Double, Rational, Word)
data Peano = Zero | Succ Peano deriving (Eq, Show)
add, sub, mul, div :: Peano -> Peano -> Peano
add p1 Zero = p1
add Zero p2 = p2
add p1 (Succ p2) = add (Succ p1) p2
sub p1 Zero... |
2a59f5b004513f01f05b700121a3928cc5b1aab2fae7f950c50860687cb3b714 | d-cent/objective8 | translation.clj | (ns objective8.integration.translation
(:require [midje.sweet :refer :all]
[clojure.java.io :as io]
[objective8.front-end.translation :as tr]
[objective8.config :as config]))
(defn test-resource-locator [locale-keyword resource-file]
(fn [] {:resource-name locale-keyword
... | null | https://raw.githubusercontent.com/d-cent/objective8/db8344ba4425ca0b38a31c99a3b282d7c8ddaef0/test/objective8/integration/translation.clj | clojure | (ns objective8.integration.translation
(:require [midje.sweet :refer :all]
[clojure.java.io :as io]
[objective8.front-end.translation :as tr]
[objective8.config :as config]))
(defn test-resource-locator [locale-keyword resource-file]
(fn [] {:resource-name locale-keyword
... | |
53953833917a235a26d369bda39b4ec2224778184e9128ee423beb1029c089d9 | well-typed-lightbulbs/ocaml-esp32 | result.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/stdlib/result.ml | ocaml | ************************************************************************
OCaml
The... | Copyright 2018 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type ('a, 'e) t = ('a, 'e) result = Ok of 'a | Error of 'e
let ok v = Ok v
let error e = Error e
let value r ~default = match r with Ok v -> v | Error _ -> default
let g... |
581520cdd7757296a3996c46fa90c789afbd31a6adcdf8611edf5595c5c6df7c | ocaml-community/obus | test_auth.ml |
* test_auth.ml
* ------------
* Copyright : ( c ) 2009 , < >
* Licence : BSD3
*
* This file is a part of obus , an ocaml implementation of D - Bus .
* test_auth.ml
* ------------
* Copyright : (c) 2009, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a part of obus, an ocaml imple... | null | https://raw.githubusercontent.com/ocaml-community/obus/8d38ee6750587ae6519644630b75d53a0a011acd/tests/test_auth.ml | ocaml |
* test_auth.ml
* ------------
* Copyright : ( c ) 2009 , < >
* Licence : BSD3
*
* This file is a part of obus , an ocaml implementation of D - Bus .
* test_auth.ml
* ------------
* Copyright : (c) 2009, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a part of obus, an ocaml imple... | |
34edfbf6ad011060283b5a979838848f471b71cc9636dacb6e13f7c1e1aa3aa1 | ocaml/odoc | chain.mli | module A : sig
module B : sig
type t
end
end
(** @canonical Chain.M1 *)
module M1__ = A
module M1 = M1__
module M1B = M1.B
(** @canonical Chain.M2 *)
module M2__ = M1
module M2=M2__
module M2B=M2.B
* @canonical Chain . M3
module M3__ = M2
module M3=M3__
module M3B=M3.B
(** @canonical Chain.M4 *)
module M4__... | null | https://raw.githubusercontent.com/ocaml/odoc/1f016add8d15181a874fa5a665a78acd683fd6eb/test/xref2/aliaschain.t/chain.mli | ocaml | * @canonical Chain.M1
* @canonical Chain.M2
* @canonical Chain.M4
* @canonical Chain.M5
* @canonical Chain.M6
* @canonical Chain.M8
* @canonical Chain.M9
* @canonical Chain.M10
* @canonical Chain.M11
* @canonical Chain.M13
* @canonical Chain.M14
* @canonical Chain.M15
* @canonical Chain.M16
* @canonical Ch... | module A : sig
module B : sig
type t
end
end
module M1__ = A
module M1 = M1__
module M1B = M1.B
module M2__ = M1
module M2=M2__
module M2B=M2.B
* @canonical Chain . M3
module M3__ = M2
module M3=M3__
module M3B=M3.B
module M4__ = M3
module M4=M4__
module M4B=M4.B
module M5__ = M4
module M5=M5__
module M5B=... |
4615a2f17d58c0cc05eb674eef79464aadb302bca504c6144915ce86a33d3da5 | jixiuf/helloerlang | gen_server_2.erl | -module(gen_server_2).
-export([reply/2,loop/1,cast/2,call/2,start_link/2]).
-record(state,{module,value=[]}).
start_link(Module,Arg)->
case Module:init([Arg]) of
{ok,State}->
Pid =spawn_link(?MODULE,loop,[#state{module=Module,value=State}]),
{ok,Pid};
{stop,Reason}->
... | null | https://raw.githubusercontent.com/jixiuf/helloerlang/3960eb4237b026f98edf35d6064539259a816d58/gen_server_2/src/gen_server_2.erl | erlang | From !{reply,Reply,Timeout},
TODO:
TODO:
==> {reply, Reply, State}
| -module(gen_server_2).
-export([reply/2,loop/1,cast/2,call/2,start_link/2]).
-record(state,{module,value=[]}).
start_link(Module,Arg)->
case Module:init([Arg]) of
{ok,State}->
Pid =spawn_link(?MODULE,loop,[#state{module=Module,value=State}]),
{ok,Pid};
{stop,Reason}->
... |
2f6fbd57dfd7264fd202056a069cfa8034b0c4184e000b157060a1112c971291 | ocurrent/ocaml-multicore-ci | build_from_clone_component.mli | val v :
repo_url:string ->
?compiler_commit:Current_git.Commit.t Current.t ->
Current_git.Commit.t Current.t ->
Current_git.Commit.t Current.t
(** Record a build starting for the given repo / commit. *)
| null | https://raw.githubusercontent.com/ocurrent/ocaml-multicore-ci/d46eecaf7269283a4b95ee40d2a9d6c7ec34a7bf/lib/build_from_clone_component.mli | ocaml | * Record a build starting for the given repo / commit. | val v :
repo_url:string ->
?compiler_commit:Current_git.Commit.t Current.t ->
Current_git.Commit.t Current.t ->
Current_git.Commit.t Current.t
|
74d250e3def03b9a191a3482cafd7c6c2415dc071191cd638ef6a5a995162e84 | dktr0/estuary | Resources.hs | {-# LANGUAGE OverloadedStrings #-}
module Estuary.Resources where
import Control.Concurrent
import Control.Monad
import Control.Monad.IO.Class
import Data.Sequence as Seq
import Data.Text (Text)
import qualified Data.Text as T
import Data.IORef
import Estuary.Types.ResourceOp
import Estuary.Types.ResourceMeta
import... | null | https://raw.githubusercontent.com/dktr0/estuary/b2c7f1f0f20a3491c4f4ca93619e69af871f9d68/client/src/Estuary/Resources.hs | haskell | # LANGUAGE OverloadedStrings #
audio image video
putStrLn $ "addResourceOp: " ++ show op
putStrLn $ "deleteResourceOp: " ++ show x
putStrLn "clearResourceOps"
putStrLn $ "updateMaps: " ++ show newMaps |
module Estuary.Resources where
import Control.Concurrent
import Control.Monad
import Control.Monad.IO.Class
import Data.Sequence as Seq
import Data.Text (Text)
import qualified Data.Text as T
import Data.IORef
import Estuary.Types.ResourceOp
import Estuary.Types.ResourceMeta
import Estuary.Types.ResourceType
import ... |
3722b4ddb8fb374bd93cee8ebe74254d0f247338cee2f6df3165648b1fcfbb9d | tezos/tezos-mirror | consistency.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2020 - 2021 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/448daee0f4ae76893ae524536e428aa0e22f1d60/src/lib_store/unix/consistency.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2020 - 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN... |
26cd50d395ef65264223f1b3563c0d9815cfba9eb2ed606cd83ef2ae668387c8 | spwhitton/consfigurator | chroot.lisp | ;;; Consfigurator -- Lisp declarative configuration management system
Copyright ( C ) 2021 - 2022 < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 , or ( at your opt... | null | https://raw.githubusercontent.com/spwhitton/consfigurator/ee162259b316550afc201979cd10be7f3343c358/src/property/chroot.lisp | lisp | Consfigurator -- Lisp declarative configuration management system
This file is free software; you can redistribute it and/or modify
either version 3 , or ( at your option )
any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty o... |
Copyright ( C ) 2021 - 2022 < >
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(in-package :consfigurator.property.chroot)
(named-readtables:in-readtable :consfigurator)
(defprop %debootstrapped :posix (root host &r... |
7f0e0b207f88fae545ba9499a58b4214509ac82fb2b15e19c01618e099e940be | penpot/penpot | libraries.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns frontend-tests.helpers.libraries
(:require
[app.common.pages.helpers :as cph]
[app.common.types.co... | null | https://raw.githubusercontent.com/penpot/penpot/f3472fcd790c2d1254b64a7d3e4510369914df9e/frontend/test/frontend_tests/helpers/libraries.cljs | clojure |
Copyright (c) KALEIDOS INC
---- Helpers to manage libraries and synchronization | 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 /.
(ns frontend-tests.helpers.libraries
(:require
[app.common.pages.helpers :as cph]
[app.common.types.component :as ctk]
[app.common.t... |
c6859d3e481f041c5c2cf5bfd59fa7adf7f04ccf68f84cb6204541f62e7f53bc | gulige/neuroevo | sensor.erl | -module(sensor).
-compile(export_all).
-include_lib("ne_common/src/include/common.hrl").
-include("records.hrl").
gen(ExoSelf_PId, Node) ->
spawn(Node, ?MODULE, prep, [ExoSelf_PId]).
When is executed it spawns the sensor element and immediately begins to wait for its initial state message .
prep(ExoSelf_PId) ... | null | https://raw.githubusercontent.com/gulige/neuroevo/0b02b1fdd98ce1ddd047d2282274d17d3c557fdf/apps/neuroevo/src/sensor.erl | erlang | to begin gathering sensory data based on its sensory role, or terminate if the cortex requests so. | -module(sensor).
-compile(export_all).
-include_lib("ne_common/src/include/common.hrl").
-include("records.hrl").
gen(ExoSelf_PId, Node) ->
spawn(Node, ?MODULE, prep, [ExoSelf_PId]).
When is executed it spawns the sensor element and immediately begins to wait for its initial state message .
prep(ExoSelf_PId) ... |
3ab8cfc110adfecdac5be316ea01a5e3ac41e53037c459b132a9fcc26f9c91d3 | jlouis/graphql-erlang | graphql_enum_coerce.erl | -module(graphql_enum_coerce).
-export([input/2, output/2]).
input(_, Str) when is_binary(Str) -> {ok, {enum, Str}};
input(_, _) -> {error, not_valid_enum_input}.
output(_, {enum, X}) -> {ok, X};
output(_, Str) when is_binary(Str) -> {ok, Str}.
| null | https://raw.githubusercontent.com/jlouis/graphql-erlang/4fd356294c2acea42a024366bc5a64661e4862d7/src/graphql_enum_coerce.erl | erlang | -module(graphql_enum_coerce).
-export([input/2, output/2]).
input(_, Str) when is_binary(Str) -> {ok, {enum, Str}};
input(_, _) -> {error, not_valid_enum_input}.
output(_, {enum, X}) -> {ok, X};
output(_, Str) when is_binary(Str) -> {ok, Str}.
| |
07f07f83e4e0099f0e90568998931189725aee910e9f79a3628518237a56ee37 | pandeiro/boot-http | impl.clj | (ns pandeiro.boot-http.impl
(:import [java.net URLDecoder])
(:require [clojure.java.io :as io]
[clojure.string :as s]
[ring.util.response :refer [resource-response content-type]]
[ring.middleware
[file :refer [wrap-file]]
[resource :refer [wrap-resourc... | null | https://raw.githubusercontent.com/pandeiro/boot-http/15db741d24cdcea61cfcafd26ae2c4d1fd9dc14b/src/pandeiro/boot_http/impl.clj | clojure |
Directory serving
Handlers
Remove start slash and add end slash
Jetty / HTTP Kit
| (ns pandeiro.boot-http.impl
(:import [java.net URLDecoder])
(:require [clojure.java.io :as io]
[clojure.string :as s]
[ring.util.response :refer [resource-response content-type]]
[ring.middleware
[file :refer [wrap-file]]
[resource :refer [wrap-resourc... |
3faa921d2bdaea77ad3e04a0e0e828de67736680694bc31ad30988f739168d43 | Ptival/chick | Test.hs | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Diff.Motive.Test where
import Diff.Motive
import qualified Diff.Term as DT
import Inductive.Motive
import Polysemy
import Polysemy.Error
import Polysemy.Trace
import StandardLibrary
import StandardLibraryDiff
import Term.Term
import qualified Term.Univer... | null | https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/test/Diff/Motive/Test.hs | haskell | do
putStrLn $ prettyStr listMotive
putStrLn $ prettyStr vecMotive
do
putStrLn s
do | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Diff.Motive.Test where
import Diff.Motive
import qualified Diff.Term as DT
import Inductive.Motive
import Polysemy
import Polysemy.Error
import Polysemy.Trace
import StandardLibrary
import StandardLibraryDiff
import Term.Term
import qualified Term.Univer... |
22eb7756a1bab9242a7755e7b302b0306d7a6da940fef76767d10366ec6c3e0c | tek/ribosome | MainHs.hs | module Ribosome.App.Templates.MainHs where
import Exon (exon)
import Ribosome.App.Data (ModuleName (ModuleName))
mainHs :: ModuleName -> Text
mainHs (ModuleName modName) =
[exon|module Main (main) where
import #{modName}.Plugin (main)
|]
| null | https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/app/lib/Ribosome/App/Templates/MainHs.hs | haskell | module Ribosome.App.Templates.MainHs where
import Exon (exon)
import Ribosome.App.Data (ModuleName (ModuleName))
mainHs :: ModuleName -> Text
mainHs (ModuleName modName) =
[exon|module Main (main) where
import #{modName}.Plugin (main)
|]
| |
2c44360dc4dc52f242eafdb7f45163345c387182d8f2d19f663ec2df920905bb | TerrorJack/ghc-alter | ExecutionStack.hs | -----------------------------------------------------------------------------
-- |
-- Module : GHC.ExecutionStack
Copyright : ( c ) The University of Glasgow 2013 - 2015
-- License : see libraries/base/LICENSE
--
-- Maintainer :
-- Stability : internal
Portability : non - portable ( GHC Exte... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/GHC/ExecutionStack.hs | haskell | ---------------------------------------------------------------------------
|
Module : GHC.ExecutionStack
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
This is a module for efficient stack traces. This stack trace implementation
is considered low overhead. Basic usage ... | Copyright : ( c ) The University of Glasgow 2013 - 2015
Portability : non - portable ( GHC Extensions )
Your GHC must have been built with @libdw@ support for this to work .
@since 4.9.0.0
module GHC.ExecutionStack (
Location (..)
, SrcLoc (..)
, getStackTrace
, showStackTrace
) where
impor... |
0d834810fcad88f9ed091748bb857aea3d56f2507cc1136f8e6ac7651b40b7ae | gsakkas/rite | 20060323-23:34:54-e5657a429599e48a5306fa79011f83cd.seminal.ml |
exception Unimplemented
exception AlreadyDone
let pi = 3.14159
(*** part a ***)
type move = Home | Forward of float | Turn of float | For of (int * (move list))
(*** part b ***)
let makePoly sides len = For(sides, (Forward(len)::[Turn(2.0 *. pi /. sides)]))
(*** part c ***)
let interpLarge (movelist :... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060323-23%3A34%3A54-e5657a429599e48a5306fa79011f83cd.seminal.ml | ocaml | ** part a **
** part b **
** part c **
** part d **
** part e **
** part f **
** possibly helpful testing code ** |
exception Unimplemented
exception AlreadyDone
let pi = 3.14159
type move = Home | Forward of float | Turn of float | For of (int * (move list))
let makePoly sides len = For(sides, (Forward(len)::[Turn(2.0 *. pi /. sides)]))
let interpLarge (movelist : move list) : (float*float) list =
let rec loop mo... |
ad56acd2c3e1d920226c60e9d1cf8edc2f87714103aeeb4b195b882ddb2c3f8c | janestreet/memtrace_viewer_with_deps | help_text.ml | open Core_kernel
open Import
module View_spec = struct
type t =
{ key : string -> Vdom.Node.t
; plain_text : string -> Vdom.Node.t
}
let plain =
let open Vdom in
{ key = Node.text; plain_text = Node.text }
;;
let with_classes ~key_class ~plain_text_class =
let text_span class_ text =
... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/incr_dom_keyboard/src/help_text.ml | ocaml | open Core_kernel
open Import
module View_spec = struct
type t =
{ key : string -> Vdom.Node.t
; plain_text : string -> Vdom.Node.t
}
let plain =
let open Vdom in
{ key = Node.text; plain_text = Node.text }
;;
let with_classes ~key_class ~plain_text_class =
let text_span class_ text =
... | |
67ff7a69a68c8b57c7520e8cef5d0a651356d6a133d9aedca59b49b297907d5c | naoiwata/sicp | ex4.01.scm | ;;
;; @author naoiwata
SICP Chapter4
Exercise 4.01 .
;;
; ------------------------------------------------------------------------
; solution
; ------------------------------------------------------------------------
(define (no-operands? x) (null? x))
(define first-operand car)
(define rest-operands cdr)
(defi... | null | https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter4/ex4.01.scm | scheme |
@author naoiwata
------------------------------------------------------------------------
solution
------------------------------------------------------------------------
------------------------------------------------------------------------
test
-------------------------------------------------------------... | SICP Chapter4
Exercise 4.01 .
(define (no-operands? x) (null? x))
(define first-operand car)
(define rest-operands cdr)
(define (list-of-values exps env)
(if (no-operands? exps)
'()
(cons (eval (first-operand exps) env)
(list-of-values (rest-operands exps) env))))
(define (list-of-val... |
f7fe2f2a5dd09b268b7476e5e246e53b42956486fb1c76128d5847d6b44bf0c4 | easyuc/EasyUC | ecReduction.mli | (* -------------------------------------------------------------------- *)
open EcIdent
open EcPath
open EcTypes
open EcFol
open EcModules
open EcEnv
(* -------------------------------------------------------------------- *)
exception IncompatibleType of env * (ty * ty)
exception IncompatibleForm of env * (form * form... | null | https://raw.githubusercontent.com/easyuc/EasyUC/67a983a7263ee8234452b9c157c4cb4f3d5f7b26/uc-dsl/ucdsl-proj/src/ECsrc/ecReduction.mli | ocaml | --------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
-----------------------------------... | open EcIdent
open EcPath
open EcTypes
open EcFol
open EcModules
open EcEnv
exception IncompatibleType of env * (ty * ty)
exception IncompatibleForm of env * (form * form)
exception IncompatibleExpr of env * (expr * expr)
type 'a eqtest = env -> 'a -> 'a -> bool
type 'a eqntest = env -> ?norm:bool -> 'a -> 'a -> bool... |
4347cb554f5dcd9f2b1dc98e9e63546f4f4dd671001d9d067f044d3d5c1aa810 | oakes/play-cljc | example_data.cljc | (ns play-cljc.gl.example-data)
(def texture-vertex-shader
{:inputs
'{a_position vec4
a_texcoord vec2}
:uniforms
'{u_matrix mat4}
:outputs
'{v_texcoord vec2}
:signatures
'{main ([] void)}
:functions
'{main ([]
(= gl_Position (* u_matrix a_position))
(= v_texcoord ... | null | https://raw.githubusercontent.com/oakes/play-cljc/ccf9571c1dbc96c044e1d03057cb3b1533100ace/dev-resources/play_cljc/gl/example_data.cljc | clojure | left column
top rung
middle rung
left column front
top rung front
middle rung front
left column back
top rung back
middle rung back
top
top rung right
under top rung
between top rung and middle
top of middle rung
right of middle rung
bottom of middle rung.
right of bottom
bottom
left side
left colum... | (ns play-cljc.gl.example-data)
(def texture-vertex-shader
{:inputs
'{a_position vec4
a_texcoord vec2}
:uniforms
'{u_matrix mat4}
:outputs
'{v_texcoord vec2}
:signatures
'{main ([] void)}
:functions
'{main ([]
(= gl_Position (* u_matrix a_position))
(= v_texcoord ... |
8d48e94abad39e3d87801c4a663ad538ba14d0fe429fd22b1d8f2d42e3915eb3 | clojure/clojurescript | reader.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the t... | null | https://raw.githubusercontent.com/clojure/clojurescript/5379f722588370f9f1934e9a78e777e24e953c81/src/main/cljs/cljs/reader.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns cljs.reader
(:require [cljs.env :as env]))
(defmacro add-data-readers [default-readers]
(let [data-readers
(->> (get @env/*compiler* :cljs.analyzer/data-readers)
(map (fn [[k v]]
`['~k (fn ... |
e39624dc6f835f682192770accf30801a7f072f3c1729952985c92194ae5d5d1 | LexiFi/gen_js_api | test.ml | open Node
let check_node_version version =
let major_version = function
| Some s when String.length s > 0 && s.[0] = 'v' ->
begin match
String.sub s 1 (String.length s - 1)
|> String.split_on_char '.'
with
| [] -> None
| hd :: _ -> int_of_string_opt hd
... | null | https://raw.githubusercontent.com/LexiFi/gen_js_api/9587818121be11593ed389bc87b85547b6ea402c/node-test/test1/test.ml | ocaml | * Buffer *
* Process *
** Index signature *
** Function signature *
** Newable function
* Arrays *
* Invoking a global object *
* *
* Using recursive modules * | open Node
let check_node_version version =
let major_version = function
| Some s when String.length s > 0 && s.[0] = 'v' ->
begin match
String.sub s 1 (String.length s - 1)
|> String.split_on_char '.'
with
| [] -> None
| hd :: _ -> int_of_string_opt hd
... |
b8133854c521cf3b73ba5408bce0188361b28878897853722e1ee03964a0cf3d | liqula/react-hs | Ajax.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE MagicHash #
# LANGUA... | null | https://raw.githubusercontent.com/liqula/react-hs/204c96ee3514b5ddec65378d37872266b05e8954/react-hs/src/React/Flux/Ajax.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE EmptyDataDecls #
# LANGUAGE OverloadedStrings #
| Make calls to the backend from within your stores. This module is low-level
in that it mostly directly exposes the XMLHttpRequest access. If you are using
servant, <-flux-servant react-flux-servant>
for a higher-level interface... | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE MagicHash #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE S... |
38b129fc3d23b18c1f90c4a638f308e484ae70fb0711a9dc48fb9550fa681740 | objmagic/LR | hset.mli | (* A value [(a, b) ordering] records the ordering between a value [l]
of type [a t] and a value [r] of type [b t] for some type context
[_ t].
If [l] and [r] are equal then [a] must also be equal to [b];
otherwise, there are no constraints on the types. *)
module type SetOrderedType =
sig
type 'a t
val... | null | https://raw.githubusercontent.com/objmagic/LR/4bfc2ea57a4092f75c627ad6b58067e9822a43f0/hset.mli | ocaml | A value [(a, b) ordering] records the ordering between a value [l]
of type [a t] and a value [r] of type [b t] for some type context
[_ t].
If [l] and [r] are equal then [a] must also be equal to [b];
otherwise, there are no constraints on the types. |
module type SetOrderedType =
sig
type 'a t
val compare : 'a t -> 'b t -> ('a, 'b) Ordering.ordering
end
module type S =
sig
type _ elem
type t
type iter = {iter:'a. 'a elem -> unit}
type 'b fold = {fold:'a. 'a elem -> 'b -> 'b}
val empty : t
val is_empty : t -> bool
val compare : t -... |
92f1ab7372c70d29fbbb50b0169a6519187d719fc5a3178c11c799d93bef7b94 | Clozure/ccl | remote.lisp | ;;; -*- Log: code.log; Package: wire -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
#+NIL
(ext:file-comment
"$Header$")
;;;
;;; **********... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/cocoa-ide/hemlock/unused/archive/wire/remote.lisp | lisp | -*- Log: code.log; Package: wire -*-
**********************************************************************
**********************************************************************
This file implements a simple remote procedure call mechanism on top
of wire.lisp.
MAYBE-NUKE-REMOTE-WAIT -- internal
If the re... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
#+NIL
(ext:file-comment
"$Header$")
Written by .
(defpackage :hemlock.wire
(:use :common-lisp))
(in-package :hemlock.wire)
(defstruct remote-wait
value1 value2 value3 ... |
d52fbd2b0e802549dd56f2834f6a6736869278df7553ead4b011b7d3911c8c0e | SamuelSchlesinger/commander-cli | stop-postgres.hs | import Commander
import System.Process
main :: IO ()
main = command_ . toplevel @"stop-postgres" $ raw do
callCommand "pg_ctl -D /usr/local/var/postgres stop && brew services stop postgresql"
| null | https://raw.githubusercontent.com/SamuelSchlesinger/commander-cli/8df5317db8d3e1a4d6ae49bab4f2e63710db81b7/examples/stop-postgres.hs | haskell | import Commander
import System.Process
main :: IO ()
main = command_ . toplevel @"stop-postgres" $ raw do
callCommand "pg_ctl -D /usr/local/var/postgres stop && brew services stop postgresql"
| |
497389ae504d5fdf60a9230025399a12723a10be08c8c0be1baa4b7c89b2ee55 | jeffshrager/biobike | lexer.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*-
$ Header : /cvsroot - fuse / biolingua / BioLisp / ppcre / cl - ppcre-1.2.3 / lexer.lisp , v 1.1 2005/02/03 06:09:46 roton Exp $
;;; The lexer's responsibility is to convert the regex string into a
;;; sequence of tokens which are in t... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/ppcre/cl-ppcre-1.2.3/lexer.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*-
The lexer's responsibility is to convert the regex string into a
sequence of tokens which are in turn consumed by the parser.
(with a little help from the parser) how many register groups it
has opened so far. (The latter is necessary for interpreting
... | $ Header : /cvsroot - fuse / biolingua / BioLisp / ppcre / cl - ppcre-1.2.3 / lexer.lisp , v 1.1 2005/02/03 06:09:46 roton Exp $
The lexer is aware of 's ' extended mode ' and it also ' knows '
strings like " \\10 " correctly . )
Copyright ( c ) 2002 - 2004 , Dr. . All rights reserved .
DIRECT , INDI... |
46b4755d08340c49383309fa8843afeccfff5a69c4c3e6e8fcd037ccbe195121 | ygmpkk/house | Either.hs | {-# OPTIONS -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Either
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : experi... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/base/Data/Either.hs | haskell | # OPTIONS -fno-implicit-prelude #
---------------------------------------------------------------------------
|
Module : Data.Either
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
The Either type, and associated operatio... | Copyright : ( c ) The University of Glasgow 2001
module Data.Either (
Either(..),
) where
#ifdef __GLASGOW_HASKELL__
import GHC.Base
#endif
#ifndef __HUGS__
|
The ' Either ' type represents values with two possibilities : a value of
type @'Either ' a b@ is either @'Left ' a@ or ' b@.
The ' Either... |
e28c12266235bab4b666b87ab33b1cbc2a7b6a00e6119c1ceb0cc064dd8b430b | grin-compiler/ghc-wpc-sample-programs | Reflection.hs | |
Module : . Reflection
Description : Code related to 's reflection system . This module contains quoters and unquoters along with some supporting datatypes .
License : : The Idris Community .
Module : Idris.Reflection
Description : Code related to Idris's reflection system. This module ... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/src/Idris/Reflection.hs | haskell | | Reify tactics from their reflected representation
shouldn't happen
| Reify terms from their reflected representation
| Reify raw terms from their reflected representation
FIXME: Uniqueness!
| Create a reflected call to a named function/constructor
| Convert a reflected term to a more suitable form for pattern-... | |
Module : . Reflection
Description : Code related to 's reflection system . This module contains quoters and unquoters along with some supporting datatypes .
License : : The Idris Community .
Module : Idris.Reflection
Description : Code related to Idris's reflection system. This module ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.