_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 |
|---|---|---|---|---|---|---|---|---|
6301adec1a2f7587612faa4cef82a2aff6a98e6c0388a567b30a174a46551e55 | AndrasKovacs/ELTE-func-lang | Notes03.hs |
-- Functor instance-ok folyt.
data Pair a b = Pair a b
instance Functor (Pair a) where -- utolsó paraméter fölött fmap
fmap f (Pair a b) = Pair a (f b)
data Either' a b = Left' a | Right' b
instance Functor (Either' a) where
fmap f (Left' a) = Left' a
fmap f (Right' b) = Right' (f b)
data D a b c ... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2020-21-1/gyak_1/Notes03.hs | haskell | Functor instance-ok folyt.
utolsó paraméter fölött fmap
mai feladat:
Functor Maybe
Functor [] (fmap = map)
fmap :: (a -> b) -> D' a -> D' b
fmap f (D1' a Nothing) = D1' (f a) Nothing
fmap f (D1' a (Just a')) = D1' (f a) (Just (f a'))
fmap f (D2' []) = D2' []
fmap f (D2' (a:as)) = D2' (f a : fmap f as)
... |
data Pair a b = Pair a b
fmap f (Pair a b) = Pair a (f b)
data Either' a b = Left' a | Right' b
instance Functor (Either' a) where
fmap f (Left' a) = Left' a
fmap f (Right' b) = Right' (f b)
data D a b c = D1 a b | D2 c a c
instance Functor (D a b) where
fmap f (D1 a b) = D1 a b
fmap f (D2... |
1989ea5e3ebf50044e4a1e52c41ca159bfed03e8ee1b6cd22ecd1d53ac4e8175 | javalib-team/javalib | javalib.ml |
* This file is part of Javalib
* Copyright ( c)2007 , 2008 ( Université de Rennes 1 )
* Copyright ( c)2007 , 2008 , 2009 ( CNRS )
* Copyright ( c)2009 ( INRIA )
*
* This software is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public Lic... | null | https://raw.githubusercontent.com/javalib-team/javalib/0699f904dbb17e87ec0ad6ed0c258a1737e60329/src/javalib.ml | ocaml |
* This file is part of Javalib
* Copyright ( c)2007 , 2008 ( Université de Rennes 1 )
* Copyright ( c)2007 , 2008 , 2009 ( CNRS )
* Copyright ( c)2009 ( INRIA )
*
* This software is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public Lic... | |
a8e80f5d3eb74c9a53252ba6d3721688bb7d81b6e5e7ce0099cb33f4e0ec3fdb | Tim-ats-d/Indigobi | lib.mli | module Log = Log
module Url = Url
| null | https://raw.githubusercontent.com/Tim-ats-d/Indigobi/dee46e999c23e2fa6fb6fa1fd728322e0e4dceba/src/lib/lib.mli | ocaml | module Log = Log
module Url = Url
| |
f2369e3fd0097d2bc7d3ff47171c359f69ee39e3f28d9577e4e34b6d5aa75a6c | biocom-uib/vpf-tools | Ops.hs | module VPF.Frames.Dplyr.Ops
( module LensOps
, Rec(..)
, (=:)
, (=:=)
, type (:::)
, type (++)
, (|.)
) where
import Control.Lens.Operators as LensOps
import Data.Vinyl (Rec(..))
import Data.Vinyl.Derived (type (:::), (=:), (=:=))
import Data.Vinyl.TypeLevel (type (++))
(|.) :: (a -> b) -> (b -> c)... | null | https://raw.githubusercontent.com/biocom-uib/vpf-tools/dd88a543f28eb339cf0dcb89f34479c84b3a8056/src/VPF/Frames/Dplyr/Ops.hs | haskell | # inline (|.) # | module VPF.Frames.Dplyr.Ops
( module LensOps
, Rec(..)
, (=:)
, (=:=)
, type (:::)
, type (++)
, (|.)
) where
import Control.Lens.Operators as LensOps
import Data.Vinyl (Rec(..))
import Data.Vinyl.Derived (type (:::), (=:), (=:=))
import Data.Vinyl.TypeLevel (type (++))
(|.) :: (a -> b) -> (b -> c)... |
2c7ab8db251f24e220f4b0a46197aeb96c2c5c150049244995107178a2415b08 | acl2/acl2 | exec-expr-pure.lisp | C Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "C")
(i... | null | https://raw.githubusercontent.com/acl2/acl2/ea1669961a650700f6be7befe7c8b61423e4b281/books/kestrel/c/atc/symbolic-execution-rules/exec-expr-pure.lisp | lisp | C Library
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "C")
(include-book "../../language/dynamic-semantics")
(include-book "../../representation/in... | |
12909c057fb02f439800c59d8ec84b4cfa8cf6b48a5a84922241034f75d487f1 | tonyrog/bt | bt_iset.erl | %%%---- BEGIN COPYRIGHT -------------------------------------------------------
%%%
Copyright ( C ) 2006 - 2014 , Rogvall Invest AB , < >
%%%
%%% This software is licensed as described in the file COPYRIGHT, which
%%% you should have received as part of this distribution. The terms
%%% are also available at .
%%%
%%... | null | https://raw.githubusercontent.com/tonyrog/bt/9a569b68bc652dbb298a15950e9e661918eda4e5/src/bt_iset.erl | erlang | ---- BEGIN COPYRIGHT -------------------------------------------------------
This software is licensed as described in the file COPYRIGHT, which
you should have received as part of this distribution. The terms
are also available at .
You may opt to use, copy, modify, merge, publish, distribute and/or sell
furni... | Copyright ( C ) 2006 - 2014 , Rogvall Invest AB , < >
copies of the Software , and permit persons to whom the Software is
This software is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY
Author : < >
Created : 26 Jan 2006 by < >
-module(bt_iset).
given even though and has valu... |
652d3c34bc7b04ec14a3e5c1f99e4861cd8206a64bc0e754ead0d4a8385b3671 | clingen-data-model/genegraph | evidence_item.clj | (ns genegraph.source.graphql.evidence-item
(:require [genegraph.database.query :as q]
[genegraph.source.graphql.common.curation]
[genegraph.source.graphql.common.cache :refer [defresolver]]
[com.walmartlabs.lacinia.schema :refer [tag-with-type]]))
(def recursive-evidence-lines
... | null | https://raw.githubusercontent.com/clingen-data-model/genegraph/8c217e4c3820b3bd0a0937a6e331a6e6a49b8c14/src/genegraph/source/graphql/evidence_item.clj | clojure | (ns genegraph.source.graphql.evidence-item
(:require [genegraph.database.query :as q]
[genegraph.source.graphql.common.curation]
[genegraph.source.graphql.common.cache :refer [defresolver]]
[com.walmartlabs.lacinia.schema :refer [tag-with-type]]))
(def recursive-evidence-lines
... | |
210c9a161b33faa9785d14552d253562a283bd70d19881f8305324ab4dde5b01 | mbutterick/quad | lang.rkt | #lang racket/base
(require (for-syntax racket/base)
quad
(prefix-in doclang: "doclang-raw.rkt"))
(provide (rename-out [quad-mb #%module-begin])
#%top-interaction
#%top
#%app
#%datum
(except-out (all-from-out racket/base) #%module-begin))
(define-for-syntax... | null | https://raw.githubusercontent.com/mbutterick/quad/395447f35c2fb9fc7b6199ed185850906d80811d/quad/lang.rkt | racket | positional arg for doclang-raw: name of export
positional arg for doclang-raw: post-processor | #lang racket/base
(require (for-syntax racket/base)
quad
(prefix-in doclang: "doclang-raw.rkt"))
(provide (rename-out [quad-mb #%module-begin])
#%top-interaction
#%top
#%app
#%datum
(except-out (all-from-out racket/base) #%module-begin))
(define-for-syntax... |
9650dfc6d01487d4ee289b592e97c7307591aef1cb319a114951e1782cb69bd0 | Helium4Haskell/helium | PreludeInstances4.hs | data MMaybe a = MJust a | MNothing
instance Eq a => Eq (MMaybe a) where
MNothing == MNothing = False
MJust x == MJust y = x == y
_ == _ = False
instance Ord a => Ord (MMaybe a) where
_ < MNothing = False
MJust x < MJust y = x < y
_ < MJust _ = True
main = [
[
MJust 1 < MJ... | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeClasses/PreludeInstances4.hs | haskell | data MMaybe a = MJust a | MNothing
instance Eq a => Eq (MMaybe a) where
MNothing == MNothing = False
MJust x == MJust y = x == y
_ == _ = False
instance Ord a => Ord (MMaybe a) where
_ < MNothing = False
MJust x < MJust y = x < y
_ < MJust _ = True
main = [
[
MJust 1 < MJ... | |
ddbf92dc5485dce9b5662094f48917bdeccb3754bd8c660617f4f5aa9d0e028e | gsakkas/rite | 3569.ml |
let rec clone x n = if n > 0 then x :: (clone x (n - 1)) else [];;
let padZero l1 l2 =
if (List.length l1) > (List.length l2)
then (l1, (List.append (clone 0 ((List.length l1) - (List.length l2))) l2))
else ((List.append (clone 0 ((List.length l2) - (List.length l1))) l1), l2);;
let rec removeZero l = match l ... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/3569.ml | ocaml |
let rec clone x n = if n > 0 then x :: (clone x (n - 1)) else [];;
let padZero l1 l2 =
if (List.length l1) > (List.length l2)
then (l1, (List.append (clone 0 ((List.length l1) - (List.length l2))) l2))
else ((List.append (clone 0 ((List.length l2) - (List.length l1))) l1), l2);;
let rec removeZero l = match l ... | |
9c3a8f14fe6f7e432299872b65bf7fd7eb361739a6b271e56a23b0df918e7e54 | MaartenFaddegon/Hoed | MatchCheck.hs | # LANGUAGE LambdaCase , DeriveGeneric #
module MatchCheck where
import Prelude hiding (and)
import Types
import TypedAst
import TypeUtils
import Utils
import qualified Data.List as List
import qualified Data.Set as Set
import qualified Data.Map as Map
import Data.Set(Set)
import Data.Map(Map, (!))
import D... | null | https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/examples/ZLang/2/MatchCheck.hs | haskell | TODO: Deriving Generic for testing purposes
Match nothing of given type
Match anything of given type
TODO: This might be bad?
TODO: missing type args
| # LANGUAGE LambdaCase , DeriveGeneric #
module MatchCheck where
import Prelude hiding (and)
import Types
import TypedAst
import TypeUtils
import Utils
import qualified Data.List as List
import qualified Data.Set as Set
import qualified Data.Map as Map
import Data.Set(Set)
import Data.Map(Map, (!))
import D... |
4219adb7a682258f17c537cfc555539ffa4e95eb46380c7dc08607f64a9d696f | bhuztez/shu | shu_meta_parse.erl | -module(shu_meta_parse).
-export([tokens/1, rules/1, symbols/1]).
tokens(<<>>) ->
[];
tokens(<<C, Bin/binary>>)
when C =:= $ ; C =:= $\n ->
tokens(Bin);
tokens(<<${, Bin/binary>>) ->
['{'|tokens(Bin)];
tokens(<<$}, Bin/binary>>) ->
['}'|tokens(Bin)];
tokens(<<$(, Bin/binary>>) ->
['('|tokens(Bi... | null | https://raw.githubusercontent.com/bhuztez/shu/98125ae20b88d343cf3ef21e8956854f34a1aa14/src/shu_meta_parse.erl | erlang | -module(shu_meta_parse).
-export([tokens/1, rules/1, symbols/1]).
tokens(<<>>) ->
[];
tokens(<<C, Bin/binary>>)
when C =:= $ ; C =:= $\n ->
tokens(Bin);
tokens(<<${, Bin/binary>>) ->
['{'|tokens(Bin)];
tokens(<<$}, Bin/binary>>) ->
['}'|tokens(Bin)];
tokens(<<$(, Bin/binary>>) ->
['('|tokens(Bi... | |
83e31e1b7c233ae1245c254b1773012aaa5c986dc0efd829910d1518492226f6 | erlangonrails/devdb | node_details.erl | 2007 - 2010 fuer Informationstechnik Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing,... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/src/node_details.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2007 - 2010 fuer Informationstechnik Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@doc summary for statistics
@version $ I d : node_details.erl 900 2010 - 07 - 21 15:56:55Z ... |
8338679205c86caa4075628e5a0cf86a99d04d8e29d715c1daf7dd299875d3b7 | microsoft/SLAyer | NSMultiIndexedSet.ml | Copyright ( c ) Microsoft Corporation . All rights reserved .
open NSLib
open NSList
open NSSet
open NSMap
module type MultiIndexedType = sig
type t
val equal: t -> t -> bool
val compare: t -> t -> int
type idx
val index : t -> idx
val indices : t -> idx list
val equal_idx : idx -> idx -> bool
va... | null | https://raw.githubusercontent.com/microsoft/SLAyer/6f46f6999c18f415bc368b43b5ba3eb54f0b1c04/src/Library/NSMultiIndexedSet.ml | ocaml | constructors
queries / destructors | Copyright ( c ) Microsoft Corporation . All rights reserved .
open NSLib
open NSList
open NSSet
open NSMap
module type MultiIndexedType = sig
type t
val equal: t -> t -> bool
val compare: t -> t -> int
type idx
val index : t -> idx
val indices : t -> idx list
val equal_idx : idx -> idx -> bool
va... |
939b10ffda6384b03b36692cbc2042d342510f9946bde5da785af93450e2f94f | input-output-hk/cardano-base | Blake2b.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
-- | Implementation of the Blake2b hashing algorithm, with various sizes.
module Cardano.Crypto.Hash.Blake2b
( Blake2b_224
, Blake2b_256
, blake2b_libsodium -- Used for Hash.Short
)
where
import Control.Monad (unless)
import Cardano.Crypto.Libsodium.C (c_crypto... | null | https://raw.githubusercontent.com/input-output-hk/cardano-base/41017cbe66aa0af80e7d27d4280eee286cd5d8d5/cardano-crypto-class/src/Cardano/Crypto/Hash/Blake2b.hs | haskell | | Implementation of the Blake2b hashing algorithm, with various sizes.
Used for Hash.Short | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
module Cardano.Crypto.Hash.Blake2b
( Blake2b_224
, Blake2b_256
)
where
import Control.Monad (unless)
import Cardano.Crypto.Libsodium.C (c_crypto_generichash_blake2b)
import Cardano.Crypto.Hash.Class (HashAlgorithm (..), SizeHash, hashAlgorithmName, digest)
impor... |
01e1bffc8de37e96110f7203dceb771422cfb73e049de281d12c82f19c224c44 | camlspotter/ocaml-zippy-tutorial-in-japanese | w26.ml | let v =
let f x = 1 in
let y = 2 in
3
| null | https://raw.githubusercontent.com/camlspotter/ocaml-zippy-tutorial-in-japanese/c6aeabc08b6e2289a0e66c5b94a89c6723d88a6a/t/warnings/w26.ml | ocaml | let v =
let f x = 1 in
let y = 2 in
3
| |
c0767beb3394c039de4b741d3f0be18fa43d740a4705bf5314e9a7bfbd4b81de | CSCfi/rems | test_table.cljs | (ns rems.test-table
(:require [clojure.test :refer [deftest is testing]]
[rems.table :refer [apply-row-defaults parse-search-terms]]))
(deftest test-apply-row-defaults
(testing "all custom"
(is (= {:key 123
:foo {:sort-value "foo1"
:display-value "foo2"
... | null | https://raw.githubusercontent.com/CSCfi/rems/644ef6df4518b8e382cdfeadd7719e29508a26f0/test/cljs/rems/test_table.cljs | clojure | (ns rems.test-table
(:require [clojure.test :refer [deftest is testing]]
[rems.table :refer [apply-row-defaults parse-search-terms]]))
(deftest test-apply-row-defaults
(testing "all custom"
(is (= {:key 123
:foo {:sort-value "foo1"
:display-value "foo2"
... | |
350bb741c7f0e84c1ae98d940d3cfad8c41bb45ebfa7533478f4186f4437aa1d | nboldi/c-parser-in-haskell | Parsec.hs | module SourceCode.Parsec where
import Text.Parsec
import Control.Applicative hiding ((<|>), many, optional)
import SourceCode.ASTElems
astParseEither :: ParsecT s u m (a i) -> ParsecT s u m (b i)
-> ParsecT s u m (ASTEither a b i)
astParseEither p1 p2
= (ASTLeft <$> p1) <|> (ASTRight <$>... | null | https://raw.githubusercontent.com/nboldi/c-parser-in-haskell/1a92132e7d1b984cf93ec89d6836cc804257b57d/SourceCode/Parsec.hs | haskell | module SourceCode.Parsec where
import Text.Parsec
import Control.Applicative hiding ((<|>), many, optional)
import SourceCode.ASTElems
astParseEither :: ParsecT s u m (a i) -> ParsecT s u m (b i)
-> ParsecT s u m (ASTEither a b i)
astParseEither p1 p2
= (ASTLeft <$> p1) <|> (ASTRight <$>... | |
bcbea6a0629e0ca98759b9bddf377678790c427334ee5bc7c5f2212db5ae3216 | c4-project/c4f | config_tables.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fuzz/src/config_tables.mli | ocaml | * {1 Tables}
* [param_map] lazily evaluates to a map from integer parameter IDs to their
specifications, including their default values.
* [action_cap_lower_param] names the parameter that specifies the number of
actions that should always be applied by the fuzzer, before considering
extra actions.
* [ac... | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
719cd118d1463681701eb21c08d4a981c78bf0201b63a9e47b6d5f17f0751cc3 | clojure-interop/google-cloud-clients | project.clj | (defproject clojure-interop/com.google.cloud.monitoring "1.0.0"
:description "Clojure to Java Interop Bindings for com.google.cloud.monitoring"
:url "-interop/google-cloud-client-api"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]]
:source-p... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.monitoring/project.clj | clojure | (defproject clojure-interop/com.google.cloud.monitoring "1.0.0"
:description "Clojure to Java Interop Bindings for com.google.cloud.monitoring"
:url "-interop/google-cloud-client-api"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]]
:source-p... | |
7d82d7ef85fc04a412625032ec299bb4af543bd728a9fc38a11215653b80a37a | brawnski/git-annex | Rsync.hs | A remote that is only accessible by rsync .
-
- Copyright 2011 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2011 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Remote.Rsync (remote) where
import qualified Data.ByteString.Lazy.Char8 as L
im... | null | https://raw.githubusercontent.com/brawnski/git-annex/8b847517a810d384a79178124b9766141b89bc17/Remote/Rsync.hs | haskell | Don't allow user to pass --delete to rsync;
that could cause it to delete other keys
in the same hash bucket as a key it sends.
verify configuration is sane
The rsyncurl is stored in git config, not only in this remote's
persistant state, so it can vary between hosts.
use inplace when retrieving to support resum... | A remote that is only accessible by rsync .
-
- Copyright 2011 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2011 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Remote.Rsync (remote) where
import qualified Data.ByteString.Lazy.Char8 as L
im... |
bc58a3bedd83559f2eb35869d769dc63e2a20f5aa220ce1b01d6cc7357d99b2c | rajasegar/cl-warehouse | config.lisp | (in-package :cl-user)
(defpackage cl-warehouse.config
(:use :cl)
(:import-from :envy
:config-env-var
:defconfig)
(:export :config
:*application-root*
:*static-directory*
:*template-directory*
:appenv
:developmentp
:p... | null | https://raw.githubusercontent.com/rajasegar/cl-warehouse/cb6313d42ba5df49c54f9bf7a9e30734c6f6cbd9/src/config.lisp | lisp | (in-package :cl-user)
(defpackage cl-warehouse.config
(:use :cl)
(:import-from :envy
:config-env-var
:defconfig)
(:export :config
:*application-root*
:*static-directory*
:*template-directory*
:appenv
:developmentp
:p... | |
2376332b830a3e1cabf1b0f1914a91a6c80f9713a65142505ad04a2ce485bde1 | stuarthalloway/practical-cl-clojure | chap_06.clj | (clojure/in-ns 'pcl.chap_06)
(clojure/refer 'clojure)
(use 'clojure.contrib.def)
; closure demo ends up demoing ref/dosync and anon lambda
(def counter (let [count (ref 0)] #(dosync (alter count inc))))
multiple fns closed on same value
(defn counters []
(let [count (ref 0)]
(list #(dosync (alter count inc))
... | null | https://raw.githubusercontent.com/stuarthalloway/practical-cl-clojure/eaa8af4eabdeae55cd10eff357be94b8e06969d8/src/pcl/chap_06.clj | clojure | closure demo ends up demoing ref/dosync and anon lambda
don't use *foo* convention unless var is to be dynamically rebound | (clojure/in-ns 'pcl.chap_06)
(clojure/refer 'clojure)
(use 'clojure.contrib.def)
(def counter (let [count (ref 0)] #(dosync (alter count inc))))
multiple fns closed on same value
(defn counters []
(let [count (ref 0)]
(list #(dosync (alter count inc))
#(dosync (alter count dec))
#(deref count))))
(def
... |
586227083b1bf8bb228fcfcc4ec6a6032889bd244deb0ac7303f26d7d932a460 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | InvoiceSettingCustomerSetting.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the types generated from the schema InvoiceSettingCustomerSetting
module StripeAPI.Types.InvoiceSettingCustomer... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/InvoiceSettingCustomerSetting.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema InvoiceSettingCustomerSetting
# SOURCE #
# SOURCE #
# SOURCE #
| custom_fields: Default custom fields to be displayed on invoices for this customer.
| default_payment_method: ID of a payment method that\'s attached ... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.InvoiceSettingCustomerSetting where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
impo... |
6c0b55087a70dfc1b02f0ddff8a79302d15e6fe927f9fcc0c2e571198449d6c7 | jjtolton/libapl-clj | jna.clj | (ns libapl-clj.impl.jna
(:require [tech.v3.jna :as jna]
tech.v3.datatype.jna
[tech.v3.datatype :as dtype])
(:import [com.sun.jna Pointer]))
(def ^:private default-linux-library-path "/usr/local/lib/apl")
(defonce apl-library-path* (atom (or (System/getenv "APL_LIBRARY_PATH")
... | null | https://raw.githubusercontent.com/jjtolton/libapl-clj/01e2bf7e0d20abd9f8f36c2d9fc829dd4082d455/src/libapl_clj/impl/jna.clj | clojure | initialization
execute
selectors
primary introspection API of APL Values
cell accessors
setters
constructors
destructor
in this case get_owner_count() can | (ns libapl-clj.impl.jna
(:require [tech.v3.jna :as jna]
tech.v3.datatype.jna
[tech.v3.datatype :as dtype])
(:import [com.sun.jna Pointer]))
(def ^:private default-linux-library-path "/usr/local/lib/apl")
(defonce apl-library-path* (atom (or (System/getenv "APL_LIBRARY_PATH")
... |
2a6b6271f6caf01d4c68b3a4bedc2e585f6c61437adbd533c55d958d37933d2c | exoscale/clostack | date.clj | (ns clostack.date
"Date manipulation functions."
(:require [clj-time.format :refer [parse unparse formatter formatters]]
[clj-time.core :refer [seconds plus now after?]]))
(def cloudstack-expires-formatter (formatter "yyyy-MM-dd'T'HH:mm:ssZ"))
(defn expires-args
"Builds the expires argument map. E... | null | https://raw.githubusercontent.com/exoscale/clostack/551865988fdb540cb3c6fb901ab84283a63dfdd6/src/clostack/date.clj | clojure | (ns clostack.date
"Date manipulation functions."
(:require [clj-time.format :refer [parse unparse formatter formatters]]
[clj-time.core :refer [seconds plus now after?]]))
(def cloudstack-expires-formatter (formatter "yyyy-MM-dd'T'HH:mm:ssZ"))
(defn expires-args
"Builds the expires argument map. E... | |
dffe30f87b877d37450815f51eb1b9f286bff786669c7dd69e6734d9dbd8dfe9 | tweag/asterius | T2486.hs | {-# OPTIONS_GHC -O -ddump-rules #-}
# 2486
--
The thing to look for here is that specialisations for fib and
-- at both Int and Double are indeed generated; hence -ddump-rules
module Main where
import System.Environment
import Numeric
main = do
n <- getArgs >>= readIO . head
let m = n-1
a = 2... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/simplCore/T2486.hs | haskell | # OPTIONS_GHC -O -ddump-rules #
at both Int and Double are indeed generated; hence -ddump-rules |
# 2486
The thing to look for here is that specialisations for fib and
module Main where
import System.Environment
import Numeric
main = do
n <- getArgs >>= readIO . head
let m = n-1
a = 27 + fromIntegral n
putStr $
line "Ack" [3,n] (ack 3 n) show ++
... |
4c4e57759a729f17f0cc204f3f2969398b2dc3765b1db7daba5d0d61d22a8039 | Shirakumo/kandria | save-icon.lisp | (in-package #:org.shirakumo.fraf.kandria)
(defclass save-icon (alloy:layout-element alloy:renderable)
((clock :initform 0.0 :accessor clock)
(presentations:rotation :initform 0.0 :accessor presentations:rotation)))
(defmethod alloy:render :around ((renderer ui) (icon save-icon))
(simple:with-pushed-transforms ... | null | https://raw.githubusercontent.com/Shirakumo/kandria/0eafe60b5f50c18980a6acc977dc45987e8e26c1/ui/save-icon.lisp | lisp | (in-package #:org.shirakumo.fraf.kandria)
(defclass save-icon (alloy:layout-element alloy:renderable)
((clock :initform 0.0 :accessor clock)
(presentations:rotation :initform 0.0 :accessor presentations:rotation)))
(defmethod alloy:render :around ((renderer ui) (icon save-icon))
(simple:with-pushed-transforms ... | |
3a225ef74ef5db8fa141959ce09ab59d7d75bd858c0eb8b2b827c236f6cf1a4c | felko/pion | Parser.hs | -- | Pattern parser.
module Language.Pion.Parser
( -- * Types
type',
connT,
expT,
unitT,
sequent,
context,
-- * Patterns
pattern',
prefixedPattern,
varP,
splitP,
selectP,
extractP,
unwrapP,
copyP,
-- * Expressions
literal,
expression,
varE,... | null | https://raw.githubusercontent.com/felko/pion/657fb28ebc37fccd76ad25312b299935bbb66d0f/src/Language/Pion/Parser.hs | haskell | | Pattern parser.
* Types
* Patterns
* Expressions
* Processes and actions
* Top level declarations
| Parse a type.
| Parse a composite type.
A composite type is described by a logical connective and then
Examples:
* Ordered connective
* Labelled connective
> ⨂{ x : Int, y : Int }
> &{ left : A, ... | module Language.Pion.Parser
type',
connT,
expT,
unitT,
sequent,
context,
pattern',
prefixedPattern,
varP,
splitP,
selectP,
extractP,
unwrapP,
copyP,
literal,
expression,
varE,
absE,
appE,
litE,
tupleE,
altE,
matchE,
letE,
... |
5ad101111090162ac24c6a1d8e3e5d06f450573dc5db1c77974e3771cb5579ec | thoughtstem/game-engine | player-util.rkt | #lang racket
(provide start-stop-animation
key-animator-system
player-info-closed?
update-move-info
show-move-info
key-is-down?
)
(require 2htdp/image
posn)
(require "../game-entities.rkt")
(require "../component-util.rkt")
(require "../components/animate... | null | https://raw.githubusercontent.com/thoughtstem/game-engine/98c4b9e9b8c071818e564ef7efb55465cff487a8/entity-helpers/player-util.rkt | racket | #lang racket
(provide start-stop-animation
key-animator-system
player-info-closed?
update-move-info
show-move-info
key-is-down?
)
(require 2htdp/image
posn)
(require "../game-entities.rkt")
(require "../component-util.rkt")
(require "../components/animate... | |
fbdd28fe181ebb9316ce1226e795fc82208075ff4aa19d0d537ca4fc0f4b0f19 | kpblc2000/KpblcLispLib | _kpblc-dcl-msg-yes-no.lsp | (defun _kpblc-dcl-msg-yes-no (title msg / dcl_file dcl_id dcl_res handle)
;|
* Ïîêàçûâàåò äèàëîã [Äà / Íåò]. Êíîïêà ïî óìîë÷àíèþ - "Äà"
* Ïàðàìåòðû âûçîâà:
msg ; ñîîáùåíèå. Ñòðîêà èëè ñïèñîê
* Ïðèìåðû âûçîâà:
(_kpblc-dcl-msg-yes-no (_kpblc-dcl-create-tit... | null | https://raw.githubusercontent.com/kpblc2000/KpblcLispLib/49d1d9d29078b4167cc65dc881bea61b706c620d/lsp/dcl/_kpblc-dcl-msg-yes-no.lsp | lisp | |
ñîîáùåíèå. Ñòðîêà èëè ñïèñîê
_ end of defun
| (defun _kpblc-dcl-msg-yes-no (title msg / dcl_file dcl_id dcl_res handle)
* Ïîêàçûâàåò äèàëîã [Äà / Íåò]. Êíîïêà ïî óìîë÷àíèþ - "Äà"
* Ïàðàìåòðû âûçîâà:
* Ïðèìåðû âûçîâà:
(_kpblc-dcl-msg-yes-no (_kpblc-dcl-create-title-label "Title") "Message text")
(_kpblc-dcl-msg-yes-no-low-level title m... |
47c4b18a835f061727f11b1a63bab0ca81a5d7bbda5cdaf989014fdda5604c4e | mrphlip/aoc | 03.hs | # OPTIONS_GHC -Wno - tabs #
import Data.List
import Control.Exception
getInput :: IO [[Bool]]
getInput = do
dat <- readFile "03.txt"
return $ parseInput dat
parseInput :: String -> [[Bool]]
parseInput = map (map (=='#')) . lines
tracePath :: Integer -> Integer -> [[Bool]] -> [Bool]
tracePath dx dy trees = [trees `... | null | https://raw.githubusercontent.com/mrphlip/aoc/06395681eb6b50b838cd4561b2e0aa772aca570a/2020/03.hs | haskell | # OPTIONS_GHC -Wno - tabs #
import Data.List
import Control.Exception
getInput :: IO [[Bool]]
getInput = do
dat <- readFile "03.txt"
return $ parseInput dat
parseInput :: String -> [[Bool]]
parseInput = map (map (=='#')) . lines
tracePath :: Integer -> Integer -> [[Bool]] -> [Bool]
tracePath dx dy trees = [trees `... | |
24599557c26a2892b513be4a38105e9959ad6cb3ac7c2352e2bbfefe52882704 | ocaml-opam/opam-user-setup | pp_401.ml | #!/usr/bin/env ocaml
let () =
try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
with Not_found -> ()
;;
#use "topfind";;
#require "re";;
* This is a dumb , limited rewriter for the [ { xxx| |xxx } ] quotations , that
were n't available in OCaml 4.01 . Only one beginning / end token is allowed per... | null | https://raw.githubusercontent.com/ocaml-opam/opam-user-setup/8208197c93189ed10db9e4c383377e8c3a1a43cf/pp_401.ml | ocaml | #!/usr/bin/env ocaml
let () =
try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
with Not_found -> ()
;;
#use "topfind";;
#require "re";;
* This is a dumb , limited rewriter for the [ { xxx| |xxx } ] quotations , that
were n't available in OCaml 4.01 . Only one beginning / end token is allowed per... | |
73035457513baa785cb7c78f645825e080f7508846f5753e69153c30243f7d4f | TomerAberbach/programming-in-haskell-exercises | 6.hs | (&&) :: Bool -> Bool -> Bool
a && b = if a == True then b else False
| null | https://raw.githubusercontent.com/TomerAberbach/programming-in-haskell-exercises/a66830529ebc9c4d84d0e4c6e0ad58041b46bc32/parts/1/chapters/4/6.hs | haskell | (&&) :: Bool -> Bool -> Bool
a && b = if a == True then b else False
| |
077e3fa11de4cf805e4ac85aa62f4949403dd14102c44bba6284c2987720b310 | janestreet/core | linked_queue.mli | * This module extends the { { ! Base . Linked_queue}[Base . Linked_queue ] } module with bin_io
support . As a reminder , the [ Base . Linked_queue ] module is a wrapper around OCaml 's
standard [ Queue ] module that follows Base idioms and adds some functions .
See also { ! Core . Queue } , which ... | null | https://raw.githubusercontent.com/janestreet/core/b0be1daa71b662bd38ef2bb406f7b3e70d63d05f/core/src/linked_queue.mli | ocaml | * This module extends the { { ! Base . Linked_queue}[Base . Linked_queue ] } module with bin_io
support . As a reminder , the [ Base . Linked_queue ] module is a wrapper around OCaml 's
standard [ Queue ] module that follows Base idioms and adds some functions .
See also { ! Core . Queue } , which ... | |
8f5b95dc876ead92cffcdb7caba2cea8d60b026ad6361e902692e38c4bcd35c0 | haskell/haskell-language-server | Profile.hs | {-# LANGUAGE CPP #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE ViewPatterns #-}
a result of CPP expansion
module Development.IDE.Graph.Internal.Profile (writeProfile) where
import Control.Concurrent.STM.Stats (readTVarIO)
import Data.Bifunc... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/94cd24d9e43a0f93f947075bb5a931b5d92a9f61/hls-graph/src/Development/IDE/Graph/Internal/Profile.hs | haskell | # LANGUAGE CPP #
# LANGUAGE ViewPatterns #
| Generates an report given some build system profiling data.
| Eliminate all errors from the database, pretending they don't exist
| Given a map of representing a dependency order (with a show for error messages), find an ordering for the items such
that ... | # LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
a result of CPP expansion
module Development.IDE.Graph.Internal.Profile (writeProfile) where
import Control.Concurrent.STM.Stats (readTVarIO)
import Data.Bifunctor
import qualified Data.ByteString.Lazy.Char8 as LB... |
c86009f348dbbb157918af77cd18cb0d9e7bfbe1105a035edc618e195eb940c1 | dnlkrgr/hsreduce | Trying-out-matches.hs | {-# language OverloadedStrings #-}
{-# language TypeFamilies #-}
module Matches where
data Dumb = Dumb { a :: Int, b :: String }
manyMatches :: Int -> Int
manyMatches 0 = 1
manyMatches 1 = 2
manyMatches 2 = 3
manyMatches 3 = 4
| null | https://raw.githubusercontent.com/dnlkrgr/hsreduce/8f66fdee036f8639053067572b55d9a64359d22c/test-cases/trying-out/Trying-out-matches.hs | haskell | # language OverloadedStrings #
# language TypeFamilies # | module Matches where
data Dumb = Dumb { a :: Int, b :: String }
manyMatches :: Int -> Int
manyMatches 0 = 1
manyMatches 1 = 2
manyMatches 2 = 3
manyMatches 3 = 4
|
1e6836bc710c1bb174c58328c9927305089a22be5d9fe92e9c4b38b915d1f731 | well-typed-lightbulbs/ocaml-esp32 | typecore_nolabel_errors.ml | (* TEST
flags="-nolabels"
* expect
*)
(** Gives an example for every [raise(Error(_,_,_)] in typing/typecore.ml
which both requires the "-nolabel" flags and is no covered by another test
in the testsuite.
*)
let check f = f ()
let f ~x = ()
let () = check f;;
[%%expect {|
val check : (unit -> 'a) -> '... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/typing-misc/typecore_nolabel_errors.ml | ocaml | TEST
flags="-nolabels"
* expect
* Gives an example for every [raise(Error(_,_,_)] in typing/typecore.ml
which both requires the "-nolabel" flags and is no covered by another test
in the testsuite.
|
let check f = f ()
let f ~x = ()
let () = check f;;
[%%expect {|
val check : (unit -> 'a) -> 'a = <fun>
val f : x:'a -> unit = <fun>
|}]
let () = f ~y:1
[%%expect {|
Line 1, characters 14-15:
1 | let () = f ~y:1
^
Error: The function applied to this argument has type x:'a -> unit
This argument ca... |
0aa0bceb50668cb963e275f53b56071e5ffbc457934da8e4b38d7ce77b9f524e | incoherentsoftware/defect-process | RawData.hs | module Window.InputState.RawData
( InputRawData(..)
, filterInputRawDataMouseKb
, filterInputRawDataGamepad
, formatInputRawData
) where
import Control.Monad.IO.Class (MonadIO, liftIO)
import Foreign.C.String (peekCString)
import qualified Data.Text as T
import Data.Aeson.Types ((.:), (.=), ... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Window/InputState/RawData.hs | haskell | module Window.InputState.RawData
( InputRawData(..)
, filterInputRawDataMouseKb
, filterInputRawDataGamepad
, formatInputRawData
) where
import Control.Monad.IO.Class (MonadIO, liftIO)
import Foreign.C.String (peekCString)
import qualified Data.Text as T
import Data.Aeson.Types ((.:), (.=), ... | |
d30bc5381d25cbd51011b3d15a739a3ebf11ec416a94c83e690d83209e5e2af4 | Smoltbob/Caml-Est-Belle | id.ml | type t = string
let to_string x = x
let genid =
let counter = ref (-1) in
fun () ->
incr counter;
Printf.sprintf "?v%d" !counter
| null | https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/ocaml/id.ml | ocaml | type t = string
let to_string x = x
let genid =
let counter = ref (-1) in
fun () ->
incr counter;
Printf.sprintf "?v%d" !counter
| |
a8ce6eea9da691164db450eaa3118223c81e74252483097ce85cbbfa5a95fe1e | wdebeaum/step | apportion.lisp | ;;;;
;;;; W::apportion
;;;;
(define-words :pos W::v
:words (
(W::apportion
(SENSES
((meta-data :origin "verbnet-2.0" :entry-date 20060315 :change-date 20090501 :comments nil :vn ("future_having-13.3"))
(LF-PARENT ONT::assign)
;(TEMPL agent-affected-goal-optional-templ) ; like yield
(TEMPL AGE... | null | https://raw.githubusercontent.com/wdebeaum/step/a28ce9dc0acd732be9cf762ffdf7cbcb501d4200/src/LexiconManager/Data/new/apportion.lisp | lisp |
W::apportion
(TEMPL agent-affected-goal-optional-templ) ; like yield |
(define-words :pos W::v
:words (
(W::apportion
(SENSES
((meta-data :origin "verbnet-2.0" :entry-date 20060315 :change-date 20090501 :comments nil :vn ("future_having-13.3"))
(LF-PARENT ONT::assign)
(TEMPL AGENT-AFFECTED-AFFECTEDR-XP-optional-TEMPL)
)
)
)
))
|
c5bb45ea6ce65710aa41100adb67b598402a4c6f1d9ea383829612342c009646 | gigasquid/libpython-clj-examples | sci_spacy.clj | (ns gigasquid.sci-spacy
(:require [libpython-clj.require :refer [require-python]]
[libpython-clj.python :as py :refer [py. py.. py.-]]
[clojure.java.shell :as sh]))
;;;; You need to pip install the model
;; sudo pip3 install -us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.2.4/en_core_sci... | null | https://raw.githubusercontent.com/gigasquid/libpython-clj-examples/f151c00415c82a144a13959ff7b56f58704ac6f2/src/gigasquid/sci_spacy.clj | clojure | You need to pip install the model
sudo pip3 install -us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.2.4/en_core_sci_sm-0.2.4.tar.gz
pip install scispacy
tutorial from /
=> :generator
=> :tuple
basically you should map over these things
what sort of things can you look at on the ent?
lots!
{"_" :underscore,... | (ns gigasquid.sci-spacy
(:require [libpython-clj.require :refer [require-python]]
[libpython-clj.python :as py :refer [py. py.. py.-]]
[clojure.java.shell :as sh]))
(require-python '[spacy :as spacy])
(require-python '[scispacy :as scispacy])
(def nlp (spacy/load "en_core_sci_sm"))
(def t... |
fec29440604ddf57c50830fe42a5847c6dcfb98dfe8d955108ee262f6243eab2 | manuel-serrano/bigloo | awt.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / examples / Jawt / awt.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/examples/Jawt/awt.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*=====================================================================*/
*---------------------------... | * serrano / prgm / project / bigloo / examples / Jawt / awt.scm * /
* Author : * /
* Creation : Thu Oct 26 10:22:02 2000 * /
* Last change : Sat Jul 7 11:59:55 2001 ( serrano ) * /
* Cop... |
7d3cfcc8f03ddfe9105b5d959b99ce0682a3988fea5e7dc29d685a523ad2c80e | basho/riak_core | riak_core_stat_q.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2012 Basho Technologies , Inc. All Rights Reserved .
%%
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... | null | https://raw.githubusercontent.com/basho/riak_core/762ec81ae9af9a278e853f1feca418b9dcf748a3/src/riak_core_stat_q.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 ) 2007 - 2012 Basho Technologies , Inc. All Rights Reserved .
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
... |
b7ad8fcce6c41969f6300a3075dab5683089792f1c33115c1e576a35fdb9efa7 | ku-fpg/haskino | RepPushPass.hs | -------------------------------------------------------------------------------
-- |
-- Module : System.Hardware.Haskino.ShallowDeepPlugin.RepPushPass
Copyright : ( c ) University of Kansas
-- License : BSD3
-- Stability : experimental
--
-- Rep Push Pass
-- This pass is used to transform shallow e... | null | https://raw.githubusercontent.com/ku-fpg/haskino/9a0709c92c2da9b9371e292b00fd076e5539eb18/System/Hardware/Haskino/ShallowDeepPlugin/RepPushPass.hs | haskell | -----------------------------------------------------------------------------
|
Module : System.Hardware.Haskino.ShallowDeepPlugin.RepPushPass
License : BSD3
Stability : experimental
Rep Push Pass
This pass is used to transform shallow expressions into the
deep expression language. It uses rules ... | Copyright : ( c ) University of Kansas
forall ( b1 : : ) ( b2 : : ) .
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TemplateHaskell #
module System.Hardware.Haskino.ShallowDeepPlugin.RepPushPass (repPushPass) where
import Control.Monad.Reader
import CoreMonad
import Data.Bits as DB
import... |
10947906f744f973fa0708bad770175e5570ad8eaff840edf2cd8d64bf9d70b3 | ChrisPenner/proton | Fold.hs | module Data.Profunctor.Fold where
-- Stealing ideas from
| null | https://raw.githubusercontent.com/ChrisPenner/proton/4ce22d473ce5bece8322c841bd2cf7f18673d57d/src/Data/Profunctor/Fold.hs | haskell | Stealing ideas from | module Data.Profunctor.Fold where
|
29a307982ae3cf813392f19677aaca7d2776083404566ddc01b7605ce24c7cce | thierry-martinez/hooglebackend | hooglebackend.ml | let escape s =
let buf = Buffer.create (String.length s) in
let rec escape_char i c =
match c with
'\"' | '\\' ->
Buffer.add_char buf '\\';
Buffer.add_char buf c
| '\000' .. '\127' ->
Buffer.add_char buf c
| _ ->
Buffer.add_string buf (Printf.sprintf "\\u%.4X" (int... | null | https://raw.githubusercontent.com/thierry-martinez/hooglebackend/6c732a33532281f0d73e4468d9e87e1dd1552875/hooglebackend.ml | ocaml | Non-generalizable variables are indexed. The index is stored using the name
format " %d" where %d is replaced by the index, given that no OCaml type name
can begin with a space. | let escape s =
let buf = Buffer.create (String.length s) in
let rec escape_char i c =
match c with
'\"' | '\\' ->
Buffer.add_char buf '\\';
Buffer.add_char buf c
| '\000' .. '\127' ->
Buffer.add_char buf c
| _ ->
Buffer.add_string buf (Printf.sprintf "\\u%.4X" (int... |
d0847c3f3940881f0912ddeaaf38f8a5b84de94814ad7160727063f77269ddfd | tnelson/Forge | quantifiedFormulas.rkt | #lang forge/core
(set-option! 'verbose 0)
(define Node (make-sig 'Node))
(define Color (make-sig 'Color #:abstract #t))
(define Red (make-sig 'Red #:one #t #:extends Color))
(define Green (make-sig 'Green #:one #t #:extends Color))
(define Blue (make-sig 'Blue #:one #t #:extends Color))
(define edges (make-relation... | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/tests/forge-functional/formulas/quantifiedFormulas.rkt | racket | cycle
complete
<= relation | #lang forge/core
(set-option! 'verbose 0)
(define Node (make-sig 'Node))
(define Color (make-sig 'Color #:abstract #t))
(define Red (make-sig 'Red #:one #t #:extends Color))
(define Green (make-sig 'Green #:one #t #:extends Color))
(define Blue (make-sig 'Blue #:one #t #:extends Color))
(define edges (make-relation... |
cabc8552f2141fa7231fa96dd0c5ec4765d4602e1f6c20885b27620a21d59dd9 | fossas/fossa-cli | FpmToml.hs | module Strategy.Fortran.FpmToml (
analyzeFpmToml,
-- * for testing
FpmToml (..),
FpmDependency (..),
FpmPathDependency (..),
FpmGitDependency (..),
buildGraph,
fpmTomlCodec,
) where
import Control.Applicative (Alternative ((<|>)))
import Control.Effect.Diagnostics (Diagnostics, context)
import Data.Fo... | null | https://raw.githubusercontent.com/fossas/fossa-cli/efc29b4f9c874e338f0b5a7d1c5b13cb9543156f/src/Strategy/Fortran/FpmToml.hs | haskell | * for testing
| Represents the content of the fpm manifest.
Reference: -lang/fpm/blob/main/manifest-reference.md | module Strategy.Fortran.FpmToml (
analyzeFpmToml,
FpmToml (..),
FpmDependency (..),
FpmPathDependency (..),
FpmGitDependency (..),
buildGraph,
fpmTomlCodec,
) where
import Control.Applicative (Alternative ((<|>)))
import Control.Effect.Diagnostics (Diagnostics, context)
import Data.Foldable (asum)
impor... |
8ba77d78fc3c06604ce5a064b12412ebefcfa028cb24fdbc587c5e335a23d00f | dongcarl/guix | dbm.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 , 2016 < >
Copyright © 2013 , 2015 < >
Copyright © 2016 , 2017 , 2018 , 2020 < >
Copyright © 2017 , 2018 < >
Copyright © 2018 < >
Copyright © 2021 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU i... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/dbm.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 © 2012 , 2013 , 2014 , 2016 < >
Copyright © 2013 , 2015 < >
Copyright © 2016 , 2017 , 2018 , 2020 < >
Copyright © 2017 , 2018 < >
Copyright © 2018 < >
Copyright © 2021 < >
under the terms of the GNU General Public License as published by
You should have received a copy of t... |
53de04f11ce5e877f81472e769b44d8ad2c9aa8647f593e24405d2287ec508a3 | discus-lang/salt | Parser.hs |
module Salt.LSP.Task.Diagnostics.Parser where
import Salt.LSP.Task.Diagnostics.Lexer
import Salt.LSP.Task.Diagnostics.Base
import Salt.LSP.Interface
import Salt.LSP.Protocol
import Salt.LSP.State
import Salt.Core.Codec.Text.Parser
import Salt.Core.Codec.Text.Lexer
import Salt.Core.Codec.Text.Token
import qualified Tex... | null | https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/salt/Salt/LSP/Task/Diagnostics/Parser.hs | haskell | ---------------------------------------------------------------------------------------- Types --
| A parser diagnostic to send to the client.
----------------------------------------------------------------------------------------- Send --
| Send parser diagnostics to the client.
------------------------------------... |
module Salt.LSP.Task.Diagnostics.Parser where
import Salt.LSP.Task.Diagnostics.Lexer
import Salt.LSP.Task.Diagnostics.Base
import Salt.LSP.Interface
import Salt.LSP.Protocol
import Salt.LSP.State
import Salt.Core.Codec.Text.Parser
import Salt.Core.Codec.Text.Lexer
import Salt.Core.Codec.Text.Token
import qualified Tex... |
19e51c6bb9ea5d7a488017030d6d11cc3978f6c8bda512b910d752512cf15dbb | fragnix/fragnix | Math.NumberTheory.Powers.Natural.hs | {-# LANGUAGE Haskell2010 #-}
# LINE 1 " src / Math / NumberTheory / Powers / Natural.hs " #
-- |
Module : Math . . Powers . Natural
Copyright : ( c ) 2011 - 2014
Licence : MIT
Maintainer : < >
-- Stability: Provisional
Portability ... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/application/Math.NumberTheory.Powers.Natural.hs | haskell | # LANGUAGE Haskell2010 #
|
Stability: Provisional
Potentially faster power function for 'Natural' base and 'Int'
or 'Word' exponent.
# LANGUAGE MagicHash #
# LANGUAGE BangPatterns #
| Power of an 'Natural' by the left-to-right repeated squaring algorithm.
gains a bit when the result is large.
For sma... | # LINE 1 " src / Math / NumberTheory / Powers / Natural.hs " #
Module : Math . . Powers . Natural
Copyright : ( c ) 2011 - 2014
Licence : MIT
Maintainer : < >
Portability : Non - portable ( GHC extensions )
# LANGUAGE CPP #... |
1809d3092cce232d6ecc7b0f068018b97a6c7c8c4da7923d6536ab0784b15c58 | bdeket/rktsicm | manifold.rkt | #lang racket/base
(require rackunit
"../../main.rkt"
"../helper.rkt"
)
(define the-tests
(test-suite
"calculus/manifold"
(test-case
"R2-rect"
(define m ((R2-rect '->point) (up 3 4)))
(check-simplified? ((R2-polar '->coords) m)
#(5 .9272952180016122... | null | https://raw.githubusercontent.com/bdeket/rktsicm/5125a3fcfad1545bd520d1e2f3b50cb542708202/rktsicm/sicm/tests/calculus/manifold.rkt | racket | with 0 this is an error
Should be warned singular!
with 0 this is an error
Now a fun example synthesizing the to projective coordinates.
The gnomic projection removes the double-cover of quaternions to rotations.
The solid unit-sphere of the stereographic projection from the south pole likewise.
A scalar field can... | #lang racket/base
(require rackunit
"../../main.rkt"
"../helper.rkt"
)
(define the-tests
(test-suite
"calculus/manifold"
(test-case
"R2-rect"
(define m ((R2-rect '->point) (up 3 4)))
(check-simplified? ((R2-polar '->coords) m)
#(5 .9272952180016122... |
87e7f7e2afa529dacb5f15e475b73cf6f3651f09ca223acb509bb7ff6797e800 | chaitanyagupta/qbase64 | s-base64.lisp | (in-package #:base64-benchmark)
(defclass s-base64 (lisp-module)
())
| null | https://raw.githubusercontent.com/chaitanyagupta/qbase64/6374899aec189600e6b7b77c89009d0835154b93/benchmark/s-base64.lisp | lisp | (in-package #:base64-benchmark)
(defclass s-base64 (lisp-module)
())
| |
2d0e13e0af6afce62badb983e6f1c16a7b0982fda693efed6fce254118bc3070 | parapluu/Concuerror | source_killer.erl | -module(source_killer).
-export([test/0]).
-export([scenarios/0]).
-concuerror_options_forced([{ignore_error, deadlock}]).
scenarios() -> [{test, inf, T} || T <- [source, dpor]].
test() ->
ets:new(table, [public, named_table]),
P = spawn(fun() -> ets:lookup(table, v), ets:lookup(table, k) end),
spawn(fu... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/advanced_tests/src/source_killer.erl | erlang | -module(source_killer).
-export([test/0]).
-export([scenarios/0]).
-concuerror_options_forced([{ignore_error, deadlock}]).
scenarios() -> [{test, inf, T} || T <- [source, dpor]].
test() ->
ets:new(table, [public, named_table]),
P = spawn(fun() -> ets:lookup(table, v), ets:lookup(table, k) end),
spawn(fu... | |
7c4819c023b7fd2eeba9eac40b931a0c18b5488651a6375971fbd98a0b95bb39 | LexiFi/menhir | parserAux.mli | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/parserAux.mli | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
dd51092392b51e99201bcc6bb77109353629ab689a9e84d26b06fa7a6a984c4a | grafted-in/web-scraping-engine | Main.hs | module Main (main, mainTest) where
import ScrapeEngine.Main (Options, mainWithArgs, parseArgs)
import Control.Monad
import qualified System.Environment as Env
import qualified System.Remote.Monitoring as Monitor
import qualified ScrapingRules as SR
main' :: Options -> IO ()
main' opts = mainWithArg... | null | https://raw.githubusercontent.com/grafted-in/web-scraping-engine/075f1444d49f6655ddd4ce477404b5b6371ba2dc/example/src/Main.hs | haskell | module Main (main, mainTest) where
import ScrapeEngine.Main (Options, mainWithArgs, parseArgs)
import Control.Monad
import qualified System.Environment as Env
import qualified System.Remote.Monitoring as Monitor
import qualified ScrapingRules as SR
main' :: Options -> IO ()
main' opts = mainWithArg... | |
bd21066505bda366c4429afe770a20be4724e44e951a83cd2dafcc0531592d62 | facebook/duckling | Rules.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Numeral.VI.Rules
( rules
) wh... | null | https://raw.githubusercontent.com/facebook/duckling/c6a48a1d0678a389f86d17db2676e1a289e355ce/Duckling/Numeral/VI/Rules.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Numeral.VI.Rules
( rules
) where
import Data.Maybe
import Data.String
import Prelude
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Text as Text
import Duckling.Dimensions.Types
import Duckling.Numeral.Helpers
import Duck... |
fffa0b882782fadf0c8a353d987744bb983203027d627cd25ffcbc7fa8b7fe67 | janestreet/rpc_parallel | backend.mli | include Rpc_parallel.Backend with type Settings.t = unit
| null | https://raw.githubusercontent.com/janestreet/rpc_parallel/28bffcaa8a9fb73c321a616e724cf88efd38870f/unauthenticated/backend.mli | ocaml | include Rpc_parallel.Backend with type Settings.t = unit
| |
572772372274da9fa91b7237e567dffce32f818e88dc46f1c5583653ed2949ce | clash-lang/clash-compiler | Port.hs | |
Copyright : ( C ) 2022 Google Inc.
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Copyright: (C) 2022 Google Inc.
License: BSD2 (see the file LICENSE)
Maintainer: QBayLogic B.V. <>
-}
module Clash.FFI.VPI.Port
( Port(..)
, direction
, module Clash.FFI.VP... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/17b9f807ee01c7ee7b5379ee5f6e9ff60aeab4a6/clash-ffi/src/Clash/FFI/VPI/Port.hs | haskell | @vpiPort@ object type.
safely converted to the base object type using 'portObject'.
Every port in a design is also a net, with different properties available
to each. The direction can only be accessed from a port, and the value can
only be accessed with a net.
| The direction of the port, as specified in the ... | |
Copyright : ( C ) 2022 Google Inc.
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Copyright: (C) 2022 Google Inc.
License: BSD2 (see the file LICENSE)
Maintainer: QBayLogic B.V. <>
-}
module Clash.FFI.VPI.Port
( Port(..)
, direction
, module Clash.FFI.VP... |
377552f961c784701f174fc1656de199ae3e32034ffd37515de7bf423ad30b25 | nextjournal/freerange | project.clj | (defproject re-frame "lein-git-inject/version"
:description "A ClojureScript MVC-like Framework For Writing SPAs Using Reagent."
:url "-frame.git"
:license {:name "MIT"}
:dependencies [[org.clojure/clojure "1.10.1" :scope "provided"]
[org.clojure/clojurescript "1.10.... | null | https://raw.githubusercontent.com/nextjournal/freerange/c43e848758d1e7cf259ed8ac06a0a9089317a6a6/project.clj | clojure | NOTE: In order to compile docs you would need to install
NOTE: Calibre and svgexport(0.3.2) are needed to build below | (defproject re-frame "lein-git-inject/version"
:description "A ClojureScript MVC-like Framework For Writing SPAs Using Reagent."
:url "-frame.git"
:license {:name "MIT"}
:dependencies [[org.clojure/clojure "1.10.1" :scope "provided"]
[org.clojure/clojurescript "1.10.... |
ebf5ca9fadb089050fd14cb57d2b1a276a648a739295e98800177b7ad93cb1c9 | tov/dssl2 | error-message.rkt | #lang dssl2
assert_error error(), 'error()'
assert_error error('foo bar'), 'foo bar'
assert_error error('(%p, %s)', 'a', 'b'), "('a', b)"
assert_error error(5), 'error(5)'
assert_error error(5, 6, '7'), "error(5, 6, '7')"
| null | https://raw.githubusercontent.com/tov/dssl2/105d18069465781bd9b87466f8336d5ce9e9a0f3/test/dssl2/error-message.rkt | racket | #lang dssl2
assert_error error(), 'error()'
assert_error error('foo bar'), 'foo bar'
assert_error error('(%p, %s)', 'a', 'b'), "('a', b)"
assert_error error(5), 'error(5)'
assert_error error(5, 6, '7'), "error(5, 6, '7')"
| |
8460983629ab6aff3d08810c23b522eb7b3944466915aeea5694f859823c5697 | tonatona-project/tonatona | Tonalude.hs | module Tonalude
( module Tonalude.Prelude.Display
, module Tonalude.Prelude.IO
, module Tonalude.Prelude.RIO
, module Tonalude.Prelude.Text
, module Tonalude.Prelude.Reexports
, module Tonalude.Prelude.Renames
, module Tonalude.Prelude.Trace
) where
import Tonalude.Prelude.Display
import Tonalude.Prelu... | null | https://raw.githubusercontent.com/tonatona-project/tonatona/b6b67bf0f14d345c01dcf9ea7870b657891f032c/tonalude/src/Tonalude.hs | haskell | module Tonalude
( module Tonalude.Prelude.Display
, module Tonalude.Prelude.IO
, module Tonalude.Prelude.RIO
, module Tonalude.Prelude.Text
, module Tonalude.Prelude.Reexports
, module Tonalude.Prelude.Renames
, module Tonalude.Prelude.Trace
) where
import Tonalude.Prelude.Display
import Tonalude.Prelu... | |
df74bd7f1c4c5c2b2f71ebbfb6566c55f9c242c485813b8f3c028182196072cd | bobzhang/ocaml-book | types.ml | open Camlp4.PreCast;
open BatPervasives;
value cons = ["A"; "B";"C"]
and _loc = Loc.ghost ;
value tys =
<:ctyp< [ $list: (List.map (fun str -> <:ctyp< $uid:str$ >>) cons) $ ]
>>
;
(** incomplete type *)
value x = <:ctyp< A | B | C>>
;
*
value x : =
( TyId ( IdUid " A " ) )
( TyOr ( TyId ( I... | null | https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/camlp4/experiment/types.ml | ocaml | * incomplete type | open Camlp4.PreCast;
open BatPervasives;
value cons = ["A"; "B";"C"]
and _loc = Loc.ghost ;
value tys =
<:ctyp< [ $list: (List.map (fun str -> <:ctyp< $uid:str$ >>) cons) $ ]
>>
;
value x = <:ctyp< A | B | C>>
;
*
value x : =
( TyId ( IdUid " A " ) )
( TyOr ( TyId ( IdUid " B " ) ) ( Ty... |
4f3f09effbc058fab0654a0d491c856240242b3ffb6bac690451d2861cf3b95c | supermario/oak | AppSample.hs | module AppSample where
import Oak
import Data.Text (Text)
data Model = Model
{ counter :: Int
, message :: Text
} deriving Show
data Msg
= Increment
| Decrement
| KeyPress String
| SocketJoined SocketId Int
| SocketReceive SocketId Text
| Noop
main :: Program Model Msg
main = Program initial upd... | null | https://raw.githubusercontent.com/supermario/oak/220a4d378dd192aeebec6c10aa71d630669f7413/examples/AppSample.hs | haskell | module AppSample where
import Oak
import Data.Text (Text)
data Model = Model
{ counter :: Int
, message :: Text
} deriving Show
data Msg
= Increment
| Decrement
| KeyPress String
| SocketJoined SocketId Int
| SocketReceive SocketId Text
| Noop
main :: Program Model Msg
main = Program initial upd... | |
23cf838ce96a9b273d6f7352da494c067ed3bb3fbc2810f1e4802d4deadad531 | igorhvr/bedlam | mbe.scm | " mbe.scm " " Macro by Example " ( , R4RS )
From : , , 1991 , 1999
;
;Permission to copy this software, to modify it, to redistribute it,
;to distribute modified versions, and to use it for any purpose is
;granted, subject to the following restrictions and understandings.
;
1 . Any copy made of this software... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/mbe.scm | scheme |
Permission to copy this software, to modify it, to redistribute it,
to distribute modified versions, and to use it for any purpose is
granted, subject to the following restrictions and understandings.
in full.
this software will be error-free, and I am under no obligation to
provide any services, by way of maintenan... | " mbe.scm " " Macro by Example " ( , R4RS )
From : , , 1991 , 1999
1 . Any copy made of this software must include this copyright notice
2 . I have made no warranty or representation that the operation of
3 . In conjunction with products arising from the use of this
revised Dec. 6 , 1993 to R4RS synta... |
4634b8370de574ce431cbfce761bef9b60b98091fd4ba3c6917aaab2d70a7418 | dalaing/little-languages | Test.hs | module Main where
import Test.Tasty
import Test.Term (termTests)
import Test.Type (typeTests)
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests = testGroup "Tests" [
termTests
, typeTests
]
| null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/nb/tests/Test.hs | haskell | module Main where
import Test.Tasty
import Test.Term (termTests)
import Test.Type (typeTests)
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests = testGroup "Tests" [
termTests
, typeTests
]
| |
eaa0dc398f0204cca12929643f8d18e06f7b442e81f8c390d1349989e3342d39 | ndmitchell/uniplate | Data.hs | # LANGUAGE CPP , , MagicHash , UnboxedTuples , ExistentialQuantification , ScopedTypeVariables #
# OPTIONS_GHC -Wno - orphans #
{- |
Internal module, do not import or use.
-}
module Data.Generics.Uniplate.Internal.Data where
import Data.Generics.Str
import Data.Generics.Uniplate.Internal.Utils
import Data.Data
... | null | https://raw.githubusercontent.com/ndmitchell/uniplate/7d3039606d7a083f6d77f9f960c919668788de91/Data/Generics/Uniplate/Internal/Data.hs | haskell | |
Internal module, do not import or use.
-------------------------------------------------------------------
GHC 7.2 and above (using fingerprint)
-------------------------------------------------------------------
HIT TEST
you just hit the element you were after (here is a cast)
go forward, you will find som... | # LANGUAGE CPP , , MagicHash , UnboxedTuples , ExistentialQuantification , ScopedTypeVariables #
# OPTIONS_GHC -Wno - orphans #
module Data.Generics.Uniplate.Internal.Data where
import Data.Generics.Str
import Data.Generics.Uniplate.Internal.Utils
import Data.Data
import Data.Generics
import Data.Maybe
import Data.... |
95f105e5ae1c00876692642e636ea8af059ba91f9d9bf1b9ab4e47e09d0896ff | bobzhang/ocaml-book | param.ml | module type Number = sig
type t
val int : int -> t
val (+) : t -> t -> t
val (/) : t -> t -> t
end
let average (type t) number arr =
let module N = (val number : Number with type t = t) in
N.(
let r = ref (int 0) and len = Array.length arr in
for i = 0 to Pervasives.(len - 1) do
r := !r + ... | null | https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/lang/code/param.ml | ocaml | val average : (module Number with type t = 'a) -> 'a array -> 'a = <fun>
val f : int array -> int = <fun> | module type Number = sig
type t
val int : int -> t
val (+) : t -> t -> t
val (/) : t -> t -> t
end
let average (type t) number arr =
let module N = (val number : Number with type t = t) in
N.(
let r = ref (int 0) and len = Array.length arr in
for i = 0 to Pervasives.(len - 1) do
r := !r + ... |
35ae9df71cf7f6bf2a4ed93ebf3e2e44f981a457a78c9cd5100473f1f7687a55 | steinuil/xobl | elaborate_masks.ml | *
- [ x ] Find switches with bit cases and just turn them into optional fields .
Requires two additional types of fields :
- hidden field for the mask
- " Optional field "
- [ x ] Find switches with eq cases and turn the corresponding enum into
a variant .
Requires two addit... | null | https://raw.githubusercontent.com/steinuil/xobl/eee29dc7649787f37e03556f251db0845639cb1d/compiler/elaborate_masks.ml | ocaml | * Invert a simple expression containing a single field_ref.
Apply random fixes
There is a single case in which this happens
and of course it's inside xinput.
There are a few cases in xinput.
Variants
Optional fields
Lists
Rest
* Because event structs use these despite everything ... | *
- [ x ] Find switches with bit cases and just turn them into optional fields .
Requires two additional types of fields :
- hidden field for the mask
- " Optional field "
- [ x ] Find switches with eq cases and turn the corresponding enum into
a variant .
Requires two addit... |
45042bb9672eb704b7052313618862c42d16147b12a2f0d5779abd2792bc12a1 | candera/khordr | common.clj | (ns khordr.platform.common
"The common abstractions for khordr platform services.")
(defprotocol IPlatform
(await-key-event [platform]
"Block until a key event happens, and then return it.")
(send-key [platform keyevent]
"Transmit a key press or release.")
(cleanup [platform]
"Release any resources... | null | https://raw.githubusercontent.com/candera/khordr/cd9ad9df3dc6692b583b844244260b5b619745f7/src/clj/khordr/platform/common.clj | clojure | (ns khordr.platform.common
"The common abstractions for khordr platform services.")
(defprotocol IPlatform
(await-key-event [platform]
"Block until a key event happens, and then return it.")
(send-key [platform keyevent]
"Transmit a key press or release.")
(cleanup [platform]
"Release any resources... | |
d7e4c12553a1f0372634bda485a1faa60f044b4b3d513dca67d698f36ebe4dd5 | clash-lang/clash-compiler | Trace.hs | |
Copyright : ( C ) 2018 , Google Inc.
2019 , Myrtle Software Ltd
2022 , QBayLogic B.V.
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Utilities for tracing signals and dumping them in various ways . Example usage :
@
import Cla... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/68f429b90e8183cb1fccb488f7bf0f6c9f3119b5/clash-prelude/src/Clash/Signal/Trace.hs | haskell | | Count and wrap around
| Count , but only when my subcounter is wrapping around
| Collect traces , and dump them to a VCD file .
| Count and wrap around
| Count, but only when my subcounter is wrapping around
| Collect traces, and dump them to a VCD file.
# LANGUAGE OverloadedStrings #
# OPTIONS_GHC -fplugin ... | |
Copyright : ( C ) 2018 , Google Inc.
2019 , Myrtle Software Ltd
2022 , QBayLogic B.V.
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Utilities for tracing signals and dumping them in various ways . Example usage :
@
import Cla... |
bf757852115d63e12a8508baab676654ffbcbffb3c4db8bdfe44a14ba3c8256b | hammerlab/ketrew | reactive_html5.ml | open Ketrew_pure
open Internal_pervasives
module H5 = struct
include Tyxml_js.Html
module Reactive_node = Tyxml_js.R.Html
let to_dom e = Tyxml_js.To_dom.of_node e
let local_anchor ~on_click ?(a=[]) content =
Tyxml_js.Html.a ~a:(
[
a_href "javascript:;";
(* The `href` transforms the... | null | https://raw.githubusercontent.com/hammerlab/ketrew/8940d48fbe174709f076b7130974ecd0ed831d58/src/client-joo/reactive_html5.ml | ocaml | The `href` transforms the mouse like a link.
-an-empty-href-valid
span ~a:[a_class ["glyphicon"; "glyphicon-wrench"]] []
The `a` must be directly under the `li`.
buttons must be in a group for justification to work
~default:(pcdata (fmt "??? -> %s" (String.concat ~sep:", " !d))) | open Ketrew_pure
open Internal_pervasives
module H5 = struct
include Tyxml_js.Html
module Reactive_node = Tyxml_js.R.Html
let to_dom e = Tyxml_js.To_dom.of_node e
let local_anchor ~on_click ?(a=[]) content =
Tyxml_js.Html.a ~a:(
[
a_href "javascript:;";
a_onclick on_click;
]
... |
ec52f00a0737b4c4b9ac403b9eb30015999dc7540427e3c8bff7a5c9c32e1889 | tweag/servant-template | Authentication.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE TypeOperators #
module API.Authentication where
import GHC.Generics (Generic)
import Infrastructure.Authentication.AuthenticateUser (AuthenticateUser (runAuthenticateUser))
import Infrastructure.Authentication.Credentials (Cr... | null | https://raw.githubusercontent.com/tweag/servant-template/b5598af43ff69160c6d8a59d5e4a1f23358b6410/src/API/Authentication.hs | haskell | |
The endpoints required to perform authentication
| Given some 'Login' data, registers a new 'User'
| Given some 'Login' data, generates an authentication token
hash the password
store the new user into the database
try to authenticate the user
if the user authenticated, generate an authentication token | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE TypeOperators #
module API.Authentication where
import GHC.Generics (Generic)
import Infrastructure.Authentication.AuthenticateUser (AuthenticateUser (runAuthenticateUser))
import Infrastructure.Authentication.Credentials (Cr... |
d7216c0031dd14f3da3bdf13e7d94784aca95ade1a905aebceb3fe6eb5bd6149 | giorgidze/HCodecs | Audio.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.Audio
Copyright :
-- License : BSD3
--
Maintainer : < /~ggg/ >
-- Stability : Experimental
-- Portability : Portable
--
-- General purpose data type for representing an audio data.
--
------------... | null | https://raw.githubusercontent.com/giorgidze/HCodecs/deada21b19b2063a60027535f0f8bb303f08e302/src/Data/Audio.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Audio
License : BSD3
Stability : Experimental
Portability : Portable
General purpose data type for representing an audio data.
--------------------------------------------------------------------------- | Copyright :
Maintainer : < /~ggg/ >
# LANGUAGE FlexibleContexts , UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Data.Audio (
Sample
, Audio (..)
, SampleData
, SampleMode(..)
, sampleType
, sampleNumber
, convert
, parseSampleData
, buildSampleData
, Audible
, toSample
... |
d66f0490edfdc8069893d29df3713b16025d73143540b5aa443668d99c76b8fe | cky/guile | poll.scm | ;; poll
Copyright ( C ) 2010 , 2011 Free Software Foundation , Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at your option... | null | https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/module/ice-9/poll.scm | scheme | poll
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
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 PARTICULAR PURPO... |
Copyright ( C ) 2010 , 2011 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
(define-module (ice-9 poll)
#:use-module (... |
f03b5e4e9a2041a2271ca3cb90d594d553dc389297a33371a7ee25bb70f0a692 | melange-re/melange | gpr_658.ml |
external obj : < hi : int > " " [ @@bs.val ]
external mk : hi:int -> unit -> < hi : int > Js.t = "" [@@bs.obj]
external set_name : < > - > string - > unit = " 1name " [ @@bs.set ]
| null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/gpr_658.ml | ocaml |
external obj : < hi : int > " " [ @@bs.val ]
external mk : hi:int -> unit -> < hi : int > Js.t = "" [@@bs.obj]
external set_name : < > - > string - > unit = " 1name " [ @@bs.set ]
| |
beffed60b2e65fd89fbd4fbfa4497b1eace2cf95e282d1fd5752bdee7905859d | HugoPeters1024/hs-sleuth | Concat.hs | {-# LANGUAGE OverloadedStrings #-}
module Benchmarks.Concat (benchmark) where
import Control.Monad.Trans.Writer
import Criterion (Benchmark, bgroup, bench, whnf)
import Data.Text as T
benchmark :: Benchmark
benchmark = bgroup "Concat"
[ bench "append" $ whnf (append4 "Text 1" "Text 2" "Text 3") "Text 4"
, bench ... | null | https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/385655e62031959a14a3bac5e9ccd1c42c045f0c/test-project/text-1.2.4.0/benchmarks/haskell/Benchmarks/Concat.hs | haskell | # LANGUAGE OverloadedStrings #
# NOINLINE concat4 #
# NOINLINE write4 # |
module Benchmarks.Concat (benchmark) where
import Control.Monad.Trans.Writer
import Criterion (Benchmark, bgroup, bench, whnf)
import Data.Text as T
benchmark :: Benchmark
benchmark = bgroup "Concat"
[ bench "append" $ whnf (append4 "Text 1" "Text 2" "Text 3") "Text 4"
, bench "concat" $ whnf (concat4 "Text 1" "... |
cc58bc2246e4b93e77de3a3843659995ba009f6106a88eb42bc15cf23fac8d0c | bugarela/GADTInference | e3.hs | data T a where {TInt :: (a ~ Int) => a -> T a; TBool :: (a ~ Bool) => a -> T a; TAny :: a -> T a}
e1 = let g :: (T a, Bool) -> a = \z -> case z of {(TInt n, y) -> n; (TBool b, y) -> y} in g
-- Does not have principal type.
g : : ( T a , ) - > a
--g :: (T a, Int) -> Int
g = \z - > case z of { ( TInt n , y ) - > n ; ( ... | null | https://raw.githubusercontent.com/bugarela/GADTInference/dd179f6df2cd76055c25c33da3187a60815688d1/examples/annotated/e3.hs | haskell | Does not have principal type.
g :: (T a, Int) -> Int | data T a where {TInt :: (a ~ Int) => a -> T a; TBool :: (a ~ Bool) => a -> T a; TAny :: a -> T a}
e1 = let g :: (T a, Bool) -> a = \z -> case z of {(TInt n, y) -> n; (TBool b, y) -> y} in g
g : : ( T a , ) - > a
g = \z - > case z of { ( TInt n , y ) - > n ; ( TBool b , y ) - > y }
|
7bfde82088437ce0b72d87e6c8477e2b6e61e14ada7fba4b0e698bf7218b6056 | roehst/tapl-implementations | core.ml | open Format
open Syntax
open Support.Error
open Support.Pervasive
(* ------------------------ EVALUATION ------------------------ *)
let rec isval ctx t = match t with
TmAbs(_,_,_,_) -> true
| _ -> false
exception NoRuleApplies
let rec eval1 ctx t = match t with
TmApp(fi,TmAbs(_,x,tyT11,t12),v2) when i... | null | https://raw.githubusercontent.com/roehst/tapl-implementations/23c0dc505a8c0b0a797201a7e4e3e5b939dd8fdb/bot/core.ml | ocaml | ------------------------ EVALUATION ------------------------
------------------------ SUBTYPING ------------------------
------------------------ TYPING ------------------------ | open Format
open Syntax
open Support.Error
open Support.Pervasive
let rec isval ctx t = match t with
TmAbs(_,_,_,_) -> true
| _ -> false
exception NoRuleApplies
let rec eval1 ctx t = match t with
TmApp(fi,TmAbs(_,x,tyT11,t12),v2) when isval ctx v2 ->
termSubstTop v2 t12
| TmApp(fi,v1,t2) when isva... |
75575499f08cca90fa69dcc09baa83f35d77097eca1864f0d661868dfbe34348 | fluree/db | full_text.clj | (ns fluree.db.full-text
(:require [fluree.db.constants :as const]
[fluree.db.dbproto :as dbproto]
[fluree.db.flake :as flake]
[fluree.db.full-text.block-registry :as block-registry]
[clojure.string :as str]
[clojure.walk :refer [keywordize-keys]]
... | null | https://raw.githubusercontent.com/fluree/db/da8a0f5cf1dc0919d03b1c1e81e89354942d10ae/src/fluree/db/full_text.clj | clojure | TODO: determine size impact of these analyzers - can we package them
separately if large impact? | (ns fluree.db.full-text
(:require [fluree.db.constants :as const]
[fluree.db.dbproto :as dbproto]
[fluree.db.flake :as flake]
[fluree.db.full-text.block-registry :as block-registry]
[clojure.string :as str]
[clojure.walk :refer [keywordize-keys]]
... |
afb24f604e5c82e14342e97dc709d79cecc21e50073d9f96dd4ba19416646611 | zenspider/schemers | exercise.2.29.scm | #lang racket/base
(require "../lib/test.rkt")
Exercise 2.29 .
A binary mobile consists of two branches , a left branch and a right
;; branch. Each branch is a rod of a certain length, from which hangs
;; either a weight or another binary mobile. We can represent a binary
mobile using compound data by construct... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.29.scm | scheme | branch. Each branch is a rod of a certain length, from which hangs
either a weight or another binary mobile. We can represent a binary
(for example, using list):
m = ([l_len w_or_m] [r_len w_or_m])
A branch is constructed from a length (which must be a number)
together with a structure, which may be either a numb... | #lang racket/base
(require "../lib/test.rkt")
Exercise 2.29 .
A binary mobile consists of two branches , a left branch and a right
mobile using compound data by constructing it from two branches
(define (make-mobile left right)
(list left right))
(define (make-branch length structure)
(list length stru... |
43c438ea4697ce379d4eebde9a4130bb6e63421d51f082f2749e143939e2ccdd | untangled-web/untangled-client | initial_app_state_card.cljs | (ns untangled.client.initial-app-state-card
(:require [devcards.core :as dc :refer-macros [defcard]]
[om.dom :as dom]
[untangled.client.core :as uc :refer [InitialAppState initial-state]]
[untangled.client.cards :refer [untangled-app]]
[om.next :as om :refer [defui]]))
... | null | https://raw.githubusercontent.com/untangled-web/untangled-client/d9b350db3a5e19910692ee70281d8c156fd3a3f9/src-cards/untangled/client/initial_app_state_card.cljs | clojure | (ns untangled.client.initial-app-state-card
(:require [devcards.core :as dc :refer-macros [defcard]]
[om.dom :as dom]
[untangled.client.core :as uc :refer [InitialAppState initial-state]]
[untangled.client.cards :refer [untangled-app]]
[om.next :as om :refer [defui]]))
... | |
368f879846deb91ff3daf0ce1f62c2d768c57321e4b93104633fa51746c21007 | haroldcarr/learn-haskell-coq-ml-etc | Lib.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Lib where
import Control.Monad
import ... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/7f233d63132a1f9ae22e8bba503b39ca51d20c7b/haskell/topic/type-level/2015-04-nikita-volkov-the-refinement-types-library/src/Lib.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeSynonymInstances #
slice a list into chunks of a given length
given a postive : slices then generates infinite list of empty lists
'error' antipattern
but masks potential upstream error
use 'Maybe'
no separation of concerns: all... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
module Lib where
import Control.Monad
import Data.Char
import Data.Function ((&))
import qualified Data.Text.Prettyprint.Doc as PP
import ... |
4043436805e3405fad65f8fe1ed9f5dc4047e37d97d2509aabd22ce877599e7a | amitayh/elm-cljs | app.cljs | (ns elm-cljs.app
(:require [elm-cljs.core :refer [main]]
[elm-cljs.effects :refer [->Random ->Fetch]]))
(enable-console-print!)
;; --- Model ------------------------------------------------
(def model {:counter 0
:loading false
:text "World"})
;; --- Messages ------------------... | null | https://raw.githubusercontent.com/amitayh/elm-cljs/a451962844f8d96adc0d7bbcab8ddc97f6e8209e/src/elm_cljs/app.cljs | clojure | --- Model ------------------------------------------------
--- Messages ------------------------------------------------
--- Update ------------------------------------------------
--- View ------------------------------------------------
--- Main ------------------------------------------------ | (ns elm-cljs.app
(:require [elm-cljs.core :refer [main]]
[elm-cljs.effects :refer [->Random ->Fetch]]))
(enable-console-print!)
(def model {:counter 0
:loading false
:text "World"})
(defrecord Increment [])
(defrecord Decrement [])
(defrecord SetCounter [value])
(defrecord Gen... |
647bfbdf5f43c2e9b2aa8b54a9aa6872179ff03e014167329528102090195668 | takuto-h/yuzu | main.ml | let preloads = (( :: ) ("pervasives.yzi", (( :: ) ("array.yzi", (( :: ) ("buffer.yzi", (( :: ) ("char.yzi", (( :: ) ("filename.yzi", (( :: ) ("list.yzi", (( :: ) ("printf.yzi", (( :: ) ("stack.yzi", (( :: ) ("stream.yzi", (( :: ) ("string.yzi", (( :: ) ("sys.yzi", ( [] )))))))))))))))))))))))
let rec main = begin fun ... | null | https://raw.githubusercontent.com/takuto-h/yuzu/e6bef0964d87c1ced65280083505448f56e5cf29/main.ml | ocaml | let preloads = (( :: ) ("pervasives.yzi", (( :: ) ("array.yzi", (( :: ) ("buffer.yzi", (( :: ) ("char.yzi", (( :: ) ("filename.yzi", (( :: ) ("list.yzi", (( :: ) ("printf.yzi", (( :: ) ("stack.yzi", (( :: ) ("stream.yzi", (( :: ) ("string.yzi", (( :: ) ("sys.yzi", ( [] )))))))))))))))))))))))
let rec main = begin fun ... | |
d6d6e57dec54a8cc1306ba1e86017af32fae76c34d44830affc7cd89427fe6f4 | ertugrulcetin/racing-game-cljs | config.cljs | (ns racing-game-cljs.config)
(def debug?
^boolean goog.DEBUG)
| null | https://raw.githubusercontent.com/ertugrulcetin/racing-game-cljs/490361bd88651d6d03eb3519bed50597e41f98a6/src/racing_game_cljs/config.cljs | clojure | (ns racing-game-cljs.config)
(def debug?
^boolean goog.DEBUG)
| |
ec5a0d1897bc863b63120498096b469bf20f6d73f96f55458392c06fa952105b | metabase/metabase | pre_alias_aggregations_test.clj | (ns metabase.query-processor.middleware.pre-alias-aggregations-test
"Tests for the `pre-alias-aggregations` middleware. For the most part we don't need to test the actual pre-alias
logic, as that comes from the MBQL library and is tested thoroughly there -- we just need to test that it gets
applied in the correct... | null | https://raw.githubusercontent.com/metabase/metabase/1f809593c2298ccf9c4070df3fa39d718eddb5d6/test/metabase/query_processor/middleware/pre_alias_aggregations_test.clj | clojure | (ns metabase.query-processor.middleware.pre-alias-aggregations-test
"Tests for the `pre-alias-aggregations` middleware. For the most part we don't need to test the actual pre-alias
logic, as that comes from the MBQL library and is tested thoroughly there -- we just need to test that it gets
applied in the correct... | |
b38a971b2df61ae7fe93cd31a0e27cfda999a453a0ca8aa075a5656bca021b2f | xh4/web-toolkit | make-qbook.lisp | (asdf:oos 'asdf:load-op :FiveAM)
(asdf:oos 'asdf:load-op :qbook)
(asdf:oos 'qbook:publish-op :FiveAM
:generator (make-instance 'qbook:html-generator
:title "FiveAM"
:output-directory
(merge-pathnames
... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/fiveam-v1.4.1/docs/make-qbook.lisp | lisp | (asdf:oos 'asdf:load-op :FiveAM)
(asdf:oos 'asdf:load-op :qbook)
(asdf:oos 'qbook:publish-op :FiveAM
:generator (make-instance 'qbook:html-generator
:title "FiveAM"
:output-directory
(merge-pathnames
... | |
0de71c530a85deffd87eba29428d354fbae84e0b43f5d486b55bb0080a8457b3 | cljfx/cljfx | platform.clj | (ns cljfx.jdk.platform
(:import [javafx.embed.swing JFXPanel]
[javafx.application Platform]))
(defn initialize []
(JFXPanel.)
(Platform/setImplicitExit false)
:cljfx.platform/initialized)
| null | https://raw.githubusercontent.com/cljfx/cljfx/ec3c34e619b2408026b9f2e2ff8665bebf70bf56/jdk8/cljfx/jdk/platform.clj | clojure | (ns cljfx.jdk.platform
(:import [javafx.embed.swing JFXPanel]
[javafx.application Platform]))
(defn initialize []
(JFXPanel.)
(Platform/setImplicitExit false)
:cljfx.platform/initialized)
| |
c6d507eeaab25c699aec398df912007fb67cdc0f87a2f0c6b3d4c53eea85fbea | uim/uim | predict-look-skk.scm | predict-look-skk.scm : predicion using look with SKK - JISYO
;;;
Copyright ( c ) 2009 - 2013 uim Project
;;;
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
1 . Redistributions ... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/predict-look-skk.scm | scheme |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
documen... | predict-look-skk.scm : predicion using look with SKK - JISYO
Copyright ( c ) 2009 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THI... |
6673b1c03e249b12822b1b6cef1d2ca5bf069d9f25388c91533c3d2d8dec9211 | polymeris/cljs-aws | cloudtrail.cljs | (ns cljs-aws.cloudtrail
(:require [cljs-aws.base.requests])
(:require-macros [cljs-aws.base.service :refer [defservice]]))
(defservice "CloudTrail" "cloudtrail-2013-11-01.min.json")
| null | https://raw.githubusercontent.com/polymeris/cljs-aws/3326e7c4db4dfc36dcb80770610c14c8a7fd0d66/src/cljs_aws/cloudtrail.cljs | clojure | (ns cljs-aws.cloudtrail
(:require [cljs-aws.base.requests])
(:require-macros [cljs-aws.base.service :refer [defservice]]))
(defservice "CloudTrail" "cloudtrail-2013-11-01.min.json")
| |
f07a3ee99b57c3168d2947d6739e57135561d3944bbe474b0fcc0b2e42a3b752 | tezos/tezos-mirror | seq_s.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/448daee0f4ae76893ae524536e428aa0e22f1d60/src/lib_lwt_result_stdlib/bare/structs/seq_s.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
99e51bf533fa66a2bf70e6ff4527469dd57bccc6056d681465c02f78cd2ba727 | sdiehl/llvm-codegen | Comparison.hs | module LLVM.Codegen.Comparison (
ult,
ugt,
ueq,
une,
ule,
uge,
slt,
sgt,
seq,
sne,
sle,
sge,
flt,
fgt,
feq,
fne,
fle,
fge
) where
import Prelude hiding (seq)
import LLVM.Codegen.Builder
import LLVM.Codegen.Instructions
import LLVM.General.AST (Operand(..))
import qualified LLVM.G... | null | https://raw.githubusercontent.com/sdiehl/llvm-codegen/6a88ecb4bc5af53491e5013d6a61181a2eeb41df/src/LLVM/Codegen/Comparison.hs | haskell | ------- -------- --------
------- -------- -------- | module LLVM.Codegen.Comparison (
ult,
ugt,
ueq,
une,
ule,
uge,
slt,
sgt,
seq,
sne,
sle,
sge,
flt,
fgt,
feq,
fne,
fle,
fge
) where
import Prelude hiding (seq)
import LLVM.Codegen.Builder
import LLVM.Codegen.Instructions
import LLVM.General.AST (Operand(..))
import qualified LLVM.G... |
4017feec73cc84e49acb4d99e7e9350144d69f69769941ce75efd11bd4305770 | grin-compiler/ghc-wpc-sample-programs | Lang.hs | |
Module : IRTS.Lang
Description : Internal representation of ' constructs .
License : : The Idris Community .
Module : IRTS.Lang
Description : Internal representation of Idris' constructs.
License : BSD3
Maintainer : The Idris Community.
-}
# LANGUAGE DeriveDataTypeable , DeriveFun... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/src/IRTS/Lang.hs | haskell | ASSUMPTION: All variable bindings have unique names here
Constructors commented as lifted are not present in the LIR provided to the different backends.
True = tail call
True = tail call
lifted out before compiling
make sure Exp is evaluted
name just for pretty printing
lambda, lifted out before compiling
proj... | |
Module : IRTS.Lang
Description : Internal representation of ' constructs .
License : : The Idris Community .
Module : IRTS.Lang
Description : Internal representation of Idris' constructs.
License : BSD3
Maintainer : The Idris Community.
-}
# LANGUAGE DeriveDataTypeable , DeriveFun... |
d9a27f88f32f085a1db50a7c9c446d66884126d534192671ba58272ffdd0716b | rtoy/ansi-cl-tests | format-conditional.lsp | ;-*- Mode: Lisp -*-
Author :
Created : We d Aug 25 19:27:25 2004
;;;; Contains: Tests of the ~[ ~] forms
(in-package :cl-test)
(compile-and-load "printer-aux.lsp")
(def-format-test format.cond.1
"~[~]" (0) "")
(def-format-test format.cond.2
"~[a~]" (0) "a")
(def-format-test format.cond.3
"~[a~... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/format-conditional.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of the ~[ ~] forms
~[ .~:; ~]
~:[...~]
~@[ ... ~] | Author :
Created : We d Aug 25 19:27:25 2004
(in-package :cl-test)
(compile-and-load "printer-aux.lsp")
(def-format-test format.cond.1
"~[~]" (0) "")
(def-format-test format.cond.2
"~[a~]" (0) "a")
(def-format-test format.cond.3
"~[a~]" (-1) "")
(def-format-test format.cond.4
"~[a~]" ((1- most-... |
25f2e0643393e0b5afc883d71cdc700a3ba4ec3f3c9a57f6ccdb8f07b7601e58 | parsonsmatt/scotty-persistent-example | Main.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Applicative (Applicative)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad.Trans.Reader (ReaderT, r... | null | https://raw.githubusercontent.com/parsonsmatt/scotty-persistent-example/7c7059eca991c994f7c8e237ef8af36d5aa8dd3e/Main.hs | haskell | # LANGUAGE OverloadedStrings #
delete janeId | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
module Main where
import Control.Applicative (Applicative)
import Control.Monad.IO.Class (MonadIO, liftIO)
import Control.Monad.Trans.Reader (ReaderT, runReaderT)
import Control.Monad.Tr... |
5dde905b9559ae9bb700347e0c147f62154c854b16675c814750d47f033b0706 | unclebob/AdventOfCode2022 | project.clj | (defproject day7-no-space-left-on-device "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:main day7-no-space-left-on-device.core
:dependencies [[org.clojure/clojure "1.8.0"]]
:profiles {:dev {:dependencies [[speclj "3.3.... | null | https://raw.githubusercontent.com/unclebob/AdventOfCode2022/f1d7bd75822606317ba60813bb7956cba0fcc36c/day7-no-space-left-on-device/project.clj | clojure | (defproject day7-no-space-left-on-device "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:main day7-no-space-left-on-device.core
:dependencies [[org.clojure/clojure "1.8.0"]]
:profiles {:dev {:dependencies [[speclj "3.3.... | |
8dcd54193f35788425996ae8d4a85795414f3002eed8667a951bac2487296165 | eeng/shevek | http_druid.clj | (ns shevek.driver.http-druid
(:require [shevek.driver.druid :refer [DruidDriver datasources]]
[clj-http.client :as http]
[cheshire.core :refer [parse-string generate-string]]
[shevek.lib.logging :refer [benchmark]]))
(defn- request [method-fn uri opts]
(try
(:body (method-fn... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/clj/shevek/driver/http_druid.clj | clojure | (ns shevek.driver.http-druid
(:require [shevek.driver.druid :refer [DruidDriver datasources]]
[clj-http.client :as http]
[cheshire.core :refer [parse-string generate-string]]
[shevek.lib.logging :refer [benchmark]]))
(defn- request [method-fn uri opts]
(try
(:body (method-fn... | |
2754de5d398e21c47e1ea5dc835301f9f90b7f1e296fa759474c290902da85ae | well-typed/recover-rtti | Size.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GADTs #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module Test.RecoverRTTI.Classifier.Size (classifierSize_) where
import Data.SOP
import Debug.RecoverRTTI
{---------------------------------------------------------------------... | null | https://raw.githubusercontent.com/well-typed/recover-rtti/57c45f9352cda7e385ef9b4c525dbd7b9f979e32/tests/Test/RecoverRTTI/Classifier/Size.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
------------------------------------------------------------------------------
Size
------------------------------------------------------------------------------ | # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
module Test.RecoverRTTI.Classifier.Size (classifierSize_) where
import Data.SOP
import Debug.RecoverRTTI
classifierSize_ :: forall o.
(forall a. o a -> Int)
-> (forall a. Classifier_ o a -> Int)
classifierSize_ sizeOther = go
where
g... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.