_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 |
|---|---|---|---|---|---|---|---|---|
f2ea0f8555a7c5acf060954bb33c2417ed5c441d436cad4900a0ab0f86e0aa7e | webnf/webnf | styles.clj | (ns webnf.mui.styles)
(defmacro defstyle [vname style]
`(def ~vname (with-meta ~style
{:class-name ~(name vname)})))
| null | https://raw.githubusercontent.com/webnf/webnf/6a2ccaa755e6e40528eb13a5c36bae16ba4947e7/cljs/src/webnf/mui/styles.clj | clojure | (ns webnf.mui.styles)
(defmacro defstyle [vname style]
`(def ~vname (with-meta ~style
{:class-name ~(name vname)})))
| |
b1f2804a3fa4c24c438003cfc298e3eec43c90798f3d1b876df237cb78fc3c32 | metaocaml/ber-metaocaml | pr7618.ml | (* TEST
* expect
*)
type _ t = I : int t;;
let f (type a) (x : a t) (y : int) =
match x, y with
| I, (_:a) -> ()
;;
[%%expect{|
type _ t = I : int t
val f : 'a t -> int -> unit = <fun>
|}]
type ('a, 'b) eq = Refl : ('a, 'a) eq;;
let ok (type a b) (x : (a, b) eq) =
match x, [] with
| Refl, [(_ : a) | (_ : b... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-gadts/pr7618.ml | ocaml | TEST
* expect
branches must be unified! |
type _ t = I : int t;;
let f (type a) (x : a t) (y : int) =
match x, y with
| I, (_:a) -> ()
;;
[%%expect{|
type _ t = I : int t
val f : 'a t -> int -> unit = <fun>
|}]
type ('a, 'b) eq = Refl : ('a, 'a) eq;;
let ok (type a b) (x : (a, b) eq) =
match x, [] with
| Refl, [(_ : a) | (_ : b)] -> []
;;
[%%expect{|... |
36c110cd7c1416abb742bc93fb8b1c3e6b018e5118c0388d076ed9abf9d9f07d | mzp/coq-ide-for-ios | bstack.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/lib/bstack.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
- size is the count of elements ac... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : bstack.ml 13323 201... |
750bd93f509acab49f27892c5e2299865573f0bdcc3e1c260aabca06da3a1169 | e-bigmoon/haskell-blog | Example10.hs | #!/usr/bin/env stack
{- stack repl --resolver lts-15.4
--package blaze-html
--package text
--package wai
--package warp
--package yesod-core
-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
import Data.Text (Text)
import Network.Wai ... | null | https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/ch20/Example10.hs | haskell | stack repl --resolver lts-15.4
--package blaze-html
--package text
--package wai
--package warp
--package yesod-core
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
| Our foundation datatype.
just one accepted URL
empty path info, means "/"
empty query string | #!/usr/bin/env stack
import Data.Text (Text)
import Network.Wai (pathInfo)
import Network.Wai.Handler.Warp (run)
import qualified Text.Blaze.Html5 as H
import Yesod.Core (HandlerT, Html, RenderRoute (..),
... |
cbdb96b7c0832e28e89863d8949b7bec0d7571ff1ea3b6bc23457c696d21d681 | spurious/sagittarius-scheme-mirror | writer.scm | (import (rnrs)
(text yaml writer)
(text yaml parser)
(text yaml builder)
(srfi :64))
(test-begin "YAML writer")
(define (test-writer sexp)
(let-values (((out extract) (open-string-output-port)))
(test-assert (list "test-writer" sexp) (emit-yaml out sexp))
(let* ((written (extract))
(yaml (car (parse... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/text/yaml/writer.scm | scheme | (import (rnrs)
(text yaml writer)
(text yaml parser)
(text yaml builder)
(srfi :64))
(test-begin "YAML writer")
(define (test-writer sexp)
(let-values (((out extract) (open-string-output-port)))
(test-assert (list "test-writer" sexp) (emit-yaml out sexp))
(let* ((written (extract))
(yaml (car (parse... | |
ec5d34dd613b4b3c6893b09ed8fff297a336ac371dc5b26d60d70113441151a3 | zotonic/zotonic | z_mqtt.erl | @author < >
2013 - 2018
%% @doc Interface to MQTT pubsub functionality
Copyright 2013 - 2018
%%
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
%%
%% Unle... | null | https://raw.githubusercontent.com/zotonic/zotonic/f69f88568b9e6abc231acc335e1db0a258ccdd03/apps/zotonic_core/src/support/z_mqtt.erl | erlang | @doc Interface to MQTT pubsub functionality
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the Lic... | @author < >
2013 - 2018
Copyright 2013 - 2018
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(z_mqtt).
-export([
publish/3,
publish/4,
publish/2,
subscribe/2,
subscribe/3,
su... |
0c9b8ddaf6ae05a2b3d9bbed2f9d5b5ce8210c8042e44096d20ee3b9c3892a62 | 8c6794b6/haskell-sc-scratch | Lepton.hs | ------------------------------------------------------------------------------
-- |
-- Module : $Header$
Copyright : 8c6794b6 < >
-- License : BSD3
Maintainer : 8c6794b6
-- Stability : experimental
-- Portability : non-portable
--
-- Client side utility collection for scsynth.
--
module Sound.SC3.L... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/hsc3-lepton/src/lib/Sound/SC3/Lepton.hs | haskell | ----------------------------------------------------------------------------
|
Module : $Header$
License : BSD3
Stability : experimental
Portability : non-portable
Client side utility collection for scsynth.
* Overview
$overview | Copyright : 8c6794b6 < >
Maintainer : 8c6794b6
module Sound.SC3.Lepton
module All
) where
import Sound.SC3.Lepton.Instance ()
import Sound.SC3.Lepton.Looper as All
import Sound.SC3.Lepton.Pattern as All
import Sound.SC3.Lepton.UGen as All
import Sound.SC3.Lepton.Util as All
$ overview
package co... |
edf5239e0d601a09c62660ddee059809e5e7464c18c6b38bb482d856dbee7860 | docker-in-aws/docker-in-aws | form_secrets.cljs | (ns swarmpit.component.service.form-secrets
(:require [material.component :as comp]
[material.component.form :as form]
[material.component.list-table-form :as list]
[swarmpit.component.state :as state]
[swarmpit.routes :as routes]
[swarmpit.ajax :as ajax]
... | null | https://raw.githubusercontent.com/docker-in-aws/docker-in-aws/bfc7e82ac82ea158bfb03445da6aec167b1a14a3/ch16/swarmpit/src/cljs/swarmpit/component/service/form_secrets.cljs | clojure | (ns swarmpit.component.service.form-secrets
(:require [material.component :as comp]
[material.component.form :as form]
[material.component.list-table-form :as list]
[swarmpit.component.state :as state]
[swarmpit.routes :as routes]
[swarmpit.ajax :as ajax]
... | |
d7feb6324e9e88fa68c09badf6a68e24fd4d2aeb04be067bf81376943899dcd5 | binaryage/chromex | input_method_private.cljs | (ns chromex.app.input-method-private (:require-macros [chromex.app.input-method-private :refer [gen-wrap]])
(:require [chromex.core]))
-- functions --------------------------------------------------------------------------------------------------------------
(defn get-input-method-config* [config]
(gen-wrap :... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps_private/chromex/app/input_method_private.cljs | clojure | -- events ----------------------------------------------------------------------------------------------------------------- | (ns chromex.app.input-method-private (:require-macros [chromex.app.input-method-private :refer [gen-wrap]])
(:require [chromex.core]))
-- functions --------------------------------------------------------------------------------------------------------------
(defn get-input-method-config* [config]
(gen-wrap :... |
dc3e1e038e565cbb07d306bef4c5978d8eb5b004aa043bf622299224f107b07d | pfdietz/ansi-test | define-method-combination-long-form.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Jul 13 08:26:41 2003
;;;; Contains: Tests of DEFINE-METHOD-COMBINATION (long form)
(eval-when (:load-toplevel :compile-toplevel :execute)
(report-and-ignore-errors
(defparameter *dmc-long-01*
(define-method-combination mc-long-01 nil nil)))
(repor... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/objects/define-method-combination-long-form.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of DEFINE-METHOD-COMBINATION (long form)
The list of method groups specifiers for this method combination
is empty, so no methods are valid.
A single method group with the * method group specifier
Same, but with :order parameter.
Also, :description with a format string
Same... | Author :
Created : Sun Jul 13 08:26:41 2003
(eval-when (:load-toplevel :compile-toplevel :execute)
(report-and-ignore-errors
(defparameter *dmc-long-01*
(define-method-combination mc-long-01 nil nil)))
(report-and-ignore-errors
(defgeneric dmc-long-gf-01 (x y) (:method-combination mc-long-0... |
02971c37443b517ce588a9f8aa3ec4bc6f5153742e6f5456abff30f09832e5e6 | gigamonkey/monkeylib-prose-diff | packages.lisp | ;;
Copyright ( c ) 2010 , . All rights reserved .
;;
(in-package :cl-user)
(defpackage :com.gigamonkeys.prose-diff
(:use :common-lisp
:cl-ppcre
:com.gigamonkeys.pathnames
:com.gigamonkeys.utilities
:com.gigamonkeys.markup
:com.gigamonkeys.markup.html)
(:import-from :ale... | null | https://raw.githubusercontent.com/gigamonkey/monkeylib-prose-diff/9e393807671ef54b1c9b47f570a93267ac85b62a/packages.lisp | lisp | Copyright ( c ) 2010 , . All rights reserved .
(in-package :cl-user)
(defpackage :com.gigamonkeys.prose-diff
(:use :common-lisp
:cl-ppcre
:com.gigamonkeys.pathnames
:com.gigamonkeys.utilities
:com.gigamonkeys.markup
:com.gigamonkeys.markup.html)
(:import-from :alexandri... | |
44ee68eb88971abe055acafc243b0193ecc5200548577573ef19a7d50bb20b5b | squirrel-prover/squirrel-prover | term.mli | (** Terms and formulas for the meta-logic.
This module describes the syntax of the logic. It does not
provide low-level representations, normal forms, etc. that
are to be used in automated reasoning, nor does it provide
representations necessary for the front-end involving
processes, axioms, etc. *... | null | https://raw.githubusercontent.com/squirrel-prover/squirrel-prover/c86fe5a24fbfa4db34adc01c11d8d7718a8bf870/src/term.mli | ocaml | * Terms and formulas for the meta-logic.
This module describes the syntax of the logic. It does not
provide low-level representations, normal forms, etc. that
are to be used in automated reasoning, nor does it provide
representations necessary for the front-end involving
processes, axioms, etc.
--... |
open Utils
type 'a isymb = private {
s_symb : 'a;
s_indices : Vars.var list;
s_typ : Type.ty;
}
val mk_isymb : 'a -> Type.ty -> Vars.vars -> 'a isymb
type name = Symbols.name
type nsymb = name isymb
type fname = Symbols.fname
type fsymb = fname * Vars.var list
type mname = Symbols.macro
type m... |
4ad544661a0ccfcad59c21e1bed689372109901f257dd0dde04cbd3479eaa1e2 | norvig/paip-lisp | student.lisp | ;;;; -*- Mode: Lisp; Syntax: Common-Lisp -*-
Code from Paradigms of AI Programming
Copyright ( c ) 1991
student.lisp : Chapter 7 's STUDENT program to solve algebra word problems .
(requires "patmatch")
(defstruct (rule (:type list)) pattern response)
(defstruct (exp (:type list)
(:construct... | null | https://raw.githubusercontent.com/norvig/paip-lisp/9d3b83bdae923299aac3132dc4d8540fd57e347f/lisp/student.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp -*-
the others. If that doesn't work, return what is known.
This assumes there is exactly one x in e,
and that e is an equation.
Case I: X = A -> X = n
Case II: A = f(X) -> f(X) = A
Case III: f(X)*A = B -> f(X) = B/A
Case IV: A*f(X) = B -> f(X) = B/A
Case V: A/f(X) = B -> f(... | Code from Paradigms of AI Programming
Copyright ( c ) 1991
student.lisp : Chapter 7 's STUDENT program to solve algebra word problems .
(requires "patmatch")
(defstruct (rule (:type list)) pattern response)
(defstruct (exp (:type list)
(:constructor mkexp (lhs op rhs)))
op lhs rhs)
(defun... |
d49524e7f4a36a2a0ebe78aa7c9df8d1be6ad18bbe343e84f0da722ed3e8ff59 | iand675/hs-opentelemetry | Cloud.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
|
Module : OpenTelemetry . Resource . Cloud
Copyright : ( c ) , 2021
License : ... | null | https://raw.githubusercontent.com/iand675/hs-opentelemetry/b08550db292ca0d8b9ce9156988e6d08dd6a2e61/api/src/OpenTelemetry/Resource/Cloud.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
^ Name of the cloud provider.
Examples: @alibaba_cloud@
cloud.provider MUST be one of the following or, if none of the listed values apply, a custom value:
+----... | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
|
Module : OpenTelemetry . Resource . Cloud
Copyright : ( c ) , 2021
License : BSD-3
Description : Cloud resource detection
Maintainer :
Stability : experimental
Portability : non - portable ( GHC extensions ... |
bde25492319a198abe1814e30f5c3994b2d0b397e16d673d0c4cac5013092b8e | lesguillemets/sicp-haskell | 2.39.hs | module TwoThirtynine where
rev :: [a] -> [a]
rev = foldr (\x acc -> acc ++ [x]) []
-- |
rev [ 1 .. 10 ]
-- [10,9,8,7,6,5,4,3,2,1]
rev' :: [a] -> [a]
rev' = foldl (flip (:)) []
-- |
rev ' [ 1 .. 10 ]
-- [10,9,8,7,6,5,4,3,2,1]
| null | https://raw.githubusercontent.com/lesguillemets/sicp-haskell/df524a1e28c45fb16a56f539cad8babc881d0431/exercise/chap02/sect2/2.39.hs | haskell | |
[10,9,8,7,6,5,4,3,2,1]
|
[10,9,8,7,6,5,4,3,2,1] | module TwoThirtynine where
rev :: [a] -> [a]
rev = foldr (\x acc -> acc ++ [x]) []
rev [ 1 .. 10 ]
rev' :: [a] -> [a]
rev' = foldl (flip (:)) []
rev ' [ 1 .. 10 ]
|
6d3f564d8884af7eafc075d87727acd6522cc8885bedc906e0daf8deba5dabb2 | xnning/MpEff | Eff.hs | # LANGUAGE TypeOperators , -- h :* e ( looks nice but not required )
ConstraintKinds , -- type ( h ? : e ) = In h e ( looks nice but not required )
FlexibleInstances , -- instance Sub ( ) e ( non type variable in head ) ... | null | https://raw.githubusercontent.com/xnning/MpEff/e8660a6ee8fd0ebf78f6011a6fb4fea092eee0b2/src/Control/Mp/Eff.hs | haskell | h :* e ( looks nice but not required )
type ( h ? : e ) = In h e ( looks nice but not required )
instance Sub ( ) e ( non type variable in head )
( State Int ? : e ) = > ... ( non type variable argument )
type family HEqual h h ' : : , -- InEq ( HEqual h h ' ) h ... | ScopedTypeVariables ,
GADTs ,
MultiParamTypeClasses ,
Rank2Types
#
ScopedTypeVariables,
GADTs,
MultiParamTypeClasses,
Rank2Types
#-}
|
Description : Efficient effect handlers based on Evidence Pass... |
2d987a3c1bc9d46b8254e1d67c64e1137856daacaa10b9eedfeb049118b17a12 | cartazio/tlaps | coalesce.ml |
* Copyright ( C ) 2013 INRIA and Microsoft Corporation
* Copyright (C) 2013 INRIA and Microsoft Corporation
*)
Revision.f "$Rev: 34538 $";;
open Ext
open Format
open Tla_parser
open Property
open Expr.T
open Expr.Subst
let dot = Ctx.dot
to fix it to use Ix instead of variable names
let crypthash scx c... | null | https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/frontend/coalesce.ml | ocaml | Coalescing of modal operators follows the paper. A main difference is that we
* do not compute a set of bound rigid variables since all variables are
* considered bound in TLA
modal expressions
user defined operators |
* Copyright ( C ) 2013 INRIA and Microsoft Corporation
* Copyright (C) 2013 INRIA and Microsoft Corporation
*)
Revision.f "$Rev: 34538 $";;
open Ext
open Format
open Tla_parser
open Property
open Expr.T
open Expr.Subst
let dot = Ctx.dot
to fix it to use Ix instead of variable names
let crypthash scx c... |
eecd2b7dba8ff851ee7544bcfc614c35ddcdf909b99d02eebc35b7376c8715f0 | luminus-framework/examples | home.clj | ;---
Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
; courses, books, articles, and the like. Contact us if you are in doubt.
; We make no guarantees that this code is fit fo... | null | https://raw.githubusercontent.com/luminus-framework/examples/cbeee2fef8f457a6a6bac2cae0b640370ae2499b/swagger-service/src/clj/swagger_service/routes/home.clj | clojure | ---
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
--- | Excerpted from " Web Development with Clojure , Second Edition " ,
published by The Pragmatic Bookshelf .
Copyrights apply to this code . It may not be used to create training material ,
(ns swagger-service.routes.home
(:require [swagger-service.layout :as layout]
[compojure.core :refer [defroutes G... |
2d7358c591c002e757a7f74de8864e7f09f7ee9c6e889d5ac77c47ee829ac537 | andrevdm/SimpleHaskellStackVM | VirtualMachine.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
module VirtualMachine (Operation(..), Cpu(..), assembleByteCode, interpretByteCode) where
import Protolude
import qualified Data.Sequence as S
import Data . Sequence((<| ) , ( | > ) , ( > < ) , ViewL ( .. ) , ViewR ( .. ) )
im... | null | https://raw.githubusercontent.com/andrevdm/SimpleHaskellStackVM/a732ac90d5c8e3ddf0c5c101fb2f97af5ccdfca0/src/VirtualMachine.hs | haskell | # LANGUAGE OverloadedStrings #
| The op codes
No operation
Break for debugger - not implemented
Stop CPU execution
Push a value onto the stack
Pop the most recent value from the stack
Pop n values before the most recent value from the stack
Increment the top item on the stack
Duplicate the most recent item on ... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ViewPatterns #
module VirtualMachine (Operation(..), Cpu(..), assembleByteCode, interpretByteCode) where
import Protolude
import qualified Data.Sequence as S
import Data . Sequence((<| ) , ( | > ) , ( > < ) , ViewL ( .. ) , ViewR ( .. ) )
import qualified Data.Map as Map
impo... |
1ff710ff6c1a33873a94b64d063d99cd77dc185379318a672f0b51688ee70acd | gdevanla/write-you-a-python-lexer | Tokens.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE MultiWayIf#-}
module Example2.Tokens where
import RIO
import qualified Data.Text as T
import Codec.Binary.UTF8.String as UTF8 (encode)
import qualified Data.List as L
data TokenInfo = TokenInfo {
token_typ... | null | https://raw.githubusercontent.com/gdevanla/write-you-a-python-lexer/b07bd85df1f29e4505d4f52e975ae0d9dc8a3605/src/Example2/Tokens.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE MultiWayIf#
- Used for testing and
Used for testing | # LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
module Example2.Tokens where
import RIO
import qualified Data.Text as T
import Codec.Binary.UTF8.String as UTF8 (encode)
import qualified Data.List as L
data TokenInfo = TokenInfo {
token_type:: Token
, token_string:: T.Text
, start_pos:: (Int, Int)... |
698371cf623dcc3b34408fada5f8fa2fe45267a489c10d53e939539d01c9a778 | green-labs/ppx_ts | utils.ml | open Ppxlib
open Parsetree
open Ast_helper
let attribute_name = "ppx_ts"
type attribute_kind =
| KeyOf of string * payload
| SetType of string * payload
| ToGeneric of string * payload
| Partial of string * payload
| Pick of string * payload
| Omit of string * payload
| ToArray of string * payload
type... | null | https://raw.githubusercontent.com/green-labs/ppx_ts/ae2bb49923c33f6622af146b0cdec3a4f4ec0732/src/utils.ml | ocaml | make attribute name to suffix string
type identifier in extension payload
%ppx_ts.setType(t, string)
get type declaration by label inside module or top-level pstr
get type declaration by label inside module or top-level
make constructor declaration with label
make label_declaration with new type construct... | open Ppxlib
open Parsetree
open Ast_helper
let attribute_name = "ppx_ts"
type attribute_kind =
| KeyOf of string * payload
| SetType of string * payload
| ToGeneric of string * payload
| Partial of string * payload
| Pick of string * payload
| Omit of string * payload
| ToArray of string * payload
type... |
e86de600a954d35e58b356936cf69cee971235201f011480e5deeacc9ceae76d | haas/harmtrace | Main.hs |
--------------------------------------------------------------------------------
-- |
Module : HarmTrace . Models . Jazz . Main
Copyright : ( c ) 2010 - 2012 Universiteit Utrecht , 2012 University of Oxford
-- License : GPL3
--
Maintainer : ,
-- Stability : experimental
-- Portability ... | null | https://raw.githubusercontent.com/haas/harmtrace/e250855a3bb6e5b28fe538c728f707cf82ca9fd3/src/HarmTrace/Models/Jazz/Main.hs | haskell | ------------------------------------------------------------------------------
|
License : GPL3
Stability : experimental
Portability : non-portable
Summary: The jazz parser
------------------------------------------------------------------------------
Music stuff
---------------------------------------... |
Module : HarmTrace . Models . Jazz . Main
Copyright : ( c ) 2010 - 2012 Universiteit Utrecht , 2012 University of Oxford
Maintainer : ,
module HarmTrace.Models.Jazz.Main (
pJazz
, module HarmTrace.Models.Jazz.Model
) where
Parser stuff
import Text.ParserCombinators.UU
import Har... |
ab1b2811ce51ed79e5bd07de0af0333bd3bbacc033200637922471a2f7532ac5 | namin/biohacker | fqrule.lisp | ; -*- Mode: Lisp; -*-
;;;; N-Queens rules, FTRE version
Modified : forbus on Tue Apr 2 10:24:59 1996
Copyright ( c ) 1992 - 1996 , Northwestern University ,
Johan de Kleer and Xerox Corporation .
;;; All rights reserved.
;;; See the file legal.txt for a paragraph stating scope of permission
;;; and disclai... | null | https://raw.githubusercontent.com/namin/biohacker/6b5da4c51c9caa6b5e1a68b046af171708d1af64/BPS/ftre/fqrule.lisp | lisp | -*- Mode: Lisp; -*-
N-Queens rules, FTRE version
All rights reserved.
See the file legal.txt for a paragraph stating scope of permission
and disclaimer of warranty. The above copyright notice and that
paragraph must be included in any separate copy of this file. |
Modified : forbus on Tue Apr 2 10:24:59 1996
Copyright ( c ) 1992 - 1996 , Northwestern University ,
Johan de Kleer and Xerox Corporation .
(in-package :COMMON-LISP-USER)
(rule ((queen ?column1 ?row1)
(queen ?column2 ?row2)
:TEST (not (or (= ?column1 ?column2)
(queens-okay? ?column1... |
730a9789243644b2fc3c5e50436bba6dad9bebaf22d8efba2619288577161ebb | paurkedal/ocaml-caqti | caqti_connection_sig.mli | Copyright ( C ) 2017 - -2023 Petter A. Urkedal < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any la... | null | https://raw.githubusercontent.com/paurkedal/ocaml-caqti/d7126bc20ec0777251b31ba9c09b57eae4aeca8f/caqti/lib/caqti_connection_sig.mli | ocaml | * This type is only to be extended by drivers.
* Essential connection signature implemented by drivers.
* {2 Query}
* Starts a transaction if supported by the underlying database, otherwise
does nothing.
* Commits the current transaction if supported by the underlying database,
otherwise does nothing.
... | Copyright ( C ) 2017 - -2023 Petter A. Urkedal < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any la... |
491ac4c7f5704997b1d50259c3a79c033ca930874c66f420a67a6090014dbc17 | eponai/sulolive | cart.cljc | (ns eponai.client.cart
(:require
[eponai.common.database :as db]
[eponai.client.local-storage :as local-storage]
[eponai.common.shared :as shared]
[taoensso.timbre :refer [debug]]))
(defn find-user-cart
"Returns a tuple of [user-id cart], where cart is the :db/id of :user/cart ?cart."
[db user-id... | null | https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/client/cart.cljc | clojure | (ns eponai.client.cart
(:require
[eponai.common.database :as db]
[eponai.client.local-storage :as local-storage]
[eponai.common.shared :as shared]
[taoensso.timbre :refer [debug]]))
(defn find-user-cart
"Returns a tuple of [user-id cart], where cart is the :db/id of :user/cart ?cart."
[db user-id... | |
a9566a6aec9d73b2df914fa1873a04b592c7847ce83e56480fd29ae00b42a929 | kenichi-asai/Universe | custom.ml | * language tag : " en " for English , " ja " for Japanese
let lang = ref "en"
module Generator (G : Odoc_html.Html_generator) =
struct
class html =
object(self)
inherit G.html
(** copied from argot: *)
method private string_of_text text =
let buff = Buffer.create 256 in
self#h... | null | https://raw.githubusercontent.com/kenichi-asai/Universe/a49014224a5d5c412015c81daf380c2ebf203d7a/library/ocamldoc/custom.ml | ocaml | * copied from argot:
* Return HTML code for the given text of a lang tag.
your code here
* register only !lang. Other tags are ignored | * language tag : " en " for English , " ja " for Japanese
let lang = ref "en"
module Generator (G : Odoc_html.Html_generator) =
struct
class html =
object(self)
inherit G.html
method private string_of_text text =
let buff = Buffer.create 256 in
self#html_of_text buff text;
Bu... |
2695fddaec4e3b77fc30eb678894c19091ea02cc20d17b044973accfbe28b93f | serokell/importify | Stack.hs | {-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
| Utilities which allows to use @stack@ tools for different
-- dependencies stuff.
module Importify.Stack
( QueryPackage (..)
, LocalPackages (..)
, Re... | null | https://raw.githubusercontent.com/serokell/importify/09f31d851b2152ae6ce880b81abc3554ade29f37/src/Importify/Stack.hs | haskell | # LANGUAGE ExplicitForAll #
# LANGUAGE OverloadedStrings #
dependencies stuff.
@
~/.stack/programs/x86_64-linux/ghc-8.0.2/lib/ghc-8.0.2/include
@
w/o bin
≡ ghc-8.0.2
ghcInclude ≡ /home/user/.stack/programs/x86_64-linux/ghc-8.0.2/lib/ghc-8.0.2/include
| Acquires project using @stack path --project-root... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
| Utilities which allows to use @stack@ tools for different
module Importify.Stack
( QueryPackage (..)
, LocalPackages (..)
, RemotePackages (..)
, ghcIncludePath
, pkgName
, stackListDependencies
... |
1dddc8ea585efbf45cf6d87d40e39f42561e05f96a7628706aadf4d7e2a63b07 | oetr/racket-opencv | 01-smoothing-images.rkt | #! /usr/bin/env racket
Author :
Date : 2012
;; Description:
;; converted from an example in opencv documentation:
;;
;; this example loads an image
Applies 4 different kinds of filters and shows the filtered images sequentially
#lang racket
;;; Includes
(require opencv/core
opencv/types
open... | null | https://raw.githubusercontent.com/oetr/racket-opencv/8124eb6b620769137656547e83f9d9587ab37c23/tutorials/03_imgproc/01-smoothing-images.rkt | racket | Description:
converted from an example in opencv documentation:
this example loads an image
Includes
Get path to the image from the command line arguments
Global Variables
Applying Homogeneous blur
Applying Gaussian blur
Applying Median blur
Applying Bilateral blur
Wait until user press a key | #! /usr/bin/env racket
Author :
Date : 2012
Applies 4 different kinds of filters and shows the filtered images sequentially
#lang racket
(require opencv/core
opencv/types
opencv/highgui
opencv/imgproc
ffi/unsafe
ffi/unsafe/define)
(define arguments (current-comman... |
d644ecb392f82ae3de23de65abb79b17f1520eeb44f6b76e7d9d1b40d583de33 | drcode/webfui | dom.cljs | (ns webfui.dom
(:use [webfui.core :only [core-add-dom-watch core-defdom]]
[webfui.plugin.core :only [register-plugin]]
[webfui.plugin.form-values :only [form-values]]))
(def add-dom-watch core-add-dom-watch)
(def defdom core-defdom)
(register-plugin (form-values.))
| null | https://raw.githubusercontent.com/drcode/webfui/e8ba6e9224542755e5780488cb43f0c5510827f9/src/webfui/dom.cljs | clojure | (ns webfui.dom
(:use [webfui.core :only [core-add-dom-watch core-defdom]]
[webfui.plugin.core :only [register-plugin]]
[webfui.plugin.form-values :only [form-values]]))
(def add-dom-watch core-add-dom-watch)
(def defdom core-defdom)
(register-plugin (form-values.))
| |
0ceb96088ceebc2bb77d9c48434f556e64c261c7cc3be8f13f6cbdadf6ad808b | danielcompton/utrecht | hikaricp.clj | (ns irresponsible.utrecht.pool.hikaricp
(:require [irresponsible.utrecht :as u]
[clojure.java.jdbc :as j]
[hikari-cp.core :as h])
(:import [com.zaxxer.hikari HikariDataSource]))
(def default-config
{:auto-commit false :adapter "postgresql"})
(defn hikaricp
"Given a HikariCP configurati... | null | https://raw.githubusercontent.com/danielcompton/utrecht/f476b197028e260990f231213cc081693815a1b3/src/irresponsible/utrecht/pool/hikaricp.clj | clojure | (ns irresponsible.utrecht.pool.hikaricp
(:require [irresponsible.utrecht :as u]
[clojure.java.jdbc :as j]
[hikari-cp.core :as h])
(:import [com.zaxxer.hikari HikariDataSource]))
(def default-config
{:auto-commit false :adapter "postgresql"})
(defn hikaricp
"Given a HikariCP configurati... | |
4887ab038ccbc77ea89204686370539117ccec52f2c78b14aa42bf54c91e36d9 | nibbula/yew | dlib-test.lisp | ;;
dlib-test.lisp - Tests for .
;;
(defpackage :dlib-test
(:documentation "Tests for DLIB.")
(:use :cl :test :dlib)
(:export
#:run
))
(in-package :dlib-test)
;; (test
;; (ensure-no-warning
;; (without-warning (warn "The without warning macro doesn't work!"))))
(deftests (dlib-1 :doc "Test things... | null | https://raw.githubusercontent.com/nibbula/yew/e4172647e7f8df116f12009de6f6b5cf53ba7cf8/lib/dlib-test.lisp | lisp |
(test
(ensure-no-warning
(without-warning (warn "The without warning macro doesn't work!"))))
What about (slot-documentation) ?
(shell-lines)
How can we test these? It seems like we would have to run a sub-image.
(exit-system)
(save-image-and-exit)
Does this really test anything?
(without-notes (signal 'c... | dlib-test.lisp - Tests for .
(defpackage :dlib-test
(:documentation "Tests for DLIB.")
(:use :cl :test :dlib)
(:export
#:run
))
(in-package :dlib-test)
(deftests (dlib-1 :doc "Test things that are external requirements.")
"It's possible, but I've yet to come across a system that has getenv
and doe... |
21c15ade05b4912ac405f03efd73d0dbce5993f50897bb1c04f4ee03c19816dc | Shimuuar/fixed-vector | Storable.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
# LANGUAGE TypeFamilies #
# LANGUAGE Undecid... | null | https://raw.githubusercontent.com/Shimuuar/fixed-vector/70399b4df61f970e870ad220a172183883d59f5c/fixed-vector/Data/Vector/Fixed/Storable.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
|
Storable-based unboxed vectors.
* Immutable
* Raw pointers
* Mutable
* Type classes
-----------------------------------------------------... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Data.Vector.Fixed.Storable (
Vec
, Vec1
, Vec2
, Vec3
, Vec4
, Vec5
, unsafeFromForeignPtr
, unsafeToForeignPtr
, unsafeWith
, MVec(..)
, Storable... |
48b9b09297b2a3d143e5907253c04a6e39888b5d246f7fee69916d3fa5d34ef6 | pyr/himpy | Utils.hs | module System.Himpy.Utils (timestamp, octets) where
import Data.Bits
import Data.Word
import qualified System.Time as T
import qualified System.Time.Utils as TU
timestamp :: IO (Integer)
timestamp = do
t <- T.getClockTime
ct <- T.toCalendarTime t
epoch <- TU.timelocal ct
return epoch
octets :: Word32 -> [Word... | null | https://raw.githubusercontent.com/pyr/himpy/0412592b879b7ebce24c6bbef88373b253140025/System/Himpy/Utils.hs | haskell | module System.Himpy.Utils (timestamp, octets) where
import Data.Bits
import Data.Word
import qualified System.Time as T
import qualified System.Time.Utils as TU
timestamp :: IO (Integer)
timestamp = do
t <- T.getClockTime
ct <- T.toCalendarTime t
epoch <- TU.timelocal ct
return epoch
octets :: Word32 -> [Word... | |
2b7787fb73e1bfca11f8551488fbbd9be502a3067591478fd3fe7d9d473e7e22 | screenshotbot/screenshotbot-oss | merge-request-promoter.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
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 /.
(uiop:define-package :screenshotbot/gitlab/merge-request-promoter
(:use #:cl
... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/e476ad78656692e6229fed751afb1184da4d53da/src/screenshotbot/gitlab/merge-request-promoter.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
TODO: cleanup | 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 /.
(uiop:define-package :screenshotbot/gitlab/merge-request-promoter
(:use #:cl
#:alexandria
#:screenshotbot/promote-api
... |
9b4dca85785fd073131f51c0b486b93c54b74766eb5b1da62c95290ff40e90a6 | ocaml/dune | check_rules.ml | open Import
let dev_files =
let exts = [ Ml_kind.cmt_ext Impl; Ml_kind.cmt_ext Intf; Cm_kind.ext Cmi ] in
let id =
lazy
(let open Dyn in
variant "dev_files" (List.map ~f:string exts))
in
Predicate_with_id.create ~id ~f:(fun p ->
let ext = Filename.extension p in
List.mem exts ext ~e... | null | https://raw.githubusercontent.com/ocaml/dune/f7047a295b067a1551cf41efb8c7c7de2658136e/src/dune_rules/check_rules.ml | ocaml | open Import
let dev_files =
let exts = [ Ml_kind.cmt_ext Impl; Ml_kind.cmt_ext Intf; Cm_kind.ext Cmi ] in
let id =
lazy
(let open Dyn in
variant "dev_files" (List.map ~f:string exts))
in
Predicate_with_id.create ~id ~f:(fun p ->
let ext = Filename.extension p in
List.mem exts ext ~e... | |
23bd33e90486276571093b5ec28f0a11867f09dd7ea0eb616e6704a0176c8d70 | lambda-11235/ttyped | Util.hs |
module Tests.Util (nfTerm, nfContext, nfObject) where
import Check
import Reduce
import Representation
nfTerm :: Term -> Bool
nfTerm (C ctx) = nfContext ctx
nfTerm (O obj) = nfObject obj
nfContext :: Context -> Bool
nfContext Star = True
nfContext (Quant _ term ctx) = nfTerm term && nfContext ctx
nfObject :: Obje... | null | https://raw.githubusercontent.com/lambda-11235/ttyped/09904a46aaca1c3f3116b225d1390dddc6c4e024/test/Tests/Util.hs | haskell |
module Tests.Util (nfTerm, nfContext, nfObject) where
import Check
import Reduce
import Representation
nfTerm :: Term -> Bool
nfTerm (C ctx) = nfContext ctx
nfTerm (O obj) = nfObject obj
nfContext :: Context -> Bool
nfContext Star = True
nfContext (Quant _ term ctx) = nfTerm term && nfContext ctx
nfObject :: Obje... | |
8022b4b5d6367ffde1b2b2a1228005c9aa751c727ec705f4b7f5160113ce239c | unnohideyuki/bunny | sample192.hs | main = do
print $ (divMod 10 3 :: (Integer, Integer))
print $ (quotRem 10 3 :: (Integer, Integer))
print $ (divMod 10 (-3) :: (Integer, Integer))
print $ (quotRem 10 (-3) :: (Integer, Integer))
print $ (divMod 8 3 :: (Integer, Integer))
print $ (quotRem 8 3 :: (Integer, Integer))
print $ (divMod (-8) 3 ::... | null | https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample192.hs | haskell | main = do
print $ (divMod 10 3 :: (Integer, Integer))
print $ (quotRem 10 3 :: (Integer, Integer))
print $ (divMod 10 (-3) :: (Integer, Integer))
print $ (quotRem 10 (-3) :: (Integer, Integer))
print $ (divMod 8 3 :: (Integer, Integer))
print $ (quotRem 8 3 :: (Integer, Integer))
print $ (divMod (-8) 3 ::... | |
cee7d8a8fa12734bce60a25acaa1bb8afec70a7e4e42d66d3ca22003f7278036 | uwplse/synapse | eval.rkt | #lang racket
(require "util.rkt"
rosette/query/state
rosette/base/term
(only-in rosette >> << >>> current-bitwidth)
rosette/base/generic rosette/base/union
rosette/base/merge rosette/solver/solution)
(provide evaluate)
; Partially evaluates the given expression with res... | null | https://raw.githubusercontent.com/uwplse/synapse/10f605f8f1fff6dade90607f516550b961a10169/opsyn/engine/eval.rkt | racket | Partially evaluates the given expression with respect to the provided solution and
returns the result. In particular, if the solution has a binding for every symbolic
variable occuring in the expression, the output is a concrete value. Otherwise, the
output is a (possibly) symbolic value, expressed in terms of... | #lang racket
(require "util.rkt"
rosette/query/state
rosette/base/term
(only-in rosette >> << >>> current-bitwidth)
rosette/base/generic rosette/base/union
rosette/base/merge rosette/solver/solution)
(provide evaluate)
(define (evaluate expr [sol (current-solution)])
... |
37eb4ffd1375abd04e51730cbfa2f16951fec1eed2316e3968ed4f6dbe533f2f | pirapira/coq2rust | uint31.mli | type t
(* conversion to int *)
val to_int : t -> int
val of_int : int -> t
val of_uint : int -> t
(* convertion to a string *)
val to_string : t -> string
val of_string : string -> t
(* logical operations *)
val l_sl : t -> t -> t
val l_sr : t -> t -> t
val l_and : t -> t -> t
val l_xor : ... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/kernel/uint31.mli | ocaml | conversion to int
convertion to a string
logical operations
Arithmetic operations
Specific arithmetic operations
comparison
head and tail
* Used by retroknowledge | type t
val to_int : t -> int
val of_int : int -> t
val of_uint : int -> t
val to_string : t -> string
val of_string : string -> t
val l_sl : t -> t -> t
val l_sr : t -> t -> t
val l_and : t -> t -> t
val l_xor : t -> t -> t
val l_or : t -> t -> t
val add : t -> t -> t
val sub : t -> t -> t
val ... |
bebda952bfc24a68fd239d055261e1c53a92cc886e37289a9319722852bd6f1b | google/ghc-source-gen | Outputable.hs | module GHC.Utils.Outputable (module Outputable) where
import Outputable
| null | https://raw.githubusercontent.com/google/ghc-source-gen/74089dd58e55ff6143f54389c517232887baa940/compat-8.10/GHC/Utils/Outputable.hs | haskell | module GHC.Utils.Outputable (module Outputable) where
import Outputable
| |
306dd24eb94e4829e30c4c1813079558a5e52f24691295d2df060f85a4f274f9 | jeapostrophe/exp | pratt.rkt | #lang racket/base
;; Subtle expressions are parsed into the following structure:
;;
stx : = ( stx - atom atom )
| ( stx - op operator ( list stx ... ) )
| ( stx - group group ( list stx ... ) )
;; | (stx-seq (list stx ...))
| ( stx - text stx text )
;; | (stx-indent (list stx ...... | null | https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/pratt.rkt | racket | Subtle expressions are parsed into the following structure:
| (stx-seq (list stx ...))
| (stx-indent (list stx ...))
text := (text-esc stx)
| (text-str string)
| (text-seq (list text ...))
The concrete syntax of atoms is unspecified at this time.
A sequence like `a op b op c` is parsed ... | #lang racket/base
stx : = ( stx - atom atom )
| ( stx - op operator ( list stx ... ) )
| ( stx - group group ( list stx ... ) )
| ( stx - text stx text )
( stx - op op ( list a b c ) )
1 + 2 + 3
1 * 3 + 4 * 7 + 6 * 9
( + ( * 1 3 ) ( * 4 7 ) ( * 6 9 ) )
1 + 3 , 4 + 7
( st... |
7725aebda9fa34695f0bce4664205e0135b985b9712bf2283965d1f19b5b3bfa | igorhvr/bedlam | pp.scm | " pp.scm " Pretty - Print
(require 'generic-write)
;@
(define (pretty-print obj . opt)
(let ((port (if (pair? opt) (car opt) (current-output-port))))
(generic-write obj #f (output-port-width port)
(lambda (s) (display s port) #t))))
;@
(define (pretty-print->string obj . width)
(define result '())
(gener... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/pp.scm | scheme | @
@ | " pp.scm " Pretty - Print
(require 'generic-write)
(define (pretty-print obj . opt)
(let ((port (if (pair? opt) (car opt) (current-output-port))))
(generic-write obj #f (output-port-width port)
(lambda (s) (display s port) #t))))
(define (pretty-print->string obj . width)
(define result '())
(generic-wri... |
a0617063de7ee905b95d3fccd413bd5a654d6dd345a26a02b719d1aee8c5809b | bsaleil/lc | etape2-numberp.scm | (define t1 42)
(define t2 #f)
(define t3 #\x)
(define t4 "abc")
(define t5 '(1 2 3))
(define t6 '())
(define t7 cons)
(define (try p) (println (number? p)))
(try t1)
(try t2)
(try t3)
(try t4)
(try t5)
(try t6)
(try t7)
;#t
;#f
;#f
;#f
;#f
;#f
;#f
| null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/unit-tests/IFT3065/2/etape2-numberp.scm | scheme | #t
#f
#f
#f
#f
#f
#f | (define t1 42)
(define t2 #f)
(define t3 #\x)
(define t4 "abc")
(define t5 '(1 2 3))
(define t6 '())
(define t7 cons)
(define (try p) (println (number? p)))
(try t1)
(try t2)
(try t3)
(try t4)
(try t5)
(try t6)
(try t7)
|
3d0e07dc4c1ce9969b7cc821126d8c0a0181674042006e1ba6aba848bce6bcba | iu-parfunc/verified-instances | Either.hs | {-@ LIQUID "--higherorder" @-}
{-@ LIQUID "--exactdc" @-}
{-@ LIQUID "--noadt" @-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module GenericProofs.VerifiedEq.Examples.Either
( Either(..)
, RepEither
, toEither
, fromEither
, tofEither
, fotEither
, isoEither
, ... | null | https://raw.githubusercontent.com/iu-parfunc/verified-instances/cebfdf1e3357a693360be74c90211be18ce3c045/generic-proofs/src/GenericProofs/VerifiedEq/Examples/Either.hs | haskell | @ LIQUID "--higherorder" @
@ LIQUID "--exactdc" @
@ LIQUID "--noadt" @
@ axiomatize fromEither @
@ axiomatize toEither @
@ tofEither :: a:Either a b
-> { toEither (fromEither a) == a }
@ | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
module GenericProofs.VerifiedEq.Examples.Either
( Either(..)
, RepEither
, toEither
, fromEither
, tofEither
, fotEither
, isoEither
, veqEither
) where
import Language.Haskell.Liquid.ProofCombinators
import GenericProofs.Iso
import GenericProof... |
6384e7cd65b4399c1d162c6e5fd110c53e5e726c7945ef30c71e5b45e8789ef0 | ocsigen/ocsigenserver | ocsigen_local_files.ml | Ocsigen
*
* Copyright ( C ) 2009
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your ... | null | https://raw.githubusercontent.com/ocsigen/ocsigenserver/d468cf464dcc9f05f820c35f346ffdbe6b9c7931/src/server/ocsigen_local_files.ml | ocaml | Policies for following symlinks
checks that [filename] can be followed depending on the predicate
[policy] which must receives as argument both the results
of calling [stat] and [lstat] on filenam.
If supplied, [stat] must be the result of calling [Unix.stat] on
[filename]
Check that there are no inval... | Ocsigen
*
* Copyright ( C ) 2009
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your ... |
8b2140bc13bbfc6f50655f822e4c40daeed9f6cb7ac6da3de9c38b23cf925c31 | marcosh/existential-optics | TypeTuples.hs | # LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TypeFamilies #
module TypeTuples where
type family Fst (a :: (k1, k2)) where
Fst '(x, y) = x
type family Snd (a :: (k1, k2)) where
Snd '(x, y) = y
| null | https://raw.githubusercontent.com/marcosh/existential-optics/7bc0e518a93f9ce171387f9a03c3091563b19768/src/TypeTuples.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TypeFamilies #
module TypeTuples where
type family Fst (a :: (k1, k2)) where
Fst '(x, y) = x
type family Snd (a :: (k1, k2)) where
Snd '(x, y) = y
| |
1a77a5687d55029549ba06cc964f79d5966fd4dfc58ad482925cb8ca29c5c25a | flipstone/orville | IndexDefinition.hs | |
Module : Database . Orville . PostgreSQL.Internal . IndexDefinition
Copyright : Flipstone Technology Partners 2016 - 2018
License : MIT
Module : Database.Orville.PostgreSQL.Internal.IndexDefinition
Copyright : Flipstone Technology Partners 2016-2018
License : MIT
-}
module Database.Orville.Postgre... | null | https://raw.githubusercontent.com/flipstone/orville/66a7b7943f4b75a64a429752b858a9fe8dcfc2ad/orville-postgresql/src/Database/Orville/PostgreSQL/Internal/IndexDefinition.hs | haskell | | Works much the same as `uniqueIndex` but takes a list of strings that are the conditions of a
where clause on index creation for partial indexes
| Works much the same as `simpleIndex` but takes a list of strings that are the conditions of a
where clause on index creation for partial indexes | |
Module : Database . Orville . PostgreSQL.Internal . IndexDefinition
Copyright : Flipstone Technology Partners 2016 - 2018
License : MIT
Module : Database.Orville.PostgreSQL.Internal.IndexDefinition
Copyright : Flipstone Technology Partners 2016-2018
License : MIT
-}
module Database.Orville.Postgre... |
42feef699720869b284d9e724e60319f3e573309ec765449261e6ab3d74b58c6 | nc6/tabula | Agent.hs |
Copyright ( c ) 2014 Genome Research Ltd.
Author : < >
This program is free software : you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation ; either version 3 of the License , or ( at your option ) any later
version .
... | null | https://raw.githubusercontent.com/nc6/tabula/f76524bbe56b45b125707cf1f4f9526817c4e6e8/Tabula/Internal/Agent.hs | haskell |
Agents for data collection. These are actually small programs
which are invoked from the shell and report back to the collection
daemon.
|
Copyright ( c ) 2014 Genome Research Ltd.
Author : < >
This program is free software : you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation ; either version 3 of the License , or ( at your option ) any later
version .
... |
239c22b6d446d2ef4b9992a6992ba6b269568c41ecb0465e7b8b4a6cc400edcf | hypernumbers/LuvvieScript | 1b_simpler.erl | -module('1b_simpler').
-export([
simple_fn/0
]).
simple_fn() ->
not_exported_fn().
not_exported_fn() ->
luvv_utils:external_format(django).
| null | https://raw.githubusercontent.com/hypernumbers/LuvvieScript/d10da50e0719ff26690749570c75e1e614214381/test/not_passing/src/1b_simpler.erl | erlang | -module('1b_simpler').
-export([
simple_fn/0
]).
simple_fn() ->
not_exported_fn().
not_exported_fn() ->
luvv_utils:external_format(django).
| |
842917343a88e0c5fdf43a6b5c91bbc1bebe34d02ffe955db2e78c4c84b7faf8 | CIFASIS/QuickFuzz | Shrink.hs | module Run.Shrink (runShrink) where
import Control.Monad
import Test.QuickFuzz.Gen.FormatInfo
import Args
import Debug
-- Run shrink subcommand
runShrink :: QFCommand -> FormatInfo base actions -> IO ()
runShrink cmd fmt = do
when (hasActions fmt)
(putStrLn "Selected format supports actions base gene... | null | https://raw.githubusercontent.com/CIFASIS/QuickFuzz/a1c69f028b0960c002cb83e8145f039ecc0e0a23/app/Run/Shrink.hs | haskell | Run shrink subcommand | module Run.Shrink (runShrink) where
import Control.Monad
import Test.QuickFuzz.Gen.FormatInfo
import Args
import Debug
runShrink :: QFCommand -> FormatInfo base actions -> IO ()
runShrink cmd fmt = do
when (hasActions fmt)
(putStrLn "Selected format supports actions base generation/shrinking!")
|
3469f267f0ad60da2bd2359b73441de8a2a8c0952908a84228edcece2746f097 | seriyps/mtproto_proxy | mtp_test_client.erl | %% @doc Simple mtproto proxy client
-module(mtp_test_client).
-export([connect/5,
connect/6,
send/2,
recv_packet/2,
recv_all/2,
close/1,
ping_session/6]).
-export([unencrypted_cli_packet/1,
unencrypted_cli_packet/3,
parse_unencrypted_srv_packet/1... | null | https://raw.githubusercontent.com/seriyps/mtproto_proxy/9cb198488915f76055ad5955cdcb2cdcd0f4fd98/test/mtp_test_client.erl | erlang | @doc Simple mtproto proxy client
| timeout.
Let's hope whole server hello will arrive in a single chunk
TODO: if Tail is not empty, use codec:push_back(first, ..)
We already had some data in codec's buffers
io:format("~p: ~p~n", [byte_size(Stream), Stream]),
recurse
io:format("~p: ~p~n", [byte_size(Stream), Str... | -module(mtp_test_client).
-export([connect/5,
connect/6,
send/2,
recv_packet/2,
recv_all/2,
close/1,
ping_session/6]).
-export([unencrypted_cli_packet/1,
unencrypted_cli_packet/3,
parse_unencrypted_srv_packet/1]).
-export([req_pq/0,
res_... |
67a5633f35b5ecc8c89b8fc5a6a4231115c1ef0fc1ae6ef8ec91b7d81c81e025 | haskell-lisp/yale-haskell | ast-td.scm | ;;; ast-td.scm -- define ast type descriptor object
;;;
author :
date : 6 Oct 1992
;;;
;;; Give the type descriptors for AST nodes extra slots to hold walker
;;; functions.
(define-struct ast-td
(include type-descriptor)
(slots
(cfn-walker (type (maybe procedure)) (default '#f))
(cfn-simple-... | null | https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/ast/ast-td.scm | scheme | ast-td.scm -- define ast type descriptor object
Give the type descriptors for AST nodes extra slots to hold walker
functions. | author :
date : 6 Oct 1992
(define-struct ast-td
(include type-descriptor)
(slots
(cfn-walker (type (maybe procedure)) (default '#f))
(cfn-simple-transform-walker (type (maybe procedure)) (default '#f))
(depend-walker (type (maybe procedure)) (default '#f))
(ast-to-flic-walker (type ... |
7810f707e5fe1057e4fa8dcae633667e848e262464f2ec0cb2c6a63d541aa06d | ocaml-multicore/reagents | recursive_lock.mli | module type S = Recursive_lock_intf.S
module Make
(Base : Base.S) (Tid : sig
val get_tid : unit -> int
end) : S with type ('a, 'b) reagent = ('a, 'b) Base.t
| null | https://raw.githubusercontent.com/ocaml-multicore/reagents/6721db78b21028c807fb13d0af0aaf9407c662b5/lib/sync/recursive_lock.mli | ocaml | module type S = Recursive_lock_intf.S
module Make
(Base : Base.S) (Tid : sig
val get_tid : unit -> int
end) : S with type ('a, 'b) reagent = ('a, 'b) Base.t
| |
6eb8d4b60660b68f9178460d20c02c7892d0886014ca949be373a00604a8a6af | tmarble/webica | chrome_driver_service.clj | (ns webica.chrome-driver-service
"Clojure binding for Selenium class ChromeDriverService"
(:require [clojure.core :as clj]
[webica.core :as w])
(:import [org.openqa.selenium.chrome
ChromeDriverService]))
(w/intern-java ChromeDriverService *ns*)
| null | https://raw.githubusercontent.com/tmarble/webica/c48c4a750492430607042d0f15082af7d487dc08/src/webica/chrome_driver_service.clj | clojure | (ns webica.chrome-driver-service
"Clojure binding for Selenium class ChromeDriverService"
(:require [clojure.core :as clj]
[webica.core :as w])
(:import [org.openqa.selenium.chrome
ChromeDriverService]))
(w/intern-java ChromeDriverService *ns*)
| |
478c00e4065ecbb75d8d8761ad82d4e962a8ec4d551babf9e8ac4f137ec300ef | robert-strandh/Acclimation | language-french.lisp | (cl:in-package #:acclimation)
(defclass french (language)
())
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Methods on LONG-DAY-NAME.
(defmethod long-day-name ((day (eql 1)) (language french))
"lundi")
(defmethod long-day-name ((day (eql 2)) (language french))
"mardi")
(defme... | null | https://raw.githubusercontent.com/robert-strandh/Acclimation/ff1839faeaaf3bb40775b35174beb9c7dd13ef19/language-french.lisp | lisp |
Methods on LONG-DAY-NAME.
Methods on SHORT-DAY-NAME.
Methods on LONG-MONTH-NAME.
Methods on SHORT-MONTH-NAME. | (cl:in-package #:acclimation)
(defclass french (language)
())
(defmethod long-day-name ((day (eql 1)) (language french))
"lundi")
(defmethod long-day-name ((day (eql 2)) (language french))
"mardi")
(defmethod long-day-name ((day (eql 3)) (language french))
"mercredi")
(defmethod long-day-name ((day (eql 4... |
f8f79dbd931dfcb1db32ddb7888819199ddd1d8eddc11d14fff5e09503805068 | ucsd-progsys/mist | pointers_noalias.hs | module State where
rjhala [ 10:45 AM ]
The people have a bunch of nice STATE examples here : / - lang / Idris - dev / tree / master / samples / ST
For a start , how about [ login.idr]( / - lang / Idris - dev / blob / master / samples / ST / )
-- except in a way where you can clearly tell what’s going on…
... | null | https://raw.githubusercontent.com/ucsd-progsys/mist/0a9345e73dc53ff8e8adb8bed78d0e3e0cdc6af0/tests/Tests/Integration/pos/pointers_noalias.hs | haskell | except in a way where you can clearly tell what’s going on…
here’s a super simple example: can you get it to work with suitable annotations?
---------------------------------------------------------------------------
| Library ----------------------------------------------------------------
------------------------... | module State where
rjhala [ 10:45 AM ]
The people have a bunch of nice STATE examples here : / - lang / Idris - dev / tree / master / samples / ST
For a start , how about [ login.idr]( / - lang / Idris - dev / blob / master / samples / ST / )
rjhala [ 11:43 AM ]
undefined as rforall a. a
undefined = 0
... |
40c435f42896b5dc1491d51b150ffcbb9eb4272d627915fa8057e38e7cf3f448 | plewto/Cadejo | factory.clj | (ns cadejo.ui.util.factory
(:use [cadejo.ui.util.icon :only [icon]])
(:require [cadejo.config :as config])
(:require [cadejo.ui.util.lnf :as lnf])
(:require [seesaw.core :as ss])
(:require [seesaw.border :as ssb])
(:import javax.swing.BorderFactory
javax.swing.SwingConstants))
;; Returns empty b... | null | https://raw.githubusercontent.com/plewto/Cadejo/2a98610ce1f5fe01dce5f28d986a38c86677fd67/src/cadejo/ui/util/factory.clj | clojure | Returns empty border
Returns compound border with title and standard padding
Returns bevel border
Buttons
Return filter selection button | (ns cadejo.ui.util.factory
(:use [cadejo.ui.util.icon :only [icon]])
(:require [cadejo.config :as config])
(:require [cadejo.ui.util.lnf :as lnf])
(:require [seesaw.core :as ss])
(:require [seesaw.border :as ssb])
(:import javax.swing.BorderFactory
javax.swing.SwingConstants))
(defn padding
(... |
3d755ada063fbfe09a1b74433229c8779424b86dd21e933e20859d20eb6acd7e | flipstone/orville | FieldDefinition.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
|
Module : Orville . PostgreSQL.Internal . FieldDefinition
Copyright : Flipstone Technology Partners 2016 - 2021
License : MIT
Module : Orville.PostgreSQL.Internal.FieldDefinition
Copyright : Flipstone Technology Partners 2016-2021
License ... | null | https://raw.githubusercontent.com/flipstone/orville/8412df37d1bd1468da3b30196bdba0e577b28e85/orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/FieldDefinition.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
|
The name used in database queries to reference the field.
|
Returns the description that was passed to 'setFieldDescription', if any.
|
Returns the default value definition for the field, if any has been set.
|
Indicates whether a field is nullable.
|... |
|
Module : Orville . PostgreSQL.Internal . FieldDefinition
Copyright : Flipstone Technology Partners 2016 - 2021
License : MIT
Module : Orville.PostgreSQL.Internal.FieldDefinition
Copyright : Flipstone Technology Partners 2016-2021
License : MIT
-}
module Orville.PostgreSQL.Internal.FieldDefiniti... |
9fe59769665d077c9df288d9fe5e47e239a4ec4ae7e128304984e0067ea2ebbe | RaphaelJ/friday | Primitive.hs | {-# LANGUAGE BangPatterns #-}
module Vision.Primitive (
module Vision.Primitive.Shape
, Point, Size, Rect (..), RPoint (..)
) where
import Data.RatioInt (RatioInt)
import Vision.Primitive.Shape
-- | Coordinates inside the image.
--
Can be constructed using ' ix2 ' . The first parameter is the y coor... | null | https://raw.githubusercontent.com/RaphaelJ/friday/13c6bb16bb04856e0cb226726017e7a7ad502cb5/src/Vision/Primitive.hs | haskell | # LANGUAGE BangPatterns #
| Coordinates inside the image.
is located in the upper left corner.
| Size of an object.
second is the width (i.e. @ix2 h w@).
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK #
| Rational coordinates used for interpolations.
# UNPACK #
# UNPACK # |
module Vision.Primitive (
module Vision.Primitive.Shape
, Point, Size, Rect (..), RPoint (..)
) where
import Data.RatioInt (RatioInt)
import Vision.Primitive.Shape
Can be constructed using ' ix2 ' . The first parameter is the y coordinate while
the second is the x coordinate ( i.e. @'ix2 ' y ) . ... |
430bad12fb2e2bcf4a00d7d76d097e912ec316d855e9cecac88f200218e5df3b | halgari/clj-llvm | core.clj | (ns clj-llvm.core
(:use [clj-llvm.llvmc])
(:import (com.sun.jna Native Pointer Memory)))
(LLVMLinkInJIT)
(LLVMLinkInInterpreter)
(LLVMInitializeX86TargetInfo)
(LLVMInitializeX86Target)
(LLVMInitializeX86TargetMC)
(def type-maps
{:int-32 (LLVMInt32Type)})
(defn new-pointer []
(let [p (Memory. Pointer/SIZE)]
... | null | https://raw.githubusercontent.com/halgari/clj-llvm/e6861684ba76376d55bf141ae2d6a3b268a9bee5/src/clj_llvm/core.clj | clojure | _
data (LLVMGetExecutionEngineTargetData engine)
_ (assert data)
_
pass
| (ns clj-llvm.core
(:use [clj-llvm.llvmc])
(:import (com.sun.jna Native Pointer Memory)))
(LLVMLinkInJIT)
(LLVMLinkInInterpreter)
(LLVMInitializeX86TargetInfo)
(LLVMInitializeX86Target)
(LLVMInitializeX86TargetMC)
(def type-maps
{:int-32 (LLVMInt32Type)})
(defn new-pointer []
(let [p (Memory. Pointer/SIZE)]
... |
94bd2311d1beebdbf6c28fdf253e35d6fdd13168a9955a81f81922140b2d0cdd | bytekid/mkbtt | aCPString.ml | (*** SUBMODULES **********************************************************)
module Fun = Rewriting.Function;;
module Pos = Rewriting.Position;;
module T = U.Term;;
module Sig = U.Signature;;
module Label = Types.Label;;
module M = U.Monad;;
(*** OPENS ***************************************************************)
op... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mascott/src/aCPString.ml | ocaml | ** SUBMODULES *********************************************************
** OPENS **************************************************************
** TYPES **************************************************************
** EXCEPTIONS *********************************************************
** FUNCTIONS *******************... | module Fun = Rewriting.Function;;
module Pos = Rewriting.Position;;
module T = U.Term;;
module Sig = U.Signature;;
module Label = Types.Label;;
module M = U.Monad;;
open Util;;
open M;;
type symbol =
| FunSym of Fun.t
| StarSym
| ACSym of (Fun.t * T.t list * Pos.t)
and t = Nil | Element of symbol * t * t
excep... |
53c38563ec38f55330f7c2c309d699bcecb36287ca4e02501b17f1caaae49f36 | SamB/coq | toplevel.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/toplevel/toplevel.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
A buffer for the character read fro... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ Id$
open Pp
open Util
... |
31a4ac5b97cb774ae6545c0c0a26be17048d2181ad9aee17e2f4be7c49d46b06 | tcsprojects/pgsolver | paritygame.mli | open Tcsbasedata
open Tcsset
(***************************************************************
* Functions for representing sets of nodes, *
* particularly for successors and predecessors of given nodes *
* *
* Warning: the type `node' m... | null | https://raw.githubusercontent.com/tcsprojects/pgsolver/b0c31a8b367c405baed961385ad645d52f648325/src/paritygame/paritygame.mli | ocaml | **************************************************************
* Functions for representing sets of nodes, *
* particularly for successors and predecessors of given nodes *
* *
* Warning: the type `node' may become abstract in the future ... | open Tcsbasedata
open Tcsset
type node = int
val nd_undef : node
: int - > node ( * turns an int into a node ; mostly to be used with paritygame generators that like to build a game using ints for nodes
*)
val nd_show : node -> string
type nodeset
val ns_isEmpty : nodeset -> bool
val ns_elem ... |
36f574781b4ae8ebc8eed5427821e7921336dcd46785031a2eaad16113e6572f | japan-clojurians/curriculum | todo.clj | (ns todo-clj.handler.todo
(:require [todo-clj.model.todo :as model]
[todo-clj.util.handler :refer [defhandler]]
[todo-clj.util.response :as res]
[todo-clj.view.todo :as view]))
(defhandler todo-index :todo-index [req]
(let [todo-list (model/find-todo)]
(-> (view/todo-index r... | null | https://raw.githubusercontent.com/japan-clojurians/curriculum/b4646925df3a5c6a504f129382dfbe9cccd75791/simple-todo-app/src/todo_clj/handler/todo.clj | clojure | (ns todo-clj.handler.todo
(:require [todo-clj.model.todo :as model]
[todo-clj.util.handler :refer [defhandler]]
[todo-clj.util.response :as res]
[todo-clj.view.todo :as view]))
(defhandler todo-index :todo-index [req]
(let [todo-list (model/find-todo)]
(-> (view/todo-index r... | |
54917a631bb35671e4c58732051b821c136754698753f70257cbde74d362fbd8 | mzp/coq-ide-for-ios | refl_tauto.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/CoqIDE/coq-8.2pl2/plugins/rtauto/refl_tauto.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
raises Not_found if no proof is fou... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : refl_tauto.mli 13323... |
d0128e1ad0fd075a516bc4d08149f909978a4906378fcbdcbb89d7f624efeacd | openmusic-project/OMTristan | OMTristan.lisp | ;; ====================================================================================
OM - TRISTAN
;; ====================================================================================
(in-package :om)
;--------------------------------------------------
;Loading files
;... | null | https://raw.githubusercontent.com/openmusic-project/OMTristan/4a9a519ab5316cd005e491157452de3389469d82/OMTristan.lisp | lisp | ====================================================================================
====================================================================================
--------------------------------------------------
Loading files
--------------------------------------------------
-----------------------------... | OM - TRISTAN
(in-package :om)
(mapc #'(lambda (file) (compile&load
(make-pathname :directory (append (pathname-directory *load-pathname*) '("sources"))
:name file)))
'("OM-functions"
"utils"
... |
b408196e8fe339284593b61f9aed127feba6b074030d12738e6bb3eefbaa76ba | effectfully/tiny-lang | Core.hs | module TinyLang.Field.Typed.Core
( module Field
, module Var
, module Env
, Some (..)
, SomeOf (..)
, Forget (..)
, traverseSomeOf
, Uni (..)
, KnownUni (..)
, UniConst (..)
, UniVar (..)
, SomeUniConst
, SomeUniVar
, SomeUniExpr
, UnOp (..)
, BinOp (..)
... | null | https://raw.githubusercontent.com/effectfully/tiny-lang/3dbb730d3595a76f087a33da3b353783ff2a27e9/field/TinyLang/Field/Typed/Core.hs | haskell | | Things that get compiled to constraints down the pipeline.
The evaluation semantics is the following: each assertion becomes a check at runtime
and the if the check fails, we have evaluation failure.
instead of erroneously defaulting to 'False'.
| Add variable to the set of bound variables
| Add variable to the... | module TinyLang.Field.Typed.Core
( module Field
, module Var
, module Env
, Some (..)
, SomeOf (..)
, Forget (..)
, traverseSomeOf
, Uni (..)
, KnownUni (..)
, UniConst (..)
, UniVar (..)
, SomeUniConst
, SomeUniVar
, SomeUniExpr
, UnOp (..)
, BinOp (..)
... |
d4a7731607f9f00c69d6fb2dab9e60893adf76e6aff71b308d9e482ec58514d0 | mfikes/fifth-postulate | ns491.cljs | (ns fifth-postulate.ns491)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns491.cljs | clojure | (ns fifth-postulate.ns491)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
ff10ba5b781609208389d0511ce5a313f8d6cc81048f1a6bce9be3de41c55dda | yzhs/ocamlllvm | closure.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/asmcomp/closure.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : closure.ml 10667 2010 - 09 - ... |
a9b63087e48d6616dcc1b195186a133188931cdb27c76d05d60dc4aed1fb8e67 | ghc/testsuite | tc078.hs | -- !!! instance decls with no binds
--
module ShouldFail where
data Bar a = MkBar Int a
instance Eq a => Eq (Bar a)
instance Ord a => Ord (Bar a)
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/tc078.hs | haskell | !!! instance decls with no binds
| module ShouldFail where
data Bar a = MkBar Int a
instance Eq a => Eq (Bar a)
instance Ord a => Ord (Bar a)
|
d23882aa5e496538994150fce6c204c1013dfb01cf71f375fdcdeffe1354a3ab | dharmatech/agave | ca-belzhab.sps | Copyright 2016
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software
distributed under the Li... | null | https://raw.githubusercontent.com/dharmatech/agave/a8c62ebb1e5328df7725ada49ce36f5ee02a0de4/demos/ca-belzhab.sps | scheme |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2016
distributed under the License is distributed on an " AS IS " BASIS ,
(import (agave demos ca-gen))
(ca-gen (width 100)
(height 100)
(S 2 3)
(B 2 3)
(C 8))
|
49cedc55d2bec1eb8a9a73e38e50c0dbd313dbfc88f821482658b1b80cbf97e4 | Novus-School/novus | solar_system_pro.clj | (ns novus.samples.solar-system-pro
(:require [datomic.client.api :as d]
[datomic.dev-local :as dl]))
Step 1 : Create a client for the Datomic System ) using the d / client function
(def client-config {:server-type :dev-local
:system "custom"})
(def client (d/client client-config))
... | null | https://raw.githubusercontent.com/Novus-School/novus/f214c710ba74e13787f5fe38203673d1b9076fd6/novus/src/main/novus/samples/solar_system_pro.clj | clojure | Step 1.1 Create a new database
Aside
Aside - Delete
This will be used to communicate with database when making transactions and queries
Aside: Play around
Step 3 - Define solar system schema
Give me all the list of object that has the attribute :object/name
Note: ?name value placeholder can be omitted. So this ... | (ns novus.samples.solar-system-pro
(:require [datomic.client.api :as d]
[datomic.dev-local :as dl]))
Step 1 : Create a client for the Datomic System ) using the d / client function
(def client-config {:server-type :dev-local
:system "custom"})
(def client (d/client client-config))
... |
73928ff1c3d0a1d39bd4537bb61cc7bb6427232b92e6966c883d433420317d6c | shayan-najd/QFeldspar | ADTUntypedNamed.hs | module QFeldspar.Expression.Utils.ADTUntypedNamed
(sbs) where
import QFeldspar.MyPrelude
import QFeldspar.Expression.ADTUntypedNamed
sbs :: forall x. Eq x => x -> Exp x -> Exp x -> Exp x
sbs xx ee' ee = case ee of
Var y
| y == xx -> ee'
| otherwise -> ee
_ -> $(genOverloaded '... | null | https://raw.githubusercontent.com/shayan-najd/QFeldspar/ed60ce02794a548833317388f6e82e2ab1eabc1c/QFeldspar/Expression/Utils/ADTUntypedNamed.hs | haskell | module QFeldspar.Expression.Utils.ADTUntypedNamed
(sbs) where
import QFeldspar.MyPrelude
import QFeldspar.Expression.ADTUntypedNamed
sbs :: forall x. Eq x => x -> Exp x -> Exp x -> Exp x
sbs xx ee' ee = case ee of
Var y
| y == xx -> ee'
| otherwise -> ee
_ -> $(genOverloaded '... | |
8e8e4b57eb19cb451724f693608be5ede0fe3912afc216adfdb1ce44cfcb8b3e | cblp/python5 | Str.hs |
Python5 — a hypothetic language
Copyright ( C ) 2015 -
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) ... | null | https://raw.githubusercontent.com/cblp/python5/897b7bbb7b522fa5653eff10b9ae616a4e01b6ff/python5/src/Python5/Builtin/Str.hs | haskell |
Python5 — a hypothetic language
Copyright ( C ) 2015 -
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) ... | |
bf84d733fc18a9a7c6fb4319fa62d8e2ef637141091283c2190bae21783f80d4 | mattjbray/ocaml-decoders | bs_xml.ml | module DOMParser = struct
type t
external create : unit -> t = "DOMParser" [@@bs.new]
external parseFromString : t -> string -> string -> Dom.element
= "parseFromString"
[@@bs.send]
external firstElementChildUnsafe : Dom.element -> Dom.element
= "firstElementChild"
[@@bs.get]
external quer... | null | https://raw.githubusercontent.com/mattjbray/ocaml-decoders/cbff9f595c3fb5deffafa7b0dc4d12a95196b149/src-bs/bs_xml.ml | ocaml | See -US/docs/Web/API/Node/nodeType | module DOMParser = struct
type t
external create : unit -> t = "DOMParser" [@@bs.new]
external parseFromString : t -> string -> string -> Dom.element
= "parseFromString"
[@@bs.send]
external firstElementChildUnsafe : Dom.element -> Dom.element
= "firstElementChild"
[@@bs.get]
external quer... |
1224f32e1e9a65cef779e71605b046de81b2732a10c0220c51b84f89c4a71b4e | ekmett/category-extras | Instances.hs | {-# OPTIONS_GHC -fglasgow-exts #-}
-------------------------------------------------------------------------------------------
-- |
-- Module : Control.Functor.Instances
Copyright : 2008
-- License : BSD
--
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable (class-associated types)
... | null | https://raw.githubusercontent.com/ekmett/category-extras/f0f3ca38a3dfcb49d39aa2bb5b31b719f2a5b1ae/Control/Functor/Instances.hs | haskell | # OPTIONS_GHC -fglasgow-exts #
-----------------------------------------------------------------------------------------
|
Module : Control.Functor.Instances
License : BSD
Stability : experimental
Portability : non-portable (class-associated types)
Generalized functor composition.
------------------------------... | Copyright : 2008
Maintainer : < >
module Control.Functor.Composition where
import Control.Bifunctor
import Control.Bifunctor.Instances
import Control.Functor.Adjunction
import Control.Functor.Pointed
import Control.Monad
import Control.Comonad
import Control.Functor.Full
import Control.Arrow ((&&&),(|||)... |
f3ead4fc48a66af2dca5aa13c77c4713c03a0d54a50df9f3377391a3cd410f3e | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | GelatoSessionLastError.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the types generated from the schema GelatoSessionLastError
module StripeAPI.Types.GelatoSessionLastError where
... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/GelatoSessionLastError.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema GelatoSessionLastError
| Defines the object schema located at @components.schemas.gelato_session_last_error@ in the specification.
Shows last VerificationSession error
| code: A short machine-readable string givin... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.GelatoSessionLastError where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qual... |
ff1a07b15d34c5645945114bd4a80a912efe1dd49cbfe1f5ecd18a02011e51fe | facebookarchive/pfff | plot_jgraph.ml | open Common
module Color = Simple_color
(*****************************************************************************)
(* Prelude *)
(*****************************************************************************)
(* /~plank/plank/jgraph/jgraph.html
*)
let tmpfile = "/tmp/test.jgr"
let prelude () =
" newgrap... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/h_visualization/plot_jgraph.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
/~plank/plank/jgraph/jgraph.html
autogenerated by jgraph.ml
***************************************************************************
communicating wit... | open Common
module Color = Simple_color
let tmpfile = "/tmp/test.jgr"
let prelude () =
" newgraph
xaxis
size 7in
min 0
hash 1 mhash 0
"
let xaxis_font () =
"hash_labels hjr font Helvetica fontsize 10 rotate 45"
let yaxis_label s =
spf "
yaxis
hash_labels fontsiz... |
ede569a93b6bcf766681a5601b3ef0049a7de45721724e094dda87d74220895c | acieroid/scala-am | 5.scm | 5.6
(define (add-to-end e l)
(if (null? l)
(cons e '())
(cons (car l) (add-to-end e (cdr l)))))
(and (equal? (add-to-end 999 '(1 2 3 4 5)) '(1 2 3 4 5 999))
(equal? (add-to-end 999 '()) '(999))
(equal? (add-to-end 999 '(1)) '(1 999)))
5.7
(and (equal? (append '(1 2 3) '(4 5)) '(1 2 3 4 5))
(e... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/scp1-compressed/5.scm | scheme | replaced (apply + l) by (foldr + 0 l) + def of foldr | 5.6
(define (add-to-end e l)
(if (null? l)
(cons e '())
(cons (car l) (add-to-end e (cdr l)))))
(and (equal? (add-to-end 999 '(1 2 3 4 5)) '(1 2 3 4 5 999))
(equal? (add-to-end 999 '()) '(999))
(equal? (add-to-end 999 '(1)) '(1 999)))
5.7
(and (equal? (append '(1 2 3) '(4 5)) '(1 2 3 4 5))
(e... |
4a50641c2615e26394a7c187ab9759b6bddf1d989e575331c65c0442dda3f549 | Mathieu-Desrochers/Schemings | string.scm | (import srfi-13)
(declare (unit string))
;; returns a specified number of characters from a string
(: string-mid (string fixnum fixnum -> string))
(define (string-mid string start length)
(if (< start (string-length string))
(substring/shared
string
start
(min (+ start length) (string-length s... | null | https://raw.githubusercontent.com/Mathieu-Desrochers/Schemings/3df7c8f8589a1c9c4135a3ae4c1bab3244e6444c/sources/units/string.scm | scheme | returns a specified number of characters from a string
finds and replaces within a string | (import srfi-13)
(declare (unit string))
(: string-mid (string fixnum fixnum -> string))
(define (string-mid string start length)
(if (< start (string-length string))
(substring/shared
string
start
(min (+ start length) (string-length string)))
""))
(: string-find-replace (string string s... |
273676c71a5a38da0b60c27c035492c1b9575f490db14f00f288c068a32d5d9d | jimpil/cryptohash-clj | encode.clj | (ns cryptohash-clj.encode
(:require [cryptohash-clj
[globals :as glb]])
(:import [java.nio.charset Charset]
[java.nio ByteBuffer CharBuffer]
[java.util Base64$Decoder Base64$Encoder Base64 Arrays]
[org.bouncycastle.util.encoders Hex]))
(def ^Charset DEFAULT-CHARSET
(... | null | https://raw.githubusercontent.com/jimpil/cryptohash-clj/5ea9e4abb83065d044ea7471ed7e86b85450e300/src/cryptohash_clj/encode.clj | clojure | ==========================================
=========================================================== | (ns cryptohash-clj.encode
(:require [cryptohash-clj
[globals :as glb]])
(:import [java.nio.charset Charset]
[java.nio ByteBuffer CharBuffer]
[java.util Base64$Decoder Base64$Encoder Base64 Arrays]
[org.bouncycastle.util.encoders Hex]))
(def ^Charset DEFAULT-CHARSET
(... |
42d8242791cca49f907ad3ed1602fca725c3421a366e8fb697eaf34b4ae7f955 | ygmpkk/house | GadgetsPrelude.hs | -- File was called gadgets.gs
module GadgetsPrelude(module GadgetsPrelude,module GUIPrelude) where
import Prelude hiding (Maybe(..))
import GUIPrelude
import Text.Show.Functions
default(Int)
-- Various types of component
= " : a combination.gs explode.gs updown.gs escher.gs bristol.gs "
type SystemWires = InOut OSR... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/kernel/Gadgets/lib/GadgetsPrelude.hs | haskell | File was called gadgets.gs
Various types of component
Some type stuff
****** Useful things
****** Useful functions
hmm
hmm
****** Useful continuations
debug = typeout
****** Constants (oh for #define...!)
{ specified } calculated
instance Show (In a) where show... | module GadgetsPrelude(module GadgetsPrelude,module GUIPrelude) where
import Prelude hiding (Maybe(..))
import GUIPrelude
import Text.Show.Functions
default(Int)
= " : a combination.gs explode.gs updown.gs escher.gs bristol.gs "
type SystemWires = InOut OSResponse OSRequest
type GadgetWires = (Out SMRequest,InOut LO... |
d9977fd41a65e9c01c26404cacfbf38a0b8d7c296e1c16134577723e897f1254 | appleshan/cl-http | log-memory-usage.lisp | -*- Mode : lisp ; Syntax : ANSI - Common - Lisp ; Package : http ; Base : 10 -*-
;;;
( C ) Copyright 2006 ,
;;; All Rights Reserved.
;;;
;;;-------------------------------------------------------------------
;;;
;;; MONITOR MEMORY USAGE
;;;
(in-package :http)
#+UNIX
(defun write-memory-usage (&optional (s... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lw/contrib/jcma/log-memory-usage.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : http ; Base : 10 -*-
All Rights Reserved.
-------------------------------------------------------------------
MONITOR MEMORY USAGE
get virtual memory size | ( C ) Copyright 2006 ,
(in-package :http)
#+UNIX
(defun write-memory-usage (&optional (stream *standard-output*))
(fast-format stream "~&Date: ~I~&~%Lisp Memory Usage~&" (write-standard-time (get-universal-time) stream))
(let ((*standard-output* stream))
(room)
(multiple-value-bind (out)
(sys... |
11565480ceedc6d07340e840ad26ce503fca25ed151f2a5bec7bef4487ac9ad4 | exercism/erlang | diamond_tests.erl | Generated with ' v0.2.0 '
%% Revision 1 of the exercises generator was used
%% -specifications/raw/42dd0cea20498fd544b152c4e2c0a419bb7e266a/exercises/diamond/canonical-data.json
%% This file is automatically generated from the exercises canonical data.
-module(diamond_tests).
-include_lib("erl_exercism/include/exe... | null | https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/diamond/test/diamond_tests.erl | erlang | Revision 1 of the exercises generator was used
-specifications/raw/42dd0cea20498fd544b152c4e2c0a419bb7e266a/exercises/diamond/canonical-data.json
This file is automatically generated from the exercises canonical data. | Generated with ' v0.2.0 '
-module(diamond_tests).
-include_lib("erl_exercism/include/exercism.hrl").
-include_lib("eunit/include/eunit.hrl").
'1_degenerate_case_with_a_single_a_row_test_'() ->
Expected=[
"A"
],
{"Degenerate case with a single 'A' row",
?_assertEqual(Expected, diamond:r... |
51d619884480ea8c61a63c50e48d8db84a9d132438632ca4fb89cabfdd9a97b8 | dpom/nlp-tools | classification.clj | (ns nlptools.model.classification
(:require
[clojure.java.io :as io]
[clojure.spec.alpha :as s]
[clojure.test :refer :all]
[integrant.core :as ig]
[duct.logger :refer [log Logger]]
[nlpcore.protocols :as core]
[nlpcore.spec :as nsp]
[nlptools.command :as cmd]
[nlptools.test :as t]
[nlpto... | null | https://raw.githubusercontent.com/dpom/nlp-tools/f513442e0ff993bba9daf1f5aff9582c61367324/src/nlptools/model/classification.clj | clojure | (ns nlptools.model.classification
(:require
[clojure.java.io :as io]
[clojure.spec.alpha :as s]
[clojure.test :refer :all]
[integrant.core :as ig]
[duct.logger :refer [log Logger]]
[nlpcore.protocols :as core]
[nlpcore.spec :as nsp]
[nlptools.command :as cmd]
[nlptools.test :as t]
[nlpto... | |
b898ccb20bf8264ffa2897f5234a9d3e7b49f8d7ca87ff4aacc6161a0a302165 | bvaugon/ocapic | code.ml | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/src/ocasim/code.ml | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
open Flash
type t = Instr.t array
let parse { program = program ; config = _ } =
let psize = Array.length program in
let csize = psize / 2 in
let code = Array.make csize Instr.... |
175504831bc760b7cea2743bfd20bfd2e6d1ff31a701eba55cd90b914c5cb386 | 2600hz/kazoo | kz_cache_ets.erl | %%%-----------------------------------------------------------------------------
( C ) 2011 - 2020 , 2600Hz
%%% @doc Simple ETS-backed cache. Handles ETS operations
@author
@author
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 distribu... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_caches/src/kz_cache_ets.erl | erlang | -----------------------------------------------------------------------------
@doc Simple ETS-backed cache. Handles ETS operations
@end
-----------------------------------------------------------------------------
------------------------------------------------------------------------------
@doc API functions
@en... | ( C ) 2011 - 2020 , 2600Hz
@author
@author
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 /.
-module(kz_cache_ets).
-behaviour(gen_server).
-export([start_link/1
,pointer_tab... |
fe3f9e97559b3e5323c3c804cc2ff1f35c8971a4111a910538a75827b9803c8d | Leapsight/plum_db | plum_db_pubsub.erl | %% --------------------------------------------------
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed ... | null | https://raw.githubusercontent.com/Leapsight/plum_db/76f4d5113ed26cce4b38ce504f6965a2bcda95ed/src/plum_db_pubsub.erl | erlang | --------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
... | This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
@author < >
Publish / subscribe with Gproc relies entirely on gproc proper... |
6f0ed134c025c41f264d9e09c044636045fd1a5bf333e5663b6b98f9a7d751cc | BardurArantsson/cqrs | StreamPosition.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
module Data.CQRS.Internal.StreamPosition
( StreamPosition(..)
, streamPositionToBytes
, bytesToStreamPosition
, infimum
) where
import Control.DeepSeq (NFData)
import Data.ByteString.Lex.Integral (readD... | null | https://raw.githubusercontent.com/BardurArantsson/cqrs/2491d83e2bcd68c883aaea33cdce6c5ea8c0cd1a/cqrs-core/src/Data/CQRS/Internal/StreamPosition.hs | haskell | # LANGUAGE OverloadedStrings #
'StreamPosition' values compare as greater than this value.
| A stream position is an implementation-defined
representation of the position in an 'EventStream'.
| Convert a 'StreamPosition' to a 'ByteString'. The format of
the underlying binary data __MUST__ be treated as completely
... | # LANGUAGE DeriveGeneric #
module Data.CQRS.Internal.StreamPosition
( StreamPosition(..)
, streamPositionToBytes
, bytesToStreamPosition
, infimum
) where
import Control.DeepSeq (NFData)
import Data.ByteString.Lex.Integral (readDecimal, packDecimal)
import ... |
43de2165aa464b94216df266af1270dd9386a8b45289a8fb51d99864c6ab9df6 | hiroshi-unno/coar | fgx3.ml | let rec f g x = if x=0 then (if true then g x else g x) else f(f g) (x-1)
let succ x = x + 1
let main () = assert(f succ 5 = 0)
[@@@assert "typeof(main) <: unit -> unit"]
| null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/benchmarks/OCaml/safety/tacas2015/fgx3.ml | ocaml | let rec f g x = if x=0 then (if true then g x else g x) else f(f g) (x-1)
let succ x = x + 1
let main () = assert(f succ 5 = 0)
[@@@assert "typeof(main) <: unit -> unit"]
| |
d2d4724a65d3c20f23471ebaf7f6980ac676808b33cf73b2c0f430ddf9c23869 | binaryage/chromex | cpu.clj | (ns chromex.ext.system.cpu
"Use the system.cpu API to query CPU metadata.
* available since Chrome 36
* "
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:require [chromex.wrapgen :refer [gen-wrap-helper]]
[chromex.callgen :refer [gen-call-helper gen-tap-all-events-c... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/system/cpu.clj | clojure | -- convenience ------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------
-- API TABLE --------------------------------------------------------... | (ns chromex.ext.system.cpu
"Use the system.cpu API to query CPU metadata.
* available since Chrome 36
* "
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:require [chromex.wrapgen :refer [gen-wrap-helper]]
[chromex.callgen :refer [gen-call-helper gen-tap-all-events-c... |
6f286f75dbe6c1ca935f6d7cc09219de3dcd6d7effd709b3703aaf170a63d75b | skanev/playground | eval.scm | (define-datatype proc proc?
(procedure
(body expression?)
(saved-nameless-env nameless-environment?)))
(define (apply-procedure proc1 val)
(cases proc proc1
(procedure (body saved-nameless-env)
(value-of body (extend-nameless-env val saved-nameless-env)))))
(define-datatype expval expval?
(num... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/03/cases/nameless/eval.scm | scheme | (define-datatype proc proc?
(procedure
(body expression?)
(saved-nameless-env nameless-environment?)))
(define (apply-procedure proc1 val)
(cases proc proc1
(procedure (body saved-nameless-env)
(value-of body (extend-nameless-env val saved-nameless-env)))))
(define-datatype expval expval?
(num... | |
51aa16922bb6055a0bc9109cb17e74e663f4d59e8c52d3bbdc66a15bbb8bd297 | naoiwata/sicp | 2.4.2.scm | ;; @author naoiwata
SICP Chapter2
2.4.2 Tagged data
(define (attach-tag type-tag contents)
(cons type-tag contents))
(define (type-tag datum)
(if (pair? datum)
(car datum)
(error "BAD TAGGED DATUM -- TYPE-TAG" datum)))
(define (contents datum)
(if (pair? datum)
(car datum)
(error "B... | null | https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter2/pages/2.4.2.scm | scheme | @author naoiwata
Tagged
use these type tagged data
END | SICP Chapter2
2.4.2 Tagged data
(define (attach-tag type-tag contents)
(cons type-tag contents))
(define (type-tag datum)
(if (pair? datum)
(car datum)
(error "BAD TAGGED DATUM -- TYPE-TAG" datum)))
(define (contents datum)
(if (pair? datum)
(car datum)
(error "BAD TAGGED DATUM -- C... |
cf11285ac7bf9334d2603d598288984815ed52797ba730e6c9e71f93b2586458 | pelle/bux | calc.cljc | (ns bux.calc
(:require [bux.currencies :as currencies]
[bux.core :as bux]))
(defn pct
"Calculate percentage of value"
([x p] (pct currencies/default$ x p))
([c x p]
(bux/round$ c (* (/ x 100) p))))
(defn pct+
"calculate and add percentage of value"
([x p] (pct+ currencies/default$ x p))
... | null | https://raw.githubusercontent.com/pelle/bux/f16462b84b007ba5231f2d6b7b779fe1a695229d/src/bux/calc.cljc | clojure | (ns bux.calc
(:require [bux.currencies :as currencies]
[bux.core :as bux]))
(defn pct
"Calculate percentage of value"
([x p] (pct currencies/default$ x p))
([c x p]
(bux/round$ c (* (/ x 100) p))))
(defn pct+
"calculate and add percentage of value"
([x p] (pct+ currencies/default$ x p))
... | |
3f3df44c7d47b663f4bba033a86d3b1e03863757ec68afadf86c2b36b4afef91 | ghc/ghc | Eval.hs | # LANGUAGE CPP #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE RecordWildCards #
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
-- -----------------------------------------------------------------------------
--
( c ) The University of Glasgow , 2005 - 2007
--
-- Running statements interactively
--
-- --------------... | null | https://raw.githubusercontent.com/ghc/ghc/93f0e3c49cea484bd6e838892ff8702ec51f34c3/compiler/GHC/Runtime/Eval.hs | haskell | # LANGUAGE BangPatterns #
-----------------------------------------------------------------------------
Running statements interactively
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
running a statement... | # LANGUAGE CPP #
# LANGUAGE RecordWildCards #
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
( c ) The University of Glasgow , 2005 - 2007
module GHC.Runtime.Eval (
Resume(..), History(..),
execStmt, execStmt', ExecOptions(..), execOptions, ExecResult(..), resumeExec,
runDecls, runDecls... |
f9d19b0ad72483a74be1a067d41e3ed758d44e5cb9fc77880415b268a6e5adc8 | ajg/yocto | Yocto.hs | Copyright 2014 ( ) -- see LICENSE.md for more .
-- | A Minimal JSON Parser & Printer
module Text.JSON.Yocto (decode, encode, Value (..)) where
import Control.Applicative hiding ((<|>), many)
import Data.Char (chr, isControl, ord)
import Data.List (find, intercalate)
import Data.Map (fromList, Map, toList)
impor... | null | https://raw.githubusercontent.com/ajg/yocto/8473c356a58913c409d99b88a70d58c7e0862706/Text/JSON/Yocto.hs | haskell | see LICENSE.md for more .
| A Minimal JSON Parser & Printer
| Represents arbitrary JSON data.
| Encodes a 'Value' to a 'String'.
| Decodes a 'Value' from a 'String'. |
module Text.JSON.Yocto (decode, encode, Value (..)) where
import Control.Applicative hiding ((<|>), many)
import Data.Char (chr, isControl, ord)
import Data.List (find, intercalate)
import Data.Map (fromList, Map, toList)
import Data.Maybe (fromJust)
import Data.Ratio ((%), denominator, numerator)
import Prelude hidi... |
3105d7c6acdf6d9e5a166a9181a2682e94f191bc7f68b5bae107cebb388d875c | DHSProgram/DHS-Indicators-SPSS | FG_GIRLS.sps | * Encoding: UTF-8.
*****************************************************************************************************
Program: FG_GIRLS.sps
Purpose: Code to compute female circumcision indicators among girls 0-14
Data inputs: BR dataset
Data outputs: coded variables
Author: Tom Pullum and Shireen Assaf a... | null | https://raw.githubusercontent.com/DHSProgram/DHS-Indicators-SPSS/578e6d40eff9edebda7cf0db0d9a0a52a537d98c/Chap18_FG/FG_GIRLS.sps | scheme | * Encoding: UTF-8.
*****************************************************************************************************
Program: FG_GIRLS.sps
Purpose: Code to compute female circumcision indicators among girls 0-14
Data inputs: BR dataset
Data outputs: coded variables
Author: Tom Pullum and Shireen Assaf a... | |
302fa335ccb10ad439ab8dae337e5676e884d43344395c0a0032cadf81521d77 | sheyll/newtype-zoo | Responded.hs | -- | Indicate that something was `Responded`.
module NewtypeZoo.Responded
( Responded(Responded)
, _theResponded
, theResponded
) where
import Control.DeepSeq (NFData)
import Control.Monad.Fix (MonadFix)
import Control.Monad.Zip (MonadZip)
import Data.Bits (Bits,Fi... | null | https://raw.githubusercontent.com/sheyll/newtype-zoo/0e67717cbcd9233d9c26b6aacb4c6f8bba6ef5f7/src/NewtypeZoo/Responded.hs | haskell | | Indicate that something was `Responded`. | module NewtypeZoo.Responded
( Responded(Responded)
, _theResponded
, theResponded
) where
import Control.DeepSeq (NFData)
import Control.Monad.Fix (MonadFix)
import Control.Monad.Zip (MonadZip)
import Data.Bits (Bits,FiniteBits)
import Data.Copointed (Co... |
4880d6b77b6f3cc921e9ffb895f12cad593680ac9d13936d47c7d4e125f17d1d | spechub/Hets | Parse.hs | |
Module : / Parse.hs
Copyright : ( c ) : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
RDF syntax parser
Module : ./RDF/Parse.hs
Copyright : (c) Felix Gabriel Mance
License : GPLv2 or higher, see LICEN... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/RDF/Parse.hs | haskell | * hets symbols parser
| parse a possibly kinded list of comma separated symbol pairs
| parse a comma separated list of uri pairs
* turtle syntax parser
return $ trace (show $ Map.union predefinedPrefixes (prefixMap td)) td | |
Module : / Parse.hs
Copyright : ( c ) : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
RDF syntax parser
Module : ./RDF/Parse.hs
Copyright : (c) Felix Gabriel Mance
License : GPLv2 or higher, see LICEN... |
e05e3670716c5fd81628a339ed521a8e08278578fc7b88be0b66e8a64288350b | melange-re/melange | caml_bytes.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/melange-re/melange/13edf6108d884e64cd510bce077ef2ce73de6a97/jscomp/runtime/caml_bytes.ml | ocaml | Node raise [RangeError] exception
* Same as {!Array.prototype.copyWithin}
nop for i1 = i2
TODO: when the compiler could optimize small function calls,
use high order functions instead
*
TODO: [min] is not type specialized in OCaml
* checkout [Bytes.empty] -- to be inlined?
Note that when get a char and ... | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.