_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 |
|---|---|---|---|---|---|---|---|---|
7e49e4b3ba13e2f1304f35317e61995c80a6775c5b93a7253b9b8abd74fe4d76 | softwarelanguageslab/maf | R5RS_sigscheme_case-2.scm | ; Changes:
* removed : 0
* added : 0
* swaps : 0
* negated predicates : 3
; * swapped branches: 0
* calls to i d fun : 1
(letrec ((loop (lambda (i l)
(<change>
(if (let ((__or_res (eq? 6 1))) (if __or_res __or_res (let ((__or_res (eq? 6 2))) (if __or_res __or_res (let ((__... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_sigscheme_case-2.scm | scheme | Changes:
* swapped branches: 0 | * removed : 0
* added : 0
* swaps : 0
* negated predicates : 3
* calls to i d fun : 1
(letrec ((loop (lambda (i l)
(<change>
(if (let ((__or_res (eq? 6 1))) (if __or_res __or_res (let ((__or_res (eq? 6 2))) (if __or_res __or_res (let ((__or_res (eq? 6 3))) (if __or_res __o... |
c37076a120ba6c494e34f19cbddab9e7c878fa963908c179b7244d3801aab66c | alex-gutev/cl-environments | lambda.lisp | ;;;; lambda.lisp
;;;;
Copyright 2021
;;;;
;;;; 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, m... | null | https://raw.githubusercontent.com/alex-gutev/cl-environments/ca57285e355e9628c72f9e2ba960018898ff4a7d/test/cltl2/lambda.lisp | lisp | lambda.lisp
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the fol... | Copyright 2021
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(defpackage :cl-environments.test.cltl... |
867442c1b1fbaa75fb778ebad265a3436e736d8dabe18f8bcefc98d492c99f49 | herd/herdtools7 | asli.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/daedd7431cb00884afea2ec39749222e2c367c6b/asllib/asli.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2015 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
2240137ca5c6fbef0c2498dde100e2b72f4e0e2161d3bb48c5210ce3d80ca9aa | ygmpkk/house | Convert.hs | -- | This module performs the translation of a parsed XML DTD into the
internal representation of corresponding data\/newtypes .
module Text.XML.HaXml.DtdToHaskell.Convert
( dtd2TypeDef
) where
import List (intersperse)
import Text.XML.HaXml.Types hiding (Name)
import Text.XML.HaXml.DtdToHaskell.TypeDef
-... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/HaXml/src/Text/XML/HaXml/DtdToHaskell/Convert.hs | haskell | | This module performs the translation of a parsed XML DTD into the
Internal representation for database of DTD decls ----
Build a database of DTD decls then convert them to typedefs ----
( Done in two steps because we need to merge ELEMENT and ATTLIST decls . )
Apparently multiple ATTLIST decls for the same eleme... | internal representation of corresponding data\/newtypes .
module Text.XML.HaXml.DtdToHaskell.Convert
( dtd2TypeDef
) where
import List (intersperse)
import Text.XML.HaXml.Types hiding (Name)
import Text.XML.HaXml.DtdToHaskell.TypeDef
data Record = R [AttDef] ContentSpec
type Db = [(String,Record)]
dtd2T... |
162eeb572845ecd3290a5f35c5ea4ccfa9f7bbb06c04c493ae3143763ccda767 | spechub/Hets | Symbol.hs | {-# LANGUAGE DeriveDataTypeable #-}
|
Module : ./Propositional / Symbol.hs
Description : Symbols of propositional logic
Copyright : ( c ) , Uni Bremen 2007
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
Def... | null | https://raw.githubusercontent.com/spechub/Hets/fc26b4947bf52be6baf7819a75d7e7f127e290dd/NeSyPatterns/Symbol.hs | haskell | # LANGUAGE DeriveDataTypeable #
Symbol type
pretty printing for Symbols
Extracts the symbols out of a signature
Determines the symbol map
Determines the name of a symbol
Creates a raw symbol
Convert symbol to raw symbol
does a symbol match a raw symbol?
application function for symbol maps
| Extraction of sym... | |
Module : ./Propositional / Symbol.hs
Description : Symbols of propositional logic
Copyright : ( c ) , Uni Bremen 2007
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
Definition of symbols for propositional... |
59659324e276c96946a1e05c347f732d56ea1ffa0d275b042a4f58a2232a52ec | yesodweb/yesod | Keter.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE CPP #
module Keter
( keter
) where
import Data.Yaml
#if MIN_VERSION_aeson(2, 0, 0)
import qualified Data.Aeson.KeyMap as Map
#else
import qualified Data.HashMap.Strict as Map
#endif
import qualified Data.Text as T
import System.Environment (getEnvironment)
import ... | null | https://raw.githubusercontent.com/yesodweb/yesod/5bd872be0241f7ca63fa1bd0d206dff189923dc4/yesod-bin/Keter.hs | haskell | # LANGUAGE OverloadedStrings #
^ cabal command
^ no build?
^ no copy to?
^ build args | # LANGUAGE CPP #
module Keter
( keter
) where
import Data.Yaml
#if MIN_VERSION_aeson(2, 0, 0)
import qualified Data.Aeson.KeyMap as Map
#else
import qualified Data.HashMap.Strict as Map
#endif
import qualified Data.Text as T
import System.Environment (getEnvironment)
import System.Exit
import System.Process
i... |
df7f67892d59559e0eb05aa06f8ad18cec7ab5cef83e21b013894f891f9a1ce8 | beamjs/erlv8 | erlv8_tests.erl | -module(erlv8_tests).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
-behaviour(proper_statem).
-export([initial_state/0, command/1, precondition/2, postcondition/3,
next_state/3]).
-compile(export_all).
-record(state, {
vms = [],
passed = []
... | null | https://raw.githubusercontent.com/beamjs/erlv8/157a7db0a9c284ea1da107fe3272ff7b19813d26/test/erlv8_tests.erl | erlang | helpers
statem
generators
properties
type conversion
eunit | -module(erlv8_tests).
-include_lib("proper/include/proper.hrl").
-include_lib("eunit/include/eunit.hrl").
-behaviour(proper_statem).
-export([initial_state/0, command/1, precondition/2, postcondition/3,
next_state/3]).
-compile(export_all).
-record(state, {
vms = [],
passed = []
... |
9201c825385dcc244ee10c4c2c7ba0e6a19ed08b609f7557ed67abcf556f4c53 | wireless-net/erlang-nommu | fe1.erl | -module(fe1).
-vsn("1.0").
-export([a/0]).
a() ->
ok.
| null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/sasl/test/systools_SUITE_data/d_normal/lib/fe-3.1/src/fe1.erl | erlang | -module(fe1).
-vsn("1.0").
-export([a/0]).
a() ->
ok.
| |
9824517d10184274c64c5de0fb3285c7f0af46d3c33e0d535732f82c8ec9df32 | AlacrisIO/legicash-facts | integer.ml | open Lib
open Action
open Hex
open Yojsoning
open Marshaling
open Ppx_deriving_rlp_runtime
Same as Unsigned . S from the integers library , minus the Infix module
module type UIntBaseS = sig
type t
val add: t -> t -> t
val sub: t -> t -> t
val mul: t -> t -> t
val div: t -> ... | null | https://raw.githubusercontent.com/AlacrisIO/legicash-facts/5d3663bade68c09bed47b3f58fa12580f38fdb46/src/legilogic_lib/integer.ml | ocaml | TODO: Use ethereum-style json everywhere
TODO: check sign after every relevant operation, etc.
TODO: check bounds, after every operation, etc. | open Lib
open Action
open Hex
open Yojsoning
open Marshaling
open Ppx_deriving_rlp_runtime
Same as Unsigned . S from the integers library , minus the Infix module
module type UIntBaseS = sig
type t
val add: t -> t -> t
val sub: t -> t -> t
val mul: t -> t -> t
val div: t -> ... |
c80fc66d443149410ad0f0e8a5821a346c8c9da788543395633c7322860069a7 | kazu-yamamoto/quic | HandshakeSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module HandshakeSpec where
import Control.Monad
import qualified Data.ByteString as BS
import Network.TLS (HandshakeMode13(..), Group(..))
import qualified Network.TLS as TLS
import Test.Hspec
import UnliftIO.Async
import UnliftIO.Concurrent
import qualified UnliftIO.Exception as E
... | null | https://raw.githubusercontent.com/kazu-yamamoto/quic/7b754ec5e3e342b7df1f3ce0d4a6a16c02a708cb/test/HandshakeSpec.hs | haskell | # LANGUAGE OverloadedStrings #
ouch, default should be reversed |
module HandshakeSpec where
import Control.Monad
import qualified Data.ByteString as BS
import Network.TLS (HandshakeMode13(..), Group(..))
import qualified Network.TLS as TLS
import Test.Hspec
import UnliftIO.Async
import UnliftIO.Concurrent
import qualified UnliftIO.Exception as E
import Network.QUIC
import Network... |
d1ca2b88233dd9ec364c46886dfe5499ae5f747210196e73a1ab88a6b069f368 | mirage/ocaml-base64 | base64.ml |
* Copyright ( c ) 2006 - 2009 Citrix Systems Inc.
* Copyright ( c ) 2010 < >
* Copyright ( c ) 2014 - 2016 Anil Madhavapeddy < >
* Copyright ( c ) 2016 Meršinjak
* Copyright ( c ) 2018 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or wit... | null | https://raw.githubusercontent.com/mirage/ocaml-base64/c68d94392d93e6a5fa0e8fb618e0885ec701cee3/src/base64.ml | ocaml | We mostly want to have an optional array for [dmap] (e.g. [int option
array]). So we consider the [none] value as [-1].
We make this exception to ensure to keep a control about which exception we
can raise and avoid appearance of unknown exceptions like an ex-nihilo
magic rabbit (or magic money?).
[pad = ... |
* Copyright ( c ) 2006 - 2009 Citrix Systems Inc.
* Copyright ( c ) 2010 < >
* Copyright ( c ) 2014 - 2016 Anil Madhavapeddy < >
* Copyright ( c ) 2016 Meršinjak
* Copyright ( c ) 2018 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or wit... |
261ec3e6c0d431c9946db6d5576c2a5f1e4d80934be4c45207a06bd63dc2e623 | janestreet/base | avltree_unit_tests.mli | (* intentionally blank *)
| null | https://raw.githubusercontent.com/janestreet/base/221b085f3fcd77597f8245b4d73de3970b238e71/test/avltree_unit_tests.mli | ocaml | intentionally blank | |
ddf54358644acefc9c318b7c8d880b429c4a1b904b00007a46d39e1e64f53e9e | soulomoon/arith | Main.hs | # LANGUAGE DeriveFunctor #
# LANGUAGE PatternSynonyms #
# LANGUAGE TypeApplications #
module Main where
import Control.Arrow ((>>>))
data ExprF a = MulF a a | DivF a a | LitF Int deriving (Functor)
newtype Fix f = Fix {unFix :: f (Fix f)}
type Expr = Fix ExprF
type Algebra f a = f a -> a
pattern Mul a b = Fix (M... | null | https://raw.githubusercontent.com/soulomoon/arith/16ee86c617fc26a95aa7d4707dc253439b39e97b/arith_recursion/app/Main.hs | haskell | # COMPLETE Mul, Div, Lit # | # LANGUAGE DeriveFunctor #
# LANGUAGE PatternSynonyms #
# LANGUAGE TypeApplications #
module Main where
import Control.Arrow ((>>>))
data ExprF a = MulF a a | DivF a a | LitF Int deriving (Functor)
newtype Fix f = Fix {unFix :: f (Fix f)}
type Expr = Fix ExprF
type Algebra f a = f a -> a
pattern Mul a b = Fix (M... |
9ecdadf15cd6086f686da1ca9637ea7b5f7b463c2eb115ea3989486fb6d744f5 | cuichaox/dml | dml.lisp | (uiop:define-package :dml
(:mix #:dml.graph
#:dml.seq.engine
#:cl)
(:export #:dml-create-graph
#:dml-create-sequence
#:&prog
#:&chain
#:&opt
#:&if
#:&loop
#:attributes
#:methods
... | null | https://raw.githubusercontent.com/cuichaox/dml/6f71a2ce9b2cfa295f2db4e17446935f9136b0b1/src/dml.lisp | lisp | (uiop:define-package :dml
(:mix #:dml.graph
#:dml.seq.engine
#:cl)
(:export #:dml-create-graph
#:dml-create-sequence
#:&prog
#:&chain
#:&opt
#:&if
#:&loop
#:attributes
#:methods
... | |
cbb1d0b2b5c5113b1540c56e6a535e1b958f8a91a2693e84350b72a2c5519dde | jbclements/sxml | sxpath.rkt | #lang racket/base
(require "sxml-tools.rkt"
"ssax/sxpathlib.rkt"
srfi/2
"ssax/errors-and-warnings.rkt"
"sxpath-ext.rkt"
"txpath.rkt")
(provide (all-defined-out))
$ I d : sxpath.scm , v 1.5 2005/09/07 09:27:34 lizorkin Exp $
Highghest level SXPath
;; Refactored from sxml... | null | https://raw.githubusercontent.com/jbclements/sxml/d3b8570cf7287c4e06636e17634f0f5c39203d52/sxml/sxpath.rkt | racket | Refactored from sxml-tools.scm and sxpathlib.scm
==============================================================================
Abbreviated SXPath
sxpath:: AbbrPath -> Converter, or
to the following rewriting rules
(sxpath '()) -> (node-join)
(sxpath '(path-component ...)) ->
... | #lang racket/base
(require "sxml-tools.rkt"
"ssax/sxpathlib.rkt"
srfi/2
"ssax/errors-and-warnings.rkt"
"sxpath-ext.rkt"
"txpath.rkt")
(provide (all-defined-out))
$ I d : sxpath.scm , v 1.5 2005/09/07 09:27:34 lizorkin Exp $
Highghest level SXPath
Evaluate an abbrevi... |
ee5f0e4568751fb19bc2d90141549a1bd54b4e42dc27d69f46ac3870794b9a2e | dbuenzli/astring | astring_top.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2015 The astring programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (... | null | https://raw.githubusercontent.com/dbuenzli/astring/ec7a266a3a680e5d246689855c639da53d713428/src/astring_top.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2015 The astring programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (... | |
829e35ff62fe5d650340f8b69c0d3c17e888b0e0bdd6fbb5b0195c78ffdf8ab0 | racket/racket7 | prefix.rkt | #lang racket/base
(require compiler/find-exe
racket/system)
;; Make sure that `raco` recognizes unambiguous command prefixes.
;; This test assumes that "pk" will unambiguously refer to "pkg".
(define o (open-output-bytes))
(parameterize ([current-output-port o])
(system* (find-exe)
"-N" "raco"
... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/pkgs/racket-test-extra/tests/raco/prefix.rkt | racket | Make sure that `raco` recognizes unambiguous command prefixes.
This test assumes that "pk" will unambiguously refer to "pkg". | #lang racket/base
(require compiler/find-exe
racket/system)
(define o (open-output-bytes))
(parameterize ([current-output-port o])
(system* (find-exe)
"-N" "raco"
"-l-" "raco"
"pk"))
(unless (regexp-match? #rx"raco pkg install" (get-output-bytes o))
(error "expected outpu... |
7345003d5fe79fde1c1964c263215d770fe5bae4ea14eb84e464ad98244199cd | haskoin/haskoin-core | Taproot.hs | # LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
|
Module : Haskoin . Transaction . Taproot
Copyright : No rights reserved
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
This module provide... | null | https://raw.githubusercontent.com/haskoin/haskoin-core/ffb7b44f989a5a0803ac9777d508d327842f9bf5/src/Haskoin/Transaction/Taproot.hs | haskell | # LANGUAGE OverloadedStrings #
| Hex encoding
| Hex encoding
| @since 0.21.0
| @since 0.21.0
| Signature
| @since 0.21.0
| Output key | # LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TypeApplications #
|
Module : Haskoin . Transaction . Taproot
Copyright : No rights reserved
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
This module provides support for reperesenting full ta... |
63d4c7c84f0590790b2c3eb24ca0bacfcd1e2190d5410c79285b0637fb6a68fc | ghc/packages-Cabal | InstallPlan.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE TypeFamilies #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
-----------------------------------------------------------------------------
-- |
-- Module : Dist... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-install/Distribution/Client/InstallPlan.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE ConstraintKinds #
---------------------------------------------------------------------------
|
Module : Distribution.Client.InstallPlan
License : BSD-like
Maintainer :
Stability : provisional
Portability : portable
Package ... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
Copyright : ( c ) 2008
module Distribution.Client.InstallPlan (
InstallPlan,
GenericInstallPlan,
PlanPackage,
GenericPlanPackage(..),
foldPlanPackage,
IsUnit,
* Operations on ' Ins... |
83533f315b70f847f1fe9deb0c40e877301875c96a8851f3d31129cf1b337707 | granule-project/granule-compiler-llvm | EmitableDef.hs | module Language.Granule.Codegen.Emit.EmitableDef where
import Language.Granule.Codegen.ClosureFreeDef
type EmitableExpr = ClosureFreeExpr
type EmitableValue = ClosureFreeValue
| null | https://raw.githubusercontent.com/granule-project/granule-compiler-llvm/e0ae7e742af5acf0b618a440a17b9772b0ae80f5/src/Language/Granule/Codegen/Emit/EmitableDef.hs | haskell | module Language.Granule.Codegen.Emit.EmitableDef where
import Language.Granule.Codegen.ClosureFreeDef
type EmitableExpr = ClosureFreeExpr
type EmitableValue = ClosureFreeValue
| |
638a13cfe073e7a9ccbbaa372a3f63e80a0e18144ab9dbfb0d3d74c756a46537 | blindglobe/clocc | base.lisp | ;;; Basis functionality, required everywhere
;;;
Copyright ( C ) 1997 - 2004 , 2007 - 2008 by
This is Free Software , covered by the GNU GPL ( v2 + )
;;; See
;;;
$ I d : base.lisp , v 2.21 2008/06/16 16:02:32 sds Exp $
;;; $Source: /cvsroot/clocc/clocc/src/cllib/base.lisp,v $
(eval-when (:compile-toplevel :lo... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/cllib/base.lisp | lisp | Basis functionality, required everywhere
See
$Source: /cvsroot/clocc/clocc/src/cllib/base.lisp,v $
}}}{{{paths
}}}{{{ generic
| Copyright ( C ) 1997 - 2004 , 2007 - 2008 by
This is Free Software , covered by the GNU GPL ( v2 + )
$ I d : base.lisp , v 2.21 2008/06/16 16:02:32 sds Exp $
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :port-ext (translate-logical-pathname "clocc:src;port;ext"))
(require :port-sys (tran... |
def6ee20d7d042c8eb040e8dc31ce941d7e677d7e7cbfdca43fc28c74532f203 | mirage/ocaml-cstruct | fuzz.ml | open Crowbar
[@@@warning "-3"]
let create x =
match Cstruct.create x with
| c -> assert (x >= 0); c
| exception Invalid_argument _ -> assert (x <= 0); bad_test ()
let create_sub x start len =
try
let c = Cstruct.create_unsafe x in
for i = 0 to len - 1 do
Cstruct.set_uint8 c i i
done;
Cs... | null | https://raw.githubusercontent.com/mirage/ocaml-cstruct/9ef1ca60f29c06bdf68c0d756b278c7b7f06bbc9/fuzz/fuzz.ml | ocaml | OCaml tends to underestimate how much space bigarrays are using: | open Crowbar
[@@@warning "-3"]
let create x =
match Cstruct.create x with
| c -> assert (x >= 0); c
| exception Invalid_argument _ -> assert (x <= 0); bad_test ()
let create_sub x start len =
try
let c = Cstruct.create_unsafe x in
for i = 0 to len - 1 do
Cstruct.set_uint8 c i i
done;
Cs... |
b540680291382fbe556536a6779b931718e4de489478c4f89adb209aed692253 | static-analysis-engineering/codehawk | bCHARMOperand.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/e8fed9f226abe38578768968279c8242eb21fea9/CodeHawk/CHB/bchlibarm32/bCHARMOperand.mli | ocaml | chutil
xprlib
bchlib
bchlibarm32
register index
element index
element size
extension register indices
element index
element size
extension register indices
element data size (in bytes
element count
pc addr
immediate offset
base register
alignment
shifttype
shiftamount
shifttype
... | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
a7d34564a7415c13953b47d161609eb2ef25130ba9a418312bfcad5d0ad96297 | gonzojive/sbcl | cell.lisp | ;;;; the VM definition of various primitive memory access VOPs for the
Sparc
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain.... | null | https://raw.githubusercontent.com/gonzojive/sbcl/3210d8ed721541d5bba85cbf51831238990e33f1/src/compiler/sparc/cell.lisp | lisp | the VM definition of various primitive memory access VOPs for the
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
data object ref/set stuff.
Symbol hacking VOPs:
The compiler likes to be a... | Sparc
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!VM")
(define-vop (slot)
(:args (object :scs (descriptor-reg)))
(:info name offset lowtag)
(:i... |
24f7f36cdddc0a1b5f8664545422bc071c7d57d2be193dba47373f782a497bc2 | hipsleek/hipsleek | ivpermUtils.ml | #include "xdebug.cppo"
open Gen
open VarGen
open Globals
open Ipure
type spec_var = ident * primed
(* let eq_spec_var (v1, p1) (v2, p2) = *)
(* (String.compare v1 v2 = 0) && (p1 = p2) *)
let remove_dups = Gen. BList.remove_dups_eq eq_spec_var
(* let diff = Gen.BList.difference_eq eq_spec_var *)
(* To sto... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/ivpermUtils.ml | ocaml | let eq_spec_var (v1, p1) (v2, p2) =
(String.compare v1 v2 = 0) && (p1 = p2)
let diff = Gen.BList.difference_eq eq_spec_var
To store vperm of variables
let norm_vperm_sets vps =
let zero_vars = remove_dups vps.vperm_zero_vars in
let lend_vars = re... | #include "xdebug.cppo"
open Gen
open VarGen
open Globals
open Ipure
type spec_var = ident * primed
let remove_dups = Gen. BList.remove_dups_eq eq_spec_var
type vperm_sets = {
vperm_zero_vars: spec_var list;
vperm_lend_vars: spec_var list;
vperm_value_vars: spec_var list;
vperm_full_vars: spec_var list;
... |
6429b0416529df7321360c8da46fecb14981711cda28e7478c912675161a4786 | countvajhula/qi-tutorial | start.rkt | #lang racket
Welcome to the interactive Qi tutorial !
;;
;;
;; .,ad88888888baa,
;; ,d8P""" ""9888ba.
.a8 " , ad88888888888a
aP ' ,
, 8 " , 88888888888888888888 ,
, 8 ' ... | null | https://raw.githubusercontent.com/countvajhula/qi-tutorial/90eb56344edc368fdf90cb53c1fa557cb1a4525a/start.rkt | racket |
.,ad88888888baa,
,d8P""" ""9888ba.
888 8 "8888888888888888888) 888
888 8 `888888888888888888) 888
Y88b 8) "8888888888888888 d88P
Y88b. (b "8888888888... | #lang racket
Welcome to the interactive Qi tutorial !
.a8 " , ad88888888888a
aP ' ,
, 8 " , 88888888888888888888 ,
, 8 ' ( 888888888 ( ) 888888888 , 88b .
d88P " , 8 ' ` 888888888888888888888... |
cb3e28b6a9b4f1d2999eefac08b35b53c8bb3e5e1ec00e8a62f72a6acc0f5d4d | simonmar/monad-par | Chan.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses ,
UndecidableInstances , TypeSynonymInstances , ScopedTypeVariables ,
EmptyDataDecls , CPP #
UndecidableInstances, TypeSynonymInstances, ScopedTypeVariables,
EmptyDataDecls, CPP #-}
{-|
UNFINISHED
This modul... | null | https://raw.githubusercontent.com/simonmar/monad-par/1266b0ac1b4040963ab356cf032c6aae6b8a7add/Experimental/monad-par-data/Control/Monad/Par/Chan.hs | haskell | |
UNFINISHED
This module provides a basic implementation of channels that is
usable with any monad satisfying ParIVar.
runParRNG, fork,
spawn, spawn_
------------------------------------------------------------------------------
Make Par computations with state work.
| The @SplittableState@ class ... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses ,
UndecidableInstances , TypeSynonymInstances , ScopedTypeVariables ,
EmptyDataDecls , CPP #
UndecidableInstances, TypeSynonymInstances, ScopedTypeVariables,
EmptyDataDecls, CPP #-}
module Control.Monad.Par.Chan... |
056b0effdbc8408bfd2099ebcdadcd6ead61a7486d70aa3776e227f737dcbefe | dyoo/whalesong | storage.rkt | #lang s-exp "../lang/base.rkt"
;; Bindings to HTML5 storage
;; /
(require "../js.rkt")
(provide storage-length
storage-key
storage-ref
storage-set!
storage-remove!
storage-clear!)
(define localStorage (get-attr window "localStorage"))
(define (storage-length)
(inexa... | null | https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/storage/storage.rkt | racket | Bindings to HTML5 storage
/ | #lang s-exp "../lang/base.rkt"
(require "../js.rkt")
(provide storage-length
storage-key
storage-ref
storage-set!
storage-remove!
storage-clear!)
(define localStorage (get-attr window "localStorage"))
(define (storage-length)
(inexact->exact (js-number->number (get-... |
f21871681db5a0653733e7dbb209c4892148fb289e0d920127d93d6c1cba09d7 | sadiqj/ocaml-esp32 | path.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/typing/path.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type t =
Pident of Ident.t
| Pdot of t * string * int
| Papply of t * t
let nopos = -1
let rec ... |
a88c8f16fda82b283a7e2fe8b56e28995f5ce6feed4c4ca1eba57e534cded412 | agentm/project-m36 | RemoteCallTypes.hs | # LANGUAGE DeriveGeneric , DerivingVia , CPP #
module ProjectM36.Server.RemoteCallTypes where
import ProjectM36.Base
import ProjectM36.IsomorphicSchema
import ProjectM36.TransactionGraph
import ProjectM36.DataFrame
import ProjectM36.TransGraphRelationalExpression
import ProjectM36.Session
import ProjectM36.Serialise.Da... | null | https://raw.githubusercontent.com/agentm/project-m36/b561c97da21a67f4b7c71bb86dd8e7afb1d060e1/src/lib/ProjectM36/Server/RemoteCallTypes.hs | haskell | # LANGUAGE DeriveGeneric , DerivingVia , CPP #
module ProjectM36.Server.RemoteCallTypes where
import ProjectM36.Base
import ProjectM36.IsomorphicSchema
import ProjectM36.TransactionGraph
import ProjectM36.DataFrame
import ProjectM36.TransGraphRelationalExpression
import ProjectM36.Session
import ProjectM36.Serialise.Da... | |
2aca3adce52ca119817666d22d630eb631dd7369e501472b0213626379862129 | francescoc/erlangprogramming | usr.erl | %% Code from
%% Erlang Programming
and
O'Reilly , 2008
%% /
/
( c ) and
%%% File : usr.erl
%%% Description : API and server code for cell user db
-module(usr).
-export([start/0, start/1, stop/0, init/2]).
-export([add_usr/3, delete_usr/1, set_service/3, set_status/2,
delete_disa... | null | https://raw.githubusercontent.com/francescoc/erlangprogramming/b4c39cbebe6599f23eb9d1a052316baf75e40a47/chapter10/usr.erl | erlang | Code from
Erlang Programming
/
File : usr.erl
Description : API and server code for cell user db
Exported Client Functions
Service API
Messaging Functions
Internal Server Functions
Handling Client Requests | and
O'Reilly , 2008
/
( c ) and
-module(usr).
-export([start/0, start/1, stop/0, init/2]).
-export([add_usr/3, delete_usr/1, set_service/3, set_status/2,
delete_disabled/0, lookup_id/1]).
-export([lookup_msisdn/1, service_flag/2]).
-include("usr.hrl").
-define(TIMEOUT, 30000).
Opera... |
204dff546ca7b083ae2aeb4d67c9975d60e75a951d0b170b0c35988643a08bb4 | Clozure/ccl | build.lisp | ;;; -*- Log: hemlock.log; Package: Spell -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
;;; ************************************************... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/cocoa-ide/hemlock/unused/archive/spell/build.lisp | lisp | -*- Log: hemlock.log; Package: Spell -*-
**********************************************************************
**********************************************************************
This file contains code to build a new binary dictionary file from
text in system space. This code relies on implementation dep... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
Written by
Designed by and
code from spell-rt.lisp . Also , it is expected that
and spell-aug.lisp have been loaded . In order to compile this file ,
yo... |
669492027bd8406da6a52ac1904c31bb42e0a45d44e447b4438c9cd1ef1ad02f | ucsd-progsys/liquidhaskell | NaturalDeduction.hs | Author
-- Natural Deduction Rules for Quantifiers
-- Proofs from
-- and file-%20Investigations%20into%20Logical%20Deduction%20(1).pdf
module NaturalDeduction where
{-@ LIQUID "--higherorder" @-}
{-@ LIQUID "--exact-data-cons" @-}
import Language.Haskell.Liquid.ProofCombinators
-- Universal Introduction
{-@
ex... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/4a6c9bc380e9754b2b99d40c6227f5853c66af8e/tests/benchmarks/popl18/ple/pos/NaturalDeduction.hs | haskell | Natural Deduction Rules for Quantifiers
Proofs from
and file-%20Investigations%20into%20Logical%20Deduction%20(1).pdf
@ LIQUID "--higherorder" @
@ LIQUID "--exact-data-cons" @
Universal Introduction
@
ex1 :: f:(a -> Bool) -> g:(a -> Bool)
-> (x:a -> PAnd {v:Proof | f x} {v:Proof | g x})
-> (y:a -> {v:Proo... | Author
module NaturalDeduction where
import Language.Haskell.Liquid.ProofCombinators
ex1 :: (a -> Bool) -> (a -> Bool)
-> (a -> PAnd Proof Proof)
-> (a -> Proof)
ex1 f g assumption y =
case assumption y of
PAnd fy _ -> fy
class NonEmpty a where
pick :: a
@ : : f:(a - > Bool ) - > ( x :... |
fde785c9be03359d349951a256ab29376f15dad6f42ea52397dc084ea4e6a672 | biocaml/phylogenetics | site_evolution_model.mli | (** Compilation of modules implementing evolution models and
providing relevant mathematical procedure (eg, exponential of transition matrix);
also includes functors to build models from transition matrices.*)
(** Evolution model with linear algebra functions to compute
stationary distribution and transitio... | null | https://raw.githubusercontent.com/biocaml/phylogenetics/b58dee1fb3419666cee3e368b37b3b375976a9b7/lib/site_evolution_model.mli | ocaml | * Compilation of modules implementing evolution models and
providing relevant mathematical procedure (eg, exponential of transition matrix);
also includes functors to build models from transition matrices.
* Evolution model with linear algebra functions to compute
stationary distribution and transition matri... |
module type S = sig
type param
type vec
type mat
val rate_matrix : param -> mat
val transition_probability_matrix : param -> float -> mat
val stationary_distribution : param -> vec
end
module type S_with_reduction = sig
include S
val rate_matrix_reduction : param -> mat * vec * mat
end
module type Ra... |
6430e38a55f0a99b9ee6034175d7c8c5afc01cf80f7e503e7bf50657116e0402 | wireapp/wire-server | V70_MLSCipherSuite.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/5e91e50aa6f405cb6fbee05f9122e0f79e796658/services/galley/schema/src/V70_MLSCipherSuite.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 V70_MLSCipherSuite
( mi... |
7e14368a2b04b33f368a2ba31219cff74a839798374a1cf0e3daa8136c494863 | hiratara/Haskell-Nyumon-Sample | chap04-samples-4-5-2.hs | module Main(main) where
import Control.Exception
import System.IO
main :: IO ()
main =
bracket (openFile "dummyFileName" ReadMode) hClose $ \h -> do
s <- hGetContents h
putStrLn s
| null | https://raw.githubusercontent.com/hiratara/Haskell-Nyumon-Sample/ac52b741e3b96722f6fc104cfa84078e39f7a241/chap04-samples/chap04-samples-4-5-2.hs | haskell | module Main(main) where
import Control.Exception
import System.IO
main :: IO ()
main =
bracket (openFile "dummyFileName" ReadMode) hClose $ \h -> do
s <- hGetContents h
putStrLn s
| |
c39bfcb3e60310fb400eedb2ef063a88dd4aeb069b3d63b44f1606b43be077b1 | erszcz/learning | tracefun.erl | -module(tracefun).
-export([start/0,
stop/0]).
-include_lib("stdlib/include/ms_transform.hrl").
start(User) ->
dbg:tracer(process, {fun trace/2, initial_state()}),
dbg:p(all, call),
dbg:tp(ejabberd_c2s,
dbg:fun2ms(fun([_, #state{user = User}]) ->
return_trace()
... | null | https://raw.githubusercontent.com/erszcz/learning/b21c58a09598e2aa5fa8a6909a80c81dc6be1601/erlang/tracefun.erl | erlang | -module(tracefun).
-export([start/0,
stop/0]).
-include_lib("stdlib/include/ms_transform.hrl").
start(User) ->
dbg:tracer(process, {fun trace/2, initial_state()}),
dbg:p(all, call),
dbg:tp(ejabberd_c2s,
dbg:fun2ms(fun([_, #state{user = User}]) ->
return_trace()
... | |
9c4f3e5606defe7d33926dc70a702a08cff8a7b194cbea1ad7cde738025cfed1 | kidpollo/jackdaw-literate-examples | topic_metadata.clj | (ns prod-app.topic-metadata
(:require [clojure.edn :as edn]
[integrant.core :as ig]))
(defn build-topic-metadata
[replication-factor partition-count]
{:external-loan-application
{:topic-name "external-loan-application-1"
:partition-count partition-count
:replication-factor replication-fact... | null | https://raw.githubusercontent.com/kidpollo/jackdaw-literate-examples/9f3eca7415c0c4d460ab114eca675901a6c32114/prod-app/src/prod_app/topic_metadata.clj | clojure | (ns prod-app.topic-metadata
(:require [clojure.edn :as edn]
[integrant.core :as ig]))
(defn build-topic-metadata
[replication-factor partition-count]
{:external-loan-application
{:topic-name "external-loan-application-1"
:partition-count partition-count
:replication-factor replication-fact... | |
c9fdc8240ea237127c2e3ce45841be9c61d259b66257b434320a48efeae61cc3 | SleepyBag/leetcode-racket | 483.rkt | (define (power a b)
(if (= b 0)
1
(let ([c (power a (quotient b 2))])
(if (>= c 1000000000000000001)
1000000000000000001
(* c c (if (= (remainder b 2) 1) a 1))
)
)
)
)
(define (sum lst)
(if (null? lst)
0
(min (+ (car lst) (sum (cdr... | null | https://raw.githubusercontent.com/SleepyBag/leetcode-racket/aa6ee944e11f09247fabfadc1154103dbd6e7553/483.rkt | racket | (define (power a b)
(if (= b 0)
1
(let ([c (power a (quotient b 2))])
(if (>= c 1000000000000000001)
1000000000000000001
(* c c (if (= (remainder b 2) 1) a 1))
)
)
)
)
(define (sum lst)
(if (null? lst)
0
(min (+ (car lst) (sum (cdr... | |
660eb5aece8d929afbae02acc44dfe9ab4f1ee1fb4d951e168164277cca226a7 | brendanhay/gogol | Product.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/8cbceeaaba36a3c08712b2e272606161500fbe91/lib/services/gogol-texttospeech/gen/Gogol/TextToSpeech/Internal/Product.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* ListVoicesResponse
* SynthesisInput
* Voice
* VoiceSelectionParams
| Description of audio data to be synthesized.
/See:/ 'newAudioConfig' smart constructor.
| Required. The format of the audio byte stream.
/See:/ 'newLis... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
d5fe479ec6b81f0553e4d23293ff09f857433a19635b6cda5303fa4672fc12b5 | Incubaid/baardskeerder | test.ml |
* This file is part of Baardskeerder .
*
* Copyright ( C ) 2011 Incubaid BVBA
*
* Baardskeerder is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , o... | null | https://raw.githubusercontent.com/Incubaid/baardskeerder/3975cb7f0e92e1f35eeab17beeb906344e43dae0/src/test.ml | ocaml |
* This file is part of Baardskeerder .
*
* Copyright ( C ) 2011 Incubaid BVBA
*
* Baardskeerder is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , o... | |
f2d2a2491295bdd44cba53d0cfb6ceb66ba276b13a6c748493572734f78f1b27 | Deducteam/Agda2Dedukti | Compiler.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DeriveGeneric #
module Compiler where
-- hides (<>), as there was a conflit with the (<>) defined here
import Prelude hiding ((<>))
import Control.Monad.State
import Control.Exception
import Data.Maybe
import System.Directory (doesFileExist)
import Data.Int
import Data.List ... | null | https://raw.githubusercontent.com/Deducteam/Agda2Dedukti/859850ff974970086c6a140b033c58658013a128/src/Compiler.hs | haskell | # LANGUAGE BangPatterns #
hides (<>), as there was a conflit with the (<>) defined here
needed for detecting the requires on the output
----------------------------------------------------------------------------
Backend callbacks
----------------------------------------------------------------------------
^ Flag w... | # LANGUAGE DeriveGeneric #
module Compiler where
import Prelude hiding ((<>))
import Control.Monad.State
import Control.Exception
import Data.Maybe
import System.Directory (doesFileExist)
import Data.Int
import Data.List (sortOn, stripPrefix, intercalate, (++))
import Text.PrettyPrint
import Debug.Trace
import Data... |
8767d238e6e3dff97bf37b2715afe9e0cf1dfeea06e7c9b66d1beec9039bb8ed | goblint/analyzer | boolDomain.ml | module Bool =
struct
include Basetype.RawBools
type t = bool
let equal = Bool.equal
let compare = Bool.compare
let relift x = x
let arbitrary ( ) = QCheck.bool
let equal = Bool.equal
let compare = Bool.compare
let relift x = x
let arbitrary () = QCheck.bool *)
let pretty_diff () (x,y) = G... | null | https://raw.githubusercontent.com/goblint/analyzer/78e8ce83e70585e89623ec84af355deb2b3b854d/src/domains/boolDomain.ml | ocaml | module Bool =
struct
include Basetype.RawBools
type t = bool
let equal = Bool.equal
let compare = Bool.compare
let relift x = x
let arbitrary ( ) = QCheck.bool
let equal = Bool.equal
let compare = Bool.compare
let relift x = x
let arbitrary () = QCheck.bool *)
let pretty_diff () (x,y) = G... | |
80a11ab2e2e48096ce5338ee0f4f0976ea0863065d6b4426ed5f25aba4371840 | airalab/hs-web3 | Default.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
{-# LANGUAGE ScopedTypeVariables #-}
-- |
-- Module : Network.Ethereum.Account.Default
Copyright : 2016 - 2021
-- License : Apache-2.0
--
-- Maintainer :
-- Stability : experimental
--... | null | https://raw.githubusercontent.com/airalab/hs-web3/49b920384b025ab7de0f9fce3efe9f471d95e71f/packages/ethereum/src/Network/Ethereum/Account/Default.hs | haskell | # LANGUAGE ScopedTypeVariables #
|
Module : Network.Ethereum.Account.Default
License : Apache-2.0
Maintainer :
Stability : experimental
Portability : unportable
| # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
Copyright : 2016 - 2021
Default node managed account ( typically the first of accounts list ) .
module Network.Ethereum.Account.Default where
import Control.Exception (TypeE... |
b9959e8a3083d357b465bce046a74feb9befa9251e94c7ea0e5be9aab4595b52 | xnning/haskell-programming-from-first-principles | tests.hs | module Main where
import qualified Data.Map as M
import Morse
import Test.QuickCheck
allowedChars :: [Char]
allowedChars = M.keys letterToMorse
allowedMorse :: [Morse]
allowedMorse = M.elems letterToMorse
charGen :: Gen Char
charGen = elements allowedChars
morseGen :: Gen Morse
morseGen = elements allowedMorse
pr... | null | https://raw.githubusercontent.com/xnning/haskell-programming-from-first-principles/0c49f799cfb6bf2dc05fa1265af3887b795dc5a0/projs/morse/tests/tests.hs | haskell | module Main where
import qualified Data.Map as M
import Morse
import Test.QuickCheck
allowedChars :: [Char]
allowedChars = M.keys letterToMorse
allowedMorse :: [Morse]
allowedMorse = M.elems letterToMorse
charGen :: Gen Char
charGen = elements allowedChars
morseGen :: Gen Morse
morseGen = elements allowedMorse
pr... | |
a02a90d954f2d5be0820c6203dc2a7c33f7e32f9fb0624873cbc1a9098b0761a | jwiegley/notes | AllM.hs | {-# LANGUAGE OverloadedStrings #-}
module AllM where
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.Class
import Control.Monad.Trans.Control
import Control.Monad.Trans.Maybe
import Control.Monad.Loops hiding (allM)
import Data.Maybe
import Data.Monoid
import C... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/AllM.hs | haskell | # LANGUAGE OverloadedStrings # |
module AllM where
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Trans.Class
import Control.Monad.Trans.Control
import Control.Monad.Trans.Maybe
import Control.Monad.Loops hiding (allM)
import Data.Maybe
import Data.Monoid
import Control.Concurrent.STM (atomically)
... |
90e22f8a2b20c8ce87f7d223e3f952f85145e097f029191c579250850983f85f | rabbitmq/rabbitmq-management | rabbit_mgmt_wm_connections_vhost.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2010 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_mgmt_wm_connections_vhost).
%% Li... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-management/543906f01ccd0344aff648f21bb6b5156b2a2ca2/src/rabbit_mgmt_wm_connections_vhost.erl | erlang |
Lists connections in a vhost
-------------------------------------------------------------------- | 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 ) 2010 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mgmt_wm_connections_vhost).
-export([i... |
76ddfacdb58537b23399801d25dd5650daba736ad67ae00c3193f11f2753ce43 | reactiveml/rml | tailcall.ml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/compiler/tailcall.ml | ocaml | FIX: it should be possible to deal with tail-recursion in exception
handlers, but we have to adapt the code generator for that
Format.eprintf "%d@." pc;
Skip try body | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... |
6e224ef2deb236d1a413f39347f339903e74b8789d1e279a4848dabe33cb2650 | nikita-volkov/rerebase | TypeLits.hs | module GHC.TypeLits
(
module Rebase.GHC.TypeLits
)
where
import Rebase.GHC.TypeLits
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/GHC/TypeLits.hs | haskell | module GHC.TypeLits
(
module Rebase.GHC.TypeLits
)
where
import Rebase.GHC.TypeLits
| |
b2347310afcf597b6ebab9db456b33a2143e944e6ef886d84931ce87cb76a43a | simonmar/parconc-examples | mvar1.hs | import Control.Concurrent
-- <<main
main = do
m <- newEmptyMVar
forkIO $ putMVar m 'x'
r <- takeMVar m
print r
-- >>
| null | https://raw.githubusercontent.com/simonmar/parconc-examples/840a3f508f9bb6e03961e1b90311a1edd945adba/mvar1.hs | haskell | <<main
>> | import Control.Concurrent
main = do
m <- newEmptyMVar
forkIO $ putMVar m 'x'
r <- takeMVar m
print r
|
f90129d9ec56b77643fe6a1f337eec623fc65649747f4ce6ba99b81398743315 | aeden/learn-you-some-erlang | guards.erl | -module(guards).
-export([old_enough/1,right_age/1,wrong_age/1]).
old_enough(X) when X >= 16 -> true;
old_enough(_) -> false.
right_age(X) when X >= 16, X =< 104 ->
true;
right_age(_) ->
false.
wrong_age(X) when X < 16; X > 104 ->
true;
wrong_age(_) ->
false.
| null | https://raw.githubusercontent.com/aeden/learn-you-some-erlang/b72efc8617de7ec129cc31e5d504aa0bac7964ea/guards.erl | erlang | -module(guards).
-export([old_enough/1,right_age/1,wrong_age/1]).
old_enough(X) when X >= 16 -> true;
old_enough(_) -> false.
right_age(X) when X >= 16, X =< 104 ->
true;
right_age(_) ->
false.
wrong_age(X) when X < 16; X > 104 ->
true;
wrong_age(_) ->
false.
| |
3d1f4a912763d5a15375e078745b327c68ce4b4de9e22fd5eb95f5a502aba009 | aharisu/Gauche-CV | pyr-mean-shift-filtering.scm | (use cv)
(define-constant level 2)
(print "processing ...")
(let1 src (cv-load-image "data/image/items.jpg")
(slot-set! src 'roi (make-cv-rect 0 0 (logand (ref src 'width)
(- (ash 1 level)))
(logand (ref src 'height)
... | null | https://raw.githubusercontent.com/aharisu/Gauche-CV/5e4c51501431c72270765121ea4d92693f11d60b/sample/pyr-mean-shift-filtering.scm | scheme | (use cv)
(define-constant level 2)
(print "processing ...")
(let1 src (cv-load-image "data/image/items.jpg")
(slot-set! src 'roi (make-cv-rect 0 0 (logand (ref src 'width)
(- (ash 1 level)))
(logand (ref src 'height)
... | |
ba6817ed494fa92f491328629d5f9b24a0b2c19495cb1c4d79a8add5a195e1cd | ku-fpg/blank-canvas | Color_Square.hs | {-# LANGUAGE OverloadedStrings #-}
module Color_Square where
import qualified Data.Vector.Unboxed as V
import Graphics.Blank
( 300,300 )
main :: IO ()
main = blankCanvas 3000 $ \ context -> do
let v = V.fromList
$ concat
$ [ [r,g,0,255]
| r <- [0..255]
, g <... | null | https://raw.githubusercontent.com/ku-fpg/blank-canvas/39915c17561106ce06e1e3dcef85cc2e956626e6/wiki-suite/Color_Square.hs | haskell | # LANGUAGE OverloadedStrings # | module Color_Square where
import qualified Data.Vector.Unboxed as V
import Graphics.Blank
( 300,300 )
main :: IO ()
main = blankCanvas 3000 $ \ context -> do
let v = V.fromList
$ concat
$ [ [r,g,0,255]
| r <- [0..255]
, g <- [0..255]
]
send ... |
cda904e388424d3addbe65a31ceedd06f1413aaedee41fadd810620308db02b6 | thwfhk/lambdaQ | DeBruijn.hs | # LANGUAGE FlexibleContexts #
module DeBruijn where
import Syntax
import Context
import QASMSyntax
import Data.List
import Control.Monad.State
import Control.Monad.Except
Convert Circuit to De Bruijn Representation
| Transform a pattern to Index Representation
patDeBruijn :: MonadError Err m => Context -> Patt... | null | https://raw.githubusercontent.com/thwfhk/lambdaQ/f68e82ce094c0f57f45a9049e0c228dfb2c2781b/src/Frontend/src/DeBruijn.hs | haskell | # LANGUAGE FlexibleContexts #
module DeBruijn where
import Syntax
import Context
import QASMSyntax
import Data.List
import Control.Monad.State
import Control.Monad.Except
Convert Circuit to De Bruijn Representation
| Transform a pattern to Index Representation
patDeBruijn :: MonadError Err m => Context -> Patt... | |
d48311e527bebc5e9168a19c36bf571ac7e304ccc77c9a5c73c5670fadc2d7a7 | d-cent/objective8 | okta.clj | (ns objective8.front-end.workflows.okta
(:require [objective8.utils :as utils]
[ring.util.response :as response]
[objective8.front-end.api.http :as http]
[bidi.ring :refer [make-handler]]
[cheshire.core :as json]
[clojure.tools.logging :as log]))
(def redir... | null | https://raw.githubusercontent.com/d-cent/objective8/db8344ba4425ca0b38a31c99a3b282d7c8ddaef0/src/objective8/front_end/workflows/okta.clj | clojure | (ns objective8.front-end.workflows.okta
(:require [objective8.utils :as utils]
[ring.util.response :as response]
[objective8.front-end.api.http :as http]
[bidi.ring :refer [make-handler]]
[cheshire.core :as json]
[clojure.tools.logging :as log]))
(def redir... | |
ea2ff87c9e3875b91016d910c1dda40c804ad5b7fb77bb24d30b9f15fc04c3e0 | UnixJunkie/fragger | get_frag.ml | Copyright ( C ) 2013 , Zhang Initiative Research Unit ,
* Advance Science Institute , Riken
* 2 - 1 Hirosawa , Wako , Saitama 351 - 0198 , Japan
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License , with
* the specia... | null | https://raw.githubusercontent.com/UnixJunkie/fragger/7cbee359cfb6ddb3acfdf72501921b0728dd3e9f/src/get_frag.ml | ocaml | no DB file given
incompatible options
L.filter
(fun key ->
let value = HT.find index key in
let len = String.length value.sequence in
len <= !n)
varies each time the software is run
fragment index will be chosen randomly | Copyright ( C ) 2013 , Zhang Initiative Research Unit ,
* Advance Science Institute , Riken
* 2 - 1 Hirosawa , Wako , Saitama 351 - 0198 , Japan
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License , with
* the specia... |
97cf43cc0adf15e13f9ff42b05885bc5c299504092c68c1b51b151f4b93692cb | iskandr/ocaml_llvm | dsl.mli | type exp =
| Num of float
| Var of string
| Add of exp * exp
| Sub of exp * exp
| Mult of exp * exp
| Div of exp * exp
| Sum of string * exp * exp * exp
val exp_to_str : exp -> string
type fn = {name:string; inputs:string list; body: exp}
val fn_to_str : fn -> string
| null | https://raw.githubusercontent.com/iskandr/ocaml_llvm/04012d2060b0c22c4d1f32aa6166fca2bb449912/dsl.mli | ocaml | type exp =
| Num of float
| Var of string
| Add of exp * exp
| Sub of exp * exp
| Mult of exp * exp
| Div of exp * exp
| Sum of string * exp * exp * exp
val exp_to_str : exp -> string
type fn = {name:string; inputs:string list; body: exp}
val fn_to_str : fn -> string
| |
ce9fec682f87e1cbd5a5e8ab9768ebd407d2671fe53a789ba89ab219e6ba0834 | racket/racket7 | inline.rkt | #lang racket/base
(require "wrap.rkt"
"match.rkt"
"known.rkt"
"import.rkt"
"export.rkt")
(provide init-inline-fuel
can-inline?
inline-clone
known-inline->export-known)
(define inline-base 3)
(define inline-factor 3)
(define init-inline-fuel 8)
(define (c... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/schemify/inline.rkt | racket | ----------------------------------------
All binding identifiers in a clone must be fresh to stay consistent
with the unique-variable invariant of expanded/schemified form.
The `needed->env` setup can fail if a needed
import cannot be made available:
We expect `id` to refer to an imported variable, where inlining... | #lang racket/base
(require "wrap.rkt"
"match.rkt"
"known.rkt"
"import.rkt"
"export.rkt")
(provide init-inline-fuel
can-inline?
inline-clone
known-inline->export-known)
(define inline-base 3)
(define inline-factor 3)
(define init-inline-fuel 8)
(define (c... |
640af58b062c5e731052f8b9139fd0dbe289b3b7c337b00e3daf49f5c58acbd7 | NorfairKing/hastory | Gather.hs | # LANGUAGE FlexibleContexts #
module Hastory.API.Gather
( gatherEntryWith,
)
where
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Time as Time
import Hastory.Data.Client.DB (Entry (..))
import Path.IO (getCurrentDir)
import System.Posix.User (getEffectiveUserName)
gatherEntryWith :... | null | https://raw.githubusercontent.com/NorfairKing/hastory/35abbc79155bc7c5a0f6e0f3618c8b8bcd3889a1/hastory-api/src/Hastory/API/Gather.hs | haskell | # LANGUAGE FlexibleContexts #
module Hastory.API.Gather
( gatherEntryWith,
)
where
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Time as Time
import Hastory.Data.Client.DB (Entry (..))
import Path.IO (getCurrentDir)
import System.Posix.User (getEffectiveUserName)
gatherEntryWith :... | |
f876fee7bf6248f872ff0fcd85ae5f574d9f1aef5d16bb5639a05a9042faa004 | coleslaw-org/coleslaw | import.lisp | (eval-when (:compile-toplevel :load-toplevel)
(ql:quickload '(coleslaw cxml cl-ppcre local-time)))
(defpackage :coleslaw-import
(:use :cl :cxml)
(:export #:enable)
(:import-from :coleslaw #:slugify
#:load-config
#:*config*
#:repo)
... | null | https://raw.githubusercontent.com/coleslaw-org/coleslaw/0b9f027a36ea00ca2e4b6f8d9fd7a135127cc2da/plugins/import.lisp | lisp | is it public?
is it a post?
TODO: What other data/metadata should we write out? | (eval-when (:compile-toplevel :load-toplevel)
(ql:quickload '(coleslaw cxml cl-ppcre local-time)))
(defpackage :coleslaw-import
(:use :cl :cxml)
(:export #:enable)
(:import-from :coleslaw #:slugify
#:load-config
#:*config*
#:repo)
... |
e0427add76830ccb4256ff60696e04bc97bebf22b606986f17f922408f460a68 | lisp-mirror/clpm | diff.lisp | Functions dealing with context diffs from CLPM
;;;;
This software is part of CLPM . See README.org for more information . See
;;;; LICENSE for license information.
(in-package #:clpm-client)
(defclass context-diff ()
((release-diffs
:initarg :release-diffs
:initform nil
:reader context-diff-release-... | null | https://raw.githubusercontent.com/lisp-mirror/clpm/ad9a704fcdd0df5ce30ead106706ab6cc5fb3e5b/clpm-client/diff.lisp | lisp |
LICENSE for license information.
~~:[ ~~;->~~]~~:*~~] ~~~D<~~@[~~A~~]~~> ~
~~:[ ~~;->~~]~~:*~~] ~~~D<~~@[~~A~~]~~>~~%" | Functions dealing with context diffs from CLPM
This software is part of CLPM . See README.org for more information . See
(in-package #:clpm-client)
(defclass context-diff ()
((release-diffs
:initarg :release-diffs
:initform nil
:reader context-diff-release-diffs))
(:documentation
"A representat... |
8487437b703eba21a975f00956e95f3db0733168ad8cd5974873551800f913c4 | ocsigen/ojwidgets | ojw_alert.ml |
include
Ojw_alert_f.Make
(Ojw_dom.T)
(Ojw_dom.T)
| null | https://raw.githubusercontent.com/ocsigen/ojwidgets/4be2233980bdd1cae187c749bd27ddbfff389880/src/experimental/ojw_alert.ml | ocaml |
include
Ojw_alert_f.Make
(Ojw_dom.T)
(Ojw_dom.T)
| |
6efe2fdcfd7fbb8fa77f3959e1b6c594e593077fee06f7a8524f1823c2cbadcc | javalib-team/javalib | replace_dynamics.ml | open Javalib_pack
open Javalib
open JBasics
let dump_class classpath scname prefix dest =
let cname = make_cn scname in
let ioc = get_class classpath cname in
let (ioc', cmap) = remove_invokedynamics ioc ~prefix in
let dest_main = Printf.sprintf "%s/%s.class" dest scname in
let ch = open_out_bin dest_main i... | null | https://raw.githubusercontent.com/javalib-team/javalib/0699f904dbb17e87ec0ad6ed0c258a1737e60329/tests/src/replace_dynamics.ml | ocaml | open Javalib_pack
open Javalib
open JBasics
let dump_class classpath scname prefix dest =
let cname = make_cn scname in
let ioc = get_class classpath cname in
let (ioc', cmap) = remove_invokedynamics ioc ~prefix in
let dest_main = Printf.sprintf "%s/%s.class" dest scname in
let ch = open_out_bin dest_main i... | |
d4e97f77d260dd449a85822ac7b159e12065013cfb42b74eae277c1cbe864905 | ivanjovanovic/sicp | e-5.3.scm | Exercise 5.3 . Design a machine to compute square roots using Newton 's
; method, as described in section 1.1.7:
(define (sqrt x)
(define (good-enough? guess)
(< (abs (- (square guess) x)) 0.001))
(define (improve guess)
(average guess (/ x guess)))
(define (sqrt-iter guess)
(if (good-enough? gue... | null | https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/5.1/e-5.3.scm | scheme | method, as described in section 1.1.7:
Begin by assuming that good-enough? and improve operations are
available as primitives. Then show how to expand these in terms of
arithmetic operations. Describe each version of the sqrt machine
design by drawing a data-path diagram and writing a controller
definition in the... | Exercise 5.3 . Design a machine to compute square roots using Newton 's
(define (sqrt x)
(define (good-enough? guess)
(< (abs (- (square guess) x)) 0.001))
(define (improve guess)
(average guess (/ x guess)))
(define (sqrt-iter guess)
(if (good-enough? guess)
guess
(sqrt-iter (imp... |
51ff1766e488c169c34f634fdbaee8ae936e6745ee4af542cd86f67bd6a10217 | master/ejabberd | ejabberd_receiver.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_receiver.erl
Author : < >
%%% Purpose : Socket receiver for C2S and S2S connections
Created : 10 Nov 2003 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne
%%%
%%% This program is free softwa... | null | https://raw.githubusercontent.com/master/ejabberd/9c31874d5a9d1852ece1b8ae70dd4b7e5eef7cf7/src/ejabberd_receiver.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_receiver.erl
Purpose : Socket receiver for C2S and S2S connections
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... | Author : < >
Created : 10 Nov 2003 by < >
ejabberd , Copyright ( C ) 2002 - 2012 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 License
Founda... |
3ccef2fdce7fb44aa022c0af50cc41942cd859c5500e58930bb5cf50b37142eb | noahlz/cosla | audit_statuses.clj | (ns cosla.reports.audit-statuses
(:require [cosla.config :refer :all]
[cosla.core :refer :all]
[cosla.fetch :refer :all]
[clojure.set :as set]
[clojure.string :as str]
[clojure.tools.logging :refer :all])
(:gen-class))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/noahlz/cosla/bec25ab51b1482066d8ced379df3ac65abb00595/src/cosla/reports/audit_statuses.clj | clojure |
Console-Only Report on Issue Statuses | (ns cosla.reports.audit-statuses
(:require [cosla.config :refer :all]
[cosla.core :refer :all]
[cosla.fetch :refer :all]
[clojure.set :as set]
[clojure.string :as str]
[clojure.tools.logging :refer :all])
(:gen-class))
(defn audit-statuses-and-transition... |
7c92af3ae31b32512a93023887c3342a74042acf14849eadd35f10c6c7664112 | yrashk/erlang | wx.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/wx/src/wx.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
Author :
Created : 22 Feb 2007 b... |
1e97451a05619f0712494e844e091a68adbeb8b0e39eee78387ea035a134f28d | rufoa/ring-middleware-accept | accept.clj | (ns ring.middleware.accept)
(defn- max-key-multi
"like max-key but with tie-breaking"
[cands & score-fns]
(when-not (empty? cands)
(let [score (apply juxt score-fns)]
(reduce #(if (pos? (compare (score %1) (score %2))) %1 %2) cands))))
(defn- max-pos-key-multi
"like max-key-multi but disqualify any candidate... | null | https://raw.githubusercontent.com/rufoa/ring-middleware-accept/67e2500db793c487b6bcc151bdfcfb5b8964af46/src/ring/middleware/accept.clj | clojure |
award points for exact match but not * match
prefer closer match
| (ns ring.middleware.accept)
(defn- max-key-multi
"like max-key but with tie-breaking"
[cands & score-fns]
(when-not (empty? cands)
(let [score (apply juxt score-fns)]
(reduce #(if (pos? (compare (score %1) (score %2))) %1 %2) cands))))
(defn- max-pos-key-multi
"like max-key-multi but disqualify any candidate... |
ef35e060bcbf552379d0e723563577811b82533dfcfdf50b59f6dbd38822dbfa | shop-planner/shop3 | p01.lisp |
(IN-PACKAGE :SHOP2-ROVERS)
(DEFPROBLEM ROVERPROB01 ROVER
((OBJECTIVE OBJECTIVE1) (OBJECTIVE OBJECTIVE0)
(CAMERA CAMERA0) (WAYPOINT WAYPOINT3) (WAYPOINT WAYPOINT2)
(WAYPOINT WAYPOINT1) (WAYPOINT WAYPOINT0)
(STORE ROVER0STORE) (ROVER ROVER0) (MODE LOW_RES)
... | null | https://raw.githubusercontent.com/shop-planner/shop3/b04d12bdf83e40590fe44bb5c68952f3fd0b5b1d/shop3/examples/rovers/strips/p01.lisp | lisp |
(IN-PACKAGE :SHOP2-ROVERS)
(DEFPROBLEM ROVERPROB01 ROVER
((OBJECTIVE OBJECTIVE1) (OBJECTIVE OBJECTIVE0)
(CAMERA CAMERA0) (WAYPOINT WAYPOINT3) (WAYPOINT WAYPOINT2)
(WAYPOINT WAYPOINT1) (WAYPOINT WAYPOINT0)
(STORE ROVER0STORE) (ROVER ROVER0) (MODE LOW_RES)
... | |
40b02387e2075c7dc51c869f4bbe72655c9ab0c53dcd9b3c144b6b81184ff1e1 | aggelgian/erlang-algorithms | heap.erl | @doc , for Priority Queues
%%
%% <p>This module implements min-heaps and max-heaps for use in priority queues.
%% Each value in the heap is assosiated with a reference so that
the user can change its priority in O(log >
%%
< p > The implementation is based on ETS tables for the O(1 ) lookup time .
%% It... | null | https://raw.githubusercontent.com/aggelgian/erlang-algorithms/8ceee72146f2a6eff70a16e3e9a74d2ed072fa0a/src/heap.erl | erlang |
<p>This module implements min-heaps and max-heaps for use in priority queues.
Each value in the heap is assosiated with a reference so that
It supports all the basic heap operations:
<ul>
<li><code>min/1</code>, <code>max/1</code> in <em>O(1)</em></li>
</ul>
</p>
<p>In order to achieve the above c... | @doc , for Priority Queues
the user can change its priority in O(log >
< p > The implementation is based on ETS tables for the O(1 ) lookup time .
< li><code > take_min/1</code > , < code > take_max/1</code > in < em > O(log >
< li><code > insert/2</code > in < em > O(log >
< li><code >... |
fa3c3d68fb55120f9790968376c46e9d3100dc775f1efe84818741191e7d94ff | ghc/testsuite | T1470.hs | # LANGUAGE MultiParamTypeClasses , FlexibleContexts , FlexibleInstances , OverlappingInstances , UndecidableInstances , KindSignatures #
-- Trac #1470
module Foo where
class Sat a
class Data (ctx :: * -> *) a
instance Sat (ctx Char) => Data ctx Char
instance (Sat (ctx [a]), Data ctx a) => Data ctx [a]
... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/T1470.hs | haskell | Trac #1470
We have this
We have this | # LANGUAGE MultiParamTypeClasses , FlexibleContexts , FlexibleInstances , OverlappingInstances , UndecidableInstances , KindSignatures #
module Foo where
class Sat a
class Data (ctx :: * -> *) a
instance Sat (ctx Char) => Data ctx Char
instance (Sat (ctx [a]), Data ctx a) => Data ctx [a]
class Data Foo... |
879b9e4ab8ee94752953c0d6855f59dd3ec01ed9911286c5422c0ec85ab47b4e | marigold-dev/mankavar | structs.ml | open Das_helpers
open Eval
module Contract_index = XInt64
module Key_index = XInt64
module Account_index = struct
type t =
| Key_index of Key_index.t
| Contract_index of Contract_index.t
[@@deriving ez , ord]
let key_encoding = Encoding.int64
let encoding = Encoding.(
union [
case get_key_index_... | null | https://raw.githubusercontent.com/marigold-dev/mankavar/13592b5eb888f2ec73816e3d200a6e89228941da/src/consensus/tx-oru/proof-scre/structs.ml | ocaml | open Das_helpers
open Eval
module Contract_index = XInt64
module Key_index = XInt64
module Account_index = struct
type t =
| Key_index of Key_index.t
| Contract_index of Contract_index.t
[@@deriving ez , ord]
let key_encoding = Encoding.int64
let encoding = Encoding.(
union [
case get_key_index_... | |
1289ddc5d6f2e4745e721a142690d17d70141978c7cee28250dd4b0b9671d29f | jonase/eastwood | testtest.clj | (ns testcases.testtest
(:use [clojure.test]))
(deftest testing-clojure-test
(is (= 4 (+ 2 2))) ; normal is
(is (= 6 (+ 2 4)) "2+4 is 6") ; normal is with message to report on failure
(is "2+4 is 6 in the wrong place" (= 6 (+ 2 4))) ; backwards args, but test passes because string is logical true
(is... | null | https://raw.githubusercontent.com/jonase/eastwood/01fb0b43b0bc10d578af667c5ee9708cbf6a97bc/cases/testcases/testtest.clj | clojure | normal is
normal is with message to report on failure
backwards args, but test passes because string is logical true
backwards args, but test passes because string is logical true
(is #"regex" (/ 1 0)) ; test fails because of exception
test passes because #"regex" is the expression to test, and it is always logi... | (ns testcases.testtest
(:use [clojure.test]))
(deftest testing-clojure-test
Passes because ( / 1 0 ) is evaluated and throws an exception . Final string " Exception " is compiled but not evaluated at run time due to the exception . No big deal here that a linter would need to warn about th... |
bc96419bef30a51602ca9b4b96e1271c3f188dd3a728abc83fe630b3976c595b | keera-studios/haskell-titan | View.hs | {-# LANGUAGE MultiWayIf #-}
-- | Contains basic operations related to the GUI
--
Copyright : ( C ) Keera Studios Ltd , 2018
-- License : GPL-3
Maintainer :
module View (module Exported) where
-- External libraries
import Graphics.UI.Gtk
import Graphics.UI.Gtk.GtkView (GtkGUI(..))
import Graphics.UI.Gtk.S... | null | https://raw.githubusercontent.com/keera-studios/haskell-titan/958ddd2b468af00db46004a683c1c7aebe81526c/titan/src/View.hs | haskell | # LANGUAGE MultiWayIf #
| Contains basic operations related to the GUI
License : GPL-3
External libraries
| Add all initialisers to the initialise operation and store
everything we'll need in the view. We need this operation here
because the URL to the glade file depends on the application
name.
Add stream... | Copyright : ( C ) Keera Studios Ltd , 2018
Maintainer :
module View (module Exported) where
import Graphics.UI.Gtk
import Graphics.UI.Gtk.GtkView (GtkGUI(..))
import Graphics.UI.Gtk.StreamChart
Internal libraries
import Hails.MVC.View.GtkView as Exported
import Hails.MVC.View.DefaultView as Exported
i... |
e2d9dcc2e5ab77e19ef698092291885d1929ec197a419b16e9bde9558eadd50c | ubf/ubf | file_plugin.erl | %%% The MIT License
%%%
Copyright ( C ) 2011 - 2016 by < >
Copyright ( C ) 2002 by
%%%
%%% 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 li... | null | https://raw.githubusercontent.com/ubf/ubf/c876f684fbd4959548ace1eb1cfc91941f93d377/test/unit/file_plugin.erl | erlang | The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above... | Copyright ( C ) 2011 - 2016 by < >
Copyright ( C ) 2002 by
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITH... |
ef5b26e0591c2865710cff87983ac9a52fbfc76a5097bfba2e139024537231c4 | alanz/ghc-exactprint | RmDecl7.hs | module RmDecl7 where
toplevel :: Integer -> Integer
toplevel x = c * x
-- c,d :: Integer
c = 7
d = 9
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/transform/RmDecl7.hs | haskell | c,d :: Integer | module RmDecl7 where
toplevel :: Integer -> Integer
toplevel x = c * x
c = 7
d = 9
|
b97c55a3490edd082650a6f8969739a6e9c8918bbba87953575ea5a46c222941 | tonyrog/eth | bpf_opt_path.erl | @author < >
( C ) 2014 ,
%%% @doc
BPF optimizer - find already check condition in path
%%% @end
Created : 3 Jul 2014 by < >
-module(bpf_opt_path).
-export([run/1]).
-include("eth_bpf.hrl").
-include("eth_def.hrl").
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... | null | https://raw.githubusercontent.com/tonyrog/eth/51e9989a020ccf8aafa0c286c0dc19ab7862a5a8/src/bpf_opt_path.erl | erlang | @doc
@end
Constant path
Ds is dict of dicts of block calculations, Vs is set of visited nodes
check all paths to this block to see if they may be patched
check if ncond is patch among parents and update
try forward patch
hmm?
hmm?
given label L check generate a list of all parent paths
to check if Cond ... | @author < >
( C ) 2014 ,
BPF optimizer - find already check condition in path
Created : 3 Jul 2014 by < >
-module(bpf_opt_path).
-export([run/1]).
-include("eth_bpf.hrl").
-include("eth_def.hrl").
run(Bs) when is_record(Bs,bpf_bs) ->
?info("optimiser pass: constant path\n", []),
Ls = ... |
408ddf6ba70ea0110cd72bdda54078e24acf922a7d3ef7c0328420a780ae6b6e | martinkersner/cl-ml | support-vector-machines-example.lisp | ,
2017/01/24
;;;;
Support Vector Machines example
(defun find-support-vectors (svm)
(let* ((X (get-X svm))
(y (get-y svm))
(rows (matrix-rows X))
(alphas (get-alphas svm))
(support-vectors nil))
(mapcar #'(lambda (idx)
(if (not (= ([] alphas :row idx)... | null | https://raw.githubusercontent.com/martinkersner/cl-ml/f6263b9fb4abd1e069e892a595fe85fbfa5f9c9f/support-vector-machines/support-vector-machines-example.lisp | lisp |
LOAD DATASET
"datasets/support-vector-machines/rbf1.txt"
"datasets/support-vector-machines/rbf2.txt"
TRAINING
(fit *svm* train-data train-labels *rbf-params*)
plot training data
(scatter *fig* (matrix-data (vstack train-data train-labels))
(scatter *fig* (matrix-data *sv*)
:plot-type 'replot
:palette t
:with 'circl... | ,
2017/01/24
Support Vector Machines example
(defun find-support-vectors (svm)
(let* ((X (get-X svm))
(y (get-y svm))
(rows (matrix-rows X))
(alphas (get-alphas svm))
(support-vectors nil))
(mapcar #'(lambda (idx)
(if (not (= ([] alphas :row idx) 0))
... |
d503bb1810bbddaa1d01975daf722c7786ce0057aef544e0d7dd7a34cb2bd1bc | josefs/Gradualizer | gradualizer_fmt.erl | @private
-module(gradualizer_fmt).
-export([format_location/2,
format_type_error/2,
print_errors/2,
handle_type_error/2,
form_info/1]).
-include("typelib.hrl").
-define(FMT_LOCATION_DEFAULT, verbose).
35 = magenta
-define(color_end, "\e[0m").
-spec format_location(any(), brief... | null | https://raw.githubusercontent.com/josefs/Gradualizer/d2ea3201ee3c55695f50144ee4befcafa0756ccc/src/gradualizer_fmt.erl | erlang | compatibility with old error types which contain bare
annotations instead of the whole expression
compatibility with old error types which contain bare
annotations instead of the whole expression
TODO: Improve quality of type error
Compare to the runtime error raised by maps:get(Key, Map) error:{badkey, Key}.
Re... | @private
-module(gradualizer_fmt).
-export([format_location/2,
format_type_error/2,
print_errors/2,
handle_type_error/2,
form_info/1]).
-include("typelib.hrl").
-define(FMT_LOCATION_DEFAULT, verbose).
35 = magenta
-define(color_end, "\e[0m").
-spec format_location(any(), brief... |
15b8a46209da438d6f9c097726eaeefe9b4ffe5dc2ec7004117becc23f4a5df2 | yesodweb/wai | Settings.hs | # LANGUAGE OverloadedStrings , ScopedTypeVariables , ViewPatterns #
# LANGUAGE PatternGuards , RankNTypes #
# LANGUAGE ImpredicativeTypes , CPP #
# LANGUAGE MagicHash , UnboxedTuples #
module Network.Wai.Handler.Warp.Settings where
import GHC.IO (unsafeUnmask, IO (IO))
import GHC.Prim (fork#)
import UnliftIO (SomeExc... | null | https://raw.githubusercontent.com/yesodweb/wai/f52c03c6105d3249961c0c560c453e504e942d69/warp/Network/Wai/Handler/Warp/Settings.hs | haskell | | Various Warp server settings. This is purposely kept as an abstract data
type so that new settings can be added without breaking backwards
compatibility. In order to create a 'Settings' value, use 'defaultSettings'
^ Default value: HostIPv4
^ What to do with exceptions thrown by either the application or server... | # LANGUAGE OverloadedStrings , ScopedTypeVariables , ViewPatterns #
# LANGUAGE PatternGuards , RankNTypes #
# LANGUAGE ImpredicativeTypes , CPP #
# LANGUAGE MagicHash , UnboxedTuples #
module Network.Wai.Handler.Warp.Settings where
import GHC.IO (unsafeUnmask, IO (IO))
import GHC.Prim (fork#)
import UnliftIO (SomeExc... |
b75fe529cb07fdd27da560abf65a35596b5ce4702198067ad67e6c061fed9585 | arsalan0c/cdp-hs | Cast.hs | {-# LANGUAGE OverloadedStrings, RecordWildCards, TupleSections #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeFamilies #
|
= Cast
A domain for interacting with Cast , Presentation API... | null | https://raw.githubusercontent.com/arsalan0c/cdp-hs/6e70dbc59d394a0794b4a92e95f8851c11a3a624/src/CDP/Domains/Cast.hs | haskell | # LANGUAGE OverloadedStrings, RecordWildCards, TupleSections #
| Type 'Cast.Sink'.
| Text describing the current session. Present only if there is an active
session on the sink.
| Type of the 'Cast.issueUpdated' event.
| Starts observing for sinks that can be used for tab mirroring, and if set,
|sinksUpdated|... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeFamilies #
|
= Cast
A domain for interacting with Cast , Presentation API , and Remote Playback API
functionalities .
= Cast
A domain f... |
f0e64d09aa83b90668e6c37bb3aa48e193dfe81ba91e3287e73507181326f476 | fbellomi/crossclj | classify_invoke.clj | Copyright ( c ) , Rich Hickey & contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be b... | null | https://raw.githubusercontent.com/fbellomi/crossclj/7630270ebe9ea3df89fe3d877b2571e6eae1062b/src/cloned/clojure/tools/analyzer/passes/jvm/classify_invoke.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 ) , Rich Hickey & contributors .
(ns cloned.clojure.tools.analyzer.passes.jvm.classify-invoke
(:require [cloned.clojure.tools.analyzer.utils :refer [arglist-for-arity protocol-node? source-info]]
[cloned.clojure.tools.analyzer.jvm.utils
:refer [specials prim-interface]]
... |
9495a767d89f7b761bde21b038c0f70a76d678ee1fc4722bee38d3f903e3acf6 | Shirakumo/kandria | map.lisp | (in-package #:org.shirakumo.fraf.kandria)
(defclass map-element (alloy:renderable alloy:focus-element alloy:layout-element)
((offset :initform (vec 0 0) :accessor offset)
(state :initform NIL :accessor state)
(bsize :initform (vec 0 0) :accessor bsize)
(zoom :initform (/ 0.125 (alloy:resolution-scale (unit ... | null | https://raw.githubusercontent.com/Shirakumo/kandria/4706828fe13292633c35f16849028e8df143a7ce/ui/map.lisp | lisp | FIXME: This doesn't work with the lowpass. | (in-package #:org.shirakumo.fraf.kandria)
(defclass map-element (alloy:renderable alloy:focus-element alloy:layout-element)
((offset :initform (vec 0 0) :accessor offset)
(state :initform NIL :accessor state)
(bsize :initform (vec 0 0) :accessor bsize)
(zoom :initform (/ 0.125 (alloy:resolution-scale (unit ... |
4d1f375dc1c3922c983a7310a21a0b1c620bcba0fa27d934332c2a331240d409 | gedge-platform/gedge-platform | rabbit_exchange.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_exchange).
-include_lib("rabbit_co... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit_exchange.erl | erlang |
----------------------------------------------------------------------------
----------------------------------------------------------------------------
We want to upset things if it isn't ok
Avoid a channel exception if there's a race condition
with an exchange.delete operation.
See rabbitmq/rabbitmq-federatio... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_exchange).
-include_lib("rabbit_common/i... |
9b52e5da5bf21b5dc82ea9dd4179c10ed5dc5d02b61169bc8fb17c23f82727a8 | RefactoringTools/HaRe | Pfe3Metrics.hs | module Pfe3Metrics where
import Data.Maybe(mapMaybe)
import PFE0(allModules,pput)
import PFE3(parseModule)
import HsDeclStruct(DI(..))
import HsModule(hsModDecls)
import DefinedNames(definedType)
import HasBaseStruct(basestruct)
import Statistics
import PfeParse
import MUtils
pfe3MetricsCmds =
[("classmetrics", (n... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/pfe/Pfe3Metrics.hs | haskell | module Pfe3Metrics where
import Data.Maybe(mapMaybe)
import PFE0(allModules,pput)
import PFE3(parseModule)
import HsDeclStruct(DI(..))
import HsModule(hsModDecls)
import DefinedNames(definedType)
import HasBaseStruct(basestruct)
import Statistics
import PfeParse
import MUtils
pfe3MetricsCmds =
[("classmetrics", (n... | |
eca8e160c6ab2ce83d9603eea429f48a6cb1777131e98ae8d04b525903cdf800 | camlspotter/ocaml-zippy-tutorial-in-japanese | w41.ml | module M = struct
type t = { x : int }
end
module N = struct
type u = { x : int }
end
open M
open N
let x = { x = 20 }
| null | https://raw.githubusercontent.com/camlspotter/ocaml-zippy-tutorial-in-japanese/c6aeabc08b6e2289a0e66c5b94a89c6723d88a6a/t/warnings/w41.ml | ocaml | module M = struct
type t = { x : int }
end
module N = struct
type u = { x : int }
end
open M
open N
let x = { x = 20 }
| |
6a471f89f29f66ff62e1990d6f14110614410d51c4835fb50a25dbd419c6cf50 | nakal/xmonad-conf | Ssh.hs | -----------------------------------------------------------------------------
-- |
-- Module : Contrib.Ssh
Copyright : ( C ) 2007
-- License : BSD3
--
-- Maintainer :
-- Stability : unstable
-- Portability : unportable
--
-- A ssh prompt for XMonad
--
-------------------------------------------... | null | https://raw.githubusercontent.com/nakal/xmonad-conf/4e033ca255b75e244e48e69475ba3167effff330/lib/Contrib/Ssh.hs | haskell | ---------------------------------------------------------------------------
|
Module : Contrib.Ssh
License : BSD3
Maintainer :
Stability : unstable
Portability : unportable
A ssh prompt for XMonad
---------------------------------------------------------------------------
* Usage
$usage
$us... | Copyright : ( C ) 2007
module Contrib.Ssh
sshPrompt,
Ssh,
) where
import XMonad
import XMonad.Util.Run
import XMonad.Prompt
import System.Directory
import System.Environment
import Control.Exception as E
import Control.Monad
import Data.Maybe
import Data.List(elemIndex)
econst :: Monad m =... |
fce13153954318471d4c0fa5e4723494ec39d6192569abcc22b9f1a3c75cb4ff | sellout/haskerwaul | Prefix.hs | # language UndecidableSuperClasses #
module Haskerwaul.Order.Prefix
( module Haskerwaul.Order.Prefix
-- * extended modules
, module Haskerwaul.Order.Partial
) where
import Data.Bool (Bool)
import Data.Int (Int, Int8, Int16, Int32, Int64)
import Data.Ratio (Ratio)
import ... | null | https://raw.githubusercontent.com/sellout/haskerwaul/b32ecdb141a5f9cca04ed85dc952028242c160a8/src/Haskerwaul/Order/Prefix.hs | haskell | * extended modules
| [nLab](+order)
= laws
are incomparable to anything.
between -Inf +Inf (e.g., the other approach allows for a
`Haskerwaul.Lattice.Bounded.BoundedLattice` instance). We should
probably provide distinct @newtype@ wrappers so we can offer both.
are incomparable ... | # language UndecidableSuperClasses #
module Haskerwaul.Order.Prefix
( module Haskerwaul.Order.Prefix
, module Haskerwaul.Order.Partial
) where
import Data.Bool (Bool)
import Data.Int (Int, Int8, Int16, Int32, Int64)
import Data.Ratio (Ratio)
import Data.Void (Void)
import... |
9c69dfe78f11c6192574e33862aca9e3ed1843581d9b7dc6c823e2be38bf0de0 | thierry-martinez/metapp | test_utils.ml | [%%metadir "metapp/.metapp.objs/byte/"]
[%%metaload "metapp/metapp.cmxs"]
[%%metapackage "stdcompat"]
[%%metaflag "-open", "Stdcompat"]
let () =
Test_framework.assert_eq Int.equal Format.pp_print_int
[%meta (new Metapp.filter)#expression
[%e (1, 2 [@if false])]] 1
[%%meta (new Metapp.filter)#structure_it... | null | https://raw.githubusercontent.com/thierry-martinez/metapp/f8b200cf21d860edbc47c1842269f1a09d7a29b4/tests/utils/test_utils.ml | ocaml | [%%metadir "metapp/.metapp.objs/byte/"]
[%%metaload "metapp/metapp.cmxs"]
[%%metapackage "stdcompat"]
[%%metaflag "-open", "Stdcompat"]
let () =
Test_framework.assert_eq Int.equal Format.pp_print_int
[%meta (new Metapp.filter)#expression
[%e (1, 2 [@if false])]] 1
[%%meta (new Metapp.filter)#structure_it... | |
0139661c170dcdcfca88aa29aa55503a898c661df4fd12f7d7f2348e12dd1c57 | wrengr/bytestring-trie | Errors.hs | {-# OPTIONS_GHC -Wall -fwarn-tabs #-}
{-# OPTIONS_HADDOCK hide #-}
# LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Safe #-}
#endif
----------------------------------------------------------------
-- ~ 2021.12.14
-- |
Module : Data . Trie . Internal... | null | https://raw.githubusercontent.com/wrengr/bytestring-trie/ec2216d2f560f5e453e65d24ce9cc249fc92d3ec/src/Data/Trie/Internal/Errors.hs | haskell | # OPTIONS_GHC -Wall -fwarn-tabs #
# OPTIONS_HADDOCK hide #
# LANGUAGE Safe #
--------------------------------------------------------------
~ 2021.12.14
|
License : BSD-3-Clause
Maintainer :
Stability : internal
Portability : portable
Internal conveni... | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 701
#endif
Module : Data . Trie . Internal . Errors
Copyright : 2008 - -2021 wren romano
module Data.Trie.Internal.Errors (impossible) where
impossible :: String -> a
impossible fn = error (formatMessage fn)
# INLINE impossible #
formatMessage :: String -... |
453ca2a8820a79de2eb457764cb05352595b884ff50791d4e573307d36e3b0ad | eudoxia0/lucerne | views.lisp | (in-package :cl-user)
(defpackage lucerne.views
(:use :cl :trivial-types :cl-annot)
(:import-from :clack.request
:make-request
:request-method
:script-name
:request-uri)
(:export :not-found
:define-route
:defview
:rou... | null | https://raw.githubusercontent.com/eudoxia0/lucerne/7037f2c20d5bbf7a789bd9fe2e85eb1ed3ef247c/src/views.lisp | lisp | Now, we actually do the dispatching
We have a hit
Not found
Dispatching returns a function that closes over `params`
The config is just a URL
The config is a (<method> <url>) pair
Here, we extract arguments from the params plist into the arguments
defined in the argument list | (in-package :cl-user)
(defpackage lucerne.views
(:use :cl :trivial-types :cl-annot)
(:import-from :clack.request
:make-request
:request-method
:script-name
:request-uri)
(:export :not-found
:define-route
:defview
:rou... |
60cdda91c8cbcd5b811bdff92b0a47149b127b23b464225ec8ac572cf8273979 | metabase/metabase | implicit_joins_test.clj | (ns metabase.query-processor-test.implicit-joins-test
"Tests for joins that are created automatically when an `:fk->` column is present."
(:require
[clj-time.core :as time]
[clojure.test :refer :all]
[metabase.driver :as driver]
[metabase.query-processor :as qp]
[metabase.test :as mt]))
(set! *warn-... | null | https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/test/metabase/query_processor_test/implicit_joins_test.clj | clojure | ID, CITY_ID, CATEGORY_ID
Cities are already alphabetized in the source data which is why CITY_ID is sorted
drop timestamps.
Query should look something like:
SELECT USERS__via__SENDER_ID.NAME AS NAME, count(*) AS count
FROM PUBLIC.MESSAGES
GROUP BY USERS__via__SENDER_ID.NAME
ORDER BY USERS__via__SENDER_ID.NAME ... | (ns metabase.query-processor-test.implicit-joins-test
"Tests for joins that are created automatically when an `:fk->` column is present."
(:require
[clj-time.core :as time]
[clojure.test :refer :all]
[metabase.driver :as driver]
[metabase.query-processor :as qp]
[metabase.test :as mt]))
(set! *warn-... |
a4937e60e14946eb13de1092212a835568fa9cfbe1f8d7c03a73edbb7d5a720c | rumblesan/improviz | If.hs | module Tests.Language.Parser.If
( parserIfTests
)
where
import Test.Framework ( Test
, testGroup
)
import Test.Framework.Providers.HUnit ( testCase )
import Test.HUnit ... | null | https://raw.githubusercontent.com/rumblesan/improviz/90162e6dc7befec34e3b7b18b8aca275f26cd505/test/Tests/Language/Parser/If.hs | haskell | module Tests.Language.Parser.If
( parserIfTests
)
where
import Test.Framework ( Test
, testGroup
)
import Test.Framework.Providers.HUnit ( testCase )
import Test.HUnit ... | |
764b8ece48ebc751d05d601a6fa6615307d9aa17815a2f8ddc572f8ba62a9b1d | bet365/soap | soap_client_util.erl | %%
%% %CopyrightBegin%
%%
Copyright Hillside Technology Ltd. 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by ap... | null | https://raw.githubusercontent.com/bet365/soap/856b5c418d8d40a6b5bcbbe3fd390c6a0b8d4f18/src/soap_client_util.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Hillside Technology Ltd. 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(soap_client_util).
-include("soap.hrl").
-export([call/5]).
-export([call/6]).
-type prefix() :: st... |
633611208063a1cf6a5ba6b298eb3d2ead08a474e22cc1b9015e6f5684c6ea59 | jwvg0425/HaskellStudy | solution_1.hs | yesNo :: Bool -> String
yesNo True = "Yes"
yesNo False = "No"
trueman :: (Num a) => [Bool] -> a
trueman [] = 0
trueman (True:xs) = 1 + trueman xs
trueman (_:xs) = trueman xs
listToPairs :: [a] -> [(a,a)]
listToPairs [] = []
listToPairs [a] = []
listToPairs (x:y:zs) = (x,y):listToPairs zs | null | https://raw.githubusercontent.com/jwvg0425/HaskellStudy/8e8b90d0e703e54ca06c296b6989940e13dc26ac/04%20-%20syntax%20in%20functions/solution_1.hs | haskell | yesNo :: Bool -> String
yesNo True = "Yes"
yesNo False = "No"
trueman :: (Num a) => [Bool] -> a
trueman [] = 0
trueman (True:xs) = 1 + trueman xs
trueman (_:xs) = trueman xs
listToPairs :: [a] -> [(a,a)]
listToPairs [] = []
listToPairs [a] = []
listToPairs (x:y:zs) = (x,y):listToPairs zs | |
7937eba520ed6614675cf526dc6ef787c159ba2c75d135e96cf2be5d36a68b67 | ThoughtWorksInc/stonecutter | ring.clj | (ns stonecutter.util.ring
(:require [stonecutter.session :as session]))
(defn complete-uri-of [request]
(str (:uri request)
(when (:query-string request) "?")
(:query-string request)))
(defn preserve-session [response request]
(-> response
(session/replace-session-with (:session reques... | null | https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/src/stonecutter/util/ring.clj | clojure | (ns stonecutter.util.ring
(:require [stonecutter.session :as session]))
(defn complete-uri-of [request]
(str (:uri request)
(when (:query-string request) "?")
(:query-string request)))
(defn preserve-session [response request]
(-> response
(session/replace-session-with (:session reques... | |
948c0216fb9e24b784bfa627400de7798dff05b17ac965253f02560168513a8c | ekmett/lens | Internal.hs | -----------------------------------------------------------------------------
-- |
-- Module : Control.Lens.Internal
Copyright : ( C ) 2012 - 16
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
-- Stability : experimental
-- Portability : Rank2Types
--
-- These are some of... | null | https://raw.githubusercontent.com/ekmett/lens/a26281a49e85af46821964d8f7455b82cfd4251d/src/Control/Lens/Internal.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Lens.Internal
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : Rank2Types
These are some of the explicit 'Functor' instances that leak into the
module directly for most ... | Copyright : ( C ) 2012 - 16
Maintainer : < >
type signatures of @Control . Lens@. You should n't need to import this
module Control.Lens.Internal
( module Control.Lens.Internal.Bazaar
, module Control.Lens.Internal.Context
, module Control.Lens.Internal.Fold
, module Control.Lens.Internal.Ge... |
354222d550525164c1243cc9c0737d6570f49409272d98353162e3d80787e23a | ejgallego/coq-serapi | ser_declaremods.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * INRIA , CNRS and contributors - Copyright 1999 - 2018
(* <O___,, * (see CREDITS file for the list of authors) *)
\VV/ * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/serlib/ser_declaremods.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
<O___,, * (see CREDITS file for the list of authors)
// * This file is distributed under the terms of the
* (see LICENSE file for... | v * INRIA , CNRS and contributors - Copyright 1999 - 2018
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser General Public License Version 2.1
Copyright 2016 - 2018 MINES ParisT... |
17b5b24943421be227c3c73d0f975cea39865ed545c21fed429bd7d4c09dabf8 | lambe-lang/mitch | normaliser.mli | val run : Mitch_ir.Objcode.t list -> Mitch_ir.Objcode.t list
| null | https://raw.githubusercontent.com/lambe-lang/mitch/2c47f6627c3a219c31afd078836e9e7be3e26719/lib/mitch/system/s05_normaliser/normaliser.mli | ocaml | val run : Mitch_ir.Objcode.t list -> Mitch_ir.Objcode.t list
| |
90109d2e24742479d1f59ef84b27d8ef90e518cccb9f426c67710160cbbd9b27 | patricoferris/ocaml-multicore-monorepo | eio_linux.mli | * Eio backend using Linux 's io_uring .
You will normally not use this module directly .
Instead , use { ! Eio_main.run } to start an event loop and then use the API in the { ! Eio } module .
However , it is possible to use this module directly if you only want to support recent versions of Linux .
... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/624b3293ee41e83736fe7ac3a79f810c2b70f68b/duniverse/eio/lib_eio_linux/eio_linux.mli | ocaml | * Wrap [Unix.file_descr] to track whether it has been closed.
* Either a [Unix.file_descr] or nothing (if closed) .
* [is_open t] is [true] if {!close} hasn't been called yet.
* [close t] closes [t].
@raise Invalid_arg if [t] is already closed.
* {1 Eio API}
* [pipe sw] is a source-sink pair [(r, w)], where d... | * Eio backend using Linux 's io_uring .
You will normally not use this module directly .
Instead , use { ! Eio_main.run } to start an event loop and then use the API in the { ! Eio } module .
However , it is possible to use this module directly if you only want to support recent versions of Linux .
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.