_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 |
|---|---|---|---|---|---|---|---|---|
c7efc30fc61ccee9ae8021625fb92fe663b54c9ace939edc7231aeb459a26863 | input-output-hk/plutus | Default.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables... | null | https://raw.githubusercontent.com/input-output-hk/plutus/1f31e640e8a258185db01fa899da63f9018c0e85/prettyprinter-configurable/test/Default.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
We do not attempt to shrink types of generated expressions, only expressions themselves. | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
| Testing that @PrettyBy config@ and @Pretty@ instances are in sync for types that have
peculiar default pretty - pr... |
611358f0246c911152d7945df166bc578dcfbe7eaab5fa47fad19a4020e70cf0 | conal/vector-space | Basis.hs | # LANGUAGE TypeOperators , TypeFamilies , UndecidableInstances
, FlexibleInstances , MultiParamTypeClasses , CPP #
, FlexibleInstances, MultiParamTypeClasses, CPP #-}
{-# LANGUAGE DefaultSignatures #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE ScopedTypeVariables #-}
# OPTIONS_GHC -Wall -fno - warn -... | null | https://raw.githubusercontent.com/conal/vector-space/92598e836cd25aa2598d67fb83a1822c1b4ca042/src/Data/Basis.hs | haskell | # LANGUAGE DefaultSignatures #
# LANGUAGE ScopedTypeVariables #
--------------------------------------------------------------------
|
Module : Data.Basis
License : BSD3
Maintainer :
Stability : experimental
Basis of a vector space, as an associated type
This module requires ghc-6.10 or ... | # LANGUAGE TypeOperators , TypeFamilies , UndecidableInstances
, FlexibleInstances , MultiParamTypeClasses , CPP #
, FlexibleInstances, MultiParamTypeClasses, CPP #-}
# LANGUAGE FlexibleContexts #
# OPTIONS_GHC -Wall -fno - warn - orphans #
Copyright : ( c ) Conal Elliott 2008
module Data.Basis (H... |
1c2aa4601f3f133a82175d8ef003af413ce628c94a35f9f72f713a696bae83fc | puppetlabs/puppetdb | generators.clj | (ns puppetlabs.puppetdb.generative.generators
(:require
[clojure.string :as str]
[puppetlabs.puppetdb.generative.overridable-generators :as gen :refer [defgen]]
[puppetlabs.puppetdb.time :as time]))
;;; common data types and combinators
(defn string+
([] (string+ 255))
([max-len] (gen/fmap str/join (ge... | null | https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/test/puppetlabs/puppetdb/generative/generators.clj | clojure | common data types and combinators
catalog generator
factset generator
report generator
command generator | (ns puppetlabs.puppetdb.generative.generators
(:require
[clojure.string :as str]
[puppetlabs.puppetdb.generative.overridable-generators :as gen :refer [defgen]]
[puppetlabs.puppetdb.time :as time]))
(defn string+
([] (string+ 255))
([max-len] (gen/fmap str/join (gen/vector gen/char-alphanumeric 1 max-l... |
387c0a65324a1b07f70f16bb252735e431afec513234f4cc4c190e9c7b3ab6ec | cicakhq/potato | group.lisp | (in-package :potato.core)
(declaim #.potato.common::*compile-decl*)
(alexandria:define-constant +GROUP-USER-TYPE-ADMIN+ "ADMIN" :test #'equal)
(alexandria:define-constant +GROUP-USER-TYPE-USER+ "USER" :test #'equal)
(alexandria:define-constant +GROUP-USER-TYPE-PRIVATE+ "PRIVATE" :test #'equal)
(deftype group-type ()... | null | https://raw.githubusercontent.com/cicakhq/potato/88b6c92dbbc80a6c9552435604f7b1ae6f2a4026/src/potato/group.lisp | lisp |
group
TODO: Remove NULL type, only for compatibility
TODO: Remove this function
ELSE: Not in cache. Lookup and update cache.
Web functions for group management
| (in-package :potato.core)
(declaim #.potato.common::*compile-decl*)
(alexandria:define-constant +GROUP-USER-TYPE-ADMIN+ "ADMIN" :test #'equal)
(alexandria:define-constant +GROUP-USER-TYPE-USER+ "USER" :test #'equal)
(alexandria:define-constant +GROUP-USER-TYPE-PRIVATE+ "PRIVATE" :test #'equal)
(deftype group-type ()... |
3c3babbd16f9e88aeced0f93a7213f614b2f14115f540cf97cf40f6f25071857 | leonardb/mnesia_fdb | mnesia_fdb_xform.erl | %%----------------------------------------------------------------
Copyright ( c ) 2013 - 2016 Klarna AB
%%
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
%%
%% ... | null | https://raw.githubusercontent.com/leonardb/mnesia_fdb/d94f89d67453cc2edb2053ae0799e424006d6e2f/mvd_tests/mnesia_fdb_xform.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 express or implied. See the License for the
specific language governing permissions an... | Copyright ( c ) 2013 - 2016 Klarna AB
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
via a parse_transform , to replace dis... |
60993b9e3bf7389b5924fbc69e9f333da8cf0b1964feda46416916b3177d3e7a | grin-compiler/ghc-wpc-sample-programs | Identity.hs | -- |
Module : Basement . Compat . Identity
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
-- Identity re-export, with a compat wrapper for older version of base that
do not have Data . Functor . Identity
# LANGUAGE CPP #
module Basement.Compat.Ide... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/basement-0.0.11/Basement/Compat/Identity.hs | haskell | |
License : BSD-style
Stability : experimental
Portability : portable
Identity re-export, with a compat wrapper for older version of base that | Module : Basement . Compat . Identity
Maintainer : < >
do not have Data . Functor . Identity
# LANGUAGE CPP #
module Basement.Compat.Identity
( Identity(..)
) where
#if MIN_VERSION_base(4,8,0)
import Data.Functor.Identity
#else
import Basement.Compat.Base
newtype Identity a = Identity { ru... |
cd52e8b66ac31c4c7129957b2cd53258dd3dcbc1ad7de5f9c88a43acd5f0073a | reborg/clojure-essential-reference | 30.clj | < 1 >
;; ArithmeticException integer overflow
(take 7 (iterate #(*' % %) 2))
( 2 4 16 256 65536 4294967296 18446744073709551616N ) ; < 2 > | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OperationsonNumbers/%2B%2C-%2C*and/30.clj | clojure | ArithmeticException integer overflow
< 2 > | < 1 >
(take 7 (iterate #(*' % %) 2)) |
0e01dc6dff9c809c5c5a05d170ebb31066d93414ff3099bc69259f945fa3348c | OCamlPro/OCamlPro-OCaml-Branch | typeclass.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet Cri... | null | https://raw.githubusercontent.com/OCamlPro/OCamlPro-OCaml-Branch/3a522985649389f89dac73e655d562c54f0456a5/inline-more/typing/typeclass.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 .
$ Id$
open Misc
open Parsetree
open Ast... |
b64ede821a09374303d1e813cdb8ef742ccb71b9918084ee40618932ad5d8bb8 | penpot/penpot | static.cljs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.main.ui.static
(:require
[app.main.store :as st]
[app.main.ui.icons :as i]
[app.util.global... | null | https://raw.githubusercontent.com/penpot/penpot/7303d311d5f23d515fa3fcdc6cd13cf7f429d1fe/frontend/src/app/main/ui/static.cljs | clojure |
Copyright (c) KALEIDOS INC | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns app.main.ui.static
(:require
[app.main.store :as st]
[app.main.ui.icons :as i]
[app.util.globals :as globals]
[app.util.i18n ... |
029813ecb1d1a60e28be9341ee4d57e493b3b1ab01da56d094ee55fb7b49471d | slyrus/mcclim-old | frame-manager.lisp | ;;; -*- Mode: Lisp; Package: CLIM-GRAPHIC-FORMS -*-
( c ) 2006 Jack D. Unrue ( jdunrue ( at ) gmail ( dot ) com )
;;; based on the null backend by:
( c ) 2005 ( )
;;; This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as publis... | null | https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Backends/Graphic-Forms/frame-manager.lisp | lisp | -*- Mode: Lisp; Package: CLIM-GRAPHIC-FORMS -*-
based on the null backend by:
This library is free software; you can redistribute it and/or
either
This library 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... |
( c ) 2006 Jack D. Unrue ( jdunrue ( at ) gmail ( dot ) com )
( c ) 2005 ( )
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
Library General Public License for more details .
You should have received a copy of the GNU Lib... |
02527bdcfaecb02c96a0d895e6cd043041bfbf15f9d99712a7d5db0af1d6aa1a | bjorng/wings | wpc_bbox.erl | %%
wpc_bbox.erl --
%%
%% Plugin to create a bounding box numerically.
%%
Copyright ( c ) 2009 - 2011 .
%%
%% See the file "license.terms" for information on usage and redistribution
%% of this file, and for a DISCLAIMER OF ALL WARRANTIES.
%%
%% $Id$
%%
-module(wpc_bbox).
-export([init/0,menu/2,command... | null | https://raw.githubusercontent.com/bjorng/wings/dec64a500220359dbc552600af486be47c45d301/plugins_src/primitives/wpc_bbox.erl | erlang |
Plugin to create a bounding box numerically.
See the file "license.terms" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
$Id$
| wpc_bbox.erl --
Copyright ( c ) 2009 - 2011 .
-module(wpc_bbox).
-export([init/0,menu/2,command/2]).
-include_lib("wings/src/wings.hrl").
init() -> true.
menu(Mode, Menu) when Mode =:= {shape}; Mode =:= {tools,bbox} ->
lists:reverse(parse(Menu, [], false));
menu(_,Menu) -> Menu.
parse([], NewMenu, true)... |
ef17b8fee225dedabada2f2e3acd28f736ced52c14d84918c3c68afebcd8abe6 | larandaA/hgraphs | Internal.hs | # LANGUAGE DeriveGeneric , DeriveAnyClass #
module Data.Graph.Abstract.Internal
( Node, Edge(..), Adj(..)
, Graph(..), Graph',
buildFromList
) where
import Control.DeepSeq (NFData)
import Control.Monad
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as VM
import GHC.G... | null | https://raw.githubusercontent.com/larandaA/hgraphs/322b5cdfafbae851b4251c907e2c81b82cf02d4a/src/Data/Graph/Abstract/Internal.hs | haskell | # LANGUAGE DeriveGeneric , DeriveAnyClass #
module Data.Graph.Abstract.Internal
( Node, Edge(..), Adj(..)
, Graph(..), Graph',
buildFromList
) where
import Control.DeepSeq (NFData)
import Control.Monad
import qualified Data.Vector as V
import qualified Data.Vector.Mutable as VM
import GHC.G... | |
982b77378bf1396c4a082ebd24cf3be8f9eda1ee830473efebde1ef0e8338bf2 | camlp5/camlp5 | pp_MLast.ml | (* camlp5r *)
(* camlp5r *)
(* pp_MLast.ml,v *)
value ref_show_longid = ref (fun (_ : MLast.longid) → "<longid>");
value ref_show_longid_lident =
ref (fun (_ : MLast.longid_lident) → "<longid_lident>")
;
value ref_show_ctyp = ref (fun (_ : MLast.ctyp) → "<ctyp>");
value ref_show_expr = ref (fun (_ : MLast.expr) → "<... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ppxprint/pp_MLast.ml | ocaml | camlp5r
camlp5r
pp_MLast.ml,v |
value ref_show_longid = ref (fun (_ : MLast.longid) → "<longid>");
value ref_show_longid_lident =
ref (fun (_ : MLast.longid_lident) → "<longid_lident>")
;
value ref_show_ctyp = ref (fun (_ : MLast.ctyp) → "<ctyp>");
value ref_show_expr = ref (fun (_ : MLast.expr) → "<expr>");
value ref_show_patt = ref (fun (_ : MLa... |
806ec5131a194835a608f9594528b3581158eb5aef7d6f11c4ca76c6bc992faa | fulcro-legacy/fulcro-tutorial | ZZ_HTML_to_CLJS.cljs | (ns fulcro-tutorial.ZZ-HTML-to-CLJS
(:require
[fulcro.client.dom :as dom]
[devcards.core :as dc]
[fulcro.client.primitives :as prim :refer [defui defsc]]
[fulcro.client.cards :refer [defcard-fulcro]]
[fulcro.client :as fc]
[fulcro.ui.forms :as f]
[fulcro.client.mutations :as m :refer [defm... | null | https://raw.githubusercontent.com/fulcro-legacy/fulcro-tutorial/fe9bcd19908d4e24e723954e3804ceccfd07e989/src/tutorial/fulcro_tutorial/ZZ_HTML_to_CLJS.cljs | clojure | (ns fulcro-tutorial.ZZ-HTML-to-CLJS
(:require
[fulcro.client.dom :as dom]
[devcards.core :as dc]
[fulcro.client.primitives :as prim :refer [defui defsc]]
[fulcro.client.cards :refer [defcard-fulcro]]
[fulcro.client :as fc]
[fulcro.ui.forms :as f]
[fulcro.client.mutations :as m :refer [defm... | |
7a4d0580c13c9c7b4a08d3cf7cd6f118bf384f3337c32c9a0f913bd5236240cf | weblocks-framework/weblocks | operations-action.lisp |
(in-package :weblocks)
;;; This function processes actions that perform operations on dataseq
;;; items. It's in a separate file because there is an issue with
CMUCL and compiling this function transformed through
CL - CONT . CMUCL interpreter , however , works . We 'll just add this to
ASDF for all implementat... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/src/widgets/dataseq/operations-action.lisp | lisp | This function processes actions that perform operations on dataseq
items. It's in a separate file because there is an issue with
will be loaded without compilation. |
(in-package :weblocks)
CMUCL and compiling this function transformed through
CL - CONT . CMUCL interpreter , however , works . We 'll just add this to
ASDF for all implementations except CMUCL , and for CMUCL this file
(defun/cc dataseq-operations-action (obj &rest args)
(declare (ignore args))
... |
4cfd57e8f1e28d616e3d8ec3a4326b1bddfcbb963b99c20a4d53439f02ad6c47 | mbj/mhs | HTTP.hs | module OpenApi.HTTP where
import OpenApi.Prelude
import qualified Network.HTTP.Types.Status as HTTP
-- Convert safely from natural to known http status.
--
Both ` toEnum ` and upstream ` mkStatus ` allow to create odd
-- statuses, like negative or unregistered ones.
mkStatus :: Natural -> Maybe HTTP.Status
mkStatu... | null | https://raw.githubusercontent.com/mbj/mhs/71d96825e92df3549c2ca5b0058acbb91fc2a6e7/openapi/src/OpenApi/HTTP.hs | haskell | Convert safely from natural to known http status.
statuses, like negative or unregistered ones. | module OpenApi.HTTP where
import OpenApi.Prelude
import qualified Network.HTTP.Types.Status as HTTP
Both ` toEnum ` and upstream ` mkStatus ` allow to create odd
mkStatus :: Natural -> Maybe HTTP.Status
mkStatus = \case
100 -> pure HTTP.status100
101 -> pure HTTP.status101
200 -> pure HTTP.status200
201 ->... |
221fae5b966b5f05ce26de22ba476254d9a515799f9590c13289c3cc05baab36 | brendanhay/gogol | GetIamPolicy.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-resourcemanager/gen/Gogol/ResourceManager/Cloudresourcemanager/Projects/GetIamPolicy.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Resource
** Constructing a Request
| A resource alias for @cloudresourcemanager.projects.getIamPolicy@ method which the
| V1 error format.
| OAuth access token.
| Multipart request metadata.
| REQUIRED: The resource for ... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
382a45c115ed69ed65d6c69eae0d0827025ff24ea4bdc116088628a60e375c1b | VictorNicollet/99-Problems-OCaml | p28.ml | (* Sorting a list of lists according to length of sublists. *)
We might not be allowed to use built - in List.sort , so here 's an eight - line implementation
of insertion sort - O(n² ) time complexity .
of insertion sort - O(n²) time complexity. *)
let rec insert cmp e = function
| [] -> [e]
| h :: t a... | null | https://raw.githubusercontent.com/VictorNicollet/99-Problems-OCaml/a13e625545d54d4d927b39b18ab1ffba7de6b7e6/21-30/p28.ml | ocaml | Sorting a list of lists according to length of sublists.
Sorting according to length : prepend length, sort, remove length
Can only be reached if original list is empty |
We might not be allowed to use built - in List.sort , so here 's an eight - line implementation
of insertion sort - O(n² ) time complexity .
of insertion sort - O(n²) time complexity. *)
let rec insert cmp e = function
| [] -> [e]
| h :: t as l -> if cmp e h <= 0 then e :: l else h :: insert cmp e t
;;
... |
623fd026d22955f818ae85f1e761c211912a406046615d957a4dfc0ea7765867 | pandoc/pandoc-lua-marshal | CitationMode.hs | |
Copyright : © 2021 - 2023 SPDX - License - Identifier : MIT
Maintainer : >
Marshaling / unmarshaling functions of ' CitationMode ' values .
Copyright : © 2021-2023 Albert Krewinkel
SPDX-License-Identifier : MIT
Maintainer : Albert Krewinkel <ta... | null | https://raw.githubusercontent.com/pandoc/pandoc-lua-marshal/e71315da1d377cf52cd94975c20ac04616c2d935/src/Text/Pandoc/Lua/Marshal/CitationMode.hs | haskell | | Retrieves a Citation value from a string. | |
Copyright : © 2021 - 2023 SPDX - License - Identifier : MIT
Maintainer : >
Marshaling / unmarshaling functions of ' CitationMode ' values .
Copyright : © 2021-2023 Albert Krewinkel
SPDX-License-Identifier : MIT
Maintainer : Albert Krewinkel <ta... |
cf91cba7cdeb00f2944641b272d3a8259cdaf8ca856258697f078fc26fc7cdb6 | fourmolu/fourmolu | output-Trailing.hs | x :: [Int]
x =
[ 1,
2,
3
]
y :: (Int, Bool, Double)
y =
( 1,
True,
1.5
)
data Foo = Foo
{ a :: Int,
b :: Bool,
c :: Double
}
| null | https://raw.githubusercontent.com/fourmolu/fourmolu/c47d1b68d7af393f1a1a32d0a77b85df0656f6d8/data/fourmolu/comma-style/output-Trailing.hs | haskell | x :: [Int]
x =
[ 1,
2,
3
]
y :: (Int, Bool, Double)
y =
( 1,
True,
1.5
)
data Foo = Foo
{ a :: Int,
b :: Bool,
c :: Double
}
| |
e67d7b74c954fde6311932ecacede3a80e03c21c01fced8f2ed621673298c979 | blindglobe/clocc | i1mach.lisp | ;;
This is the CMLIB version of I1MACH , the integer machine
;; constants subroutine originally developed for the PORT library.
;;
;; I1MACH can be used to obtain machine-dependent parameters
;; for the local machine environment. It is a function
subroutine with one ( input ) argument , and can... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/f2cl/packages/i1mach.lisp | lisp |
constants subroutine originally developed for the PORT library.
I1MACH can be used to obtain machine-dependent parameters
for the local machine environment. It is a function
as follows, for example
where I=1,...,16. The (output) value of K above is
determined by the (input) value of ... | This is the CMLIB version of I1MACH , the integer machine
subroutine with one ( input ) argument , and can be called
K = )
I1MACH ( 2 ) = the standard output unit .
I1MACH ( 3 ) = the standard punch unit .
I1MACH ( 4 ) = the standard error message unit .
I1MACH ( 5 ) = the nu... |
b72c10122b9df9120138c91ff5312294386dc8c65452fbba29e89bb656e01f03 | cubicle-model-checker/cubicle | trace.mli | (**************************************************************************)
(* *)
Cubicle
(* *)
... | null | https://raw.githubusercontent.com/cubicle-model-checker/cubicle/00f09bb2d4bb496549775e770d7ada08bc1e4866/trace.mli | ocaml | ************************************************************************
... | Cubicle
Copyright ( C ) 2011 - 2014
and
Universite Paris - Sud 11
This file is distributed under the terms ... |
6731aac748d7f78d8bd533bd058508e26dbf9e78381fc19202a7ac70fd640d34 | NoRedInk/haskell-libraries | Array.hs | -- | Fast immutable arrays. The elements in an array must have the same type.
module Array
( -- * Arrays
Array,
-- * Creation
empty,
initialize,
repeat,
fromList,
-- * Query
isEmpty,
length,
get,
-- * Manipulate
set,
push,
append,
slice,
-- * Lists
... | null | https://raw.githubusercontent.com/NoRedInk/haskell-libraries/7af1e05549e09d519b08ab49dff956b5a97d4f7e/nri-prelude/src/Array.hs | haskell | | Fast immutable arrays. The elements in an array must have the same type.
* Arrays
* Creation
* Query
* Manipulate
* Lists
* Transform
| Representation of fast immutable arrays. You can create arrays of integers
dream up.
| Helper function to unwrap an array
| Return an empty array.
| Determine if an arra... | module Array
Array,
empty,
initialize,
repeat,
fromList,
isEmpty,
length,
get,
set,
push,
append,
slice,
toList,
toIndexedList,
map,
indexedMap,
foldr,
foldl,
filter,
)
where
import Basics
( Bool,
Int,
clamp,
(&&),
(+)... |
ea39c02bf80e07ff2fc32dc7a49f27ab606ec077e7e7d8c52c7b7b056cbb5fd4 | kana/sicp | ex-3.79.scm | Exercise 3.79 . the solve-2nd procedure of exercise 3.78 so that
it can be used to solve general second - order differential equations d2
y / dt2 = f(dy / dt , y ) .
(load "./sec-3.5.scm")
(load "./ex-3.77.scm")
(define (solve-2nd f dt y0 dy0)
(define y (integral (delay dy) y0 dt))
(define dy (integral (... | null | https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-3.79.scm | scheme | Exercise 3.79 . the solve-2nd procedure of exercise 3.78 so that
it can be used to solve general second - order differential equations d2
y / dt2 = f(dy / dt , y ) .
(load "./sec-3.5.scm")
(load "./ex-3.77.scm")
(define (solve-2nd f dt y0 dy0)
(define y (integral (delay dy) y0 dt))
(define dy (integral (... | |
a8d4b66e9858778171902110e5d95eb3d56ed36bef3cffe540e7fef067ee1b66 | purerl/purerl | Types.hs | module Language.PureScript.Erl.CodeGen.Types where
import Prelude
import Language.PureScript.Erl.CodeGen.AST
( Atom(..),
EType(..) )
import Language.PureScript.Types
( SourceType,
Type(ForAll, REmpty, RCons, KindApp, ConstrainedType, TypeVar,
TypeConstructor, TypeApp) )
import Data.Text ... | null | https://raw.githubusercontent.com/purerl/purerl/d4c933b36dfaed8f4ae4e07a8806cf8a822885f4/src/Language/PureScript/Erl/CodeGen/Types.hs | haskell |
dummy to prevent recursing
can't ignore mn for external stuff
dummy to prevent recursing
TODO if we put this in the defining module maybe an opaque type would be useful to prevent some misuse
arguably none()
not a data type/alias we can find or not fully applied
substitute any() for any var X, for use in specs
... | module Language.PureScript.Erl.CodeGen.Types where
import Prelude
import Language.PureScript.Erl.CodeGen.AST
( Atom(..),
EType(..) )
import Language.PureScript.Types
( SourceType,
Type(ForAll, REmpty, RCons, KindApp, ConstrainedType, TypeVar,
TypeConstructor, TypeApp) )
import Data.Text ... |
ad59100e65315e39080367b7e92d3a9f1a7915501debcf8946dd619e95cb968e | Bodigrim/chimera | FromIntegral.hs | -- |
-- Module: Data.Chimera.FromIntegral
Copyright : ( c ) 2018
Licence : MIT
Maintainer : < >
# OPTIONS_GHC -fno - warn - unused - imports #
{-# OPTIONS_HADDOCK hide #-}
module Data.Chimera.FromIntegral
( word2int
, int2word
) where
word2int :: Word -> Int
word2int = fromIntegral
i... | null | https://raw.githubusercontent.com/Bodigrim/chimera/5789071abdf165af67a7cd8398caf1cd54b9feab/Data/Chimera/FromIntegral.hs | haskell | |
Module: Data.Chimera.FromIntegral
# OPTIONS_HADDOCK hide # | Copyright : ( c ) 2018
Licence : MIT
Maintainer : < >
# OPTIONS_GHC -fno - warn - unused - imports #
module Data.Chimera.FromIntegral
( word2int
, int2word
) where
word2int :: Word -> Int
word2int = fromIntegral
int2word :: Int -> Word
int2word = fromIntegral
|
81c9973fab2227308d35e9b4bb142a57d5d70127088e3d2b6c4ef233a8c55864 | bristolpl/intensional-datatys | FromCore.hs | # LANGUAGE LambdaCase #
module Self.FromCore
( freshCoreType,
freshCoreScheme,
fromCoreCons,
consInstArgs,
getVar,
)
where
import Self.Constraints
import Self.Constructors
import Control.Monad.RWS
import qualified Data.IntSet as I
import qualified Data.Map as M
import GhcPlugins hiding ((<>), Expr... | null | https://raw.githubusercontent.com/bristolpl/intensional-datatys/ce6e7f5069530ea21a3e19c8e9e17fc23dc8e66c/test/Self/FromCore.hs | haskell | A fresh monomorphic type
A fresh polymorphic type
The type of a constructor injected into a fresh refinement environment
The argument types of an instantiated constructor
Instantiate type synonym arguments
Disregard type class evidence
Convert a monomorphic core type
Instantiate type synonyms
Disregard type cl... | # LANGUAGE LambdaCase #
module Self.FromCore
( freshCoreType,
freshCoreScheme,
fromCoreCons,
consInstArgs,
getVar,
)
where
import Self.Constraints
import Self.Constructors
import Control.Monad.RWS
import qualified Data.IntSet as I
import qualified Data.Map as M
import GhcPlugins hiding ((<>), Expr... |
bc733b42bef28b9aae5f504f39c8d40cb2d293887bdacf0c3a7fa1dda2fb42f4 | ranjitjhala/haddock-annot | Output.hs | module Language.Haskell.HsColour.Output where
-- | The supported output formats.
data Output = TTY -- ^ ANSI terminal codes
| LaTeX -- ^ TeX macros
| HTML -- ^ HTML with font tags
| CSS -- ^ HTML with CSS.
| ACSS -- ^ HTML with CSS and mouseover types.
... | null | https://raw.githubusercontent.com/ranjitjhala/haddock-annot/ffaa182b17c3047887ff43dbe358c246011903f6/hscolour-1.18/Language/Haskell/HsColour/Output.hs | haskell | | The supported output formats.
^ ANSI terminal codes
^ TeX macros
^ HTML with font tags
^ HTML with CSS.
^ HTML with CSS and mouseover types.
^ HTML with inline CSS.
^ mIRC chat clients | module Language.Haskell.HsColour.Output where
deriving (Eq,Show)
|
bdff5a50f3cde8f42706c04590f56954df4b4246ee186c60443b5439b8860130 | unisonweb/unison | Pattern.hs | {-# LANGUAGE BangPatterns #-}
module Unison.Util.Text.Pattern where
import Data.Char (isAlphaNum, isControl, isLetter, isLower, isMark, isNumber, isPrint, isPunctuation, isSeparator, isSpace, isSymbol, isUpper)
import qualified Data.Text as DT
import Unison.Util.Text (Text)
import qualified Unison.Util.Text as Text
... | null | https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/parser-typechecker/src/Unison/Util/Text/Pattern.hs | haskell | # LANGUAGE BangPatterns #
sequencing of patterns
capture all the text consumed by the inner pattern, discarding its subcaptures
succeed if given the empty text, fail otherwise
succeed if input starts with the given text, advance by that text
any char
negation of the given pattern
match if either pattern matches
... |
module Unison.Util.Text.Pattern where
import Data.Char (isAlphaNum, isControl, isLetter, isLower, isMark, isNumber, isPrint, isPunctuation, isSeparator, isSpace, isSymbol, isUpper)
import qualified Data.Text as DT
import Unison.Util.Text (Text)
import qualified Unison.Util.Text as Text
data Pattern
left - biased c... |
0f71d33a948a44e8a4cad7337fcfd9076f3aedd09dd41c352d0db562e344829d | ekmett/transformers | Cont.hs | -----------------------------------------------------------------------------
-- |
Module : Control . . Trans . Cont
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
... | null | https://raw.githubusercontent.com/ekmett/transformers/eb2f3223114f67f68c8970458ca863e231bdb576/Control/Monad/Trans/Cont.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Maintainer :
Stability : experimental
Portability : portable
---------------------------------------------------------------------------
* The Cont monad
* The ContT monad trans... | Module : Control . . Trans . Cont
Copyright : ( c ) The University of Glasgow 2001
Continuation monads .
module Control.Monad.Trans.Cont (
Cont,
cont,
runCont,
mapCont,
withCont,
ContT(..),
mapContT,
withContT,
callCC,
liftLocal,
) where
import Control.Mon... |
c80f2c9f23e7829927269fd3830075bac9a66f80b156728cb6ed7d601f57d7a8 | gilbertw1/clipbot | urmom.clj | (ns clipbot.plugins.urmom
(:require [clipbot.plugin :as plugin]
[clojure.string :as str]))
(defn extract-ing-word [msg]
(->> msg (re-seq #"(\w+ing)") first second))
(defn extract-statement-words [msg]
(let [ing-word (extract-ing-word msg)
ing-string (subs msg (.indexOf msg ing-word))]
(s... | null | https://raw.githubusercontent.com/gilbertw1/clipbot/ef9516ceee58e860493f1f9cb6cb0bc2169c3d7c/resources/plugins/urmom.clj | clojure | (ns clipbot.plugins.urmom
(:require [clipbot.plugin :as plugin]
[clojure.string :as str]))
(defn extract-ing-word [msg]
(->> msg (re-seq #"(\w+ing)") first second))
(defn extract-statement-words [msg]
(let [ing-word (extract-ing-word msg)
ing-string (subs msg (.indexOf msg ing-word))]
(s... | |
7f85ca61e17482774011acff067307765ae359114d10a2c41be9be21d16d9525 | michaelklishin/langohr | http.clj | This source code is dual - licensed under the Apache License , version
2.0 , and the Eclipse Public License , version 1.0 .
;;
;; The APL v2.0:
;;
;; ----------------------------------------------------------------------------------
Copyright ( c ) 2011 - 2020 , , and the ClojureWerkz Team
;;
Licensed unde... | null | https://raw.githubusercontent.com/michaelklishin/langohr/0c63ac3c6bc97d73e290ed366e9e97e07d39dedb/src/clojure/langohr/http.clj | clojure |
The APL v2.0:
----------------------------------------------------------------------------------
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 CONDIT... | This source code is dual - licensed under the Apache License , version
2.0 , and the Eclipse Public License , version 1.0 .
Copyright ( c ) 2011 - 2020 , , and the ClojureWerkz Team
distributed under the License is distributed on an " AS IS " BASIS ,
The EPL v1.0 :
Copyright ( c ) 2011 - 2020 , , ... |
8de84f154820e3aa6eefbe2cb9d9b92998619ed3f71103c353c6bd8ab4c0e022 | Tim-ats-d/Postem-markup | builtins.ml | class null =
object
inherit Base.numerotation
method next = ()
method get = ""
end
class numeric_arab =
object
inherit Base.numerotation
val mutable current = 0
method next = current <- current + 1
method get = Int.to_string current
end
class lower_case_numeric_roman =
object
... | null | https://raw.githubusercontent.com/Tim-ats-d/Postem-markup/4e53b5a58d67e8f0a1d4e5d1867dede6974a7d27/src/common/enumerate/builtins.ml | ocaml | class null =
object
inherit Base.numerotation
method next = ()
method get = ""
end
class numeric_arab =
object
inherit Base.numerotation
val mutable current = 0
method next = current <- current + 1
method get = Int.to_string current
end
class lower_case_numeric_roman =
object
... | |
d0432434a4dc61d5209ec119b4911a8eb34a4d4c2eaeb36e9fe61eb66ae09cf1 | herbelin/coq-hh | typeclasses_errors.mli | (************************************************************************)
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/pretyping/typeclasses_errors.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Class name, method
* found, expec... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Decl_kinds
op... |
3f6d8abb1471d508435856a30deb4042b4fac5e08237284ea13ff2f96eb797ec | fulcrologic/fulcro-rad-kvstore | parser.clj | (ns play.com.example.components.parser
(:require
[com.example.components.parser :as parser]
[com.fulcrologic.rad.database-adapters.key-value.key-store :as kv-key-store]
[mount.core :refer [defstate]]
[com.example.components.seeded-connection :refer [kv-connections]]
[com.example.components.seed :r... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-rad-kvstore/f0046c21e386214b42d4621b33dcb3aa1058ad52/src/play/play/com/example/components/parser.clj | clojure | (d-q '[:find [?uuid ...]
:in $ ?cid
:where
[?dbid :invoice/id ?uuid]
[?dbid :invoice/customer ?c]
[?c :account/id ?cid]] db id)
(d-q '[:find ?account-uuid .
:in $ ?invoice-uuid
:where
[?i :invoice/id ?invoice-uuid]
[?i :invoice/customer ?c]
[?c :acco... | (ns play.com.example.components.parser
(:require
[com.example.components.parser :as parser]
[com.fulcrologic.rad.database-adapters.key-value.key-store :as kv-key-store]
[mount.core :refer [defstate]]
[com.example.components.seeded-connection :refer [kv-connections]]
[com.example.components.seed :r... |
b116286fd60fb79e125cbd514e089fc1670de1f449353348e33ac6f728c5f217 | slegrand45/mysql_protocol | mp_data_binary.ml | let case_datetime_timestamp_date field_type v =
let length = Bitstring.bitstring_length v in
let parts =
if (length = 0) then
((0, 0, 0), (0, 0, 0, Int64.zero))
else
match%bitstring v with
| {| year : 2 * 8 : int, unsigned, littleendian;
rest : length - (2*8) : bitstring |} -> ... | null | https://raw.githubusercontent.com/slegrand45/mysql_protocol/eb28d33dfbee7b12f88a7f798c2dbb40e1fb1bb0/src/mp_data_binary.ml | ocaml | /!\ : should not happen because set is sent as a string
/!\ : should not happen because enum is sent as a string
TODO: add varchar to tests
opaque type | let case_datetime_timestamp_date field_type v =
let length = Bitstring.bitstring_length v in
let parts =
if (length = 0) then
((0, 0, 0), (0, 0, 0, Int64.zero))
else
match%bitstring v with
| {| year : 2 * 8 : int, unsigned, littleendian;
rest : length - (2*8) : bitstring |} -> ... |
e4980849adacdb629f37c498abba2401cf7fff1e68e138a30b236af6cd9d9a2e | Interlisp/medley | ctypes.lisp | -*-Mode : LISP ; Package : PCL ; ; Syntax : Common - lisp -*-
;;;
;;; *************************************************************************
Copyright ( c ) 1991 Venue
;;; All rights reserved.
;;; *************************************************************************
;;;
(in-package 'clos)
;;;
The built - ... | null | https://raw.githubusercontent.com/Interlisp/medley/f0b9ce3daeef95543e452ea4c59cb8e683295035/clos/ctypes.lisp | lisp | Package : PCL ; ; Syntax : Common - lisp -*-
*************************************************************************
All rights reserved.
*************************************************************************
Note that the STANDARD method combination type is defined by hand in the
| Copyright ( c ) 1991 Venue
(in-package 'clos)
The built - in method combination types as taken from page 1 - 31 of 88 - 002R.
file combin.lisp .
(define-method-combination + :identity-with-one-argument t)
(define-method-combination and :identity-with-one-argument t)
(define-method-combination append :i... |
cb4f67937aa522d4f387be5635d2bc6731cfe923eb82fd1f73c2021f604d63d4 | huangjs/cl | arrays.lisp | ;; benchmarks speed of array and sequence operations
;;
Author : < >
Time - stamp : < 2003 - 12 - 29 emarsden >
;;
;;
;; Timing tests for creation, initialization, access and garbage
;; collection for arrays, vectors, bitvectors and strings.
;;
NOTE : be careful running these in CMUCL on Linux with sizes large... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/other-code/cl-bench/files/arrays.lisp | lisp | benchmarks speed of array and sequence operations
Timing tests for creation, initialization, access and garbage
collection for arrays, vectors, bitvectors and strings.
than your RAM; you will most likely crash your machine.
certain implementations such as OpenMCL have an array (and thus
sizes | Author : < >
Time - stamp : < 2003 - 12 - 29 emarsden >
NOTE : be careful running these in CMUCL on Linux with sizes larger
(in-package :cl-bench.arrays)
(defun bench-1d-arrays (&optional (size 100000) (runs 10))
(declare (fixnum size))
(let ((ones (make-array size :element-type '(integer 0 1000) :init... |
6337dcbd280c45c60a7572ca5a94acfe7ace1b120ffd5585f4a78be584ef9327 | samply/blaze | instance_test.clj | (ns blaze.interaction.history.instance-test
"Specifications relevant for the FHIR history interaction:
#history
#ops"
(:require
[blaze.anomaly-spec]
[blaze.db.api-stub :refer [mem-node-system with-system-data]]
[blaze.interaction.history.instance]
[blaze.interaction.history.util-spec]
[b... | null | https://raw.githubusercontent.com/samply/blaze/948eee38021467fa343c522a644a7fd4b24b6467/modules/interaction/test/blaze/interaction/history/instance_test.clj | clojure | (ns blaze.interaction.history.instance-test
"Specifications relevant for the FHIR history interaction:
#history
#ops"
(:require
[blaze.anomaly-spec]
[blaze.db.api-stub :refer [mem-node-system with-system-data]]
[blaze.interaction.history.instance]
[blaze.interaction.history.util-spec]
[b... | |
5c0af05a1ab3af696469fb970aba1db1156cfe785f7a45469c6a976dce07da76 | sinahab/shamir-secret-sharing | Math.hs | module Math
( extendedEuclid
, modMultInverse
) where
|Calculates the GCD and coeffcients of 's identity for a and b s.t . : ax + by = gcd(a , b ) .
-- Inspired by:
@param Integer : a the first number
@param Integer : b the second number
@return ( Integer , Integer , Integer ): ( gcd , x , y ) from 's... | null | https://raw.githubusercontent.com/sinahab/shamir-secret-sharing/9c39190f52f2316962d597fc5307819d68c7c790/src/Math.hs | haskell | Inspired by:
@param Integer: the number a
@param Integer: the field p
@return Integer: b i.e. the multiplicative inverse of a modulo p | module Math
( extendedEuclid
, modMultInverse
) where
|Calculates the GCD and coeffcients of 's identity for a and b s.t . : ax + by = gcd(a , b ) .
@param Integer : a the first number
@param Integer : b the second number
@return ( Integer , Integer , Integer ): ( gcd , x , y ) from 's identity .
exten... |
44f3c28aeb603b2167fa73f0ff74fe0f89135cb85a999bc5fbe4bebbfc5e6b33 | pveber/biotk | interval_union.ml | open Base
type t = Range.t list
let rec check_invariant : t -> bool = function
| [] | _ :: [] -> true
| u :: (v :: _ as l) -> u.hi < v.lo && check_invariant l
let empty = []
let singleton r = [ r ]
let rec add xs r =
match xs with
| [] -> [ r ]
| h :: t ->
match Range.relative_position r ~wrt:h with
... | null | https://raw.githubusercontent.com/pveber/biotk/422640d9303c90c43ecb4b679a8bf5867998119c/lib/interval_union.ml | ocaml | open Base
type t = Range.t list
let rec check_invariant : t -> bool = function
| [] | _ :: [] -> true
| u :: (v :: _ as l) -> u.hi < v.lo && check_invariant l
let empty = []
let singleton r = [ r ]
let rec add xs r =
match xs with
| [] -> [ r ]
| h :: t ->
match Range.relative_position r ~wrt:h with
... | |
37085429095d60b508f2447ee5eefa1675e2dbc1565036a9d94c3d5bcea45f2c | nikomatsakis/a-mir-formality | statement.rkt | #lang racket
(require redex/reduction-semantics
"../../logic/grammar.rkt"
"../grammar.rkt"
"type-of.rkt"
"rvalue.rkt"
"place.rkt"
)
(provide type-check-goal/Statement
)
(define-judgment-form
formality-body
#:mode (type-check-goal/Statement I I O)
#:c... | null | https://raw.githubusercontent.com/nikomatsakis/a-mir-formality/bc951e21bff2bae1ccab8cc05b2b39cfb6365bfd/racket-src/body/type-check/statement.rkt | racket | (mutability/Place Γ Place mut) | #lang racket
(require redex/reduction-semantics
"../../logic/grammar.rkt"
"../grammar.rkt"
"type-of.rkt"
"rvalue.rkt"
"place.rkt"
)
(provide type-check-goal/Statement
)
(define-judgment-form
formality-body
#:mode (type-check-goal/Statement I I O)
#:c... |
dd7f446b6149a2103f711f30ff3c5e4c2b1ca1765a97e92e17e2e20eb943d6ab | drlivingston/kabob | genes.clj |
`{:name "egid-denotes-type-gene"
:head ((?/dna rdfs/subClassOf obo/SO_0000704) ;gene
(?/dna rdf/type kbio/GeneSpecificGClass))
:body (~@(kabob/rtv _/record
iaoeg/EntrezGeneInfoFileData_geneIDDataField1 _/egIce
iaoeg/EntrezGeneInfoFileData_typeOfGeneDataField1 ... | null | https://raw.githubusercontent.com/drlivingston/kabob/7038076849744c959da9c8507e8a8ab7215410aa/kabob-build/src/main/resources/edu/ucdenver/ccp/kabob/build/rules/entity/type/genes.clj | clojure | gene |
`{:name "egid-denotes-type-gene"
(?/dna rdf/type kbio/GeneSpecificGClass))
:body (~@(kabob/rtv _/record
iaoeg/EntrezGeneInfoFileData_geneIDDataField1 _/egIce
iaoeg/EntrezGeneInfoFileData_typeOfGeneDataField1 ?/type)
(!= ?/type "pseudo")
(!= ?/t... |
546bf356313858f871b4f615e34ecddb790ca404fcbe5f1b7dc01acb99aea949 | generateme/inferme | faithful_user.clj | (ns anglican.faithful-user
(:require [fastmath.core :as m]
[inferme.core :refer :all]
[inferme.plot :as plot]
[fastmath.stats :as stats]
[fastmath.random :as r]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
;;
... | null | https://raw.githubusercontent.com/generateme/inferme/3670839bee3873cfee812907937e8229431a15b2/notebooks/anglican/faithful_user.clj | clojure |
we assume that there is a little observation noise
again deep hierarchy, bad performance...
sfaking (sample faking)
:initial-point
(random-priors (user-behaviour user-data))
=> -3720.6762883495144 | (ns anglican.faithful-user
(:require [fastmath.core :as m]
[inferme.core :refer :all]
[inferme.plot :as plot]
[fastmath.stats :as stats]
[fastmath.random :as r]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
1 ... |
4038ab086c66ab0365b277ad7e68f2c0144c5eebf13e82c0105a0a3f08e12600 | hercules-ci/hercules-ci-agent | Options.hs | # LANGUAGE BlockArguments #
module Hercules.CLI.Options where
import qualified Data.Attoparsec.Text as A
import qualified Data.Text as T
import Options.Applicative hiding (helper)
import qualified Options.Applicative as Optparse
import Protolude
| Custom that provides help text when input is incomplete .
execPars... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/216a1d178d57471b05f60bf3e21ce46d3fdc5f94/hercules-ci-cli/src/Hercules/CLI/Options.hs | haskell | | We omit --help from the help text and completion. | # LANGUAGE BlockArguments #
module Hercules.CLI.Options where
import qualified Data.Attoparsec.Text as A
import qualified Data.Text as T
import Options.Applicative hiding (helper)
import qualified Options.Applicative as Optparse
import Protolude
| Custom that provides help text when input is incomplete .
execPars... |
7669093a01546bb07bc8f4d2b18b5485c8f1ca329b2a3cf64a150a16ccb7b317 | tolysz/ghcjs-stack | Install.hs | # LANGUAGE CPP #
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Install
Copyright : ( c ) 2005
2007
2007 - 2010
-- License : BSD-like
--
-- Maintainer :
-- Stability : provisional... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/cabal-install/Distribution/Client/Install.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Client.Install
License : BSD-like
Maintainer :
Stability : provisional
Portability : portable
High level interface to package installation.
-----------------------------------------------------... | # LANGUAGE CPP #
Copyright : ( c ) 2005
2007
2007 - 2010
module Distribution.Client.Install (
install,
makeInstallContext,
makeInstallPlan,
processInstallPlan,
InstallArgs,
InstallContext,
pruneInstallPlan
) where
import Data.Folda... |
37fcaf6d60c89ab372819269c2288ebd525f2a09da77388594c22a677f88d41b | haroldcarr/learn-haskell-coq-ml-etc | E.hs | # OPTIONS_GHC -fno - warn - type - defaults #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
# LANGUAGE LambdaCase ... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/existentials/2020-01-mark-karpov-struggling-to-forget/src/E.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE MultiWayIf #
# LANGUAGE PatternSynonyms #
# LANGUAGE TypeOperators #
# LANGUAGE ViewPatterns #
| Path of some base and type.
... | # OPTIONS_GHC -fno - warn - type - defaults #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE PolyKinds #
# LANGUAGE RankNTypes #
module E where
import Control.Monad.Catch
import Data.Data
import Data.Kind
... |
5437d3e64550c1861351197fa896a1059827f037a3bf7659b49b459c91fcc67c | TrustInSoft/tis-interpreter | idxset.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/qed/src/idxset.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
69ce51803c5b519151d3b47d3684842596a24fb7c47db8063a91f7046f83e875 | tommaisey/aeon | pv-mag-noise.help.scm | ;; (pv-mag-noise buffer)
;; Magnitudes are multiplied with noise.
;; buffer - fft buffer.
(with-sc3
(lambda (fd)
(async fd (b-alloc 10 2048 1))
(async fd (b-alloc-read 12 "/home/rohan/audio/metal.wav" 0 0))))
(let* ((a (play-buf 1 12 (buf-rate-scale kr 12) 0 0 1))
(f (fft* 10 a))
(h (pv-mag-noi... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/fft/pv-mag-noise.help.scm | scheme | (pv-mag-noise buffer)
Magnitudes are multiplied with noise.
buffer - fft buffer. |
(with-sc3
(lambda (fd)
(async fd (b-alloc 10 2048 1))
(async fd (b-alloc-read 12 "/home/rohan/audio/metal.wav" 0 0))))
(let* ((a (play-buf 1 12 (buf-rate-scale kr 12) 0 0 1))
(f (fft* 10 a))
(h (pv-mag-noise f)))
(audition (out 0 (mul (ifft* h) 0.5))))
|
08084c8ec4f2e6a4fc26b3b719bfa92ad03c347802e9f655f8c635562d48dad1 | cruxlang/crux | Quantify.hs | module Crux.Typecheck.Quantify (quantify) where
import Crux.Prelude
import Crux.TypeVar
quantifyConstraintSet :: MonadIO m => ConstraintSet -> m ()
quantifyConstraintSet (ConstraintSet recordConstraint _traits) = do
for_ recordConstraint $ \RecordConstraint{..} -> do
for_ rcFields $ \RecordField{..} -> do... | null | https://raw.githubusercontent.com/cruxlang/crux/883f642d15fb85ce17d9c485ee91158d9e826a2f/Crux/Typecheck/Quantify.hs | haskell | TODO: quantify mutability. there's almost certainly a bug
but I don't know how to write a test for it yet.
Constraints should already be quantified here. | module Crux.Typecheck.Quantify (quantify) where
import Crux.Prelude
import Crux.TypeVar
quantifyConstraintSet :: MonadIO m => ConstraintSet -> m ()
quantifyConstraintSet (ConstraintSet recordConstraint _traits) = do
for_ recordConstraint $ \RecordConstraint{..} -> do
for_ rcFields $ \RecordField{..} -> do... |
a6ce28f4e1d4bb8fdf2a9cdb396b19b92bb1ab5c6ae80a5e5b28a550a04a76d9 | nikomatsakis/a-mir-formality | wfwc--type-in-outlives-bound.rkt | #lang racket
(require redex/reduction-semantics
"../../util.rkt"
"../grammar.rkt"
"../prove.rkt"
)
;; Various tests that check the requirements that where clauses be well-formed.
(module+ test
(traced '()
(test-term-false ; false because `T: Ord` does not hold
... | null | https://raw.githubusercontent.com/nikomatsakis/a-mir-formality/71be4d5c4bd5e91d326277eaedd19a7abe3ac76a/racket-src/rust/test/wfwc--type-in-outlives-bound.rkt | racket | Various tests that check the requirements that where clauses be well-formed.
false because `T: Ord` does not hold | #lang racket
(require redex/reduction-semantics
"../../util.rkt"
"../grammar.rkt"
"../prove.rkt"
)
(module+ test
(traced '()
(rust:is-core-crate-ok
[(trait Ord[] where [] {})
(struct IsOrd[(type T)] where [(T : Ord[])] {})
(fn foo[... |
85769eb31ca93ba938904d9c7a1fdd9e9597cf0e92cc4c8a06a990a5ad32319d | froggey/Mezzano | type.lisp | ;;;; type.lisp - Type management.
(in-package :mezzano.internals)
(defmacro deftype (name lambda-list &body body)
(let ((whole (gensym "WHOLE"))
(env (gensym "ENV")))
(multiple-value-bind (new-lambda-list env-binding)
(fix-lambda-list-environment lambda-list)
`(eval-when (:compile-toplevel... | null | https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/system/type.lisp | lisp | type.lisp - Type management.
Initialized here for the cold generator and in cold-start for normal operation
If name exists as a type, do nothing.
Otherwise, mark it as a potential class.
Can't be done in instance.lisp. Too early, causes xcompiler issues.
Figure 4-3. Standardized Compound Type Specifier Names
Th... |
(in-package :mezzano.internals)
(defmacro deftype (name lambda-list &body body)
(let ((whole (gensym "WHOLE"))
(env (gensym "ENV")))
(multiple-value-bind (new-lambda-list env-binding)
(fix-lambda-list-environment lambda-list)
`(eval-when (:compile-toplevel :load-toplevel :execute)
... |
aab18ac3cdad40cffdc5ea3b8b634b0b7ad307c42637486c1062a1dc086101f9 | helium/miner | miner_gateway_mux_integration_SUITE.erl | -module(miner_gateway_mux_integration_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("public_key/include/public_key.hrl").
-export([
init_per_suite/1,
end_per_suite/1,
all/0
]).
-export([gateway_signing_test/1, gateway_grpc_reconnect_test/1, mux_... | null | https://raw.githubusercontent.com/helium/miner/ec5f4626f7f372cf2616701f8c0553f266904983/test/miner_gateway_mux_integration_SUITE.erl | erlang | then flip the switch for miner to route on the next packet | -module(miner_gateway_mux_integration_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("public_key/include/public_key.hrl").
-export([
init_per_suite/1,
end_per_suite/1,
all/0
]).
-export([gateway_signing_test/1, gateway_grpc_reconnect_test/1, mux_... |
da14300f8aa4c6dbe433213ed9526472441a7d07fe3ce4c446f965fa3716fe9e | gulige/neuroevo | gstk_window.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/gulige/neuroevo/09e67928c2417f2b27ec6522acc82f8b3c844949/apps/gs/src/gstk_window.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 1996 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(gstk_window).
-compile([{nowarn_deprecated_function,{gs,destroy,1}}]).
highlightbg Color
map
... |
b38cb4e79bb16d44ecd2645bdf0eeb2041465f78213df9f15b85ad8d01e7e40e | d-cent/mooncake | handler.clj | (ns mooncake.handler
(:require [scenic.routes :as scenic]
[ring.adapter.jetty :as ring-jetty]
[ring.util.response :as r]
[ring.middleware.defaults :as ring-mw]
[clojure.java.io :as io]
[taoensso.tower.ring :as tower-ring]
[stonecutter-oauth.clien... | null | https://raw.githubusercontent.com/d-cent/mooncake/eb16b7239e7580a73b98f7cdacb324ab4e301f9c/src/mooncake/handler.clj | clojure | Ensure database is populated before starting app | (ns mooncake.handler
(:require [scenic.routes :as scenic]
[ring.adapter.jetty :as ring-jetty]
[ring.util.response :as r]
[ring.middleware.defaults :as ring-mw]
[clojure.java.io :as io]
[taoensso.tower.ring :as tower-ring]
[stonecutter-oauth.clien... |
74158d43e4fe76dee4febc351ef73e4b038ee1220dd71eaba9326c95189143b4 | tmattio/js-bindings | vscode_languageserver_protocol_protocol.mli | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]]
open Es5
open Vscode_jsonrpc
open Vscode_languageserver_types
module AnonymousInterface0 : sig
type t
val t_to_js : t -> Ojs.t
val t_of_js : Ojs.t -> t
val get_additional_properties_support : t -> bool
[@@js.get "ad... | null | https://raw.githubusercontent.com/tmattio/js-bindings/ca3bd6a12db519c8de7f41b303f14cf70cfd4c5f/lib/vscode-languageserver-protocol/vscode_languageserver_protocol_protocol.mli | ocaml | TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO: Move me
TODO... | [@@@ocaml.warning "-7-11-32-33-39"]
[@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"]]
open Es5
open Vscode_jsonrpc
open Vscode_languageserver_types
module AnonymousInterface0 : sig
type t
val t_to_js : t -> Ojs.t
val t_of_js : Ojs.t -> t
val get_additional_properties_support : t -> bool
[@@js.get "ad... |
594373bc6ee8d78686ef7941c95c161a491f7182259945369799cc7608ea1b2b | silkapp/rest | Api.hs | # LANGUAGE
CPP
, GADTs
, , NoImplicitPrelude
#
CPP
, GADTs
, KindSignatures
, NoImplicitPrelude
#-}
#if MIN_VERSION_base(4,9,0)
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
#endif
| This module allows you to combine ' Resource 's into an ' Api ' . This
-- can then be served using 're... | null | https://raw.githubusercontent.com/silkapp/rest/f0462fc36709407f236f57064d8e37c77bdf8a79/rest-core/src/Rest/Api.hs | haskell | # OPTIONS_GHC -Wno-redundant-constraints #
can then be served using 'rest-happstack' or 'rest-snap', or used
to generate clients or documentation using 'rest-gen'.
* Api data types.
* Defining routes.
/)
-/)
--/)
---/)
----/)
* Api versioning.
-----------------------------------------------------------------------... | # LANGUAGE
CPP
, GADTs
, , NoImplicitPrelude
#
CPP
, GADTs
, KindSignatures
, NoImplicitPrelude
#-}
#if MIN_VERSION_base(4,9,0)
#endif
| This module allows you to combine ' Resource 's into an ' Api ' . This
module Rest.Api
Api (..)
, VersionSet
, Router (..)
, Some1 (..)
... |
21ff76d04518f224713f18ad40ac428bd1ba8c6fa22a0a6587e9b9518a3b8617 | arunisaac/ccwl | capture-output-file.scm | (define extract
(command #:inputs (archive #:type File)
#:run "tar" "--extract" "--file" archive
#:outputs (extracted-file
#:type File
#:binding '((glob . "hello.txt")))))
(workflow ((archive #:type File))
(extract #:archive archive))
| null | https://raw.githubusercontent.com/arunisaac/ccwl/22977baf000ff18941eb78dcc300d115667e5ec8/doc/capture-output-file.scm | scheme | (define extract
(command #:inputs (archive #:type File)
#:run "tar" "--extract" "--file" archive
#:outputs (extracted-file
#:type File
#:binding '((glob . "hello.txt")))))
(workflow ((archive #:type File))
(extract #:archive archive))
| |
0ba9c04083c156996bd0257bcdc1786721dd11efe92af3b1595921c461d57ff2 | artyom-poptsov/guile-png | context.scm | Generated by Guile - SMC 0.5.2
;;; <-poptsov/guile-smc>
(define-module
(png fsm context)
#:use-module
(smc core common)
#:use-module
(smc context context)
#:use-module
(smc context char-context)
#:use-module
(smc core config)
#:use-module
(smc core log)
#:re-export
(guard:eof-object?
g... | null | https://raw.githubusercontent.com/artyom-poptsov/guile-png/3778f5e1fc8d045277249f3828962f83513a2dd1/modules/png/fsm/context.scm | scheme | <-poptsov/guile-smc> | Generated by Guile - SMC 0.5.2
(define-module
(png fsm context)
#:use-module
(smc core common)
#:use-module
(smc context context)
#:use-module
(smc context char-context)
#:use-module
(smc core config)
#:use-module
(smc core log)
#:re-export
(guard:eof-object?
guard:newline?
guard:a... |
b51bf56c469894721f27e6b1dbf8cd91295865d52b2c7cbdfb6c682472e60d2c | expipiplus1/vulkan | VK_ANDROID_external_memory_android_hardware_buffer.hs | {-# language CPP #-}
-- | = Name
--
-- VK_ANDROID_external_memory_android_hardware_buffer - device extension
--
-- == VK_ANDROID_external_memory_android_hardware_buffer
--
-- [__Name String__]
-- @VK_ANDROID_external_memory_android_hardware_buffer@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registe... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Extensions/VK_ANDROID_external_memory_android_hardware_buffer.hs | haskell | # language CPP #
| = Name
VK_ANDROID_external_memory_android_hardware_buffer - device extension
== VK_ANDROID_external_memory_android_hardware_buffer
[__Name String__]
@VK_ANDROID_external_memory_android_hardware_buffer@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__R... | 130
5
- Requires support for Vulkan 1.0
- Requires @VK_EXT_queue_family_foreign@ to be enabled for any
-
2021 - 09 - 30
- , ARM
- , Google
- , Google
- , Imagination
- , NVIDIA
- , NVIDIA
- , Qual... |
7a6e2512131d4acb23fdaca3b67f7db711de76b7f23b88ef72fa3992cbda3143 | Eduap-com/WordMat | amacros.lisp | -*- Mode : Lisp ; Package : CL - MAXIMA ; Syntax : COMMON - LISP ; -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;;;
Copyright ( c ) 1984 by , University of Texas ; ; ; ; ;
;;; All rights rese... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/affine/amacros.lisp | lisp | Package : CL - MAXIMA ; Syntax : COMMON - LISP ; -*-
;;;;;
; ; ; ;
All rights reserved ;;;;;
x<x.z , x< x.*
x cannot be an atom here
(show call-arglist)
(show call-arglist)
and think you have the... |
(in-package :maxima)
(defmacro iassert (expr)
`(cond ((null ,expr) (fsignal "The expression ~A was not true" ',expr))))
(defun alphagreatp (x y)
(and (not (alphalessp x y)) (not (equal x y))))
(defun $monomial_alphalessp (x y)
(cond ((atom x)
(cond ((atom y) (alphalessp x y))
((null (cdr y)) (alphal... |
2a5798d639779a812fb7f38362f05539a811dd2b0065d2e27fecf52f4b3d6fc0 | tschady/advent-of-code | d20_test.clj | (ns aoc.2015.d20-test
(:require [aoc.2015.d20 :as sut]
[clojure.test :refer :all]))
(deftest ^:slow challenge
(is (= 831600 (sut/part-1 sut/input)))
(is (= 884520 (sut/part-2 sut/input))))
| null | https://raw.githubusercontent.com/tschady/advent-of-code/9cd0cbbbbeadd083b9030f21e49ca1ac26aee53a/test/aoc/2015/d20_test.clj | clojure | (ns aoc.2015.d20-test
(:require [aoc.2015.d20 :as sut]
[clojure.test :refer :all]))
(deftest ^:slow challenge
(is (= 831600 (sut/part-1 sut/input)))
(is (= 884520 (sut/part-2 sut/input))))
| |
b15922030ea00d2dafd2ad96c6241a94900a2d979c7dd0f6936250a3bdaaa67f | protolude/protolude | CallStack.hs | # LANGUAGE CPP #
# LANGUAGE KindSignatures #
# LANGUAGE ImplicitParams #
{-# LANGUAGE ConstraintKinds #-}
module Protolude.CallStack
( HasCallStack
) where
#if MIN_VERSION_base(4,9,0)
import GHC.Stack (HasCallStack)
#elif MIN_VERSION_base(4,8,1)
import qualified GHC.Stack
type HasCallStack = (?callStack :: GHC.Stack.... | null | https://raw.githubusercontent.com/protolude/protolude/e613ed4dd20b7b860fca326e11269af2104a196e/src/Protolude/CallStack.hs | haskell | # LANGUAGE ConstraintKinds # | # LANGUAGE CPP #
# LANGUAGE KindSignatures #
# LANGUAGE ImplicitParams #
module Protolude.CallStack
( HasCallStack
) where
#if MIN_VERSION_base(4,9,0)
import GHC.Stack (HasCallStack)
#elif MIN_VERSION_base(4,8,1)
import qualified GHC.Stack
type HasCallStack = (?callStack :: GHC.Stack.CallStack)
#else
import GHC.Exts ... |
e3523b6deb41bcd1c795d9b2ceb84cf6f35f633204b488c76d4bccc1deb623c5 | OCamlPro/typerex-lint | parsetree_iter.mli | (**************************************************************************)
(* *)
(* OCamlPro Typerex *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/libs/ocplib-compiler/parsetree_iter.mli | ocaml | ************************************************************************
OCamlPro Typerex
This file is distributed ... | Copyright OCamlPro 2011 - 2016 . All rights reserved .
( GNU General Public Licence version 3.0 ) .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE... |
5c09d5ec19b822e64f2ce34780822496bd485f5bfea5d2cd813929df008c6729 | gilith/hol-light | ring.ml | (* ========================================================================= *)
(* PARAMETRIC THEORY OF RINGS *)
(* ========================================================================= *)
(* -----------... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/opentheory/theories/ring/ring.ml | ocaml | =========================================================================
PARAMETRIC THEORY OF RINGS
=========================================================================
-------------------------------------------------------------------------
Interpretations... |
export_interpretation "opentheory/theories/ring/ring.int";;
Parametric theory witness for rings .
loads "opentheory/theories/ring/ring-witness.ml";;
loads "opentheory/theories/ring/ring-add.ml";;
loads "open... |
c81ea76f22debc6274264aed4e21c9661eb6a65df71189886285783c946308ba | nikita-volkov/rebase | Int.hs | module Rebase.Data.Int
(
module Data.Int
)
where
import Data.Int
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Data/Int.hs | haskell | module Rebase.Data.Int
(
module Data.Int
)
where
import Data.Int
| |
f76f24dc6929af878cf82e868126ff91e18c58ea131983b25ca54ea11f5d4914 | dharmatech/surfage | records.sps | Copyright ( c ) 2009 . All rights reserved . Licensed under an
MIT - style license . My license is in the file named LICENSE from the original
;; collection this file is distributed with. If this file is redistributed with
;; some other collection, my license must also be included.
#!r6rs
(import
(rnrs ... | null | https://raw.githubusercontent.com/dharmatech/surfage/895f16af83d9ce3c190f69626c9baba8c44d76bc/tests/records.sps | scheme | collection this file is distributed with. If this file is redistributed with
some other collection, my license must also be included.
no R6RS records | Copyright ( c ) 2009 . All rights reserved . Licensed under an
MIT - style license . My license is in the file named LICENSE from the original
#!r6rs
(import
(only (rnrs io simple) display write newline)
(surfage s9 records))
(define-record-type thing
(make-thing x)
thing?
(x thing-x)
(y thing... |
d6bd25d38b1f3adc0ce91ca5f0e3cf79dad05fa4cd679ca13604972736003745 | appleby/Lisp-In-Small-Pieces | chap4.scm | $ I d : chap4.scm , v 4.2 1996/01/14 14:14:29 queinnec Exp $
;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is derived from the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
or Lisp In Small Pieces ( Camb... | null | https://raw.githubusercontent.com/appleby/Lisp-In-Small-Pieces/af4139232bb7170f32470774a92d647e83254721/src/chap4.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is derived from the files that accompany the book:
The original sources can be downloaded from the author's website at
-systeme.lip6.fr/Christian.Queinnec/WWW/LiSP.html
This file may have been altered from the original in order to... | $ I d : chap4.scm , v 4.2 1996/01/14 14:14:29 queinnec Exp $
LISP Implantation Semantique Programmation ( InterEditions , France )
or Lisp In Small Pieces ( Cambridge University Press ) .
By Christian Queinnec < >
(define can-access? 'void)
(define (min-max tree)
(define (first-number tree)
... |
5372578db35701074b90581ab346d5917c891d3448a33d135b422ca5f382c166 | lemmih/lhc | FFITypes.hs | # LANGUAGE ForeignFunctionInterface #
{- | The pointers exported and used by the C libffi describing basic ffi types. -}
module Foreign.LibFFI.FFITypes where
import Data.Int
import Data.Word
import Foreign.C.Types
import Foreign.Ptr
import Foreign.Storable
import Foreign.LibFFI.Internal
foreign import ccall unsafe "... | null | https://raw.githubusercontent.com/lemmih/lhc/53bfa57b9b7275b7737dcf9dd620533d0261be66/libffi/Foreign/LibFFI/FFITypes.hs | haskell | | The pointers exported and used by the C libffi describing basic ffi types. | # LANGUAGE ForeignFunctionInterface #
module Foreign.LibFFI.FFITypes where
import Data.Int
import Data.Word
import Foreign.C.Types
import Foreign.Ptr
import Foreign.Storable
import Foreign.LibFFI.Internal
foreign import ccall unsafe "&" ffi_type_void :: Ptr CType
foreign import ccall unsafe "&" ffi_type_sint8 :: Ptr... |
167b3be646eba15bfbe0eb39a7f712822d8f23648a2615babf16007e498a4d3d | vito/atomo | Load.hs | module Atomo.Load where
import Control.Monad.State
import System.Directory
import System.FilePath
import qualified Language.Haskell.Interpreter as H
import Atomo.Environment
import Atomo.Parser
import Atomo.Types
-- | Load a file, remembering its absolute path to prevent repeated loading.
Searches with cwd as low... | null | https://raw.githubusercontent.com/vito/atomo/df22fcb3fbe80abb30b9ab3c6f5d50d3b8477f90/src/Atomo/Load.hs | haskell | | Load a file, remembering its absolute path to prevent repeated loading.
| Execute a file; for .hs filenames, interprets its `load' function and
| Given a list of paths to search, find the file to load. Attempts to find
the filename with .atomo and .hs extensions.
If no file is found, throws a FileNotFound error... | module Atomo.Load where
import Control.Monad.State
import System.Directory
import System.FilePath
import qualified Language.Haskell.Interpreter as H
import Atomo.Environment
import Atomo.Parser
import Atomo.Types
Searches with cwd as lowest priority
requireFile :: FilePath -> VM Value
requireFile fn = do
init... |
f59a45fcdb1f20f05720fd15f80254c26a6c7368fce829fad1bf5415a603cb4a | tuura/process-mining | Relation.hs | module Tuura.Relation (
Relation (..), empty, singleton, union, unions, complete
) where
import Data.Set (Set)
import qualified Data.Set as Set
data Relation a = Relation { domain :: Set a, relation :: Set (a, a) }
deriving (Show, Eq, Ord)
empty :: Relation a
empty = Relation Set.empty Set.... | null | https://raw.githubusercontent.com/tuura/process-mining/716f33fee657726989db21c9a008047e7d55f86a/src/Tuura/Relation.hs | haskell | module Tuura.Relation (
Relation (..), empty, singleton, union, unions, complete
) where
import Data.Set (Set)
import qualified Data.Set as Set
data Relation a = Relation { domain :: Set a, relation :: Set (a, a) }
deriving (Show, Eq, Ord)
empty :: Relation a
empty = Relation Set.empty Set.... | |
151a0c14ae4f5f29efed3c77ba6cdb5ac499eabb232977ec78175d029459cc21 | tz-wrapped/tezos-btc | Contract.hs | SPDX - FileCopyrightText : 2019 Bitcoin Suisse
-
- SPDX - License - Identifier : LicenseRef - MIT - BitcoinSuisse
-
- SPDX-License-Identifier: LicenseRef-MIT-BitcoinSuisse
-}
# LANGUAGE RebindableSyntax #
# OPTIONS_GHC -fno - warn - unused - do - bind #
module Lorentz.Contracts.TZBTC.V1.Contract
( Inte... | null | https://raw.githubusercontent.com/tz-wrapped/tezos-btc/f646e8597bba92ce7ea9d622953ce6ff354a5209/src/Lorentz/Contracts/TZBTC/V1/Contract.hs | haskell | * Helpers
function takes care of that.
We convert an entry point from storage, that has an input of
`SafeView` to an entry point that can accept a `View_`.
for almost each method.
| Contract router before preprocessing.
owner of the TZBTC contract, capable in unpausing contract, \
entity which is capable in pau... | SPDX - FileCopyrightText : 2019 Bitcoin Suisse
-
- SPDX - License - Identifier : LicenseRef - MIT - BitcoinSuisse
-
- SPDX-License-Identifier: LicenseRef-MIT-BitcoinSuisse
-}
# LANGUAGE RebindableSyntax #
# OPTIONS_GHC -fno - warn - unused - do - bind #
module Lorentz.Contracts.TZBTC.V1.Contract
( Inte... |
0e5cc7b6f047f913b7f106bed9d95a146cb51f7b97e9f3ea3918d3a302a7524d | shirok/Gauche | convaux.scm | ;;;
convaux - auxiliary charconv routines
;;;
Copyright ( c ) 2000 - 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of source code must retain the abov... | null | https://raw.githubusercontent.com/shirok/Gauche/e97efb5e54f9ab97746369b8ac748f338224c746/ext/charconv/convaux.scm | scheme |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in b... | convaux - auxiliary charconv routines
Copyright ( c ) 2000 - 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(sel... |
b47f1fb746282c9ad4f1518bcbdb53746ce478840ae3f570bda940e87c90ad54 | janestreet/ppx_sexp_conv | helpers.ml | open! Base
open! Ppxlib
open Ast_builder.Default
let ( --> ) lhs rhs = case ~guard:None ~lhs ~rhs
(* Utility functions *)
let replace_variables_by_underscores =
let map =
object
inherit Ast_traverse.map as super
method! core_type_desc =
function
| Ptyp_var _ -> Ptyp_any
| t... | null | https://raw.githubusercontent.com/janestreet/ppx_sexp_conv/5fcb08c0a35b228040d7f51346854478b89ce1ee/expander/helpers.ml | ocaml | Utility functions
placing a suitably polymorphic or rigid type constraint on the pattern or body
Type-only wrappers; we check their contents.
Allocating constructors; they are only values if all of their contents are.
Not values, or not always values. We make a conservative approximation. | open! Base
open! Ppxlib
open Ast_builder.Default
let ( --> ) lhs rhs = case ~guard:None ~lhs ~rhs
let replace_variables_by_underscores =
let map =
object
inherit Ast_traverse.map as super
method! core_type_desc =
function
| Ptyp_var _ -> Ptyp_any
| t -> super#core_type_desc... |
ffeb45d2801a2602adb6b4e8d5f38de804eeaf39d7ad8b9e653837169c067220 | leksah/leksah | SourceBuffer.hs | module IDE.Pane.SourceBuffer where
import Control.Monad.IO.Class (MonadIO(..))
import Data.Text (Text)
import System.Log.Logger (errorM)
import IDE.Core.Types
(IDEPackage(..), Project(..), MonadIDE, LogRef, IDEM, IDEAction,
LogRefType, Log)
import IDE.Core.State
(Location(..), addLogRef', remo... | null | https://raw.githubusercontent.com/leksah/leksah/ec95f33af27fea09cba140d7cddd010935a2cf52/src-nogtk/IDE/Pane/SourceBuffer.hs | haskell | module IDE.Pane.SourceBuffer where
import Control.Monad.IO.Class (MonadIO(..))
import Data.Text (Text)
import System.Log.Logger (errorM)
import IDE.Core.Types
(IDEPackage(..), Project(..), MonadIDE, LogRef, IDEM, IDEAction,
LogRefType, Log)
import IDE.Core.State
(Location(..), addLogRef', remo... | |
411ab0740f4936b245c27b4a20529096a17439567d4abb60fe4ea425eef9a966 | bobjflong/stellar-haskell | SubmissionSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module SubmissionSpec (spec) where
import Control.Lens hiding ((.=))
import Data.Aeson
import qualified Data.ByteString.Lazy.Char8 as BLC
import Data.Maybe
import Data.Text
import Prelude hiding (sequ... | null | https://raw.githubusercontent.com/bobjflong/stellar-haskell/b7beac482b0a78869de6090d5c13cda5d9601268/test/SubmissionSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module SubmissionSpec (spec) where
import Control.Lens hiding ((.=))
import Data.Aeson
import qualified Data.ByteString.Lazy.Char8 as BLC
import Data.Maybe
import Data.Text
import Prelude hiding (sequence)
import System.IO.Un... |
9944d26a36e4887af88b2f424b37216338866315dee84a7c6abb03fea52c02f9 | basho/riak_test | ts_cluster_aggregation.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2015 Basho Technologies , Inc.
%%
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 Li... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/ts_cluster_aggregation.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 express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2015 Basho Technologies , Inc.
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(ts_cluster_aggregation)... |
31aa7971da94e53280161124a16f72361b76e3da42c00107161f3c8fede0f9d2 | eeng/shevek | groupby.clj | (ns shevek.engine.druid-native.solver.groupby
(:require [shevek.driver.druid :refer [send-query]]
[shevek.engine.druid-native.solver.common :refer [dimension-spec dimension-order add-common-fields]]
[shevek.engine.utils :refer [time-zone defaultLimit]]))
(defn to-druid-query [{:keys [cube dim... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/clj/shevek/engine/druid_native/solver/groupby.clj | clojure | (ns shevek.engine.druid-native.solver.groupby
(:require [shevek.driver.druid :refer [send-query]]
[shevek.engine.druid-native.solver.common :refer [dimension-spec dimension-order add-common-fields]]
[shevek.engine.utils :refer [time-zone defaultLimit]]))
(defn to-druid-query [{:keys [cube dim... | |
c41be4e253db399d4cf13a53b478581b059c72d4cf0c659f69866754524653f6 | kowainik/summoner | Field.hs | {-# LANGUAGE Rank2Types #-}
|
Module : Summoner . . Field
Copyright : ( c ) 2018 - 2022 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Stable
Portability : Portable
This modules adds necessary fu... | null | https://raw.githubusercontent.com/kowainik/summoner/b706d0f144b8ba17905138839464c7107b04ae63/summoner-tui/src/Summoner/Tui/Field.hs | haskell | # LANGUAGE Rank2Types #
| A form field with a given text value which can not be modified or changed
via any events. It is always valid.
^ The state lens for this value.
^ The resource name for the input field.
^ The label for the check box, to appear at its right.
^ The initial form state.
| Custom radio button ... |
|
Module : Summoner . . Field
Copyright : ( c ) 2018 - 2022 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Stable
Portability : Portable
This modules adds necessary functions for Forms and Form f... |
1b2db15d98476e5dd5fe16c290bc8e8e9935f5a33fd128b4a1eb27841991f252 | f-me/carma-public | Model.hs | # LANGUAGE ScopedTypeVariables #
module Utils.Model
( PlainText (..)
, identFv
, fvIdent
, fvIdentBs
, fieldPT
, tableQT
) where
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data.Text.Read as T
import Data.ByteStri... | null | https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/srv/src/Utils/Model.hs | haskell | | Convert an Ident to an untyped field value.
| Convert an untyped field value to an Ident if it's a numeric
string.
| Table name, in double quotes. | # LANGUAGE ScopedTypeVariables #
module Utils.Model
( PlainText (..)
, identFv
, fvIdent
, fvIdentBs
, fieldPT
, tableQT
) where
import Data.Text (Text)
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data.Text.Read as T
import Data.ByteStri... |
8f2c43eca8577cd67e00fb0dca10f66b4f11bd9ac796e3c2d2c20d67328c6e5d | thheller/shadow-grove | app.cljs | (ns dummy.app
(:require
[shadow.grove :as sg :refer (<< defc css)]
[shadow.grove.css-fx :as fx]))
(def $fade
(css
["&-enter"
{:opacity "0"
:transform "scale(0.9)"}]
["&-enter-active"
{:opacity "1"
:transform "translateX(0)"
:transition "opacity 300ms, transform 300ms"}]
... | null | https://raw.githubusercontent.com/thheller/shadow-grove/40c33a88fe3f37a5bc86c7c6144e8f77957d733a/src/dev/dummy/app.cljs | clojure | (ns dummy.app
(:require
[shadow.grove :as sg :refer (<< defc css)]
[shadow.grove.css-fx :as fx]))
(def $fade
(css
["&-enter"
{:opacity "0"
:transform "scale(0.9)"}]
["&-enter-active"
{:opacity "1"
:transform "translateX(0)"
:transition "opacity 300ms, transform 300ms"}]
... | |
47ead17c2b0095f62cb1df807703225523478556b679bd7216824559520bc410 | 4y8/esoo | brainpocalypse.ml | let rec eval input pos index mem =
match pos with
_ when pos = String.length input -> mem, index
| _ ->
match String.get input pos with
'>' -> eval input (pos + 1) (index + 1) mem
| '<' -> eval input (pos + 1) (index - 1) mem
| '+' -> mem.(index) <- mem.(index) + 1;
eval inp... | null | https://raw.githubusercontent.com/4y8/esoo/49f9b8bd70c1f41bf2d4db044d0cfede4e1ff470/brainpocalypse/brainpocalypse.ml | ocaml | let rec eval input pos index mem =
match pos with
_ when pos = String.length input -> mem, index
| _ ->
match String.get input pos with
'>' -> eval input (pos + 1) (index + 1) mem
| '<' -> eval input (pos + 1) (index - 1) mem
| '+' -> mem.(index) <- mem.(index) + 1;
eval inp... | |
453e0dcd349ee4e49ee6b16730174f631797ed0affc214008c600735f696b7d4 | ctford/Idris-Elba-Dev | BCImp.hs | module IRTS.BCImp where
Bytecode for a register / variable based VM ( e.g. for generating code in an
imperative language where we let the language deal with GC )
import IRTS.Lang
import IRTS.Simplified
import Idris.Core.TT
data Reg = RVal | L Int
data BC = NOP
toBC :: (Name, SDecl) -> (Name, [BC])
toBC (n, SFu... | null | https://raw.githubusercontent.com/ctford/Idris-Elba-Dev/e915e1d6b7a5921ba43d2572a9ad9b980619b8ee/src/IRTS/BCImp.hs | haskell | module IRTS.BCImp where
Bytecode for a register / variable based VM ( e.g. for generating code in an
imperative language where we let the language deal with GC )
import IRTS.Lang
import IRTS.Simplified
import Idris.Core.TT
data Reg = RVal | L Int
data BC = NOP
toBC :: (Name, SDecl) -> (Name, [BC])
toBC (n, SFu... | |
98a3edaa054aa68a636264773a346906c9f0bd432fb92a81a41f932fd89c90f5 | babashka/nbb | example.cljs | (ns example
(:require
["@nut-tree/nut-js" :as nut-js :refer [mouse left right up down]]
[promesa.core :as p]))
(p/do
(mouse.move (left 500))
(mouse.move (up 500))
(mouse.move (right 500))
(mouse.move (down 500)))
| null | https://raw.githubusercontent.com/babashka/nbb/ec00dfd7e8de51a85db4318f52decc103c98c2ee/examples/nut-js/example.cljs | clojure | (ns example
(:require
["@nut-tree/nut-js" :as nut-js :refer [mouse left right up down]]
[promesa.core :as p]))
(p/do
(mouse.move (left 500))
(mouse.move (up 500))
(mouse.move (right 500))
(mouse.move (down 500)))
| |
d5b6df9d3904e892d0fe5f4111a89cee56b88cfe25ed42c633c9d52d352bd918 | omelkonian/AlgoRhythm | Melody.hs | {-# LANGUAGE ImplicitParams #-}
# LANGUAGE PostfixOperators #
module Grammar.Melody
( MelodyConfig (..), defMelodyConfig
, melody, mkSolo
) where
import Control.Arrow (first)
import Grammar.Types
import Grammar.Utilities
import Music
-- | Melodic (non)-terminal symbols.
Meta - rhythm
... | null | https://raw.githubusercontent.com/omelkonian/AlgoRhythm/fdc1ccbae0b3d8a7635b24d37716123aba2d6c11/AlgoRhythm/src/Grammar/Melody.hs | haskell | # LANGUAGE ImplicitParams #
| Melodic (non)-terminal symbols.
Rhythm non-terminal
Note non-terminal
any of [CT, L, AT]
chord tone
color tone
approach tone
scale tone
rest
| Grammar for melodic lines based on the paper:
Melody { expand Qs to notes }
| Produce a concrete improvisation out of a melodic struc... | # LANGUAGE PostfixOperators #
module Grammar.Melody
( MelodyConfig (..), defMelodyConfig
, melody, mkSolo
) where
import Control.Arrow (first)
import Grammar.Types
import Grammar.Utilities
import Music
Meta - rhythm
Meta - note
deriving (Eq, Show)
" A Grammatical Approach to Autom... |
9b89fe4525ab6bcf58b402c2a92bc48e4e476ea6d99cdd0e1d3dc0a817893a6a | eglaysher/rldev | gan.ml |
RlXml : GAN format handling
Copyright ( C ) 2006 Haeleth
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
... | null | https://raw.githubusercontent.com/eglaysher/rldev/e59103b165e1c20bd940942405b2eee767933c96/src/rlxml/gan.ml | ocaml | Frame record type
Convert a frame record into an attribute list
Convert a frame record into a <frame> element
Build a frame record containing all attributes that are constant throughout a set
Read a single frame
Read all frames in a set
Read all sets in a file
Read a file
Read header
Read filename
... |
RlXml : GAN format handling
Copyright ( C ) 2006 Haeleth
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
... |
ff4bda1f99a14976400666019dac1da4d79b9545e04167d0ad5a9b700598c797 | wyvernlang/grad-ver | rules.ml |
open Core
open Functools
module A = Ast
module F = Formula
module W = Wellformed
type 'a cont = {k: 'b . 'b F.t -> 'a}
let rec convertExpr e = match e with
| A.Var s -> F.Var (A.name s)
| A.Val (A.Num n) -> F.Num n
| A.Val A.Result -> F.Result
| A.Val A.Nil -> F.Null
| A.Val A.C -> F.Cls
| A.Old s -> F.Old (A.name ... | null | https://raw.githubusercontent.com/wyvernlang/grad-ver/52a2e1da894b58b88c3f9148c81d6c8669802798/src/rules/rules.ml | ocaml |
let _ = Printf.printf "%s\n" @@ F.pp_phi p2 in
let _ = Printf.printf "%s\n" @@ A.pp_stmt s1 in
TODO: it would be really nice to not have to do all of this
* checking. As part of the general "use the information we got
* from the well-formed processing",... |
open Core
open Functools
module A = Ast
module F = Formula
module W = Wellformed
type 'a cont = {k: 'b . 'b F.t -> 'a}
let rec convertExpr e = match e with
| A.Var s -> F.Var (A.name s)
| A.Val (A.Num n) -> F.Num n
| A.Val A.Result -> F.Result
| A.Val A.Nil -> F.Null
| A.Val A.C -> F.Cls
| A.Old s -> F.Old (A.name ... |
e2ec61b3bc5d92c365e0dab5f1f8ece4b8c48b42815015d2d6e4f49ee23b3dcf | formal-land/coq-of-ocaml | recursion.ml | let rec map f l =
match l with
| [] -> []
| x :: xs -> f x :: map f xs
let rec fold f a l =
match l with
| [] -> a
| x :: xs -> fold f (f a x) xs
let l = [5; 6; 7; 2]
let n incr plus =
fold (fun x y -> plus x y) 0 (map incr l)
| null | https://raw.githubusercontent.com/formal-land/coq-of-ocaml/c9c86b08eb19d7fd023f48029cc5f9bf53f6a11c/tests/recursion.ml | ocaml | let rec map f l =
match l with
| [] -> []
| x :: xs -> f x :: map f xs
let rec fold f a l =
match l with
| [] -> a
| x :: xs -> fold f (f a x) xs
let l = [5; 6; 7; 2]
let n incr plus =
fold (fun x y -> plus x y) 0 (map incr l)
| |
ff2d4612a8b00ad1e7b7e2116bf4cdc8f8f90f0e2a8699c0ff52d1daf7cb7323 | phronmophobic/membrane.term | term.clj | (ns com.phronemophobic.membrane.term
(:require [asciinema.vt :as vt]
[clojure.java.io :as io]
[clojure.string :as string]
[membrane.ui :as ui]
[membrane.toolkit :as tk])
(:import [com.pty4j PtyProcess WinSize]))
(defn- start-pty []
(let [cmd (into-array String ["/... | null | https://raw.githubusercontent.com/phronmophobic/membrane.term/d1c8eb6f682b797e371fe8a6e9e1e9caf7dbc79b/src/com/phronemophobic/membrane/term.clj | clojure | else
\:
Note: glfw and swing send different values for some keys.
Usually, the lower value is from swing.
backspace
escape
tab
right
down
up
default
else
default | (ns com.phronemophobic.membrane.term
(:require [asciinema.vt :as vt]
[clojure.java.io :as io]
[clojure.string :as string]
[membrane.ui :as ui]
[membrane.toolkit :as tk])
(:import [com.pty4j PtyProcess WinSize]))
(defn- start-pty []
(let [cmd (into-array String ["/... |
a957b11e4c9e3be5a4a97f71dd6bd917a9c316de1587f60f6c02d63aa3da55db | y-taka-23/miso-vue-example | Main.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Aeson (ToJSON)
import Data.Aeson.Encode.Pretty (encodePretty)
import Data.List (intercalate)
import qualified Data.Map as M
import GHC.G... | null | https://raw.githubusercontent.com/y-taka-23/miso-vue-example/4d3fe5a129fa8e126ed4aa786db58c454e79add4/svg-graph/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
module Main where
import Data.Aeson (ToJSON)
import Data.Aeson.Encode.Pretty (encodePretty)
import Data.List (intercalate)
import qualified Data.Map as M
import GHC.Generics (Generic)
impor... |
041a0918923fba6188938b7c21b94431b6f39dd726acfcce008a5b09e6990902 | haskell-tools/haskell-tools | ClosedTypeFamilyDecl.hs | # LANGUAGE TypeFamilies #
module ClosedTypeFamilyDecl where
type family F a :: * where {-* KindSignatures *-}
F Int = Integer
F Char = String {-* TypeFamilies *-}
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/test/ExtensionOrganizerTest/TypeFamiliesTest/ClosedTypeFamilyDecl.hs | haskell | * KindSignatures *
* TypeFamilies * | # LANGUAGE TypeFamilies #
module ClosedTypeFamilyDecl where
F Int = Integer
|
90470d1aff62e77faa3f4364c14cc36d4043bf8cac86d1693ea3da3792aef36d | zyrolasting/racket-koans | conditionals.rkt | #lang racket/base
(require rackunit)
` if ` evaluates exactly two expressions , in order : The test expression ,
;; and a matching expression. The matching expression is then returned.
(define counter 0)
(check-equal?
(if #t "yay" (set! counter 1))
"?")
;; Given how 'if' is evaluated, does anything happen to ... | null | https://raw.githubusercontent.com/zyrolasting/racket-koans/09acc058244ed88d7addd434677426cd8580bb3c/koans/conditionals.rkt | racket | and a matching expression. The matching expression is then returned.
Given how 'if' is evaluated, does anything happen to 'counter'?
Reflect on how using `if` differs from applying a procedure.
Logical operators condense related tests and support short circuiting.
If you've seen things like `(a && b)` or `(a || b)... | #lang racket/base
(require rackunit)
` if ` evaluates exactly two expressions , in order : The test expression ,
(define counter 0)
(check-equal?
(if #t "yay" (set! counter 1))
"?")
(check-equal? counter "?")
- ` and ` returns # t if all following tests are # t. It stops at the first # f.
- ` or ` re... |
9f78cc81b291353fa9cb9cd184edd9eef2f2f23e1185ddabb5f0954c727340ae | arrdem/katamari | daemon_test.clj | (ns maxwell.daemon-test
(:require [maxwell.daemon :refer :all]
[clojure.test :refer :all]))
(deftest test-map-diff
(-> {}
(with-diff)
(assoc :foo 1
:bar 2)
(update :foo inc)
(dissoc :bar)
(get-diff)
(= [[:insert :foo nil 1 nil]
[:insert :bar ni... | null | https://raw.githubusercontent.com/arrdem/katamari/55e2da2c37c02774a1332e410ceebee0a0742d27/src/maxwell/test/maxwell/daemon_test.clj | clojure | This is the current behavior, and the trivially correct behavior.
Is it desired?
Technically it reflects the precise update behavior.
It is not however the desired or minimal update behavior. | (ns maxwell.daemon-test
(:require [maxwell.daemon :refer :all]
[clojure.test :refer :all]))
(deftest test-map-diff
(-> {}
(with-diff)
(assoc :foo 1
:bar 2)
(update :foo inc)
(dissoc :bar)
(get-diff)
(= [[:insert :foo nil 1 nil]
[:insert :bar ni... |
8ec543b0f0022dee674c65a7c8be2f694e6b91ffaf90cb9fa977f6e4ee00ce1f | dongcarl/guix | refresh.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 , 2014 , 2015 , 2016 , 2017 , 2018 , 2019 , 2020 < >
Copyright © 2013 < >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2016 < >
Copyright © 2017 < >
Copyright © 2018 < >
Copyright © 2019 < >
Copyri... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/guix/scripts/refresh.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 , 2014 , 2015 , 2016 , 2017 , 2018 , 2019 , 2020 < >
Copyright © 2013 < >
Copyright © 2014 < >
Copyright © 2015 < >
Copyright © 2016 < >
Copyright © 2017 < >
Copyright © 2018 < >
Copyright © 2019 < >
Copyright © 2020 < >
under the terms of the GNU General ... |
f618e1bc8300eae61e9ba18310afc3be20a8bcd3b301e1aa32a91ce4e8124398 | gebi/jungerl | esp_html.erl | %%% File : esp_html.erl
%%% Author : root <>
%%% Description : HTML generator from esp format
Created : 27 Mar 2002 by root < >
-module(esp_html).
-export([format/1, format/2]).
-export([to_value/1]).
-export([pcdata/2, pcdata/1]).
-import(lists, [map/2, reverse/1,member/2]).
%% -define(debug,true).
-ifdef(d... | null | https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/erl_cgi/src/esp_html.erl | erlang | File : esp_html.erl
Author : root <>
Description : HTML generator from esp format
-define(debug,true).
default formatting function is just a dummy
default environment is empty [{Var,Value}]
Indent = indent(Ps),
EXTENSION <erl>#PCDATA</erl>
<!ENTITY % html.content "HEAD, BODY">
<!ELEMENT HTML O O (%html... | Created : 27 Mar 2002 by root < >
-module(esp_html).
-export([format/1, format/2]).
-export([to_value/1]).
-export([pcdata/2, pcdata/1]).
-import(lists, [map/2, reverse/1,member/2]).
-ifdef(debug).
-define(dbg(Fmt,Args), io:format(Fmt, Args)).
-else.
-define(dbg(Fmt,Args), ok).
-endif.
-record(state,
{
fmt ... |
b82b57de27f327540b3881f3bee2c1c8d0a251a7139f8335790ad6e032c11d47 | BinRoot/Haskell-Data-Analysis-Cookbook | Main.hs | import Data.Csv
import qualified Data.ByteString.Lazy as BSL
myData :: [(Char, Int)]
myData = zip ['A'..'Z'] [1..]
-- Exporting to CSV
main = BSL.writeFile "letters.csv" $ encode myData
| null | https://raw.githubusercontent.com/BinRoot/Haskell-Data-Analysis-Cookbook/f8c46987d78f4a6c1828b353c5f906b9314c2ef9/Ch12/Code01_csv/Main.hs | haskell | Exporting to CSV | import Data.Csv
import qualified Data.ByteString.Lazy as BSL
myData :: [(Char, Int)]
myData = zip ['A'..'Z'] [1..]
main = BSL.writeFile "letters.csv" $ encode myData
|
dc2faa8a7431cd91545fb5cbe11ab93623f851760e9c3be7c5c02318657de0e8 | isovector/thinking-with-types | RankN.hs | -- # pragmas
# LANGUAGE UndecidableInstances #
module RankN where
-- # imports
import Data.Foldable (asum)
import Data.Kind (Constraint, Type)
import Data.Maybe (fromMaybe)
import Data.Proxy
import Data.Typeable (Typeable, cast, typeRep)
import Control.Monad.Trans.Class (MonadTrans (..))
applyToFive :: (forall a. a... | null | https://raw.githubusercontent.com/isovector/thinking-with-types/7684240b822a4f14d87f6fa8731637b3ce4e270c/code/RankN.hs | haskell | # pragmas
# imports
# forall1
# forall2
# forall3
# brokenApply
# explicitBrokenApply
# forall1
# forall2
# forall3
# brokenApply
# explicitBrokenApply
# contFunctor
# hasShowShow
# showElimHasShow
# showElimHasShow
# MonoidEq
# GADTAny
# typeHasShow
# GADTAny
# typeHasShow | # LANGUAGE UndecidableInstances #
module RankN where
import Data.Foldable (asum)
import Data.Kind (Constraint, Type)
import Data.Maybe (fromMaybe)
import Data.Proxy
import Data.Typeable (Typeable, cast, typeRep)
import Control.Monad.Trans.Class (MonadTrans (..))
applyToFive :: (forall a. a -> a) -> Int
applyToFive ... |
e623af37390c4c58f798ad3ca05243ca8e767de28668e889e9db29b991b1f299 | georgjz/raylib-gambit-scheme | model_shader.scm | ;;; An example of loading and using a simple fragment shader
;;; Some game constants
(define SCREEN-WIDTH 800)
(define SCREEN-HEIGHT 450)
(define CAMERA_PERSPECTIVE 0)
;;; Set up a camera
(define camera '(4.0 4.0 4.0)
'(0.0 1.0 -1.0)
'(0.0 1.0 0.0)
45.0
C... | null | https://raw.githubusercontent.com/georgjz/raylib-gambit-scheme/df7ea6db54a3196d13c66dac4909c64cea6e5a88/examples/shaders/model_shader.scm | scheme | An example of loading and using a simple fragment shader
Some game constants
Set up a camera
Game variables
no vertex shader
The main loop |
(define SCREEN-WIDTH 800)
(define SCREEN-HEIGHT 450)
(define CAMERA_PERSPECTIVE 0)
(define camera '(4.0 4.0 4.0)
'(0.0 1.0 -1.0)
'(0.0 1.0 0.0)
45.0
CAMERA_PERSPECTIVE)
(define model #f)
(define texture #f)
(define shader #f)
(define position '(0.0 0.0 0.0... |
096b27ad1272da860c3a4f8564340f94fb067e945be360e0923b00257fdd74ab | xvw/planet | uuid.ml | include Bedrock.Uuid.Generator (struct
let name = Unix.gethostname
let pid = Unix.getpid
let time = Unix.gettimeofday
end)
| null | https://raw.githubusercontent.com/xvw/planet/c2a77ea66f61cc76df78b9c2ad06d114795f3053/src/baremetal/uuid.ml | ocaml | include Bedrock.Uuid.Generator (struct
let name = Unix.gethostname
let pid = Unix.getpid
let time = Unix.gettimeofday
end)
| |
c08e2a96a4d1a4261c0f8d5b4e5532f35223320dee5dc31cf63b1184c9e6b99a | fulcro-legacy/fulcro-lein-template | project.clj | (defproject fulcro/lein-template "2.0.41"
:description "A bare-bones template for new Fulcro full-stack projects."
:url ""
:license {:name "MIT"
:url ""}
:eval-in-leiningen true)
| null | https://raw.githubusercontent.com/fulcro-legacy/fulcro-lein-template/41195fc3b5e4054ee8b0cfff379bbadb006be046/project.clj | clojure | (defproject fulcro/lein-template "2.0.41"
:description "A bare-bones template for new Fulcro full-stack projects."
:url ""
:license {:name "MIT"
:url ""}
:eval-in-leiningen true)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.