_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 |
|---|---|---|---|---|---|---|---|---|
2979a29466002f8893e9b932889b3cfd6aa72c72f7d88b1b32bc3ab32198f363 | IndecisionTree/adventofcode2022 | Day21.hs | module Days.Day21 (day21) where
import AOC (Solution (..))
import qualified Data.Text as T
day21 :: Solution
day21 = Solution parseInput part1 part2
parseInput :: T.Text -> a
parseInput = error "parseInput not defined for day 21"
part1 :: a -> Int
part1 = error "part1 not defined for day 21"
part2 :: a -> Int
part... | null | https://raw.githubusercontent.com/IndecisionTree/adventofcode2022/9fce98a2cd0b18d26d2d369f8933b9abba0109ba/solutions/Days/Day21.hs | haskell | module Days.Day21 (day21) where
import AOC (Solution (..))
import qualified Data.Text as T
day21 :: Solution
day21 = Solution parseInput part1 part2
parseInput :: T.Text -> a
parseInput = error "parseInput not defined for day 21"
part1 :: a -> Int
part1 = error "part1 not defined for day 21"
part2 :: a -> Int
part... | |
433aa45b9f5190caad753cf1cadfc3819d1b7f57082db18bb80b0eb8ef54a3a4 | ryanpbrewster/haskell | Foo.hs | module Fake.Foo
( a
, b
, c
) where
a x = x
b x = x*x
c x = x*x*x
| null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/Fake/Foo.hs | haskell | module Fake.Foo
( a
, b
, c
) where
a x = x
b x = x*x
c x = x*x*x
| |
7cd7fde9789a23d360d41ecfd33fd8c62c09908af4dd867f149c1cc1cfff70c3 | herd/herdtools7 | checkName.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/aba96608b33be9f7e29c266c65214393b5e1370c/lib/checkName.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2012 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
ffeda326fa6bd4fb8523e7ff6546064fbda2ad673267faa7f9df1012e979bb91 | dwayne/eopl3 | interpreter.rkt | #lang eopl
(require "./env.rkt")
(require "./parser.rkt")
(provide
;; Expressed Values
num-val bool-val list-val
;; Interpreter
run)
(define (run s)
(let ([init-env (extend-env
'i (num-val 1)
(extend-env
'v (num-val 5)
(extend-env
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/05-ch5/interpreters/racket/EXCEPTIONS-5.40/interpreter.rkt | racket | Expressed Values
Interpreter
FinalAnswer = ExpVal
Continuations
Cont x ExpVal -> FinalAnswer
apply-hanlder : ExpVal -> Cont -> Cont -> FinalAnswer
Procedure ADT
Values
ExpVal = Int + Bool + Proc + List[EvalVal] + Cont | #lang eopl
(require "./env.rkt")
(require "./parser.rkt")
(provide
num-val bool-val list-val
run)
(define (run s)
(let ([init-env (extend-env
'i (num-val 1)
(extend-env
'v (num-val 5)
(extend-env
'x (num-val 10)
... |
c30d1294f460e2412d64d9d29a27a324a2940ac1e7d1a00698ae6610903cd9ef | rabbitmq/ra | ra_log.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2017 - 2022 VMware , Inc. or its affiliates . All rights reserved .
%%
%% @hidden
-module(ra_log).
-compile([inline_list... | null | https://raw.githubusercontent.com/rabbitmq/ra/0bc77736a7d700f531e54502f02faade11d28d15/src/ra_log.erl | erlang |
@hidden
config
external reader
logs can have effects too so that they can be coordinated with other state
such as avoiding to delete old snapshots whilst they are still being
replicated
mutable data below
if this is set a snapshot write is in progress for the
index specified
this has to be patched by ra_ser... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2017 - 2022 VMware , Inc. or its affiliates . All rights reserved .
-module(ra_log).
-compile([inline_list_funcs]).
-expor... |
cbdf89281c0a82d16f3ebccbbb308b0a0e7cbf1a059d0e97e4ba8f1d76ed8d30 | clojure/core.typed | set.clj | (ns clojure.core.typed.test.set
(:require [clojure.core.typed :refer [check-ns ann cf tc-ignore print-env ann-form]
:as t])
(:import (clojure.lang APersistentSet)))
(ann bubble-max-key (t/All [x]
[[x -> Number] (t/I (t/Seqable x) (t/CountRange 2)) -> (t/Seqable x)]))
(tc-ignore
(... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/set.clj | clojure | natural join
arbitrary key mapping | (ns clojure.core.typed.test.set
(:require [clojure.core.typed :refer [check-ns ann cf tc-ignore print-env ann-form]
:as t])
(:import (clojure.lang APersistentSet)))
(ann bubble-max-key (t/All [x]
[[x -> Number] (t/I (t/Seqable x) (t/CountRange 2)) -> (t/Seqable x)]))
(tc-ignore
(... |
5e24843609e0adf36423506fcb792adf690210e413c794b604790e9062ec363e | cryptosense/pkcs11 | pkcs11_CK_GCM_PARAMS.mli | (** Parameter for [CKM_AES_GCM]. ([CK_GCM_PARAMS]) *)
type s
type t = s Ctypes.structure
val t : t Ctypes.typ
val pIv : (Pkcs11_CK_BYTE.t Ctypes_helpers.Reachable_ptr.t, t) Ctypes.field
val ulIvLen : (P11_ulong.t, t) Ctypes.field
val pAAD : (Pkcs11_CK_BYTE.t Ctypes_helpers.Reachable_ptr.t, t) Ctypes.field
val ul... | null | https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/driver/pkcs11_CK_GCM_PARAMS.mli | ocaml | * Parameter for [CKM_AES_GCM]. ([CK_GCM_PARAMS]) |
type s
type t = s Ctypes.structure
val t : t Ctypes.typ
val pIv : (Pkcs11_CK_BYTE.t Ctypes_helpers.Reachable_ptr.t, t) Ctypes.field
val ulIvLen : (P11_ulong.t, t) Ctypes.field
val pAAD : (Pkcs11_CK_BYTE.t Ctypes_helpers.Reachable_ptr.t, t) Ctypes.field
val ulAADLen : (P11_ulong.t, t) Ctypes.field
val ulTagBits ... |
939eb8bc4f7c4a144e81274a492a17fa37a0059f2bc1352cff6d27127cd4db76 | liquidz/iced-nrepl | namespace.clj | (ns iced.nrepl.namespace
(:require
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.set :as set]
[clojure.string :as str]
[orchard.namespace :as o.ns]))
(defn ^{:doc "Returns all namespaces in the project."
:requires {}
:optional {}
:returns {"project-ns-list" "Namespace... | null | https://raw.githubusercontent.com/liquidz/iced-nrepl/f63ae00385be912196fceb9d26e174cc5d68295a/src/iced/nrepl/namespace.clj | clojure | (ns iced.nrepl.namespace
(:require
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.set :as set]
[clojure.string :as str]
[orchard.namespace :as o.ns]))
(defn ^{:doc "Returns all namespaces in the project."
:requires {}
:optional {}
:returns {"project-ns-list" "Namespace... | |
bc50c913b93d56c3e321ec62b2c55a5fe47fe76c271066add7953e82f82972cc | ianmbloom/gudni | ShapeTree.hs | # LANGUAGE UndecidableInstances #
# LANGUAGE GADTs #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE Multi... | null | https://raw.githubusercontent.com/ianmbloom/gudni/fa69f1bf08c194effca05753afe5455ebae51234/src/Graphics/Gudni/Figure/ShapeTree.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE Rank2Types #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
# LANGUAGE StandaloneDeriving #
---------------------------------------------------------------------------... | # LANGUAGE UndecidableInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
Copyright : ( c ) 2019
Maintainer :
A ShapeTree is the main input data structure for the . A client program
module Graph... |
18222ac4380b594fa07fc43f9e6ae0cadc540368a1f0f7d8fc3bf4886084f204 | cmiles74/scraper | core_test.clj | (ns scraper.core-test
(:require [clojure.test :refer :all]
[scraper.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/cmiles74/scraper/73aec8d8c87ec52d03642f36ccec67990c973b8f/test/scraper/core_test.clj | clojure | (ns scraper.core-test
(:require [clojure.test :refer :all]
[scraper.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
f067d260a959a123443d81f03a7cd0256601562eab1a25adc13c06b3ac0c45e3 | avsm/platform | automata.ml |
RE - A regular expression library
Copyright ( C ) 2001
email :
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 , with
linking exception ; either version ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/re.1.9.0/lib/automata.ml | ocaml | **
**
**
**
**
*** Find a free index ***
*** Computation of the next state ***
Format.eprintf "%d@." x.id;
**
**
** |
RE - A regular expression library
Copyright ( C ) 2001
email :
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 , with
linking exception ; either version ... |
c0f051f851340e1019fc759c85250188b4a24120477dc588082f88ee68fb1c21 | fdedden/language-c99-util | IsList.hs | # LANGUAGE OverloadedLists #
# LANGUAGE TypeFamilies #
module Language.C99.Util.IsList where
import GHC.Exts
import Language.C99.AST
error_emptylist name = error $ "Empty " ++ name ++ " is not allowed"
instance IsList TypeQualList where
type Item TypeQualList = TypeQual
fromList [] = error_emptylist "TypeQ... | null | https://raw.githubusercontent.com/fdedden/language-c99-util/e5a123b27867e5a235d6ab8ea5217b18b6faf621/src/Language/C99/Util/IsList.hs | haskell | # LANGUAGE OverloadedLists #
# LANGUAGE TypeFamilies #
module Language.C99.Util.IsList where
import GHC.Exts
import Language.C99.AST
error_emptylist name = error $ "Empty " ++ name ++ " is not allowed"
instance IsList TypeQualList where
type Item TypeQualList = TypeQual
fromList [] = error_emptylist "TypeQ... | |
1cd830ae5802dc176f6fe164a9a071628755ec7596112e3c49eeee6c5df8dbec | returntocorp/semgrep | token_cpp.mli | type cppcommentkind =
| CppDirective
| CppAttr
| CppMacro
| CppMacroExpanded
| CppPassingNormal (* ifdef 0, cplusplus, etc *)
| CppPassingCosWouldGetError (* expr passsing *)
| CppOther
type cpluspluscommentkind = CplusplusTemplate | CplusplusQualifier
| null | https://raw.githubusercontent.com/returntocorp/semgrep/00f1e67bbb80f00e29db3381288fc00398b6868a/languages/cpp/menhir/token_cpp.mli | ocaml | ifdef 0, cplusplus, etc
expr passsing | type cppcommentkind =
| CppDirective
| CppAttr
| CppMacro
| CppMacroExpanded
| CppOther
type cpluspluscommentkind = CplusplusTemplate | CplusplusQualifier
|
d6b10dfffe7b6adffe2a3a975ec27cc2f97c7c24a09ee40665027f536146c0d9 | Clozure/ccl-tests | dotimes.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Jan 8 07:27:15 2005
Contains : Tests of DOTIMES
(in-package :cl-test)
(deftest dotimes.1
(dotimes (i 10))
nil)
(deftest dotimes.2
(dotimes (i 10 'a))
a)
(deftest dotimes.3
(dotimes (i 10 (values))))
(deftest dotimes.3a
(dotimes (i 10 (value... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/dotimes.lsp | lisp | -*- Mode: Lisp -*-
Implicit nil block has the right scope
Check there's an implicit tagbody
Check that at the time the result form is evaluated,
the index variable is set to the number of times the loop
was executed.
Check that the variable is not bound in the count form
Check special variable decls
Scope o... | Author :
Created : Sat Jan 8 07:27:15 2005
Contains : Tests of DOTIMES
(in-package :cl-test)
(deftest dotimes.1
(dotimes (i 10))
nil)
(deftest dotimes.2
(dotimes (i 10 'a))
a)
(deftest dotimes.3
(dotimes (i 10 (values))))
(deftest dotimes.3a
(dotimes (i 10 (values 'a 'b 'c)))
a b c)
... |
c4cb7b36afe43e18be03325246ab70ad8402081aa6c96d450e9abbbd22f0fdac | AnyChart/export-server | cmd_handlers.clj | (ns export-server.handlers.cmd-handlers
(:require [export-server.utils.rasterizator :as rasterizator]
[export-server.browser.core :as browser]
[clojure.java.io :as io]
[clojure.string :as string])
(:import (org.apache.commons.io FilenameUtils)
(org.apache.commons.lang3... | null | https://raw.githubusercontent.com/AnyChart/export-server/0ef2f084e07aaa144e38dff30e3283f686de1108/src/export_server/handlers/cmd_handlers.clj | clojure | =======================================================================================================================
Helpers
=======================================================================================================================
=======================================================================... | (ns export-server.handlers.cmd-handlers
(:require [export-server.utils.rasterizator :as rasterizator]
[export-server.browser.core :as browser]
[clojure.java.io :as io]
[clojure.string :as string])
(:import (org.apache.commons.io FilenameUtils)
(org.apache.commons.lang3... |
21125e507af327fd037ffe57ecfd53c72a08d026ec7c1233b9c1feef7c4a06de | travelping/enit | enit_posix.erl | Copyright ( c ) 2011 - 2012 by Travelping GmbH < >
%% Permission is hereby granted, free of charge, to any person obtaining a
%% copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction , including without limitation
%% the rights to use, copy, modify,... | null | https://raw.githubusercontent.com/travelping/enit/09a7676e32b4f2935522565104bf38b6fffcb297/src/enit_posix.erl | erlang | Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Software is furnished to do so, subject to the following conditions:
The above copyright notice... | Copyright ( c ) 2011 - 2012 by Travelping GmbH < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF... |
ff2d2dc87c5d3904d1413b0fa06480d6f3efaa5f3f32119cfc8296f1bb75e23e | eckyputrady/haskell-scotty-realworld-example-app | HTTP.hs | module Feature.Comment.HTTP
( routes
, Service(..)
) where
import ClassyPrelude hiding (delete)
import Feature.Comment.Types
import Feature.Auth.Types
import Feature.Common.HTTP
import qualified Feature.Auth.HTTP as Auth
import Web.Scotty.Trans
import Network.HTTP.Types.Status
import qualified Text.... | null | https://raw.githubusercontent.com/eckyputrady/haskell-scotty-realworld-example-app/366a1eec021fb1bfcbc2d8e0485b59cbedba10e5/src/Feature/Comment/HTTP.hs | haskell | module Feature.Comment.HTTP
( routes
, Service(..)
) where
import ClassyPrelude hiding (delete)
import Feature.Comment.Types
import Feature.Auth.Types
import Feature.Common.HTTP
import qualified Feature.Auth.HTTP as Auth
import Web.Scotty.Trans
import Network.HTTP.Types.Status
import qualified Text.... | |
486785c727af9d0ad2c6e56f0f42574523ffb83ddf128ced30e3d1c3081c9968 | c-cube/ocaml-containers | CCEqual.ml | (* This file is free software, part of containers. See file "license" for more details. *)
(** {1 Equality Combinators} *)
open CCShims_
type 'a t = 'a -> 'a -> bool
let poly = Stdlib.( = )
let physical = Stdlib.( == )
let int : int t = ( = )
let string : string t = Stdlib.( = )
let bool : bool t = Stdlib.( = )
let... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/core/CCEqual.ml | ocaml | This file is free software, part of containers. See file "license" for more details.
* {1 Equality Combinators} |
open CCShims_
type 'a t = 'a -> 'a -> bool
let poly = Stdlib.( = )
let physical = Stdlib.( == )
let int : int t = ( = )
let string : string t = Stdlib.( = )
let bool : bool t = Stdlib.( = )
let float : float t = Stdlib.( = )
let unit () () = true
let rec list f l1 l2 =
match l1, l2 with
| [], [] -> true
| []... |
437c23f3296531a26b716426f2d1bcf932cb150b89ff7cfd1d49054ca6afb314 | samrat/ecstatic | core.clj | (ns ecstatic.core
(:gen-class)
(:use [filevents.core]
[hiccup.core]
[hiccup.page :only [html5]]
[clj-time.core :only [year month day]]
[clj-time.format :only [parse
unparse
formatter
forma... | null | https://raw.githubusercontent.com/samrat/ecstatic/ee7e33eef6baec1a4f0b80453c1c477058e0a707/src/ecstatic/core.clj | clojure | Other metadata
blogpost or page.
(assoc :content (file-content file))
Update last-modified timestamp for each tag in post
Feed
for feed analytics | (ns ecstatic.core
(:gen-class)
(:use [filevents.core]
[hiccup.core]
[hiccup.page :only [html5]]
[clj-time.core :only [year month day]]
[clj-time.format :only [parse
unparse
formatter
forma... |
125b3e9dbb6e5fef1f5342d8145e4dbfd0b19941c88c9d485960c10e6a845c52 | cabol/erlbus | ebus_ps_local.erl | %%%-------------------------------------------------------------------
%%% @doc
This is an Erlang clone of the original ` Phoenix . PubSub . Local '
%%% module.
Copyright ( c ) 2014
%%% @reference See
< a href=" / phoenixframework / phoenix">Phoenix</a >
%%% @end
%%%---------------------------------------------... | null | https://raw.githubusercontent.com/cabol/erlbus/050cb728ef09a0ad51c9297281602e362b5e233d/src/pubsub/ebus_ps_local.erl | erlang | -------------------------------------------------------------------
@doc
module.
@reference See
@end
-------------------------------------------------------------------
API
gen_server callbacks
===================================================================
Types
=============================================... | This is an Erlang clone of the original ` Phoenix . PubSub . Local '
Copyright ( c ) 2014
< a href=" / phoenixframework / phoenix">Phoenix</a >
-module(ebus_ps_local).
-behaviour(gen_server).
-export([
start_link/2,
subscribe/4,
subscribe/5,
unsubscribe/4,
broadcast/5,
subscribers/3,
subscribers... |
66a23c3febd909260260b444d6755645af1fb6c72d3512bdfc66cac847fce10e | bazurbat/chicken-scheme | tcp.import.scm | ;;;; tcp.import.scm - import library for "tcp" module
;
Copyright ( c ) 2008 - 2016 , The CHICKEN Team
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
; conditions are met:
;
; Redistributions of source code must r... | null | https://raw.githubusercontent.com/bazurbat/chicken-scheme/f0c9d1fd8b68eb322e320e65ec40b0bf7d1b41dc/tcp.import.scm | scheme | tcp.import.scm - import library for "tcp" module
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions an... | Copyright ( c ) 2008 - 2016 , The CHICKEN Team
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE... |
4300f77a0d6f0f036b5f6842b7116d759f1fe221d886febb0969f2ba7dee0863 | erlangonrails/devdb | json.erl | ( % % Copyright ( c ) 2005 - 2006 , A2Z Development USA , Inc. All Rights Reserved .
%%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%%% compliance with the License. You should have received a copy of the
%%% Erlang P... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/contrib/yaws/src/json.erl | erlang | % Copyright ( c ) 2005 - 2006 , A2Z Development USA , Inc. All Rights Reserved .
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved via the world wide web at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or i... | The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Initial Developer of the Original Code is A2Z Development USA , Inc.
All Rights Reserved .
-mo... |
b1b24c3f2493e7a68c98a02c6c2584657619d5d8577aa7ff6827b823f5c22c27 | coq-community/vscoq | dm_tests.ml | (**************************************************************************)
(* *)
(* VSCoq *)
(* *)
(* ... | null | https://raw.githubusercontent.com/coq-community/vscoq/fc7f4449256b1d60e4ef18b2ade4dd1efd4a7f8d/language-server/tests/dm_tests.ml | ocaml | ************************************************************************
VSCoq
Copyright... | ( see version control and README file for authors & dates )
This file is distributed under the terms of the MIT License .
open Base
open Dm
open Lsp
let init_state = Vernacstate.freeze_full_state ~marshallable:false
let init text =
DocumentManager.init init_state ~opts:[] ~uri:"doc" ~te... |
36ac261c59d700b897eae586d4e9c79b4f72c97d7e896f2cce877bd9d71915ff | mu-chaco/ReWire | uniquification.hs | import ReWire
data G a b c = G a | Z b | D c
data Pup a b c d = Q d | R d d | Zuh a b c d
guppy :: a -> G a z w
guppy c = let c = c in
case c of
c -> G c
d -> G d
start :: ReT (Pup () () () ()) (G () () ()) I ()
start = do
signal $ Z ()
start
main = undefined
| null | https://raw.githubusercontent.com/mu-chaco/ReWire/a8dcea6ab0989474988a758179a1d876e2c32370/tests/regression/uniquification.hs | haskell | import ReWire
data G a b c = G a | Z b | D c
data Pup a b c d = Q d | R d d | Zuh a b c d
guppy :: a -> G a z w
guppy c = let c = c in
case c of
c -> G c
d -> G d
start :: ReT (Pup () () () ()) (G () () ()) I ()
start = do
signal $ Z ()
start
main = undefined
| |
b6ce06a42b64d398249ee9717ba00aec19e70f06f6c978c08691279aae376817 | engstrand-config/farg | colorscheme.scm | (define-module (guix scripts colorscheme)
#:use-module (guix ui)
#:use-module (guix scripts)
#:use-module (guix combinators)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (guix i18n)
#:use-module (guix diagnostics)
#:use-module (guix read-print)
#:use-module (ice-9 popen)
#:use... | null | https://raw.githubusercontent.com/engstrand-config/farg/2297d984a88709d3f1948949d6dc95992a4ae207/guix/scripts/colorscheme.scm | scheme | XXX: Imperatively modify the search paths.
Treat all non-option arguments as package specs.
Actions
| (define-module (guix scripts colorscheme)
#:use-module (guix ui)
#:use-module (guix scripts)
#:use-module (guix combinators)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (guix i18n)
#:use-module (guix diagnostics)
#:use-module (guix read-print)
#:use-module (ice-9 popen)
#:use... |
7ebaa83eb1df4323648a264a0144a32d000458a3848dceb9b5d8756f8d197406 | ifigueroap/racket-quickcheck | result.rkt | #lang racket/base
(provide (struct-out result)
result-with-ok result-add-stamp result-add-arguments nothing)
;; ok : () = unknown, #t, #f
;; arguments-list : (list (list (pair (union #f symbol) value)))
(define-struct result (ok stamp arguments-list))
(define (result-with-ok res ok)
(make-res... | null | https://raw.githubusercontent.com/ifigueroap/racket-quickcheck/902eb30fa8f5c0df7910df22c1442ff866b3920d/quickcheck/private/result.rkt | racket | ok : () = unknown, #t, #f
arguments-list : (list (list (pair (union #f symbol) value)))
result (list (pair (union #f symbol) value)) -> result | #lang racket/base
(provide (struct-out result)
result-with-ok result-add-stamp result-add-arguments nothing)
(define-struct result (ok stamp arguments-list))
(define (result-with-ok res ok)
(make-result ok
(result-stamp res)
(result-arguments-list res)))
(define (result-add-stamp res sta... |
d53020e0c89e51d510687f1a7e8c19d622f3304d2f41e125bd4b941e7631db1c | lokedhs/mastodon | post.lisp | (in-package :mastodon-gui)
(declaim (optimize (speed 0) (safety 3) (debug 3)))
(defclass post-content ()
())
(defparameter *editor-pane-border* (clim:make-rgb-color 0 0 0))
(defclass post-text-record (climi::accepting-values-record)
((editor :accessor post-text-record/editor)))
(defmethod climi::select-query (... | null | https://raw.githubusercontent.com/lokedhs/mastodon/ccef44a47702bae5336f1c41c4dd3ff07caa9b18/src/post.lisp | lisp | (in-package :mastodon-gui)
(declaim (optimize (speed 0) (safety 3) (debug 3)))
(defclass post-content ()
())
(defparameter *editor-pane-border* (clim:make-rgb-color 0 0 0))
(defclass post-text-record (climi::accepting-values-record)
((editor :accessor post-text-record/editor)))
(defmethod climi::select-query (... | |
12d9884e210b23b08319713ea681b0deac599e186bd73b124dc154f6ecd0b634 | softwarelanguageslab/maf | R5RS_scp1_ring-squares-2.scm | ; Changes:
* removed : 0
* added : 1
* swaps : 1
; * negated predicates: 0
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((result ())
(output (lambda (i)
(set! result (cons i result))))
(kw-lijst (lambda (lst)
(letrec ((loop (lambda (l)
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_ring-squares-2.scm | scheme | Changes:
* negated predicates: 0
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 1
* swaps : 1
(letrec ((result ())
(output (lambda (i)
(set! result (cons i result))))
(kw-lijst (lambda (lst)
(letrec ((loop (lambda (l)
(let ((rest (cdr l))
... |
ca3aa4ae590afa2946a0d0c2b6189159828250f3e4271a6dc9cd3f5bde7a202c | unison-code/unison | EstimateFrequency.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Transformations/EstimateFrequency.hs | haskell | | Estimated average number of loop iterations | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... |
3ef75f6f353a4c96b0bb390149d5858845cfdb0d221fd1009a15ee94c1a0d7d3 | gedge-platform/gedge-platform | rabbit_binary_generator.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_binary_generator).
-include("rabbi... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit_common/src/rabbit_binary_generator.erl | erlang |
----------------------------------------------------------------------------
----------------------------------------------------------------------------
and V.
Intended to ensure that EMPTY_FRAME_SIZE is defined correctly.
Only clear when we can rebuild the properties_bin later in
accordance to the content recor... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_binary_generator).
-include("rabbit_fram... |
3a20fdb8e8c62423d8c892f143e35f8d7d2bc32cb2372e3c8fbd82f231f5829f | madgen/exalog | AdornmentSpec.hs | {-# OPTIONS_GHC -Wno-name-shadowing #-}
module Language.Exalog.AdornmentSpec (spec) where
import Protolude
import Test.Hspec
import qualified Fixture.Ancestor.LinearAncestor as LAnc
import qualified Fixture.Ancestor.NonLinearAncestor as NLAnc
import qualified Fixture.Ancestor.EDB as AncEDB
import Language.Exalog.A... | null | https://raw.githubusercontent.com/madgen/exalog/7d169b066c5c08f2b8e44f5e078df264731ac177/test/Language/Exalog/AdornmentSpec.hs | haskell | # OPTIONS_GHC -Wno-name-shadowing # |
module Language.Exalog.AdornmentSpec (spec) where
import Protolude
import Test.Hspec
import qualified Fixture.Ancestor.LinearAncestor as LAnc
import qualified Fixture.Ancestor.NonLinearAncestor as NLAnc
import qualified Fixture.Ancestor.EDB as AncEDB
import Language.Exalog.Adornment
import Language.Exalog.Core (de... |
eff51c90c6417e9e5bee4feff0413030b035cf7b2a1d9446141ed3926bf9ef9d | fatho/kos-c | Parser.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
module KOSC.Language.Parser where
import Control.Applicative
import Control.Monad.State
import qualified Data.HashSet as HS
import Text.Parser.Combinators
import Text.Parser.Expression
impo... | null | https://raw.githubusercontent.com/fatho/kos-c/3829ee41f71ab0bbcfc5229e1b64b5daf5cce23b/src/KOSC/Language/Parser.hs | haskell | # LANGUAGE OverloadedStrings #
* Expression Parser
| Style for type/term variable and top-level binding identifiers.
| Parses a variable identifier.
| Parses a reserved identifier.
| Parses a reserved operator.
* Statement Parser
* Declaration Parser
return type
name
generic parameters
parameters | # LANGUAGE GeneralizedNewtypeDeriving #
module KOSC.Language.Parser where
import Control.Applicative
import Control.Monad.State
import qualified Data.HashSet as HS
import Text.Parser.Combinators
import Text.Parser.Expression
import Text.Parser.LookAhead
... |
767eed0fbe43384ef49afc51819778fc7378e2391d41af447acbbe3d324db42f | jackdoe/bzzz | term_query_test.clj | (ns bzzz.term-query-test
(:use clojure.test
bzzz.core
bzzz.util
bzzz.index-store
bzzz.index-search))
(def test-index-name "__lein-test-testing-index-term-test")
(deftest test-app
(testing "cleanup-before"
(delete-all test-index-name))
(testing "query"
(let [stored (store ... | null | https://raw.githubusercontent.com/jackdoe/bzzz/ae98708056e39ada28f22aad9e43ea91695b346b/test/bzzz/term_query_test.clj | clojure | (ns bzzz.term-query-test
(:use clojure.test
bzzz.core
bzzz.util
bzzz.index-store
bzzz.index-search))
(def test-index-name "__lein-test-testing-index-term-test")
(deftest test-app
(testing "cleanup-before"
(delete-all test-index-name))
(testing "query"
(let [stored (store ... | |
4b3b9e2a1e8d94dd1d1e7828cedefafc5e714909827830fad28b302c1f33cb55 | CodyReichert/qi | temporary-files.lisp | (in-package :cl-fad)
(defparameter *default-template* "TEMPORARY-FILES:TEMP-%")
(defparameter *max-tries* 10000)
(defvar *name-random-state* (make-random-state t))
from XCVB
(eval-when (:load-toplevel :execute)
(defun getenv (x)
"Query the libc runtime environment. See getenv(3)."
(declare (ignorable x)... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cl-fad-master/temporary-files.lisp | lisp | locking for multi-threaded operation with unsafe random function | (in-package :cl-fad)
(defparameter *default-template* "TEMPORARY-FILES:TEMP-%")
(defparameter *max-tries* 10000)
(defvar *name-random-state* (make-random-state t))
from XCVB
(eval-when (:load-toplevel :execute)
(defun getenv (x)
"Query the libc runtime environment. See getenv(3)."
(declare (ignorable x)... |
69f4657d28266577acd9aed1c10e1eb8242ad38ca6714df1c3e9fefb3a82d9df | clojure/core.typed | CTYP49_unreachable.clj | (ns clojure.core.typed.test.succeed.CTYP49-unreachable
(:require [clojure.core.typed :as t]))
(t/ann ^:no-check request
['{:url String, :method ':get}
-> (t/Atom1 '{:status Number, :body String})])
(declare request)
(t/ann get-or-throw [String -> '{:status Number :body String}])
(defn get-or-throw ... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/succeed/CTYP49_unreachable.clj | clojure | (ns clojure.core.typed.test.succeed.CTYP49-unreachable
(:require [clojure.core.typed :as t]))
(t/ann ^:no-check request
['{:url String, :method ':get}
-> (t/Atom1 '{:status Number, :body String})])
(declare request)
(t/ann get-or-throw [String -> '{:status Number :body String}])
(defn get-or-throw ... | |
4038d83507f18f51f5e48eca4d4590a1fc3760f472e07d9668b113a6d51fc829 | HealthSamurai/us-npi | fhir.clj | (ns usnpi.fhir
(:require [usnpi.db :as db]
[usnpi.http :as http]
[cheshire.core :as json]
[clojure.java.io :as io]
[clojure.string :as str]))
(defn api-metadata
[request]
(let [caps (-> "FHIR/CapabilityStatement.json" io/resource slurp (json/parse-string true))]
... | null | https://raw.githubusercontent.com/HealthSamurai/us-npi/a28a8ec8d45e19fadab0528791e7de78f19dc87e/src/usnpi/fhir.clj | clojure | (ns usnpi.fhir
(:require [usnpi.db :as db]
[usnpi.http :as http]
[cheshire.core :as json]
[clojure.java.io :as io]
[clojure.string :as str]))
(defn api-metadata
[request]
(let [caps (-> "FHIR/CapabilityStatement.json" io/resource slurp (json/parse-string true))]
... | |
ac33f21076142ca56a95cc1bab32a4404a1b89a8e9ffb676535108c179794c94 | gelisam/giggles-is-you | Color.hs | {-# OPTIONS_HADDOCK hide #-}
module Graphics.Gloss.Internals.Color where
import Graphics.Gloss.Data.Color
import qualified Graphics.Rendering.OpenGL.GL as GL
import Unsafe.Coerce
| Convert one of our Colors to OpenGL 's representation .
glColor4OfColor :: Color -> GL.Color4 a
glColor4OfColor color
= ca... | null | https://raw.githubusercontent.com/gelisam/giggles-is-you/6487120b219bad80ff87a43f1d7d9fb97d17dfb5/gloss/Graphics/Gloss/Internals/Color.hs | haskell | # OPTIONS_HADDOCK hide # |
module Graphics.Gloss.Internals.Color where
import Graphics.Gloss.Data.Color
import qualified Graphics.Rendering.OpenGL.GL as GL
import Unsafe.Coerce
| Convert one of our Colors to OpenGL 's representation .
glColor4OfColor :: Color -> GL.Color4 a
glColor4OfColor color
= case rgbaOfColor color of
... |
2f49af83fd42ff99f070506b31faa071aeca446ec2b2b68bda22f94b9dc3e818 | timbod7/haskell-chart | example12-m.hs | import Graphics.Rendering.Chart.Easy
import Graphics.Rendering.Chart.Backend.Cairo
r' x y z = sqrt $ x^2 + y^2 + z^2
efield sign x y = ( sign*x/r,sign*y/r) where r = r' x y 10
bfield sign x y = (-sign*y/r^2,sign*x/r^2) where r = r' x y 10
square a s = [(x,y) | x <- range, y <- range] where range = [-a,-a+s..a] :: [Do... | null | https://raw.githubusercontent.com/timbod7/haskell-chart/8c5a823652ea1b4ec2adbced4a92a8161065ead6/wiki-examples/example12-m.hs | haskell | import Graphics.Rendering.Chart.Easy
import Graphics.Rendering.Chart.Backend.Cairo
r' x y z = sqrt $ x^2 + y^2 + z^2
efield sign x y = ( sign*x/r,sign*y/r) where r = r' x y 10
bfield sign x y = (-sign*y/r^2,sign*x/r^2) where r = r' x y 10
square a s = [(x,y) | x <- range, y <- range] where range = [-a,-a+s..a] :: [Do... | |
66a6ae7f2ff0de1aea5714d8345c600d6e066fe9dd31fec9642832b5b04890c9 | azimut/shiny | draw.lisp | (in-package :shiny)
(defvar *light-factor* 1f0)
(defvar *fbo* nil)
(defvar *sam* nil)
(defvar *lfbo* nil)
(defvar *sfbo* nil)
(defgeneric draw (actor camera))
(defmethod draw (actor camera))
(defmethod draw ((actor ground) camera)
(with-slots (buf) actor
(map-g #'ground-pipe buf
:time (mynow)
... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/examples/walls/draw.lisp | lisp | :time (mynow)
:light-factor *light-factor*
:world-view (world->view camera)
:view-clip (projection camera)))
---------------------------------------- | (in-package :shiny)
(defvar *light-factor* 1f0)
(defvar *fbo* nil)
(defvar *sam* nil)
(defvar *lfbo* nil)
(defvar *sfbo* nil)
(defgeneric draw (actor camera))
(defmethod draw (actor camera))
(defmethod draw ((actor ground) camera)
(with-slots (buf) actor
(map-g #'ground-pipe buf
:time (mynow)
... |
eea4e0318964267e73d5dd71746004c7571f6b71ac0e99fcc7fe6bcb562aced4 | bomberstudios/mtasc | uChar.ml |
* UChar - Unicode ( ISO - UCS ) characters
* Copyright ( C ) 2002 , 2003
*
* 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 2.1 of the License , ... | null | https://raw.githubusercontent.com/bomberstudios/mtasc/d7c2441310248776aa89d60f9c8f98d539bfe8de/src/extlib-dev/uChar.ml | ocaml |
* UChar - Unicode ( ISO - UCS ) characters
* Copyright ( C ) 2002 , 2003
*
* 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 2.1 of the License , ... | |
8292d28dcad76254478e02bea86ecfa3ed06707b488ab70afab40dae90778ca4 | zeromq/chumak | chumak_command_test.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(chumak_command_test).
-include_lib("eunit/include/eunit.hrl").
decode_ping_test() ->
Frame = <<4, "PING", 1, 0>>,
{ok, Comman... | null | https://raw.githubusercontent.com/zeromq/chumak/02f56f153d0c6988858483c9dd0a1c233e2aa342/test/chumak_command_test.erl | erlang | Command name "READY"
Property name "Socket-Type"
Property value "DEALER"
Property name "Identity"
Property value "HELLO"
Property name "Resource"
Property value "My-Resource"
Property name for application use
Property value for application use
Property name for big property test
Property value for big proper... | 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(chumak_command_test).
-include_lib("eunit/include/eunit.hrl").
decode_ping_test() ->
Frame = <<4, "PING", 1, 0>>,
{ok, Comman... |
82548d0db1a10a332ecc52a7e08cdeadf1e1d1284cb937a6d58a0ba023f4dc53 | spurious/sagittarius-scheme-mirror | %3a86.scm | -*- mode : scheme ; coding : utf-8 ; -*-
;;;
;;; mu-and-nu.scm - SRFI-86 library.
;;;
Copyright ( c ) 2010 - 2012 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Red... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/srfi/%253a86.scm | scheme | coding : utf-8 ; -*-
mu-and-nu.scm - SRFI-86 library.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of cond... | Copyright ( c ) 2010 - 2012 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(library (srfi :86)
(export :all)
(im... |
609d983cc591affc4bd428cc06e74078c465a68134e9f1713d43d9acd43cd0ad | CryptoKami/cryptokami-core | Functions.hs | # LANGUAGE AllowAmbiguousTypes #
-- | Different key/value serialization helpers abstracted over
-- 'MonadDB'.
module Pos.DB.Functions
(
-- * Encoded putting/getting
dbGetBi
, dbGetBiNoVersion
, dbPutBi
, dbPutBiNoVersion
, dbSerializeValue
-- * Decoding/encod... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/db/Pos/DB/Functions.hs | haskell | | Different key/value serialization helpers abstracted over
'MonadDB'.
* Encoded putting/getting
* Decoding/encoding primitives and iteration related
| Read serialized value associated with given key from pure DB.
| Write serializable value to DB for given key.
| Read serialized value (with version) associated w... | # LANGUAGE AllowAmbiguousTypes #
module Pos.DB.Functions
(
dbGetBi
, dbGetBiNoVersion
, dbPutBi
, dbPutBiNoVersion
, dbSerializeValue
, dbDecode
, encodeWithKeyPrefix
, processIterEntry
) where
import Universum
import qualified Data.... |
10b0e98de1144e33e0b627d42d0ba08fbcb7d76088a01cea5654b217f64288fc | Tim-ats-d/Postem-markup | common.ml | include Stdlib_ext
module Ctx = Ctx
module Enumerate = Enumerate
module Err = Err
| null | https://raw.githubusercontent.com/Tim-ats-d/Postem-markup/97b470ff794a2c2a32c5127bdb4296fcec7d2fe7/src/common/common.ml | ocaml | include Stdlib_ext
module Ctx = Ctx
module Enumerate = Enumerate
module Err = Err
| |
6aa882476644b9a8ba2d1d94ecb1a544653053d98c624308fc4e3d07f6ad432e | grin-compiler/grin | SimpleDeadParameterElimination.hs | # LANGUAGE LambdaCase , TupleSections #
module Transformations.Optimising.SimpleDeadParameterElimination where
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe (mapMaybe)
import Control.Monad (msum)
import Data.Maybe
import Data.Functor.Fo... | null | https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/Transformations/Optimising/SimpleDeadParameterElimination.hs | haskell | ignore if the name is used in its original pos
ignore if the name is used in its original pos
Checks if the given name are present in the value and and return
Just name if is there, otherwise Nothing.
Collect all the arguments that are referred in the given val
Collect the name if is an argument
Collect the nam... | # LANGUAGE LambdaCase , TupleSections #
module Transformations.Optimising.SimpleDeadParameterElimination where
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe (mapMaybe)
import Control.Monad (msum)
import Data.Maybe
import Data.Functor.Fo... |
fc735af020e61d21eff5c98cb83f72024d08f4b38111b47c2ac9f2026f41cd76 | phadej/cabal-extras | Example.hs | --
-- This module is derivative of
--
Copyright ( c ) 2009 - 2018 < >
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
-... | null | https://raw.githubusercontent.com/phadej/cabal-extras/378cac5495b829794d67f243b27a9317eeed0858/cabal-docspec/src/CabalDocspec/Doctest/Example.hs | haskell |
This module is derivative of
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following condition... | Copyright ( c ) 2009 - 2018 < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRE... |
ff33f13ecc18b18ed99e443bc619465cf02df7301c3f77e9437b12a4491fcfe8 | ocaml-sf/learn-ocaml-corpus | cycle.ml | let make (n : int) (x : 'a) : 'a parray =
let data = Array.make n x in
ref (Array { data })
let set (base : 'a parray) (i : int) (value : 'a) =
ref (Apply { base; i; value })
let rec revert (a : 'a parray) : 'a array =
match !a with
| Array { data } ->
data
| Apply { base; i; value } ->
let da... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/persistent_arrays/wrong/cycle.ml | ocaml | wrong! | let make (n : int) (x : 'a) : 'a parray =
let data = Array.make n x in
ref (Array { data })
let set (base : 'a parray) (i : int) (value : 'a) =
ref (Apply { base; i; value })
let rec revert (a : 'a parray) : 'a array =
match !a with
| Array { data } ->
data
| Apply { base; i; value } ->
let da... |
a8a401eb909db05e71d186b95bbdcc4c8270441631669ee7a91958ce7055c113 | imandra-ai/fix-engine | t_message.ml | module Q = QCheck
let assert_eq_int i j =
if i <> j then (
Printf.eprintf "not equal: %d and %d\n%!" i j;
assert false
)
let q_msg : Message.t Q.arbitrary =
Q.(small_list (pair small_string small_string))
module Checksum = struct
let get_checksum_ref msg =
let checksum s =
let rec chsum i v... | null | https://raw.githubusercontent.com/imandra-ai/fix-engine/42f3c4f3ca432469969e89e461ca76b52c21f282/tests/unit/core-util-msg/t_message.ml | ocaml | module Q = QCheck
let assert_eq_int i j =
if i <> j then (
Printf.eprintf "not equal: %d and %d\n%!" i j;
assert false
)
let q_msg : Message.t Q.arbitrary =
Q.(small_list (pair small_string small_string))
module Checksum = struct
let get_checksum_ref msg =
let checksum s =
let rec chsum i v... | |
ac2089fcd766c0926d7651b59061d9203788d62df3dad5d672efc092f888dcb0 | d-cent/mooncake | view_helpers.clj | (ns mooncake.view.view-helpers
(:require [ring.util.anti-forgery :refer [anti-forgery-field]]
[net.cgrand.enlive-html :as html]
[net.cgrand.jsoup :as jsoup]
[clojure.tools.logging :as log]
[mooncake.routes :as routes]
[mooncake.translation :as translation]
... | null | https://raw.githubusercontent.com/d-cent/mooncake/eb16b7239e7580a73b98f7cdacb324ab4e301f9c/src/mooncake/view/view_helpers.clj | clojure | (ns mooncake.view.view-helpers
(:require [ring.util.anti-forgery :refer [anti-forgery-field]]
[net.cgrand.enlive-html :as html]
[net.cgrand.jsoup :as jsoup]
[clojure.tools.logging :as log]
[mooncake.routes :as routes]
[mooncake.translation :as translation]
... | |
7d0c6fc16dcc359c5086e48555235f6026a47dfc18b0979236a18924eb74a941 | logseq/logseq | repo.cljs | (ns frontend.components.repo
(:require [clojure.string :as string]
[frontend.components.widgets :as widgets]
[frontend.config :as config]
[frontend.context.i18n :refer [t]]
[frontend.db :as db]
[frontend.handler.repo :as repo-handler]
[frontend.h... | null | https://raw.githubusercontent.com/logseq/logseq/917a8aa098810c42e05877752d7e02981b917fe4/src/main/frontend/components/repo.cljs | clojure | exclude current repo
show full path on hover
Brings to the repos page for showing fallback message
show full path on hover
show switch to if there are multiple repos | (ns frontend.components.repo
(:require [clojure.string :as string]
[frontend.components.widgets :as widgets]
[frontend.config :as config]
[frontend.context.i18n :refer [t]]
[frontend.db :as db]
[frontend.handler.repo :as repo-handler]
[frontend.h... |
c83c9d6359c7b9c2dedec0bbfb402fdb8798ac3b2e98c20adee103fbae5623ae | rabbitmq/rabbitmq-federation | rabbit_federation_upstream.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_federation_upstream).
-include("r... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-federation/960b8214487ae2495cd39afbbd3a2c4d9ea37985/src/rabbit_federation_upstream.erl | erlang |
For testing
----------------------------------------------------------------------------
----------------------------------------------------------------------------
coerce maps to proplists | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_federation_upstream).
-include("rabbit_... |
972c68bbb60f2ea89bf45985585f9765821eac73da2172dbd57ce733959c0ffc | siscia/css-parser | at_type_test.clj | (ns css-parser.at-type-test
(:require [clojure.test :refer [deftest testing is]]
[instaparse.core :as p]))
(def gp
(p/parser (str "debug = at-rules\n"
(slurp (clojure.java.io/resource "rules.bnf"))
"\n"
(slurp (clojure.java.io/resource "types.bnf")))))... | null | https://raw.githubusercontent.com/siscia/css-parser/caf42a163aac27e261bd57814b7d79c129d6209c/test/css_parser/at_type_test.clj | clojure |
}")
}
} } " ) | (ns css-parser.at-type-test
(:require [clojure.test :refer [deftest testing is]]
[instaparse.core :as p]))
(def gp
(p/parser (str "debug = at-rules\n"
(slurp (clojure.java.io/resource "rules.bnf"))
"\n"
(slurp (clojure.java.io/resource "types.bnf")))))... |
81b3aa8b46e160670a5a51c44329e70e6ef01c265c1f8462031603372cc21672 | haskell-mafia/tinfoil | Verify.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DeriveGeneric #
{-# OPTIONS_GHC -funbox-strict-fields #-}
module Tinfoil.Data.Verify(
Verified(..)
) where
import Control.DeepSeq.Generics (genericRnf)
import GHC.Generics (Generic)
i... | null | https://raw.githubusercontent.com/haskell-mafia/tinfoil/f46b2ea0b9984ac9a97073932b5584ce0a2e0554/src/Tinfoil/Data/Verify.hs | haskell | # LANGUAGE OverloadedStrings #
# OPTIONS_GHC -funbox-strict-fields #
^ Credential hash is well-formed and credential is correct.
^ Credential hash is well-formed but credential is not correct.
^ Credential hash is not well-formed. | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE DeriveGeneric #
module Tinfoil.Data.Verify(
Verified(..)
) where
import Control.DeepSeq.Generics (genericRnf)
import GHC.Generics (Generic)
import P
data Verified =
deriving (Eq, Show, Generic)
instance N... |
610c82bf705f87e85200307f700243d551aa3b23ba61b9cb1628c86dda02c77b | ocaml-gospel/gospel | check.ml | (**************************************************************************)
(* *)
GOSPEL -- A Specification Language for OCaml
(* *)
Copyright ( ... | null | https://raw.githubusercontent.com/ocaml-gospel/gospel/299f4b351fe5c65474bdead7f388ec7cf55f8f23/bin/check.ml | ocaml | ************************************************************************
(as described in file LICE... | GOSPEL -- A Specification Language for OCaml
Copyright ( c ) 2018- The VOCaL Project
This software is free software , distributed under the MIT license
open Gospel
open Tmodule
open Parser_frontend
module W = Gospel.Warnings
type config = { verb... |
a6dde6bc25892d7272231d5f641d37f29d0ca7c17a39db2c4ae1d98c408e8570 | elastic/eui-cljs | flyout.cljs | (ns eui.flyout
(:require ["@elastic/eui/lib/components/flyout/flyout.js" :as eui]))
(def SIZES eui/SIZES)
(def SIDES eui/SIDES)
(def EuiFlyout eui/EuiFlyout)
(def TYPES eui/TYPES)
(def PADDING_SIZES eui/PADDING_SIZES)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/flyout.cljs | clojure | (ns eui.flyout
(:require ["@elastic/eui/lib/components/flyout/flyout.js" :as eui]))
(def SIZES eui/SIZES)
(def SIDES eui/SIDES)
(def EuiFlyout eui/EuiFlyout)
(def TYPES eui/TYPES)
(def PADDING_SIZES eui/PADDING_SIZES)
| |
33a0feadef0ca45fdd5f6f4649fcf01d8fd034c12ddc1181540d53f6a063abcd | ammarhakim/gkylcas | basisHybrid3x1v.lisp | ;;; -*- Mode: LISP; package:maxima; syntax:common-lisp; -*-
(in-package :maxima)
(DSKSETQ |$varsC| '((MLIST SIMP) $X $Y $Z))
(ADD2LNC '|$varsC| $VALUES)
(DSKSETQ |$varsP| '((MLIST SIMP) $X $Y $Z $VX))
(ADD2LNC '|$varsP| $VALUES)
(DSKSETQ |$basisC|
'((MLIST SIMP
(23.
#A((94.) BASE-... | null | https://raw.githubusercontent.com/ammarhakim/gkylcas/1f8adad4f344ce8e3663451e16fdf1c32107ceed/maxima/g0/basis-precalc/basisHybrid3x1v.lisp | lisp | -*- Mode: LISP; package:maxima; syntax:common-lisp; -*- | (in-package :maxima)
(DSKSETQ |$varsC| '((MLIST SIMP) $X $Y $Z))
(ADD2LNC '|$varsC| $VALUES)
(DSKSETQ |$varsP| '((MLIST SIMP) $X $Y $Z $VX))
(ADD2LNC '|$varsP| $VALUES)
(DSKSETQ |$basisC|
'((MLIST SIMP
(23.
#A((94.) BASE-CHAR
. "/Users/manaure/Documents/gkeyll/code/... |
6e31b1648818f63a312cd8204f0821c4325988241125aa75b312bc98f62fb10b | dongcarl/guix | rednotebook.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2019 < jgibbons2357+ >
Copyright © 2021 Solene Rapenne < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Fre... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/rednotebook.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2019 < jgibbons2357+ >
Copyright © 2021 Solene Rapenne < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages rednotebook)
#:use-module (guix... |
9abf6a14dfc9fd9347e6638ac59ef9e4d8cf2949545ea009b2770352d670afe8 | discus-lang/ddc | Args.hs |
module DDCI.Tetra.Interface.Args
(runArgs)
where
import DDCI.Tetra.Command.Help
import DDCI.Tetra.Command
import DDCI.Tetra.State
import DDC.Driver.Interface.Input
import DDC.Driver.Interface.Source
import DDC.Data.ListUtils
import Data.List
-- | Run in unix command-line mode, reading commands from a list of... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-tools/src/ddci-tetra/DDCI/Tetra/Interface/Args.hs | haskell | | Run in unix command-line mode, reading commands from a list of arguments.
If the help command is one of the arguments then just
display the help and don't do anything else.
No more args, we're done. |
module DDCI.Tetra.Interface.Args
(runArgs)
where
import DDCI.Tetra.Command.Help
import DDCI.Tetra.Command
import DDCI.Tetra.State
import DDC.Driver.Interface.Input
import DDC.Driver.Interface.Source
import DDC.Data.ListUtils
import Data.List
runArgs :: [String] -> IO ()
runArgs args
= do let state = in... |
a409e4def331f8f68fb5f8a3e1346e00eeb8fafeec1d8e69e464df3725f2bd96 | racket/typed-racket | pr10350.rkt | #lang typed/racket/optional
(require/typed
scheme/base
[values (All (T) ((Any -> Boolean) -> (Any -> Boolean : T)))])
(: number->string? (Any -> Boolean : (Number -> String)))
(define (number->string? x)
(((inst values (Number -> String)) procedure?) x))
(: f (Number -> String))
(define f
(if (number->string? +... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/optional/pr10350.rkt | racket | #lang typed/racket/optional
(require/typed
scheme/base
[values (All (T) ((Any -> Boolean) -> (Any -> Boolean : T)))])
(: number->string? (Any -> Boolean : (Number -> String)))
(define (number->string? x)
(((inst values (Number -> String)) procedure?) x))
(: f (Number -> String))
(define f
(if (number->string? +... | |
f8e069d1af95f68bde3050e50c89628ec66a4fbff135cd51fb5fb9c23c09925d | mefyl/dune-cache-daemon | distributed.mli | include module type of Distributed_intf
val disabled : Cache.Local.t -> (module S)
| null | https://raw.githubusercontent.com/mefyl/dune-cache-daemon/f6debe2598aaa97e31e37c93b3aa2fbff55f3137/src/sietch/distributed.mli | ocaml | include module type of Distributed_intf
val disabled : Cache.Local.t -> (module S)
| |
fc42513bc8788b45272d5ce84cf5c9daf004b9dc0c5422e3ca8bb93ab82fbf75 | simplex-chat/simplexmq | Protocol.hs | # LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LA... | null | https://raw.githubusercontent.com/simplex-chat/simplexmq/e4aad7583f425765c605cd8042e3136e048bdbec/src/Simplex/Messaging/Agent/Protocol.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
|
Module : Simplex.Messaging.Agent.Protocol
Copyright : (c) simplex.chat
License : AGPL-3
Maintainer :
Stability : experimental
Portability : non-portable
Types, parsers, serializers and functi... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedLists #
# LANGUAGE PatternSynonyms #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANG... |
0ce3defa2f02a12c8196278f4bb5c93b7d1fee86f2a0deafac60928e06eb8b1c | fortytools/holumbus | Helpers.hs | -- ----------------------------------------------------------------------------
|
Module : Helpers
Maintainer : , , ,
Stability : experimental
Portability : portable
Some helpers that do n't fit into other modules
Module : Helpers
Maintainer : Thorben Guelck, Tobias Lu... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/W3W/src/Helpers.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-------... |
|
Module : Helpers
Maintainer : , , ,
Stability : experimental
Portability : portable
Some helpers that do n't fit into other modules
Module : Helpers
Maintainer : Thorben Guelck, Tobias Lueders, Mathias Leonhardt, Uwe Schmidt
Stability : experimental
Portability:... |
4bbeae5b5c951700f740716424b6238cd092321866ce16d054f3a5d1c4c9b721 | EFanZh/EOPL-Exercises | exercise-4.27-test.rkt | #lang racket
(require rackunit)
(require "../solutions/exercise-4.27.rkt")
(define (get-output string)
(with-output-to-string
(λ ()
(run string))))
(check-equal? (get-output "var my-print = sub (num)
print num;
call (m... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-4.27-test.rkt | racket | #lang racket
(require rackunit)
(require "../solutions/exercise-4.27.rkt")
(define (get-output string)
(with-output-to-string
(λ ()
(run string))))
(check-equal? (get-output "var my-print = sub (num)
call (my-print 13)")
"13\n")
(check-equal? (get... | |
c692801664209b6a053baf90e2dd3292956335eb4a3c54f4c2170f0b49e0e742 | rescript-lang/rescript-compiler | jsxEvent.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/rescript-lang/rescript-compiler/bae82e1ddd265e5c8886ce1a6527e031d95416ed/jscomp/others/jsxEvent.ml | ocaml | Should return Dom.eventTarget
Should return Dom.eventTarget
Should return Dom.eventTarget
Should return Dom.eventTarget
Cast any event type to the general synthetic type. This is safe, since synthetic is more general
Should return Dom.dataTransfer
Should return Dom.eventTarget
Should return Dom.eventTarg... | 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... |
51db30d4a97414a88ffeaa54153d2726ee3c18e68b6fb499ea47c4b9618634a1 | csabahruska/jhc-grin | EvalInline.hs | # LANGUAGE ParallelListComp #
module Grin.EvalInline(createEvalApply) where
import Control.Monad.Identity
import Data.List hiding(union)
import qualified Data.Set as Set
import GenUtil
import Grin.Grin
import Grin.Noodle
import StringTable.Atom
import Support.CanType(getType)
import Support.FreeVars(freeVars)
import ... | null | https://raw.githubusercontent.com/csabahruska/jhc-grin/30210f659167e357c1ccc52284cf719cfa90d306/src/Grin/EvalInline.hs | haskell | ^ no update is performed
^ an update is placed after the whole evaluation
create an eval suitable for inlining .
cu t | tagIsTag t & & tagIsWHNF t = return ans where
( ts , _ ) = runIdentity $ findArgsType te t
vs = [ v < - [ V 4 .. ] | ty < - ts ]
... | # LANGUAGE ParallelListComp #
module Grin.EvalInline(createEvalApply) where
import Control.Monad.Identity
import Data.List hiding(union)
import qualified Data.Set as Set
import GenUtil
import Grin.Grin
import Grin.Noodle
import StringTable.Atom
import Support.CanType(getType)
import Support.FreeVars(freeVars)
import ... |
b1c8878606a50890f5afd4c5e7f0c98f39622cf323c7d367ad3ffcc7f69d96e0 | reflectionalist/S9fES | split-url.scm | Scheme 9 from Empty Space , Function Library
By ,
; Placed in the Public Domain
;
; (split-url string) ==> list
; (url-anchor list) ==> string
; (url-args list) ==> alist
; (url-host list) ==> string
; (url-path list) ==> string
; (url-proto list) ==> string
; (url-suffix list) ==> st... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/split-url.scm | scheme | Placed in the Public Domain
(split-url string) ==> list
(url-anchor list) ==> string
(url-args list) ==> alist
(url-host list) ==> string
(url-path list) ==> string
(url-proto list) ==> string
(url-suffix list) ==> string
(load-from-library "split-url.scm")
Extract the individual... | Scheme 9 from Empty Space , Function Library
By ,
PROTOCOL is the protocol without the : // part , e.g. : " http "
PATH is the local path including the file suffix , e.g. : " foo / bar.html "
SUFFIX is an extra copy of the file suffix , e.g. : " html "
The URL - PROTO , URL - HOST , URL - PATH , URL - S... |
1925cfa08a6b169e5dec8f168c7970db2c1f92b72c04908500fd615916d38b16 | RDTK/generator | macros.lisp | ;;;; macros.lisp --- Macros provided by the commandline-options module.
;;;;
Copyright ( C ) 2017 , 2019 Jan Moringen
;;;;
Author : < >
(cl:in-package #:build-generator.commandline-options)
(defmacro define-option-mapping ((schema context) &body clauses)
(let+ (((&flet+ register-info ((designators option-nam... | null | https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/commandline-options/macros.lisp | lisp | macros.lisp --- Macros provided by the commandline-options module.
| Copyright ( C ) 2017 , 2019 Jan Moringen
Author : < >
(cl:in-package #:build-generator.commandline-options)
(defmacro define-option-mapping ((schema context) &body clauses)
(let+ (((&flet+ register-info ((designators option-name
&optional argument-name mandatory?))
... |
f4d0b2918d22b81cfbb8a5ffa81a154b7cb3fe1a7bcadc46d5e4bbdf955e71d0 | umutisik/mathvas | CreateSnippet.hs | module Handler.CreateSnippet where
import Import
import Handler.Save
postCreateSnippetR :: Handler Value
postCreateSnippetR = maybeSaveR Nothing
| null | https://raw.githubusercontent.com/umutisik/mathvas/9f764cd4d54370262c70c7ec3eadae076a1eb489/Handler/CreateSnippet.hs | haskell | module Handler.CreateSnippet where
import Import
import Handler.Save
postCreateSnippetR :: Handler Value
postCreateSnippetR = maybeSaveR Nothing
| |
c3d4878546ab596175e9637b54dc250a136db1b9499402e11b1cd7abbfa9da92 | arne-schroppe/dash | CodeGenState.hs | # LANGUAGE FlexibleContexts #
module Language.Dash.CodeGen.CodeGenState where
TODO list exported functions explicitly
import Control.Monad.Except
import Control.Monad.Identity
import Control.Monad.State.Strict hiding (state)
import Data.List
import qualified Data.Map ... | null | https://raw.githubusercontent.com/arne-schroppe/dash/82df755edc6555cba808539970ab6ff225c18b35/src/Language/Dash/CodeGen/CodeGenState.hs | haskell | these are all the registers that hold function values which
can be called directly with Op_call. Everything else is
called with Op_call_cl
This helps us to keep track of constant values in the code. They overlap
are for example used in determining free variables in closures. Even though a
non-local function g is ... | # LANGUAGE FlexibleContexts #
module Language.Dash.CodeGen.CodeGenState where
TODO list exported functions explicitly
import Control.Monad.Except
import Control.Monad.Identity
import Control.Monad.State.Strict hiding (state)
import Data.List
import qualified Data.Map ... |
083949ac8335148e6312b81447820eaa58762d00205081e0e7e3cc3713f5c46d | mzp/coq-ruby | g_ascii_syntax.ml | (***********************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - Rocquencourt & LRI - CNRS - Orsay
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/parsing/g_ascii_syntax.ml | ocaml | *********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************* | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - Rocquencourt & LRI - CNRS - Orsay
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : g_ascii_syntax.ml... |
8a0d460225a47a5872ad4f171e46d59fc6e1ecb6ed647edf2a2a9c94c8508989 | kupl/FixML | sub13.ml | type heap = EMPTY
| NODE of rank * value * heap * heap
and rank = int
and value = int
exception EmptyHeap
let rank =
(
function
EMPTY -> -1
| NODE(r, _, _, _) -> r
)
let findMin =
(
function
EMPTY -> raise EmptyHeap
| NODE(_, x, _, _) -> x
)
... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/priority_queue/priority_queue/submissions/sub13.ml | ocaml | type heap = EMPTY
| NODE of rank * value * heap * heap
and rank = int
and value = int
exception EmptyHeap
let rank =
(
function
EMPTY -> -1
| NODE(r, _, _, _) -> r
)
let findMin =
(
function
EMPTY -> raise EmptyHeap
| NODE(_, x, _, _) -> x
)
... | |
b940d8d59e3e48376060633c0f97125aa92b419b89753f785a69f085a22b6caf | TilakChad/HTerm | Main.hs | module Main where
import Find as F
import qualified Terminal as Term
import qualified Glob as GlobPattern
import qualified FileMatch as FMatch
import qualified Data.List as DL
import qualified Glob
import Control.Concurrent
import Control.Monad
import System.Process
import System.IO
import Data.List
import Data.Map a... | null | https://raw.githubusercontent.com/TilakChad/HTerm/df36d5358e490817d3dfdcaadc053b3f94cb8024/app/Main.hs | haskell | Virtual Environment
get key asynchronously and try to interpret it, right...
Toward some terminal emulation thingy now
start of the infinite loop .. Don't know how to quit this loop yet .. but
List files and then folders
before that, see if it matches list command
listFilesFolders path
TODO :: Execute the file
... | module Main where
import Find as F
import qualified Terminal as Term
import qualified Glob as GlobPattern
import qualified FileMatch as FMatch
import qualified Data.List as DL
import qualified Glob
import Control.Concurrent
import Control.Monad
import System.Process
import System.IO
import Data.List
import Data.Map a... |
9766abe6ddd5b74e37a6aa317022b4164102c783f9cb3f9224762d6ab209b0d6 | aryx/fork-efuns | scala_mode.ml |
*
* Copyright ( C ) 2021
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file license.txt .... | null | https://raw.githubusercontent.com/aryx/fork-efuns/6a1db42c497228ca8953df3a9011d821602a9412/pfff_modes/scala_mode.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
***************************************************************************
***************************************************************************
******... |
*
* Copyright ( C ) 2021
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file license.txt .... |
6473b361ecd1fce5747322aa621dab6e6c72c92cf44336a8047bb02824af1c76 | frank-lang/frank | RefineSyntax.hs | module RefineSyntax where
import Control.Monad
import Control.Monad.Except
import Control.Monad.State
import Data.Foldable
import Data.Functor.Identity
import Data.List
import Data.Maybe
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import BwdFwd
import Syntax
import RefineSyntaxCommon
import ... | null | https://raw.githubusercontent.com/frank-lang/frank/1df9644b57551232fdde5a43acabaf790e86cb17/RefineSyntax.hs | haskell | Explicit refinements:
+ concretise epsilons in top level definitions
+ built-in data types, interfaces, operators are added
Refine top level terms
Make sure (built-in) interfaces and interface aliases have unique ids
Performing this check after refinement to prioritise more precise error
messages.
Check uniquen... | module RefineSyntax where
import Control.Monad
import Control.Monad.Except
import Control.Monad.State
import Data.Foldable
import Data.Functor.Identity
import Data.List
import Data.Maybe
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import BwdFwd
import Syntax
import RefineSyntaxCommon
import ... |
333ff835e3ce61318995d9bb9cc3073ba97bad85a3c620d74458f2311b19ef6d | ucsd-progsys/liquidhaskell | T1521.hs | module T1521 where
-- -progsys/liquidhaskell/issues/1521
data Foo = Bool
{-@ measure bar :: Int -> Bool @-}
main :: IO ()
main = pure ()
| null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/names/pos/T1521.hs | haskell | -progsys/liquidhaskell/issues/1521
@ measure bar :: Int -> Bool @ | module T1521 where
data Foo = Bool
main :: IO ()
main = pure ()
|
aad126262085dac249010cf049b6369b3807b766dcd1a501416c8ec66d8f7afa | caiorss/Functional-Programming | stack.hs | {- -ADT-td3116658.html
-}
newtype Stack a = Stack [a]
emptyStack = Stack []
isEmptyStack (Stack xs) = null xs
push x (Stack xs) = Stack (x:xs)
pop (Stack (_:xs)) = Stack xs
top (Stack (x:_)) = x
| null | https://raw.githubusercontent.com/caiorss/Functional-Programming/ef3526898e3014e9c99bf495033ff36a4530503d/codes/stack.hs | haskell | -ADT-td3116658.html
|
newtype Stack a = Stack [a]
emptyStack = Stack []
isEmptyStack (Stack xs) = null xs
push x (Stack xs) = Stack (x:xs)
pop (Stack (_:xs)) = Stack xs
top (Stack (x:_)) = x
|
45ed0635d939baf61fecf257bc95ab397d1ba4e05ab95ccf48fa4bd18fc4f689 | andrewthad/posix-api | MessageQueue.hs | module Linux.MessageQueue
( module X
) where
import Linux.MessageQueue.Types as X
| null | https://raw.githubusercontent.com/andrewthad/posix-api/93fe162f68c53b70278de40649dbe20e3a5287d4/src/Linux/MessageQueue.hs | haskell | module Linux.MessageQueue
( module X
) where
import Linux.MessageQueue.Types as X
| |
565b5482b151f65c7d0fcf1d72b721523ab054f9d3c04f0fe797d4f175a3d76b | kumarshantanu/ring-sse-middleware | generic.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the ... | null | https://raw.githubusercontent.com/kumarshantanu/ring-sse-middleware/67dae006cfda2fa2fef93eea92557aeffff0b6a7/src/ring_sse_middleware/adapter/generic.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this ... | Copyright ( c ) . All rights reserved .
(ns ring-sse-middleware.adapter.generic
(:require
[clojure.java.io :as java-io]
[ring.util.io :as ring-io]
[ring.util.response :as response]
[ring-sse-middleware.core :as c])
(:import
[java.io IOException OutputStream Writer]))
(defn gen... |
2f93c7d3624250f0feb0b665ff125d510508da69ebaa00ddb379c6ed2b85686c | adamdoupe/find_ear_rails | parse_ruby_methods.ml | open Cfg
open Visitor
open Utils
open Set
type ruby_class = string
type ruby_access_control =
| Public
| Protected
| Private
let string_from_ruby_ac ac = match ac with
| Public -> "public"
| Protected -> "protected"
| Private -> "private"
let ruby_ac_from_string str = match str with
| "public" -> Pub... | null | https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/parse_ruby_methods.ml | ocaml | a method call with no arguments changes the current_protection
a method call with arguments (either strings or symbols) makes those methods have that access status | open Cfg
open Visitor
open Utils
open Set
type ruby_class = string
type ruby_access_control =
| Public
| Protected
| Private
let string_from_ruby_ac ac = match ac with
| Public -> "public"
| Protected -> "protected"
| Private -> "private"
let ruby_ac_from_string str = match str with
| "public" -> Pub... |
65b2f69bb86f824d6c19545c9b18c60ce02043328de4ac7425ba92f3d9abffb8 | zkat/memento-mori | memento-mori.lisp | (cl:defpackage #:memento-mori
(:use #:cl #:alexandria #:memento-mori.utils #:memento-mori.queue)
(:nicknames #:mori)
(:export
;; Actors
#:spawn
#:current-actor
#:send
#:on-init
#:on-message
#:on-request
#:on-shutdown
#:actor-alive-p
#:call-with-next-message
#:with-next-message
... | null | https://raw.githubusercontent.com/zkat/memento-mori/0ce49138fe186e8547900ca7c84bf20802006fa9/src/memento-mori.lisp | lisp | Actors
Monitors
Links
Exits
Requests
Actors
Registration
Links
NOTE - yes, this is a cop-out. :(
Monitors
Exits
Scheduler
Requests
| (cl:defpackage #:memento-mori
(:use #:cl #:alexandria #:memento-mori.utils #:memento-mori.queue)
(:nicknames #:mori)
(:export
#:spawn
#:current-actor
#:send
#:on-init
#:on-message
#:on-request
#:on-shutdown
#:actor-alive-p
#:call-with-next-message
#:with-next-message
#:reject-mess... |
d0d80c27fe1e59c0e3a8f27608b7e9d4dddcb3bc773392945ceeab8a8b474dfa | tachukao/ilqr | classic.mli | open Owl
module AD = Algodiff.D
(* module final loss *)
module Fl : sig
type t
val create : ?qx:AD.t * AD.t -> unit -> t
end
(* module running loss *)
module Rl : sig
type t
val create : ?q:AD.t -> ?r:AD.t -> unit -> t
end
module type P = sig
val n : int
val m : int
val dyn : u:AD.t -> x:AD.t -> AD.t... | null | https://raw.githubusercontent.com/tachukao/ilqr/923a65bb8a1f12801d8eaf5adef04799c1c68ba1/src/classic.mli | ocaml | module final loss
module running loss | open Owl
module AD = Algodiff.D
module Fl : sig
type t
val create : ?qx:AD.t * AD.t -> unit -> t
end
module Rl : sig
type t
val create : ?q:AD.t -> ?r:AD.t -> unit -> t
end
module type P = sig
val n : int
val m : int
val dyn : u:AD.t -> x:AD.t -> AD.t
val final_loss : Fl.t
val running_loss : Rl.t... |
beb7fec1ff3a80bf3fcf14c3814ba44901e2de4571d24d768c0490a6f557a86f | arrayfire/arrayfire-haskell | Types.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module Types where
import Data.Functor.Identity
import Data.Text (Text)
import qualified Data.Text as T
import Text.Parsec
import Text.Printf
type Parser = ParsecT [Token] () Identity
type Params = [Type]
data AS... | null | https://raw.githubusercontent.com/arrayfire/arrayfire-haskell/5d621602bb925ce5122a66011003498cbe638e2b/gen/Types.hs | haskell | # LANGUAGE GeneralizedNewtypeDeriving #
module Types where
import Data.Functor.Identity
import Data.Text (Text)
import qualified Data.Text as T
import Text.Parsec
import Text.Printf
type Parser = ParsecT [Token] () Identity
type Params = [Type]
data AS... | |
14e1e07d22a9e87aa48c0d55431886a2f977605a5b1016d9f1539bb9c2a3c0d4 | ekmett/ekmett.github.com | Bifunctor.hs | module Data.Rope.Util.Bifunctor (Bifunctor(..)) where
class Bifunctor f where
bimap :: (a -> b) -> (c -> d) -> f a c -> f b d
first :: (a -> b) -> f a c -> f b c
second :: (b -> c) -> f a b -> f a c
first f = bimap f id
second = bimap id
bimap f g = second g . first f
instance Bifunctor (,) wh... | null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/rope/Data/Rope/Util/Bifunctor.hs | haskell | module Data.Rope.Util.Bifunctor (Bifunctor(..)) where
class Bifunctor f where
bimap :: (a -> b) -> (c -> d) -> f a c -> f b d
first :: (a -> b) -> f a c -> f b c
second :: (b -> c) -> f a b -> f a c
first f = bimap f id
second = bimap id
bimap f g = second g . first f
instance Bifunctor (,) wh... | |
504c8bd241b6af1fdd03b793af2c4c1af556301392e5ecc56eae1f13842382a4 | caisah/sicp-exercises-and-examples | circuit.scm | (define a (make-wire))
(define b (make-wire))
(define c (make-wire))
(define d (make-wire))
(define e (make-wire))
(define s (make-wire))
(define (half-adder a b s c)
((let ((d (make-wire)) (e (make-wire)))
(or-gate a b d)
(and-gate ab c)
(inverter c e)
(and-gate d e s)
'ok)))
(define (ful... | null | https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/3.3.4-a_simulator_for_digital_circuits/circuit.scm | scheme | (define a (make-wire))
(define b (make-wire))
(define c (make-wire))
(define d (make-wire))
(define e (make-wire))
(define s (make-wire))
(define (half-adder a b s c)
((let ((d (make-wire)) (e (make-wire)))
(or-gate a b d)
(and-gate ab c)
(inverter c e)
(and-gate d e s)
'ok)))
(define (ful... | |
7a0f9abd3887b2a51706746bca333dcaae59abcf75161fab8a7ce83cd0044a7a | erlang/otp | prim_socket.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2018 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/de5bb49320db22159de52e677c5f7499b763b0cd/erts/preloaded/src/prim_socket.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2018 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(prim_socket).
-compile(no_native).
-export([on_load/0, on_load/1, init/0]).
-export(
[
info/0, inf... |
bd06c760ab1f2fbf61d163511d419d75e0c134bc5b3a1a738ed1147d8add162f | grzm/awyeah-api | region.clj | Copyright ( c ) Cognitect , Inc.
;; All rights reserved.
(ns com.grzm.awyeah.region
"Region providers. Primarily for internal use, and subject to change."
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log]
[com.grzm.awyeah.config :as config]
[com.grzm.awyea... | null | https://raw.githubusercontent.com/grzm/awyeah-api/b2040a0244d5c87bee6d3ca77aae64e98b50224e/src/com/grzm/awyeah/region.clj | clojure | All rights reserved. | Copyright ( c ) Cognitect , Inc.
(ns com.grzm.awyeah.region
"Region providers. Primarily for internal use, and subject to change."
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.logging :as log]
[com.grzm.awyeah.config :as config]
[com.grzm.awyeah.ec2-metadata-utils :as... |
d165a681bf4c507120c0474adf80ec0a941b9fe94019b631e195b16fb422b4be | ejgallego/coq-serapi | sertop_ser.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * INRIA , CNRS and contributors - Copyright 1999 - 2018
(* <O___,, * (see CREDITS file for the list of authors) *)
\VV/ * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/sertop/sertop_ser.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
<O___,, * (see CREDITS file for the list of authors)
// * This file is distributed under the terms of the
* (see LICENSE file for... | v * INRIA , CNRS and contributors - Copyright 1999 - 2018
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser General Public License Version 2.1
Copyright 2016 - 2018 MINES ParisT... |
8e2b972dbfaf48d14a87f630350ea2e595c6df65f511ff889a973dbe5a9072fb | hbr/fmlib | list.mli | * A thin wrapper around [ . List ] which avoids throwing exceptions and
with some additional monadic functions .
In case you need functions from the module [ List ] of the ocaml standard
library , just use [ . List ]
with some additional monadic functions.
In case you need functions from... | null | https://raw.githubusercontent.com/hbr/fmlib/169a1b8e53c828d24329398b6ee0a6deab41a662/src/std/list.mli | ocaml | * A list of values of type ['a].
* [return a] makes a singleton list with the element [a].
* [l >>= f] applies the function [f] to all elements of the list [l] and
concatenates all lists.
* [let* a = m in f a] is equivalent to [m >>= f].
* [flst <*> lst] is equivalent to [flst >>= fun f -> map f lst] i.e. it map... | * A thin wrapper around [ . List ] which avoids throwing exceptions and
with some additional monadic functions .
In case you need functions from the module [ List ] of the ocaml standard
library , just use [ . List ]
with some additional monadic functions.
In case you need functions from... |
c8092e5b0a782a2597f7abf6fd7c0d811ee958a0c4abcff5d1366636f018ae60 | originrose/think.image | mask.clj | (ns think.image.mask
(:require [mikera.image.core :as image])
(:import [java.awt.image BufferedImage]))
(defn maskbuf-to-image
"Given a mask buffer create an image from it"
[^"[B" pixbuf width height]
(let [pixcount (* width height)
^BufferedImage img (BufferedImage. width height BufferedImage/TYPE_... | null | https://raw.githubusercontent.com/originrose/think.image/0179d104d5fa74977890942858b44e1349457514/src/clj/think/image/mask.clj | clojure | (ns think.image.mask
(:require [mikera.image.core :as image])
(:import [java.awt.image BufferedImage]))
(defn maskbuf-to-image
"Given a mask buffer create an image from it"
[^"[B" pixbuf width height]
(let [pixcount (* width height)
^BufferedImage img (BufferedImage. width height BufferedImage/TYPE_... | |
ec2bf4edf774570bdc7934141604df971aedd1de6ff491473507baff28bae03e | unnohideyuki/bunny | sample250.hs | main = print $ scanl1 (+) [1,2,3,4]
| null | https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample250.hs | haskell | main = print $ scanl1 (+) [1,2,3,4]
| |
f6fa87771cf8a649406935f1ffcf3fcf4af01e5c21c5a35395f2b9666e4ca737 | GameAnalytics/hyper | hyper_binary_rle.erl | -module(hyper_binary_rle).
-include_lib("eunit/include/eunit.hrl").
-export([new/1, set/3, compact/1, max_merge/1, max_merge/2,
reduce_precision/2, bytes/1]).
-export([register_sum/1, zero_count/1, encode_registers/1, decode_registers/2]).
-behaviour(hyper_register).
-define(KEY_SIZE, 16).
-define(REPEAT, 1... | null | https://raw.githubusercontent.com/GameAnalytics/hyper/4b1abc4284fc784f6def4f4928f715b0d33136f9/src/hyper_binary_rle.erl | erlang |
rle_insert(<<>>, I, Index, Value) ->
throw(end_reached);
error_logger:info_msg("~p repeated ~p times, I: ~p, Index: ~p, Value: ~p~n"
"chunk start: ~p, chunk end: ~p~n",
Found the chunk where index and value belongs, doing
nothing as the value is bigger than what we're inserting.
Found... | -module(hyper_binary_rle).
-include_lib("eunit/include/eunit.hrl").
-export([new/1, set/3, compact/1, max_merge/1, max_merge/2,
reduce_precision/2, bytes/1]).
-export([register_sum/1, zero_count/1, encode_registers/1, decode_registers/2]).
-behaviour(hyper_register).
-define(KEY_SIZE, 16).
-define(REPEAT, 1... |
018dcc3279d07a33165845daa440ca830b87bf8c781bf2ff4ca6d1cd651e3106 | cxphoe/SICP-solutions | ev-operations.rkt | ;(load "loop-setup.rkt")
(define (last-operand? ops) (null? (cdr ops)))
(define (adjoin-arg arg arglist)
(append arglist (list arg)))
(define (get-global-environment)
the-global-environment)
(define eceval-operations
(list (list 'self-evaluating? self-evaluating?)
(list 'error? error?) ; ad... | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%205-Computing%20with%20Register%20Machines/1%7E4/ev-operations-error/ev-operations.rkt | racket | (load "loop-setup.rkt")
add
predicate tests
environment procedures
for print
native procedures |
(define (last-operand? ops) (null? (cdr ops)))
(define (adjoin-arg arg arglist)
(append arglist (list arg)))
(define (get-global-environment)
the-global-environment)
(define eceval-operations
(list (list 'self-evaluating? self-evaluating?)
(list 'variable? variable?)
(list 'quoted? quoted?)
... |
44609f60d7cdd9602f8f2aaa15c1c8b4987e793d967cf41f80737c96559b1ce2 | johnyob/dromedary | util.mli | (** This module is used by all expect tests for typing *)
val print_infer_result : ?debug:bool -> string -> unit
val print_constraint_result : string -> unit
| null | https://raw.githubusercontent.com/johnyob/dromedary/a1c125c3a02ffccc0bdcd59abf7e196d7e269d56/test/typing/util.mli | ocaml | * This module is used by all expect tests for typing |
val print_infer_result : ?debug:bool -> string -> unit
val print_constraint_result : string -> unit
|
5e51a2aafa72b3e887a17a3a15c357a01e811c839ec57a1c7e3177e53c1ef9ce | louispan/ghcjs-base-stub | Internal.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
# LANGUAGE UnboxedTuples #
# LANGUAGE GHCForeignImportPrim #
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE UnliftedFFITypes #-}
module JavaScript.Object.Internal
( Object(..)
, create
, allProps
, listPr... | null | https://raw.githubusercontent.com/louispan/ghcjs-base-stub/8eaee240c9af1a2290f4572a87528f3ddb3e9f12/src/JavaScript/Object/Internal.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE EmptyDataDecls #
# LANGUAGE UnliftedFFITypes #
| create an empty object
# INLINE getProp #
# INLINE unsafeSetProp # | # LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
# LANGUAGE UnboxedTuples #
# LANGUAGE GHCForeignImportPrim #
module JavaScript.Object.Internal
( Object(..)
, create
, allProps
, listProps
, getProp
, unsafeGetProp
, setProp
, unsafeSetProp
, isInstanceOf
) where... |
aeea37b00124c0477081256ef887837b18d1801f09668ef6193cd8bb44e1c507 | clojure/core.typed.runtime.jvm | current_impl.cljc | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/clojure/core.typed.runtime.jvm/10cf4b7ca8c3bef1b3fc6ea94940f501d52654a3/src/main/clojure/clojure/core/typed/current_impl.cljc | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns ^:no-doc ^:skip-wiki clojure.core.typed.current-impl
#?(:cljs (:refer-clojure :exclude [-val]))
(:require [clojure.set :as set]
[clojure.core.typed.env :as env]
[clojure.core.typed.contract-utils :as con]
[clojure.core.typed.util-v... |
611493c1718326444ee276e5b47a4172abd939fcadd4f93a7ca1f3a36ec1ea49 | Racket-Cookbooks/Plot-cookbook | colorbar.rkt | #lang racket
(require plot plot/utils racket/draw colormaps/tol pict flomat)
(define (mismatch q ecc q0 ecc0)
(+ (sqr (- q q0)) (sqr (- ecc ecc0))))
(define qs (for/list ([id (build-list 1000 values)]) (random)))
(define eccs (for/list ([id (build-list 1000 values)]) (random)))
(define mismatches (for/list ([ecc ecc... | null | https://raw.githubusercontent.com/Racket-Cookbooks/Plot-cookbook/dedaa4a680295f93936ce79129a5caf84a2042dd/examples/colorbar/colorbar.rkt | racket | #lang racket
(require plot plot/utils racket/draw colormaps/tol pict flomat)
(define (mismatch q ecc q0 ecc0)
(+ (sqr (- q q0)) (sqr (- ecc ecc0))))
(define qs (for/list ([id (build-list 1000 values)]) (random)))
(define eccs (for/list ([id (build-list 1000 values)]) (random)))
(define mismatches (for/list ([ecc ecc... | |
d4f4f189a27ec5fcc83f0b988b480b00ec733a0937300024842408cc79ac9722 | MLstate/opalang | sRope.ml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/sRope.ml | ocaml | string, real string length
left, right, len
s can be inserted in place
should be tail rec => Stack
bliting from left to right
stop >= a
format
dynamic choice of impl
deprecated, backward compat |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... |
78be00f51fd65c2361525793999dd2d33fd08adf35e0aa558e1fd247baecdf33 | tmattio/spin | common.mli | val term : int Cmdliner.Term.t
val handle_errors : (unit, Spin.Spin_error.t) Result.t -> int
val ignore_config_arg : bool Cmdliner.Term.t
val use_defaults_arg : bool Cmdliner.Term.t
val envs : Cmdliner.Term.env_info list
val exits : Cmdliner.Term.exit_info list
module Syntax : sig
val ( let+ ) : 'a Cmdliner.Ter... | null | https://raw.githubusercontent.com/tmattio/spin/092ab5979d4f1d01f538743443b70465a2d5ed23/bin/common.mli | ocaml | val term : int Cmdliner.Term.t
val handle_errors : (unit, Spin.Spin_error.t) Result.t -> int
val ignore_config_arg : bool Cmdliner.Term.t
val use_defaults_arg : bool Cmdliner.Term.t
val envs : Cmdliner.Term.env_info list
val exits : Cmdliner.Term.exit_info list
module Syntax : sig
val ( let+ ) : 'a Cmdliner.Ter... | |
20d3fd40eb5612f645c634e47064978756b19eb5509d73bad4020e91bfe3c089 | haskell/c2hs | Builtin.hs | C->Haskell Compiler : C builtin information
--
Author :
Created : 12 February 01
--
Copyright ( c ) 2001
--
-- This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2... | null | https://raw.githubusercontent.com/haskell/c2hs/fbb4c2fa6ec5528aa068512f1b691298db420321/src/C2HS/C/Builtin.hs | haskell |
This file is free software; you can redistribute it and/or modify
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Publ... | C->Haskell Compiler : C builtin information
Author :
Created : 12 February 01
Copyright ( c ) 2001
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
language : 98
module C2HS.C.Builtin (
builtinTypeNa... |
a2dda6a4a6cff3e71f61233205a6a658741e2fb180469ceac900c1347e39ee16 | biocad/openapi3 | hackage.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Lens
import Data.Aeson
import Data.Proxy
import Data.Text (Text)
import GHC.Generics
import Data.OpenApi
import Data.OpenApi.Declare
import Data.OpenApi.Lens
impo... | null | https://raw.githubusercontent.com/biocad/openapi3/e4b27f3b5dbc938a10b4a78eb88d0dca6341eab9/examples/hackage.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
param schemas
responses | # LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedLists #
module Main where
import Control.Lens
import Data.Aeson
import Data.Proxy
import Data.Text (Text)
import GHC.Generics
import Data.OpenApi
import Data.OpenApi.Declare
import Data.OpenApi.Lens
import Data.OpenApi.Operation
type Username = Text
data UserSummary =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.