_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 |
|---|---|---|---|---|---|---|---|---|
1b4b1496e8f4079f1dfa4e487a2de0d4ec591bd6952188bdecefdee566698dec | ghc/packages-containers | Lazy.hs | # LANGUAGE CPP #
{-# LANGUAGE BangPatterns #-}
#if __GLASGOW_HASKELL__
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-}
#endif
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Safe #-}
#endif
#if __GLASGOW_HASKELL__ >= 708
# LANGUAGE RoleAnnotations #
# LANGUAGE TypeFamilies #
#define USE_MAGIC... | null | https://raw.githubusercontent.com/ghc/packages-containers/97fe43c54c5c8a9b93ecf5abd7509e8085b63d41/containers/src/Data/IntMap/Merge/Lazy.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveDataTypeable, StandaloneDeriving #
# LANGUAGE Safe #
---------------------------------------------------------------------------
|
Module : Data.IntMap.Merge.Lazy
License : BSD-style
Maintainer :
Portability : portable
maps. The key functions are 'merge' ... | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__
#endif
#if !defined(TESTING) && defined(__GLASGOW_HASKELL__)
#endif
#if __GLASGOW_HASKELL__ >= 708
# LANGUAGE RoleAnnotations #
# LANGUAGE TypeFamilies #
#define USE_MAGIC_PROXY 1
#endif
#if USE_MAGIC_PROXY
# LANGUAGE MagicHash #
#endif
#include "containers.h"
Copyright ... |
44197f4a201a9a66f9e66359d41edd4fa0905d5a802b335065e7a6e05d286501 | marick/fp-oo | superclass-1.clj |
Exercise 1
(def superclass-from-instance
(fn [instance]
(assert (map? instance))
(eval (:__superclass_symbol__ (class-from-instance instance)))))
(def send-super
(fn [instance message & args]
(apply-message-to (superclass-from-instance instance)
instance mes... | null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/old-code/solutions/superclass-1.clj | clojure |
Exercise 1
(def superclass-from-instance
(fn [instance]
(assert (map? instance))
(eval (:__superclass_symbol__ (class-from-instance instance)))))
(def send-super
(fn [instance message & args]
(apply-message-to (superclass-from-instance instance)
instance mes... | |
7c0e6753d7fe833a25c6463d716f0b359ff2b77c3dd4faea146bfb325955b2a9 | mgritter/aoc-lh | Parse.hs | module Parse (parseLine,
) where
import Text.ParserCombinators.Parsec
import Control.Monad
parseUnsignedNumber :: Parser Int
parseUnsignedNumber = (liftM read) $ many1 digit
parseValve :: Parser String
parseValve = do
x <- upper
y <- upper
return $ [x,y]
parseListOfValves :: Parser [String]
parse... | null | https://raw.githubusercontent.com/mgritter/aoc-lh/2936bbd35349ba683ea33a4df5fb30c0de6c3575/2022/day16/Parse.hs | haskell | module Parse (parseLine,
) where
import Text.ParserCombinators.Parsec
import Control.Monad
parseUnsignedNumber :: Parser Int
parseUnsignedNumber = (liftM read) $ many1 digit
parseValve :: Parser String
parseValve = do
x <- upper
y <- upper
return $ [x,y]
parseListOfValves :: Parser [String]
parse... | |
065c7885399eb722eca6c427e765e059ea27fc1576f57bc0088a8b9ad9b7739f | bldl/magnolisp | test-macro-4.rkt | #lang magnolisp/2014
#|
A local macro.
|#
(typedef int (#:annos foreign))
(function (holds? x)
(#:annos (type (fn int Bool)) foreign)
(= x 1))
(function (f x) #an(export ^(fn int int))
(let-syntax ([if-not
(syntax-rules ()
[(_ c t e)
(if c e t)])])
(i... | null | https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/tests/test-macro-4.rkt | racket |
A local macro.
| #lang magnolisp/2014
(typedef int (#:annos foreign))
(function (holds? x)
(#:annos (type (fn int Bool)) foreign)
(= x 1))
(function (f x) #an(export ^(fn int int))
(let-syntax ([if-not
(syntax-rules ()
[(_ c t e)
(if c e t)])])
(if-not (holds? x) 1 2)))... |
c1666e1fba12a2a2b1df9485f13ef879b81387efb11d21589587c2679a5c7b3c | footprintanalytics/footprint-web | specs_test.clj | (ns metabase.domain-entities.specs-test
(:require [clojure.test :refer :all]
[metabase.domain-entities.specs :as de.specs]
[schema.core :as s]))
(deftest validate-specs-test
(testing "All specs should be valid YAML (the parser will raise an exception if not) and conforming to the schema."
... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/domain_entities/specs_test.clj | clojure | (ns metabase.domain-entities.specs-test
(:require [clojure.test :refer :all]
[metabase.domain-entities.specs :as de.specs]
[schema.core :as s]))
(deftest validate-specs-test
(testing "All specs should be valid YAML (the parser will raise an exception if not) and conforming to the schema."
... | |
dc616ff6d60f64aa244578c9b0e4258f53c7011760ac267903ed0bdf527f92a2 | jhidding/lyonesse | test-parser.scm | (import (rnrs (6))
(prefix (lyonesse testing) test:)
(lyonesse aux-keyword)
(lyonesse functional)
(lyonesse parser)
(lyonesse sexpr-builder simple))
(define (parse:error state input)
(error parse:error "Error parsing." state input))
(define (parse:exit state input)
state)
... | null | https://raw.githubusercontent.com/jhidding/lyonesse/9d9624e3141ea3acaa670526cbe52c2d6546beef/test/test-parser.scm | scheme | (import (rnrs (6))
(prefix (lyonesse testing) test:)
(lyonesse aux-keyword)
(lyonesse functional)
(lyonesse parser)
(lyonesse sexpr-builder simple))
(define (parse:error state input)
(error parse:error "Error parsing." state input))
(define (parse:exit state input)
state)
... | |
83110806002522bf6d1e9dfcb15d446b23b5f35ada8969fbc60dee2c7a6cc8c2 | CRogers/obc | util.ml |
* util.ml
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 . Redistributions of... | null | https://raw.githubusercontent.com/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/yacc/util.ml | ocaml | split -- cleave initial segment that satisfies a test
lexico -- lexical product of orderings, represented as 'compare' functions
ungroup -- flatten a grouped list of pairs
commonest -- find commonest element of list with comparison function |
* util.ml
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 . Redistributions of... |
ed9f3e9a46c0ea8808099ef25a0a087d2a043a5d27d401adfb6343f09e060713 | vyorkin/tiger | trace_source.ml | (** Trace target *)
type target =
| Stdout
| File of string
[@@deriving eq, show]
(** Trace sources *)
type t =
| Symbol of target list
| Semant of target list
[@@deriving eq, show]
| null | https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter5/lib/trace_source.ml | ocaml | * Trace target
* Trace sources | type target =
| Stdout
| File of string
[@@deriving eq, show]
type t =
| Symbol of target list
| Semant of target list
[@@deriving eq, show]
|
a52defef929b00e9b0a9c52c47658708d389e6010a1ae19ee68f540760b0cfce | ghcjs/ghcjs-dom | WebKitCSSMatrix.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.WebKitCSSMatrix
(js_newWebKitCSSMatrix, newWebKitCSSMatrix, js_setMatrixValue,
... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/WebKitCSSMatrix.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/WebKitCSSMatrix.setMatrixValue Mozilla WebKitCSSMatrix.setMatrixValue documentation>
| <-US/docs/Web/API/WebKitCSSMatrix.rotate Mozilla WebKitCSSMatrix.rotate documentation>
| <-US/docs/Web/API/WebKitCS... | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.WebKitCSSMatrix
(js_newWebKitCSSMatrix, newWebKitCSSMatrix, js_setMatrixValue,
setMatrixValue, js_multiply, multiply, multiply_, js_inverse,
inverse, inverse_, js_transla... |
44529643c6a8c4686d886ef369d0c6cffe3058b6cd39aebfd72be1f851020fc4 | onedata/op-worker | replication_worker.erl | %%%-------------------------------------------------------------------
@author
( C ) 2017 - 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%%--------------------------------------------------------------------
%%% @doc
%%% Implementation of gen_transfer_work... | null | https://raw.githubusercontent.com/onedata/op-worker/afc25178632796e095468a491a7d91b9d47aeafb/src/modules/transfer/replication/replication_worker.erl | erlang | -------------------------------------------------------------------
--------------------------------------------------------------------
@doc
Implementation of gen_transfer_worker for replication_workers_pool.
@end
-------------------------------------------------------------------
API
gen_transfer_worker callback... | @author
( C ) 2017 - 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(replication_worker).
-author("Jakub Kudzia").
-author("Bartosz Walkowicz").
-behaviour(gen_transfer_worker).
-include("global_definitions.hrl").
-include("modules/datastore/transfer... |
6e1336f893f74ff1f336d0e8a4204a7d7e31f1a4d5941f972dbaf9eba006ec16 | timothypratley/justice | core.cljc | (ns justice.core
"Concise query and rule syntax for Datalog."
#?(:cljs (:require-macros [justice.core]))
(:require #_[justice.defn :as defn]
[justice.dependencies :as dependencies]
[justice.translation :as t]
[clojure.pprint :as pprint]
[datascript.core :as d]))
(d... | null | https://raw.githubusercontent.com/timothypratley/justice/d2561d42cab73b8a0920f716326e41212d50a274/src/justice/core.cljc | clojure | TODO: pattern match!
TODO: these are pairs, not entities! :(
TODO: is there a special form for boolean tests?
TODO: support ternary
TODO: need to check both variables and maybe entity on either
Truth check
TODO: ternary rules
getter, setter, destructor | (ns justice.core
"Concise query and rule syntax for Datalog."
#?(:cljs (:require-macros [justice.core]))
(:require #_[justice.defn :as defn]
[justice.dependencies :as dependencies]
[justice.translation :as t]
[clojure.pprint :as pprint]
[datascript.core :as d]))
(d... |
5705a7005e8daf6241fb0a195f70767848f52bfc4341fb8d241d404e3de35519 | mstksg/advent-of-code-2018 | Day21.hs | -- |
-- Module : AOC.Challenge.Day21
-- Copyright : (c) Justin Le 2018
-- License : BSD3
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
Day 21 . See " AOC.Solver " for the types used in this module !
module AOC.Challenge.Day21 (
day21a
, day21b
) where
impor... | null | https://raw.githubusercontent.com/mstksg/advent-of-code-2018/fc76f763ece2db87dc5e30b8540559a539665f17/src/AOC/Challenge/Day21.hs | haskell | |
Module : AOC.Challenge.Day21
Copyright : (c) Justin Le 2018
License : BSD3
Stability : experimental
Portability : non-portable
| All the times where the program checks if something is equal to the
| Peephole optimize a division
^ instruction register | Maintainer :
Day 21 . See " AOC.Solver " for the types used in this module !
module AOC.Challenge.Day21 (
day21a
, day21b
) where
import AOC.Common.Elfcode (ECProg, Instr(..), OpCode(..), Peephole, IMem, currPeepPos, peep, traceECProg_, optimizeEC, parseElfcode)
import AOC.... |
cd43c01955e57e389e949434361beb4f7ea38c486028e6584edeeff5a66283ce | axch/test-manager | srfi-69-hash-tables.scm | ;;; ----------------------------------------------------------------------
Copyright 2007 - 2008 .
;;; ----------------------------------------------------------------------
;;; This file is part of Test Manager.
;;;
;;; Test Manager is free software; you can redistribute it and/or modify
it under the terms of t... | null | https://raw.githubusercontent.com/axch/test-manager/511922c64e189522bef02686a7b9bf050aec0ce2/srfi-69-hash-tables.scm | scheme | ----------------------------------------------------------------------
----------------------------------------------------------------------
This file is part of Test Manager.
Test Manager is free software; you can redistribute it and/or modify
(at your option) any later version.
Test Manager is distributed ... | Copyright 2007 - 2008 .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(define *default-bound* (- (expt 2 29) 3))
(define (%string-hash s ch-conv bound)... |
8d3be8d324f4aa5a660aacaa6db6d821b7d7bba1451d3bea25eba57bda792b4d | Odie/gd-edit | inventory.clj | (ns gd-edit.inventory
"This module deals with character inventory.
At the moment, it mostly deals with calculating inventory layout.
The fit-new-item function, in particular is useful for attempting to add a new item
into a sack."
(:require [clojure.set :as set]
[clojure.string :as str]
... | null | https://raw.githubusercontent.com/Odie/gd-edit/32db037514410db2ad0135ce0925fb6d9bdb414b/src/gd_edit/inventory.clj | clojure | The texture-slot-dims functions is bound/rebound whenever the :game-dir setting changes.
Given the width and height,
Combine the origin with the offset to get a coordinate for the
slot we're examining, then the coordinates into the slot-id
Determine the total size/dimensions of the inventory
The given inventory i... | (ns gd-edit.inventory
"This module deals with character inventory.
At the moment, it mostly deals with calculating inventory layout.
The fit-new-item function, in particular is useful for attempting to add a new item
into a sack."
(:require [clojure.set :as set]
[clojure.string :as str]
... |
cacf45c49a2b89840f6d73b0d8bc4da670668993234d19ebce835c065feabad4 | zotonic/zotonic | m_rsc.erl | @author < >
2009 - 2022
@doc Model for resource data . Interfaces between zotonic , templates and the database .
%% @end
Copyright 2009 - 2022
%%
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... | null | https://raw.githubusercontent.com/zotonic/zotonic/f87f4e09bd2cb91333ef0aa9f087a8720a813fde/apps/zotonic_core/src/models/m_rsc.erl | erlang | @end
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governin... | @author < >
2009 - 2022
@doc Model for resource data . Interfaces between zotonic , templates and the database .
Copyright 2009 - 2022
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(m_rsc).
-author(... |
8dd257a34325027422a793540cb75f51a55a52afed5625a8a1597c4e233dec1d | thelema/ocaml-community | odoc_exception.ml | (***********************************************************************)
(* *)
(* OCamldoc *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/ocamldoc/odoc_exception.ml | ocaml | *********************************************************************
OCamldoc
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
module Name = Odoc_name
type exception_a... |
6fa1f2a38afe1d9bc4353159c679350e58b69bebf7f250cf12798bf93e80390c | byorgey/comprog-hs | Util.hs | # LANGUAGE TupleSections #
module Util where
import Control.Arrow
import Data.Array.IArray
import Data.Function
import Data.List
import Data.Maybe
import Data.Ord
fi :: (Integral a, Num b) => a -> b
fi = fromIntegral
fj :: Maybe a -> a
fj = fromJust
both ... | null | https://raw.githubusercontent.com/byorgey/comprog-hs/a42d35bdaef6fb555cc896f6c7e509b0cb9b7cd7/Util.hs | haskell | Discrete binary search. Find the smallest integer in [lo,hi] such | # LANGUAGE TupleSections #
module Util where
import Control.Arrow
import Data.Array.IArray
import Data.Function
import Data.List
import Data.Maybe
import Data.Ord
fi :: (Integral a, Num b) => a -> b
fi = fromIntegral
fj :: Maybe a -> a
fj = fromJust
both ... |
9a20fa6c625de56959ad5175983d23b46d3f77c9ee0890f645f0ad13d9faed69 | thoughtpolice/claap | Yosys.hs | module Tools.Yosys
( YosysSynthType(..)
, YosysOutput(..)
, YosysConfig(..)
, yosysConfig
, yosys
) where
import Development.Shake
import Config
data YosysSynthType
= Generic
| Prep
| Xilinx
| ICE40
| GreenPAK4
data YosysOutput
= BLIF FilePath
| EDIF FilePath
| NoNetlist
data YosysConf... | null | https://raw.githubusercontent.com/thoughtpolice/claap/4944b6c4ad6aff4097f8ef66231ce7d7a59f5ee7/src/mk/Tools/Yosys.hs | haskell | Write out the desired netlist | module Tools.Yosys
( YosysSynthType(..)
, YosysOutput(..)
, YosysConfig(..)
, yosysConfig
, yosys
) where
import Development.Shake
import Config
data YosysSynthType
= Generic
| Prep
| Xilinx
| ICE40
| GreenPAK4
data YosysOutput
= BLIF FilePath
| EDIF FilePath
| NoNetlist
data YosysConf... |
162c619050e7b56fa81851c941ac517fdbec27214ed34953704aaa571bed6351 | simmone/racket-simple-qr | separator.rkt | #lang racket
(require "../../../../share/draw/draw.rkt")
(require "../../../../share/func.rkt")
(provide (contract-out
[write-report-separator (-> hash? natural? path-string? void?)]
))
(define (write-report-separator points_map modules express_path)
(let* ([scrbl_dir (build-path express_path "... | null | https://raw.githubusercontent.com/simmone/racket-simple-qr/904f1491bc521badeafeabd0d7d7e97e3d0ee958/simple-qr/write/lib/express/separator/separator.rkt | racket | #lang racket
(require "../../../../share/draw/draw.rkt")
(require "../../../../share/func.rkt")
(provide (contract-out
[write-report-separator (-> hash? natural? path-string? void?)]
))
(define (write-report-separator points_map modules express_path)
(let* ([scrbl_dir (build-path express_path "... | |
2d596e250d00e3720935e6a7897ace597f363e21bba49629c647ac2ee0520143 | relevance/clojure-async-blocks | core.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/relevance/clojure-async-blocks/920e1e2c6154ee7cce8a560dc4e863ecec512399/src/async_tests/core.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 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 ) . All rights reserved .
by
April 13 , 2013
(ns async-tests.core
(:require [clojure.test :refer :all]
[clojure.pprint :refer [pprint]]
[clojure.tools.namespace.repl :refer [refresh]]
[cljque.promises :as cqe]))
(def ^:dynamic *symbol-translations* {})
... |
e95f08eb6df012e07c034dc543425853bc6018af7fb4d741851b028684a578ae | tmattio/js-bindings | es2015_promise.mli | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem
[@@@ocaml.warning "-7-11-32-33-39"]
]
open Ts2ocaml_baselib
(*
unknown identifiers:
- Promise<T1>
- PromiseLike<T1>
*)
[@@@js.stop]
module type Missing = sig
module Promise : sig
type 'T1 t_1
val t_1_to_js: ('T1 -> Ojs.t) -> 'T1 t_1 -> Ojs.t
val... | null | https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/es2015/_gen/es2015_promise.mli | ocaml |
unknown identifiers:
- Promise<T1>
- PromiseLike<T1>
| [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem
[@@@ocaml.warning "-7-11-32-33-39"]
]
open Ts2ocaml_baselib
[@@@js.stop]
module type Missing = sig
module Promise : sig
type 'T1 t_1
val t_1_to_js: ('T1 -> Ojs.t) -> 'T1 t_1 -> Ojs.t
val t_1_of_js: (Ojs.t -> 'T1) -> Ojs.t -> 'T1 t_1
end
module Promi... |
d04f00289ff8c8b1d97b191afd68052029d2ad43abfdf07b7c121fd7a2e44e9c | alex-hhh/gui-widget-mixins | main.rkt | #lang racket/base
SPDX - License - Identifier : MIT or Apache-2.0
;; main.rkt -- export all defined mixins
;;
This file is part of gui - widget - mixins -- to enhance Racket GUI Widgets
Copyright ( c ) 2019 , 2021 < >
(require "private/decorate-mixin.rkt"
"private/validate-mixin.rkt"
"priva... | null | https://raw.githubusercontent.com/alex-hhh/gui-widget-mixins/c7edc4408d9852fe16441bc5b539b1643db398c1/main.rkt | racket | main.rkt -- export all defined mixins
raco setup --check-pkg-deps --pkgs gui-widget-mixins
raco test --no-run-if-absent --package gui-widget-mixins
Notice
To install (from within the package directory):
To install (once uploaded to pkgs.racket-lang.org):
To uninstall:
To view documentation:
$ raco docs <<na... | #lang racket/base
SPDX - License - Identifier : MIT or Apache-2.0
This file is part of gui - widget - mixins -- to enhance Racket GUI Widgets
Copyright ( c ) 2019 , 2021 < >
(require "private/decorate-mixin.rkt"
"private/validate-mixin.rkt"
"private/cue-mixin.rkt"
"private/tooltip-... |
0f28ee8d76b9b3a643a8de8f665437a4447e67c05e8684fa148b6f9e2609d3e2 | kmmelcher/plp-sad | Disciplina.hs | module Model.Disciplina where
data Disciplina = Disciplina {
id :: Int,
sigla :: String,
nome :: String
} deriving (Show, Read)
| null | https://raw.githubusercontent.com/kmmelcher/plp-sad/2b2f09ea9b37df1a1d748d7a4aab45b7ac6fd637/haskell/src/Model/Disciplina.hs | haskell | module Model.Disciplina where
data Disciplina = Disciplina {
id :: Int,
sigla :: String,
nome :: String
} deriving (Show, Read)
| |
e5ccd04b739358d11fc84c476ad877c04937e29befbe56e7cfde2770bcf341b0 | w2l0o5/observerweb | observerweb_perf.erl | %%%-------------------------------------------------------------------
@author
( C ) 2017 , Freecnpro
%%% @doc
%%%
%%% @end
Created : 2017 - 04 - 17
%%%-------------------------------------------------------------------
-module(observerweb_perf).
-author("").
%% API
-export([perf_info/2]).
perf_info(Node, Pe... | null | https://raw.githubusercontent.com/w2l0o5/observerweb/0e4237c3765e7e69813974cec8c68407c28516e5/apps/observerweb/src/observerweb_perf.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API | @author
( C ) 2017 , Freecnpro
Created : 2017 - 04 - 17
-module(observerweb_perf).
-author("").
-export([perf_info/2]).
perf_info(Node, PerfType) ->
observerweb:try_rpc(Node, erlang, system_flag, [scheduler_wall_time, true]),
case PerfType of
scheduler ->
lists:sort(observerweb:tr... |
38d7644231434511925c419e200d524a8378cdb8e751e6f0687da7980b3c9d27 | hipsleek/hipsleek | maingui.ml | #include "xdebug.cppo"
(******************************************)
(* command line processing *)
(******************************************)
open Gen.Basic
module M = Lexer.Make(Token.Token)
let to_java = ref false
let usage_msg = Sys.argv.(0) ^ " [options] <source files>"
let set_source_file arg = ... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/maingui.ml | ocaml | ****************************************
command line processing
****************************************
****************************************
main function
****************************************
Global variables translating
Global variables translated
i.e. stop Re... | #include "xdebug.cppo"
open Gen.Basic
module M = Lexer.Make(Token.Token)
let to_java = ref false
let usage_msg = Sys.argv.(0) ^ " [options] <source files>"
let set_source_file arg =
Globals.source_files := arg :: !Globals.source_files
let process_cmd_line () = Arg.parse Scriptarguments.sleek_arguments set_sourc... |
d6f15179a3ad05c49cdde83427a5e89aab116c1b21ad752d347c6851e0f596f5 | moby/vpnkit | dns_resolver_mirage.mli |
* Copyright ( c ) 2014 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... | null | https://raw.githubusercontent.com/moby/vpnkit/6dda85cda59e36875fcc6324205aaf0c7056ff0a/src/dns_mirage/dns_resolver_mirage.mli | ocaml |
* Copyright ( c ) 2014 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... | |
3b02e3c9981494566266a010a6d2c84d289262cd8b275b658de7d8525b92be72 | falsetru/htdp | 27.1.4.scm | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-advanced-reader.ss" "lang")((modname 27.1.4) (read-case-sensitive #t) (teachpacks ((lib "draw.ss" "teachpack" "htdp"))) (htdp-settings #(#... | null | https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/27/27.1.4.scm | scheme | about the language level of this file in a form that our tools can easily process. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-advanced-reader.ss" "lang")((modname 27.1.4) (read-case-sensitive #t) (teachpacks ((lib "draw.ss" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal #t #t none #f ((lib "draw.ss" "teachpack" "htdp")))))
... |
f72b27308a81f08b8ee1c072c07ccf31f05c1211974aa0229077d0453aeefa4c | janestreet/core_unix | bigstring_unix.ml | [%%import "config.h"]
open! Core
module Unix = Core_unix
module Syscall_result = Unix.Syscall_result
open Bigarray
include Core.Bigstring
exception IOError of int * exn [@@deriving sexp]
external init_stub : unit -> unit = "bigstring_init_stub"
let () =
Callback.register_exception "Bigstring.End_of_file" End_o... | null | https://raw.githubusercontent.com/janestreet/core_unix/abfad608bb4ab04d16478a081cc284a88c3b3184/bigstring_unix/src/bigstring_unix.ml | ocaml | Input functions
Output functions
maybe it will ignore the bogus sockfd
NDEF RECVMMSG
RECVMMSG
Memory mapping
Input and output, linux only
Memory mapping | [%%import "config.h"]
open! Core
module Unix = Core_unix
module Syscall_result = Unix.Syscall_result
open Bigarray
include Core.Bigstring
exception IOError of int * exn [@@deriving sexp]
external init_stub : unit -> unit = "bigstring_init_stub"
let () =
Callback.register_exception "Bigstring.End_of_file" End_o... |
ea9cfd21c032a065452df264182ab3d1ef554db74f0d62dc85561e5f0f49e6d4 | PeterDWhite/Osker | Threads.hs | Copyright ( c ) , 2003
Copyright ( c ) OHSU , 2003
module Threads
( ThreadInit (..) -- Evertyting needed to initialize a thread
, progType -- Is thread init for lifted or global thread
, Threads -- Map thread Id to thread information
, delThread -- Remove ... | null | https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Braid/Threads.hs | haskell | Evertyting needed to initialize a thread
Is thread init for lifted or global thread
Map thread Id to thread information
Remove a thread from the collection
Add a new thread to the collection
Determine if thread is lifted or global
Find out how many threads there are
Get the thread Ids from collection of threads... | Copyright ( c ) , 2003
Copyright ( c ) OHSU , 2003
module Threads
Initialize a thread info
) where
import Prelude hiding (lookup)
import FiniteMap ( FiniteMap, emptyFM, eltsFM, keysFM, addToFM
, delFromFM, lookupFM, filterFM, sizeFM )
import SimpleQueue (fromList)
import Maybe
import Lis... |
0b28a9113d9dc29e84e83c387008db4afa9b40cfd744e90cceb877c30aae467d | RolfRolles/PandemicML | NEWMemloc.ml | (* Returns Some(x) if ht[key] exists, None otherwise *)
let ht_find_opt ht key = let res = try Some(Hashtbl.find ht key) with Not_found -> None in res
let mk_memsub r32 addr = let open IRUtil in mk_sub (mk_dword_of_int32 addr) (mk_evar r32)
let mk_memloc ht v32 addr = (v32,NEWIREval.eval_to_int32 ht (mk_memsub v32 ad... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Projects/Nxcroticism/NEWMemloc.ml | ocaml | Returns Some(x) if ht[key] exists, None otherwise
Main loop, over I/O pairs, to convert memory addresses to locations.
Process the reads and writes into their respective hash tables
Rotate the hash tables, progressively filtering the memory locations.
Create variables for the common locations; make new hash ta... | let ht_find_opt ht key = let res = try Some(Hashtbl.find ht key) with Not_found -> None in res
let mk_memsub r32 addr = let open IRUtil in mk_sub (mk_dword_of_int32 addr) (mk_evar r32)
let mk_memloc ht v32 addr = (v32,NEWIREval.eval_to_int32 ht (mk_memsub v32 addr))
let mk_memlocs ht addr = List.map (fun x -> mk_meml... |
276afc4ae2930d95e99dec90a2168c4c607748c2f259337ebb36e94e243071e5 | 2600hz/kazoo | edr_binding_tests.erl | %%%-----------------------------------------------------------------------------
( C ) 2017 , Conversant Ltd
%%% @doc
@author Conversant Ltd ( )
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 on... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_edr/test/edr_binding_tests.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
----------------------------------------------------------------------------- | ( C ) 2017 , Conversant Ltd
@author Conversant Ltd ( )
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(edr_binding_tests).
-include_lib("eunit/include/eunit.hrl").
-include_lib... |
19caec5deb92e33919e750368b9e74fa5cd6ef1f77c7b164820f85cb65f5f6e5 | SahilKang/cl-avro | count-and-size.lisp | Copyright 2021 Google LLC
;;;
;;; This file is part of cl-avro.
;;;
;;; cl-avro is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;;; (at your option) any later version.
;... | null | https://raw.githubusercontent.com/SahilKang/cl-avro/70fcaa32514cfb59b75812b2eab45ed24cce9d27/src/complex/count-and-size.lisp | lisp |
This file is part of cl-avro.
cl-avro is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-avro 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 t... | Copyright 2021 Google LLC
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package #:cl-user)
(defpackage #:cl-avro.internal.count-and-size
(:use #:cl)... |
830135e9cd4b6ee79e09e0ad252777cd80d0de4c83af66b09be7dfbe5bd26169 | rgrinberg/bencode | bencode_streaming.ml | type t = Bencode.t
open Bencode
type bencode = t
type 'a sequence = ('a -> unit) -> unit
* { 2 Serialization ( encoding ) }
module Encode = struct
(* length of an encoded int, in bytes *)
let _len_int i = String.length (Int64.to_string i)
(* length of an encoded string, in bytes *)
let _len_str s =
let ... | null | https://raw.githubusercontent.com/rgrinberg/bencode/d223a6cd3e38363d42cd37ba808b581049ae3f1f/lib/bencode_streaming.ml | ocaml | length of an encoded int, in bytes
length of an encoded string, in bytes
* end of input
in dictionary
parsed key, wait for value
how to fail: set state to an error
atomic bencode value from token
proper switch
return a value (possibly into the top container)
push [v] as a completed value
yield! | type t = Bencode.t
open Bencode
type bencode = t
type 'a sequence = ('a -> unit) -> unit
* { 2 Serialization ( encoding ) }
module Encode = struct
let _len_int i = String.length (Int64.to_string i)
let _len_str s =
let payload_len = String.length s in
_len_int (Int64.of_int payload_len) + 1 + payload_le... |
13df8d758a17426679c881623acbf60b6120036c356b8baaf50c92dbe6439722 | g-andrade/locus | locus_logger.erl | Copyright ( c ) 2017 - 2023
%%
%% 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, merge, publish, di... | null | https://raw.githubusercontent.com/g-andrade/locus/c731b1a4a819e998c60d90a0484e75e36966aa8c/src/locus_logger.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 not... | Copyright ( c ) 2017 - 2023
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 ANY KIND , EXPRESS OR
... |
b9cbbb86ca5dad1cdcf220997e9e8e9bef7c9df7ee0895ccfe743c99b2a8b905 | startalkIM/ejabberd | mod_service_log.erl | %%%----------------------------------------------------------------------
File :
Author : < >
%%% Purpose : Copy user messages to logger service
Created : 24 Aug 2003 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
%%%
%%% This program is free software; you can redistribute it a... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/mod_service_log.erl | erlang | ----------------------------------------------------------------------
Purpose : Copy user messages to logger service
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WAR... | File :
Author : < >
Created : 24 Aug 2003 by < >
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public Li... |
004e9d65f76cdcc00ae9cd1ed68892cb5bd86ed616d821fee599eb5a1ccfc9e3 | Enecuum/Node | NodeRuntime.hs | # LANGUAGE DuplicateRecordFields #
-- | This module contains functions to work with node runtime.
module Enecuum.Testing.Framework.NodeRuntime where
import Enecuum.Prelude
import qualified Data.Map as Map
import qualified Enecuum.Domain as D
import qualified Enecuum.Language as... | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/test/test-framework/Enecuum/Testing/Framework/NodeRuntime.hs | haskell | | This module contains functions to work with node runtime.
| Creates empty node runtime.
| Creates node runtime. Registers in the test runtime.
Uses graph.
| Evaluates node scenario. Does no node registering in the test runtime.
Node scenario can't send messages to other nodes (well, it can, but will fail).
| E... | # LANGUAGE DuplicateRecordFields #
module Enecuum.Testing.Framework.NodeRuntime where
import Enecuum.Prelude
import qualified Data.Map as Map
import qualified Enecuum.Domain as D
import qualified Enecuum.Language as L
import qualified Enecuum . Framework . Lens as Lens
import ... |
b8482a03f139b6ee0970c8986cc577037eda16e51d33afc7ef062780c2340ee5 | eliast/mongo-erlang-driver | mongodb_tests.erl | %%%----------------------------------------------------------------------
%%% File : mongodb_tests.erl
Author : < >
%%% Purpose : Erlang MongoDB Driver
%%%----------------------------------------------------------------------
-module(mongodb_tests).
-author('').
-include("mongodb.hrl").
-include_lib("eunit... | null | https://raw.githubusercontent.com/eliast/mongo-erlang-driver/18c32fcd045350ccf478f34fad7400be6db6f72d/src/mongodb_tests.erl | erlang | ----------------------------------------------------------------------
File : mongodb_tests.erl
Purpose : Erlang MongoDB Driver
---------------------------------------------------------------------- | Author : < >
-module(mongodb_tests).
-author('').
-include("mongodb.hrl").
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
" Şя "
setup_collection() ->
error_logger:tty(false),
{ok, _Pid} = mongodb:start(mypool),
Db = mongodb:database(mypool, "pymongo_test"),
TestCollection = Db:co... |
0d5fd5de16bd12e674aabe3e5b08995d3e071130e53aeee3def06122d0ba3485 | AbstractMachinesLab/caramel | ordering.mli | (** Element ordering *)
type t =
| Lt (** Lesser than *)
| Eq (** Equal *)
| Gt (** Greater than *)
val of_int : int -> t
val to_int : t -> int
* returns the string representation . one of : " < " , " = " , " > "
val to_string : t -> string
val neq : t -> bool
val is_eq : t -> bool
val min : ('a -> 'a -... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/vendor/stdune/ordering.mli | ocaml | * Element ordering
* Lesser than
* Equal
* Greater than |
type t =
val of_int : int -> t
val to_int : t -> int
* returns the string representation . one of : " < " , " = " , " > "
val to_string : t -> string
val neq : t -> bool
val is_eq : t -> bool
val min : ('a -> 'a -> t) -> 'a -> 'a -> 'a
val max : ('a -> 'a -> t) -> 'a -> 'a -> 'a
|
afc2d2cbf308bbe42713c94338df6a8afd7687af807a849918f4271b657c7c0e | mitchellwrosen/dohaskell | Submit.hs | module Handler.Submit where
import Import
import Database.Persist.Class.Extra (insertBy')
import View.Resource (resourceForm)
getSubmitR :: Handler Html
getSubmitR = do
uid <- requireAuthId
(widget, enctype) <- generateFormPost (resourceForm uid)
defaultLayout $ do
setTitle "dohask... | null | https://raw.githubusercontent.com/mitchellwrosen/dohaskell/69aea7a42112557ac3e835b9dbdb9bf60a81f780/src/Handler/Submit.hs | haskell | module Handler.Submit where
import Import
import Database.Persist.Class.Extra (insertBy')
import View.Resource (resourceForm)
getSubmitR :: Handler Html
getSubmitR = do
uid <- requireAuthId
(widget, enctype) <- generateFormPost (resourceForm uid)
defaultLayout $ do
setTitle "dohask... | |
c6c85d801ee1dc76d515433400e818d0866c915ab1d8a8a15a498f43e63b970e | dochang/magicffi | package.lisp | (in-package :cl-user)
(defpackage :magicffi
(:use :cl :cffi)
(:documentation "Usage:
> (asdf:load-system :magicffi)
> (use-package :magicffi)
> (with-open-magic (magic '(:mime-type :symlink))
(magic-load magic)
(magic-file magic #P\"magicffi.asd\"))
\"text/plain\"
")
(:export
;; types
:magic
;;... | null | https://raw.githubusercontent.com/dochang/magicffi/d88f2f280c31f639e4e05be75215d8a8dce6aef2/package.lisp | lisp | types
special variables
functions
conditions
flag constants
macros | (in-package :cl-user)
(defpackage :magicffi
(:use :cl :cffi)
(:documentation "Usage:
> (asdf:load-system :magicffi)
> (use-package :magicffi)
> (with-open-magic (magic '(:mime-type :symlink))
(magic-load magic)
(magic-file magic #P\"magicffi.asd\"))
\"text/plain\"
")
(:export
:magic
:*magic-databa... |
0a2b7753a37f850a1350d8fd196118e248002359c51a4c99a1a3f907b69c0a5a | bnoordhuis/chicken-core | ec.scm | (module ec (do-ec do-ec:do :do :let :parallel
:parallel-1 :while :while-1 :while-2
:until :until-1 :list :string
(:vector ec-:vector-filter)
:integers :range
:real-range :char-range :port :dispatched
:generator-proc dispatch-union
make-initial-:-dispatch
(: :-di... | null | https://raw.githubusercontent.com/bnoordhuis/chicken-core/56d30e3be095b6abe1bddcfe10505fa726a43bb5/tests/ec.scm | scheme | <PLAINTEXT>
Eager Comprehensions in [outer..inner|expr]-Convention
======================================================
Scheme R5RS (incl. macros), SRFI-23 (error).
,open srfi-23
,load ec.scm
; File > Open ... "ec.scm", click Execute
(require 'macro) (require 'record)
(load "ec.scm")
Implem... | (module ec (do-ec do-ec:do :do :let :parallel
:parallel-1 :while :while-1 :while-2
:until :until-1 :list :string
(:vector ec-:vector-filter)
:integers :range
:real-range :char-range :port :dispatched
:generator-proc dispatch-union
make-initial-:-dispatch
(: :-di... |
8ff1cec7dad04b43763537496facd4762ac5e94dc94a686492f4396b33b52998 | brendanhay/gogol | Delete.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-spanner/gen/Gogol/Spanner/Projects/Instances/Backups/Delete.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
/See:/ </ Cloud Spanner API Reference> for @spanner.projects.instances.backups.delete@.
* Resource
** Constructing a Request
| A resource alias for @spanner.projects.instances.backups.delete@ method which the
'SpannerProjects... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
e56cd3213551a5ad47b6f4cd1cd7e73d0ff53d1f8d38e9fc94342322a19e2db3 | naoto-ogawa/h-xproto-mysql | Type.hs | # LANGUAGE BangPatterns , DeriveDataTypeable , DeriveGeneric , FlexibleInstances , MultiParamTypeClasses #
# OPTIONS_GHC -fno - warn - unused - imports #
module Com.Mysql.Cj.Mysqlx.Protobuf.Any.Type (Type(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qualified Data.Typeable as ... | null | https://raw.githubusercontent.com/naoto-ogawa/h-xproto-mysql/1eacd6486c99b849016bf088788cb8d8b166f964/src/Com/Mysql/Cj/Mysqlx/Protobuf/Any/Type.hs | haskell | # LANGUAGE BangPatterns , DeriveDataTypeable , DeriveGeneric , FlexibleInstances , MultiParamTypeClasses #
# OPTIONS_GHC -fno - warn - unused - imports #
module Com.Mysql.Cj.Mysqlx.Protobuf.Any.Type (Type(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import qualified Data.Typeable as ... | |
f94fd9bd915d36cbddb0f1127be09b99ae098c8b54f5843efaa614384ad90419 | maximedenes/native-coq | certificate.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/micromega/certificate.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 - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
: A reflexive tactic using ... |
fb7843b98320971a3d8899f98c6cd9d4e3be6d07c7c809623ad81476867fa642 | dapphub/dapptools | Debug.hs | module EVM.Debug where
import EVM (Contract, storage, nonce, balance, bytecode, codehash)
import EVM.Solidity (SrcMap, srcMapFile, srcMapOffset, srcMapLength, SourceCache, sourceFiles)
import EVM.Types (Addr)
import EVM.Symbolic (len)
import Control.Arrow (second)
import Control.Lens
import Data.ByteStr... | null | https://raw.githubusercontent.com/dapphub/dapptools/beaaeb6a6ad1cde22989bd088b10bdd06718b73f/src/hevm/src/EVM/Debug.hs | haskell | debugger :: Maybe SourceCache -> VM -> IO VM
debugger maybeCache vm = do
-- cpprint (view state vm)
cpprint ("pc" :: Text, view (state . pc) vm)
cpprint (view (state . stack) vm)
-- cpprint (view logs vm)
cpprint (vmOp vm)
cpprint (opParams vm)
cpprint (length (view frames vm))
-- putDoc (pret... | module EVM.Debug where
import EVM (Contract, storage, nonce, balance, bytecode, codehash)
import EVM.Solidity (SrcMap, srcMapFile, srcMapOffset, srcMapLength, SourceCache, sourceFiles)
import EVM.Types (Addr)
import EVM.Symbolic (len)
import Control.Arrow (second)
import Control.Lens
import Data.ByteStr... |
8be6730c0e1d41081b6d1cd9b105e2f1a58258d76dbf675d9281f586f4ffa496 | BillHallahan/G2 | PropSize2.hs | {-@ LIQUID "--short-names" @-}
{-@ LIQUID "--no-termination" @-}
module PropSize2 where
import Prelude hiding (length)
data List = Emp
| C List
length :: List -> Int
length Emp = 0
length (C xs) = length xs
prop_size =
case length Emp of
0 -> True
_ -> die "Assert fails!"
{-@ die :: ... | null | https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/Liquid/PropSize2.hs | haskell | @ LIQUID "--short-names" @
@ LIQUID "--no-termination" @
@ die :: {v:String | false} -> a @ |
module PropSize2 where
import Prelude hiding (length)
data List = Emp
| C List
length :: List -> Int
length Emp = 0
length (C xs) = length xs
prop_size =
case length Emp of
0 -> True
_ -> die "Assert fails!"
die str = error ("Oops, I died!" ++ str)
|
7908e0236a313e0f66106cfc90a2dbcbee515677230d16698814c531ebeb8071 | brownplt/lambda-py | python-syntax-operations.rkt | #lang plai-typed/untyped
(require "python-syntax.rkt"
"python-core-syntax.rkt"
"python-lexical-syntax.rkt")
(require "util.rkt")
(require [typed-in racket (format : (string 'a -> string))])
(require [typed-in racket (flatten : ((listof (listof 'a) ) -> (listof 'b)))])
(require [typed-in racket (remov... | null | https://raw.githubusercontent.com/brownplt/lambda-py/c3ee39502c8953d36b886e5a203f2eb51d2f495b/base/python-syntax-operations.rkt | racket | control structures
the top level seq
primitive literals
exceptions and exception handling
yield
loops
pass & assert
classes and objects
operations
op = 'And | 'Or
functions
builtin data structures
(display "we actually recur\n")
control structures
the top level seq
primitive literals
exceptions and exc... | #lang plai-typed/untyped
(require "python-syntax.rkt"
"python-core-syntax.rkt"
"python-lexical-syntax.rkt")
(require "util.rkt")
(require [typed-in racket (format : (string 'a -> string))])
(require [typed-in racket (flatten : ((listof (listof 'a) ) -> (listof 'b)))])
(require [typed-in racket (remov... |
7cfb62c7118d2a7b590275e59f857d449499bd903dad557bde240023186827c5 | bmeurer/ocaml-experimental | odoc_misc.mli | (***********************************************************************)
(* OCamldoc *)
(* *)
, projet Cristal , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/ocamldoc/odoc_misc.mli | ocaml | *********************************************************************
OCamldoc
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
* [ no_blanks s ] returns the gi... |
325ac540b17dc323524498b09813864617540528a291c865eb02946e2d5c419e | typelead/etlas | Executable.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
module Distribution.Types.Executable (
Executable(..),
emptyExecutable,
exeModules,
exeModulesAutogen
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Types.BuildInfo
import Distribution.Types.UnqualCompone... | null | https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas-cabal/Distribution/Types/Executable.hs | haskell | # LANGUAGE DeriveDataTypeable #
| Get all the module names from an exe
| Get all the auto generated module names from an exe
This are a subset of 'exeModules'. | # LANGUAGE DeriveGeneric #
module Distribution.Types.Executable (
Executable(..),
emptyExecutable,
exeModules,
exeModulesAutogen
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Types.BuildInfo
import Distribution.Types.UnqualComponentName
import Distribution.ModuleNam... |
e26fd73fb3856bc27375082305e9969accf6bea629cae1f50a0ff628209f5e04 | agj/nendo | sankakkei.rkt | #lang racket
(require "../../src/ale/intl/ja/main.rkt")
(totteoku sankakkei
(draw-turtle
(kurikaesu 3
(migi (* 360 1/3))
(susumu 80))))
(draw-turtle
(kurikaesu 10
(migi (* 360 1/10))
sankakkei))
| null | https://raw.githubusercontent.com/agj/nendo/d668ef17349e3336269f7d03e7f71df0f06caa57/examples/ja/sankakkei.rkt | racket | #lang racket
(require "../../src/ale/intl/ja/main.rkt")
(totteoku sankakkei
(draw-turtle
(kurikaesu 3
(migi (* 360 1/3))
(susumu 80))))
(draw-turtle
(kurikaesu 10
(migi (* 360 1/10))
sankakkei))
| |
869476109f3a12f26dac1a4176da93fd4b47bc73c8d1e54660ce89cdf0fedaec | jepsen-io/jepsen | wr.clj | (ns jepsen.dgraph.wr
"Performs random reads and writes of unique values. Constructs a dependency
graph using realtime order (since dgraph is supposed to be linearizable) and
via write-read edges, and looks for cycles in that graph."
(:require [clojure.tools.logging :refer [info]]
[clojure.core.reduc... | null | https://raw.githubusercontent.com/jepsen-io/jepsen/a75d5a50dd5fa8d639a622c124bf61253460b754/dgraph/src/jepsen/dgraph/wr.clj | clojure | :timeline (timeline/html)}) | (ns jepsen.dgraph.wr
"Performs random reads and writes of unique values. Constructs a dependency
graph using realtime order (since dgraph is supposed to be linearizable) and
via write-read edges, and looks for cycles in that graph."
(:require [clojure.tools.logging :refer [info]]
[clojure.core.reduc... |
73acfee1fe311d30038aaa68bf2eb92ed2e4cee91f81d1206ef83e72d379b8f9 | ConsumerDataStandardsAustralia/validation-prototype | LambdaModel.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
module Web.ConsumerData.Au.LambdaBank.LambdaModel whe... | null | https://raw.githubusercontent.com/ConsumerDataStandardsAustralia/validation-prototype/ff63338b77339ee49fa3e0be5bb9d7f74e50c28b/consumer-data-au-lambdabank/src/Web/ConsumerData/Au/LambdaBank/LambdaModel.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators # | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Web.ConsumerData.Au.LambdaBank.LambdaModel where
import Control.Concurrent.STM.TVar (TVar)
import Control.Monad.Free.Church (F, foldF)
import Control.Monad.IO.Class (MonadIO)
import Control.Monad.Reader (MonadReader, runReader... |
c3001ed24b01017b62a81a416e6f354911a29f711aad6b85a83d1829e0607a9a | ranon-rat/learningHaskell | firstProgramInHaskell.hs | main :: IO ()
main = putStrLn "hello world∆"
| null | https://raw.githubusercontent.com/ranon-rat/learningHaskell/7dda339654ad8bcaf2a290fa2230125e78e3e2a3/excersices/firstProgramInHaskell.hs | haskell | main :: IO ()
main = putStrLn "hello world∆"
| |
d4380e849ab003389ddf781c4fc93ee9e430ad790ea5d875d43a94bf0fef1714 | algoriffic/lsa4solr | cluster.clj | (ns lsa4solr.cluster
(:use [clojure.contrib.seq-utils :only [indexed]]
[lsa4solr core clustering-protocol]))
(gen-class
:name lsa4solr.cluster/LSAClusteringEngine
:extends org.apache.solr.handler.clustering.SearchClusteringEngine
:exposes-methods {init superinit}
:init initialize-state
:state state)
(defn -in... | null | https://raw.githubusercontent.com/algoriffic/lsa4solr/93231caff612d0a0bf3c418523385af674adae4e/src/lsa4solr/cluster.clj | clojure | K-Means
Hierarchical | (ns lsa4solr.cluster
(:use [clojure.contrib.seq-utils :only [indexed]]
[lsa4solr core clustering-protocol]))
(gen-class
:name lsa4solr.cluster/LSAClusteringEngine
:extends org.apache.solr.handler.clustering.SearchClusteringEngine
:exposes-methods {init superinit}
:init initialize-state
:state state)
(defn -in... |
9d9fb6915556416b8fee6c302ec842af288c18b7b0c3f232c3d4571d6145263a | pirapira/coq2rust | unionfind.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/lib/unionfind.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* An imperative implementation of pa... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Paths are compressed imper... |
8da79685cf72d75e0df20c1e23d72c6789b55d8648c1a5c654f618a536288c49 | xvw/muhokama | user.ml | open Lib_common
let list () =
let promise =
let open Lwt_util in
let*? env = Env.init () in
let*? pool = Lib_db.connect env in
Lib_db.use pool
@@ Models.User.iter (fun user ->
Logs.info (fun pp ->
pp
"%s\t|%s\t|%s\t|%a"
user.id
user.name
... | null | https://raw.githubusercontent.com/xvw/muhokama/dcfa488169677ff7f1a3ed71182524aeb0b13c53/bin/user.ml | ocaml | open Lib_common
let list () =
let promise =
let open Lwt_util in
let*? env = Env.init () in
let*? pool = Lib_db.connect env in
Lib_db.use pool
@@ Models.User.iter (fun user ->
Logs.info (fun pp ->
pp
"%s\t|%s\t|%s\t|%a"
user.id
user.name
... | |
ef2b8e4837877b5586342ae58c0452b52026c420ef888a943b078bb8b7c57812 | sbryant/clcss | package.lisp | (defpackage :clcss-tests
(:use :cl :nst)
(:use :clcss)
(:export #:run-all))
(in-package :clcss-tests)
(defun run-all ()
(let ((results-dir (merge-pathnames (make-pathname :directory '(:relative "tests" "results"))
(asdf:system-source-directory :clcss-tests))))
;; Verbos... | null | https://raw.githubusercontent.com/sbryant/clcss/d74cf029b258b0b65593892478462540728943dc/tests/package.lisp | lisp | Verbosity knob
(nst-cmd :set :verbose :trace) | (defpackage :clcss-tests
(:use :cl :nst)
(:use :clcss)
(:export #:run-all))
(in-package :clcss-tests)
(defun run-all ()
(let ((results-dir (merge-pathnames (make-pathname :directory '(:relative "tests" "results"))
(asdf:system-source-directory :clcss-tests))))
(nst-cmd... |
83e740b7df33c02b7594db434abd59080280af6a0d65c2945f2077ea694b849c | conal/circat | Delay.hs | # LANGUAGE CPP , ExistentialQuantification , ViewPatterns #
# OPTIONS_GHC -Wall #
{ - # OPTIONS_GHC -fno - warn - unused - imports # - } -- TEMP
{ - # OPTIONS_GHC -fno - warn - unused - binds # - } -- TEMP
----------------------------------------------------------------------
-- |
-- Module : Circat.Dela... | null | https://raw.githubusercontent.com/conal/circat/083155b1aafe523fb0df84aaa107064b36c1fd0d/src/Circat/Delay.hs | haskell | TEMP
TEMP
--------------------------------------------------------------------
|
Module : Circat.Delay
Maintainer :
Stability : experimental
--------------------------------------------------------------------
TODO: explicit exports
----------------------------------------------------------------... | # LANGUAGE CPP , ExistentialQuantification , ViewPatterns #
# OPTIONS_GHC -Wall #
Copyright : ( c ) 2015 Tabula , Inc.
Partiality monad in direct and unfold forms
module Circat.Delay where
import Control.Applicative (Applicative(..))
data Delay a = Later (Delay a) | Now a
instance Functor Delay where
... |
11a482bff1a4b49e03d889d9d99455f57e8867fbb6e4e1faaf49bdce081a77f3 | yuriy-chumak/ol | sum_and_product_of_an_array.scm | ;
(print (fold + 0 '(1 2 3 4 5)))
(print (fold * 1 '(1 2 3 4 5)))
| null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/rosettacode/sum_and_product_of_an_array.scm | scheme |
(print (fold + 0 '(1 2 3 4 5)))
(print (fold * 1 '(1 2 3 4 5)))
| |
38d58b1a084d5f58af4b33266bdc62bd7be6ca15dfd4796fa927ca98dc2ee31e | factisresearch/opensource | PlusSpec.hs | # OPTIONS_GHC -F -pgmF htfpp #
module Safe.PlusSpec where
import GHC.Exception
import Safe.Plus
import Test.Framework
test_safeError :: IO ()
test_safeError =
assertThrows (safeError msg) (matches (format __FILE__ __LINE__))
where
matches expected (ErrorCallWithLocation actual _) = expected == actual
... | null | https://raw.githubusercontent.com/factisresearch/opensource/d8b1fdf39d945bfcbc045ca9f73ab5aa84f89fa0/util-plus/test/Safe/PlusSpec.hs | haskell | # OPTIONS_GHC -F -pgmF htfpp #
module Safe.PlusSpec where
import GHC.Exception
import Safe.Plus
import Test.Framework
test_safeError :: IO ()
test_safeError =
assertThrows (safeError msg) (matches (format __FILE__ __LINE__))
where
matches expected (ErrorCallWithLocation actual _) = expected == actual
... | |
7c961d7fae894954cf4ef0e5227dc8c9f0f2c08b142463ecccaa540395d54ef9 | nick8325/quickspec | Testing.hs | -- A type of test case generators.
{-# OPTIONS_HADDOCK hide #-}
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , DefaultSignatures , GADTs , FlexibleInstances , UndecidableInstances #
module QuickSpec.Internal.Testing where
import QuickSpec.Internal.Prop
import Control.Monad.Trans.Class
import Control.Monad... | null | https://raw.githubusercontent.com/nick8325/quickspec/cb61f719d3d667674431867037ff44dec22ca4f9/src/QuickSpec/Internal/Testing.hs | haskell | A type of test case generators.
# OPTIONS_HADDOCK hide # | # LANGUAGE MultiParamTypeClasses , FunctionalDependencies , DefaultSignatures , GADTs , FlexibleInstances , UndecidableInstances #
module QuickSpec.Internal.Testing where
import QuickSpec.Internal.Prop
import Control.Monad.Trans.Class
import Control.Monad.Trans.State.Strict
import Control.Monad.Trans.Reader
class Mon... |
332924654c24b0d7b0754a1280382bebe29a654ba9e8509da0f4f811c6f98c3e | mirage/bechamel | sqrt.ml | open Bechamel
let () = Random.self_init ()
let random_max = 32767.
let ( <.> ) f g x = f (g x)
let normal n =
let m = n + (n mod 2) in
let values = Array.create_float m in
for i = 0 to (m / 2) - 1 do
let x = ref 0. and y = ref 0. and rsq = ref 0. in
while
x := (Random.float random_max /. random_ma... | null | https://raw.githubusercontent.com/mirage/bechamel/8e1a3e64c6723d1d9b2081aeb06d725024f88012/examples/sqrt.ml | ocaml | open Bechamel
let () = Random.self_init ()
let random_max = 32767.
let ( <.> ) f g x = f (g x)
let normal n =
let m = n + (n mod 2) in
let values = Array.create_float m in
for i = 0 to (m / 2) - 1 do
let x = ref 0. and y = ref 0. and rsq = ref 0. in
while
x := (Random.float random_max /. random_ma... | |
fedbde4d3f39dbf389f4d64a03b322a7d1f1ef291b070be3fbdec98fbf7e168d | SquidDev/illuaminate | doc_extract_config.mli | open IlluaminateCore
open IlluaminateConfig
type custom_kind =
{ id : string; (** The id of this kind, used in documentation tags. *)
display : string (** A display name for this kind. *)
}
(** Configuration options for documentation querying. *)
type t =
{ module_path : IlluaminatePattern.t list;
* The p... | null | https://raw.githubusercontent.com/SquidDev/illuaminate/da18b101b4710881b71c42554d70a3a7d17c3cd6/src/semantics/doc_extract_config.mli | ocaml | * The id of this kind, used in documentation tags.
* A display name for this kind.
* Configuration options for documentation querying.
* All custom module kinds.
* A config category for all workspace-level documentation options
* A configuration key for {!t}.
* Guess the module name from a file path.
* Guess the... | open IlluaminateCore
open IlluaminateConfig
type custom_kind =
}
type t =
{ module_path : IlluaminatePattern.t list;
* The path(s ) where modules are located as globs . For instance , the Lua path component
[ \ [ foo/?.lua\ ] ] would be encoded as [ \["/path / to / project / foo/*.lua"\ ] ] .
... |
581517a2fa872f7ec1d232134067071a4c343e315816a4e3c7975cdd777c79cc | nuvla/ui | utils.cljs | (ns sixsq.nuvla.ui.deployments.utils
(:require [clojure.set :as set]
[clojure.string :as str]
[sixsq.nuvla.ui.apps.utils :as apps-utils]
[sixsq.nuvla.ui.deployments.spec :as spec]
[sixsq.nuvla.ui.plugins.full-text-search :as full-text-search-plugin]
[sixsq.n... | null | https://raw.githubusercontent.com/nuvla/ui/da6860cac1f4a5ec84f04aa722a222d21cd610df/code/src/cljs/sixsq/nuvla/ui/deployments/utils.cljs | clojure | careful, this returns true for an empty collection! | (ns sixsq.nuvla.ui.deployments.utils
(:require [clojure.set :as set]
[clojure.string :as str]
[sixsq.nuvla.ui.apps.utils :as apps-utils]
[sixsq.nuvla.ui.deployments.spec :as spec]
[sixsq.nuvla.ui.plugins.full-text-search :as full-text-search-plugin]
[sixsq.n... |
256cac2a5ddca36a8679f221276248a1344bdcf7e455b5e506e3a9080fcda200 | msakai/cpl | FE.hs | {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
-----------------------------------------------------------------------------
-- |
Module : FE
Copyright : ( c ) 2004,2009
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
Functori... | null | https://raw.githubusercontent.com/msakai/cpl/a83ad4479cb95f98010b4f63a06b1e0b2bfd5736/src/FE.hs | haskell | # LANGUAGE TypeSynonymInstances, FlexibleInstances #
---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
# SOURCE #
-... | Module : FE
Copyright : ( c ) 2004,2009
Functorial expression and functorial calculus .
module FE
( VarId
, GenFE (..)
, FE
, fold
, GenCFE (..)
, CFE
) where
import Variance
import Funct
import Data.List (transpose, intercalate)
type VarId = Int
showVarId :: VarId... |
72776c863c8435da726320e28fa898335f02634b972ebb12a8cde76a1d6cb6ad | stylewarning/quickutil | control.lisp | (in-package #:quickutil-utilities.utilities)
(defutil until (:version (1 . 0)
:category (language control))
"Executes `body` until `expression` is true."
#>%%%>
(defmacro until (expression &body body)
%%DOC
`(do ()
(,expression)
,@body))
%%%)
(defutil while (:version (1... | null | https://raw.githubusercontent.com/stylewarning/quickutil/5adb3463d99095145325c4013117bd08a8f6cac2/quickutil-utilities/utilities/control.lisp | lisp | (in-package #:quickutil-utilities.utilities)
(defutil until (:version (1 . 0)
:category (language control))
"Executes `body` until `expression` is true."
#>%%%>
(defmacro until (expression &body body)
%%DOC
`(do ()
(,expression)
,@body))
%%%)
(defutil while (:version (1... | |
4a14b3d33174b74c664deb09905cdab01c4805ed1ecfe7e0e6370638cd89d952 | parapluu/Concuerror | concuerror_sched.erl | %%%----------------------------------------------------------------------
Copyright ( c ) 2011 , < > ,
< >
and < > .
%%% All rights reserved.
%%%
This file is distributed under the Simplified BSD License .
%%% Details can be found in the LICENSE file.
%%%------------... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/resources/old_source/concuerror_sched.erl | erlang | ----------------------------------------------------------------------
All rights reserved.
Details can be found in the LICENSE file.
----------------------------------------------------------------------
Description : Scheduler
----------------------------------------------------------------------
UI related expo... | Copyright ( c ) 2011 , < > ,
< >
and < > .
This file is distributed under the Simplified BSD License .
Authors : < >
< >
-module(concuerror_sched).
-export([analyze/3]).
-export([notify/2, notify/3, wait/0]).
-export_type([analysis_ta... |
9c55e251eb6e005c27104bc449fcead492c78399aa9fceb0812d3038fd30f75c | project-oak/hafnium-verification | Abs.ml |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/biabduction/Abs.ml | ocaml | * Implementation of Abstraction Functions
sigma should be in a specific order
[fav_insts_of_private_ids] does not intersect the free vars in [p_leftover.sigma]
[fav_insts_of_private_ids] does not intersect the free vars in [insts_of_public_ids]
***************** Start of DLL abstraction rules *****************... |
* Copyright ( c ) 2009 - 2013 , Monoidics ltd .
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2009-2013, Monoidics ltd.
* Copyright (c) Facebook, In... |
93c0940c372a5f6ab8151a61a8437ca562a3e9cc311d55e804316056b96c00b2 | haskell-repa/repa | Graph.hs |
module Data.Repa.Query.Graph.Graph
( -- * Graphs
Graph (..)
, Node (..)
-- * Flow sources
, Source (..)
-- * Flow operators
, FlowOp (..)
-- * Scalar expressions
, Exp (..)
, Val ... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-query/Data/Repa/Query/Graph/Graph.hs | haskell | * Graphs
* Flow sources
* Flow operators
* Scalar expressions
-------------------------------------------------------------------------------------------------
| Operator graph for a query.
-------------------------------------------------------------------------------------------------
| A single node in the gra... |
module Data.Repa.Query.Graph.Graph
Graph (..)
, Node (..)
, Source (..)
, FlowOp (..)
, Exp (..)
, Val (..)
, Lit (..)
, ScalarOp (..))
where
import Data.Repa.Query.Graph.Exp
imp... |
faa3803c320cb765f6c09e85407cf0f86be3459062f79883f803c95cad3afeb7 | ragkousism/Guix-on-Hurd | ocr.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2016 < >
;;;
;;; 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 Free Software Foundation ; ei... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/ocr.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 © 2013 < >
Copyright © 2016 < >
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 ocr)
#:use-module ((guix licenses) #:prefix license:)
#... |
e18c40f5c554c6af12d6ed871f514e6f5ca0efc7beb5fe4250fb99b98becfd9f | onlyshk/epmail | logger.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011 ,
%%% @doc
%%%
%%% @end
Created : 13 Jan 2011 by < >
%%%-------------------------------------------------------------------
-module(logger).
-vsn('0.3').
-author('').
-behavior(gen_server).
-export([init/1]).... | null | https://raw.githubusercontent.com/onlyshk/epmail/d08ab8e706a44e5e3287ea4b98490447cfb94448/src/logger.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
Client API
Log db api
Callback functions
no useble func
no useble func
| @author < >
( C ) 2011 ,
Created : 13 Jan 2011 by < >
-module(logger).
-vsn('0.3').
-author('').
-behavior(gen_server).
-export([init/1]).
-export([start_link/0, stop/0]).
-export([handle_call/3, handle_cast/2, handle_info/2]).
-export([code_change/3]).
-export([add_log/1, db_backup/0]).
-export([term... |
10b624584ba782469498101826e5b5a4c56672331af09cf253bccd5b3db3c7b7 | penpot/penpot | common.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.workspace.sidebar.options.common
(:require
[app.util.dom :as dom]
[rumext.v2 :as mf]))... | null | https://raw.githubusercontent.com/penpot/penpot/7303d311d5f23d515fa3fcdc6cd13cf7f429d1fe/frontend/src/app/main/ui/workspace/sidebar/options/common.cljs | clojure |
Copyright (c) KALEIDOS INC | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.main.ui.workspace.sidebar.options.common
(:require
[app.util.dom :as dom]
[rumext.v2 :as mf]))
(mf/defc advanced-options [{:ke... |
a55ded5746e034afeabf941ef270db3b5e934b80db70db27bc55639f9bf4c731 | igorhvr/bedlam | infobot.scm | (define-syntax make-infobot
(syntax-rules ()
((_ (crib help handler) ...)
(infobot (make-plugin crib help
(lambda args (apply handler args))) ...))))
(define listen-phrases
'("Okay."
"Sure."
"I'm listening."
"I'm all ears."))
(define quiet-phrases
'("Fine, ... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-contrib/irc/scheme/sarah/bots/infobot.scm | scheme | Plugins go here, in the form:
(crib help handler)
("part " "\"part <channel-name>\" asks me to leave a channel I'm in." request-part)
display help | (define-syntax make-infobot
(syntax-rules ()
((_ (crib help handler) ...)
(infobot (make-plugin crib help
(lambda args (apply handler args))) ...))))
(define listen-phrases
'("Okay."
"Sure."
"I'm listening."
"I'm all ears."))
(define quiet-phrases
'("Fine, ... |
8a4632f519ffa93029a21e23a4856b3882fcc74ea6f847a5be6efb52b87727a6 | rudolph-miller/cl-gists | 3.get-gist.lisp | (get-gist "gistid")
= > # S(GIST ... )
(get-gist "gistid" :sha "gistsha")
= > # S(GIST ... )
| null | https://raw.githubusercontent.com/rudolph-miller/cl-gists/bcf3687f0af8b2eb5acaeda5db94d67446e56daf/examples/3.get-gist.lisp | lisp | (get-gist "gistid")
= > # S(GIST ... )
(get-gist "gistid" :sha "gistsha")
= > # S(GIST ... )
| |
464ea2667e64a06313b818e69ee958984b46c7a1dd733235b9162a6b64a52c9f | well-typed-lightbulbs/ocaml-esp32 | read_cmt.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/tools/read_cmt.ml | ocaml | ************************************************************************
OCaml
Fabrice L... | Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
let gen_annot = ref false
let gen_ml = ref false
let print_info_arg = ref false
let target_filename = ref None
let save_cmt_info = ref false
let arg_list = Arg.align [
... |
d36c28f78e872df2196d3b2f51c7de741396ce35f909f96b4beee099d9f8835e | soupi/chip-8 | Main.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Runtime.Run as Runtime (main)
main :: IO ()
main = Runtime.main
| null | https://raw.githubusercontent.com/soupi/chip-8/b2ded9808cd5a071f0b797286bb040bc73e19b27/exec-src/Main.hs | haskell | # LANGUAGE OverloadedStrings # |
module Main where
import qualified Runtime.Run as Runtime (main)
main :: IO ()
main = Runtime.main
|
fdd1e5b842e38af9a014dd4e5ede32304bbada38b98ab4c64979d65dfd72de20 | thi-ng/demos | state.cljs | (ns ex04.state
(:require-macros
[reagent.ratom :refer [reaction]]
[cljs-log.core :refer [debug info warn]])
(:require
[thi.ng.strf.core :as f]
[reagent.core :as reagent]))
(defonce app (reagent/atom {}))
(defn set-state!
"Helper fn to reset app state for given key. Key can be single
keyword or pat... | null | https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/ws-ldn-9/day3/ex04/src/ex04/state.cljs | clojure | (ns ex04.state
(:require-macros
[reagent.ratom :refer [reaction]]
[cljs-log.core :refer [debug info warn]])
(:require
[thi.ng.strf.core :as f]
[reagent.core :as reagent]))
(defonce app (reagent/atom {}))
(defn set-state!
"Helper fn to reset app state for given key. Key can be single
keyword or pat... | |
84c9c3f9d1e4dc8bb87b90cf83d3187cbb4eebff87e5519c4a4788cb9cd14d75 | Frechmatz/cl-synthesizer | test-vco.lisp | (in-package :cl-synthesizer-test)
(defun print-vco-state (vco)
(format t "~%VCO: f-exp: ~a f-lin: ~a f: ~a~%"
(cl-synthesizer-test::get-module-state vco :exponential-frequency)
(cl-synthesizer-test::get-module-astate vco :linear-frequency)
(cl-synthesizer-test::get-module-state vco :frequency)))
Test tha... | null | https://raw.githubusercontent.com/Frechmatz/cl-synthesizer/db430f365e31d71fc572d5d300eba0d2fa49d05c/test/modules/test-vco.lisp | lisp | (print-vco-state vco)
(print-vco-state vco)
(print-vco-state vco)
(print-vco-state vco)
Test frequency clipping (exp input)
(print-vco-state vco)
(print-vco-state vco)
Test lower clipping exp input
(print-vco-state vco)
Frequency calculated by frequency counter
Internal frequency of module
(print-vco-state vco)
Fr... | (in-package :cl-synthesizer-test)
(defun print-vco-state (vco)
(format t "~%VCO: f-exp: ~a f-lin: ~a f: ~a~%"
(cl-synthesizer-test::get-module-state vco :exponential-frequency)
(cl-synthesizer-test::get-module-astate vco :linear-frequency)
(cl-synthesizer-test::get-module-state vco :frequency)))
Test tha... |
3795c42518b9d2383a7cd0add11aff139069c6cb822b1ba6cb24186303db7f28 | exercism/common-lisp | bob.lisp | (defpackage :bob
(:use :cl)
(:export :response))
(in-package :bob)
(defun response (hey-bob))
| null | https://raw.githubusercontent.com/exercism/common-lisp/f3cdf6cf7e607138d1bb4d26c57999d4364af243/exercises/practice/bob/bob.lisp | lisp | (defpackage :bob
(:use :cl)
(:export :response))
(in-package :bob)
(defun response (hey-bob))
| |
e32ac0ca537e818eea4a8354508aa5239f7e6c1a6a3e018ed63144d66740b783 | sol/v8 | V8.hs | module Language.JavaScript.V8 (
run
, run_
, SourceLoader
) where
import Prelude hiding (mapM_)
import Control.Applicative
import Control.Exception
import Data.IORef
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Foldable (mapM_)
impor... | null | https://raw.githubusercontent.com/sol/v8/0ff1b23588cf3c0a8f55a4ec557971dabb104d73/src/Language/JavaScript/V8.hs | haskell | | A mapping from module name to module source.
| A mapping from module names to loaded modules. | module Language.JavaScript.V8 (
run
, run_
, SourceLoader
) where
import Prelude hiding (mapM_)
import Control.Applicative
import Control.Exception
import Data.IORef
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Foldable (mapM_)
impor... |
d6af9846c63040d92227d61cc1ec72d0a81a748477edcedf84cfa3d386ce4b05 | tonymorris/fp-course | Server.hs | module Network.Server
(
module Network.Server.Common
) where
import Network.Server.Common
| null | https://raw.githubusercontent.com/tonymorris/fp-course/73a64c3d4d0df58654a1a9a0ee9d9b11c3818911/projects/NetworkServer/haskell/src/Network/Server.hs | haskell | module Network.Server
(
module Network.Server.Common
) where
import Network.Server.Common
| |
5dbc9f6f922bc1dbfc12c25db4f829281af0eaecdc66bb4e1c37eb0b4a0a1d27 | supki/liblastfm | TrackSpec.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
module Json.TrackSpec (spec) where
import Data.Aeson (Value)
import Data.Aeson.Lens
import Data.Text (Text)
import Lastfm
import Lastfm.Track
import Test.Hspec
import SpecHelper
spec :: Spec
spec = do
it "addTags" $
shouldHaveJson_ . privately $
... | null | https://raw.githubusercontent.com/supki/liblastfm/754be163c4ce14c9b4819f1359b5f95a0f91a29d/test/api/Json/TrackSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
module Json.TrackSpec (spec) where
import Data.Aeson (Value)
import Data.Aeson.Lens
import Data.Text (Text)
import Lastfm
import Lastfm.Track
import Test.Hspec
import SpecHelper
spec :: Spec
spec = do
it "addTags" $
shouldHaveJson_ . privately $
addTags <*> artist "Jefferson Airpl... |
a999c2db23ea0dc5e7c36de77edad19a987db156bc723208eb3a28e72a05b089 | valderman/haste-compiler | FlowAnalysis.hs | | Basic data flow analysis over the Haste AST .
module Haste.AST.FlowAnalysis (
Strict (..), VarInfo (..), InfoMap, ArgMap,
mkVarInfo, nullInfo, mergeVarInfos, findVarInfos
) where
import Haste.AST.Syntax
import Control.Monad.State
import Data.List (foldl', sort, group)
import qualified Data.Set as S
import... | null | https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/src/Haste/AST/FlowAnalysis.hs | haskell | | Is this var always strict?
| Does this var always have the same, statically known, arity?
@Nothing@, if var is not a function.
| What are the sources of this var? I.e. for each occurrence where the
| Merge two var infos. The aliases of the infos are simply concatenated
disagree on any field, that field beco... | | Basic data flow analysis over the Haste AST .
module Haste.AST.FlowAnalysis (
Strict (..), VarInfo (..), InfoMap, ArgMap,
mkVarInfo, nullInfo, mergeVarInfos, findVarInfos
) where
import Haste.AST.Syntax
import Control.Monad.State
import Data.List (foldl', sort, group)
import qualified Data.Set as S
import... |
8e2a1ee83401eae5734a35c999ac90a4640a9a9f6f4c32ee2b63b44124266536 | privet-kitty/cl-competitive | explicit-treap.lisp | (defpackage :cp/explicit-treap
(:use :cl)
(:export #:treap #:treap-p #:treap-key #:treap-accumulator
#:treap-split #:treap-insert #:treap-merge #:treap-delete
#:%treap-ensure-key #:treap-unite #:treap-map #:do-treap
#:make-treap #:treap-fold #:treap-update #:treap-ref #:treap-pop
... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4efd3b355238f993903ca252008c924a6fccc27b/module/explicit-treap.lisp | lisp | TODO & NOTE: insufficient tests
TODO: introduce abstraction by macro
FIXME: Should the left and right end of the target interval be included?
This function takes O(nlog(n)) time. It is just for debugging.
L <= KEY
KEY < R
L <= KEY
KEY < R
Updates the value slot and returns T if KEY exists
is never used in the... | (defpackage :cp/explicit-treap
(:use :cl)
(:export #:treap #:treap-p #:treap-key #:treap-accumulator
#:treap-split #:treap-insert #:treap-merge #:treap-delete
#:%treap-ensure-key #:treap-unite #:treap-map #:do-treap
#:make-treap #:treap-fold #:treap-update #:treap-ref #:treap-pop
... |
8f0c1aefbdd83dbfdb428ff2a4f28e280cdb82b6c1c3c852f7f77631a417bf3a | OCamlPro/socaml-analyzer | tlambda_analysis.ml | open Common_types
open Lambda
open Tlambda
open Tlambda_to_hgraph
module G = G
open Data
type v = Vertex.t
type h = Hedge.t
type e = environment
type ha = hattr
let apply_counter = ref 0
let get_counter () = !apply_counter
let intop2_of_prim o =
let open Int_interv in
match o with
| TPaddint -> add
| TPsub... | null | https://raw.githubusercontent.com/OCamlPro/socaml-analyzer/f39121e1d05a9e5bb6f005497eaaa5a67f256d4c/src/analysis/tlambda_analysis.ml | ocaml | to correct ?
Data.singleton_string s
Operations on heap blocks
Boolean not
(* Float operations
String operations
Array operations
Test if the argument is a block or an immediate integer
Test if the (integer) argument is outside an interval
Bitvect operations
source
destination
Operations on big arr... | open Common_types
open Lambda
open Tlambda
open Tlambda_to_hgraph
module G = G
open Data
type v = Vertex.t
type h = Hedge.t
type e = environment
type ha = hattr
let apply_counter = ref 0
let get_counter () = !apply_counter
let intop2_of_prim o =
let open Int_interv in
match o with
| TPaddint -> add
| TPsub... |
46225147e5d71c19aea384e9420da818d9ce277ad4c804ed449096f9ac59e161 | CSCfi/rems | test_oidc.clj | (ns ^:integration rems.auth.test-oidc
(:require [clj-http.client]
[clojure.test :refer [deftest is testing use-fixtures]]
[rems.api.testing :refer [api-fixture]]
[rems.auth.oidc :as oidc]
[rems.config]
[rems.ga4gh]
[rems.jwt]
[rems.js... | null | https://raw.githubusercontent.com/CSCfi/rems/71e238d90ce4ad7aacb442dbcc7c9f2e637a4a2d/test/clj/rems/auth/test_oidc.clj | clojure | fetch id-token
id token validation
user-info | (ns ^:integration rems.auth.test-oidc
(:require [clj-http.client]
[clojure.test :refer [deftest is testing use-fixtures]]
[rems.api.testing :refer [api-fixture]]
[rems.auth.oidc :as oidc]
[rems.config]
[rems.ga4gh]
[rems.jwt]
[rems.js... |
2c4ef962c9bcdc3bd4c2caa71ce5ac454ba097e955009dcca67ed0e212e6765a | ejgallego/coq-serapi | ser_tactypes.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/dd9e3fbf7faaf3bf365fa3eff134641055151a9b/serlib/ser_tactypes.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 - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Copyright 2016 - 2018 MINES... |
3f19400b4fe1a4a1fc76b1efa790984a2b70b295a8a82f38c3a8d8f3d44b59f9 | fetburner/Coq2SML | classops.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/pretyping/classops.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
coercion_info : coe_typ -> coe_info... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
open Pp
open Flags
... |
2bbefba3df69d65bc7380d6c436d3ce037cfd82bacbcaddb4fee03dac5cfd4c4 | jimcrayne/jhc | tc106.hs | {-# OPTIONS -fglasgow-exts #-}
-- !!! Mutually recursive kind inference
Exposes a bug in 4.08 ( fixed in 4.08 pl1 )
module ShouldCompile where
-- This pair will tickle the bug
class Lookup c k a where
lookupAll :: Sequence seq a => c -> k -> seq a
class Lookup (s a) Int a => Sequence s a where
foo :: s a
... | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/tc106.hs | haskell | # OPTIONS -fglasgow-exts #
!!! Mutually recursive kind inference
This pair will tickle the bug
This decl will tickle it all by itself |
Exposes a bug in 4.08 ( fixed in 4.08 pl1 )
module ShouldCompile where
class Lookup c k a where
lookupAll :: Sequence seq a => c -> k -> seq a
class Lookup (s a) Int a => Sequence s a where
foo :: s a
class Matrix a e where
amap2 :: (Matrix a d) =>
(e -> d -> e) -> a ix e -> a ix d -> a... |
90da11ebd8184255e5f5122cadda23183e1e577d0c9163e5a2fa9c301140f91a | portnov/wacom-intuos-pro-scripts | Wacom.hs | -- | Generic API module
module XMonad.Wacom where
import Control.Monad (when)
import Data.Maybe
import XMonad
import qualified XMonad.StackSet as W
-- | Class for different implementations of
-- profile switching API
class ProfileApi api where
getProfile :: api -> X (Maybe String)
setProfile :: api -> String -> ... | null | https://raw.githubusercontent.com/portnov/wacom-intuos-pro-scripts/78b85c09888d7031af73ede686f68cf97cea8a77/xmonad/xmonad-wacom/XMonad/Wacom.hs | haskell | | Generic API module
| Class for different implementations of
profile switching API
depending on current window.
^ [(Condition on window; profile name)]
^ Callback to be called after switching to new profile | module XMonad.Wacom where
import Control.Monad (when)
import Data.Maybe
import XMonad
import qualified XMonad.StackSet as W
class ProfileApi api where
getProfile :: api -> X (Maybe String)
setProfile :: api -> String -> X ()
| XMonad LogHook which automatically selects Wacom tablet settings profile
wacomProfi... |
18d79f16d5c79db4979377bf3bb71db1dead9863094b8165fba62acd46b31a65 | shentufoundation/deepsea | ZArith_dec.ml | open BinInt
open BinNums
open Datatypes
open Specif
* coq_Z_lt_dec : coq_Z - > coq_Z - > sumbool *
let coq_Z_lt_dec x y =
match Z.compare x y with
| Lt -> Coq_left
| _ -> Coq_right
* : coq_Z - > coq_Z - > sumbool *
let coq_Z_le_dec x y =
match Z.compare x y with
| Gt -> Coq_right
| _ -> Coq_left
(**... | null | https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/backend/extraction/ZArith_dec.ml | ocaml | * val coq_Z_le_gt_dec : coq_Z -> coq_Z -> sumbool * | open BinInt
open BinNums
open Datatypes
open Specif
* coq_Z_lt_dec : coq_Z - > coq_Z - > sumbool *
let coq_Z_lt_dec x y =
match Z.compare x y with
| Lt -> Coq_left
| _ -> Coq_right
* : coq_Z - > coq_Z - > sumbool *
let coq_Z_le_dec x y =
match Z.compare x y with
| Gt -> Coq_right
| _ -> Coq_left
le... |
295e9ba9b7a5e43785bd842527e770ad246d38c956f168bf2436166755b5bb7a | wireapp/wire-server | API.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/43a6a3d7cd84f2789bbe783faad43d3a6d6162a0/services/proxy/src/Proxy/API.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Proxy.API
( sitemap,
... |
e6a2d3ec8510643e0235af08cfd593dd7e088f7e32e5e9c1aad8c463d7bae984 | PLTools/OCanren | test010.ml | (** This is part of HM inferencer demo from noCanren.
* Look how we are using another extension point which is renaming of 'distrib'
*)
let () = print_endline "test010"
[%%distrib type nonrec state = S [@@deriving gt ~options:{ gmap }]]
module _ = struct
[%%ocanren type nonrec u = U of state [@@deriving gt ~op... | null | https://raw.githubusercontent.com/PLTools/OCanren/e8f3b2e876baa916f30d60a5cecf0f1470a61c24/regression_ppx/test010.ml | ocaml | * This is part of HM inferencer demo from noCanren.
* Look how we are using another extension point which is renaming of 'distrib'
|
let () = print_endline "test010"
[%%distrib type nonrec state = S [@@deriving gt ~options:{ gmap }]]
module _ = struct
[%%ocanren type nonrec u = U of state [@@deriving gt ~options:{ gmap }]]
end
|
bf41ac199370bbad04e774267c9017ec3a96236574bfb53849273474c9b51b2a | vert-x/mod-lang-clojure | timer_test.clj | Copyright 2013 the original author or authors .
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, sof... | null | https://raw.githubusercontent.com/vert-x/mod-lang-clojure/dcf713460b8f46c08d0db6e7bf8537f1dd91f297/api/src/test/clojure/vertx/timer_test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing pe... | Copyright 2013 the original author or authors .
distributed under the License is distributed on an " AS IS " BASIS ,
(ns vertx.timer-test
(:require [vertx.testtools :as t]
[vertx.core :as core]
[clojure.test :refer [deftest is use-fixtures]]))
(use-fixtures :each t/as-embedded)
(deftest... |
4ea2137c20a69a6ef755164ae61e2225b5243fd5cc1ba5fa98aa03452f3a4be2 | seckcoder/course-compiler | s2_2.rkt | (let ([v (vector 0 0)])
(let ([_ (vector-set! v 0 38)])
(let ([_ (vector-set! v 1 4)])
(+ (vector-ref v 0) (vector-ref v 1)))))
| null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/s2_2.rkt | racket | (let ([v (vector 0 0)])
(let ([_ (vector-set! v 0 38)])
(let ([_ (vector-set! v 1 4)])
(+ (vector-ref v 0) (vector-ref v 1)))))
| |
d0befc05adc4260310027b708c98027f9ec9c68dd084bec5890339a7cf636e4a | billosys/sockets | socket.clj | (ns sockets.test.datagram.socket
(:require [clojure.test :refer :all]
[sockets.datagram.socket :as socket]))
(deftest a-test
(testing "Placeholder ..."
(is (zero? 0))))
| null | https://raw.githubusercontent.com/billosys/sockets/21a8949c6a0ed8c52ac590753e95354dc4629777/test/sockets/test/datagram/socket.clj | clojure | (ns sockets.test.datagram.socket
(:require [clojure.test :refer :all]
[sockets.datagram.socket :as socket]))
(deftest a-test
(testing "Placeholder ..."
(is (zero? 0))))
| |
0c6bbdbeda0869c30a3b7f7768041f45b198a599491afea3dc3c90b14e4ddee7 | v-kolesnikov/sicp | 1_44.clj | (ns sicp.chapter01.1-44
(:require [sicp.chapter01.1-43 :refer [repeated]]
[sicp.common :refer [avg]]))
(defn smooth
[f dx]
(fn [x] (avg [(f x)
(f (- x dx))
(f (+ x dx))])))
(defn smooth-fold
[f dx n]
((repeated (fn [g]
(smooth g dx))
n)... | null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter01/1_44.clj | clojure | (ns sicp.chapter01.1-44
(:require [sicp.chapter01.1-43 :refer [repeated]]
[sicp.common :refer [avg]]))
(defn smooth
[f dx]
(fn [x] (avg [(f x)
(f (- x dx))
(f (+ x dx))])))
(defn smooth-fold
[f dx n]
((repeated (fn [g]
(smooth g dx))
n)... | |
daa090b1de4190f4cb89e195ae76ec2aa2105bfc3b2c1616ab900541802d9e13 | bendoerr/real-world-haskell | main.hs | import Test.QuickCheck
import Prettify2
main :: IO ()
main = do quickCheck prop_empty_id
quickCheck prop_empty_id
quickCheck prop_char
quickCheck prop_text
quickCheck prop_line
quickCheck prop_double
quickCheck prop_hcat
quickCheck prop_punctuate
| null | https://raw.githubusercontent.com/bendoerr/real-world-haskell/fa43aa59e42a162f5d2d5655b274b964ebeb8f0a/ch11/main.hs | haskell | import Test.QuickCheck
import Prettify2
main :: IO ()
main = do quickCheck prop_empty_id
quickCheck prop_empty_id
quickCheck prop_char
quickCheck prop_text
quickCheck prop_line
quickCheck prop_double
quickCheck prop_hcat
quickCheck prop_punctuate
| |
e45a9765c972ceed001971d5adc5011813b181f53f7e15348d1de76f8d8d0fc4 | ghc/testsuite | tcfail079.hs | # LANGUAGE MagicHash #
module ShouldFail where
! ! ! field in newtype declaration
import GHC.Exts ( Int# )
newtype Unboxed = Unboxed Int#
f = [ Unboxed 1#, Unboxed 2# ] -- shouldn't be allowed!
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail079.hs | haskell | shouldn't be allowed! | # LANGUAGE MagicHash #
module ShouldFail where
! ! ! field in newtype declaration
import GHC.Exts ( Int# )
newtype Unboxed = Unboxed Int#
|
b251ebfe7f9e19dfdcbc0d0e46ac83096c499c55017d0e719956f879d86c73a3 | ideas-edu/ideas | Navigator.hs | # LANGUAGE TypeFamilies , GeneralizedNewtypeDeriving #
-----------------------------------------------------------------------------
Copyright 2019 , Ideas project team . This file is distributed under the
terms of the Apache License 2.0 . For more information , see the files
" LICENSE.txt " and " NOTICE.txt... | null | https://raw.githubusercontent.com/ideas-edu/ideas/f84907f92a8c407b7313f99e65a08d2646dc1565/src/Ideas/Common/Traversal/Navigator.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
|
Maintainer :
Stability : provisional
---------------------------------------------------------------------------
* Location information
* Navigato... | # LANGUAGE TypeFamilies , GeneralizedNewtypeDeriving #
Copyright 2019 , Ideas project team . This file is distributed under the
terms of the Apache License 2.0 . For more information , see the files
" LICENSE.txt " and " NOTICE.txt " , which are included in the distribution .
Portability : portable ( de... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.