_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 |
|---|---|---|---|---|---|---|---|---|
6fb2a7e9ae9f6829cc0fadc570d3c58665b5059d4dcd5353150e2afa08d36970 | isovector/type-sets | ShouldNotTypecheck.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE KindSignatures #
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fdefer-type-errors
-fno-warn-deferred-type-errors
#-}
-- TODO(sandy): It would be nice to have a better way of ob... | null | https://raw.githubusercontent.com/isovector/type-sets/03b1ad669a33ca262b48d9cff569d0e1f49212a8/cmptype/test/ShouldNotTypecheck.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# OPTIONS_GHC -fdefer-type-errors
-fno-warn-deferred-type-errors
#
TODO(sandy): It would be nice to have a better way of observing stuckness. | # LANGUAGE KindSignatures #
module ShouldNotTypecheck where
import Data.Proxy
import GHC.TypeLits
import Test.ShouldNotTypecheck
import Type.Compare
type family Stuck :: k
testWrongType1 :: Proxy (CmpType a b) -> Proxy 'LT
testWrongType1 = id
testWrongType2 :: Proxy (CmpType Stuck Int) -> Proxy 'GT
testWrongType... |
b2279f45e56e166597f507db30505530e2dc531309673c94304e0456c78f213a | ocaml-flambda/flambda-backend | CSE.ml | # 2 "backend/amd64/CSE.ml"
(**************************************************************************)
(* *)
(* OCaml *)
(* ... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/712c57c247efe2c4fabb7fb270070d3d809c5076/backend/amd64/CSE.ml | ocaml | ************************************************************************
OCaml
... | # 2 "backend/amd64/CSE.ml"
, projet Gallium , INRIA Rocquencourt
Copyright 2014 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
[@@@ocaml.warning "+4"]
CSE for the AMD64
open Arch
open Mach
open CSEgen
... |
e4b733dff7717e92608c00ce3dde6824c719bffe3251e503efa3edeb3b41666a | cljfx/cljfx | multiple_selection_model.clj | (ns cljfx.ext.multiple-selection-model
(:require [cljfx.coerce :as coerce]
[cljfx.lifecycle :as lifecycle]
[cljfx.mutator :as mutator]
[cljfx.prop :as prop]
[cljfx.ext.selection-model :as ext.selection-model])
(:import [javafx.scene.control MultipleSelectionModel Sele... | null | https://raw.githubusercontent.com/cljfx/cljfx/bfd7bd15c436b7f2ee5fc66c1d944ba02fe949c2/src/cljfx/ext/multiple_selection_model.clj | clojure | (ns cljfx.ext.multiple-selection-model
(:require [cljfx.coerce :as coerce]
[cljfx.lifecycle :as lifecycle]
[cljfx.mutator :as mutator]
[cljfx.prop :as prop]
[cljfx.ext.selection-model :as ext.selection-model])
(:import [javafx.scene.control MultipleSelectionModel Sele... | |
e72565a57073f7862aebc9e39088a2e0a4a4bc663ace73911678b822ae1692e1 | Clozure/ccl-tests | bit-xor.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Jan 26 19:35:46 2003
;;;; Contains: Tests of BIT-XOR
(in-package :cl-test)
(compile-and-load "bit-aux.lsp")
(deftest bit-xor.1
(let* ((s1 (make-array nil :initial-element 0 :element-type 'bit))
(s2 (make-array nil :initial-element 0 :element-type 'bit)))
... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/bit-xor.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of BIT-XOR
Tests on bit vectors
Tests on bit arrays
Adjustable arrays
Displaced arrays
Random tests
Error tests | Author :
Created : Sun Jan 26 19:35:46 2003
(in-package :cl-test)
(compile-and-load "bit-aux.lsp")
(deftest bit-xor.1
(let* ((s1 (make-array nil :initial-element 0 :element-type 'bit))
(s2 (make-array nil :initial-element 0 :element-type 'bit)))
(values (bit-xor s1 s2) s1 s2))
#0a0
#0a0
#0a0... |
dae11e4f8f9c29d335084337d6615165cdcf25b65543f7b6e07c2b541d7684b7 | stepcut/minecraft-data | Level.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
module Minecraft.Level where
import Control.Lens.TH (makeLenses)
import Data.Data (Data)
import Data.Time.Clock.POSIX (POSIXTime)
import Data.Typeable (... | null | https://raw.githubusercontent.com/stepcut/minecraft-data/2fa9508de9e21a3ed4835760656383fae6a9eb4b/Minecraft/Level.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
^ True
^ True
^ True
^ True
^ True
^ True
^ False
^ True
^ True
^ True
^ True
^ True
^ False
^ usually 0
^ currently unused
^ default Normal
^ 6.0e7
^ level name
^ random seed
^ XpSeed | # LANGUAGE TemplateHaskell #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE DeriveGeneric #
module Minecraft.Level where
import Control.Lens.TH (makeLenses)
import Data.Data (Data)
import Data.Time.Clock.POSIX (POSIXTime)
import Data.Typeable (Typeable)
import Data.NBT
import Data.Int (Int32, Int64)
import Data.Te... |
8ac7b62c69fb8a0f092416e80a8abedb07b001b508e1c3cc2946f2b23950481b | haskell/haskell-language-server | CodeAction.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE OverloadedLists #
# LANGUAGE RecordWildCards #
{-# LANGUAGE ViewPatterns #-}
module Ide.Plugin.Class.CodeAction where
import Control.Applicative (liftA2)
import Control.Lens hiding (List, use)
import ... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/6e76fce3d80a05732a209f47e0bbea44edf584ae/plugins/hls-class-plugin/src/Ide/Plugin/Class/CodeAction.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE ViewPatterns #
|
This implementation is ad-hoc in a sense that the diagnostic detection mechanism is
| Recurses through the given AST to find identifiers which are
'InstanceValBind's.
Return [groupName text, [(methodName text, signature text)]] | # LANGUAGE OverloadedLists #
# LANGUAGE RecordWildCards #
module Ide.Plugin.Class.CodeAction where
import Control.Applicative (liftA2)
import Control.Lens hiding (List, use)
import Control.Monad.Extra
import Control.Monad.IO.Class ... |
4c6349b02e8e248805e4a3bb0090b63518e19c2729b438afc337cb452943d32a | sadiqj/ocaml-esp32 | bigarray.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/otherlibs/bigarray/bigarray.ml | ocaml | ************************************************************************
OCaml
... | et ,
Copyright 2000 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
include CamlinternalBigarray
Keep those constants in sync with the enumeration
in bigarray.h
in bigarray.h *)
let float32 ... |
c695c0b20f91ec4a3047ec6dd9cfbf0a32c6d5f2be702a2d403f43490835428b | fccm/OCamlSDL2 | ex_text_input.ml | This example requires a terminal with a UTF-8 locale
let () =
let width, height = (200, 200) in
Sdl.init [`VIDEO];
let window, renderer =
Sdlrender.create_window_and_renderer ~width ~height ~flags:[]
in
Sdlrender.set_draw_color renderer (0,0,0) 255;
Sdlrender.clear renderer;
let text = ref "" in
... | null | https://raw.githubusercontent.com/fccm/OCamlSDL2/01fa29187cab90052d2581eb509d1bca1a85418f/examples/ex_text_input.ml | ocaml | Add the text to the already edited text | This example requires a terminal with a UTF-8 locale
let () =
let width, height = (200, 200) in
Sdl.init [`VIDEO];
let window, renderer =
Sdlrender.create_window_and_renderer ~width ~height ~flags:[]
in
Sdlrender.set_draw_color renderer (0,0,0) 255;
Sdlrender.clear renderer;
let text = ref "" in
... |
1d4dfd39f28eb77457f62ad7147e8c10e8cd0c807b1a253f55e11db99e9e24c0 | facebook/infer | CReplaceDynamicDispatch.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/facebook/infer/fea5b712537ed22711dd3b95d2a4d45776d68061/infer/src/clang/CReplaceDynamicDispatch.mli | ocaml | * Replace placeholder method call with the actual method |
* 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
... |
68f3e2740cc12fc365ca5d60829f8996c9a25aeb1390e3fdb30bb85f3b5f0121 | reynir/oneffs | oneFFS.ml | open Lwt.Syntax
module Header = struct
type t = {
length : int;
file_crc : Checkseum.Crc32.t;
}
structure :
magic header ' \x1f\x1f '
file length : uint64 ;
file_crc32 : uint32 ;
header_crc32 : uint32 ;
reserved : remaining space of sector
magic hea... | null | https://raw.githubusercontent.com/reynir/oneffs/ccba8241a1a687ca2e6ecdd518c5b687034257ce/lib/oneFFS.ml | ocaml | if it's all zeroed we treat it as empty
Reuse the buffer for the empty header | open Lwt.Syntax
module Header = struct
type t = {
length : int;
file_crc : Checkseum.Crc32.t;
}
structure :
magic header ' \x1f\x1f '
file length : uint64 ;
file_crc32 : uint32 ;
header_crc32 : uint32 ;
reserved : remaining space of sector
magic hea... |
88bd60328db42d33ae551c0c516952bbecce45d644810979fb8d94a9a556a7a4 | awslabs/s2n-bignum | bignum_mod_n384.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/arm/proofs/bignum_mod_n384.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "arm/p384/bignum_mod_n384.o";;
***
arm_MOV X15 (rvalue (word 54925))
arm_ADDS X9 X3 X15
arm_CSEL X8 X8 X14 Condition_CC
arm_CSETM X9 ... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
Reduction modulo n_384 , the order of the NIST curve P-384 ... |
0893be438b932131e013e2d996fab431aa6c50fa5c88e02fc04c345c329de8b1 | haskell/haskell-language-server | GHC.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
module Wingman.GHC where
import Control.Monad.State
import Control.Monad.Trans.Maybe (MaybeT(..))
import Data.Bool (bool)
import Data.Coerce (coerce)
import Data.Function (on)
import Data.Fun... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/src/Wingman/GHC.hs | haskell | # LANGUAGE OverloadedStrings #
look through casts, as
this is only used for
'w' for wingman ;D
----------------------------------------------------------------------------
| Is this a function type?
----------------------------------------------------------------------------
| Split a function, also splitting out ... | # LANGUAGE CPP #
module Wingman.GHC where
import Control.Monad.State
import Control.Monad.Trans.Maybe (MaybeT(..))
import Data.Bool (bool)
import Data.Coerce (coerce)
import Data.Function (on)
import Data.Functor ((<&>))
import Data.... |
151ce6e390ca44c7118e0996c990b98045d340807bc8faebd3c05aa78efbdf9d | SamirTalwar/advent-of-code | Point.hs | {-# OPTIONS -Wall #-}
module Helpers.Point
( Point (..),
withinBounds,
allPointsWithinBounds,
neighboringPoints,
neighboringPointsWithDiagonals,
)
where
import Data.Ix
import Data.Set (Set)
import qualified Data.Set as Set
data Point = Point {pY :: Int, pX :: Int}
deriving (Eq, Ord, Bounded, Ix... | null | https://raw.githubusercontent.com/SamirTalwar/advent-of-code/c949ac6061b27b953e39c05ca0864a20ec499dae/2021/Helpers/Point.hs | haskell | # OPTIONS -Wall # |
module Helpers.Point
( Point (..),
withinBounds,
allPointsWithinBounds,
neighboringPoints,
neighboringPointsWithDiagonals,
)
where
import Data.Ix
import Data.Set (Set)
import qualified Data.Set as Set
data Point = Point {pY :: Int, pX :: Int}
deriving (Eq, Ord, Bounded, Ix)
instance Show Point... |
66cea58c993195a2a6dd22c01bcec8dd1f5ac51b15f1fc774c32ac90483cc3ca | sph-mn/sph-lib | csv.scm | ;; guile-csv
Copyright ( C ) 2008 , 2012 , 2013
< wingo at pobox dot com >
< >
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation ; either version 3 of the
;; License, or (at you... | null | https://raw.githubusercontent.com/sph-mn/sph-lib/c7daf74f42d6bd1304f49c2fef89dcd6dd94fdc9/modules/csv/csv.scm | scheme | guile-csv
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
either version 3 of the
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 ... | Copyright ( C ) 2008 , 2012 , 2013
< wingo at pobox dot com >
< >
You should have received a copy of the GNU Lesser General Public
Free Software Foundation , Inc. Voice : +1 - 617 - 542 - 5942
51 Franklin Street , Fifth Floor Fax : +1 - 617 - 542 - 2652
Boston , MA 02110 - 1301 , U... |
1116dd402dae1a64eae394feb19e9d1378d511a8866812158ef74da8429a05c0 | PapenfussLab/bioshake | Bedtools.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TemplateHaskell #-}
module Bioshake.Cluster.Bedtools where
import Bioshake
import Bioshake.Cluster.Torque
import Bioshake.Internal.Bedtools
import Bio... | null | https://raw.githubusercontent.com/PapenfussLab/bioshake/afeb7219b171e242b6e9bb9e99e2f80c0a099aff/Bioshake/Cluster/Bedtools.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell # | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Bioshake.Cluster.Bedtools where
import Bioshake
import Bioshake.Cluster.Torque
import Bioshake.Internal.Bedtools
import Bioshake.TH
import Development.Shake
import Development.Shake... |
67f9d6573f851e6dfda00b6d0a6e7f7bde31d524aae31bf4a828f744270199be | beamparticle/beamparticle | beamparticle_pools.erl | %%%-------------------------------------------------------------------
@author neerajsharma
( C ) 2017 , < >
%%% @doc
%%%
%%% @end
%%% %CopyrightBegin%
%%%
Copyright < > 2017 .
All Rights Reserved .
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file ... | null | https://raw.githubusercontent.com/beamparticle/beamparticle/65dcea1569d06b331b08cd9f8018ece4b176b690/src/beamparticle_pools.erl | erlang | -------------------------------------------------------------------
@doc
@end
%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 CONDITIO... | @author neerajsharma
( C ) 2017 , < >
Copyright < > 2017 .
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(beamparticle_pools).
-export([load/0, add_worker/5, add/5, add/6, delet... |
fb8f73c543e8ef450ecec28fae7c730fc8c53b020e16a2f594a6d48983574726 | venantius/glow | colorschemes.clj | (ns glow.colorschemes
"A namespace for holding various terminal and web colorschemes.")
;; Terminal
(def terminal-default
{:exception :green
:repeat :green
:conditional :green
:variable :blue
:core-fn :blue
:definition :bright-red
:reader-char :red
:special-form :red
:macro :bright-red
... | null | https://raw.githubusercontent.com/venantius/glow/17698a3621ba2f7d09f7c786764a21b13f90f6c3/src/glow/colorschemes.clj | clojure | Terminal
web | (ns glow.colorschemes
"A namespace for holding various terminal and web colorschemes.")
(def terminal-default
{:exception :green
:repeat :green
:conditional :green
:variable :blue
:core-fn :blue
:definition :bright-red
:reader-char :red
:special-form :red
:macro :bright-red
:number :cy... |
99d80e9c4baa05053257c1af72c7b5e6e739a464d25fc7e52f7657c7ccefaa9f | cuplv/dai | addr.ml | open Dai
open Import
include Syntax.Alloc_site
module Abstract = struct
include Set [@@deriving sexp]
let hash = seeded_hash
let of_alloc_site = singleton
end
| null | https://raw.githubusercontent.com/cuplv/dai/69ef46ca58160b75317c8c9e0f47ef8dc9ade582/src/analysis/domain/addr.ml | ocaml | open Dai
open Import
include Syntax.Alloc_site
module Abstract = struct
include Set [@@deriving sexp]
let hash = seeded_hash
let of_alloc_site = singleton
end
| |
674185656cdc44e009c1b6639663f58e3b079078f1a75601be4d34f5cffd695c | helpshift/hydrox | midje_test.clj | (ns hydrox.analyse.test.midje-test
(:use midje.sweet)
(:require [hydrox.analyse.test.midje :refer :all]
[hydrox.analyse.test.common :as common]
[rewrite-clj.zip :as z]))
^{:refer hydrox.analyse.test.midje/gather-fact :added "0.1"}
(fact "Make docstring notation out of fact form"
(-> "^{:r... | null | https://raw.githubusercontent.com/helpshift/hydrox/2beb3c56fad43bbf16f07db7ee72c5862978350c/test/hydrox/analyse/test/midje_test.clj | clojure | (ns hydrox.analyse.test.midje-test
(:use midje.sweet)
(:require [hydrox.analyse.test.midje :refer :all]
[hydrox.analyse.test.common :as common]
[rewrite-clj.zip :as z]))
^{:refer hydrox.analyse.test.midje/gather-fact :added "0.1"}
(fact "Make docstring notation out of fact form"
(-> "^{:r... | |
9b9843da4bb72e79ef8bf8e4546961e10198380428f764093f4759f07374fa13 | herd/herdtools7 | CType.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/bf8f4b801fe87d91ddcabdde7116f00c4f4155eb/lib/CType.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2014 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
ceaea4ae73fee525686680584fbcc90fcd909ddac02b048a7d3824f6e8f5c7c4 | ghc/ghc | Env.hs |
# LANGUAGE NamedFieldPuns #
# LANGUAGE TypeApplications #
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 2006
GHC.Rename . Env contains functions which convert RdrNames into Names .
(c) The GRASP/AQUA Project, Glasgow University, 1992-2006
GHC.Rename.Env contains functions which convert RdrName... | null | https://raw.githubusercontent.com/ghc/ghc/f70a0239490ebea25e50c61c01f945d8df41e92f/compiler/GHC/Rename/Env.hs | haskell | Called by lookupChildrenExport
Rebindable Syntax
QualifiedDo
Constructing usage information
TODO: Move this somewhere, into utils?
# DEPRECATED T, f "Don't use" #
This is here to catch
the parser reads the special syntax and returns an Exact RdrName
very confused indeed. This test rejects code like
d... |
# LANGUAGE NamedFieldPuns #
# LANGUAGE TypeApplications #
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 2006
GHC.Rename . Env contains functions which convert RdrNames into Names .
(c) The GRASP/AQUA Project, Glasgow University, 1992-2006
GHC.Rename.Env contains functions which convert RdrName... |
88e601edbb9e467f5540d265e58861109111a51b03a388df454f5d2838355d54 | w7cook/AoPL | Operators.hs | module Operators where
import Prelude hiding (EQ)
--BEGIN:UnBinOps
data BinaryOp = Add | Sub | Mul | Div | And | Or
| GT | LT | LE | GE | EQ
deriving (Show, Eq)
data UnaryOp = Neg | Not
deriving (Show, Eq)
--END:UnBinOps
| null | https://raw.githubusercontent.com/w7cook/AoPL/af2f9d31ec658e9d175735335ad27101cca3e247/src/Operators.hs | haskell | BEGIN:UnBinOps
END:UnBinOps | module Operators where
import Prelude hiding (EQ)
data BinaryOp = Add | Sub | Mul | Div | And | Or
| GT | LT | LE | GE | EQ
deriving (Show, Eq)
data UnaryOp = Neg | Not
deriving (Show, Eq)
|
df826929decc0fe466210ab0c76320aa5d0c6be248ef87e34b52bab03eab7550 | onedata/op-worker | router.erl | %%%-------------------------------------------------------------------
@author
( C ) 2015 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This module decides where to route... | null | https://raw.githubusercontent.com/onedata/op-worker/b2036d05fff39d174a6345209d66ba292948a82b/src/modules/communication/router/router.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This module decides where to route received messages.
@end
-------------------------------------------------------------------
API
information for routing messages. It ... | @author
( C ) 2015 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(router).
-author("Tomasz Lichon").
-include("proto/oneclient/fuse_messages.hrl").
-include("proto/oneclient/server_messages.hrl").
-include("proto/oneclient/client_messages.hrl").
-include(... |
2cda40e3e96336b9372e5e552a46736641d153e04df6bde11ba14142d5c78202 | drewolson/aoc-hs | Day14Spec.hs | module Aoc.Year2021.Day14Spec
( spec,
)
where
import Aoc.Year2021.Day14 qualified as Day14
import Test.Hspec (Spec, describe, it, shouldBe)
import Text.RawString.QQ (r)
input :: String
input =
[r|NNCB
CH -> B
HH -> N
CB -> H
NH -> C
HB -> C
HC -> B
HN -> C
NN -> C
BH -> H
NC -> B
NB -> B
BN -> B
BB -> N
BC -> ... | null | https://raw.githubusercontent.com/drewolson/aoc-hs/b0f06843e1f7d8c2af1da582e59a72d8f2bb73bf/aoc-year2021/test/Aoc/Year2021/Day14Spec.hs | haskell | module Aoc.Year2021.Day14Spec
( spec,
)
where
import Aoc.Year2021.Day14 qualified as Day14
import Test.Hspec (Spec, describe, it, shouldBe)
import Text.RawString.QQ (r)
input :: String
input =
[r|NNCB
CH -> B
HH -> N
CB -> H
NH -> C
HB -> C
HC -> B
HN -> C
NN -> C
BH -> H
NC -> B
NB -> B
BN -> B
BB -> N
BC -> ... | |
ed24a993bae971083f3e05be853aa996b5c99539eda79ccc372c5d350007fb81 | mzp/coq-ide-for-ios | ppconstr.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/parsing/ppconstr.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
$Id: ppconstr.ml 13358 2010-07-29 2... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
open Pp
open Namet... |
46563c85c59f61ede2be4181a1f9826ed1ebf61e905cd7b0aaa9596d80fd2a4d | softwarelanguageslab/maf | R5RS_sigscheme_case-5.scm | ; Changes:
* removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((loop (lambda (i l)
(if (let ((__or_res (eq? 6 1))) (if (<change> __or_res (not __or_res)) __or_res (let ((__or_res (eq? 6 2))) (if __or_res __or_res (let ((__or_res... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_sigscheme_case-5.scm | scheme | Changes:
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
(letrec ((loop (lambda (i l)
(if (let ((__or_res (eq? 6 1))) (if (<change> __or_res (not __or_res)) __or_res (let ((__or_res (eq? 6 2))) (if __or_res __or_res (let ((__or_res (eq? 6 3))) (if __or_res __or_res (let ((__or_res (eq? 6 ... |
5e71a718a35932f3f7658b3c30b2eb3578c51554240342e4527dc2994b589acc | dalaing/little-languages | Fix1.hs | module Fix1 where
import Data.Bifunctor
import Data.Bifoldable
import Data.Bitraversable
data Fix1 f a = Fix1 { unFix1 :: f (Fix1 f a) a }
instance Bifunctor f => Functor (Fix1 f) where
fmap f = Fix1 . bimap (fmap f) f . unFix1
instance Bifoldable f => Foldable (Fix1 f) where
foldMap f = bifoldMap (foldMap f) f... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/ll-util/src/Fix1.hs | haskell | module Fix1 where
import Data.Bifunctor
import Data.Bifoldable
import Data.Bitraversable
data Fix1 f a = Fix1 { unFix1 :: f (Fix1 f a) a }
instance Bifunctor f => Functor (Fix1 f) where
fmap f = Fix1 . bimap (fmap f) f . unFix1
instance Bifoldable f => Foldable (Fix1 f) where
foldMap f = bifoldMap (foldMap f) f... | |
ef9d50c2a34b3a1727ce2750ee44688a7dfe42011928f57e693aca20afd59b63 | triffon/fp-2022-23 | example-solutions-2021.rkt | #lang racket
(define (accumulate op nv a b term next)
(if (> a b)
nv
(op (term a) (accumulate op nv (next a) b term next))))
1 задача
(define (id x) x)
(define (1+ x) (+ x 1))
(define (sum-divisors n)
(accumulate
(lambda (x y) (if (= (remainder n x) 0) (+ x y) y))
0 1 (- n 1) id 1+))
(defi... | null | https://raw.githubusercontent.com/triffon/fp-2022-23/af195d1df718d5df4b6ef0b960b9f6dd4c185b7c/exercises/elective/06-matrices-and-exam-prep/example-solutions-2021.rkt | racket | #lang racket
(define (accumulate op nv a b term next)
(if (> a b)
nv
(op (term a) (accumulate op nv (next a) b term next))))
1 задача
(define (id x) x)
(define (1+ x) (+ x 1))
(define (sum-divisors n)
(accumulate
(lambda (x y) (if (= (remainder n x) 0) (+ x y) y))
0 1 (- n 1) id 1+))
(defi... | |
dad2c18a62ecc1169d6fd4fa464c168d8f39f48eb8fb2b2214938ff03b8c408e | kupl/FixML | sub7.ml |
type btree = Empty | Node of int * btree * btree
let rec mirror : btree -> btree
=fun t -> match t with Node(a,b,c)
-> if (b = Empty) && (c = Empty) then t
else if (b = Empty) then Node(a, (mirror c), Empty)
else if (c = Empty) then Node(a, Empty, (mirror b))
else Node(a, (mirror c), (mirror b))
| null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/mirror/mirror/submissions/sub7.ml | ocaml |
type btree = Empty | Node of int * btree * btree
let rec mirror : btree -> btree
=fun t -> match t with Node(a,b,c)
-> if (b = Empty) && (c = Empty) then t
else if (b = Empty) then Node(a, (mirror c), Empty)
else if (c = Empty) then Node(a, Empty, (mirror b))
else Node(a, (mirror c), (mirror b))
| |
77a75b7d9cddd2ea4a14ba492dfc0a54e2a9fb1aad9f8265d23191450dd417ea | f-o-a-m/kepler | Events.hs | module Tendermint.SDK.BaseApp.Events
(
-- * Class
ToEvent(..)
, ContextEvent(..)
-- * Effect
, emit
, logEvent
-- * Re-Exports
, Event(..)
) where
import qualified Data.Aeson as A
import qualified Data.ByteArray.Base64String as Base64
import qualified Data... | null | https://raw.githubusercontent.com/f-o-a-m/kepler/6c1ad7f37683f509c2f1660e3561062307d3056b/hs-abci-sdk/src/Tendermint/SDK/BaseApp/Events.hs | haskell | * Class
* Effect
* Re-Exports
TODO : These JSON instances are fragile but convenient. We
should come up with a custom solution.
| A class representing a type that can be emitted as an event in the
| event logs for the deliverTx response.
| Special event wrapper to add contextual event_type info | module Tendermint.SDK.BaseApp.Events
(
ToEvent(..)
, ContextEvent(..)
, emit
, logEvent
, Event(..)
) where
import qualified Data.Aeson as A
import qualified Data.ByteArray.Base64String as Base64
import qualified Data.ByteString as BS
impo... |
d5063d87729c375d6c2539b7ec5fe177869f2e295e81fde41193c61234d393c7 | bmeurer/ocaml-arm | lexing.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/stdlib/lexing.ml | ocaml | *********************************************************************
OCaml
... | , 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 GNU Library General Public License , with
$ Id$
type position = {
pos_fname... |
47d18c024cc14ec123c5bc1e5ca8a31f60d1228d8361df0e0e33bed2e40c6863 | MMagueta/MMaguetaGuix | binary-build-system.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2019 < >
;;;
;;; This file is not part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the ... | null | https://raw.githubusercontent.com/MMagueta/MMaguetaGuix/0490ffc33bc7d269e2b586637a76e7fe7914fbfb/nonguix/build/binary-build-system.scm | scheme | GNU Guix --- Functional package management for GNU
This file is not part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implie... | Copyright © 2019 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (nonguix build binary-build-system)
#:use-module ((guix build gnu-build-system) #:prefix gnu:)
... |
d3006ed26893a52900e2400259b2b26855b1a517f6f8fc00bea135fe2e695227 | Nayshins/ocaml-tic-tac-toe | iO.mli | open Core.Std
module type IO = sig
val get_player_input : unit -> string
val get_player_integer_input : unit -> int
val print_to_console : string -> unit
val print_board : Token.token list -> unit
val print_newline : unit -> unit
end
| null | https://raw.githubusercontent.com/Nayshins/ocaml-tic-tac-toe/a177feed4938552ce7df79f0e4d09b24cdcb3667/src/iO.mli | ocaml | open Core.Std
module type IO = sig
val get_player_input : unit -> string
val get_player_integer_input : unit -> int
val print_to_console : string -> unit
val print_board : Token.token list -> unit
val print_newline : unit -> unit
end
| |
3dcc8f5d68331e060783ced4a7d87a5e5733f4e895e2973e7f7bdf41f2571951 | dweldon/riakpool | riakpool_client.erl | @author
%% @doc riakpool_client is a collection of convenience functions for using
%% riakpool.
-module(riakpool_client).
-export([delete/2, get/2, list_keys/1, post/3, put/3]).
%% @doc Delete `Key' from `Bucket'.
-spec delete(binary(), binary()) -> ok.
delete(Bucket, Key) ->
riakpool:execute(fun(C) -> riakc_... | null | https://raw.githubusercontent.com/dweldon/riakpool/57ce9f9fd033b75d1f8dd3400460b801cc8afaff/src/riakpool_client.erl | erlang | @doc riakpool_client is a collection of convenience functions for using
riakpool.
@doc Delete `Key' from `Bucket'.
@doc Returns the value associated with `Key' in `Bucket' as `{ok, binary()}'.
If an error was encountered or the value was not present, returns
`{error, any()}'.
@doc Returns the list of keys in `Bu... | @author
-module(riakpool_client).
-export([delete/2, get/2, list_keys/1, post/3, put/3]).
-spec delete(binary(), binary()) -> ok.
delete(Bucket, Key) ->
riakpool:execute(fun(C) -> riakc_pb_socket:delete(C, Bucket, Key) end), ok.
-spec get(binary(), binary()) -> {ok, binary()} | {error, any()}.
get(Bucket, Ke... |
8e31269877ac8524c2e2b79bdb909ad7735f177c650d8b747917a2ec84168714 | haskell-gi/haskell-gi | CellLayout.hs | # LANGUAGE LambdaCase #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE MonoLocalBinds #
-- -*-haskell-*-
-- GIMP Toolkit (GTK) Interface CellLayout
--
Author :
--
Created : 23 January 2006
--
Copyright ( C ) 2016 - 2016 ,
--
-- This library is free software; you can redistribute it... | null | https://raw.githubusercontent.com/haskell-gi/haskell-gi/bff8f3b92bf2594ea3d6745c346a8de594fc3709/gi-gtk-hs/src/Data/GI/Gtk/ModelView/CellLayout.hs | haskell | -*-haskell-*-
GIMP Toolkit (GTK) Interface CellLayout
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
... | # LANGUAGE LambdaCase #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE MonoLocalBinds #
Author :
Created : 23 January 2006
Copyright ( C ) 2016 - 2016 ,
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later ve... |
efcbd85ae0f77814c9c6b297730e261b2d1c608d39038e13aa24ea35c6e3eca0 | sweirich/tal | F.hs | module F where
import Unbound.Generics.LocallyNameless
( string2Name,
aeq,
bind,
lunbind,
unbind,
Alpha,
Bind,
Embed(..),
Name,
Subst(isvar, subst, substs),
SubstName(SubstName) )
import Control.Monad.Trans.Except ( throwE )
import qualified Data.List as... | null | https://raw.githubusercontent.com/sweirich/tal/b07b50ff58213d04edd2479e82f605a409197e9c/src/F.hs | haskell | ----------------------------------------------------
----------------------------------------------------
----------------------------------------------------
Use unbound-generics to derive substitution, alpha-equivalence
and free variable functions
----------------------------------------------------
---------------... | module F where
import Unbound.Generics.LocallyNameless
( string2Name,
aeq,
bind,
lunbind,
unbind,
Alpha,
Bind,
Embed(..),
Name,
Subst(isvar, subst, substs),
SubstName(SubstName) )
import Control.Monad.Trans.Except ( throwE )
import qualified Data.List as... |
94832f18b0f9cdb3abbed954c80af5db78ad5ec73f763dec99aa05be3156c7dd | malcolmstill/cl-libinput | package.lisp | package.lisp
(defpackage #:libinput
(:use #:cl #:cffi)
(:export
unref
path-create-context
path-add-device
path-remove-device
get-fd
dispatch
device-ref
device-unref
device-cap-keyboard
device-cap-pointer
device-cap-touch
device-cap-tablet-tool
device-cap-tablet-pad
devi... | null | https://raw.githubusercontent.com/malcolmstill/cl-libinput/fdc6b88c3619491bf10ba476837ef8f8692352b2/package.lisp | lisp | package.lisp
(defpackage #:libinput
(:use #:cl #:cffi)
(:export
unref
path-create-context
path-add-device
path-remove-device
get-fd
dispatch
device-ref
device-unref
device-cap-keyboard
device-cap-pointer
device-cap-touch
device-cap-tablet-tool
device-cap-tablet-pad
devi... | |
c8434de5f2c8ccafc87dba9cc621fc7aed4818fa4f652d6ddd90eb6dd72ae8fb | pallet/pallet | crontab_test.clj | (ns pallet.crate.crontab-test
(:require
[clojure.string :refer [trim]]
[clojure.test :refer :all]
[pallet.action :refer [clj-action]]
[pallet.actions :refer [exec-checked-script remote-file remote-file-content]]
[pallet.algo.fsmop :refer [complete? operate]]
[pallet.api :refer [plan-fn]]
[pallet.... | null | https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/test/pallet/crate/crontab_test.clj | clojure | (ns pallet.crate.crontab-test
(:require
[clojure.string :refer [trim]]
[clojure.test :refer :all]
[pallet.action :refer [clj-action]]
[pallet.actions :refer [exec-checked-script remote-file remote-file-content]]
[pallet.algo.fsmop :refer [complete? operate]]
[pallet.api :refer [plan-fn]]
[pallet.... | |
6b6c9275896cd971ae0653ad8f84f81aa912aa4eb0458fa638422ab9ad0570c0 | UU-ComputerScience/uhc | Main.hs | {-# OPTIONS_GHC -fexcess-precision #-}
import System.Environment
integrate1D :: Double -> Double -> (Double->Double) -> Double
integrate1D l u f | l `seq` u `seq` False = undefined
integrate1D l u f =
let d = (u-l)/8.0 in
d * sum
[ (f l)*0.5,
f (l+d),
f (l+(2.0*d)),
f (l+(3.0*d)... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/benchmark/nofib/imag/integrate/Main.hs | haskell | # OPTIONS_GHC -fexcess-precision # |
import System.Environment
integrate1D :: Double -> Double -> (Double->Double) -> Double
integrate1D l u f | l `seq` u `seq` False = undefined
integrate1D l u f =
let d = (u-l)/8.0 in
d * sum
[ (f l)*0.5,
f (l+d),
f (l+(2.0*d)),
f (l+(3.0*d)),
f (l+(4.0*d)),
f (u-... |
09d5f449c18a7d429d490d21c01d3854156a3cc039d34703a494ce0f192c84f5 | nikita-volkov/rerebase | Safe.hs | module Control.Monad.ST.Safe
(
module Rebase.Control.Monad.ST.Safe
)
where
import Rebase.Control.Monad.ST.Safe
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Control/Monad/ST/Safe.hs | haskell | module Control.Monad.ST.Safe
(
module Rebase.Control.Monad.ST.Safe
)
where
import Rebase.Control.Monad.ST.Safe
| |
16cf8fcde9dfbe7ac476c9b97b5a8107f614706a4433979abb93dfd132fd0760 | mirage/cowabloga | feed.ml |
* Copyright ( c ) 2013 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... | null | https://raw.githubusercontent.com/mirage/cowabloga/2c256a92258f012c095bb72edcb639ad2fe164b3/lib/feed.ml | ocaml | * Generate an aggregated link feed from all the other feeds
TODO: Proper URL routing
Find an alternate HTML link |
* Copyright ( c ) 2013 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... |
e717dfac47a8bcb4ab58c5b1829762e51dec80371d332b215b6100851a48fb9a | well-typed/large-records | R080.hs | # LANGUAGE TypeApplications #
#if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
module Experiment.Induction_List.Sized.R080 where
import Data.Proxy
import Common.EmptyClass_List
import Co... | null | https://raw.githubusercontent.com/well-typed/large-records/c6c2b51af11e90f30822543d7ce4d1cb28cee294/large-records-benchmarks/bench/experiments/Experiment/Induction_List/Sized/R080.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings # | # LANGUAGE TypeApplications #
#if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.Induction_List.Sized.R080 where
import Data.Proxy
import Common.EmptyClass_List
import Common.HListOfSize.HL080
requiresInstance :: ()
requiresInstance = requireEmptyClass (Proxy @ExampleFields)
|
7a50bbff82b31366c457677ec155219be4e3d188fb915dcb730f036e31bf8175 | S8A/htdp-exercises | ex042.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex042) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex042.rkt | racket | about the language level of this file in a form that our tools can easily process.
..:: Constants ::..
Single point of control
Car
Velocity of the car (number of pixels travelled per tick)
Distance after t ticks at velocity V
Tree
World scene
..:: Functions ::..
interpretation the number of pixels between
th... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex042) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ... |
a25cf59b962c1ff42e4b43cbfed98a3594827e2d625e2454db6f80d62167c5d4 | Copilot-Language/copilot | What4.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE PatternSynon... | null | https://raw.githubusercontent.com/Copilot-Language/copilot/e2ff17c227def75f536080c427ada5ce025ca4ab/copilot-theorem/src/Copilot/Theorem/What4.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE GADTs #
# LANGUAGE MultiWayIf #
# LANGUAGE PatternSynonyms #
# LANGUAGE RankNTypes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
|
Module : Copilot.Theorem.What4
... | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications ... |
7c78316404621f0cd4cbd2abe4671eac185a21d26b5d44e6ce672691d4fa026f | betaveros/bcodex | CxUtils.hs | module Text.Bcodex.CxUtils (
CxLeft(..), CxElem, CxList, showCxLeft,
mapExtraStrings,
intersperseDelimSpaces, ungroupWithDelimSpaces,
concatExtraStrings,
extraOrDelim,
delimOrShrink,
crunchDelimiterLefts,
crunchMorseDelimiterLefts,
concatMapAllChars,
mapAllChars,
freezeCharCl... | null | https://raw.githubusercontent.com/betaveros/bcodex/90fadbf8215efa932212ae95fb5573df835f0c90/Text/Bcodex/CxUtils.hs | haskell | Unlike `lines` this will not ignore a trailing newline
remaining lines, so the type signature better captures what it does.
one use is quite enough to justify that dependency...
I have a feeling I should trade off some correctness for simplicity here... | module Text.Bcodex.CxUtils (
CxLeft(..), CxElem, CxList, showCxLeft,
mapExtraStrings,
intersperseDelimSpaces, ungroupWithDelimSpaces,
concatExtraStrings,
extraOrDelim,
delimOrShrink,
crunchDelimiterLefts,
crunchMorseDelimiterLefts,
concatMapAllChars,
mapAllChars,
freezeCharCl... |
5a8633407e6364469b9382a7f5611c61c9c2c1bd1c1b526db719f9118f4972f3 | lemaetech/http-cookie | http_cookie.mli | -------------------------------------------------------------------------
* Copyright ( c ) 2019 , 2020 . All rights reserved .
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License , v. 2.0 . If a copy of the MPL was not distributed with this
* file , You can obtain one a... | null | https://raw.githubusercontent.com/lemaetech/http-cookie/a6c9d09e5843366a3dcefd256fe6c7ff2b1afc99/lib/http_cookie.mli | ocaml | * A comprehensive and standards compliant HTTP cookies library for ocaml.
HTTP cookie is serialized as follows:
- In a [Cookie] header in a HTTP request
- In a [Set-Cookie] header in a HTTP response.
The library supports consuming and creating HTTP cookie in both requests and
responses.
The ... | -------------------------------------------------------------------------
* Copyright ( c ) 2019 , 2020 . All rights reserved .
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License , v. 2.0 . If a copy of the MPL was not distributed with this
* file , You can obtain one a... |
cb412a61a8ffbebddfcd7f85f7fe7eb5283163433662512c2d81f106b67e1e06 | vvvvalvalval/reagent-phonecat-tutorial | handler.clj | (ns reagent-phonecat.handler
(:require [compojure.core :refer [GET defroutes]]
[compojure.route :refer [not-found resources]]
[ring.middleware.defaults :refer [site-defaults wrap-defaults]]
[ring.middleware.resource :refer [wrap-resource]]
[prone.middleware :refer [wrap... | null | https://raw.githubusercontent.com/vvvvalvalval/reagent-phonecat-tutorial/3207c9cfcb81e423f3074502cba2e570cd2ef274/src/clj/reagent_phonecat/handler.clj | clojure | (ns reagent-phonecat.handler
(:require [compojure.core :refer [GET defroutes]]
[compojure.route :refer [not-found resources]]
[ring.middleware.defaults :refer [site-defaults wrap-defaults]]
[ring.middleware.resource :refer [wrap-resource]]
[prone.middleware :refer [wrap... | |
116a0f54c3828b8d0679833dd6dc595fcd9abefdd62fb409c9f22b34fe40011a | mejgun/haskell-tdlib | CreateChatFilter.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Query.CreateChatFilter where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.ChatFilter as ChatFilter
import qualified Utils as U
-- |
Creates new chat filter . Returns information about the created chat filter . The... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/e81b9b3096f4b5bb3e10ca9f895ee469efa47a37/src/TD/Query/CreateChatFilter.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| |
module TD.Query.CreateChatFilter where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified TD.Data.ChatFilter as ChatFilter
import qualified Utils as U
Creates new chat filter . Returns information about the created chat filter . There can be up to getOption("chat_filter_count_... |
cbfb0f04b32ff9e695b490a62b65f2b390e1386498b283d32f66ae2aea342554 | nasa/Common-Metadata-Repository | generics_documentation.clj | (ns cmr.common.test.generics-documentation
(:require
[cmr.common.generics-documentation :as gdocs]
[clojure.string :as string]
[clojure.test :refer :all]))
These two functions are stubs to be passed to ensure
;; funtions use correct spacing
(def options-map-ingest {:spacer #(- (* % 4) 4)})
(def options-ma... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/cb0bd72f4e8ef450a0995a0472645e45f2402f25/common-lib/test/cmr/common/test/generics_documentation.clj | clojure | funtions use correct spacing
This is testing if a version for a generic which does not exist is requested | (ns cmr.common.test.generics-documentation
(:require
[cmr.common.generics-documentation :as gdocs]
[clojure.string :as string]
[clojure.test :refer :all]))
These two functions are stubs to be passed to ensure
(def options-map-ingest {:spacer #(- (* % 4) 4)})
(def options-map-search {:spacer #(- (* % 4) 12... |
91207967547dc055c55dcd2d55d1c2792f214c0bae0baf34ec3d006da3c27470 | jwiegley/trade-journal | Types.hs | module Journal.Types (module X) where
import Journal.Types.Annotated as X
import Journal.Types.Entry as X
import Journal.Types.Lot as X
| null | https://raw.githubusercontent.com/jwiegley/trade-journal/f141c3eafb8f3e4c0d579a02c610e72c7ce41ea6/src/Journal/Types.hs | haskell | module Journal.Types (module X) where
import Journal.Types.Annotated as X
import Journal.Types.Entry as X
import Journal.Types.Lot as X
| |
e227678d6085867a2718b6e1d140c32a760a66b15142bb2fccfe4ca4ec22ffb7 | ocaml-multicore/parafuzz | zero_divided_by_n.ml | (* TEST *)
Mantis 7201
let f () = 0 [@@inline never]
let () =
try
ignore ((0 / f ()) : int);
assert false
with Division_by_zero -> ()
Not in Mantis 7201 , but related :
let () =
try
ignore ((0 mod f ()) : int);
assert false
with Division_by_zero -> ()
| null | https://raw.githubusercontent.com/ocaml-multicore/parafuzz/6a92906f1ba03287ffcb433063bded831a644fd5/testsuite/tests/basic/zero_divided_by_n.ml | ocaml | TEST |
Mantis 7201
let f () = 0 [@@inline never]
let () =
try
ignore ((0 / f ()) : int);
assert false
with Division_by_zero -> ()
Not in Mantis 7201 , but related :
let () =
try
ignore ((0 mod f ()) : int);
assert false
with Division_by_zero -> ()
|
8aa1888a873bef2f8ef4a8706b9beb5e0ee9845bc4680ff8ba695c1214c20b2a | bos/rwh | read.hs | {-- snippet read --}
main = do
putStrLn "Please enter a Double:"
inpStr <- getLine
let inpDouble = (read inpStr)::Double
putStrLn ("Twice " ++ show inpDouble ++ " is " ++ show (inpDouble * 2))
{-- /snippet read --}
| null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch07/read.hs | haskell | - snippet read -
- /snippet read - | main = do
putStrLn "Please enter a Double:"
inpStr <- getLine
let inpDouble = (read inpStr)::Double
putStrLn ("Twice " ++ show inpDouble ++ " is " ++ show (inpDouble * 2))
|
b15839522d0e725a382edf2d2ea24d7613323c34234041d89d32310e6a849287 | Plutonomicon/plutarch-core | Lua.hs | -- | Compile into Lua
module Plutarch.Frontends.Lua () where
import Plutarch.Prelude
data PTable k v ef
data PMutableTable k v ef
class PLuaRaw e where
punsafeLuaRaw :: String -> [T e a] -> T e b
punsafeLuaEffectfulRaw :: String -> [T e a] -> ET e (T e b)
-- Impure function
data (#!->) (a :: PType) (b :: PType)... | null | https://raw.githubusercontent.com/Plutonomicon/plutarch-core/c3bebe9621b5ca68fc316756c66f6eb72f677372/Plutarch/Frontends/Lua.hs | haskell | | Compile into Lua
Impure function
n = n' | module Plutarch.Frontends.Lua () where
import Plutarch.Prelude
data PTable k v ef
data PMutableTable k v ef
class PLuaRaw e where
punsafeLuaRaw :: String -> [T e a] -> T e b
punsafeLuaEffectfulRaw :: String -> [T e a] -> ET e (T e b)
data (#!->) (a :: PType) (b :: PType) (ef :: PTypeF)
deriving (PHasRepr) via... |
f7a421f352a4c02634bc490c1c4dcb44d548951a40fa635c558dad7aa7aa8184 | msakai/toysolver | TheorySolver.hs | -----------------------------------------------------------------------------
-- |
Module : ToySolver . SAT.TheorySolver
Copyright : ( c ) 2012
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
-----------------------------------------------... | null | https://raw.githubusercontent.com/msakai/toysolver/6233d130d3dcea32fa34c26feebd151f546dea85/src/ToySolver/SAT/TheorySolver.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
--------------------------------------------------------------------------- | Module : ToySolver . SAT.TheorySolver
Copyright : ( c ) 2012
module ToySolver.SAT.TheorySolver
( TheorySolver (..)
, emptyTheory
) where
import ToySolver.SAT.Types
data TheorySolver =
TheorySolver
{ thAssertLit :: (Lit -> IO Bool) -> Lit -> IO Bool
, thCheck :: (Lit -> IO Bool) -> I... |
6ef3b4dcbc5aca69219a605698df8f3efbddab3e778cf7415a8aae6c476c83e6 | maoe/ghc-trace-events | ByteString.hs | # LANGUAGE CPP #
# LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
{-|
'B.ByteString' variant of the tracing functions in "Debug.Trace".
-}
module Debug.Trace.ByteString
* Eventlog tracing
-- $eventlog_tracing
traceEvent
, traceEventIO
, unsafeTraceEvent
, unsafeTraceEventIO
-- * Execution phase mar... | null | https://raw.githubusercontent.com/maoe/ghc-trace-events/300697be8fb72eb0919eb7b17be3812fe6fa09ea/src/Debug/Trace/ByteString.hs | haskell | |
'B.ByteString' variant of the tracing functions in "Debug.Trace".
$eventlog_tracing
* Execution phase markers
$markers
$eventlog_tracing
extra events into the eventlog. In combination with eventlog profiling
tools these functions can be used for monitoring execution and
investigating performance problems.
|... | # LANGUAGE CPP #
# LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
module Debug.Trace.ByteString
* Eventlog tracing
traceEvent
, traceEventIO
, unsafeTraceEvent
, unsafeTraceEventIO
, traceMarker
, traceMarkerIO
, unsafeTraceMarker
, unsafeTraceMarkerIO
) where
import Control.Monad (when)
impor... |
cb84dd33027d1db8e1f496025a0cbf469a1646c239f578943e426768912445bb | dawidovsky/IIUWr | paluszak-dawid.rkt | #lang racket
(require "calc.rkt")
(define (def-name p)
(car p))
(define (def-prods p)
(cdr p))
(define (rule-name r)
(car r))
(define (rule-body r)
(cdr r))
(define (lookup-def g nt)
(cond [(null? g) (error "unknown non-terminal" g)]
[(eq? (def-name (car g)) nt) (def-prods (car g))]
[els... | null | https://raw.githubusercontent.com/dawidovsky/IIUWr/73f0f65fb141f82a05dac2573f39f6fa48a81409/MP/Pracownia10/paluszak-dawid.rkt | racket | #lang racket
(require "calc.rkt")
(define (def-name p)
(car p))
(define (def-prods p)
(cdr p))
(define (rule-name r)
(car r))
(define (rule-body r)
(cdr r))
(define (lookup-def g nt)
(cond [(null? g) (error "unknown non-terminal" g)]
[(eq? (def-name (car g)) nt) (def-prods (car g))]
[els... | |
425085fc0e0fbca04c0457f4bfb3c8a2d67e2738634d4c95f10b466eef652862 | facebook/infer | exp.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/facebook/infer/59cf5eab3b881acdd00707b4c15adcc7e97564b9/sledge/src/fol/exp.mli | ocaml | * Terms
pretty-printing
* Construct
variables
arithmetic
sequences (of flexible size)
* Iterated concatenation of a single byte
* Extract a slice of a sequence
* Size-tagged sequence
* Concatenation of sequences
uninterpreted
if-then-else
Trm.t is embedded into Term.t
* Destruct
* [get_z a] is [Som... |
* 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
... |
b94871c411d3a852f1856c19fd3529f36e6c827f4ef96e055cb93920a07a5444 | clojure-emacs/haystack | stacktrace.cljc | (ns haystack.parser.clojure.stacktrace
"Parser for stacktraces in the `clojure.stacktrace` format."
{:added "0.1.0"
:author "r0man"}
(:require [clojure.edn :as edn]
[haystack.parser.util :as util]
[instaparse.core #?(:clj :refer :cljs :refer-macros) [defparser]]))
(def ^:private stackt... | null | https://raw.githubusercontent.com/clojure-emacs/haystack/4e1f835e2255e44d6df091918df3ddbc5b63486d/src/haystack/parser/clojure/stacktrace.cljc | clojure | (ns haystack.parser.clojure.stacktrace
"Parser for stacktraces in the `clojure.stacktrace` format."
{:added "0.1.0"
:author "r0man"}
(:require [clojure.edn :as edn]
[haystack.parser.util :as util]
[instaparse.core #?(:clj :refer :cljs :refer-macros) [defparser]]))
(def ^:private stackt... | |
092756df3235631bf06b28f2ec163dc1a3af135452a1b521a6e3c5a1f9c7e76e | fukamachi/mondo | logger.lisp | (defpackage #:mondo/logger
(:use #:cl)
(:import-from #:mondo/utils
#:data-directory)
(:import-from #:bordeaux-threads)
(:shadow #:log)
(:export #:log
#:*log-level*
#:*log-stream*
#:+debug+
#:+info+
#:+warn+
#:+error+
... | null | https://raw.githubusercontent.com/fukamachi/mondo/9a546f8c46a6c102bf46104f9308c7990157c0c0/src/logger.lisp | lisp | (defpackage #:mondo/logger
(:use #:cl)
(:import-from #:mondo/utils
#:data-directory)
(:import-from #:bordeaux-threads)
(:shadow #:log)
(:export #:log
#:*log-level*
#:*log-stream*
#:+debug+
#:+info+
#:+warn+
#:+error+
... | |
7a416f1d17ed6e0cbef15cd0ee47d9530dedef79116cededd4ef3d1f1cee830a | NorfairKing/sydtest | OptParseSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Test.Syd.OptParseSpec (spec) where
import Test.Syd
import Test.Syd.OptParse
spec :: Spec
spec = do
describe "combineToSettings" $ do
it "works for this default settinsg example" $
do
let flags = defaultFlags
environment = defaultEnvironment
... | null | https://raw.githubusercontent.com/NorfairKing/sydtest/1ecd8084b5a7eb0266a654ed0e5e90b6ba170c58/sydtest/test/Test/Syd/OptParseSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module Test.Syd.OptParseSpec (spec) where
import Test.Syd
import Test.Syd.OptParse
spec :: Spec
spec = do
describe "combineToSettings" $ do
it "works for this default settinsg example" $
do
let flags = defaultFlags
environment = defaultEnvironment
mConf = Nothing
... |
c704038a1ec1ed93c36dade8edc227acec1efefdde4db1e382b5810004c86178 | dyoo/ffi-tutorial | pre-installer.rkt | #lang racket/base
(provide pre-installer)
(require ffi/tutorial/utils)
(define pre-installer
(make-pre-installer "f2c" #:sources '("src/f2c.c")))
(module+ main
(pre-installer))
| null | https://raw.githubusercontent.com/dyoo/ffi-tutorial/1efba84503adf4a062c4855225eabe992a06a34f/ffi/tutorial/examples/f2c/pre-installer.rkt | racket | #lang racket/base
(provide pre-installer)
(require ffi/tutorial/utils)
(define pre-installer
(make-pre-installer "f2c" #:sources '("src/f2c.c")))
(module+ main
(pre-installer))
| |
06ef62e5c3b620af23a3ca1f31a13014512e4903847a2a5fe4f427a127197981 | deadpendency/deadpendency | RegistryFetchRegistryBackend.hs | module DF.Effect.FetchRegistryRepoInfo.Backend.RegistryFetchRegistryBackend
( fetchRegistryInfo,
)
where
import Common.Model.Dependency.DependencyName
import Common.Model.Dependency.Registry.DependencyRegistryInfo
import Common.Model.Ecosystem.ProgrammingLanguage
import DF.Effect.FetchRegistryRepoInfo.Backend.Lang... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/dependency-fetcher/src/DF/Effect/FetchRegistryRepoInfo/Backend/RegistryFetchRegistryBackend.hs | haskell | module DF.Effect.FetchRegistryRepoInfo.Backend.RegistryFetchRegistryBackend
( fetchRegistryInfo,
)
where
import Common.Model.Dependency.DependencyName
import Common.Model.Dependency.Registry.DependencyRegistryInfo
import Common.Model.Ecosystem.ProgrammingLanguage
import DF.Effect.FetchRegistryRepoInfo.Backend.Lang... | |
42319aeca5971bd14caadbee9d8042963df800cac9d0ba74be4291cee7fd847d | wdebeaum/step | worcestershire.lisp | ;;;;
;;;; W::WORCESTERSHIRE
;;;;
(define-words :pos W::n
:words (
(W::WORCESTERSHIRE
(senses
((LF-PARENT ONT::DRESSINGS-SAUCES-COATINGS)
(TEMPL MASS-PRED-TEMPL)
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/worcestershire.lisp | lisp |
W::WORCESTERSHIRE
|
(define-words :pos W::n
:words (
(W::WORCESTERSHIRE
(senses
((LF-PARENT ONT::DRESSINGS-SAUCES-COATINGS)
(TEMPL MASS-PRED-TEMPL)
)
)
)
))
|
2fbbdbe7caa8e878d22c3220cefb8c5de0752176c8808e66117f18bbb291ff4e | tweag/asterius | T7636.hs | import GHC.Conc.Sync
import System.Environment
test n = atomically $ f [1..n]
where
f [] = retry
f (x:xs) = do
ys <- f xs
return (x:ys)
main = do
[n] <- getArgs
test (read n)
| null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/rts/T7636.hs | haskell | import GHC.Conc.Sync
import System.Environment
test n = atomically $ f [1..n]
where
f [] = retry
f (x:xs) = do
ys <- f xs
return (x:ys)
main = do
[n] <- getArgs
test (read n)
| |
d86f441b8a6e015fd8f4052ced313d997bbd58212e35cd7e334ddd8acbdb316f | onyx-platform/onyx | flow_exception_test.clj | (ns onyx.peer.flow-exception-test
(:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
[clojure.test :refer [deftest is testing]]
[onyx.plugin.core-async :refer [take-segments!]]
[onyx.static.uuid :refer [random-uuid]]
[taoensso.timbre :refer [info... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/test/onyx/peer/flow_exception_test.clj | clojure | (ns onyx.peer.flow-exception-test
(:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
[clojure.test :refer [deftest is testing]]
[onyx.plugin.core-async :refer [take-segments!]]
[onyx.static.uuid :refer [random-uuid]]
[taoensso.timbre :refer [info... | |
f2d0c6680c8e6c8c326b3b7d45226febc815ad2bab17c2d59029efd90b3155ea | jkrivine/tl_interpreter | SP.ml | (** Glue above [Core.Set.Poly] that removes argument names. *)
module S = Core.Set.Poly
type 'a t = 'a S.t
let pp fmt_v fmt m =
Format.fprintf fmt "{SP| ";
S.iter m ~f:(fun v -> Format.fprintf fmt "%a, " fmt_v v);
Format.fprintf fmt "}"
let empty = S.empty
let add = S.add
let mem = S.mem
| null | https://raw.githubusercontent.com/jkrivine/tl_interpreter/c967c6578dd4491a6930c9842a0709fbc5939496/lib/tooling/SP.ml | ocaml | * Glue above [Core.Set.Poly] that removes argument names. |
module S = Core.Set.Poly
type 'a t = 'a S.t
let pp fmt_v fmt m =
Format.fprintf fmt "{SP| ";
S.iter m ~f:(fun v -> Format.fprintf fmt "%a, " fmt_v v);
Format.fprintf fmt "}"
let empty = S.empty
let add = S.add
let mem = S.mem
|
64e2f633a2975011b3a6749b359f3bd1e9d6bd225e46e4c571749195f72046b8 | axelarge/advent-of-code | day05.clj | (ns advent-of-code.y2022.day05
(:require [advent-of-code.support :refer :all]
[clojure.string :as str]))
(def input (get-input 2022 5))
(defn parse [input]
(let [[stacks moves] (map str/split-lines (str/split input #"\n\n"))]
[(->> stacks
transpose
(partition-all 4)
(... | null | https://raw.githubusercontent.com/axelarge/advent-of-code/1fa6ee4b51c90cf586717082faaff946e205cd6a/src/advent_of_code/y2022/day05.clj | clojure | (ns advent-of-code.y2022.day05
(:require [advent-of-code.support :refer :all]
[clojure.string :as str]))
(def input (get-input 2022 5))
(defn parse [input]
(let [[stacks moves] (map str/split-lines (str/split input #"\n\n"))]
[(->> stacks
transpose
(partition-all 4)
(... | |
4913a123c35d0ff08d5480d760edf3c0dd6d3ebc63954a81b89ac3d1c70ddd43 | AdRoll/rebar3_format | inline_no_fields.erl | -module(inline_no_fields).
-format #{inline_fields => none}.
-export [f/1].
-record(a, {small, with}).
-type a() :: #a{small :: record, with :: {some, fields}}.
-type b() :: #{a => small, map => with, some => fields}.
f(A) ->
W = #just{one = field},
X = #a{small = record, with = {some, fields}},
Y = #{... | null | https://raw.githubusercontent.com/AdRoll/rebar3_format/5ffb11341796173317ae094d4e165b85fad6aa19/test_app/src/inline_fields/inline_no_fields.erl | erlang | -module(inline_no_fields).
-format #{inline_fields => none}.
-export [f/1].
-record(a, {small, with}).
-type a() :: #a{small :: record, with :: {some, fields}}.
-type b() :: #{a => small, map => with, some => fields}.
f(A) ->
W = #just{one = field},
X = #a{small = record, with = {some, fields}},
Y = #{... | |
ca5dddb9b79e74a761343b6ebb1d1f1b7e6ea0c555504531d0ddb829a29507f6 | ocsigen/js_of_ocaml | pseudo_fs.ml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2014 Hugo Heuzard
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of th... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/cb629335639c8e7ef9bda7745e7838c6c846664e/compiler/lib/pseudo_fs.ml | ocaml | by default, files are store in /static/ directory
extensions filter
[`ocamlc -where`/expunge in.byte out.byte moduleA moduleB ... moduleN] | Js_of_ocaml compiler
* /
* Copyright ( C ) 2014 Hugo Heuzard
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of th... |
fe39a81ae09ee19623a2b773ba0582e50114f801064e16b619c3f52c3c3fcba6 | huiyaozheng/Mirage-zmq | config.ml | open Mirage
let main = foreign ~packages:[package "mirage-zmq"] "Unikernel.Main" (stackv4 @-> job)
let stack = generic_stackv4 default_network
let () =
register "pub_unikernel" [
main $ stack
]
| null | https://raw.githubusercontent.com/huiyaozheng/Mirage-zmq/af288a3378a7c357bd5646a3abf4fd5ae777369b/test/PUB/unikernel/config.ml | ocaml | open Mirage
let main = foreign ~packages:[package "mirage-zmq"] "Unikernel.Main" (stackv4 @-> job)
let stack = generic_stackv4 default_network
let () =
register "pub_unikernel" [
main $ stack
]
| |
07a04e826f01facf27a149b323c24135d6a36fe9da4e153e9fbd8f1d1643e980 | AntidoteDB/gingko | gingko_time_manager.erl | %%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing,
software distributed under the Lic... | null | https://raw.githubusercontent.com/AntidoteDB/gingko/a965979aefb2868abcd0b3bf5ed1b5e4f9fdd163/src/gingko_time_manager.erl | erlang |
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either expressed or implied. See the License for the
specific language governing permissions and limitations
under the License.
Description and complete Li... | This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(gingko_time_manager).
-author("Kevin Bartik <>").
-behaviour(gen_server)... |
86bc0c273b61b9ff2409baa6540826ec74204477d485104d4c3a289adb8b78f2 | ocamllabs/ocaml-modular-implicits | t010-const0.ml | 0;;
*
0
1 ATOM0
2 SETGLOBAL T010 - const0
4 STOP
*
0 CONST0
1 ATOM0
2 SETGLOBAL T010-const0
4 STOP
**)
| null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/tool-ocaml/t010-const0.ml | ocaml | 0;;
*
0
1 ATOM0
2 SETGLOBAL T010 - const0
4 STOP
*
0 CONST0
1 ATOM0
2 SETGLOBAL T010-const0
4 STOP
**)
| |
90ec977e9053ca15b35576105aa937eca31a8e61934c3f7005140cceba88f80f | well-typed-lightbulbs/ocaml-esp32 | printtyp.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/typing/printtyp.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Format
open Types
open Outcometree
val longident: formatter -> Longident.t -> unit
val ident: form... |
a6bbbc781a88045cd130e93376922a95321b02d701170b9f36b81b0410505c3d | mtolly/onyxite-customs | Sections.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
module Onyx.Sections
( makeRBN2Sections
, makeRB3Section
, makeRB2Section
, makePSSection
, makeGH2Section
, fromGH2Section
) where
import Control.Arrow (second)
import Data.Char ... | null | https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib/src/Onyx/Sections.hs | haskell | # LANGUAGE OverloadedStrings #
is this typo correct?
is this typo correct?
tested in rb3: all ascii punctuation/symbols work other than square brackets
starting with a number crashes rb3 practice mode apparently
dunno if the list is actually different for RB2 | # LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
module Onyx.Sections
( makeRBN2Sections
, makeRB3Section
, makeRB2Section
, makePSSection
, makeGH2Section
, fromGH2Section
) where
import Control.Arrow (second)
import Data.Char (isAlphaNum, isAscii, isDigit, isP... |
d719c340f91e30cfdf0fb366188a9d4d1e9f839d41bbb19c5ef1983a278cb8fb | juji-io/datalevin | search_utils_test.clj | (ns datalevin.search-utils-test
(:require
[datalevin.search-utils :as sut]
[datalevin.search :as sc]
[datalevin.util :as u]
[datalevin.core :as d]
[clojure.test :refer [is deftest testing]])
(:import
[java.util UUID ]))
(deftest custom-analyzer-test
(let [s1 "This is a Datalevin-A... | null | https://raw.githubusercontent.com/juji-io/datalevin/499b47c26db394a940f198a89bcdc909e20a6112/test/datalevin/search_utils_test.clj | clojure | (ns datalevin.search-utils-test
(:require
[datalevin.search-utils :as sut]
[datalevin.search :as sc]
[datalevin.util :as u]
[datalevin.core :as d]
[clojure.test :refer [is deftest testing]])
(:import
[java.util UUID ]))
(deftest custom-analyzer-test
(let [s1 "This is a Datalevin-A... | |
2588c1289ed6fd4b094fc2a96e81c1da66b94496e49cfa5a725d2a7dccd78a1a | ghc/ghc | Instr.hs |
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# OPTIONS_GHC -funbox-strict-fields #-}
--
( c ) The University of Glasgow 2002 - 2006
--
| Bytecode instruction definitions
module GHC.ByteCode.Instr (
BCInstr(..), ProtoBCO(..), bciStackUse, LocalLabel(..)
) where
import GHC.Prelude
import GHC... | null | https://raw.githubusercontent.com/ghc/ghc/bed3a292df532935426987e1f0c5eaa4f605407e/compiler/GHC/ByteCode/Instr.hs | haskell | # OPTIONS_GHC -funbox-strict-fields #
----------------------------------------------------------------------------
name, in some sense
instrs
malloc'd pointers
| A local block label (e.g. identifying a case alternative).
Messing with the stack
Push locals (existing bits of the stack)
offset
value will take th... |
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
( c ) The University of Glasgow 2002 - 2006
| Bytecode instruction definitions
module GHC.ByteCode.Instr (
BCInstr(..), ProtoBCO(..), bciStackUse, LocalLabel(..)
) where
import GHC.Prelude
import GHC.ByteCode.Types
import GHCi.RemoteTypes
import G... |
3de8e7afaba64df112089990ff7bd7a5c2d717214c45284f0a0b624e28908fbe | kappelmann/engaging-large-scale-functional-programming | Exercise03.hs | module Exercise03 where
primeMayor :: Integer -> Integer
primeMayor 0 = 0
primeMayor x | even x = 2
| otherwise = primeMayorHelper x
primeMayorHelper :: Integer -> Integer
primeMayorHelper 0 = 0
primeMayorHelper x = 1 + primeMayorHelper (x - findBiggestPrime x)
findBiggestPrime :: Integer -> Integer
... | null | https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/03/uploads/functional0programators/Exercise03.hs | haskell | module Exercise03 where
primeMayor :: Integer -> Integer
primeMayor 0 = 0
primeMayor x | even x = 2
| otherwise = primeMayorHelper x
primeMayorHelper :: Integer -> Integer
primeMayorHelper 0 = 0
primeMayorHelper x = 1 + primeMayorHelper (x - findBiggestPrime x)
findBiggestPrime :: Integer -> Integer
... | |
b5678183ff4c2c285c63139a55c07190a05c6f8d011e67953b329ddb9af6daf1 | Gbury/archsat | prime.mli | This file is free software , part of Archsat . See file " LICENSE " for more details .
type divisor = {
prime : Z.t;
power : int;
}
val value : divisor -> Z.t
val decomposition : Z.t -> divisor list
val is_prime : Z.t -> bool
val primes_leq : Z.t -> (Z.t -> unit) -> unit
| null | https://raw.githubusercontent.com/Gbury/archsat/322fbefa4a58023ddafb3fa1a51f8199c25cde3d/src/misc/prime.mli | ocaml | This file is free software , part of Archsat . See file " LICENSE " for more details .
type divisor = {
prime : Z.t;
power : int;
}
val value : divisor -> Z.t
val decomposition : Z.t -> divisor list
val is_prime : Z.t -> bool
val primes_leq : Z.t -> (Z.t -> unit) -> unit
| |
60b555a5bf7202d349be628c2571f272371deb78997f20c65e4769b6249e3159 | walkie/Hagl | History.hs | -- | This module provides data structures for tracking the execution of
games in Hagl , and simple functions for manipulating this data . Note
that underscore - prefixed functions have monadic versions in " Hagl . Exec "
-- without the underscore. Usually you want the monadic versions from
-- within stra... | null | https://raw.githubusercontent.com/walkie/Hagl/ac1edda51c53d2b683c4ada3f1c3d4d14a285d38/src/Hagl/History.hs | haskell | | This module provides data structures for tracking the execution of
without the underscore. Usually you want the monadic versions from
within strategies.
* Transcripts
| A record of a single move event.
| A transcript is a list of move events.
| Create a move event from an action and the move made.
* M... | games in Hagl , and simple functions for manipulating this data . Note
that underscore - prefixed functions have monadic versions in " Hagl . Exec "
module Hagl.History where
import Data.List (transpose)
import Data.Maybe (fromMaybe)
import Hagl.List
import Hagl.Payoff
import Hagl.Game
type MoveEvent mv... |
e143cd2e2a2adc64f7df454b1c7feed47d1b5f4214185db044608113a69cee04 | Sudha247/ocaml5-tutorial-icfp-22 | fib_par.ml | let num_domains = try int_of_string Sys.argv.(1) with _ -> 1
let n = try int_of_string Sys.argv.(2) with _ -> 43
module T = Domainslib.Task
let rec fib n =
if n < 2 then 1
else fib (n-1) + fib (n-2)
let rec fib_par pool n =
if n <= 40 then fib n
else
let a = T.async pool (fun _ -> fib_par pool (n-1)) in
... | null | https://raw.githubusercontent.com/Sudha247/ocaml5-tutorial-icfp-22/7f04991a10270e5f5be0d2b1b6d931b242f4d3a2/code/parallel/fib_par.ml | ocaml | let num_domains = try int_of_string Sys.argv.(1) with _ -> 1
let n = try int_of_string Sys.argv.(2) with _ -> 43
module T = Domainslib.Task
let rec fib n =
if n < 2 then 1
else fib (n-1) + fib (n-2)
let rec fib_par pool n =
if n <= 40 then fib n
else
let a = T.async pool (fun _ -> fib_par pool (n-1)) in
... | |
0092bcdc1c9ad3f7b3e6fbb57de8a0bf46b3ca24b66199a7293a0d90e3378092 | incoherentsoftware/defect-process | Types.hs | module Window.Graphics.Cursors.Types
( GraphicsCursors(..)
) where
import qualified SDL
data GraphicsCursors = GraphicsCursors
{ _crosshair :: SDL.Cursor
, _menu :: SDL.Cursor
}
| null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Window/Graphics/Cursors/Types.hs | haskell | module Window.Graphics.Cursors.Types
( GraphicsCursors(..)
) where
import qualified SDL
data GraphicsCursors = GraphicsCursors
{ _crosshair :: SDL.Cursor
, _menu :: SDL.Cursor
}
| |
b36f36aa1ab89dd4fd79c21dc94034203e08698682017e63c3094646469b30a9 | casperschipper/ocaml-cisp | cisp4.ml | open Cisp
open Midi
open Seq
open Reader.Ops
simple mod of controller 1 onto pitch
let sr = ref 44100.0
let pitchControl =
MidiState.getControlR (MidiCh 0) (MidiCtrl 0)
>>= (fun (MidiVal ctrl1) ->
MidiState.getControlR (MidiCh 0) (MidiCtrl 1) >>=
(fun (MidiVal ctrl2) ->
MidiState.triggerR 30... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/readerMonadLetSyntax/cisp4.ml | ocaml | a seq of (x,y) make it (seq x, seq y)
this maps midi input msg to an output msg (raw midi)
take msg, make it a state
run a bunch of readers to extract properties
the result is then used to contruct streams
turn back into raw midi | open Cisp
open Midi
open Seq
open Reader.Ops
simple mod of controller 1 onto pitch
let sr = ref 44100.0
let pitchControl =
MidiState.getControlR (MidiCh 0) (MidiCtrl 0)
>>= (fun (MidiVal ctrl1) ->
MidiState.getControlR (MidiCh 0) (MidiCtrl 1) >>=
(fun (MidiVal ctrl2) ->
MidiState.triggerR 30... |
56006395ac834e63f450826926e78576b805cb7dccb0a4af37c72d230c418c5f | markandrus/twilio-haskell | UsageRecord.hs | # LANGUAGE MultiParamTypeClasses #
{-#LANGUAGE OverloadedStrings #-}
-------------------------------------------------------------------------------
-- |
Module : Twilio . UsageRecord
Copyright : ( C ) 2017-
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
-- Stability ... | null | https://raw.githubusercontent.com/markandrus/twilio-haskell/00704dc86dbf2117b855b1e2dcf8b6c0eff5bfbe/src/Twilio/UsageRecord.hs | haskell | #LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : provisional
-----------------------------------------------------------------------------
* Resource | # LANGUAGE MultiParamTypeClasses #
Module : Twilio . UsageRecord
Copyright : ( C ) 2017-
Maintainer : < >
module Twilio.UsageRecord
UsageRecord(..)
) where
import Control.Error.Safe
import Control.Monad
import Data.Aeson
import Data.Text (Text)
import Data.Time.Clock
import Network.... |
f792ae7144ee52e17787a6358916a564de59ae57578864953a0c118296d9831b | degree9/uikit-hl | badge.cljs | (ns uikit-hl.badge
(:require [hoplon.core :as h]))
(defmulti uk-badge! h/kw-dispatcher :default ::default)
(defmethod h/do! ::default
[elem key val]
(uk-badge! elem key val))
(defn- format-badge [badge]
(str "uk-badge-" badge))
(defmethod uk-badge! ::default
[elem kw v]
(h/do! elem :class {(format-badge... | null | https://raw.githubusercontent.com/degree9/uikit-hl/b226b1429ea50f8e9a6c1d12c082a3be504dda33/src/uikit_hl/badge.cljs | clojure | (ns uikit-hl.badge
(:require [hoplon.core :as h]))
(defmulti uk-badge! h/kw-dispatcher :default ::default)
(defmethod h/do! ::default
[elem key val]
(uk-badge! elem key val))
(defn- format-badge [badge]
(str "uk-badge-" badge))
(defmethod uk-badge! ::default
[elem kw v]
(h/do! elem :class {(format-badge... | |
4dd264289f5c91677ae6b38c238bb0c67bfd2c23f100b105034d5704ab440d1b | turtl/core-cl | worker.lisp | (in-package :turtl-core)
(define-condition stop-worker (simple-condition) ())
(defclass work-queue ()
((threads :accessor work-queue-threads :initform nil)
(sock :accessor work-queue-sock :initarg :sock :initform nil)
(conn :accessor work-queue-conn :initarg :conn :initform nil)
(jobs :accessor work-queu... | null | https://raw.githubusercontent.com/turtl/core-cl/8fdfaaf918f731318e734eaa7adcd083494f44b8/app/library/worker.lisp | lisp | (in-package :turtl-core)
(define-condition stop-worker (simple-condition) ())
(defclass work-queue ()
((threads :accessor work-queue-threads :initform nil)
(sock :accessor work-queue-sock :initarg :sock :initform nil)
(conn :accessor work-queue-conn :initarg :conn :initform nil)
(jobs :accessor work-queu... | |
a06837fc0a900c82e8b17358ee17119e50dc200e191b21ffc85c13ec98a42cf8 | serokell/haskell-crypto | Pwhash.hs | SPDX - FileCopyrightText : 2020
--
SPDX - License - Identifier : MPL-2.0
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Test.Crypto.Sodium.Pwhash where
import Test.HUnit ((@?=), Assertion)
import Data.ByteArray.Siz... | null | https://raw.githubusercontent.com/serokell/haskell-crypto/e57b04d103b428b03c83565060a36da442663a5a/crypto-sodium/test/Test/Crypto/Sodium/Pwhash.hs | haskell |
^ Output length.
^ Expected hash.
^ Password.
^ Hashing algorithm.
^ Hashing params.
Note:
Test vectors from
unit_pwhash_argon2id_4 is skipped because it is a test for an incorrect output
size, which is impossible due to stronger types in this library
Test vectors from
unit_pwhash_argon2i_4 is skipped bec... | SPDX - FileCopyrightText : 2020
SPDX - License - Identifier : MPL-2.0
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Test.Crypto.Sodium.Pwhash where
import Test.HUnit ((@?=), Assertion)
import Data.ByteArray.Sized ... |
7bd9518ad07c58739e459773531d11be5372196ff341b55e5fc21f2f6f2f194c | Gonzih/feeds2imap.clj | feeds.clj | (ns feeds2imap.feeds
(:require [hiccup.core :refer :all]
[feedparser-clj.core :refer :all]
[feeds2imap.message :as message]
[clojure.data.codec.base64 :as b64]
[clojure.pprint :refer :all]
[feeds2imap.types]
[feeds2imap.logging :refer [info error... | null | https://raw.githubusercontent.com/Gonzih/feeds2imap.clj/3119214f5fe8feb933bc7ebb62c445de09c80494/src/feeds2imap/feeds.clj | clojure | (ns feeds2imap.feeds
(:require [hiccup.core :refer :all]
[feedparser-clj.core :refer :all]
[feeds2imap.message :as message]
[clojure.data.codec.base64 :as b64]
[clojure.pprint :refer :all]
[feeds2imap.types]
[feeds2imap.logging :refer [info error... | |
6951fc876dfb99027294ba6c09002c5a8f71c93355c591a184bff99fe3839be5 | racket/rackunit | gui.rkt | #lang racket/base
(require rackunit/gui)
(provide (all-from-out rackunit/gui))
| null | https://raw.githubusercontent.com/racket/rackunit/f94364891f201f90c055adb1521e5f038ce75411/schemeunit/gui.rkt | racket | #lang racket/base
(require rackunit/gui)
(provide (all-from-out rackunit/gui))
| |
7707f02e32e4565417305ef7442e0881b282dda48ac2d70562d624182e300c87 | mokus0/polynomial | Bernstein.hs | module Bench.Bernstein where
import Criterion
bernsteinTests :: [Benchmark]
bernsteinTests = []
| null | https://raw.githubusercontent.com/mokus0/polynomial/42fde2c9a72f449eeda4d534acfe64b8e92b5c27/bench/src/Bench/Bernstein.hs | haskell | module Bench.Bernstein where
import Criterion
bernsteinTests :: [Benchmark]
bernsteinTests = []
| |
cf773d34e05f2cbd2492ca34bf64bfb8862939d3aa1618e86255a74eaa905915 | hiroshi-unno/coar | solPrinter.ml | open Core
open Common.Util
open PCSatCommon
module Config = struct
type t = {
output_iteration : bool;
sygus_comp : bool;
} [@@deriving yojson]
module type ConfigType = sig val config : t end
let load_ext_file = function
| ExtFile.Filename filename ->
begin
let open Or_error in
... | null | https://raw.githubusercontent.com/hiroshi-unno/coar/90a23a09332c68f380efd4115b3f6fdc825f413d/lib/PCSat/solPrinter.ml | ocaml | open Core
open Common.Util
open PCSatCommon
module Config = struct
type t = {
output_iteration : bool;
sygus_comp : bool;
} [@@deriving yojson]
module type ConfigType = sig val config : t end
let load_ext_file = function
| ExtFile.Filename filename ->
begin
let open Or_error in
... | |
301abed962a962bf7c255c76dec614d5eba4984cb1dc15a3880029258915e51b | erlang-ls/erlang_ls | my_gen_server.erl | -module(my_gen_server).
-behaviour(gen_server).
%% API
-export([start_link/0]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3, format_status/2]).
-define(SERVER, ?MODULE).
-record(state, {}).
%%%===========================================... | null | https://raw.githubusercontent.com/erlang-ls/erlang_ls/36bf0815e35db5d25a76e80f98f306f25fff7d8c/apps/els_lsp/priv/code_navigation/src/my_gen_server.erl | erlang | API
gen_server callbacks
===================================================================
API
===================================================================
--------------------------------------------------------------------
@doc
Starts the server
@end
----------------------------------------------------... | -module(my_gen_server).
-behaviour(gen_server).
-export([start_link/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3, format_status/2]).
-define(SERVER, ?MODULE).
-record(state, {}).
-spec start_link() -> {ok, Pid :: pid()} |
{error, Err... |
238157597bd3873fb0036d1f00e12505bab7d312332a816b2cf0de1db93a471c | ericthorsen/enclojure-repl | DefReplWindowFactory.clj | (comment
;*
* Copyright ( c ) ThorTech , L.L.C .. All rights reserved .
;* The use and distribution terms for this software are covered by the
;* Eclipse Public License 1.0 (-1.0.php)
;* which can be found in the file epl-v10.html at the root of this distribution.
;* By using this software in any fashio... | null | https://raw.githubusercontent.com/ericthorsen/enclojure-repl/eeae31ba5ddccde5a1aa11a122db6e8d8a49cd8f/org-enclojure-repl-client/src/main/clojure/org/enclojure/ide/repl/DefReplWindowFactory.clj | clojure | *
* The use and distribution terms for this software are covered by the
* Eclipse Public License 1.0 (-1.0.php)
* which can be found in the file epl-v10.html at the root of this distribution.
* By using this software in any fashion, you are agreeing to be bound by
* the terms of this license.
* You mu... | (comment
* Copyright ( c ) ThorTech , L.L.C .. All rights reserved .
* Author :
)
(ns org.enclojure.ide.repl.DefReplWindowFactory
(:gen-class
:implements [org.enclojure.repl.IReplWindowFactory])
(:import (org.enclojure.repl IReplWindow IReplWindowFactory IRepl)
(java.io File OutputStreamWr... |
1f043ab5d7ff44fd49b54692254c457451d974a9e448c4266cf6364b487dc7c9 | discus-lang/ddc | Attr.hs |
module DDC.Llvm.Write.Attr where
import DDC.Llvm.Syntax.Attr
import DDC.Llvm.Write.Base
instance Write Config FuncAttr where
write o attr
= case attr of
AlwaysInline -> text o "alwaysinline"
InlineHint -> text o "inlinehint"
NoInline -> text o "noinline"
OptSize ... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core-llvm/DDC/Llvm/Write/Attr.hs | haskell | the linkage type a function resolves to if no other is specified |
module DDC.Llvm.Write.Attr where
import DDC.Llvm.Syntax.Attr
import DDC.Llvm.Write.Base
instance Write Config FuncAttr where
write o attr
= case attr of
AlwaysInline -> text o "alwaysinline"
InlineHint -> text o "inlinehint"
NoInline -> text o "noinline"
OptSize ... |
62168ab80316fd1f784cbfe2e0f6a9ee46ad5cc54521cd3ffd694378f2fbb0e0 | jqueiroz/lojban.io | TranslationLoaders.hs | {-# LANGUAGE OverloadedStrings #-}
-- | This module provides utilities for loading translations from files.
module Study.Framework.Lojban.TranslationLoaders
( loadTranslationsFromYamlCode
, loadTranslationGeneratorFromYamlCode
, loadTranslationsByExpressionFromYamlCode
) where
import Core
import Study.Framework.Lojba... | null | https://raw.githubusercontent.com/jqueiroz/lojban.io/68c3e919f92ea1294f32ee7772662ab5667ecef6/haskell/src/Study/Framework/Lojban/TranslationLoaders.hs | haskell | # LANGUAGE OverloadedStrings #
| This module provides utilities for loading translations from files.
| Loads translations from yaml code.
| Loads translations from yaml data.
| Loads 'TranslationGenerator' from yaml code.
| Loads 'TranslationsByExpression' from yaml code.
| Saves 'TranslationsByExpression' to yam... |
module Study.Framework.Lojban.TranslationLoaders
( loadTranslationsFromYamlCode
, loadTranslationGeneratorFromYamlCode
, loadTranslationsByExpressionFromYamlCode
) where
import Core
import Study.Framework.Lojban.TranslationUtils (expandTranslation)
import Util (generatorFromList)
import qualified Data.Map as M
import... |
39b3d437a2aa4c7353865eaa27fe83930d532c5ef69aff5726f893b49112fc79 | Oblosys/proxima | ATermAbstractSyntax.hs | ----------------------------------------------------------------------------
Haskell ATerm Library
Joost Visser
CWI , Amsterdam
This module is part of the ATerm library for . It defines the
abstract syntax of ATerms as a datatype .
-----------------------------------------------------------... | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/uuagc/src/ATermAbstractSyntax.hs | haskell | --------------------------------------------------------------------------
---------------------------------------------------------------------------
----------------------------------------------------------------------------}
Abstract syntax -----------------------------------------------------------
-------------... |
Haskell ATerm Library
Joost Visser
CWI , Amsterdam
This module is part of the ATerm library for . It defines the
abstract syntax of ATerms as a datatype .
Haskell ATerm Library
Joost Visser
CWI, Amsterdam
This module is part of the ATerm library for Haskell. It defines the
abstrac... |
5cc8d73483d438d4534914918593327f846caa1ee72439244c1a3d17cafec012 | pirapira/coq2rust | cpretty.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/tools/coqdoc/cpretty.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
val coq_file : string -> Cdgl... |
412b733c1de94900a5bca2624a4868ba39ee27014c44f19255002895fa845b7a | rd--/hsc3 | hasher.help.hs | -- hasher ; noise
hasher (line ar 0 1 1 RemoveSynth) * 0.2
-- hasher ; remap x
let x = mouseX kr 0 10 Linear 0.2
f = hasher (roundTo x 1) * 300 + 500
in sinOsc ar f 0 * 0.1
---- ; drawings
Sound.Sc3.Plot.plot_ugen_nrt (400,1) 1.0 (hasher (line ar 0 1 1 RemoveSynth))
| null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/hasher.help.hs | haskell | hasher ; noise
hasher ; remap x
-- ; drawings | hasher (line ar 0 1 1 RemoveSynth) * 0.2
let x = mouseX kr 0 10 Linear 0.2
f = hasher (roundTo x 1) * 300 + 500
in sinOsc ar f 0 * 0.1
Sound.Sc3.Plot.plot_ugen_nrt (400,1) 1.0 (hasher (line ar 0 1 1 RemoveSynth))
|
3ec0f14e4a5f81613e350065bee62c56c33ef3092d580071dc04bfad3698c711 | athos/aintegrant | test_runner.cljc | (ns aintegrant.test-runner
(:require aintegrant.async-test
aintegrant.core-test
[clojure.test :as t]))
(defn exit-with [{:keys [fail error]}]
(let [code (if (zero? (+ fail error)) 0 1)]
#?(:clj (System/exit code)
:cljs (assert (= code 0)))))
#?(:cljs
(defmethod t/report [::t/... | null | https://raw.githubusercontent.com/athos/aintegrant/1a866435d081a6cb98abfe3c22bca8a84df054de/test/aintegrant/test_runner.cljc | clojure | (ns aintegrant.test-runner
(:require aintegrant.async-test
aintegrant.core-test
[clojure.test :as t]))
(defn exit-with [{:keys [fail error]}]
(let [code (if (zero? (+ fail error)) 0 1)]
#?(:clj (System/exit code)
:cljs (assert (= code 0)))))
#?(:cljs
(defmethod t/report [::t/... | |
dae8bb5512bbccec0d055f2b5b33665b0b4a2e5c01d873570eabd2f9f018ea16 | vikram/lisplibraries | swank-c-p-c.lisp | ;;; swank-c-p-c.lisp -- ILISP style Compound Prefix Completion
;;
Author : < >
< >
< >
< >
;; and others
;;
;; License: Public Domain
;;
(in-package :swank)
(defslimefun completions (string default-package-name)
"Return a list of completions for a symbol d... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/slime/contrib/swank-c-p-c.lisp | lisp | swank-c-p-c.lisp -- ILISP style Compound Prefix Completion
and others
License: Public Domain
Find completion set
user behaviour | NAME | PACKAGE-NAME | PACKAGE
----------------+--------+--------------+-----------------------------------
asdf [tab] | "asdf" | NIL | #<PACKAGE "DEFAUL... | Author : < >
< >
< >
< >
(in-package :swank)
(defslimefun completions (string default-package-name)
"Return a list of completions for a symbol designator STRING.
The result is the list (COMPLETION-SET COMPLETED-PREFIX), where
COMPLETION-SET is the list of all m... |
bf0db7eebc823b2dd421ca00abf7bf7d2aba9afacca7192b2c03d885872b9eb3 | drewolson/aoc-hs | Day11Spec.hs | module Aoc.Year2022.Day11Spec
( spec,
)
where
import Aoc.Year2022.Day11 qualified as Day11
import Test.Hspec (Spec, it, shouldBe)
import Text.RawString.QQ (r)
input :: String
input =
[r|Monkey 0:
Starting items: 79, 98
Operation: new = old * 19
Test: divisible by 23
If true: throw to monkey 2
If f... | null | https://raw.githubusercontent.com/drewolson/aoc-hs/4fe78e04340cc947a593432bbcbc8eb1b7cbc9cf/aoc-year2022/test/Aoc/Year2022/Day11Spec.hs | haskell | module Aoc.Year2022.Day11Spec
( spec,
)
where
import Aoc.Year2022.Day11 qualified as Day11
import Test.Hspec (Spec, it, shouldBe)
import Text.RawString.QQ (r)
input :: String
input =
[r|Monkey 0:
Starting items: 79, 98
Operation: new = old * 19
Test: divisible by 23
If true: throw to monkey 2
If f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.