_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 |
|---|---|---|---|---|---|---|---|---|
0b84058e38272bfe47964069c24839a4a9594731ad793f5c5ef3f2b53e3c2a5b | let-def/lrgrep | coBitSet.mli | (******************************************************************************)
(* *)
Code is taken from Menhir 's CompressedBitSet .
(* ... | null | https://raw.githubusercontent.com/let-def/lrgrep/241c98ff679baa714538c4d1985bb574906d84e2/attic/coBitSet.mli | ocaml | ****************************************************************************
... | Code is taken from Menhir 's CompressedBitSet .
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is d... |
94fafb5df95343917346b3f70eaf8e5438d6eb585ce42ac1cdd8485752846612 | michaxm/task-distribution | FileUtil.hs | module Control.Distributed.Task.Util.FileUtil where
import Data.List (intersperse)
import Data.List.Split (splitOn)
getFileNamePart :: FilePath -> String
getFileNamePart = snd . splitBasePath
--let parts = splitOn "/" path in if null parts then "" else parts !! (length parts -1)
splitBasePath :: FilePath -> (FileP... | null | https://raw.githubusercontent.com/michaxm/task-distribution/d0dee6a661390b7d1279389fa8c7b711309dab6a/src/Control/Distributed/Task/Util/FileUtil.hs | haskell | let parts = splitOn "/" path in if null parts then "" else parts !! (length parts -1) | module Control.Distributed.Task.Util.FileUtil where
import Data.List (intersperse)
import Data.List.Split (splitOn)
getFileNamePart :: FilePath -> String
getFileNamePart = snd . splitBasePath
splitBasePath :: FilePath -> (FilePath, String)
splitBasePath path = let parts = splitOn "/" path in
if null parts
then (... |
00942522ed02e90a858e942b2d9799268efe0150e9b36945277590eaff53330a | racket/raco-cross | cross.rkt | #lang racket/base
(require "private/cross/download.rkt"
"private/cross/setup.rkt"
"private/cross/run.rkt")
(provide download-distribution
setup-distribution
run-cross-racket)
| null | https://raw.githubusercontent.com/racket/raco-cross/ee67bfa4d37cde8b7c3fdb57f733d99298b08ee2/raco-cross-lib/cross.rkt | racket | #lang racket/base
(require "private/cross/download.rkt"
"private/cross/setup.rkt"
"private/cross/run.rkt")
(provide download-distribution
setup-distribution
run-cross-racket)
| |
668b7c2c0ef7d4f2db6c604e9c60872e3f7894a23d8b093ed9a0e1f5737c2b94 | teamwalnut/graphql-ppx | option.ml | exception Option_unwrap_error of string
let map f = function None -> None | Some v -> Some (f v)
let flat_map f = function None -> None | Some v -> f v
let unsafe_unwrap ~reason = function
| None -> raise (Option_unwrap_error reason)
| Some v -> v
let get_or_else default = function None -> default | Some v -> v
... | null | https://raw.githubusercontent.com/teamwalnut/graphql-ppx/8276452ebe8d89a748b6b267afc94161650ab620/src/graphql_compiler/option.ml | ocaml | exception Option_unwrap_error of string
let map f = function None -> None | Some v -> Some (f v)
let flat_map f = function None -> None | Some v -> f v
let unsafe_unwrap ~reason = function
| None -> raise (Option_unwrap_error reason)
| Some v -> v
let get_or_else default = function None -> default | Some v -> v
... | |
13c14187cefe96231cd9d4f6d643248f94414ade52acad21acbfa297024c9c51 | kadena-io/chainweb-node | Singletons.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamil... | null | https://raw.githubusercontent.com/kadena-io/chainweb-node/cae7591b565a0605b61754dea701dfdd952e15a1/src/Data/Singletons.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE TypeInType #
|
Module: Data.Singletons
Stability: experimental
This module contains a selection of the definitions from the module
package]().
The copyright and license of the singletons package app... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeFamilyDependencies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# LANGUAGE ViewP... |
a86fe1951df47a0093326974866fba9bee646ac1085a2e5c2c3981453e96f208 | clojure-interop/google-cloud-clients | TranslateOptions$Builder.clj | (ns com.google.cloud.translate.TranslateOptions$Builder
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.translate TranslateOptions$Builder]))
(defn get-credentials
"Returns the authentication credentials.
returns: `com.google.auth.Credentials`"
(^com.google.auth.Credentials [^Tra... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.translate/src/com/google/cloud/translate/TranslateOptions%24Builder.clj | clojure | (ns com.google.cloud.translate.TranslateOptions$Builder
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.translate TranslateOptions$Builder]))
(defn get-credentials
"Returns the authentication credentials.
returns: `com.google.auth.Credentials`"
(^com.google.auth.Credentials [^Tra... | |
3c60b5683ab01fb5dfd2fcdcf17a1a587524d0502513610cb5623e88999c1e55 | lthms/spatial-sway | main.ml | open Sway_ipc_types
exception Sway_exited
external reraise : exn -> 'a = "%reraise"
let workspace_handle (ev : Event.workspace_event) state =
match ev.change with
| Focus ->
let state =
match ev.current.name with
| Some workspace -> State.set_current_workspace workspace state
| None... | null | https://raw.githubusercontent.com/lthms/spatial-sway/2f194eca2767e3cf736caf6e76c5416d57be9905/bin/spatial/main.ml | ocaml | TODO: Be more configurable about that | open Sway_ipc_types
exception Sway_exited
external reraise : exn -> 'a = "%reraise"
let workspace_handle (ev : Event.workspace_event) state =
match ev.change with
| Focus ->
let state =
match ev.current.name with
| Some workspace -> State.set_current_workspace workspace state
| None... |
e023dc6e7d16e5c9767501d891122acf70ebf4b7b4782e86bc3a28b5c4d70694 | scicloj/wadogo | interpolated_test.clj | (ns wadogo.scale.interpolated-test
(:require [wadogo.scale :as s]
[clojure.test :refer [deftest testing is]]))
(deftest linear-interpolation
(let [l (s/scale :interpolated {:domain [4 2 1]
:range [1 2 4]})]
(testing "descending domain"
(is (= (l 1.5) 3.0))
... | null | https://raw.githubusercontent.com/scicloj/wadogo/bc3d0dcfd1979f29fed31adcd5e6285e3702d030/test/wadogo/scale/interpolated_test.clj | clojure | (ns wadogo.scale.interpolated-test
(:require [wadogo.scale :as s]
[clojure.test :refer [deftest testing is]]))
(deftest linear-interpolation
(let [l (s/scale :interpolated {:domain [4 2 1]
:range [1 2 4]})]
(testing "descending domain"
(is (= (l 1.5) 3.0))
... | |
ca94acf55c75685d05a2afb91653f98f8029a9277204ae48f3729e409008fb8c | emqx/emqttb | emqttb_scenario_sub.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2022 EMQ Technologies Co. , Ltd. 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 Lic... | null | https://raw.githubusercontent.com/emqx/emqttb/bf761d7c530d10cb8f68016f3f5537d344b70536/src/scenarios/emqttb_scenario_sub.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2022 EMQ Technologies Co. , Ltd. 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(emqttb_scenario_sub).
-behavior(emqttb_scenario).
-export([ name/0
, model/0
, ... |
7f1ec79d78efcc8b8b63d6eb3844d3403629108968d49538213f77dc31623143 | facebook/pyre-check | modelVerifier.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/8b7feecbcc46939f580c5299233874047cd34a14/source/interprocedural_analyses/taint/modelVerifier.ml | ocaml | Prefer earlier definitions.
Find a method definition matching the given predicate.
Resolve global symbols, ignoring decorators.
Resolve undecorated functions.
Resolve undecorated methods.
TODO(T65923817): Eliminate the need of creating a dummy context here
FIXME: We are relying on the fact that nonexistent... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
be66be4b20cb3deaa1e26388a553e42a370f264f88257f59a697383379b459ea | janestreet/universe | src_pos.mli | (** source positions, both relative and absolute *)
module Relative : sig
type t =
{ row : int
; col : int
}
val sexp_of_t : t -> Type.t
val zero : t
val add : t -> t -> t
val sub : t -> t -> t
end
module Absolute : sig
type t =
{ row : int
; col : int
}
val sexp_of_t : t -> Ty... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/sexplib/src/src_pos.mli | ocaml | * source positions, both relative and absolute |
module Relative : sig
type t =
{ row : int
; col : int
}
val sexp_of_t : t -> Type.t
val zero : t
val add : t -> t -> t
val sub : t -> t -> t
end
module Absolute : sig
type t =
{ row : int
; col : int
}
val sexp_of_t : t -> Type.t
first row , first column
val of_lexing : L... |
a32f296478ed8b7fe0ba2ca31b94d015dfd29fa932ce58c32703cd9895132bed | district0x/cljs-ipfs-api | dht.cljs | (ns cljs-ipfs-api.dht
(:require [taoensso.timbre :as timbre :refer-macros [log
trace
debug
info
wa... | null | https://raw.githubusercontent.com/district0x/cljs-ipfs-api/01c5e6943d3cc5e0e54d436a796e98dc8145b0ba/src/cljs_ipfs_api/dht.cljs | clojure | (ns cljs-ipfs-api.dht
(:require [taoensso.timbre :as timbre :refer-macros [log
trace
debug
info
wa... | |
839b618fc51bce14edff71b3aa066f12aba20698ba6c44a32adaa25a1a47a117 | avsm/mirage-duniverse | std_internal.mli | (** type-safe runtime type introspection *)
(** runtime type representations *)
module rec Typerep : sig
type _ t =
| Int : int t
| Int32 : int32 t
| Int64 : int64 t
| Nativeint : nativeint t
| Char : char t
| Float : float t
| String : string t
| Bytes : bytes ... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/typerep/lib/std_internal.mli | ocaml | * type-safe runtime type introspection
* runtime type representations
* The [Named] constructor both allows for custom implementations of generics
based on name and provides a way to represent recursive types, the lazy
part dealing with cycles
basic
variant with no argument
nested |
module rec Typerep : sig
type _ t =
| Int : int t
| Int32 : int32 t
| Int64 : int64 t
| Nativeint : nativeint t
| Char : char t
| Float : float t
| String : string t
| Bytes : bytes t
| Bool : bool t
| Unit : unit t
| Option : 'a t -> 'a op... |
1ee72bc0d941b2564b27cff9583fe3fff7b1ba3cf9f2cabf7ba339d2f92af99b | manuel-serrano/bigloo | expdrecord.scm | ;*=====================================================================*/
* ... /prgm / project / bigloo / / runtime / Eval / expdrecord.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : T... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/runtime/Eval/expdrecord.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Source documentation: ... | * ... /prgm / project / bigloo / / runtime / Eval / expdrecord.scm * /
* Author : * /
* Creation : Thu Mar 30 08:02:33 2000 * /
* Last change : Sun Aug 25 09:15:44 2019 ( serrano ) * /
* SRFI-9 Re... |
83eadeaa3029bac93ada5d4d1809c241b3c3665ac614c28397efc8d4df339611 | baffalop/aoc22-haskell | Main.hs | # LANGUAGE ExistentialQuantification #
module Main (main) where
import qualified Options.Applicative as Opt
import qualified Advent
import Advent (Day, mkDay, dayInt)
import Data.Text (Text, pack)
import qualified Data.Text.IO as TIO
import Text.Read (readMaybe)
import Data.Either.Extra (maybeToEither)
import Control... | null | https://raw.githubusercontent.com/baffalop/aoc22-haskell/8121f915e7e59a8dd64bcfb80a0ad179e66ab932/src/Main.hs | haskell | # LANGUAGE ExistentialQuantification #
module Main (main) where
import qualified Options.Applicative as Opt
import qualified Advent
import Advent (Day, mkDay, dayInt)
import Data.Text (Text, pack)
import qualified Data.Text.IO as TIO
import Text.Read (readMaybe)
import Data.Either.Extra (maybeToEither)
import Control... | |
1e92484a4ddae1d81839e70ee928b0681db0746ed5b3abba4c804ca41dfb4756 | MLstate/opalang | bslTypesGeneration.ml |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/libbsl/bslTypesGeneration.ml | ocaml | wait for refactoring
dependencies
shorthand
type alias for clarty
===
Error within a context of type [t]
all external and record types from bsl should be named
Support for utilizing values via the server lib
QmlAst.const_ty
Rest of bsl types
fresh type variable (string) for any same abstract type
... |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... |
fb1569776fbc42fac31255f4950b42c1ce9aeeeff55d7d1dbc20985c5c4e4810 | jordanthayer/ocaml-search | solitaire_chess_main.ml | (**
Builds executables for solitaire chess.
*)
let run_alg get_len alg b limit =
(** writes results to stdout. assumes that header stuff like problem
attrs are already written. This is the main function for the stand-alone
solver. *)
let do_run = alg b limit in
let (s, e, g, p, m, d), t = Wrsys.wi... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/solitaire_chess/solitaire_chess_main.ml | ocaml | *
Builds executables for solitaire chess.
* writes results to stdout. assumes that header stuff like problem
attrs are already written. This is the main function for the stand-alone
solver.
* Looks at command line. returns alg_func (which is world -> node
option * int * int) and list of string pa... |
let run_alg get_len alg b limit =
let do_run = alg b limit in
let (s, e, g, p, m, d), t = Wrsys.with_time do_run in
(match s with
None -> (Datafile.write_pairs stdout ["found solution", "no"];)
| Some (p,f) -> Datafile.write_pairs stdout ["found solution", "yes"]);
let cost, len = (match s with
... |
24829b59aeff19f822d1a23f13e599c8e6f9942a3531cf53ec18e889cb8f69e8 | mars0i/free | example_4.clj | This software is copyright 2016 by , and is distributed
under the Gnu General Public License version 3.0 as specified in the
;; the file LICENSE.
(ns free.example-4
(:require [free.level :as lvl]
will be clj or cljs depending on dialect
;; Generative function phi^2:
(defn gen [phi] (* phi phi)) ;; or: (lvl... | null | https://raw.githubusercontent.com/mars0i/free/fe0fdc1c0bf1866cb07b4558a009a829f8d6ba23/src/clj/general/free/example_4.clj | clojure | the file LICENSE.
Generative function phi^2:
or: (lvl/m-square phi)
i.e. initially pass value of gen(phi) through unchanged
next-bottom function
all this atom stuff is "bad", but is really just implementing a loop while allowing the function to be arg-less
epsilon
it will immediately replaced when next-bottom i... | This software is copyright 2016 by , and is distributed
under the Gnu General Public License version 3.0 as specified in the
(ns free.example-4
(:require [free.level :as lvl]
will be clj or cljs depending on dialect
or : ( ar / m * phi 2 ) )
(def change-ticks$ (atom (range 20000 1000000000 20000)))
(def... |
60489a115375a0eafd41cf914dc3ccc2a172c8f0de46c1055d58745f6a0dd15e | AshleyMoni/QuadTree | Internal.hs | {-# OPTIONS_HADDOCK show-extensions #-}
{-# LANGUAGE Safe #-}
{-# LANGUAGE Rank2Types #-}
# LANGUAGE ScopedTypeVariables #
|
Module : Data . QuadTree . Internal
Description : Internals for the Data . QuadTree library .
Copyright : ( c ) , 2015
License : : < >
Stability : Stable
... | null | https://raw.githubusercontent.com/AshleyMoni/QuadTree/0ff9c30ad2f047172f75b728374de8c1f82155f3/Data/QuadTree/Internal.hs | haskell | # OPTIONS_HADDOCK show-extensions #
# LANGUAGE Safe #
# LANGUAGE Rank2Types #
-- Structures:
|Tuple corresponds to (X, Y) co-ordinates.
|The eponymous data type.
'QuadTree' is itself a wrapper around an internal tree structure
along with spatial metadata about the boundaries and depth of the
2D area it maps to.
... |
# LANGUAGE ScopedTypeVariables #
|
Module : Data . QuadTree . Internal
Description : Internals for the Data . QuadTree library .
Copyright : ( c ) , 2015
License : : < >
Stability : Stable
The QuadTree . Internals library is a separately encapsulated subset of
the QuadTree l... |
762d1d2aab522bf13e9c0205817051cfbe2ef1fe5ac8109358bee40645eb48a2 | skynet-gh/skylobby | channel.clj | (ns skylobby.fx.channel
(:require
[cljfx.api :as fx]
[clojure.string :as string]
[skylobby.chat :as chat]
[skylobby.fx :refer [monospace-font-family]]
[skylobby.fx.ext :refer [
ext-focused-by-default
ext-recreate-on-key-changed
... | null | https://raw.githubusercontent.com/skynet-gh/skylobby/e6933e8f8a927c753815aad3fd95002d56aa2810/src/clj/skylobby/fx/channel.clj | clojure | use white for black since dark theme "rgb(0,0,0)"
else
TODO IRC colors | (ns skylobby.fx.channel
(:require
[cljfx.api :as fx]
[clojure.string :as string]
[skylobby.chat :as chat]
[skylobby.fx :refer [monospace-font-family]]
[skylobby.fx.ext :refer [
ext-focused-by-default
ext-recreate-on-key-changed
... |
0516e047688dff3c4e3cdca27e86d06670996323370b5b53ef3dbb45061aa27a | wireapp/wire-server | UpdateClient_user.hs | # LANGUAGE OverloadedLists #
-- 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 , e... | null | https://raw.githubusercontent.com/wireapp/wire-server/c428355b7683b7b7722ea544eba314fc843ad8fa/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/UpdateClient_user.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... | # LANGUAGE OverloadedLists #
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
mo... |
9a206bc3cc6a9dfd9200dd064ae4ebb0d3746fb1202a64f55cbe632ceb80ae23 | project-oak/hafnium-verification | registerCheckers.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/checkers/registerCheckers.mli | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
40197d52dd340678a44d60091ea9c63b607999bf63db36c0bcc21e2335b6629d | nuprl/gradual-typing-performance | stream-types.rkt | #lang typed/racket/base
(require/typed/provide racket/stream
[stream-length (-> (Sequenceof String) Index)]
[stream->list (-> (Sequenceof String) (Listof String))]
[stream-filter (-> (-> String Boolean) (Sequenceof String) (Sequenceof String))]
[stream-map (-> (-> Index String) (Sequenceof Index) (Sequenceof S... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/paper/popl-2016/scripts/stream-types.rkt | racket | #lang typed/racket/base
(require/typed/provide racket/stream
[stream-length (-> (Sequenceof String) Index)]
[stream->list (-> (Sequenceof String) (Listof String))]
[stream-filter (-> (-> String Boolean) (Sequenceof String) (Sequenceof String))]
[stream-map (-> (-> Index String) (Sequenceof Index) (Sequenceof S... | |
d890813c0c38d835f2564f4e70e1e5ab15d8945ef6a7f594b318eeb16399161f | clojure-emacs/clj-suitable | utils.clj | (ns suitable.utils
(:require
[cljs.env]
[cljs.repl]))
(defn wrapped-cljs-repl-eval
"cljs-eval-fn for `suitable.cljs-completions` that can be used when a
repl-env and compiler env are accessible, e.g. when running a normal repl."
[repl-env compiler-env]
(fn [_ns code]
(try
{:value (->> code
... | null | https://raw.githubusercontent.com/clojure-emacs/clj-suitable/ced9e834666510154de794821ecd9f2e680af2c8/src/main/suitable/utils.clj | clojure | (ns suitable.utils
(:require
[cljs.env]
[cljs.repl]))
(defn wrapped-cljs-repl-eval
"cljs-eval-fn for `suitable.cljs-completions` that can be used when a
repl-env and compiler env are accessible, e.g. when running a normal repl."
[repl-env compiler-env]
(fn [_ns code]
(try
{:value (->> code
... | |
12626fbbb06e43f2e916e9e98d1d871bded26a4aae221e559b87722bf1e56448 | garazdawi/cth_tools | test2_SUITE.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011 , Erlang Solutions Ltd.
%%% @doc
%%%
%%% @end
Created : 5 Mar 2011 by < >
%%%-------------------------------------------------------------------
-module(test2_SUITE).
-compile(export_all).
-include_lib("common... | null | https://raw.githubusercontent.com/garazdawi/cth_tools/658166d70b9c0f7d2e16dba44c1e0de93300f08e/test/test2_SUITE.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
--------------------------------------------------------------------
Info = [tuple()]
--------------------------------------------------------------------
---------------... | @author < >
( C ) 2011 , Erlang Solutions Ltd.
Created : 5 Mar 2011 by < >
-module(test2_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
@spec suite ( ) - > Info
suite() ->
[{ct_hooks,[cth_junit]},{timetrap,{seconds,30}}].
@spec init_per_suite(Config0 ) - >
Con... |
2c143bfcb66fd9f1195ab4c2956b335bd04235a9f75a3b00f3c7bfa228ab6d9e | ret/specifica | ParserState.hs | module Language.TLAPlus.ParserState
( TLAParser
, PState, mkState, pushIndent, popIndent, peekIndent
, setRole, getRole, setInteraction, getInteraction ) where
import Data.Generics
import Text.ParserCombinators.Parsec
data PState = PState
{ indent :: [Int]
FIXME , is for australis / short ... | null | https://raw.githubusercontent.com/ret/specifica/6d08d7e65ff58419c18ef749781bbda65fbef89b/tlaplus/src/Language/TLAPlus/ParserState.hs | haskell | module Language.TLAPlus.ParserState
( TLAParser
, PState, mkState, pushIndent, popIndent, peekIndent
, setRole, getRole, setInteraction, getInteraction ) where
import Data.Generics
import Text.ParserCombinators.Parsec
data PState = PState
{ indent :: [Int]
FIXME , is for australis / short ... | |
8b9c8696c850149ea5a52764054b9415fda961342f649f831050d2905ed26015 | dixel/kafkus | core.cljs | (ns kafkus.core
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [kafkus.config :refer [connected?
count-rate
default-limit
default-rate
get-config
... | null | https://raw.githubusercontent.com/dixel/kafkus/27d8f2a809f07a98645fffa9e3d2b612f7dd1991/src/cljs/kafkus/core.cljs | clojure | (ns kafkus.core
(:require-macros [cljs.core.async.macros :refer [go go-loop]])
(:require [kafkus.config :refer [connected?
count-rate
default-limit
default-rate
get-config
... | |
0aa293358c92ab23dc274a4e8d2fd744195ec6e5a95c873976567e56a9cf5260 | NorfairKing/really-safe-money | MultiAmount.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
{-# OPTIONS_GHC -Wno-duplicate-exports -Wno-dodgy-exports #-}
-- === Importing this module
--
-- This module is designed to be imported as follows:
--
-- @
import Money . ( MultiAmount )
import qualified Money . MultiAmount as MultiAmount
-- @
module ... | null | https://raw.githubusercontent.com/NorfairKing/really-safe-money/2a578865958c7b35d14ebae604cb02c7c81c26dd/really-safe-money/src/Money/MultiAmount.hs | haskell | # LANGUAGE DeriveDataTypeable #
# OPTIONS_GHC -Wno-duplicate-exports -Wno-dodgy-exports #
=== Importing this module
This module is designed to be imported as follows:
@
@
| A type for a combination of amounts of different currencies
| No money of any currency | # LANGUAGE DeriveGeneric #
import Money . ( MultiAmount )
import qualified Money . MultiAmount as MultiAmount
module Money.MultiAmount
( MultiAmount (..),
fromAmount,
zero,
add,
)
where
import Control.DeepSeq
import Data.Data
import Data.Map (Map)
import qualified Data.Map as M
import Data.Validi... |
f0d2dc6a4ae1bb5a2c78b80914c4b99ea129c87300e971dcfd0afa37e16dd514 | google/proto-lens | Encoding.hs | # LANGUAGE CPP #
module Data.ProtoLens.Encoding (
encodeMessage,
buildMessage,
decodeMessage,
parseMessage,
decodeMessageOrDie,
-- ** Delimited messages
buildMessageDelimited,
parseMessageDelimited,
decodeMessageDelimitedH,
) where
import System.IO (Handle)
import Data.ProtoLen... | null | https://raw.githubusercontent.com/google/proto-lens/081815877430afc1db669ca5e4edde1558b5fd9d/proto-lens/src/Data/ProtoLens/Encoding.hs | haskell | ** Delimited messages
| Decode a message from its wire format. Returns 'Left' if the decoding
fails.
| Decode a message from its wire format. Throws an error if the decoding
fails.
as part of a 'Builder'.
This can be used to build up streams of messages in the size-delimited
format expected by some protocols... | # LANGUAGE CPP #
module Data.ProtoLens.Encoding (
encodeMessage,
buildMessage,
decodeMessage,
parseMessage,
decodeMessageOrDie,
buildMessageDelimited,
parseMessageDelimited,
decodeMessageDelimitedH,
) where
import System.IO (Handle)
import Data.ProtoLens.Message (Message(..))
impor... |
1b86ce0b7c08adfabd715745485a839a8975c55e9002945eb749d586193752df | EDToaster/CSC324-A2-TestingSuite | testTryCatchSimple.rkt | Simple try catch , should return 42
(try (raise "err") "err" 42) | null | https://raw.githubusercontent.com/EDToaster/CSC324-A2-TestingSuite/f07cbd01587a46c61aac29c52a6804864a4eb77b/tests/testTryCatchSimple.rkt | racket | Simple try catch , should return 42
(try (raise "err") "err" 42) | |
4048f828e9425ce0d709184b43bb3d39c5c06bde39eb0903af3e9eb59d11e445 | alexandergunnarson/quantum | convert.cljc | (ns quantum.test.media.imaging.convert
(:require [quantum.media.imaging.convert :as ns]))
(defn test:convert!
([{:keys [from from-type to to-type] :as opts}])) | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/test/quantum/test/media/imaging/convert.cljc | clojure | (ns quantum.test.media.imaging.convert
(:require [quantum.media.imaging.convert :as ns]))
(defn test:convert!
([{:keys [from from-type to to-type] :as opts}])) | |
49e692889b2cbb845b41bde63ca47e15f7f621e3c7a0dd64bdf7f109860880c0 | easyuc/EasyUC | ecScope.ml | A modification of src / ecScope.ml of the EasyCrypt distribution
See " UC DSL " for changes
See "UC DSL" for changes *)
(* -------------------------------------------------------------------- *)
open EcUtils
open EcMaps
open EcSymbols
open EcLocation
open EcPath
open EcParsetree
open EcTypes
open EcDecl
op... | null | https://raw.githubusercontent.com/easyuc/EasyUC/67a983a7263ee8234452b9c157c4cb4f3d5f7b26/uc-dsl/ucdsl-proj/src/ecScope.ml | ocaml | --------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
-----------------------------------... | A modification of src / ecScope.ml of the EasyCrypt distribution
See " UC DSL " for changes
See "UC DSL" for changes *)
open EcUtils
open EcMaps
open EcSymbols
open EcLocation
open EcPath
open EcParsetree
open EcTypes
open EcDecl
open EcModules
open EcTyping
open EcHiInductive
open EcBigInt.Notations
modu... |
9ee7ffb455f4e3549bd3d6376c4d8d9b44ff45dfdf5c7ddb7e648cf4abe073d0 | returntocorp/semgrep | prolog_code.ml |
*
* Copyright ( C ) 2014 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file licens... | null | https://raw.githubusercontent.com/returntocorp/semgrep/855abad9ada6ea5fd72d437fd69ff2e5fa42c1f1/libs/graph_code/prolog_code.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
* For more information look at h_program-lang/prolog_code.pl
* and its many predicates.
*****************************************************************... |
*
* Copyright ( C ) 2014 Facebook
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file licens... |
d5f51fa0c5ad2f05c34217be7c89b94da0961ff84bedeb0273c4a68306de2a09 | tmattio/inquire | select.ml | let movies =
[ "Star Wars: The Rise of Skywalker"
; "Solo: A Star Wars Story"
; "Star Wars: The Last Jedi"
; "Rogue One: A Star Wars Story"
; "Star Wars: The Force Awakens"
]
let () =
let movie =
Inquire.select "What's your favorite movie?" ~options:movies ~default:2
in
Printf.printf "Indeed, %S ... | null | https://raw.githubusercontent.com/tmattio/inquire/f5bb64ab8d9ed8987c8e529007cf380ab67fd9fd/example/select.ml | ocaml | let movies =
[ "Star Wars: The Rise of Skywalker"
; "Solo: A Star Wars Story"
; "Star Wars: The Last Jedi"
; "Rogue One: A Star Wars Story"
; "Star Wars: The Force Awakens"
]
let () =
let movie =
Inquire.select "What's your favorite movie?" ~options:movies ~default:2
in
Printf.printf "Indeed, %S ... | |
c576ecfb213227a0f2818f7c31efc38f51ec73fa81503fa33920bb8491520649 | MisakaCenter/RayTracer.ml | World.ml | open Core
open Hittable
open Hittable_list
open Utils
open Vec
open Sphere
open Float
open Texture
open Aarect
open Box
(* World *)
let random_scene =
let lst = new_pointer (new hittable_list [||]) in
let checker =
new checker_texture (new solid_color (new vec3 [| 0.2; 0.3; 0.1 |])) (new solid_color (new vec3... | null | https://raw.githubusercontent.com/MisakaCenter/RayTracer.ml/07bacba1ae3f46e1055465a7b79af5cfbf5d2010/lib/World.ml | ocaml | World
diffuse
metal
glass
glass through
diffuse
metal
glass
glass through | open Core
open Hittable
open Hittable_list
open Utils
open Vec
open Sphere
open Float
open Texture
open Aarect
open Box
let random_scene =
let lst = new_pointer (new hittable_list [||]) in
let checker =
new checker_texture (new solid_color (new vec3 [| 0.2; 0.3; 0.1 |])) (new solid_color (new vec3 [| 0.9; 0.9... |
9d0e904f4f320c9bffb38a42cc58dd39ceff80c135f908f85e61bfd18aafc7aa | herbelin/coq-hh | command.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/toplevel/command.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Commands of the interface
3a| Eli... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Util
open Flags
... |
db152d8f455bdc6734f301d60d2b68ffc3e59cf468bfb2117dc4879c22ffd8f0 | MastodonC/witan.ui | viz.clj | (ns witan.ui.style.components.viz
(:require [garden.units :refer [px em percent]]
[witan.ui.style.colour :as colour]
[witan.ui.style.values :as values]))
(def style [[:#viz
{:position :absolute
:top (px 60)
:left (px 60)
:right (px 10)
... | null | https://raw.githubusercontent.com/MastodonC/witan.ui/5ea6baaff52824ac61737911dd2c11b451157bad/src/styles/witan/ui/style/components/viz.clj | clojure | (ns witan.ui.style.components.viz
(:require [garden.units :refer [px em percent]]
[witan.ui.style.colour :as colour]
[witan.ui.style.values :as values]))
(def style [[:#viz
{:position :absolute
:top (px 60)
:left (px 60)
:right (px 10)
... | |
5ac83ed2335b3a67bd007c66f9f768af2ace25b3fb9fe1f37d4d110cc51c3381 | plum-umd/fundamentals | los.rkt | #lang class/0
A implements :
;; - length : -> Number
;; Compute the length of this list of strings
- map : [ String - > String ] - >
;; Apply the given function to each element of this list of strings
A ( new empty - los% ) implements
(define-class empty-los%
;; length : -> Number
;; Compute the leng... | null | https://raw.githubusercontent.com/plum-umd/fundamentals/eb01ac528d42855be53649991a17d19c025a97ad/2/www/lectures/4/los.rkt | racket | - length : -> Number
Compute the length of this list of strings
Apply the given function to each element of this list of strings
length : -> Number
Compute the length of this empty list of strings
Apply the given function to each element of this empty list of strings
cons-los-template : -> ???
String
???
... | #lang class/0
A implements :
- map : [ String - > String ] - >
A ( new empty - los% ) implements
(define-class empty-los%
(check-expect (send (new empty-los%) length) 0)
(define (length) 0)
map : [ String - > String ] - >
(check-expect (send (new empty-los%) map double) (new empty-los%))
(define ... |
5c74e0cc3253e63e31934771e2bb7ddb41b5fdfa3d39ba4aa616931a1aca1617 | MichaelXavier/Angel | ConfigSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Angel.ConfigSpec (spec) where
import Angel.Data hiding (spec, Spec)
import Angel.Config
import Control.Exception.Base
import Data.Configurator.Types (Value(..))
import qualified Data.HashMap.Lazy as HM
import SpecHelper
spec :: TestTree
spec = testGroup "Angel.Config"
[
... | null | https://raw.githubusercontent.com/MichaelXavier/Angel/2d5a2f9ee50ad6755960398e3bb8a35f484eca0f/test/Angel/ConfigSpec.hs | haskell | # LANGUAGE OverloadedStrings # | module Angel.ConfigSpec (spec) where
import Angel.Data hiding (spec, Spec)
import Angel.Config
import Control.Exception.Base
import Data.Configurator.Types (Value(..))
import qualified Data.HashMap.Lazy as HM
import SpecHelper
spec :: TestTree
spec = testGroup "Angel.Config"
[
testGroup "modifyProg"
[
... |
1a444ca6110ee3bb8a6392ec320fe3b675f4f74fe5fb468caca830a398c4dc7b | mirage/capnp-rpc | local_struct_promise.ml | module Make (C : S.CORE_TYPES) = struct
module Struct_proxy = Struct_proxy.Make(C)
type target = {
mutable blocking : C.struct_resolver list; (* Resolvers blocked on us *)
pending: (C.struct_ref -> unit) Queue.t;
}
let local_promise () = object (self : _ #Struct_proxy.t)
inherit [target] Struct_p... | null | https://raw.githubusercontent.com/mirage/capnp-rpc/f04fa96a583994b71731bc1288833f8304c9ce81/capnp-rpc/local_struct_promise.ml | ocaml | Resolvers blocked on us
We add an extra resolver here so that we can report [self]
as the blocker. | module Make (C : S.CORE_TYPES) = struct
module Struct_proxy = Struct_proxy.Make(C)
type target = {
pending: (C.struct_ref -> unit) Queue.t;
}
let local_promise () = object (self : _ #Struct_proxy.t)
inherit [target] Struct_proxy.t { blocking = []; pending = Queue.create () }
val name = "local-pro... |
deb81e236050968a42567fd3ecb835feafd3992db2f349459ee36b3e0640ed3d | haskell/directory | CanonicalizePath.hs | # LANGUAGE CPP #
module CanonicalizePath where
#include "util.inl"
import System.Directory.Internal
import System.OsPath ((</>), dropFileName, dropTrailingPathSeparator,
normalise, takeFileName)
import TestUtils
main :: TestEnv -> IO ()
main _t = do
dot <- canonicalizePath ""
dot2 <- canonica... | null | https://raw.githubusercontent.com/haskell/directory/c1895b93a49a9723c949eefef71b0855b4ee5d51/tests/CanonicalizePath.hs | haskell | should not fail for non-existent paths
make sure ".." gets expanded properly by 'toExtendedLengthPath'
(turns out this test won't detect the problem because GetFullPathName
would expand them for us if we don't, but leaving it here anyway)
note: this also checks that "../bar" gets normalized to "..\\bar"
create a ... | # LANGUAGE CPP #
module CanonicalizePath where
#include "util.inl"
import System.Directory.Internal
import System.OsPath ((</>), dropFileName, dropTrailingPathSeparator,
normalise, takeFileName)
import TestUtils
main :: TestEnv -> IO ()
main _t = do
dot <- canonicalizePath ""
dot2 <- canonica... |
160346fbfe16edf2148edd2ccacab9515af01770c7b4c81f8bbb67a1aa5ca4b3 | HuwCampbell/orc-haskell | Bytes.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE PatternGuards #
module Orc.Serial.Binary.Internal.Bytes (
decodeBytes
, decodeBits
, encodeBytes
, encodeBits
, putBytes
, putBytesNative
, putBits
... | null | https://raw.githubusercontent.com/HuwCampbell/orc-haskell/259649bc5fa5c6d8bd850fdad0517af6c028e00e/src/Orc/Serial/Binary/Internal/Bytes.hs | haskell | # LANGUAGE OverloadedStrings #
For Benchmarking
# INLINE encodeBytes # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE PatternGuards #
module Orc.Serial.Binary.Internal.Bytes (
decodeBytes
, decodeBits
, encodeBytes
, encodeBits
, putBytes
, putBytesNative
, putBits
, decodeBytesNative
, encodeByte... |
3dd385c61692deaa01c633986fba6d45c32ae66ce5d4f90b8e199d72418fcf59 | erlang/otp | megaco_codec_mstone_lib.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2006 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/erlang/otp/86d8a75237dea83bd0a774a81343d183594c7495/lib/megaco/examples/meas/megaco_codec_mstone_lib.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 l... | Copyright Ericsson AB 2006 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(megaco_codec_mstone_lib).
Avoid warning for local function error/1 clashing with autoimported BIF .
-co... |
0977a0c816e587518d428caad6dc40d96ddac940be5e3d78c7e14c5adf78fad1 | tov/shcaml | fittingSig.ml | vim : set
* Generic signature for .
open Channel
open Channel.Dup
module type S = sig
(** {1 Types} *)
(** A fitting that consumes values of type ['a] and produces
* values of type ['b].
*)
type 'a t
constraint 'a = 'b -> 'c
(** This is the type of elements that fittings know how to write t... | null | https://raw.githubusercontent.com/tov/shcaml/43ae852a00e3a11520f90f2451baa71863409774/lib/fittingSig.ml | ocaml | * {1 Types}
* A fitting that consumes values of type ['a] and produces
* values of type ['b].
* This is the type of elements that fittings know how to write to external
processes.
* This is the parameter to the type {!elem} for specifying
* the type of elements that fittings know how to read from
* ex... | vim : set
* Generic signature for .
open Channel
open Channel.Dup
module type S = sig
type 'a t
constraint 'a = 'b -> 'c
type 'a elem
type initial
type 'a shtream
type 'a coshtream
* for { ! Channel.procref }
type procref = Channel.procref
* for { ! initial } { ! elem }
type text =... |
d0d0452638b273bf13d0a1e9d77775f6c67c5949f265348ca8bd519b01786e2a | rescript-lang/rescript-compiler | cmi_format.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/fdec0e723ac41577206fd161a6aeab0f3731d554/jscomp/ml/cmi_format.ml | ocaml | ************************************************************************
OCaml
Fabrice L... | Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type pers_flags =
| Deprecated of string
type error =
Not_an_interface of string
| Wrong_version_interface of string * string
| Corrupted_interface of string... |
c3b81e4ff3f3aca0926dc4e30bd8c9e4c074bac980e26facfe9a026c4bcf5554 | helq/tensorflow-haskell-deptyped | Parse.hs | Copyright 2017 .
Copyright 2016 TensorFlow authors .
--
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- -2.0
--
-- Unless required by applicable law or agreed to in writ... | null | https://raw.githubusercontent.com/helq/tensorflow-haskell-deptyped/2a8cc7f86e6ab7da2cb7b7324b1bf693f14acb22/tensorflow-mnist-deptyped/src/TensorFlow/Examples/MNISTDeptyped/Parse.hs | haskell |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2017 .
Copyright 2016 TensorFlow authors .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# LANGUAGE OverloadedLists #
# LANGUAGE FlexibleInstances #
# LANGUAGE ViewPatterns #
# LANGUAGE TypeOperators #
# LA... |
f4dbdbcf3292e378cc7993d2faab84ffd50565da9e4d29197088ee2d05e9f9c5 | tweag/ormolu | Fixity.hs | # LANGUAGE RecordWildCards #
module Ormolu.Utils.Fixity
( getFixityOverridesForSourceFile,
parseFixityDeclarationStr,
)
where
import Control.Exception (throwIO)
import Control.Monad.IO.Class
import Data.Bifunctor (first)
import Data.IORef
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
im... | null | https://raw.githubusercontent.com/tweag/ormolu/c81320d8a1069674c17fa5ee52b64c18604f84de/src/Ormolu/Utils/Fixity.hs | haskell | | Cache ref that stores fixity overrides per cabal file.
# NOINLINE cacheRef #
| Attempt to locate and parse an @.ormolu@ file. If it does not exist,
empty fixity map is returned. This function maintains a cache of fixity
overrides where cabal file paths act as keys.
| A wrapper around 'parseFixityDeclaration' for... | # LANGUAGE RecordWildCards #
module Ormolu.Utils.Fixity
( getFixityOverridesForSourceFile,
parseFixityDeclarationStr,
)
where
import Control.Exception (throwIO)
import Control.Monad.IO.Class
import Data.Bifunctor (first)
import Data.IORef
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
im... |
8e1ec2efd6168e4a705f2858cfb10c83fb4aeea9967920d6e954a7eb2b0921ea | kowey/GenI | LexicalSelection.hs | -- GenI surface realiser
Copyright ( C ) 2005 and
--
-- This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
--
-- T... | null | https://raw.githubusercontent.com/kowey/GenI/570a6ef70e61a7cb01fe0fc29732cd9c1c8f2d7a/src/NLP/GenI/LexicalSelection.hs | haskell | GenI surface realiser
This program is free software; you can redistribute it and/or
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 PARTICULAR PURPOSE. See the
GNU General Public License for more det... | Copyright ( C ) 2005 and
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple ... |
ac9c46084b180cd43d6e3dca150f5a2bba15988f4bd2a82e4b19a8796ef32113 | fragnix/fragnix | Paths.hs | module Fragnix.Paths where
import System.FilePath ((</>))
environmentPath :: FilePath
environmentPath = fragnixBasePath </> "env"
fragnixBasePath :: FilePath
fragnixBasePath = "fragnix"
builtinEnvironmentPath :: FilePath
builtinEnvironmentPath = fragnixBasePath </> "builtin_environment"
slicesPath :: FilePath
slic... | null | https://raw.githubusercontent.com/fragnix/fragnix/d8a4db1d570d468b5a8bc4bfc3c59a7de7beb117/src/Fragnix/Paths.hs | haskell | | Directory for generated modules
| Directory for updates | module Fragnix.Paths where
import System.FilePath ((</>))
environmentPath :: FilePath
environmentPath = fragnixBasePath </> "env"
fragnixBasePath :: FilePath
fragnixBasePath = "fragnix"
builtinEnvironmentPath :: FilePath
builtinEnvironmentPath = fragnixBasePath </> "builtin_environment"
slicesPath :: FilePath
slic... |
8c87d50672147261e41033b3028543231f1218347d1df205c427d987d728f771 | gafiatulin/codewars | Currency.hs | -- Converting integer to currency format
--
module Codewars.Kata.Currency where
toCurrency :: Integer -> String
toCurrency = reverse. f . reverse . show
where f (x1:x2:x3:x4:xs) = x1:x2:x3:',':f (x4:xs)
f x = x
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/Currency.hs | haskell | Converting integer to currency format
|
module Codewars.Kata.Currency where
toCurrency :: Integer -> String
toCurrency = reverse. f . reverse . show
where f (x1:x2:x3:x4:xs) = x1:x2:x3:',':f (x4:xs)
f x = x
|
7256e504470e9c94092675b66c9a9656909bbdb377ba6d27d8a18dd980bf28a5 | mitchellwrosen/riak2 | RiakUtils.hs | module RiakUtils where
import RiakPanic
import Data.Fixed (Fixed(..))
import Data.Maybe (fromJust)
import Data.Time (NominalDiffTime, nominalDiffTimeToSeconds)
import qualified Data.ByteString as ByteString
import qualified Data.ByteString.Char8 as Latin1
import qualified Data.ByteString.Lex.Int... | null | https://raw.githubusercontent.com/mitchellwrosen/riak2/d3c4ef4389012c70e72623cdf9a4caec0a07e568/riak2/src/RiakUtils.hs | haskell | module RiakUtils where
import RiakPanic
import Data.Fixed (Fixed(..))
import Data.Maybe (fromJust)
import Data.Time (NominalDiffTime, nominalDiffTimeToSeconds)
import qualified Data.ByteString as ByteString
import qualified Data.ByteString.Char8 as Latin1
import qualified Data.ByteString.Lex.Int... | |
9809480e01d8b878a762c4fa422df51b582202493199586e8ca68622e3102f05 | lgessler/glam | signup.cljs | (ns glam.client.ui.signup
(:require
[clojure.pprint :refer [pprint]]
[com.fulcrologic.fulcro.algorithms.denormalize :as fdn]
[com.fulcrologic.fulcro.algorithms.form-state :as fs]
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.components :as c]
[com.fulcrolo... | null | https://raw.githubusercontent.com/lgessler/glam/be711fb460ffec50197c2916d40b8dc40f81e28b/src/main/glam/client/ui/signup.cljs | clojure | also mark complete when it's valid since this is the last in the form | (ns glam.client.ui.signup
(:require
[clojure.pprint :refer [pprint]]
[com.fulcrologic.fulcro.algorithms.denormalize :as fdn]
[com.fulcrologic.fulcro.algorithms.form-state :as fs]
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.components :as c]
[com.fulcrolo... |
0dce4cfdf6bc492b3c2ce1d2a017253cae5394d88d882d2f90bdd6967e2834fa | robert-strandh/SICL | conditions.lisp | (cl:in-package #:cleavir-code-utilities)
(define-condition form-must-be-proper-list
(program-error acclimation:condition)
((%form :initarg :form :reader form)))
(define-condition argument-mismatch
(program-error acclimation:condition)
((%lambda-list :initarg :lambda-list :reader lambda-list)
(%invoking... | null | https://raw.githubusercontent.com/robert-strandh/SICL/98f0c1053a8737d02955eaff3df8153adc8e492f/Code/Cleavir/Code-utilities/conditions.lisp | lisp |
Declaration conditions.
Lambda list conditions.
This condition is used to indicate that there is a malformed item
following the &optional lambda-list keyword in an ordinary lambda
lambda list, a define-modify-macro lambda list, or a
define-method-combination lambda list. These lambda lists allow
the follo... | (cl:in-package #:cleavir-code-utilities)
(define-condition form-must-be-proper-list
(program-error acclimation:condition)
((%form :initarg :form :reader form)))
(define-condition argument-mismatch
(program-error acclimation:condition)
((%lambda-list :initarg :lambda-list :reader lambda-list)
(%invoking... |
58380724ba0aa4e61082b3a0109a7dfb1b79c1fa3d07acdbff27b2d799118a02 | rumblesan/improviz | Operators.hs | module Tests.Language.Interpreter.Operators
( interpreterOperatorTests
)
where
import Test.Framework ( Test
, testGroup
)
import Test.Framework.Providers.HUnit ( testCase )
import ... | null | https://raw.githubusercontent.com/rumblesan/improviz/90162e6dc7befec34e3b7b18b8aca275f26cd505/test/Tests/Language/Interpreter/Operators.hs | haskell | module Tests.Language.Interpreter.Operators
( interpreterOperatorTests
)
where
import Test.Framework ( Test
, testGroup
)
import Test.Framework.Providers.HUnit ( testCase )
import ... | |
89e6056119a1ccd7de01a41dae00578561a088fa1f0846daaf19d716a64b5a89 | cirfi/sicp-my-solutions | 1.43.scm | (define (compose f g)
(lambda (x)
(f (g x))))
(define (repeated f times)
(cond ((<= times 0)
(lambda (x)
x))
(else
(compose f (repeated f (- times 1))))))
(define (square x)
(* x x))
((repeated square 2) 5)
| null | https://raw.githubusercontent.com/cirfi/sicp-my-solutions/4b6cc17391aa2c8c033b42b076a663b23aa022de/ch1/1.43.scm | scheme | (define (compose f g)
(lambda (x)
(f (g x))))
(define (repeated f times)
(cond ((<= times 0)
(lambda (x)
x))
(else
(compose f (repeated f (- times 1))))))
(define (square x)
(* x x))
((repeated square 2) 5)
| |
9d825af27d5924bb12cd6fa6e4a49348096d8bb9b2a209084166cd3dbabbf53e | clj-commons/cljss | inject_global.clj | (ns cljss.inject-global
(:require [cljss.utils :refer [literal? compile-css-rule reduce-str]]))
(defn- compile-css [css]
(mapcat compile-css-rule css))
(defn inject-global [sheet]
(->> sheet
(map (fn [[s css]]
[(name s) (compile-css css)]))
(map (fn [[s css]]
[s
... | null | https://raw.githubusercontent.com/clj-commons/cljss/d2856688cf650babe518c798cf20e6bdb4227bb7/src/cljss/inject_global.clj | clojure | (ns cljss.inject-global
(:require [cljss.utils :refer [literal? compile-css-rule reduce-str]]))
(defn- compile-css [css]
(mapcat compile-css-rule css))
(defn inject-global [sheet]
(->> sheet
(map (fn [[s css]]
[(name s) (compile-css css)]))
(map (fn [[s css]]
[s
... | |
d68f572eb00a90e4ff9bf8e63656cb0a1ece4e5db73b8358db4b4eb9c508074e | uw-unsat/leanette-popl22-artifact | symbolic.rkt | #lang rosette/safe
; all the routines for creating symbolic nonograms objects
; (basically, everything except programs)
(provide
symbolic-segments
symbolic-deduction
symbolic-solution-segments/concrete-hints
symbolic-line-transition
symbolic-line
solve-with-symbolic-deduction)
(require
(only-in racket ... | null | https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-3/nonograms/puzzle/src/nonograms/symbolic.rkt | racket | all the routines for creating symbolic nonograms objects
(basically, everything except programs)
create a set of symbolic solution segments for a concrete line,
with assertions that the segments are consistent with a solution for that line.
useful for either solving lines or generating solved lines.
use fold inst... | #lang rosette/safe
(provide
symbolic-segments
symbolic-deduction
symbolic-solution-segments/concrete-hints
symbolic-line-transition
symbolic-line
solve-with-symbolic-deduction)
(require
(only-in racket match-define error values parameterize hash-copy)
rosette/lib/angelic
"rules.rkt"
"action.rkt"
... |
ff807608ea4aa6334c9b59efb4fad48ca393aac10636b189245d95ac54b7afac | saltlang/saltlang | Monad.hs | Copyright ( c ) 2014 .
--
-- This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
-- License, or (at your option) any later version.
--
-- This program is distributed in th... | null | https://raw.githubusercontent.com/saltlang/saltlang/f3478904139f19373f23824f25d28e8be745dc60/test/Test/UnitTests/Control/Monad.hs | haskell |
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General P... | Copyright ( c ) 2014 .
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
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , MA
02110 - 1301 USA
m... |
643524dcf198acd5446d3e6b056882dc5efc3c29ecbca3c29b6051e4d083575e | gregorycollins/hashtables | TestSuite.hs | {-# LANGUAGE RankNTypes #-}
module Main where
import Test.Framework (defaultMain)
------------------------------------------------------------------------------
import qualified Data.HashTable.Test.Common as Common
import qualified Data.HashTable.ST.Basic as B
import qualified Data.HashTable.ST.Cuckoo as C
import qua... | null | https://raw.githubusercontent.com/gregorycollins/hashtables/5775cf6d01d759e76b56ee650ea5efdaa61531ca/test/suite/TestSuite.hs | haskell | # LANGUAGE RankNTypes #
----------------------------------------------------------------------------
---------------------------------------------------------------------------- |
module Main where
import Test.Framework (defaultMain)
import qualified Data.HashTable.Test.Common as Common
import qualified Data.HashTable.ST.Basic as B
import qualified Data.HashTable.ST.Cuckoo as C
import qualified Data.HashTable.ST.Linear as L
import qualified Data.HashTable.IO as IO
main :: IO ()
main = defaul... |
bd1246dd406b5f619685aa97b7cbdf689c5878326a3bc1658c1c70d65a1b043e | jdreaver/eventful | Json.hs | -- | Utilities for JSON serialization
module Bank.Json
( unPrefixLower
, dropPrefix
, dropSuffix
, deriveJSONUnPrefixLower
) where
import Data.Aeson
import Data.Aeson.TH
import Data.Char (toLower)
import Language.Haskell.TH
| Aeson Options that match FrontRow usage
unPrefixLower :: String -> Options
unPr... | null | https://raw.githubusercontent.com/jdreaver/eventful/3f0c604e5bb2dcf5bacf0a2e01edf6a5e9c5e22e/examples/bank/src/Bank/Json.hs | haskell | | Utilities for JSON serialization |
module Bank.Json
( unPrefixLower
, dropPrefix
, dropSuffix
, deriveJSONUnPrefixLower
) where
import Data.Aeson
import Data.Aeson.TH
import Data.Char (toLower)
import Language.Haskell.TH
| Aeson Options that match FrontRow usage
unPrefixLower :: String -> Options
unPrefixLower prefix = defaultOptions
{ ... |
6b7bafa1c8a0119c89d5c25bf8f842f2989ffa80450c8177427771068b860b49 | batebobo/fp1819 | 2-even.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
Искаме да проверим дали четно
(define tests (test-suite
"even? tests"
(test-case "" (check-equal? (my-even? 2) #t))
(test-case "" (check-equal? (my-even? 333) #f))
))
(run-tests tests 'verbose)
| null | https://raw.githubusercontent.com/batebobo/fp1819/2061b7e62a1a9ade3a5fff9753f9fe0da5684275/scheme/1/2-even.rkt | racket | #lang racket
(require rackunit)
(require rackunit/text-ui)
Искаме да проверим дали четно
(define tests (test-suite
"even? tests"
(test-case "" (check-equal? (my-even? 2) #t))
(test-case "" (check-equal? (my-even? 333) #f))
))
(run-tests tests 'verbose)
| |
99faba0420de7ae85a545096ed53990976135acfd830937039dc6ffc5f5f2aee | donaldsonjw/bigloo | defuse.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Narrow / defuse.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Narrow/defuse.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Def/Use node property. */
*===========================... | * serrano / prgm / project / bigloo / comptime / Narrow / defuse.scm * /
* Author : * /
* Creation : Sun Nov 10 07:53:36 2013 * /
* Last change : Tue Dec 17 11:11:16 2013 ( serrano ) * /
* Copy... |
387e34643d439bf3eaae54e9f7e97d4ab48ecd094125a912f7bf1ac903415220 | teknql/wing | json_test.cljc | (ns wing.malli.json-test
(:require [wing.malli.json :as sut]
#?(:clj [clojure.test :as t :refer [deftest testing is]]
:cljs [cljs.test :as t :refer [deftest testing is] :include-macros true])
[malli.core :as m]
[malli.generator :as mg]
[cuerdas.core :as s... | null | https://raw.githubusercontent.com/teknql/wing/de8148bf48210eac0c0e3f8e31346b5b2ead39c2/test/wing/malli/json_test.cljc | clojure | (ns wing.malli.json-test
(:require [wing.malli.json :as sut]
#?(:clj [clojure.test :as t :refer [deftest testing is]]
:cljs [cljs.test :as t :refer [deftest testing is] :include-macros true])
[malli.core :as m]
[malli.generator :as mg]
[cuerdas.core :as s... | |
39a8ca02a84a1b5b0662f04e679d92986cb3d976530b13457de8456080f6a8e0 | mhallin/graphql_ppx | result_structure.ml | type exhaustive_flag = | Exhaustive | Nonexhaustive
type loc = Source_pos.ast_location
type field_result =
| Fr_named_field of string * loc * t
| Fr_fragment_spread of string * loc * string
and t =
| Res_nullable of loc * t
| Res_array of loc * t
| Res_id of loc
| Res_string of loc
| Res_int of loc
|... | null | https://raw.githubusercontent.com/mhallin/graphql_ppx/5796b3759bdf0d29112f48e43a2f0623f7466e8a/src/base/result_structure.ml | ocaml | type exhaustive_flag = | Exhaustive | Nonexhaustive
type loc = Source_pos.ast_location
type field_result =
| Fr_named_field of string * loc * t
| Fr_fragment_spread of string * loc * string
and t =
| Res_nullable of loc * t
| Res_array of loc * t
| Res_id of loc
| Res_string of loc
| Res_int of loc
|... | |
872583037fbc9d17b2e812fcd22bb44cccba3058e94fbc391b2e33c1bf6fb779 | lambduli/frea | Utils.hs | module Compiler.Parser.Utils where
-- ACKNOWLEDGMENT
-- -08-17-alex-happy-startcodes.html
import Control.Monad.State
import Control.Monad
import Data.Word
import Codec.Binary.UTF8.String (encode)
import Compiler.Parser.Token (Token (..), TokPosition(..))
Parser monad
type P a = State ParseState a
data AlexInpu... | null | https://raw.githubusercontent.com/lambduli/frea/f240a1a4a57996dcc2ab685e2bd499ad0cdb5dfc/src/Compiler/Parser/Utils.hs | haskell | ACKNOWLEDGMENT
-08-17-alex-happy-startcodes.html
lexer start code
temporary storage for strings
needed when parsing strings, chars, multi-line strings
The input: last character, unused bytes, remaining string
TODO: fix pls
what if current token begins on different line, like () or []
I know parsing () and [] l... | module Compiler.Parser.Utils where
import Control.Monad.State
import Control.Monad
import Data.Word
import Codec.Binary.UTF8.String (encode)
import Compiler.Parser.Token (Token (..), TokPosition(..))
Parser monad
type P a = State ParseState a
data AlexInput = AlexInput
{ ai'prev :: Char
, ai'bytes :: [Word... |
72e24cfdc5f6c40e52c1c02118e449291f9627f04536e751023acd709d679406 | nominolo/scion | file001.hs | main = print 42 | null | https://raw.githubusercontent.com/nominolo/scion/99b4589175665687181a932cd836850205625f71/tests/projects/file001.hs | haskell | main = print 42 | |
de3f716b7a5c233590e45b686914500dc9d3c1f4890686efcf001b2a7ee8ef47 | OCamlPro/OCamlPro-OCaml-Branch | quicksort.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/OCamlPro/OCamlPro-OCaml-Branch/3a522985649389f89dac73e655d562c54f0456a5/inline-more/testsuite/tests/misc-unsafe/quicksort.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : quicksort.ml 7017 2005 - 08 -... |
d85b39fb35e32a1dceb88fab2693de49998370b8316a89d3dba46a47e79580f7 | ghc/ghc | Origin.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE PolyKinds #
-- | Describes the provenance of types as they flow through the type-checker.
-- The datatypes here are mainly used for error message generation.
module GHC.Tc.Types.Origin (
* UserTypeCtxt
UserTypeCtxt(..), pprUserT... | null | https://raw.githubusercontent.com/ghc/ghc/db0f1bfd0cada59d8a8673e98fc40e8b9c11a9c5/compiler/GHC/Tc/Types/Origin.hs | haskell | # LANGUAGE GADTs #
| Describes the provenance of types as they flow through the type-checker.
The datatypes here are mainly used for error message generation.
* CtOrigin
* FixedRuntimeRep origin
* Arrow command origin
*********************************************************************
* ... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE PolyKinds #
module GHC.Tc.Types.Origin (
* UserTypeCtxt
UserTypeCtxt(..), pprUserTypeCtxt, isSigMaybe,
ReportRedundantConstraints(..), reportRedundantConstraints,
redundantConstraintsSpan,
*
SkolemInfo(..), SkolemInfoAnon(..), mkSkolemInfo, ... |
5292530eb8099888a4bf7e8878890267771d30268bfc5fa2d28c58856382d340 | janestreet/bonsai | annotate_incr.mli | open! Core
val enable : unit -> unit
val disable : unit -> unit
module Kind : sig
type t =
| Input
| Value
| Result
| Lifecycle
| Empty_lifecycle
| Model
| Model_and_input
| Assoc_key
| Assoc_input
| Assoc_results
| Assoc_lifecycles
| Assoc_inputs
| Path
| Lif... | null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/src/annotate_incr.mli | ocaml | open! Core
val enable : unit -> unit
val disable : unit -> unit
module Kind : sig
type t =
| Input
| Value
| Result
| Lifecycle
| Empty_lifecycle
| Model
| Model_and_input
| Assoc_key
| Assoc_input
| Assoc_results
| Assoc_lifecycles
| Assoc_inputs
| Path
| Lif... | |
1fa01f496c864c6fdf636fdb639c769727bab4d2cc0a783a3efe01f870d5b3cb | msp-strath/ask | Thin.hs | module Ask.Src.Thin where
import Data.Bits
newtype Thinning = Th Integer deriving Eq
instance Show Thinning where
show (Th th) = go th where
go 0 = "...0"
go (-1) = "...1"
go th = case unsnocBit th of
(th, b) -> go th ++ if b then "1" else "0"
os :: Thinning -> Thinning
os (Th th) = Th (snocBit ... | null | https://raw.githubusercontent.com/msp-strath/ask/96f3e8a0ae577cdb4633a30924a16c95b4e09bc0/Src/Thin.hs | haskell | module Ask.Src.Thin where
import Data.Bits
newtype Thinning = Th Integer deriving Eq
instance Show Thinning where
show (Th th) = go th where
go 0 = "...0"
go (-1) = "...1"
go th = case unsnocBit th of
(th, b) -> go th ++ if b then "1" else "0"
os :: Thinning -> Thinning
os (Th th) = Th (snocBit ... | |
45d6d062aa6cc011ed8dbdacdb784bb872f8b8fe807d0b092c22f8b098b8bf13 | roman/Haskell-Reactive-Extensions | TestCore.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE TemplateHaskell #
module Rx.Logger.TestCore where
import Control.Monad (void)
import Data.Monoid ((<>))
import Data.Typeable (Typeable)
import qualified Data.Text.Lazy as Text
import Control.Concurrent.MVar (newMVar, takeMVar, modifyMVar_)
import Test.HUnit (assertEqual)... | null | https://raw.githubusercontent.com/roman/Haskell-Reactive-Extensions/0faddbb671be7f169eeadbe6163e8d0b2be229fb/rx-logger/test/Rx/Logger/TestCore.hs | haskell | # LANGUAGE DeriveDataTypeable #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------ | # LANGUAGE TemplateHaskell #
module Rx.Logger.TestCore where
import Control.Monad (void)
import Data.Monoid ((<>))
import Data.Typeable (Typeable)
import qualified Data.Text.Lazy as Text
import Control.Concurrent.MVar (newMVar, takeMVar, modifyMVar_)
import Test.HUnit (assertEqual)
import Test.Hspec
import qualified... |
e80e3a35e5314ad78302637aa71dabde7c52e728f48738177fb62e172e95067e | patrickt/possession | Pathfind.hs |
# LANGUAGE ImportQualifiedPost #
module Game.Pathfind (module Game.Pathfind) where
import Data.Functor.Const
import Data.Functor.Foldable
import Data.Map.Strict qualified as Map
import Data.Maybe (fromMaybe)
import Data.PQueue.Prio.Min qualified as PQueue
import Data.Position as Position
import GHC.Generics (Generic... | null | https://raw.githubusercontent.com/patrickt/possession/4b920fc84733b57b2ed2f29cd0037676f99f855e/src/Game/Pathfind.hs | haskell | immutable components of a path search
mutable components
pathfind :: Context -> [Position]
retraceSteps :: Prog [Position] -> [Position]
where
go = \case
NoPath -> []
InProgress v ps
| otherwise -> v : ps |
# LANGUAGE ImportQualifiedPost #
module Game.Pathfind (module Game.Pathfind) where
import Data.Functor.Const
import Data.Functor.Foldable
import Data.Map.Strict qualified as Map
import Data.Maybe (fromMaybe)
import Data.PQueue.Prio.Min qualified as PQueue
import Data.Position as Position
import GHC.Generics (Generic... |
e63ecbd94c50e5612fa876aa71c2e7859119865232bcb2753d1a0e99624a4c0f | ds-wizard/engine-backend | QuestionnaireDetailDTO.hs | module Wizard.Api.Resource.Questionnaire.QuestionnaireDetailDTO where
import qualified Data.Map.Strict as M
import Data.Time
import qualified Data.UUID as U
import GHC.Generics
import Shared.Api.Resource.DocumentTemplate.DocumentTemplateDTO
import Shared.Api.Resource.DocumentTemplate.DocumentTemplateFormatDTO
import ... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/src/Wizard/Api/Resource/Questionnaire/QuestionnaireDetailDTO.hs | haskell | module Wizard.Api.Resource.Questionnaire.QuestionnaireDetailDTO where
import qualified Data.Map.Strict as M
import Data.Time
import qualified Data.UUID as U
import GHC.Generics
import Shared.Api.Resource.DocumentTemplate.DocumentTemplateDTO
import Shared.Api.Resource.DocumentTemplate.DocumentTemplateFormatDTO
import ... | |
43d86ba02517f3538a3e89e85c6416948e8920b421eb5c8b5b71bc1d94be288e | jwiegley/notes | Extra.hs | iterateM :: (Monad m, MonadBaseControl IO m) => (a -> m a) -> a -> m [a]
iterateM f x = do
y <- f x
z <- control $ \run -> unsafeInterleaveIO $ run $ iterateM f y
return (y:z)
| null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/gists/8727072/Extra.hs | haskell | iterateM :: (Monad m, MonadBaseControl IO m) => (a -> m a) -> a -> m [a]
iterateM f x = do
y <- f x
z <- control $ \run -> unsafeInterleaveIO $ run $ iterateM f y
return (y:z)
| |
70b307e8a441fd4947b3b4237e2db7024f13c3165738e8b38d1407ba4a5e0e49 | imitator-model-checker/imitator | Graphics.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Laboratoire Spécification et Vérification ( ENS Cachan & CNRS , France )
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine ,... | null | https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/Graphics.ml | ocaml | **********************************************************
Modules
**********************************************************
**********************************************************
* Statistics
**********************************************************
**********************************************************
... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* IMITATOR
*
* Laboratoire Spécification et Vérification ( ENS Cachan & CNRS , France )
* Université Paris 13 , LIPN , CNRS , France
* Université de Lorraine ,... |
19a6c4aaa00bee84031b7fef904a0eea8536d0b235be276c883c31e66bf5c9f9 | tonsky/cljs-skeleton | project.clj | (defproject cljs-skeleton "0.1.0-SNAPSHOT"
:dependencies [
[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.189"]
[rum "0.6.0"]
[http-kit "2.1.19"]
[compojure "1.4.0" :exclusions [commos-codec]]
[com.cognitect/tran... | null | https://raw.githubusercontent.com/tonsky/cljs-skeleton/021300c57909a81ff63934441e99f873d63fc3b2/project.clj | clojure | (defproject cljs-skeleton "0.1.0-SNAPSHOT"
:dependencies [
[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.189"]
[rum "0.6.0"]
[http-kit "2.1.19"]
[compojure "1.4.0" :exclusions [commos-codec]]
[com.cognitect/tran... | |
2fafdd787e160934c5c3d9e8f8ab33ecb91353859431af1e79d43c27c1836975 | jyh/metaprl | sil_types.ml |
* Simple Imperative Types .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / d... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/sil/sil_types.ml | ocaml | ***********************************************************************
* SYNTAX *
***********************************************************************
***********************************************************************
* DISPLAY ... |
* Simple Imperative Types .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / htmlman / d... |
3f6e284ffbfe6d9c489725044eba67e576e62e4d53058bbb17b13ddcd33f19cc | inzva/DOH | Spec.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoMonomorphismRestriction #
module Main where
import Control.Monad.Reader
import Control.Monad.Except
impo... | null | https://raw.githubusercontent.com/inzva/DOH/2b25572e1bc33a7a79f5d7df739b269e83bb32fb/test/Spec.hs | haskell | # LANGUAGE OverloadedStrings #
---------------------------------------------------------------
---------------------------------------------------------------
---------------------------------------------------------------
---------------------------------------------------------------
---------------------------------... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoMonomorphismRestriction #
module Main where
import Control.Monad.Reader
import Control.Monad.Except
import Network.DigitalOcean
import Netw... |
f51d025630c3d57ef91d25a75263cc1149900741baab0e4003ab887c082ddcbf | helpshift/gulfstream | proc-test.clj | (ns gulfstream.proc-test
(:require [hara.concurrent.procedure :as p]))
| null | https://raw.githubusercontent.com/helpshift/gulfstream/f5e3f4159a9335bcf73ccbb750e0e6b17bde8773/candidates/test/proc-test.clj | clojure | (ns gulfstream.proc-test
(:require [hara.concurrent.procedure :as p]))
| |
e04738c7523e3fd58ff70a5d18a5fdc6c5a401fba4ce5911ccb2ca269f6f26ff | yurug/ocaml-crontab | cron.ml | This file is part of .
*
* Copyright ( C ) 2019
*
* is distributed under the terms of the MIT license . See the
* included LICENSE file for details .
*
* Copyright (C) 2019 Yann Régis-Gianas
*
* ocaml-crontab is distributed under the terms of the MIT license. See the
* included LICENSE f... | null | https://raw.githubusercontent.com/yurug/ocaml-crontab/59b0d84bfe3d7f2a9ee1e00c6f6733dba2765c55/src/cron.ml | ocaml | By split. | This file is part of .
*
* Copyright ( C ) 2019
*
* is distributed under the terms of the MIT license . See the
* included LICENSE file for details .
*
* Copyright (C) 2019 Yann Régis-Gianas
*
* ocaml-crontab is distributed under the terms of the MIT license. See the
* included LICENSE f... |
c360bbe11d0cd3a72b1f3e0fe9ba10998eacd1d7ee8d66b517a1cd4a19f6aec9 | sansarip/owlbear | rules_test.cljs | (ns owlbear.parse.rules-test
(:require [cljs.test :refer [is testing]]
[cljs-bean.core :refer [->clj]]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[oops.core :refer [oget... | null | https://raw.githubusercontent.com/sansarip/owlbear/d2184703dde53d2c6aa60adb5a7c3745323267c1/src/cljs/owlbear/parse/rules_test.cljs | clojure | End index is not in range | (ns owlbear.parse.rules-test
(:require [cljs.test :refer [is testing]]
[cljs-bean.core :refer [->clj]]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[oops.core :refer [oget... |
a803570caf163931f912d723dc5d4b123481a4e699ff6e17f82510240623cf23 | uzh/ask | ask_integrator_mariadb.ml | open Alcotest_lwt
(* services *)
module Migration = Sihl.Database.Migration.MariaDb
module Database = Sihl.Database
module Storage = Sihl_storage.MariaDb
(* Test service *)
module AskService = Ask.MariaDb
module TestService = Test_service.Make (Ask_integrator.MariaDb) (AskService)
let suite =
[ ( "integrator model... | null | https://raw.githubusercontent.com/uzh/ask/5ba939c7ccbe20251b26f8d691635d94e65e518f/ask-integrator/test/ask_integrator_mariadb.ml | ocaml | services
Test service | open Alcotest_lwt
module Migration = Sihl.Database.Migration.MariaDb
module Database = Sihl.Database
module Storage = Sihl_storage.MariaDb
module AskService = Ask.MariaDb
module TestService = Test_service.Make (Ask_integrator.MariaDb) (AskService)
let suite =
[ ( "integrator model"
, [ test_case "ServiceMappin... |
1ddc9e5bd1684594bf232422db235a6deaa78635211b0a11091b2b38af9e04b5 | MercuryTechnologies/moat | BasicEnumSpec.hs | module BasicEnumSpec where
import Common
import Moat
import Test.Hspec
import Test.Hspec.Golden
import Prelude hiding (Enum)
data Enum
= A
| B
| C
mobileGen
''Enum
spec :: Spec
spec =
describe "stays golden" $ do
let moduleName = "BasicEnumSpec"
it "swift" $
defaultGolden ("swift" <> moduleN... | null | https://raw.githubusercontent.com/MercuryTechnologies/moat/0217e7abe6bb045e5ea4c33d5dae9d636d3e6159/test/BasicEnumSpec.hs | haskell | module BasicEnumSpec where
import Common
import Moat
import Test.Hspec
import Test.Hspec.Golden
import Prelude hiding (Enum)
data Enum
= A
| B
| C
mobileGen
''Enum
spec :: Spec
spec =
describe "stays golden" $ do
let moduleName = "BasicEnumSpec"
it "swift" $
defaultGolden ("swift" <> moduleN... | |
4cfcf75d90ef48f0e0e110cffaf9d82c4f49d9f498eb25008c284490a83453da | facebook/flow | tvar_resolver.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/ef95df09bab3960730c879b61ed9433605f33421/src/typing/tvar_resolver.mli | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
bd9b2059293c093efecbae25e4d688079f0442cb563a88a17c60149713b8bcff | xtdb/xtdb | archive.clj | (ns ^:no-doc leiningen.archive
(:require [clojure.java.io :as io]
[clojure.java.shell :as sh]
[clojure.string :as string]
[clojure.pprint]
[leiningen.core.eval]
[leiningen.licenses :as licenses]))
(defn archive [{:keys [version target-path confluent-hub-man... | null | https://raw.githubusercontent.com/xtdb/xtdb/e2f51ed99fc2716faa8ad254c0b18166c937b134/modules/kafka-connect/tasks/leiningen/archive.clj | clojure | (ns ^:no-doc leiningen.archive
(:require [clojure.java.io :as io]
[clojure.java.shell :as sh]
[clojure.string :as string]
[clojure.pprint]
[leiningen.core.eval]
[leiningen.licenses :as licenses]))
(defn archive [{:keys [version target-path confluent-hub-man... | |
afe409b0a3f4e0f928ee9dbdf509a2b14471b82829e54c4fa1f99837ceffa579 | AmpersandTarski/Ampersand | Basics.hs | module Ampersand.Basics
( module Ampersand.Basics.Auxiliaries,
module Ampersand.Basics.Exit,
module Ampersand.Basics.Languages,
module Ampersand.Basics.PandocExtended,
module Ampersand.Basics.Prelude,
module Ampersand.Basics.String,
module Ampersand.Basics.Unique,
module Ampersand.Basics.V... | null | https://raw.githubusercontent.com/AmpersandTarski/Ampersand/cb2306a09ce79d5609ccf8d3e28c0a1eb45feafe/src/Ampersand/Basics.hs | haskell | module Ampersand.Basics
( module Ampersand.Basics.Auxiliaries,
module Ampersand.Basics.Exit,
module Ampersand.Basics.Languages,
module Ampersand.Basics.PandocExtended,
module Ampersand.Basics.Prelude,
module Ampersand.Basics.String,
module Ampersand.Basics.Unique,
module Ampersand.Basics.V... | |
40e401fb189e006e130d70fdee40f931fa8194058109b8f92771549ea5b650ce | MBcode/LispUtils | cobweb.lisp | ;;;; This is a simple implementation of the COBWEB Incremental Conceptual Clustering algorithm
( cf . " Knowledge Acquisition Via Incremental Conceptual Clustering " , ML 2 139 - 172 )
Copyright ( c ) 1993 by . This program may be freely
;;;; copied, used, or modified provided that this copyright notice is in... | null | https://raw.githubusercontent.com/MBcode/LispUtils/8c9d09aa732fca1c7c5b42b6c5067b89de98cb49/stat/ml-progs/ml/cobweb.lisp | lisp | This is a simple implementation of the COBWEB Incremental Conceptual Clustering algorithm
copied, used, or modified provided that this copyright notice is included
in each copy of this code and parts thereof.
Try (cobweb-train *raw-examples*) after loading either file.
Examples are assumed to be ordered lists of f... | ( cf . " Knowledge Acquisition Via Incremental Conceptual Clustering " , ML 2 139 - 172 )
Copyright ( c ) 1993 by . This program may be freely
See COBWEB - ANIMAL - DATA ( from ML article ) and COBWEB - ANIMAL2 - DATA for simple sample data files .
Also try COBWEB - SOYBEAN - DATA and COBWEB - SOYBEAN2 -... |
2425d64220417dba9cc0a89012bfdb7788478da3cd0abc6ffd50c69569b62a02 | johannesgerer/buchhaltung | ZipEdit2.hs | # LANGUAGE GeneralizedNewtypeDeriving #
-----------------------------------------------------------------------------
-- |
-- Module : System.Console.ZipEdit
Copyright : ( c ) 2008
-- License : BSD-style (see LICENSE)
--
-- Maintainer : <>
-- Stability : unstable
-- Portability : unportable
... | null | https://raw.githubusercontent.com/johannesgerer/buchhaltung/1a5b584d7df8c33a803361ca37a14323c3a52373/src/Buchhaltung/ZipEdit2.hs | haskell | ---------------------------------------------------------------------------
|
Module : System.Console.ZipEdit
License : BSD-style (see LICENSE)
Maintainer : <>
Stability : unstable
Portability : unportable
A library for creating simple interactive list editors, using a
zipper to allow the use... | # LANGUAGE GeneralizedNewtypeDeriving #
Copyright : ( c ) 2008
module Buchhaltung.ZipEdit2
(
Action(..)
, stdActions
, (??)
, EditorConf(..)
, edit
, LCont(..)
, editWCont
, Zipper(..)
, integrate
, differentiate
, fwd, back
, LState(..)
) where
import Buc... |
788f3ae1ad94ed122f45174b8362860e27f00d636dec9f02cc59a98b4895d146 | nshepperd/funn | GLOW.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
{-# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #-}
# OPTIONS_GHC -fplugin GHC.TypeLits . KnownNat . Solver #
{-# OPTIONS... | null | https://raw.githubusercontent.com/nshepperd/funn/23138fc44cfda90afd49927c39b122ed78945293/AI/Funn/CL/Batched/GLOW.hs | haskell | # LANGUAGE GADTs #
# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #
# OPTIONS_GHC -fconstraint-solver-iterations=20 #
Note: connect has asymmetry in the ordering of parameters.
They compute the same mapping, but the former takes 'one's
the parameters in the opposite order.
This is so that 'invert one' takes the same... | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -fplugin GHC.TypeLits . KnownNat . Solver #
module AI.Funn.CL.Batched.GLOW (
Invertible(..),
invert
) where
import ... |
b76fbc899829e7247a3d696aa223be978c022dbcdbb0e98d4a67b93104bfa809 | ocamllabs/ocaml-modular-implicits | t092-pushacc7.ml | open Lib;;
let x = false in
let y = true in
let z = true in
let a = true in
let b = true in
let c = true in
let d = true in
let e = true in
if x then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 CONST0
10 PUSHCONST1
11 ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t092-pushacc7.ml | ocaml | open Lib;;
let x = false in
let y = true in
let z = true in
let a = true in
let b = true in
let c = true in
let d = true in
let e = true in
if x then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 CONST0
10 PUSHCONST1
11 ... | |
6365f5202b27f926e0522a071322c4849cb685650bc7d624f58855fced579977 | incoherentsoftware/defect-process | All.hs | module Level.Room.Trigger.All
( mkRoomTriggers
) where
import Control.Monad.IO.Class (MonadIO)
import Configs
import Level.Room.Trigger
import Level.Room.Trigger.All.EndBoss
import Level.Room.Trigger.All.StartingShopItemPickupIndicator
import Level.Room.Trigger.All.StartingShopMoveControlsInfo
import Level.Ro... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/c39ce1f742d32a0ffcde82c03bf872adeb7d9162/src/Level/Room/Trigger/All.hs | haskell | module Level.Room.Trigger.All
( mkRoomTriggers
) where
import Control.Monad.IO.Class (MonadIO)
import Configs
import Level.Room.Trigger
import Level.Room.Trigger.All.EndBoss
import Level.Room.Trigger.All.StartingShopItemPickupIndicator
import Level.Room.Trigger.All.StartingShopMoveControlsInfo
import Level.Ro... | |
acdd6e5592ec21d2a5b4cee021b7093b17f9f63a1563c619f27951b3b7d014c8 | heraldry/heraldicon | ornaments.cljs | (ns heraldicon.heraldry.ornaments
(:require
[heraldicon.context :as c]
[heraldicon.heraldry.shield-separator :as shield-separator]
[heraldicon.interface :as interface]
[heraldicon.math.bounding-box :as bb]))
(defmethod interface/properties :heraldry/ornaments [_context]
{:type :heraldry/ornaments})
(d... | null | https://raw.githubusercontent.com/heraldry/heraldicon/71126cfd7ba342dea0d1bb849be92cbe5290a6fd/src/heraldicon/heraldry/ornaments.cljs | clojure | TODO: self-below-shield? probably should be a subscription as well,
which can always be checked in the render-component function | (ns heraldicon.heraldry.ornaments
(:require
[heraldicon.context :as c]
[heraldicon.heraldry.shield-separator :as shield-separator]
[heraldicon.interface :as interface]
[heraldicon.math.bounding-box :as bb]))
(defmethod interface/properties :heraldry/ornaments [_context]
{:type :heraldry/ornaments})
(d... |
467c3c1f33be074024e315d4ff6b9fd17deceedd13dc32724ebc50b579a552cc | open-company/open-company-web | team_management_modal.cljs | (ns oc.web.components.team-management-modal
(:require [rum.core :as rum]
[clojure.string :as s]
[org.martinklepsch.derivatives :as drv]
[oc.web.lib.jwt :as jwt]
[oc.web.urls :as oc-urls]
[oc.lib.user :as user-lib]
[oc.web.dispatcher :as dis]
... | null | https://raw.githubusercontent.com/open-company/open-company-web/5404a85ea3bbdb0f4f36b27047fb87ca927772ad/src/main/oc/web/components/team_management_modal.cljs | clojure | Locals
Add @ in front of the slack display name if it's not there already | (ns oc.web.components.team-management-modal
(:require [rum.core :as rum]
[clojure.string :as s]
[org.martinklepsch.derivatives :as drv]
[oc.web.lib.jwt :as jwt]
[oc.web.urls :as oc-urls]
[oc.lib.user :as user-lib]
[oc.web.dispatcher :as dis]
... |
c5755244c0f4175dbea7d7b3c29d7a5fed80909839043fceafdc3ab25616312a | chrisdone/prana | Windows.hs | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude , MagicHash , UnboxedTuples #
# OPTIONS_GHC -Wno - missing - signatures #
# OPTIONS_HADDOCK not - home #
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Conc.Windows
Copyright : ( c ) The Univers... | null | https://raw.githubusercontent.com/chrisdone/prana/f2e45538937d326aff562b6d49296eaedd015662/prana-boot/packages/base-4.11.1.0/GHC/Conc/Windows.hs | haskell | ---------------------------------------------------------------------------
|
Module : GHC.Conc.Windows
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
Windows I/O manager
---------------------------------------------------------------------------
#not-home
* Waiting
... | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude , MagicHash , UnboxedTuples #
# OPTIONS_GHC -Wno - missing - signatures #
# OPTIONS_HADDOCK not - home #
Copyright : ( c ) The University of Glasgow , 1994 - 2002
Portability : non - portable ( GHC extensions )
module GHC.Conc.Windows
( ens... |
a552e8b11bb3b536b82d6f1e0133fe8cbaf7a847dc5c5f697d8bab978257c857 | startalkIM/ejabberd | http_auth_uk.erl | -module(http_auth_uk).
-export([handle/1]).
-include("ejabberd.hrl").
-include("logger.hrl").
handle(Req) ->
auth_uk(Req).
auth_uk(Req)->
{User, Req1} = cowboy_req:qs_val(<<"u">>, Req),
{Key, Req2} = cowboy_req:qs_val(<<"k">>, Req1),
do_verify_user_key(User, Key, Req2).
do_verify_user_key(undefined,... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/http_auth_uk.erl | erlang | -module(http_auth_uk).
-export([handle/1]).
-include("ejabberd.hrl").
-include("logger.hrl").
handle(Req) ->
auth_uk(Req).
auth_uk(Req)->
{User, Req1} = cowboy_req:qs_val(<<"u">>, Req),
{Key, Req2} = cowboy_req:qs_val(<<"k">>, Req1),
do_verify_user_key(User, Key, Req2).
do_verify_user_key(undefined,... | |
bf2d49ce9f36a4388d67cf41a233cb34d867cd11d791347798096e7810568f70 | facebook/pyre-check | hack_parallel.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/98b8362ffa5c715c708676c1a37a52647ce79fe0/source/hack_parallel/hack_parallel.ml | ocaml | TODO(T132410158) Add a module-level doc comment. |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
b54cc11a8cc5016fc901c73d0d5c2786cc526d8d328b6229ded04ca35bdcefa4 | spechub/Hets | HasCASL2IsabelleHOL.hs | # LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
|
Module : ./Comorphisms / HasCASL2IsabelleHOL.hs
Description : old translation that is only better for case terms
Copyright : ( c ) , , Uni Bremen 2003 - 2006
License : GPLv2 or higher , see LICENSE.txt
... | null | https://raw.githubusercontent.com/spechub/Hets/bbaa9dd2d2e5eb1f2fd3ec6c799a6dde7dee6da2/Comorphisms/HasCASL2IsabelleHOL.hs | haskell | | The identity of the comorphism
* Signature
translation of typeconstructors
translation of operation declarations
translation of datatype declarations
translate the kind here!
* translation of a type in an operation declaration
operation type
types
type arguments are not allowed here!
* translation of a dat... | # LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
|
Module : ./Comorphisms / HasCASL2IsabelleHOL.hs
Description : old translation that is only better for case terms
Copyright : ( c ) , , Uni Bremen 2003 - 2006
License : GPLv2 or higher , see LICENSE.txt
... |
f81b9862f84a557133341955fe02ec82b5931bbdb5c02d474eec321c6e8e831b | ucsd-progsys/liquidhaskell | QQTySyn1.hs | {-@ LIQUID "--expect-any-error" @-}
# LANGUAGE QuasiQuotes #
module QQTySyn1 where
import LiquidHaskell
[lq| type MyNat = { v:Int | 0 <= v } |]
[lq| type MyList a N = { v:[a] | (len v) = N } |]
[lq| nats :: MyList MyNat 12 |]
nats = [0,1,2,3,4,5,6,7,8,9,10]
| null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/QQTySyn1.hs | haskell | @ LIQUID "--expect-any-error" @ | # LANGUAGE QuasiQuotes #
module QQTySyn1 where
import LiquidHaskell
[lq| type MyNat = { v:Int | 0 <= v } |]
[lq| type MyList a N = { v:[a] | (len v) = N } |]
[lq| nats :: MyList MyNat 12 |]
nats = [0,1,2,3,4,5,6,7,8,9,10]
|
1e56ba478a889b6344a7156d993f73bde800a9ac5fc644bdb17b7759cf5d7d1d | ejlilley/AbstractMusic | LilyConvert.hs | # LANGUAGE FlexibleContexts ,
OverlappingInstances ,
TypeSynonymInstances ,
FlexibleInstances #
OverlappingInstances,
TypeSynonymInstances,
FlexibleInstances #-}
module LilyConvert (getScore, lilyExpr, expandExpr) where
import Prelud... | null | https://raw.githubusercontent.com/ejlilley/AbstractMusic/815ab33ee204dd3ebf29076bde330bfdf6938677/LilyConvert.hs | haskell | import Debug.Trace
--------------
setDur d = apDur (\_ -> d)
i.e. we are just ignoring grace notes for now
might always get multiple things back!
Pad out the 'top' phrase by some rests if one of the daughter phrases is longer than it
filterOutList ((Tie _):es) = filterOutList es
filterOutList ((Tup _):es) = filt... | # LANGUAGE FlexibleContexts ,
OverlappingInstances ,
TypeSynonymInstances ,
FlexibleInstances #
OverlappingInstances,
TypeSynonymInstances,
FlexibleInstances #-}
module LilyConvert (getScore, lilyExpr, expandExpr) where
import Prelud... |
c35652f30e9c5816b401fb8bca45d3751ddf8e1275cf3bf450fdcf1ec8e38cf1 | typelead/intellij-eta | EtaSyntaxHighlighterTest.hs | module Tests.EtaSyntaxHighlighterTest where
import P
import FFI.Com.IntelliJ.Psi.PsiFile
import IntelliJ.TestFramework.UsefulTestCase
--------------
FileType --
--------------
data FileType = FileType
@com.intellij.openapi.fileTypes.FileType
deriving Class
-----------------
-- EtaFileType --
---------------... | null | https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/test/eta/Tests/EtaSyntaxHighlighterTest.hs | haskell | ------------
------------
---------------
EtaFileType --
---------------
--------------------------
CodeInsightTestFixture --
--------------------------
-------------------------------------------
LightPlatformCodeInsightFixtureTestCase --
-------------------------------------------
----------------------------
Et... | module Tests.EtaSyntaxHighlighterTest where
import P
import FFI.Com.IntelliJ.Psi.PsiFile
import IntelliJ.TestFramework.UsefulTestCase
data FileType = FileType
@com.intellij.openapi.fileTypes.FileType
deriving Class
data EtaFileType = EtaFileType
@com.typelead.intellij.plugin.eta.lang.EtaFileType
deriving... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.