_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
4a3c70173e8377321b8864328886eeca797d024d5287b890c69f61f041220527
smudgelang/smudge
Basis.hs
Copyright 2018 Bose Corporation . -- This software is released under the 3-Clause BSD License. -- The license can be viewed at module Language.Smudge.Semantics.Basis ( basisAlias, bindBasis, ) where import Language.Smudge.Semantics.Solver ( SymbolTable, Binding(..), insertFunctions, ) import Langua...
null
https://raw.githubusercontent.com/smudgelang/smudge/c4f4fc3c7e6344fb0dd39d4679752120c7ff83da/src/Language/Smudge/Semantics/Basis.hs
haskell
This software is released under the 3-Clause BSD License. The license can be viewed at add more here a horrible kludge add more sm-specific exports here add more sm-specific externals here add more smudge-wide externals here
Copyright 2018 Bose Corporation . module Language.Smudge.Semantics.Basis ( basisAlias, bindBasis, ) where import Language.Smudge.Semantics.Solver ( SymbolTable, Binding(..), insertFunctions, ) import Language.Smudge.Semantics.Model ( QualifiedName, qualify, TaggedName, Tagged(..), ) import...
333afe04cf5e1b6e068908dd46eff4db41f47fe8825d56b5811882382bd6b199
jeapostrophe/opencl
5-5.rkt
#lang at-exp racket/base (require ffi/unsafe ffi/unsafe/cvector (except-in racket/contract ->) (prefix-in c: racket/contract) scribble/srcdoc "include/cl.rkt" "lib.rkt" "syntax.rkt" "types.rkt") (require/doc racket/base scribble/manu...
null
https://raw.githubusercontent.com/jeapostrophe/opencl/f984050b0c02beb6df186d1d531c4a92a98df1a1/opencl/c/5-5.rkt
racket
clCreateKernelsInProgram XXX Make sure this is complete clGetKernelInfo clGetKernelWorkGroupInfo
#lang at-exp racket/base (require ffi/unsafe ffi/unsafe/cvector (except-in racket/contract ->) (prefix-in c: racket/contract) scribble/srcdoc "include/cl.rkt" "lib.rkt" "syntax.rkt" "types.rkt") (require/doc racket/base scribble/manu...
bfe32bac049b597e812ff916c90b399fc13ab35fc0c9844862a1b2b7fcfb06e2
flavioc/cl-hurd
demuxer.lisp
(in-package :hurd) ;; Defines a new internal demuxer port the portset-demuxer. (defcfun ("set_demuxer" %set-demuxer) :void (fun :pointer)) (defcfun ("portset_demuxer" %portset-demuxer) :int (in :pointer) (out :pointer)) (defmacro set-demuxer (fun) "Defines fun as the internal demuxer for portset-demuxer...
null
https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/hurd/ports/demuxer.lisp
lisp
Defines a new internal demuxer port the portset-demuxer.
(in-package :hurd) (defcfun ("set_demuxer" %set-demuxer) :void (fun :pointer)) (defcfun ("portset_demuxer" %portset-demuxer) :int (in :pointer) (out :pointer)) (defmacro set-demuxer (fun) "Defines fun as the internal demuxer for portset-demuxer." (with-gensyms (callback-name) `(progn (defca...
a167efd26ef65407b7fab9e6c519cb0e48d4c771b00a617f9a07fd46d4c4e3fa
wireapp/wire-server
V69_MLSProposal.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/5e91e50aa6f405cb6fbee05f9122e0f79e796658/services/galley/schema/src/V69_MLSProposal.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module V69_MLSProposal ( migra...
b700acfbbf87c6f6da4de5fd37b7b6c5757969404f8c2c7d5ce50aa8a94ab2d5
namin/logically
re_test.clj
(ns logically.nominal.re_test (:use [logically.nominal.re] :reload) (:refer-clojure :exclude [==]) (:use [clojure.core.logic :exclude [is] :as l] [clojure.core.logic.nominal :exclude [fresh hash] :as nom]) (:use [clojure.test])) (deftest test-nfa-1 (is (= (run* [q] (fresh [fa] ...
null
https://raw.githubusercontent.com/namin/logically/49e814e04ff0f5f20efa75122c0b869e400487ac/test/logically/nominal/re_test.clj
clojure
(ns logically.nominal.re_test (:use [logically.nominal.re] :reload) (:refer-clojure :exclude [==]) (:use [clojure.core.logic :exclude [is] :as l] [clojure.core.logic.nominal :exclude [fresh hash] :as nom]) (:use [clojure.test])) (deftest test-nfa-1 (is (= (run* [q] (fresh [fa] ...
039724c4f2d43f6a07aa0e79554c81e5ba59d5945ee91289e2d6381b383ebdd2
huangz1990/SICP-answers
83-install-real-package.scm
;;; 83-install-real-package.scm (load "p123-put-and-get.scm") (load "p119-attach-tag-and-type-tag-and-contents.scm") (define (install-real-package) (define (tag x) (attach-tag 'real x)) (put 'make 'real (lambda (n) (tag (exact->inexact n)))) ; 提升函数 (define (real->co...
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/old_chp2/code/83-install-real-package.scm
scheme
83-install-real-package.scm 提升函数
(load "p123-put-and-get.scm") (load "p119-attach-tag-and-type-tag-and-contents.scm") (define (install-real-package) (define (tag x) (attach-tag 'real x)) (put 'make 'real (lambda (n) (tag (exact->inexact n)))) (define (real->complex r) (make-complex r 0)) (...
672b44c2884323bbb22b071fb2ee2f407040b51f811b1836254904160e2f3062
aligusnet/mltool
Types.hs
| Module : MachineLearning . Types Description : Common Types Copyright : ( c ) , 2016 License : BSD-3 Stability : experimental Portability : POSIX Common type definitions used in all modules . Module: MachineLearning.Types Description: Common Types Copyright: (c) Alexander Ignatyev, 2016 License: BS...
null
https://raw.githubusercontent.com/aligusnet/mltool/92d74c4cc79221bfdcfb76aa058a2e8992ecfe2b/src/MachineLearning/Types.hs
haskell
| Scalar Type (Double) | Vector Types (of Doubles) | Matrix Types (of Doubles)
| Module : MachineLearning . Types Description : Common Types Copyright : ( c ) , 2016 License : BSD-3 Stability : experimental Portability : POSIX Common type definitions used in all modules . Module: MachineLearning.Types Description: Common Types Copyright: (c) Alexander Ignatyev, 2016 License: BS...
2ece4e64efe1b78c1ea1dcfc8a5bd91530dc36bcaa848b79b2f92020e63d51e3
abcdw/rde
utils.scm
;;; rde --- Reproducible development environment. ;;; Copyright © 2022 < > ;;; ;;; This file is part of rde. ;;; ;;; rde is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the License , ...
null
https://raw.githubusercontent.com/abcdw/rde/5b8605f421d0b8a9569e43cb6f7e651e7a8f7218/src/rde/serializers/utils.scm
scheme
rde --- Reproducible development environment. This file is part of rde. rde is free software; you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. rde is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the im...
Copyright © 2022 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License (define-module (rde serializers utils) #:use-module (gnu services configuration) #:use-module (guix gexp) #:use-module (srfi srfi-1) #:export (alist...
b9c7b271fee1f93e241969aa1f866b8b6f65cbe7d47ff8213ebe28eb0c686531
iskandr/parakeet-retired
lexer.ml
let rec lex = parser (* Skip any whitespace. *) | [< ' (' ' | '\n' | '\r' | '\t'); stream >] -> lex stream (* identifier: [a-zA-Z][a-zA-Z0-9] *) | [< ' ('A' .. 'Z' | 'a' .. 'z' as c); stream >] -> let buffer = Buffer.create 1 in Buffer.add_char buffer c; lex_ident buffer stream (* number: ...
null
https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/LLVM/toy/lexer.ml
ocaml
Skip any whitespace. identifier: [a-zA-Z][a-zA-Z0-9] number: [0-9.]+ Comment until end of line. Otherwise, just return the character as its ascii value. end of stream.
let rec lex = parser | [< ' (' ' | '\n' | '\r' | '\t'); stream >] -> lex stream | [< ' ('A' .. 'Z' | 'a' .. 'z' as c); stream >] -> let buffer = Buffer.create 1 in Buffer.add_char buffer c; lex_ident buffer stream | [< ' ('0' .. '9' as c); stream >] -> let buffer = Buffer.create 1 in ...
bd09607f2cf8bb2685931fa6210d4fd21b8b75ccb4918a42537257a88484dbc5
pashatsyganenko/main
07042021.ml
Задача 3 let n = 5 ;; (* n-ое число Фибоначчи *) let rec fib n f1 f2 = if n=0 then f1 else fib (n-1) f2 (f1+f2) ;; итоговое количество последовательностей let c = fib (n+1) 1 1 ;; Задача 4 ищем n let (n,k) = (5,5) ;; массив , где на пересечении i - ого столбца и j - ой строки стоит i+1 let m =...
null
https://raw.githubusercontent.com/pashatsyganenko/main/9335d78c870674a96e59c51dc3872f2f7f7f6f10/2021-10/07042021.ml
ocaml
n-ое число Фибоначчи находим все возрастающие последовательности находим самую длинную итоговая последовательность
Задача 3 let n = 5 ;; let rec fib n f1 f2 = if n=0 then f1 else fib (n-1) f2 (f1+f2) ;; итоговое количество последовательностей let c = fib (n+1) 1 1 ;; Задача 4 ищем n let (n,k) = (5,5) ;; массив , где на пересечении i - ого столбца и j - ой строки стоит i+1 let m = ref (List.init k (fun i ->...
e86f7a15c6cfb70d5b97501217dca75112bc14de5c1c93ffb68661a1f057c60f
aigarashi/copl-tools
pp.ml
open Format open Core let g = "EvalNatExp" let pr = fprintf let (<) e1 e2 = match e1, e2 with P(_,_), M(_,_) -> true | _ -> false let with_paren ppf_e e_up ppf e = if e < e_up then pr ppf "(%a)" ppf_e e else pr ppf "%a" ppf_e e let rec print_nat ppf = function Z -> pr ppf "Z" | S n -> pr ppf "S(%a)"...
null
https://raw.githubusercontent.com/aigarashi/copl-tools/3c4da117083a0870334c8eef270206b11060514e/checker/EvalNatExp/pp.ml
ocaml
open Format open Core let g = "EvalNatExp" let pr = fprintf let (<) e1 e2 = match e1, e2 with P(_,_), M(_,_) -> true | _ -> false let with_paren ppf_e e_up ppf e = if e < e_up then pr ppf "(%a)" ppf_e e else pr ppf "%a" ppf_e e let rec print_nat ppf = function Z -> pr ppf "Z" | S n -> pr ppf "S(%a)"...
a808f006ad274e11308d7ad36c5ee307b9d63fc26d4a55b35e03e62842cf2ae5
byteverse/byteslice
AsciiExt.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE LambdaCase # {-# LANGUAGE RankNTypes #-} -- | This module contains functions which operate on supersets of 'Bytes' containing ASCII-encoded text. That is , none of the functions here inspect bytes with a value greater than 127 , and do not fail due to the presence of such byt...
null
https://raw.githubusercontent.com/byteverse/byteslice/39967fe24e8772589ed192f51c82840df41948c7/src/Data/Bytes/Text/AsciiExt.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE RankNTypes # | This module contains functions which operate on supersets of 'Bytes' containing ASCII-encoded text. For functions that can fail for bytes outside the ASCII range, see any of the modules for ASCII-compatible encodings (e.g. 'Data.Bytes.Utf8', * Line-Oriented IO **...
# LANGUAGE LambdaCase # That is , none of the functions here inspect bytes with a value greater than 127 , and do not fail due to the presence of such bytes . ' Data . Bytes . Ascii ' . For functions that can inspect bytes outside ASCII , see ' Data . Bytes . Latin1 ' , and so on ) . module Data.Bytes.Text.Asci...
087cbd6ee905a9683a7e7db02a1b935f9ce3c0f1364729b4a763f1902438db9c
anuyts/menkar
Unscoper.hs
module Menkar.Fine.Unscoper where import Menkar.Fine.Syntax import Menkar.Fine.Context import Menkar.Fine.Substitution import qualified Menkar.Raw as Raw import Data.Void class Unscopable f r where unscope :: ScCtx mode modty v void -> f v -> r class Unscopable f r => Rescopable f r | f -> r where unscope' :: Sc...
null
https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/obsolete/Menkar/Fine/Unscoper.hs
haskell
TODO: explicitly print context? Or not? ------------------------------------------ ------------------------------------------ show binding show typeterm show constructorterm show smarteliminator show eliminator show type show termnv
module Menkar.Fine.Unscoper where import Menkar.Fine.Syntax import Menkar.Fine.Context import Menkar.Fine.Substitution import qualified Menkar.Raw as Raw import Data.Void class Unscopable f r where unscope :: ScCtx mode modty v void -> f v -> r class Unscopable f r => Rescopable f r | f -> r where unscope' :: Sc...
80f0798d7aa0f0c944b5dc14513a1fbe038f8d296f59e1d576a34320577ea60f
rescript-lang/rescript-compiler
js_dict.mli
Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P. * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later...
null
https://raw.githubusercontent.com/rescript-lang/rescript-compiler/c3fcc430360079546a6aabd2b2770303480f8486/jscomp/others/js_dict.mli
ocaml
* Dictionary type (ie an '{ }' JS object). However it is restricted to hold a single type; therefore values must have the same type. This Dictionary type is mostly used with the Js_json.t type. * The type for dictionary keys. This means that dictionaries *must* use `string`s as their keys. * Returns an empty dictiona...
Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P. * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) any later...
377c88535aa4c5738e619b45b0763d1ed7dd0446714e22845df14c2dd41e0eef
gergoerdi/tandoori
Internals.hs
module Tandoori.GHC.Internals (module SrcLoc, module Outputable, module Name, module BasicTypes, module Unique, module FastString, module HsExpr, module HsTypes, module HsPat, module HsLit, module HsBinds, module DataCon, module TysWiredIn, mo...
null
https://raw.githubusercontent.com/gergoerdi/tandoori/515142ce76b96efa75d7044c9077d85394585556/src/Tandoori/GHC/Internals.hs
haskell
module Tandoori.GHC.Internals (module SrcLoc, module Outputable, module Name, module BasicTypes, module Unique, module FastString, module HsExpr, module HsTypes, module HsPat, module HsLit, module HsBinds, module DataCon, module TysWiredIn, mo...
f0c3dacc5b786938919150612f4e2bb1f26c0a82cc84071bd3a31c5e168b3e6c
uw-unsat/serval
lang.rkt
#lang racket/base ( require ffi / unsafe ; ffi/unsafe/alloc ; racket/port ; racket/sequence ; syntax/strip-context ; "capi/core.rkt" ; "util.rkt") ( provide # % module - begin # % datum # % top - interaction # % app define quote ) ( define ( - read - syntax path p...
null
https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/serval/llvm/lang.rkt
racket
ffi/unsafe/alloc racket/port racket/sequence syntax/strip-context "capi/core.rkt" "util.rkt") (define m (bytes->module (context) (port->bytes port))) (strip-context (quasisyntax #,@fns )))) (provide (rename-out [llvm-read-syntax read-synt...
#lang racket/base ( require ffi / unsafe ( provide # % module - begin # % datum # % top - interaction # % app define quote ) ( define ( - read - syntax path port ) ( define fns ( for / list ( [ f ( in - functions m ) ] ) ( read - function f ) ) ) ( module anything serval / llvm / lang ( def...
eea9140d2983d99d3c65bfdd2699494d4961e142b096dad2afd24e636739346f
project-oak/hafnium-verification
bufferOverrunTypModels.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/bufferoverrun/bufferOverrunTypModels.mli
ocaml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
41a9128184263dab7398e7e61ea0b3990efddba1a0b04ac3bc3b2ce91815f824
LambdaCon/2015
hackney_manager.erl
%%% -*- erlang -*- %%% This file is part of hackney released under the Apache 2 license . %%% See the NOTICE for more information. -module(hackney_manager). -behaviour(gen_server). -export([new_request/1, start_async_response/1, stop_async_response/1, cancel_request/1, close_req...
null
https://raw.githubusercontent.com/LambdaCon/2015/0149877454b88815b9fcb9cba8ffd9b37c149026/Elixir%20love%20at%20first%20sip/src/demos/currencies_skeleton/deps/hackney/src/hackney_client/hackney_manager.erl
erlang
-*- erlang -*- See the NOTICE for more information. private gen_server api initialize the request store the current state in the process dictionnary supervise the process owner only the owner can cancel the request remove the request stop to monitor the request return the latest state remove the request st...
This file is part of hackney released under the Apache 2 license . -module(hackney_manager). -behaviour(gen_server). -export([new_request/1, start_async_response/1, stop_async_response/1, cancel_request/1, close_request/1, controlling_process/2]). -export([get_state/1,...
a649223d5868727d20672b2ce347b9ea3d764a4892ff0982f833f6b8109a3956
Sophia-Gold/madhava
diff.clj
(ns madhava.diff (:require [madhava.arithmetic :refer :all] [madhava.util :refer :all] [clojure.core :as cc] [clojure.core.reducers :as r] [clojure.data.int-map :as i] [clojure.pprint :refer [pprint]] [com.rpl.specter :refer :all] [p...
null
https://raw.githubusercontent.com/Sophia-Gold/madhava/f780c8fe342c79877ccd03ceac525d12d85b10e7/src/madhava/diff.clj
clojure
(ns madhava.diff (:require [madhava.arithmetic :refer :all] [madhava.util :refer :all] [clojure.core :as cc] [clojure.core.reducers :as r] [clojure.data.int-map :as i] [clojure.pprint :refer [pprint]] [com.rpl.specter :refer :all] [p...
19768272c0976a156bbd4c85183b47bc1ad0063a3ed1db022143bbcec3d18537
contivero/hasmin
Stylesheet.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleInstances # ----------------------------------------------------------------------------- -- | -- Module : Hasmin.Types.Stylesheet Copyright : ( c ) 2017 -- License : BSD3 -- Stability : experimental -- Portability : unknown -- -------------------...
null
https://raw.githubusercontent.com/contivero/hasmin/2a7604159b51e69c5e9c564dce53cb3ab09ae22b/src/Hasmin/Types/Stylesheet.hs
haskell
# LANGUAGE OverloadedStrings # --------------------------------------------------------------------------- | Module : Hasmin.Types.Stylesheet License : BSD3 Stability : experimental Portability : unknown --------------------------------------------------------------------------- | Data type for media ...
# LANGUAGE FlexibleInstances # Copyright : ( c ) 2017 module Hasmin.Types.Stylesheet ( Expression(..) , MediaQuery(..) , Rule(..) , KeyframeSelector(..) , KeyframeBlock(..) , SupportsCondition(..) , SupportsCondInParens(..) , minifyRules , collapse , mergeRules ) wher...
1c3931b8f6148f222fc81c8c92cda48ceb34a60638bfadbd6814142b23ba28ef
dkim/rwo-lwt
rwoLwt.ml
* Concurrent Programming with Lwt * * Written in 2017 by * * To the extent possible under law , the author(s ) have dedicated all copyright * and related and neighboring rights to this software to the public domain * worldwide . This software is distributed without any warranty . * * You sh...
null
https://raw.githubusercontent.com/dkim/rwo-lwt/be84a8802fd404092963aa811d6168723cdf9d58/src/rwoLwt.ml
ocaml
Ivars and Upon Example: An Echo Server Improving the Echo Server Example: Searching Definitions with DuckDuckGo URI Handling Parsing JSON Strings Executing an HTTP Client Query let search_and_print (words : string list) : unit Lwt.t = Lwt_list.iter_p (fun word -> let%lwt result = get_definit...
* Concurrent Programming with Lwt * * Written in 2017 by * * To the extent possible under law , the author(s ) have dedicated all copyright * and related and neighboring rights to this software to the public domain * worldwide . This software is distributed without any warranty . * * You sh...
e732299d51141515c4a6787ff79feaa023f74c39804358a0e298c4eb1403bc85
julian-baldwin/parachute-browser
browser.lisp
(in-package #:parachute-browser) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Test Browser (define-interface test-browser (parachute-window lispworks-tools:lispworks-interface) () (:panes (test-tree extended-selection-tree-view :reader bro...
null
https://raw.githubusercontent.com/julian-baldwin/parachute-browser/564bc6789d39eabaf16f132d1171721cab5ef03b/browser.lisp
lisp
Test Browser Tree Callbacks
(in-package #:parachute-browser) (define-interface test-browser (parachute-window lispworks-tools:lispworks-interface) () (:panes (test-tree extended-selection-tree-view :reader browser-tree :roots (parachute:test-packages) :children-function 'browser-tree-children ...
736e2caa992afb8e84f83d96bd305ddf61d31e5862ae57965abb1d1d88b2144f
BoeingX/haskell-programming-from-first-principles
GimmePerson.hs
module BuildingProjects.ChapterExercises.ModifyingCode.GimmePerson where import System.IO type Name = String type Age = Integer data Person = Person Name Age deriving Show data PersonInvalid = NameEmpty | AgeTooLow | PersonInvalidUnknown String deriving (Eq, Sh...
null
https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/src/BuildingProjects/ChapterExercises/ModifyingCode/GimmePerson.hs
haskell
module BuildingProjects.ChapterExercises.ModifyingCode.GimmePerson where import System.IO type Name = String type Age = Integer data Person = Person Name Age deriving Show data PersonInvalid = NameEmpty | AgeTooLow | PersonInvalidUnknown String deriving (Eq, Sh...
1596ae4620123d3318881dcc9682af258be8364869b2628f1f611857d33db800
ekmett/ekmett.github.com
Monad.hs
------------------------------------------------------------------------------------------- -- | -- Module : Control.Category.Monad Copyright : 2008 -- License : BSD-style (see the LICENSE file in the distribution) -- Maintainer : < > -- Stability : experimental -- Portability : non-portable (class-associa...
null
https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/categories/src/Control/Category/Monad.hs
haskell
----------------------------------------------------------------------------------------- | Module : Control.Category.Monad License : BSD-style (see the LICENSE file in the distribution) Stability : experimental Portability : non-portable (class-associated types) other categories than just the category of types...
Copyright : 2008 Maintainer : < > Defines ' Monad ' and in a way that allows it to represent a ( co)monad over module Control.Category.Monad ( Monad (bind, join) , mapMonad , (=<<), (>>=), (<<), (>>) ) where import Prelude hiding (Functor, map, (.), id, Monad, return, (>>=),(=<<),(>>)) impo...
27f472854ad1ecb890337c36b0437f36135bf83dad246b4b1c703bf1d11df94e
generateme/fastmath
gp_examples.clj
(ns fastmath.gp-examples (:require [fastmath.gp :refer :all] [metadoc.examples :refer :all] [fastmath.kernel :as k])) (add-examples gaussian-process (example-session "Object creation" (gaussian-process [1 2 3] [-1 2 1]) (gaussian-process [1 2 3] [-1 2 1] {:normalize? true ...
null
https://raw.githubusercontent.com/generateme/fastmath/2eb38baffe73077bab331a20449d9d7596af7059/metadoc/fastmath/gp_examples.clj
clojure
(ns fastmath.gp-examples (:require [fastmath.gp :refer :all] [metadoc.examples :refer :all] [fastmath.kernel :as k])) (add-examples gaussian-process (example-session "Object creation" (gaussian-process [1 2 3] [-1 2 1]) (gaussian-process [1 2 3] [-1 2 1] {:normalize? true ...
d8e829982e129509cd2e66a6d2a4fc39c85fccaa61585a4af7ba79329fcb33ac
oxidizing/sihl
database_migration.ml
module Map = Map.Make (String) let clean_state () = (* Clean database state, all tests create either of these tables *) Sihl.Database.query (fun (module Connection : Caqti_lwt.CONNECTION) -> let open Lwt_result.Syntax in let open Caqti_request.Infix in let* () = "DROP TABLE IF EXISTS test_core_mi...
null
https://raw.githubusercontent.com/oxidizing/sihl/547e2b51fa59f5f64665c452792cd7fd0aca072b/sihl/test/database_migration.ml
ocaml
Clean database state, all tests create either of these tables Use test migration state table to not interfere with other tests If this doesn't fail, test is ok Use test migration state table to not interfere with other tests
module Map = Map.Make (String) let clean_state () = Sihl.Database.query (fun (module Connection : Caqti_lwt.CONNECTION) -> let open Lwt_result.Syntax in let open Caqti_request.Infix in let* () = "DROP TABLE IF EXISTS test_core_migration_state" |> Caqti_type.(unit ->. unit) |> CCFun.flip...
8b0ae8070982f5c307f0c0297ae528e9fa186be27ebc5dbed0ac918fa273791a
bloomberg/blpapi-hs
ElementFormatter.hs
| Module : Finance . Blpapi . ElementFormatter Description : Format Requests Copyright : Bloomberg Finance L.P. License : MIT Maintainer : Stability : experimental Portability : * nix , windows This module provides an easy ( Monadic ) way for generating a Request ( Element ) . The...
null
https://raw.githubusercontent.com/bloomberg/blpapi-hs/a4bdff86f3febcf8b06cbc70466c8abc177b973a/src/Finance/Blpapi/ElementFormatter.hs
haskell
| The State for the ElementFormatter 'StateT' that is compatible with the schema | Strong type that represents an 'Element' that is only writable | The monad instance fail = formatterFail -- Lets Throw right now s is a StateT | The 'MonadIO' instance | Return the underlying modifiable Element | Set the specifie...
| Module : Finance . Blpapi . ElementFormatter Description : Format Requests Copyright : Bloomberg Finance L.P. License : MIT Maintainer : Stability : experimental Portability : * nix , windows This module provides an easy ( Monadic ) way for generating a Request ( Element ) . The...
d260e547c8bc509ad6db05c1ec9679247caea513b2cc4c02a6ab7d26463cb271
synduce/Synduce
contains.ml
let xi_0 = 0 let xi_1 x17 x18 = x18 = x17 ? 1 : 0 let xi_2 x19 x20 x21 = x19 = x20 ? 1 : x21 let rec g = function Nil(a) -> xi_0 | Leaf(a) -> xi_1 x a | Node(a, l, r) -> xi_2 x a (g l)
null
https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/extras/solutions/constraints/empty_right_subtree/contains.ml
ocaml
let xi_0 = 0 let xi_1 x17 x18 = x18 = x17 ? 1 : 0 let xi_2 x19 x20 x21 = x19 = x20 ? 1 : x21 let rec g = function Nil(a) -> xi_0 | Leaf(a) -> xi_1 x a | Node(a, l, r) -> xi_2 x a (g l)
3ee573a4413beb3f4aba7fe25679cf99d61e233f4f03297a68dc2048681119ca
jaredly/reason-language-server
printlambda.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/407/printlambda.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Format open Asttypes open Primitive open Types open Lambda let rec struct_const ppf = function |...
3cf409a9ec03f0e32d08eb6f553e174a91c20de5430e7becf3bac6166bdb5b14
jahfer/clj-activitypub
http_util.clj
(ns ^:no-doc clj-activitypub.internal.http-util (:require [clj-activitypub.internal.crypto :as crypto]) (:import (java.net URLEncoder) (java.time OffsetDateTime ZoneOffset) (java.time.format DateTimeFormatter))) (def GET-config {:as :json :throw-exceptions true :ignore-unknown-host? f...
null
https://raw.githubusercontent.com/jahfer/clj-activitypub/c3a27d57d9902148ad087ceb60d10f75d241cf1c/activitypub-core/src/clj_activitypub/internal/http_util.clj
clojure
(ns ^:no-doc clj-activitypub.internal.http-util (:require [clj-activitypub.internal.crypto :as crypto]) (:import (java.net URLEncoder) (java.time OffsetDateTime ZoneOffset) (java.time.format DateTimeFormatter))) (def GET-config {:as :json :throw-exceptions true :ignore-unknown-host? f...
3b6735c57b55ec00651e233c30a657047ad53c4a2574538fcc832494defb9b38
CryptoKami/cryptokami-core
Mode.hs
# LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Pos.Web.Mode ( WebMode , WebModeContext(..) ) where import Universum import Control.Lens (makeLensesWith) import qualified Control.Monad.Reader as Mtl import Mockable (Production) import Pos.Context (Ha...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lib/src/Pos/Web/Mode.hs
haskell
# OVERLAPPABLE #
# LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Pos.Web.Mode ( WebMode , WebModeContext(..) ) where import Universum import Control.Lens (makeLensesWith) import qualified Control.Monad.Reader as Mtl import Mockable (Production) import Pos.Context (Ha...
555e8dfb5c5bf96edf3d8d5000c267c0cf873687e1f37d5fd7a4ab12c07f4f0f
skypher/blackthorn
property.lisp
Blackthorn -- Lisp Game Engine ;;;; Copyright ( c ) 2007 - 2011 , < > ;;;; ;;;; Permission is hereby granted, free of charge, to any person ;;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;;;; restriction, including without limita...
null
https://raw.githubusercontent.com/skypher/blackthorn/914b38a95f1d192219f197e4b4a77b1632daa94b/property.lisp
lisp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do so, subject to the following conditions:...
Blackthorn -- Lisp Game Engine Copyright ( c ) 2007 - 2011 , < > files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRA...
eab9795b795989bea1336b3b3ee95601db0ff97cdd1491bc135879e49c321e72
lambdaisland/thirdpartyjs
project.clj
(defproject thirdpartyjs "0.1.0-SNAPSHOT" :license {:name "Mozilla Public License 2.0" :url "-US/MPL/2.0/"} :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.9.229"]] :source-paths ["src/clj"] :plugins [[lein-cljsbuild "1.1.4"]] :clean-targets ^{:protect false} [:...
null
https://raw.githubusercontent.com/lambdaisland/thirdpartyjs/3497063a4ea9e7c972e2780ff406fb1c556c701f/project.clj
clojure
(defproject thirdpartyjs "0.1.0-SNAPSHOT" :license {:name "Mozilla Public License 2.0" :url "-US/MPL/2.0/"} :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/clojurescript "1.9.229"]] :source-paths ["src/clj"] :plugins [[lein-cljsbuild "1.1.4"]] :clean-targets ^{:protect false} [:...
3589962d10090a5f299f15c46c5a38d716abb79349d6d08cbc4ebebe77c3b9d9
ucsd-progsys/nate
threadUnix.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/systhreads/threadUnix.mli
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 GNU Library General Public License , with $ I d : , v 1.19 2002/06/26 09:48:00...
a0862cd98b5df13b762f32840aa33f78da3ee50557c4ea04b512386f4f5dbaad
fp-works/2019-winter-Haskell-school
Scrabble.hs
# OPTIONS_GHC -Wall # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # module Scrabble where import Data.Char newtype Score = Score Int deriving (Num, Eq, Show, Ord) getScore :: Score -> Int getScore (Score x) = x instance Semigroup Score where (<>) = (+) instance Monoid Score where ...
null
https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week7/tien/src/Scrabble.hs
haskell
# OPTIONS_GHC -Wall # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # module Scrabble where import Data.Char newtype Score = Score Int deriving (Num, Eq, Show, Ord) getScore :: Score -> Int getScore (Score x) = x instance Semigroup Score where (<>) = (+) instance Monoid Score where ...
0be0880b425e39ece6e98fcea990f7ec53c36756460e94ab5d5a52e583bb290f
Profpatsch/yarn2nix
License.hs
# LANGUAGE NoImplicitPrelude , OverloadedStrings , RecordWildCards , FlexibleInstances , GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE MultiWayIf #-} # LANGUAGE DerivingStrategies # # LANGUAGE TypeApplications # {-| Description: Convert @package.json@ license fields to nixpkgs license attribute se...
null
https://raw.githubusercontent.com/Profpatsch/yarn2nix/90dea476a43541352a949a8dd5ddb2210fd49bd3/yarn2nix/src/Distribution/Nixpkgs/Nodejs/License.hs
haskell
# LANGUAGE MultiWayIf # | Description: Convert @package.json@ license fields to nixpkgs license attribute sets * Conversion Logic * License Lookup Table newtype to circumvent the default instance: we don't want | Representation of a nixpkgs license set as found in @lib.licenses@. There doesn't seem to be a stri...
# LANGUAGE NoImplicitPrelude , OverloadedStrings , RecordWildCards , FlexibleInstances , GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE DerivingStrategies # # LANGUAGE TypeApplications # module Distribution.Nixpkgs.Nodejs.License nodeLicenseToNixpkgs , LicensesBySpdxId ) where import Protolude...
b4d17609f7cdd72259129940e352c856d18c736483db9554882d25e597e0e251
janestreet/merlin-jst
mreader.mli
type parsetree = [ | `Interface of Parsetree.signature | `Implementation of Parsetree.structure ] type comment = (string * Location.t) type result = { lexer_keywords: string list; lexer_errors : exn list; parser_errors : exn list; comments : comment list; parsetree : parsetree; no_labels_for...
null
https://raw.githubusercontent.com/janestreet/merlin-jst/073998f367d299375a6093df2eed215fe3a3640b/src/kernel/mreader.mli
ocaml
Ambient reader. Some actions need to interact with an external process. `with_ambient_reader' will setup this process to speed up later calls. Main functions
type parsetree = [ | `Interface of Parsetree.signature | `Implementation of Parsetree.structure ] type comment = (string * Location.t) type result = { lexer_keywords: string list; lexer_errors : exn list; parser_errors : exn list; comments : comment list; parsetree : parsetree; no_labels_for...
2b50529dcb32416e37c80ef5e063e03a308476b2128421bacab255161908c21c
nuvla/api-server
credential_swarm_token_test.cljc
(ns sixsq.nuvla.server.resources.spec.credential-swarm-token-test (:require [clojure.test :refer [deftest]] [sixsq.nuvla.server.resources.credential :as cred] [sixsq.nuvla.server.resources.spec.credential-swarm-token :as swarm-token] [sixsq.nuvla.server.resources.spec.spec-test-utils :as stu])) (def...
null
https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/test/sixsq/nuvla/server/resources/spec/credential_swarm_token_test.cljc
clojure
mandatory keywords
(ns sixsq.nuvla.server.resources.spec.credential-swarm-token-test (:require [clojure.test :refer [deftest]] [sixsq.nuvla.server.resources.credential :as cred] [sixsq.nuvla.server.resources.spec.credential-swarm-token :as swarm-token] [sixsq.nuvla.server.resources.spec.spec-test-utils :as stu])) (def...
054efbf26c816b2dc6a5e4540998ce0437110a1a30478251abdc0321403641a8
AbstractMachinesLab/caramel
cmi_cache.ml
{ { { COPYING * ( This file is part of Merlin , an helper for ocaml editors Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net > refis.thomas(_)gmail.com > < simon.castellan(_)iuwt.fr > Permission is hereby granted , free...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/ocaml/typing/cmi_cache.ml
ocaml
{ { { COPYING * ( This file is part of Merlin , an helper for ocaml editors Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net > refis.thomas(_)gmail.com > < simon.castellan(_)iuwt.fr > Permission is hereby granted , free...
6a164ba6e02b02970bfc2b0d3e9ee63a486a2d8f6ac34f2e662e8b07d8c02c6f
mirage/ke
packer.ml
let () = Printexc.record_backtrace true module type GRAPH = sig type t type id type value type error = private [> `Not_found ] val pp_error : error Fmt.t val preds : value -> id list val get : t -> id -> (value, error) result Lwt.t val compare : value -> value -> int end module Make (Q : Ke.Sigs.R) (...
null
https://raw.githubusercontent.com/mirage/ke/524864fee7e9905e8517d07d1e338afb6a3f47d4/example/packer.ml
ocaml
let () = Printexc.record_backtrace true module type GRAPH = sig type t type id type value type error = private [> `Not_found ] val pp_error : error Fmt.t val preds : value -> id list val get : t -> id -> (value, error) result Lwt.t val compare : value -> value -> int end module Make (Q : Ke.Sigs.R) (...
0d8c8a6bbf05677d6a31f49bc02aa1f7824eaa1b6926b4fa188f402b57127b0b
adamwalker/clash-utils
ParallelSpec.hs
module DSP.FIR.ParallelSpec where import qualified Clash.Prelude as Clash import Clash.Prelude (Signal, Vec(..), BitVector, Index, Signed, Unsigned, SFixed, Bit, SNat(..), simulate, simulate_lazy, listToVecTH, KnownNat, pack, unpack, (++#), mealy, mux, bundle, unbundle, Hid...
null
https://raw.githubusercontent.com/adamwalker/clash-utils/434f2970b33824a6a934678e3378cb6836af2a56/tests/DSP/FIR/ParallelSpec.hs
haskell
module DSP.FIR.ParallelSpec where import qualified Clash.Prelude as Clash import Clash.Prelude (Signal, Vec(..), BitVector, Index, Signed, Unsigned, SFixed, Bit, SNat(..), simulate, simulate_lazy, listToVecTH, KnownNat, pack, unpack, (++#), mealy, mux, bundle, unbundle, Hid...
d7a2f6a9233cd38eb72457a8df22739b99c04c8a16b430342e57868dabce1e55
dparis/phzr
keyboard.cljs
(ns phzr.impl.accessors.keyboard) (def keyboard-constants {:a "A" :b "B" :c "C" :d "D" :e "E" :f "F" :g "G" :h "H" :i "I" :j "J" :k "...
null
https://raw.githubusercontent.com/dparis/phzr/5a798f280a36db137d4e4576d6f324bfd3212112/src/phzr/impl/accessors/keyboard.cljs
clojure
(ns phzr.impl.accessors.keyboard) (def keyboard-constants {:a "A" :b "B" :c "C" :d "D" :e "E" :f "F" :g "G" :h "H" :i "I" :j "J" :k "...
ca2df22ce68ab05b2d7db1bb24dd680fbface973841c5cb9f28d99fa23731511
evanrelf/drama
Drama.hs
-- | -- Module: Drama -- Stability: experimental -- License: BSD-3-Clause Copyright : © 2022 -- Maintainer: -- Actor library for Haskell -- -- ===== __Example__ -- -- An actor which encapsulates a piece of mutable state. Its @StateMsg@ type -- specifies which messages it accepts, which messages return ...
null
https://raw.githubusercontent.com/evanrelf/drama/739c009c785f9008ceb8dd57c42318c7243d802b/src/Drama.hs
haskell
| Module: Drama Stability: experimental License: BSD-3-Clause Maintainer: ===== __Example__ An actor which encapsulates a piece of mutable state. Its @StateMsg@ type specifies which messages it accepts, which messages return a response, and what type that response is. > > state s0 = do > stat...
Copyright : © 2022 Actor library for Haskell > data s res where > GetState : : s s > GetsState : : ( s - > a ) - > StateMsg s a > PutState : : s - > s ( ) > ModifyState : : ( s - > s ) - > s ( ) > state : : s - > Actor ( s ) ( ) > GetState - > > PutState s - > module ...
fd04d87367df082c4defcfa43b27d796bad42eed41d9165f56b5fb0a305c7663
f-me/carma-public
Extras.hs
# OPTIONS_GHC -Wno - orphans # module Data.Model.Sql.Extras () where import Database.PostgreSQL.Simple import Database.PostgreSQL.Simple.FromRow -- WARNING! It is orphan instance! instance {-# OVERLAPS #-} FromRow a => FromRow (a :. ()) where fromRow = fmap (:. ()) fromRow
null
https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/carma-models/src/Data/Model/Sql/Extras.hs
haskell
WARNING! It is orphan instance! # OVERLAPS #
# OPTIONS_GHC -Wno - orphans # module Data.Model.Sql.Extras () where import Database.PostgreSQL.Simple import Database.PostgreSQL.Simple.FromRow fromRow = fmap (:. ()) fromRow
730aca58edbeb15991c752fd703fb1e56460a20e33f501fb4afce29c9f0cc834
okuoku/nausicaa
test-one-dimension-co.sps
;;; Part of : / Scheme Contents : test for one - dimension - co library ;;;Date: Wed Jun 10, 2009 ;;; ;;;Abstract ;;; ;;; Copyright ( c ) 2009 < > ;;; ;;;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 F...
null
https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/tests/test-one-dimension-co.sps
scheme
Date: Wed Jun 10, 2009 Abstract 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 your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even...
Part of : / Scheme Contents : test for one - dimension - co library Copyright ( c ) 2009 < > the Free Software Foundation , either version 3 of the License , or ( at General Public License for more details . You should have received a copy of the GNU General Public License #!r6rs (import (nausicaa) (na...
d24a133b66a6d4c555c132e53bbcf26b104dca7d9250daadc6b08a267741e863
Veridise/Eurus
manager.rkt
#lang rosette (require json (prefix-in tokamak: "../tokamak.rkt") ; shared (prefix-in utils: "./utils.rkt") (prefix-in comp: "./components.rkt") "./parser.rkt" "./vm.rkt" ) (provide (all-defined-out)) (define manager% (class object% (super-new) (field ; every account or...
null
https://raw.githubusercontent.com/Veridise/Eurus/1a416e0d285a6abdc8936743a6d67a0f90411e83/eurus/rosette/manager.rkt
racket
shared every account or vm should have an entry in balance book, but only vm has entry in address book (pure account doesn't) address -> vm eurus_prank_once string, load in firsst (fixme) something else, just use as it is (fixme) something else, just use as it is (let ([ls (hash-ref arg-config "linker-symbol")...
#lang rosette (require json (prefix-in utils: "./utils.rkt") (prefix-in comp: "./components.rkt") "./parser.rkt" "./vm.rkt" ) (provide (all-defined-out)) (define manager% (class object% (super-new) (field address - > balance ( ) , unsigned [preset-sender null] )...
8b6b7aac9be0338fa4ac71da30d95260e001f8f452bb0b47cbe56e5b7b6a60b8
songyahui/AlgebraicEffect
finite_infinite.ml
effect Done : unit effect Send : unit let rec send n (*@ requires _^* @*) (*@ ensures (Send^* .Done)\/(Send^w) @*) = if n=0 then perform Done else (perform Send; send (n-1))
null
https://raw.githubusercontent.com/songyahui/AlgebraicEffect/27688952b598a101a27523be796e8011d70b02de/src/programs.t/finite_infinite.ml
ocaml
@ requires _^* @ @ ensures (Send^* .Done)\/(Send^w) @
effect Done : unit effect Send : unit let rec send n = if n=0 then perform Done else (perform Send; send (n-1))
7c4a815f9e25c438e2072508d5a9d154a1e0cb1796a65006098a084a694a56f8
gvolpe/split-morphism
FormatSpec.hs
module FormatSpec ( checkProps ) where import Control.Lens.Format import Test.QuickCheck -- Our example Format injects ints into "positive and even" example :: Format Int Bool example = Format { getMaybe = \n -> if n > 0 then Just (n `mod` 2 == 0) else Nothing , reverseGet = \b -> if b then 2 else 1 ...
null
https://raw.githubusercontent.com/gvolpe/split-morphism/15d37ffefacb26d9986cf351e8b8f942830685f0/test/FormatSpec.hs
haskell
Our example Format injects ints into "positive and even"
module FormatSpec ( checkProps ) where import Control.Lens.Format import Test.QuickCheck example :: Format Int Bool example = Format { getMaybe = \n -> if n > 0 then Just (n `mod` 2 == 0) else Nothing , reverseGet = \b -> if b then 2 else 1 } prop_normalize :: Int -> Bool prop_normalize x = (n...
2465d45c5cec539dfe3a66868cdc173c213831e20c888b60e6cb6eb12795accd
clojure/algo.generic
functor.clj
Generic interface for functors by Copyright ( c ) , 2009 - 2011 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ;; Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this ;; distribution. By using this software...
null
https://raw.githubusercontent.com/clojure/algo.generic/48f3894155abbc14835213281d01355af683b47a/src/main/clojure/clojure/algo/generic/functor.clj
clojure
Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
Generic interface for functors by Copyright ( c ) , 2009 - 2011 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (ns ^{:author "Konrad Hinsen" :doc "Generic functor interface (fmap)"} clojure.algo.generic.functor) (defmulti fmap "Applies f...
9b5d2951e8cee7f0c87067acf6c212a102f3572d1f3ec7ae81ba91367d6272ce
fission-codes/fission
DID.hs
# OPTIONS_GHC -Wno - incomplete - uni - patterns # module Test.Web.DID (spec, rsaKey) where import Data.Aeson as JSON import qualified Data.Aeson.Types as JSON import qualified RIO.ByteString.Lazy as Lazy import Crypto.Key.Asymmetr...
null
https://raw.githubusercontent.com/fission-codes/fission/8b47050418c3ebf5736c0a09504230578341865d/hs-ucan/test/Test/Web/DID.hs
haskell
new format: expected = "did:key:z4MXj1wBzi9jUstyNvmiK5WLRRL4rr9UvzPxhry1CudCLKWLyMbP1WoTwDfttBTpxDKf5hAJEjqNbeYx2EEvrJmSWHAu7TJRPTrE3QodbMfRvRNRDyYvaN1FSQus2ziS1rWXwAi5Gpc16bY3JwjyLCPJLfdRWHZhRXiay5FWEkfoSKy6aftnzAvqNkKBg2AxgzGMinR6d1WiH4w5mEXFtUeZkeo4uwtRTd8rD9BoVaHVkGwJkksDybE23CsBNXiNfbweFVRcwfTMhcQsTsYhUWDcSC6QE3z...
# OPTIONS_GHC -Wno - incomplete - uni - patterns # module Test.Web.DID (spec, rsaKey) where import Data.Aeson as JSON import qualified Data.Aeson.Types as JSON import qualified RIO.ByteString.Lazy as Lazy import Crypto.Key.Asymmetr...
7b5e0b5a0de4a2f6c3341df9ba8afdffdbc8100cb9d5f85dabffeca9171d3824
rtoy/cmucl
slot-boundp.lisp
Copyright ( C ) 2002 < > ;;; 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 of source code must retain the above copyright ;;; notice, this list of condi...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/tests/pcl/slot-boundp.lisp
lisp
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 document...
Copyright ( C ) 2002 < > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . The name of the author may not be used to endorse or promote THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS ARE DISCL...
2ee7b4b7acd6b4fbfca85ac29958b115ad5672e7c42e8e09dafe2edba42b2ccf
TheLortex/mirage-monorepo
status.ml
---------------------------------------------------------------------------- Copyright ( c ) 2017 Inhabited Type LLC . All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : ...
null
https://raw.githubusercontent.com/TheLortex/mirage-monorepo/754836818dc5c861bf3b0a78029315a065a543cc/duniverse/httpaf/lib/status.ml
ocaml
Informational Successful Client error RFC 2342 Server error Informational Successful Client error Server error Informational Successful Client error Server error don't allocate Informational Successful Client error Server error except for this
---------------------------------------------------------------------------- Copyright ( c ) 2017 Inhabited Type LLC . All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : ...
7cfd80ad4f7ae375c2490a103e3a428415be34de6c7dc1c97c977de94fe40599
rowangithub/DOrder
randsequence.ml
let rec go xs ys = match xs with | [] -> ys | x::xs' -> if Random.bool () then go xs' (x::ys) else go xs' ys let rev list = let rec aux2 acc t = match t with | [] -> acc | h::t -> aux2 (h::acc) t in aux2 [] list let random_subsequence xs = rev (go xs []) let main (...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/reachability/randsequence.ml
ocaml
let rec go xs ys = match xs with | [] -> ys | x::xs' -> if Random.bool () then go xs' (x::ys) else go xs' ys let rev list = let rec aux2 acc t = match t with | [] -> acc | h::t -> aux2 (h::acc) t in aux2 [] list let random_subsequence xs = rev (go xs []) let main (...
1bbb9ed2f9303362934b09959f8d5ef29d13eb3502f9d0078d7fb9760c66ab0b
music-suite/music-suite
Common.hs
-- | Common pitch representation. module Music.Pitch.Common ( module Music.Pitch.Common.Semitones, module Music.Pitch.Common.Quality, module Music.Pitch.Common.Number, module Music.Pitch.Common.Interval, module Music.Pitch.Common.Pitch, module Music.Pitch.Common.Spell, module Music.Pitch.Commo...
null
https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/src/Music/Pitch/Common.hs
haskell
| Common pitch representation.
module Music.Pitch.Common ( module Music.Pitch.Common.Semitones, module Music.Pitch.Common.Quality, module Music.Pitch.Common.Number, module Music.Pitch.Common.Interval, module Music.Pitch.Common.Pitch, module Music.Pitch.Common.Spell, module Music.Pitch.Common.Types, module Music.Pitch.Co...
a24642ee5578af91216d4abc692955fbc46f6bc260c217d1c2c33f6bf2c7f305
ServiceNow/picard
CreDocTemplateMgt.hs
{-# LANGUAGE OverloadedStrings #-} module Language.SQL.SpiderSQL.CreDocTemplateMgt where import qualified Data.HashMap.Strict as HashMap import qualified Data.Text as Text (Text) import Language.SQL.SpiderSQL.TestItem (TestItem (..)) import Picard.Types (ColumnType (..), SQLSchema (..)) creDocTemplateMgtSchema :: SQ...
null
https://raw.githubusercontent.com/ServiceNow/picard/6a252386bed6d4233f0f13f4562d8ae8608e7445/picard/tests/Language/SQL/SpiderSQL/CreDocTemplateMgt.hs
haskell
# LANGUAGE OverloadedStrings #
module Language.SQL.SpiderSQL.CreDocTemplateMgt where import qualified Data.HashMap.Strict as HashMap import qualified Data.Text as Text (Text) import Language.SQL.SpiderSQL.TestItem (TestItem (..)) import Picard.Types (ColumnType (..), SQLSchema (..)) creDocTemplateMgtSchema :: SQLSchema creDocTemplateMgtSchema = ...
f384c868d995ad74a3849bc4effa67fe57e99673eb9466f0ab4da4e545caba21
jellelicht/guix
bittorrent.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2014 / < > Copyright © 2014 , 2015 < > Copyright © 2016 < > Copyright © 2016 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Pub...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/bittorrent.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 © 2014 / < > Copyright © 2014 , 2015 < > Copyright © 2016 < > Copyright © 2016 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packa...
d4ead0a04804beb41229b8137213f99d3850e63f5adf7bf29ec74ecc217fbc8a
blitzcode/hue-dashboard
HueJSON.hs
# LANGUAGE TemplateHaskell , OverloadedStrings , RecordWildCards , LambdaCase , ScopedTypeVariables , FlexibleInstances , TypeSynonymInstances , , OverloadedStrings , RecordWildCards ...
null
https://raw.githubusercontent.com/blitzcode/hue-dashboard/d6e04ab1c2a50d5fa6a0ea7682350b70677997ab/HueJSON.hs
haskell
TODO: Add representations for sensor data TODO: Convert the various string arguments to proper ADTs Light type -lights -UG-3091.pdf Light model -lights -mirror/blob/master/fhem/FHEM/31_HUEDevice.pm What's the diff. to the 'Spot'? Also 'Plug - LIGHTIFY'? Tentative support for Innr .. Scenes -api#41_get_...
# LANGUAGE TemplateHaskell , OverloadedStrings , RecordWildCards , LambdaCase , ScopedTypeVariables , FlexibleInstances , TypeSynonymInstances , , OverloadedStrings , RecordWildCards ...
503800032784635bc2b3ef6c0ac48e738bdc1a5d1e17afd0bb6865abddc11189
jgoerzen/missingpy
BZip2test.hs
{-# OPTIONS -fallow-overlapping-instances #-} arch - tag : BZip2 tests main file Copyright ( C ) 2005 < > 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 Licens...
null
https://raw.githubusercontent.com/jgoerzen/missingpy/ab857768341f172c2b2e2bd496a97290c9fa3d46/testsrc/BZip2test.hs
haskell
# OPTIONS -fallow-overlapping-instances # @=? loads the whole thing into memory. ick. This is much better.
arch - tag : BZip2 tests main file Copyright ( C ) 2005 < > This program is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version ...
2b5796664d959746c5ec33dac28779c0b843757872347c62eb330a0c977e09f4
aspiwack/porcupine
AWS.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedLabels #-} # LANGUAGE OverloadedStrings # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeFamilies # {-# LANGUAGE TypeSyno...
null
https://raw.githubusercontent.com/aspiwack/porcupine/23dcba1523626af0fdf6085f4107987d4bf718d7/porcupine-s3/src/Control/Monad/ReaderSoup/AWS.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedLabels # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeSynonymInstances # # OPTIONS_GHC "-fno-warn-orphans" # | Tries to get the credentials, but uses dummy credentials if they haven't been found. | See 'Credentials'...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Control.Monad.ReaderSoup.AWS ( Credentials(..) , Region(..) , useAWS , useAWSRegion ) where import Control.Excep...
18dad94f9eb5aacb5df32cc40cf51c9aa3e405ce3e7ae41d6c2ed24b28f52d5b
bjornbm/astro
TestCelestrak.hs
module Astro.TestCelestrak where import Numeric.Units.Dimensional.Prelude import qualified Prelude import Astro.Time import Astro.Time.Interop import Astro.Celestrak import Test.QuickCheck import Data.Time hiding (utc) import Data.Time.Clock.TAI import Data.Array.IArray import qualified Debug.Trace as D -- Preliminar...
null
https://raw.githubusercontent.com/bjornbm/astro/f4fb2c4b739a0a8f68f51aa154285120d2230c30/test/Astro/TestCelestrak.hs
haskell
Preliminaries ============= | Comparison allowing for inaccuracy. Properties ========== Interpolation UTC UT1 Conversions ----------- Driver ======
module Astro.TestCelestrak where import Numeric.Units.Dimensional.Prelude import qualified Prelude import Astro.Time import Astro.Time.Interop import Astro.Celestrak import Test.QuickCheck import Data.Time hiding (utc) import Data.Time.Clock.TAI import Data.Array.IArray import qualified Debug.Trace as D onceCheck = q...
a91654f2a789c5d7c599ff4dd0db56fe36178d4170aaf5e88a64adcc014bdd6f
jeapostrophe/rackunit-chk
info.rkt
#lang info (define collection 'multi) (define deps '("base" "rackunit-lib")) (define build-deps '("racket-doc" "rackunit-doc" "scribble-lib" ))
null
https://raw.githubusercontent.com/jeapostrophe/rackunit-chk/62c80697d9e8c4a5f5b57832e3930313732836c4/info.rkt
racket
#lang info (define collection 'multi) (define deps '("base" "rackunit-lib")) (define build-deps '("racket-doc" "rackunit-doc" "scribble-lib" ))
7bba9ab3366987909792365da826631a7f5f0f14cab3e564b503ed9c0e64f86a
tuura/plato
zcLate_scenario.hs
module BuckConverter where import Tuura.Concept.STG late scenario definition using concepts circuit uv oc zc gp gp_ack gn gn_ack = chargeFunc <> uvFunc <> uvReact <> zcLate <> initialise zc False where interface = inputs [uv, oc, zc, gp_ack, gn_ack] <> outputs [gp, gn] zcLate = rise uv ~> rise zc <> f...
null
https://raw.githubusercontent.com/tuura/plato/4b528f73ad677cf634dde7644a0ec5c759114baf/examples/zcLate_scenario.hs
haskell
Must be redefined as auto re-use of concepts is yet to be implemented
module BuckConverter where import Tuura.Concept.STG late scenario definition using concepts circuit uv oc zc gp gp_ack gn gn_ack = chargeFunc <> uvFunc <> uvReact <> zcLate <> initialise zc False where interface = inputs [uv, oc, zc, gp_ack, gn_ack] <> outputs [gp, gn] zcLate = rise uv ~> rise zc <> f...
b4388c32fcd66a9523b89f704644fbbfca0d01c178e3fc5d0839e08a40a40210
nibbula/yew
source-path.lisp
;;; ;;; source-paths.lisp - Source-paths ;;; CMUCL / SBCL use a data structure called " source - path " to locate subforms . ;; The compiler assigns a source-path to each form in a compilation unit. Compiler notes usually contain the source - path of the error location . ;; ;; Compiled code objects don't contain s...
null
https://raw.githubusercontent.com/nibbula/yew/001a3fc2f46310430f5544e5591788990803b52c/deblarg/source-path.lisp
lisp
source-paths.lisp - Source-paths The compiler assigns a source-path to each form in a compilation unit. Compiled code objects don't contain source paths, only the "toplevel-form-number" and the (sub-) "form-number". To get from the form-number to the source-path we need the entire toplevel-form (i.e. we transl...
CMUCL / SBCL use a data structure called " source - path " to locate subforms . Compiler notes usually contain the source - path of the error location . have to read the source code ) . CMUCL has already some utilities to do this position info . Apparently Hemlock is happy with the position of the Taken fro...
6dd143ef213ce1c6d1ab3b9012b25283a125fe570e705124b846a7b4fa99fed5
plow-technologies/yesod-routes-metrics
Foundation.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} module Foundation where import Data.Text (Text) import Yesod data App = App instance Yesod App mkYesodData "App" $(parseRoutesFile "config/routes")
null
https://raw.githubusercontent.com/plow-technologies/yesod-routes-metrics/a499200b21d023f30238822c274e2f27c4dec1be/examples/yesod-with-metrics/app/Foundation.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns #
# LANGUAGE TemplateHaskell # module Foundation where import Data.Text (Text) import Yesod data App = App instance Yesod App mkYesodData "App" $(parseRoutesFile "config/routes")
c3bb6466afcacdc53a8b190f54ac716396550846054b5a2c5757328add81917e
polyfy/polylith
splitter_test.clj
(ns polylith.clj.core.path-finder.splitter-test (:require [clojure.test :refer :all] [polylith.clj.core.path-finder.profile-src-splitter :as splitter])) (def settings {:active-profiles #{"default" "admin"} :profile-to-settings {"default" {:lib-deps {"org.clojure/clojure" {:mvn/version "1.1...
null
https://raw.githubusercontent.com/polyfy/polylith/e3bc4556f5efa0346bd144dfe579a7a453a4464d/components/path-finder/test/polylith/clj/core/path_finder/splitter_test.clj
clojure
(ns polylith.clj.core.path-finder.splitter-test (:require [clojure.test :refer :all] [polylith.clj.core.path-finder.profile-src-splitter :as splitter])) (def settings {:active-profiles #{"default" "admin"} :profile-to-settings {"default" {:lib-deps {"org.clojure/clojure" {:mvn/version "1.1...
6270e8f0ee05557064633acb93dd996ce751fd9aab25163afc57c5a3837f2207
gilith/hol-light
wf.ml
(* ========================================================================= *) (* Theory of wellfounded relations. *) (* *) , University of Cambridge Computer Laboratory (* ...
null
https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/wf.ml
ocaml
========================================================================= Theory of wellfounded relations. ===============...
, University of Cambridge Computer Laboratory ( c ) Copyright , University of Cambridge 1998 ( c ) Copyright , 1998 - 2007 needs "relations.ml";; export_theory "relation-well-founded-def";; let WF = new_definition `!(r : ...
9ecdfad6fd8fba4ff70338ab330d5f50cca748e1056a0f30962eb930bf1628a4
Kappa-Dev/KappaTools
odes.ml
* Network / ODE generation * Creation : 15/07/2016 * Last modification : Time - stamp : < Jan 08 2020 > * Creation: 15/07/2016 * Last modification: Time-stamp: <Jan 08 2020> *) let local_trace = false let debug ~debugMode s = if local_trace || debugMode then Format.kfprintf (fun f -> Format.pp_print...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/777835b82f449d3d379713df76ff25fd5926b762/core/odes/odes.ml
ocaml
symmetries = None ; sym_reduction = Symmetries.Ground ; to do, check if we do not compute it many times regular application of tules, we store the embeddings compute the corresponding rhs, and put the new species in the working list, and store the ...
* Network / ODE generation * Creation : 15/07/2016 * Last modification : Time - stamp : < Jan 08 2020 > * Creation: 15/07/2016 * Last modification: Time-stamp: <Jan 08 2020> *) let local_trace = false let debug ~debugMode s = if local_trace || debugMode then Format.kfprintf (fun f -> Format.pp_print...
9064e501483f0005df9c91b99921a494f3c2ff6cad0d5f62fc740b54b15c19d0
bendyworks/api-server
Main.hs
module Main (main) where import Api.Server (apiServer) import Api.Types.Config import Network.URI (parseURI, URI(..), URIAuth(..)) import System.Environment (getEnv) import Data.Maybe (fromJust) import qualified Data.Text as ST import qualified Data.ByteString.Char8 as SB main :: IO () main = do dbConnString <- ge...
null
https://raw.githubusercontent.com/bendyworks/api-server/9dd6d7c2599bd1c5a7e898a417a7aeb319415dd2/src/Main.hs
haskell
module Main (main) where import Api.Server (apiServer) import Api.Types.Config import Network.URI (parseURI, URI(..), URIAuth(..)) import System.Environment (getEnv) import Data.Maybe (fromJust) import qualified Data.Text as ST import qualified Data.ByteString.Char8 as SB main :: IO () main = do dbConnString <- ge...
26719e3b92130515e3877f0ef2c0c9ef09564f1769b160da54c5e4eba97a4b15
amperity/sparkplug
rdd.clj
(ns sparkplug.rdd "This namespace provides the main API for writing Spark tasks. Most operations in this namespace place the RDD last in the argument list, just like Clojure collection functions. This lets you compose them using the thread-last macro (`->>`), making it simple to migrate existing Clojure code...
null
https://raw.githubusercontent.com/amperity/sparkplug/33b71659465d83fc1daf3ce94bfa38fecf2a2877/sparkplug-core/src/clojure/sparkplug/rdd.clj
clojure
## Naming Functions Type hints are omitted because `name` is not included in JavaRDDLike. Type hints are omitted because `setName` is not included in JavaRDDLike. Type hints are omitted because `repartition` is not included in JavaRDDLike. Type hints are omitted because `coalesce` is not included in JavaRDDLike. ...
(ns sparkplug.rdd "This namespace provides the main API for writing Spark tasks. Most operations in this namespace place the RDD last in the argument list, just like Clojure collection functions. This lets you compose them using the thread-last macro (`->>`), making it simple to migrate existing Clojure code...
14f99de551dc017266be668558a5be1c5a884dd14b4a48cd86bae6b3dd7133ec
boomerang-lang/boomerang
bregistry.ml
(******************************************************************************) The Harmony Project (******************************************************************************) Copyright ( C ) 2008 and ...
null
https://raw.githubusercontent.com/boomerang-lang/boomerang/b42c2bfc72030bbe5c32752c236c0aad3b17d149/lib/bregistry.ml
ocaml
**************************************************************************** **************************************************************************** This library is free software; you can redistribute it and/or modify it u...
The Harmony Project Copyright ( C ) 2008 and License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later ...
870a9d58b7b08adb28fce8f17444332764ee0ff35da850220991064060f9aacb
clash-lang/clash-compiler
Unique.hs
| Copyright : ( C ) 2021 , QBayLogic B.V. License : BSD2 ( see the file LICENSE ) Maintainer : QBayLogic B.V. < > Random generation of unique variables and unique containers . Copyright : (C) 2021, QBayLogic B.V. License : BSD2 (see the file LICENSE) Maintainer : QBayLogic B.V. <> Random g...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/60db651e90b85b9a533b3730732d81848c36c66a/clash-lib-hedgehog/src/Clash/Hedgehog/Unique.hs
haskell
NOTE [finding more complex fits] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is not good enough. If I have a hole of type A -> B and I have a candidate of type forall a. a -> B, I will give up because it is not and include foralls, but this would still not fit polymorphic holes. For example, if I have the hole A -> B, ...
| Copyright : ( C ) 2021 , QBayLogic B.V. License : BSD2 ( see the file LICENSE ) Maintainer : QBayLogic B.V. < > Random generation of unique variables and unique containers . Copyright : (C) 2021, QBayLogic B.V. License : BSD2 (see the file LICENSE) Maintainer : QBayLogic B.V. <> Random g...
22b83f388b46af4755ff7f5aa785be9519079b70a1d6d3a6a88fcb6198230bc1
facebook/duckling
Corpus.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 OverloadedStrings #-} module Duckling.Quantity.RO.Corpus ( corpus ) where import Data.Str...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Quantity/RO/Corpus.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 OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Quantity.RO.Corpus ( corpus ) where import Data.String import Prelude import Duckling.Locale import Duckling.Quantity.Types import Duckling.Resolve import Duckling.Testing.Types corpus :: Corpus corpus = (testContext {locale = makeLocale RO No...
4be3a85008bb861007565d21739a174420d8939214f90c9f0f28221d7fb5e207
DavidAlphaFox/aiutp
aiutp.erl
-module(aiutp). -export([open/1,open/2]). -export([connect/3,accept/1]). -export([listen/1,listen/2,send/2,recv/2,close/1]). -export([active/2,controlling_process/2]). open(Port) -> aiutp_socket_sup:open(Port,[]). open(Port,Options) -> aiutp_socket_sup:open(Port,Options). connect({utp,UTPSocket},Address,Port)-> ai...
null
https://raw.githubusercontent.com/DavidAlphaFox/aiutp/d01f7b0875b6bbf05dc05a0be336ebe44345b5af/src/aiutp.erl
erlang
-module(aiutp). -export([open/1,open/2]). -export([connect/3,accept/1]). -export([listen/1,listen/2,send/2,recv/2,close/1]). -export([active/2,controlling_process/2]). open(Port) -> aiutp_socket_sup:open(Port,[]). open(Port,Options) -> aiutp_socket_sup:open(Port,Options). connect({utp,UTPSocket},Address,Port)-> ai...
fb58f1ae28bc485daa29651cd29f28c56288c73a3c2fdaeb1669bf94351c8311
rtrusso/scp
disp1.scm
(display #\a)
null
https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/tests/disp1.scm
scheme
(display #\a)
6a3444b65e8c1dc8d1b5e87f9c50dddbf1019d627c80f06c0025dbba8c59b197
binaryage/cljs-devtools
cljs.cljs
(ns devtools.tests.cljs (:require-macros [devtools.oops :refer [unchecked-aget]]) (:require [cljs.test :refer-macros [deftest testing is]] [devtools.tests.utils.test :refer [js-equals is-header is-body has-body? unroll]] [devtools.formatters.templating :refer [surrogate?]] [devto...
null
https://raw.githubusercontent.com/binaryage/cljs-devtools/d07fc6d404479b1ddd32cecc105009de77e3cba7/test/src/tests/devtools/tests/cljs.cljs
clojure
test some fragile behaviours of CLJS printing we depend on mostly to catch changes in code like this:
(ns devtools.tests.cljs (:require-macros [devtools.oops :refer [unchecked-aget]]) (:require [cljs.test :refer-macros [deftest testing is]] [devtools.tests.utils.test :refer [js-equals is-header is-body has-body? unroll]] [devtools.formatters.templating :refer [surrogate?]] [devto...
fcc01a1ad3aac4bd6d6feac814fe2095a9b2ca3ccc12326ce9097e760e8c60ae
Helium4Haskell/helium
KindError4.hs
f :: Bool Int f = True
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/kinderrors/KindError4.hs
haskell
f :: Bool Int f = True
7b6f0dd6c48074f4023714bfb68e7c67b99e726f31afea67dc9546107ff32b19
plewto/Cadejo
pitch_editor.clj
(println " --> xolotl.ui.pitch-editor") (ns xolotl.ui.pitch-editor (:use [xolotl.ui.pitch-map :only [REST-LIMIT REST pitch-map reverse-map int->pitch]]) (:require [xolotl.util :as util]) (:require [xolotl.ui.factory :as factory]) (:require [clojure.string :as str]) (:require [seesaw.core :as ss]) (:impor...
null
https://raw.githubusercontent.com/plewto/Cadejo/2a98610ce1f5fe01dce5f28d986a38c86677fd67/src/xolotl/ui/pitch_editor.clj
clojure
(def ^:private REST-LIMIT -1) ; Any value <= REST-LIMIT is a rest. (def REST -1000) ; The canonical rest value. Map symbolic pitch tokens to int MIDI key-number where R -> Root key name "white key" : C D E F G A or B M -> optional modifier : F = flat, S = sh...
(println " --> xolotl.ui.pitch-editor") (ns xolotl.ui.pitch-editor (:use [xolotl.ui.pitch-map :only [REST-LIMIT REST pitch-map reverse-map int->pitch]]) (:require [xolotl.util :as util]) (:require [xolotl.ui.factory :as factory]) (:require [clojure.string :as str]) (:require [seesaw.core :as ss]) (:impor...
5c9cc96211dfd7eecca45b4a0f8cd8838f9b5a14d357fb254b03a8e24b7937ee
deadpendency/deadpendency
SmokeGolang.hs
module SR.Effect.RunSmokeTest.Backend.Smokes.SmokeGolang (smokeGolang) where import Common.Model.Config.AppEnv import Common.Model.Dependency.DependencyIdentifier import Common.Model.Dependency.DependencyName import Common.Model.Git.GitSha import Common.Model.Git.QualifiedRepo import Common.Model.Git.RepoHost import C...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/script-runner/src/SR/Effect/RunSmokeTest/Backend/Smokes/SmokeGolang.hs
haskell
module SR.Effect.RunSmokeTest.Backend.Smokes.SmokeGolang (smokeGolang) where import Common.Model.Config.AppEnv import Common.Model.Dependency.DependencyIdentifier import Common.Model.Dependency.DependencyName import Common.Model.Git.GitSha import Common.Model.Git.QualifiedRepo import Common.Model.Git.RepoHost import C...
dba2e0319daca81caba9f0dbec5e254fcbf33b1d225a21cf9b83a7d60f6c01c9
svobot/janus
Parsing.hs
-- | Parser for the Janus language. module Janus.Parsing ( Binding , Stmt(..) , evalParser , fileParser , keywords , typeParser ) where import Control.Applicative hiding ( many , some ) import ...
null
https://raw.githubusercontent.com/svobot/janus/956de8b4e30aabea0ce1ad1c258867ee4ce455b2/src/Janus/Parsing.hs
haskell
| Parser for the Janus language. | Statement in the Janus language. | Reserved language keywords. | Parse a statement. | Parse a Janus expression. | Parse multiple consecutive statements. | Generate a parser of a single statement.
module Janus.Parsing ( Binding , Stmt(..) , evalParser , fileParser , keywords , typeParser ) where import Control.Applicative hiding ( many , some ) import Data.Bifunctor ...
dbaeeabd1aaef1610fa366c84b0940fc628e5b146b0d2320b363444d05824153
LastStar/showrum
decks.cljs
(ns showrum.spec.decks (:require [cljs.spec.alpha :as s])) (def slide-type? #{:type/main-header :type/header :type/bullets :type/text :type/image :type/code}) (s/def :slide/order number?) (s/def :slide/type slide-type?) (s/def :slide/title string?) (s/def :slide/bullets (s/coll-of string?)) (s/de...
null
https://raw.githubusercontent.com/LastStar/showrum/fb73e9612e4525e32b6b936179d901be50019fb5/src/showrum/spec/decks.cljs
clojure
(ns showrum.spec.decks (:require [cljs.spec.alpha :as s])) (def slide-type? #{:type/main-header :type/header :type/bullets :type/text :type/image :type/code}) (s/def :slide/order number?) (s/def :slide/type slide-type?) (s/def :slide/title string?) (s/def :slide/bullets (s/coll-of string?)) (s/de...
2ea674e5a8f8685ed5e32d7a58f5fab24b6956dd8a9aeb03674fd9f35db434d2
RaphaelJ/friday
Image.hs
# LANGUAGE CPP , FlexibleContexts , FlexibleInstances , TypeFamilies , UndecidableInstances # , FlexibleContexts , FlexibleInstances , TypeFamilies , UndecidableInstances #-} # OPTIONS_GHC -fno - warn - orphans # module Tes...
null
https://raw.githubusercontent.com/RaphaelJ/friday/13c6bb16bb04856e0cb226726017e7a7ad502cb5/test/Test/Vision/Image.hs
haskell
| Tests if applying the horizontal flip twice gives the original image. | Tests if applying the vertical flip twice gives the original image.
# LANGUAGE CPP , FlexibleContexts , FlexibleInstances , TypeFamilies , UndecidableInstances # , FlexibleContexts , FlexibleInstances , TypeFamilies , UndecidableInstances #-} # OPTIONS_GHC -fno - warn - orphans # module Tes...
89bba94ca8bbb57812b9218b6f56e6de019a90bdf53aca17ea2dd677e762e95c
damianfral/ghcaniuse
Main.hs
# LANGUAGE FlexibleContexts # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Main where import BasicPrelude hiding (isPrefixOf, lookup, try, (<|>)) import Control.Monad.Trans.State import GHCanIUse impor...
null
https://raw.githubusercontent.com/damianfral/ghcaniuse/2ac70a2e71918e8e58f324ca1f034daa4a79acba/src/Main.hs
haskell
# LANGUAGE OverloadedStrings # renderToFile (unpack ("public/" <> ext <> ".html")) (generateExtensionPage ext x y)
# LANGUAGE FlexibleContexts # # LANGUAGE NoImplicitPrelude # module Main where import BasicPrelude hiding (isPrefixOf, lookup, try, (<|>)) import Control.Monad.Trans.State import GHCanIUse import Lucid main :: IO () m...
50b338c3be6610e9973d973d196178b81a161d9e0e2b4b9dca4df287f6ba376b
project-oak/hafnium-verification
ISequence.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/istd/ISequence.ml
ocaml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
270e0baa9cbdfcdc461c4e1e32cd33aefb30de25cef2e75b751bdf67ad32c490
vvvvalvalval/scope-capture
impl.cljc
(ns sc.impl (:require [sc.impl.db :as db] [sc.impl.logging :as il] [sc.api.logging] [sc.api.from])) (defn gen-cs-id [] (swap! db/cs-id dec)) (defn gen-ep-id [] (swap! db/ep-id inc)) (defn last-ep-id* [db] (let [eps (get db :execution-points)] (if (empty? eps) ...
null
https://raw.githubusercontent.com/vvvvalvalval/scope-capture/06de75672d6cdf26e8342398210f77d0737d2c48/src/sc/impl.cljc
clojure
in CLJS will also have an :ns key
(ns sc.impl (:require [sc.impl.db :as db] [sc.impl.logging :as il] [sc.api.logging] [sc.api.from])) (defn gen-cs-id [] (swap! db/cs-id dec)) (defn gen-ep-id [] (swap! db/ep-id inc)) (defn last-ep-id* [db] (let [eps (get db :execution-points)] (if (empty? eps) ...
795340c82be07bf7e3a4c08c160bb48e8f403bde318b1027a1b6a56bb9ba8c1b
DavidAlphaFox/RabbitMQ
rabbit_mgmt_wm_permissions.erl
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in %% compliance with the License. You may obtain a copy of the License at %% / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITH...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_permissions.erl
erlang
compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -------------------------------------------------------------------- ---...
The contents of this file are subject to the Mozilla Public License Version 1.1 ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ Management Plugin . The Initial Developer of the Original Code...
2e92fcb701d924ab39dc6b38066dcf15385eafea27feb2649557f46fed99e93c
TerrorJack/ghc-alter
T7773.hs
import Control.Concurrent import System.Posix.IO main = do putStrLn "hello" fd <- openFd "/dev/random" ReadOnly Nothing defaultFileFlags threadWaitRead fd putStrLn "goodbye"
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/tests/T7773.hs
haskell
import Control.Concurrent import System.Posix.IO main = do putStrLn "hello" fd <- openFd "/dev/random" ReadOnly Nothing defaultFileFlags threadWaitRead fd putStrLn "goodbye"
c106abc598997cb7d41b7dd0372877f3ba4233dbb34c85c6bb2d95d783310c95
alvatar/spheres
ssrunfile.scm
(include "~~lib/ssrun/tasks/core.scm") (define libraries '((spheres/algorithm boyer-moore-search) (spheres/algorithm knuth-morris-pratt-search) (spheres/algorithm compare) (spheres/algorithm comprehension) (spheres/algorithm list-extra) (spheres/algorithm list) (spheres/algorithm random) ...
null
https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/ssrunfile.scm
scheme
(include "~~lib/ssrun/tasks/core.scm") (define libraries '((spheres/algorithm boyer-moore-search) (spheres/algorithm knuth-morris-pratt-search) (spheres/algorithm compare) (spheres/algorithm comprehension) (spheres/algorithm list-extra) (spheres/algorithm list) (spheres/algorithm random) ...
b90940c2c9f89a0c8c769a39aad789fa1bb0d294d9f42c3ad9b31c1b1a438df3
rpav/ninja-sphere
anim.lisp
(in-package :ninja-sphere) ;;; Animation defines parameters for a particular animation, e.g. length, ;;; implements "doing" the animation, etc (defclass animation () ()) (defgeneric animation-instance (animation object &key &allow-other-keys) (:documentation "Create an appropriate ANIM-STATE for ANIMATION, given `O...
null
https://raw.githubusercontent.com/rpav/ninja-sphere/f6708d9ab209a831c7e7df3f12d32ecc4afe0426/src/anim.lisp
lisp
Animation defines parameters for a particular animation, e.g. length, implements "doing" the animation, etc ANIM-STATE keeps the _state_ of any active animation, so you can use the same ANIMATION instance for multiple different ongoing animations ANIMATION-PERIODIC ANIM-MANAGER spritesheet-anim If this were al...
(in-package :ninja-sphere) (defclass animation () ()) (defgeneric animation-instance (animation object &key &allow-other-keys) (:documentation "Create an appropriate ANIM-STATE for ANIMATION, given `OBJECT` to be animated and any other optional parameters.") (:method (a o &key on-stop &allow-other-keys) (make...
56d234a3ac8d3627c39822fb50836a9a5efc4f34d689992d74e462e200f4a2f6
intermine/im-tables-3
pagination.cljs
(ns im-tables.events.pagination (:require [re-frame.core :refer [reg-event-db reg-event-fx]] [im-tables.interceptors :refer [sandbox]])) (reg-event-fx :imt.pagination/check-for-results (sandbox) (fn [{db :db} [_ loc]] (let [{:keys [start limit] :as p} (get-in db [:settings :pagination]) fe...
null
https://raw.githubusercontent.com/intermine/im-tables-3/1a769d4055611a5c6a098b1b6a085594ea37baf0/src/im_tables/events/pagination.cljs
clojure
Make sure that never dec to a negative number
(ns im-tables.events.pagination (:require [re-frame.core :refer [reg-event-db reg-event-fx]] [im-tables.interceptors :refer [sandbox]])) (reg-event-fx :imt.pagination/check-for-results (sandbox) (fn [{db :db} [_ loc]] (let [{:keys [start limit] :as p} (get-in db [:settings :pagination]) fe...
e296465c1aa2159ee609c2333be78cadc16be17c648f33a7923752855f00b8ef
fizruk/tubes
Control.hs
module Tubes.Control where import Control.Concurrent.STM (TVar, atomically, modifyTVar) import Graphics.Gloss.Interface.Pure.Game import System.Exit (exitSuccess) import Tubes.Model eventToPlayerAction :: Event -> Maybe PlayerAction eventToPlayerAction (EventKey (MouseButton LeftButton) Down _ point) = Just (PlayerS...
null
https://raw.githubusercontent.com/fizruk/tubes/d56b619eef2573d7cdca28d5929a1a7a4119fbcf/src/Tubes/Control.hs
haskell
module Tubes.Control where import Control.Concurrent.STM (TVar, atomically, modifyTVar) import Graphics.Gloss.Interface.Pure.Game import System.Exit (exitSuccess) import Tubes.Model eventToPlayerAction :: Event -> Maybe PlayerAction eventToPlayerAction (EventKey (MouseButton LeftButton) Down _ point) = Just (PlayerS...
7880892e5cf02d7d4e6bce7f3c57304cd94f7785beb4866f674b83b8370fcfea
mstksg/inCode
TagIndex.hs
{-# LANGUAGE ImplicitParams #-} {-# LANGUAGE OverloadedStrings #-} module Blog.Compiler.TagIndex where import Blog.Compiler.Entry import Blog.Types import Blog.Util.Tag import Blog.View.TagIndex import Data.Default import Data.List import Data.M...
null
https://raw.githubusercontent.com/mstksg/inCode/e1f80a3dfd83eaa2b817dc922fd7f331cd1ece8a/src/Blog/Compiler/TagIndex.hs
haskell
# LANGUAGE ImplicitParams # # LANGUAGE OverloadedStrings # should this be Label, Recent?
module Blog.Compiler.TagIndex where import Blog.Compiler.Entry import Blog.Types import Blog.Util.Tag import Blog.View.TagIndex import Data.Default import Data.List import Data.Maybe import Data.Traversable import Hakyll import ...
7adb547c523567129c7076f4090aed6201eb8f9519323e26939b8833c4ec6066
msp-strath/TypOS
Coverage.hs
-- Coverage checker for the pattern language -- -- The core of the algorithm is based on the `shrinkBy` function. -- Intuitively, from: 1 . a SyntaxDesc of the possible inputs 2 . and a given pattern -- we attempt to compute: 1 . the SyntaxDesc the pattern covers 2 . the SyntaxDesc of the inputs left to...
null
https://raw.githubusercontent.com/msp-strath/TypOS/fbbf0ba6451fd21e274859c666629ba029e6466c/Src/Pattern/Coverage.hs
haskell
Coverage checker for the pattern language The core of the algorithm is based on the `shrinkBy` function. Intuitively, from: we attempt to compute: ---------------------------------------------------------------------------- RESULTS ---------------------------------------------------------------------------- Poss...
1 . a SyntaxDesc of the possible inputs 2 . and a given pattern 1 . the SyntaxDesc the pattern covers 2 . the SyntaxDesc of the inputs left to cover module Pattern.Coverage where import Control.Monad.State (State, evalState, get, put) import Data.Functor ((<&>)) import Data.List (partition) import Dat...
cf299c40669348ce761df601cf5f6887df2d2921840692f6649e2e54d2ca1ffd
jwiegley/linearscan-hoopl
Ordered.hs
module Programs.Ordered where import Assembly import LinearScan.Hoopl.DSL regOrdered :: Program (Node IRVar) regOrdered = do label "entry" $ do copy v99 v94 lc v6 move v96 v73 copy v5 v67 add v48 v96 pr7 move v29 v23 offp v95 v28 v51 move v36 v96 ...
null
https://raw.githubusercontent.com/jwiegley/linearscan-hoopl/f654adf64cba4b3af1f42f06112c9225b1369c74/test/Programs/Ordered.hs
haskell
module Programs.Ordered where import Assembly import LinearScan.Hoopl.DSL regOrdered :: Program (Node IRVar) regOrdered = do label "entry" $ do copy v99 v94 lc v6 move v96 v73 copy v5 v67 add v48 v96 pr7 move v29 v23 offp v95 v28 v51 move v36 v96 ...
5d21e7cf62b14db678a42af0443d8d28cf0b8d328eed83e00dbbe44662d30d2f
Factual/skuld
claim_test.clj
(ns skuld.claim-test (:use clojure.tools.logging clojure.test skuld.util skuld.node skuld.node-test) (:require [skuld.client :as client] [skuld.admin :as admin] [skuld.vnode :as vnode] [skuld.flake :as flake] [skuld.curator :as ...
null
https://raw.githubusercontent.com/Factual/skuld/79599f9b13aee35c680183d6bf9e2fcbfde1d7c7/test/skuld/claim_test.clj
clojure
Can't reclaim, because it's already claimed But after the buffer has elapsed, good to go. Isn't completed Is completed Can't re-claim.
(ns skuld.claim-test (:use clojure.tools.logging clojure.test skuld.util skuld.node skuld.node-test) (:require [skuld.client :as client] [skuld.admin :as admin] [skuld.vnode :as vnode] [skuld.flake :as flake] [skuld.curator :as ...
3bba42c39e5e14ede6ae761d064267401f1bc030e35c51f8e3d3dce828f8785e
links-lang/links
statistics.ml
(** Benchmarking helpers *) let query_timer = ref 0 let query_count = ref 0 let time_milliseconds () = int_of_float (Unix.gettimeofday () *. 1000.0) let debug_time_out f (withtime : int -> unit) = let start_time = time_milliseconds () in let raw_result = f () in let time = time_milliseconds () - start_time in ...
null
https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/lens/statistics.ml
ocaml
* Benchmarking helpers
let query_timer = ref 0 let query_count = ref 0 let time_milliseconds () = int_of_float (Unix.gettimeofday () *. 1000.0) let debug_time_out f (withtime : int -> unit) = let start_time = time_milliseconds () in let raw_result = f () in let time = time_milliseconds () - start_time in let _ = withtime time in ...
58ecc3afc551e73199578213fa1709222e73952a6805315926e2ab3ef3b3a1ed
stla/isosurfaces
Mandelbulb.hs
module OpenGL.Mandelbulb ( main ) where import Colors.ColorRamp import Control.Concurrent ( threadDelay ) import Control.Monad ( when ) import qualified Data.ByteString as B import Data.IORef import Data.Vector.Unboxed ...
null
https://raw.githubusercontent.com/stla/isosurfaces/c563ec5e6ab4ad41510f74bad407d34c5ac8a659/src/OpenGL/Mandelbulb.hs
haskell
rotations zoom animation animation delay save animation
module OpenGL.Mandelbulb ( main ) where import Colors.ColorRamp import Control.Concurrent ( threadDelay ) import Control.Monad ( when ) import qualified Data.ByteString as B import Data.IORef import Data.Vector.Unboxed ...
eb962ec1041b4e856f22013b5fc66788c77a0bff19b81e91569802c088a1e57e
Guest0x0/trebor
Eval.ml
open Syntax open Value exception RuntimeError let apply vf va = match vf with | Fun (_, f) -> f va | Stuck(h, e) -> Stuck(h, App(e, va)) | _ -> raise RuntimeError let project vpair field = match vpair, field with | Pair(fst, _), Fst -> fst | Pair(_, snd), Snd -> snd ...
null
https://raw.githubusercontent.com/Guest0x0/trebor/c6b6c099e3e848979bd8f501d28c4c2f35f1235e/Kernel/Eval.ml
ocaml
TODO: handling of absurd equalities (e.g. (A -> B) = (A * B))
open Syntax open Value exception RuntimeError let apply vf va = match vf with | Fun (_, f) -> f va | Stuck(h, e) -> Stuck(h, App(e, va)) | _ -> raise RuntimeError let project vpair field = match vpair, field with | Pair(fst, _), Fst -> fst | Pair(_, snd), Snd -> snd ...
2ef1353a17af5b71e6626d5c7389e5c6222a7dc3731a3d47ef3a2da3889cf0f9
synduce/Synduce
tree_gradient_a.ml
* @synduce --no - lifting type 'a tree = | Leaf of 'a | Node of 'a * 'a tree * 'a tree let reference x t = let rec f t = g x t and g y = function | Leaf a -> y > a, a | Node (a, l, r) -> let lh, la = g a l in let rh, ra = g la r in lh && rh && y > ra, a in f t ;; let target x t ...
null
https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/unrealizable/tree_gradient_a.ml
ocaml
* @synduce --no - lifting type 'a tree = | Leaf of 'a | Node of 'a * 'a tree * 'a tree let reference x t = let rec f t = g x t and g y = function | Leaf a -> y > a, a | Node (a, l, r) -> let lh, la = g a l in let rh, ra = g la r in lh && rh && y > ra, a in f t ;; let target x t ...
d73353e8d0f762d86e72411c798877b1970091e15ae87de633a31e0cde2d72e1
Quid2/zm
Data.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE EmptyDataDecls #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs ...
null
https://raw.githubusercontent.com/Quid2/zm/02c0514777a75ac054bfd6251edd884372faddea/test/Test/Data.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveTraversable # # LANGUAGE EmptyDataDecls # # LANGUAGE GADTs # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # A collection of data types used for testing. ...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NoMonomorphismRestriction # module Test.Data where import Data.Data import Data.Int import Data.Word import ...
ee9198ccb4f4238dd33317e98853bad1f36ad34b7771c61d01b32d601061b771
kaosf/clocure
project.clj
(defproject clocure "1.0.5" :description "Clojure + Precure = Clocure" :url "" :license {:name "MIT" :url ""} :dependencies [[org.clojure/clojure "1.8.0"]] :signing {:gpg-key ""} :deploy-repositories [["releases" {:url "" :signing {:gpg-key "A634258A"}}] ["snapshots" "...
null
https://raw.githubusercontent.com/kaosf/clocure/23f5c8b9b708f4768f9d6bfea59fa803159aacc5/project.clj
clojure
(defproject clocure "1.0.5" :description "Clojure + Precure = Clocure" :url "" :license {:name "MIT" :url ""} :dependencies [[org.clojure/clojure "1.8.0"]] :signing {:gpg-key ""} :deploy-repositories [["releases" {:url "" :signing {:gpg-key "A634258A"}}] ["snapshots" "...