_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
8b0d6c8de43184c4130d36325ab8a29f7614f5a55555b711ad59b44b69c739f9
mokus0/junkbox
LispNum.hs
#!runhaskell {-# OPTIONS -fglasgow-exts -fallow-undecidable-instances -fextended-default-rules #-} - " LispNum.hs " - ( c ) 2007 - "LispNum.hs" - (c) 2007 James Cook -} -- This is a rather pointless exercise. It's a pain to use, because -- the types of numeric constants don't unify automatically. m...
null
https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/TypeExperiments/LispNum.hs
haskell
# OPTIONS -fglasgow-exts -fallow-undecidable-instances -fextended-default-rules # This is a rather pointless exercise. It's a pain to use, because the types of numeric constants don't unify automatically. functional dependencies help a bit. extended default rules don't seem to. where (+) a = a
#!runhaskell - " LispNum.hs " - ( c ) 2007 - "LispNum.hs" - (c) 2007 James Cook -} module TypeExperiments.LispNum where import Prelude hiding ((+)) import qualified Prelude class LispNum a b | a -> b where (+) :: a -> b instance a = > LispNum a a instance (Prelude.Num a) => LispNum (a,a) a ...
ef1d09b24a12dbbc726e1fb1781f781384f43e7968ca3419eff999f35e4794d1
MyDataFlow/ttalk-server
exometer_report_opentsdb.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved . %% This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtai...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/exometer/src/exometer_report_opentsdb.erl
erlang
------------------------------------------------------------------- ------------------------------------------------------------------- @doc Custom reporting probe for OpenTSDB OpenTSDB integration. All data subscribed to by the plugin (through exosense_report:subscribe()) will be reported to OpenTSDB. Opti...
Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved . This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ` { reconnect_interval , non_neg_integer ( ) } ' - Time , in s...
ecb37ebc640cb627e166fddc3b6814ed07398ecee1b78ba494c918ceb3e9660e
VisionsGlobalEmpowerment/webchange
icon_search.cljs
(ns webchange.ui.components.icon.system.icon-search) (def data [:svg {:xmlns "" :width "24" :height "24" :viewBox "0 0 24 24" :class-name "stroke-colored" :fill "none" :stroke "#3453A1" :stroke-width "2" :stroke-linecap "round" :stroke-linejoin "round"} [:path {:d "M11 1...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/e5747e187937d85e9c92c728d52a704f323f00ef/src/cljs/webchange/ui/components/icon/system/icon_search.cljs
clojure
(ns webchange.ui.components.icon.system.icon-search) (def data [:svg {:xmlns "" :width "24" :height "24" :viewBox "0 0 24 24" :class-name "stroke-colored" :fill "none" :stroke "#3453A1" :stroke-width "2" :stroke-linecap "round" :stroke-linejoin "round"} [:path {:d "M11 1...
d37cc65232faa2db55ae84ed042a8d93d5cb3a6275727e098d4d6771f15cb995
roelvandijk/numerals
GSW.hs
| [ @ISO639 - 1@ ] - [ @ISO639 - 2@ ] gse [ @ISO639 - 3@ ] gse [ @Native name@ ] [ @English name@ ] Swiss German [@ISO639-1@] - [@ISO639-2@] gse [@ISO639-3@] gse [@Native name@] Schwyzerdütsch [@English name@] Swiss German -} module Text...
null
https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src/Text/Numeral/Language/GSW.hs
haskell
* Language entry * Conversions * Structure * Bounds ----------------------------------------------------------------------------- Imports ----------------------------------------------------------------------------- ------------------------------------------------------------------------------ --------------------...
| [ @ISO639 - 1@ ] - [ @ISO639 - 2@ ] gse [ @ISO639 - 3@ ] gse [ @Native name@ ] [ @English name@ ] Swiss German [@ISO639-1@] - [@ISO639-2@] gse [@ISO639-3@] gse [@Native name@] Schwyzerdütsch [@English name@] Swiss German -} module Text...
5d4ce1868e0c7e436199043ea9e435497004065dff47dcc5398af58c40a44ebe
aninhumer/haskell-dht
Protocol.hs
module Protocol.DHT ( Message(..), encodePacket, decodePacket ) where import Data.DHT.Node import Data.BData import Data.LargeWord (Word160) import qualified Data.ByteString.Lazy.Char8 as BS import Data.ByteString.Lazy.Char8 (ByteString) import Data.Binary (encode) import System.Random (randomIO) impo...
null
https://raw.githubusercontent.com/aninhumer/haskell-dht/e3026c5c3a97446ca4013f0f0e693d43a2291a14/Protocol.hs
haskell
module Protocol.DHT ( Message(..), encodePacket, decodePacket ) where import Data.DHT.Node import Data.BData import Data.LargeWord (Word160) import qualified Data.ByteString.Lazy.Char8 as BS import Data.ByteString.Lazy.Char8 (ByteString) import Data.Binary (encode) import System.Random (randomIO) impo...
4d06c054953c49a27e87523a19b50d41778fd8b1d7d7f15e6a9c0441a4174a0d
metabase/metabase
debug_qp.clj
(ns dev.debug-qp "TODO -- I think this should be moved to something like [[metabase.test.util.debug-qp]]" (:require [clojure.data :as data] [clojure.pprint :as pprint] [clojure.string :as str] [clojure.walk :as walk] [lambdaisland.deep-diff2 :as ddiff] [me...
null
https://raw.githubusercontent.com/metabase/metabase/e6aad38a1fd2ed55f61bf9c0b1ae3b3e57f543b1/dev/src/dev/debug_qp.clj
clojure
[[->sorted-mbql-query-map]] top-level keys inner-query and join keys stuff in [[mbql-clause->sort-order]] should always get sorted according to that order. Everything else should go at otherwise sort alphabetically [[add-names]] don't recursively replace the `do` lists above, other we'll get vectors. [[process-...
(ns dev.debug-qp "TODO -- I think this should be moved to something like [[metabase.test.util.debug-qp]]" (:require [clojure.data :as data] [clojure.pprint :as pprint] [clojure.string :as str] [clojure.walk :as walk] [lambdaisland.deep-diff2 :as ddiff] [me...
b578c3132c5b245dc85269c0c55d3ef33479a9a7b5ab9bd00966d4c2dfa15063
dking1286/joyful_clojure
routes.clj
(ns routes (:require [compojure.core :refer :all] [compojure.route :as route] [urls])) (defroutes root-handler (GET "/urls/:id" [] urls/get-url-handler) (POST "/urls" [] urls/create-url-handler) (route/not-found "Not found"))
null
https://raw.githubusercontent.com/dking1286/joyful_clojure/fa4a17091eab2318b2901a17d0d1004539b6ba76/03_clojure_application_development/src/routes.clj
clojure
(ns routes (:require [compojure.core :refer :all] [compojure.route :as route] [urls])) (defroutes root-handler (GET "/urls/:id" [] urls/get-url-handler) (POST "/urls" [] urls/create-url-handler) (route/not-found "Not found"))
7efb53ab78896f2901cad4086d149b567ff19ceabda8f45ebe0e0db73f028b21
kitlang/kit
IrModule.hs
module Kit.Ir.IrModule where import Kit.Ast import Kit.Ir.IrStmt data IrModule = IrModule { irmodPath :: ModulePath, irmod_declarations :: [IrStmt], irmodIncludes :: [FilePath] }
null
https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/src/Kit/Ir/IrModule.hs
haskell
module Kit.Ir.IrModule where import Kit.Ast import Kit.Ir.IrStmt data IrModule = IrModule { irmodPath :: ModulePath, irmod_declarations :: [IrStmt], irmodIncludes :: [FilePath] }
22b0a7927a24895aa59d015a0b04a378facaad8365e0d712f4115e1884e2b191
bgamari/the-thoralf-plugin
FiniteMaps.hs
# LANGUAGE TypeFamilies # {-# LANGUAGE TypeInType #-} {-# LANGUAGE GADTs #-} # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # LANGUAGE StandaloneDeriving # # LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE RankNTypes #-} {-# OPTIONS_GHC -Wno-unused-matches #-} # OPTIONS_GHC -Wno - incomplete - patterns # {-# OP...
null
https://raw.githubusercontent.com/bgamari/the-thoralf-plugin/fa4e403b25bfcaf9e8d5142ab40d3c54b33a3630/test-suite-rows/FiniteMaps.hs
haskell
# LANGUAGE TypeInType # # LANGUAGE GADTs # # LANGUAGE RankNTypes # # OPTIONS_GHC -Wno-unused-matches # # OPTIONS_GHC -fplugin ThoralfPlugin.Plugin # Uncomment for symtest Example 1 Union Test Intersect Test
# LANGUAGE TypeFamilies # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # LANGUAGE StandaloneDeriving # # LANGUAGE AllowAmbiguousTypes # # OPTIONS_GHC -Wno - incomplete - patterns # module FiniteMaps where import ThoralfPlugin.Theory.FiniteMap import Data.Type.Equality type LOne = '[ '(2,"hi"), '(1,"ok...
830a5d66d46a2335fa4b0a5df7ddfdfd9f02d5cdf1610761a95010406e9f347d
ocaml-multicore/parafuzz
fftba.ml
(* TEST *) open Bigarray let pi = 3.14159265358979323846 let tpi = 2.0 *. pi let fft (px : (float, float64_elt, c_layout) Array1.t) (py : (float, float64_elt, c_layout) Array1.t) np = let i = ref 2 in let m = ref 1 in while (!i < np) do i := !i + !i; m := !m + 1 done; let n = !i in if...
null
https://raw.githubusercontent.com/ocaml-multicore/parafuzz/6a92906f1ba03287ffcb433063bded831a644fd5/testsuite/tests/lib-bigarray/fftba.ml
ocaml
TEST ********************************** Last stage, length=2 butterfly ********************************** *********************** Bit reverse counter ***********************
open Bigarray let pi = 3.14159265358979323846 let tpi = 2.0 *. pi let fft (px : (float, float64_elt, c_layout) Array1.t) (py : (float, float64_elt, c_layout) Array1.t) np = let i = ref 2 in let m = ref 1 in while (!i < np) do i := !i + !i; m := !m + 1 done; let n = !i in if n <> np th...
547504cce2fc42faa01b6808b90f23e3d74f2286f7c497d14692f4c6f63c7976
techascent/tvm-clj
_vm.clj
(ns tvm-clj.impl.fns.relay._vm (:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns])) (tvm-ns-fns/export-tvm-functions "relay._vm")
null
https://raw.githubusercontent.com/techascent/tvm-clj/1088845bd613b4ba14b00381ffe3cdbd3d8b639e/src/tvm_clj/impl/fns/relay/_vm.clj
clojure
(ns tvm-clj.impl.fns.relay._vm (:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns])) (tvm-ns-fns/export-tvm-functions "relay._vm")
7d7af3dc68fc51ddcd06dfbe265098789d89d432f9d63104b2bd66df3f8fd3c4
ntoronto/drbayes
normal-normal-cond-query.rkt
#lang racket (require racket/flonum drbayes drbayes/private/flonum drbayes/tests/test-utils plot) (define (print-hline) (printf "~n~a~n" (make-string 90 #\=))) (print-hline) (: 3d - plots ? ( ) ) (define 3d-plots? (make-parameter #t)) ;; Normal-normal model (begin (3d-plots?...
null
https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/tests/language-tests/probability-bounds-tests/normal-normal-cond-query.rkt
racket
Normal-normal model Normal-normals model
#lang racket (require racket/flonum drbayes drbayes/private/flonum drbayes/tests/test-utils plot) (define (print-hline) (printf "~n~a~n" (make-string 90 #\=))) (print-hline) (: 3d - plots ? ( ) ) (define 3d-plots? (make-parameter #t)) (begin (3d-plots? #f) (drbayes-enum...
935fcf63b4aefa82a21768c39797a1fcfb0a569167464576cf977376159ece6e
40ants/defmain
main.lisp
(defpackage #:example (:use #:cl) (:export #:main)) (in-package example) (defmain:defmain (main :program-name "example") ((verbose "Show more details in the output." :flag t) &subcommand) "The main program to host subcommands." ;; These lines are optional (format t "Before subcomma...
null
https://raw.githubusercontent.com/40ants/defmain/fa168ee8043e7b5ddcda4eb9b57993ab2ca26781/examples/subcommands/main.lisp
lisp
These lines are optional
(defpackage #:example (:use #:cl) (:export #:main)) (in-package example) (defmain:defmain (main :program-name "example") ((verbose "Show more details in the output." :flag t) &subcommand) "The main program to host subcommands." (format t "Before subcommand.~%") (defmain:subcommand)...
f80f480db0feffbabd54f29d3ac896e3e352063f67bba16ee96bb04c3f8c19f5
dmp1ce/DMSS
Storage.hs
-- | -- Module : DMSS.Storage -- License : Public Domain -- -- Maintainer : -- Stability : experimental -- Portability : untested -- -- Dead Man Switch System storage module -- module DMSS.Storage ( storeCheckIn , listCheckIns , latestCheckIns , v...
null
https://raw.githubusercontent.com/dmp1ce/DMSS/fd88690d97ed267e76f8345e6a76cd3727ef4efb/src-lib/DMSS/Storage.hs
haskell
| Module : DMSS.Storage License : Public Domain Maintainer : Stability : experimental Portability : untested Dead Man Switch System storage module | Store User information ^ Username ^ Hash and salt for deriving symm key ^ Box keypair encrypted ^ Box keypair encrypted ^ User to delete by na...
module DMSS.Storage ( storeCheckIn , listCheckIns , latestCheckIns , verifyPublicCheckIn , storeUser , listUsers , storePeer , listPeers , removePeer ...
455b29c5ed2b53b426bcb5a0f827d8c472963f04a6323c1e9a397ddd5d58ebfe
willemdj/erlsom
erlsom_writeHrl.erl
Copyright ( C ) 2006 - 2008 %%% This file is part of Erlsom . %%% Erlsom 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/willemdj/erlsom/41967fcda4fde9593f0eb9f43cdc08701ef3ba4e/src/erlsom_writeHrl.erl
erlang
it under the terms of the GNU Lesser General Public License as but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the </>. Author contact: ==================================================================== =============================...
Copyright ( C ) 2006 - 2008 This file is part of Erlsom . Erlsom is free software : you can redistribute it and/or modify published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . Erlsom is distributed in the hope that it will be useful , GN...
aea91a59810eebf923a60a9e84cae164fa5a8f45fad1661ef47620d15b975988
nyu-acsys/drift
inductive2.ml
let rec f x = if x < -1 then f (-2) else if x <= 0 then -1 else if x <= 2 then 3 - x else x let main (n:unit) = assert (f 3 >= 0) let _ = main ()
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/r_type/first/inductive2.ml
ocaml
let rec f x = if x < -1 then f (-2) else if x <= 0 then -1 else if x <= 2 then 3 - x else x let main (n:unit) = assert (f 3 >= 0) let _ = main ()
a1677cc6ff0d8668901b863113163756592b1ea813b2d3acf0e464624dc918b1
ammarhakim/gkylcas
basisTensor2x2v.lisp
;;; -*- Mode: LISP; package:maxima; syntax:common-lisp; -*- (in-package :maxima) (DSKSETQ |$varsC| '((MLIST SIMP) $X $Y)) (ADD2LNC '|$varsC| $VALUES) (DSKSETQ |$varsP| '((MLIST SIMP) $X $Y $VX $VY)) (ADD2LNC '|$varsP| $VALUES) (DSKSETQ |$basisC| '((MLIST SIMP (10. "/Users/JunoRavi...
null
https://raw.githubusercontent.com/ammarhakim/gkylcas/1f8adad4f344ce8e3663451e16fdf1c32107ceed/maxima/g2/basis-precalc/basisTensor2x2v.lisp
lisp
-*- Mode: LISP; package:maxima; syntax:common-lisp; -*-
(in-package :maxima) (DSKSETQ |$varsC| '((MLIST SIMP) $X $Y)) (ADD2LNC '|$varsC| $VALUES) (DSKSETQ |$varsP| '((MLIST SIMP) $X $Y $VX $VY)) (ADD2LNC '|$varsP| $VALUES) (DSKSETQ |$basisC| '((MLIST SIMP (10. "/Users/JunoRavin/gkyl/cas-scripts/basis-precalc/basis-pre-calc.mac" ...
1615e88bc84fa1b5564237b52e6266d1c4e8087f3f3a6de1965f268ebdf97a5e
tweag/ormolu
operators-2.hs
foo n | x || y && z || n ** x || x && n = 42
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/function/operators-2.hs
haskell
foo n | x || y && z || n ** x || x && n = 42
e4d26051196799ec5f490a6fc0c5101a4730a6c3489d5d620a3cc2bc73870915
hexlet-basics/exercises-clojure
test.clj
(ns vectors-choose-test (:require [test-helper :refer [assert-solution]] [index :refer [sum]])) (assert-solution [[[]] [[1 2 3 4]] [[10 -20]]] [0 10 -10] sum)
null
https://raw.githubusercontent.com/hexlet-basics/exercises-clojure/ede14102d01f9ef736e0af811cd92f5b22a83bc2/modules/35-vectors/20-vectors-choose/test.clj
clojure
(ns vectors-choose-test (:require [test-helper :refer [assert-solution]] [index :refer [sum]])) (assert-solution [[[]] [[1 2 3 4]] [[10 -20]]] [0 10 -10] sum)
49d82b8b699a532bd4609bce00f81ccb402f541901af116aaff87131c73e65f8
ejconlon/blanks
ProgramTest.hs
module Test.Blanks.Tests.ProgramTest ( testProgram ) where import Blanks (emptyLiftState, globalScope, locScopeHoistAnno, locatedVal, predClassifier, predLiftLocScope, runState, trackScope) import qualified Data.Map.Strict as Map import qualified Data.Set as Set import Test.Blanks.Lib.Exp (CDecl (.....
null
https://raw.githubusercontent.com/ejconlon/blanks/296a04fb0c6769076c84f91b085c38f4ff098831/test/Test/Blanks/Tests/ProgramTest.hs
haskell
import Text.Pretty.Simple (pPrint) putStrLn "*** INIT DECLS ***" pPrint dmap putStrLn "*** SPLIT STATE ***" pPrint st putStrLn "*** SPLIT DECLS ***" pPrint smap
module Test.Blanks.Tests.ProgramTest ( testProgram ) where import Blanks (emptyLiftState, globalScope, locScopeHoistAnno, locatedVal, predClassifier, predLiftLocScope, runState, trackScope) import qualified Data.Map.Strict as Map import qualified Data.Set as Set import Test.Blanks.Lib.Exp (CDecl (.....
d2dfb7cb5dbe691f5ad8e8d2c76272dff3be340bd9b11ed08d0ded81e4ebb7bd
metaocaml/ber-metaocaml
stripdebug.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/tools/stripdebug.ml
ocaml
************************************************************************ OCaml ...
, projet Gallium , INRIA Paris Copyright 2015 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Printf open Misc let stripdebug infile outfile = let ic = open_in_bin infile in Bytesections.r...
092ac39ffcdf00c4fa28dbcc8b136e46086b88948bb41907b474f9d2b5956f5b
f-me/carma-public
System.hs
module Carma.Model.Diagnostics.System where import Data.Text import Data.Typeable import Carma.Model.PgTypes () import Data.Model import Data.Model.View data System = System { ident :: PK Int System "Система" , label :: F Text "label" "Название" } deriving Typeable instance Model System where type TableNam...
null
https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/carma-models/src/Carma/Model/Diagnostics/System.hs
haskell
module Carma.Model.Diagnostics.System where import Data.Text import Data.Typeable import Carma.Model.PgTypes () import Data.Model import Data.Model.View data System = System { ident :: PK Int System "Система" , label :: F Text "label" "Название" } deriving Typeable instance Model System where type TableNam...
3c6d7ae18eb4359be4fe242b639d21de17cabf2f933cfe0e878f9c5339770d2f
bickfordb/haskell-taglib
TagLib.hs
-------------------------------------------------------------------------------- -- | -- Module : Sound.TagLib Copyright : ( c ) 2008 -- License : LGPL v3 Maintainer : < > -- Stability : experimental Portability : only tested with GHC -- High level interface to read and write tag fields ( alb...
null
https://raw.githubusercontent.com/bickfordb/haskell-taglib/e3fce97b0e4d79e94377a81cce7a6022aceab5fd/src/Sound/TagLib.hs
haskell
------------------------------------------------------------------------------ | Module : Sound.TagLib License : LGPL v3 Stability : experimental comment, genre, title, track number, year) and get audio properties (length, bit rate, sample rate, channels) -----------------------------------------------...
Copyright : ( c ) 2008 Maintainer : < > Portability : only tested with GHC High level interface to read and write tag fields ( album , artist , module Sound.TagLib ( AudioProperties, Tag, TagFile, open, save, tag, album, artist, comment, genre, setAl...
2191bdd674bff1d195d18487f750757a39495382631df4b38cc6a0298be553cb
mtesseract/nakadi-client
Util.hs
| Module : Network . . Internal . Types . Util Description : Nakadi Client Utilities for Types ( Internal ) Copyright : ( c ) 2017 , 2018 License : : Stability : experimental Portability : POSIX Internal utility functions used for type definitions . Module : Network.Nakad...
null
https://raw.githubusercontent.com/mtesseract/nakadi-client/f8eef3ac215459081b01b0b48f0b430ae7701f52/src/Network/Nakadi/Internal/Types/Util.hs
haskell
| Construct a field renamer function from a field renamer map.
| Module : Network . . Internal . Types . Util Description : Nakadi Client Utilities for Types ( Internal ) Copyright : ( c ) 2017 , 2018 License : : Stability : experimental Portability : POSIX Internal utility functions used for type definitions . Module : Network.Nakad...
4874cee8c73147c9bf782a003eb4b2247f51c808542de4bbcd3837cde23abb25
valderman/haste-compiler
LocalTime.hs
{-# OPTIONS -fno-warn-orphans -fno-warn-unused-imports #-} #include "HsConfigure.h" -- #hide module Data.Time.LocalTime.LocalTime ( -- * Local Time LocalTime(..), converting UTC and UT1 times to LocalTime utcToLocalTime,localTimeToUTC,ut1ToLocalTime,localTimeToUT1, ZonedTime(..),utcToZonedTime,zonedTimeToUTC,...
null
https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/libraries/time/lib/Data/Time/LocalTime/LocalTime.hs
haskell
# OPTIONS -fno-warn-orphans -fno-warn-unused-imports # #hide * Local Time Conversion of this (as local civil time) to UTC depends on the time zone. Conversion of this (as local mean time) to UT1 depends on the longitude. orphan instance |
#include "HsConfigure.h" module Data.Time.LocalTime.LocalTime ( LocalTime(..), converting UTC and UT1 times to LocalTime utcToLocalTime,localTimeToUTC,ut1ToLocalTime,localTimeToUT1, ZonedTime(..),utcToZonedTime,zonedTimeToUTC,getZonedTime,utcToLocalZonedTime ) where import Data.Time.LocalTime.TimeOfDay import...
43539abd3863f0e695d2d0385aebccdc6c29cd18365b5a6521fee8d77a2fe9b3
PLSysSec/lio
Application.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE DeriveDataTypeable #-} module Application where import Control.Applicative import Control.Monad import Control.Monad.IO.Class import Chat.Common import Data.Monoid import Data.Aeson import Data.Typeable import qualified Data.ByteString.Char8...
null
https://raw.githubusercontent.com/PLSysSec/lio/622a3e7bc86a3b42ab4ce8be954064a5f142247a/lio-simple/examples/chat-in-memory/Application.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveDataTypeable # Posts Respond to "/new" Repond to GET "/group/:id" Create new group Repond to GET "/group/:id/edit" Update group Create new post Helpers raise clearance since the action is in a lifted monad, we cannot generally restore the clearance, b...
# LANGUAGE FlexibleContexts # module Application where import Control.Applicative import Control.Monad import Control.Monad.IO.Class import Chat.Common import Data.Monoid import Data.Aeson import Data.Typeable import qualified Data.ByteString.Char8 as S8 import qualified Data.Maybe as Maybe import qualified Data.List ...
74538a5c3bcd11f8fdde9b02cddcb80d0691c6f458ca369d1809ffafe3129487
karamellpelle/grid
Screen.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid 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 , or -- (at your optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/Memory/Output/Plain/Screen.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
grid is a game written in Haskell Copyright ( C ) 2018 it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License module Game.Memory.Output.Plain.Screen ( outp...
fffb4ecdbe823c9ebc5bd9cb0ace6e44bf6b2f7e2b5910063ea0795b90359e70
haskell-gi/haskell-gi
Widget.hs
# LANGUAGE ScopedTypeVariables # This is needed because of using the IsWidget constraint synonym in -- printWidgetTree. See -- -gi/haskell-gi/pull/376#discussion_r786423429 -- for a little discussion of this. # OPTIONS_GHC -fno - warn - simplifiable - class - constraints # -- | -- Stability : provisional Porta...
null
https://raw.githubusercontent.com/haskell-gi/haskell-gi/5e6ab75d212a551db22eba194553eb2b38794e25/gi-gtk-hs/src/Data/GI/Gtk/Widget.hs
haskell
printWidgetTree. See -gi/haskell-gi/pull/376#discussion_r786423429 for a little discussion of this. | Stability : provisional Helper functions for working with 'Widget's. mainly to help with debugging. This function outputs a tree of 'Widget's like the following: > GtkApplicationWindow 0x00000000068de2a...
# LANGUAGE ScopedTypeVariables # This is needed because of using the IsWidget constraint synonym in # OPTIONS_GHC -fno - warn - simplifiable - class - constraints # Portability : portable ( depends on GHC ) module Data.GI.Gtk.Widget ( printWidgetTree ) where import Control.Monad.IO.Class (MonadIO, liftI...
a08a62d3cc5c31a1e80328261e7cc72684a07286b8149b53b78178094c2ccbea
nasser/magic
ns_libs.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/nasser/magic/7a46f773bc7785c82d9527d52c1a8c28ac16e195/tests/clojure/test_clojure/ns_libs.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . Author : , (ns clojure.test-clojure.ns-libs (:use clojure.test)) (deftest test-alias (is (thrown-with-msg? Exception #"No namespace: epicfail found" (alias 'bogus 'epicfail)))) (deftest test-require (is (thrown? Exception (require :foo))) ...
5fe349527c08aa150105bfedd915fd33f58805fd663a801e474a070fd308fc2b
mcorbin/meuse
crate_test.clj
(ns meuse.api.crate.crate-test (:require [meuse.api.crate.http :refer :all] [meuse.api.crate.new :refer :all] [meuse.api.crate.yank :refer :all] [meuse.db.actions.crate :as crate-db] [meuse.db.actions.user :as user-db] [meuse.message :refer [publish-commit-m...
null
https://raw.githubusercontent.com/mcorbin/meuse/d2b74543fce37c8cde770ae6f6097cabb509a804/test/meuse/api/crate/crate_test.clj
clojure
(ns meuse.api.crate.crate-test (:require [meuse.api.crate.http :refer :all] [meuse.api.crate.new :refer :all] [meuse.api.crate.yank :refer :all] [meuse.db.actions.crate :as crate-db] [meuse.db.actions.user :as user-db] [meuse.message :refer [publish-commit-m...
0b2b1731c4a9b5115b39bcfc10378070b5e147b91c36d290468a5aee5743f7b1
UU-ComputerScience/uhc
data-field16.hs
-- data field pattern match: fail, constructor name incorrect % % inline test ( ) -- data X a = X { b :: Int, a, c :: a } | Y { b :: Int } | Z { d :: Int } x1 = X 1 'a' 'b' x2 = case x1 of XX { c = cc, b = bb } -> (bb,cc) main = x2 # 1
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/7/data-field16.hs
haskell
data field pattern match: fail, constructor name incorrect
data X a = X { b :: Int, a, c :: a } | Y { b :: Int } | Z { d :: Int } x1 = X 1 'a' 'b' x2 = case x1 of XX { c = cc, b = bb } -> (bb,cc) main = x2 # 1
081cfc8bdd2a013f277b54ad95ae2ca30b2091391c6d07e2780d46297fd3d04e
jepsen-io/jepsen
ubuntu.clj
(ns jepsen.os.ubuntu "Common tasks for Ubuntu/CockroachDB boxes." (:use clojure.tools.logging) (:require [clojure.set :as set] [jepsen.util :refer [meh]] [jepsen.os :as os] [jepsen.os.debian :as debian] [jepsen.control :as c] [jepsen.control.util :as cu]...
null
https://raw.githubusercontent.com/jepsen-io/jepsen/a75d5a50dd5fa8d639a622c124bf61253460b754/cockroachdb/src/jepsen/os/ubuntu.clj
clojure
Packages! (no log messages I've been able to find). Sometimes it fails several times in a row. Keep trying until the process is gone. 18.04 switches to chronyd instead so this will need to be updated.
(ns jepsen.os.ubuntu "Common tasks for Ubuntu/CockroachDB boxes." (:use clojure.tools.logging) (:require [clojure.set :as set] [jepsen.util :refer [meh]] [jepsen.os :as os] [jepsen.os.debian :as debian] [jepsen.control :as c] [jepsen.control.util :as cu]...
b489adf549be561cfc8c63fd85330663f8b55f27379c33adfa5f740de4f82dfe
rd--/hsc3
tRandN.help.hs
-- tRandN ; n sine tones, set to uniform-random frequencies on trigger let n = 12 tr = impulse kr 1 0 in splay (sinOsc ar (X.tRandNId n 'α' 440 880 tr) 0) 1 0.1 0 True
null
https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/tRandN.help.hs
haskell
tRandN ; n sine tones, set to uniform-random frequencies on trigger
let n = 12 tr = impulse kr 1 0 in splay (sinOsc ar (X.tRandNId n 'α' 440 880 tr) 0) 1 0.1 0 True
6af7a1f41f3ecb63766fb1a05bf460ee4eecf4ba321a640bab519f1d0c2a593e
dyzsr/ocaml-selectml
stream.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/stdlib/stream.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1997 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the type 'a t = 'a cell option and 'a cell = { mutable count : int; mutable data : 'a data } and 'a data = Sempt...
5a1231d8b55f7b96a5bba4fe619385491d021410235cb4494ed81036dd4f41ed
Mathieu-Desrochers/Schemings
smtp.scm
(import (chicken condition)) (import (chicken format)) (declare (unit smtp)) (declare (uses etpan)) (declare (uses exceptions)) ;; encapsulates a smtp connection (define-typed-record smtp-connection (server string) (port fixnum) (user string) (password string) (mailsmtp* pointer)) ;; invokes a procedure w...
null
https://raw.githubusercontent.com/Mathieu-Desrochers/Schemings/3df7c8f8589a1c9c4135a3ae4c1bab3244e6444c/sources/units/smtp.scm
scheme
encapsulates a smtp connection invokes a procedure with a smtp connection sends an email connect start tls authenticate prepare the origin prepare the recepient prepare the data send the email
(import (chicken condition)) (import (chicken format)) (declare (unit smtp)) (declare (uses etpan)) (declare (uses exceptions)) (define-typed-record smtp-connection (server string) (port fixnum) (user string) (password string) (mailsmtp* pointer)) (: with-smtp-connection (forall (r) (string fixnum strin...
5904e3b4b1f0d06aaba3debbc8fa74944dcd71b8aaa405e6df4901fd6de6415e
lisp-mirror/cl-tar
ustar-archive.lisp
;;;; ustar archives ;;;; ;;;; This is part of cl-tar. See README.md and LICENSE for more information. (in-package #:tar) (defclass ustar-archive (archive) () (:documentation "A ustar archive that adds more fields to the header when compared to V7-ARCHIVEs.")) (defun split-name (name) (if (<= (length name) 1...
null
https://raw.githubusercontent.com/lisp-mirror/cl-tar/7c6e07a10c93d9e311f087b5f6328cddd481669a/src/ustar-archive.lisp
lisp
ustar archives This is part of cl-tar. See README.md and LICENSE for more information. Reading Writing NULL. NULL. NULL. NULL.
(in-package #:tar) (defclass ustar-archive (archive) () (:documentation "A ustar archive that adds more fields to the header when compared to V7-ARCHIVEs.")) (defun split-name (name) (if (<= (length name) 100) (values nil name) (let ((position (position #\/ name :...
7e82dc814ddfdd8255ecab81b944d7c2a87230de183e53df9fb57881648601f6
DavidAlphaFox/RabbitMQ
rabbit_mgmt_wm_cluster_name.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_cluster_name.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...
f99185c027fdfeca80c17f5b9974ba212ab9fa25f6f45b0f8785433b003fee57
tzemanovic/haskell-yesod-realworld-example-app
Database.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # module Database ( ArticleData(..) , CommentData(..) , encodeProfile -- * Queries , getArticle , getGlobalArticleFeed , getUserArticleFeed , getComment , getCommentsByArticleSlug ) where import ...
null
https://raw.githubusercontent.com/tzemanovic/haskell-yesod-realworld-example-app/d9f5191a909fa3c0087c5f28fcaae7ad1eca8b9a/app/src/Database.hs
haskell
# LANGUAGE OverloadedStrings # * Queries ------------------------------------------------------------------------------ Data ------------------------------------------------------------------------------ | Get article by ID. | Get articles by tag, author or favorited by with pagination. | Get user's article feed b...
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # module Database ( ArticleData(..) , CommentData(..) , encodeProfile , getArticle , getGlobalArticleFeed , getUserArticleFeed , getComment , getCommentsByArticleSlug ) where import ClassyPrelude.Yesod hiding (Value, isNothing, o...
cc563d06c441cc99dbbd6ccfca952d0f00f22f739f8ab5717e19b3e62c1e620e
plumatic/grab-bag
core.clj
(ns dashboard.data.core "Shared schemas and data utilities" (:use plumbing.core) (:require [schema.core :as s] [plumbing.new-time :as new-time])) (defn sorted-seq? [s] (= s (sort s))) (s/defschema Timeseries (s/both [(s/pair long "millis" (s/maybe s/Num) "value")] (s/pred #(sorted-seq? (map firs...
null
https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/service/dashboard/src/clj/dashboard/data/core.clj
clojure
(ns dashboard.data.core "Shared schemas and data utilities" (:use plumbing.core) (:require [schema.core :as s] [plumbing.new-time :as new-time])) (defn sorted-seq? [s] (= s (sort s))) (s/defschema Timeseries (s/both [(s/pair long "millis" (s/maybe s/Num) "value")] (s/pred #(sorted-seq? (map firs...
dbee200c481b1017f675221683d3f32a97e08063d68a837e7d5257990bb90bcc
aeternity/aeternity
aeo_query.erl
%%%------------------------------------------------------------------- ( C ) 2017 , Aeternity Anstalt %%% @doc ADT for oracle query objects . %%% @end %%%------------------------------------------------------------------- -module(aeo_query). %% API -export([ add_response/3 , deserialize/2 , deser...
null
https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/apps/aeoracle/src/aeo_query.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API =================================================================== Types =================================================================== ========================...
( C ) 2017 , Aeternity Anstalt ADT for oracle query objects . -module(aeo_query). -export([ add_response/3 , deserialize/2 , deserialize_from_fields/3 , serialization_type/0 , serialization_template/1 , ttl/1 , fee/1 , ga_id/2 , id/1 , id/3 ...
9dd89d695f53c499adeeba27a2aa5b0c367b40fcb962bbf52fd70d1c35a6b569
erlang/corba
ic_util.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1998 - 2016 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applic...
null
https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/ic/src/ic_util.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific l...
Copyright Ericsson AB 1998 - 2016 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(ic_util). -include("icforms.hrl"). -include("ic.hrl"). -include("ic_debug.hrl"). -export([mk_align/1, mk...
b0de0b868e49f8c7973a16efc6224e226643db73df27ecbaab08f85841814004
smallmelon/sdzmmo
mod_mon_active.erl
%%%------------------------------------ %%% @Module : mod_mon_active @Author : xyao %%% @Email : @Created : 2010.05.12 %%% @Description: 怪物活动状态 %%%------------------------------------ -module(mod_mon_active). -behaviour(gen_fsm). -export([ start/1, sleep/2, trace/2, ...
null
https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/mod/mod_mon_active.erl
erlang
------------------------------------ @Module : mod_mon_active @Email : @Description: 怪物活动状态 ------------------------------------ 自动移动时间 每个怪物一个进程 打开战斗进程 副本杀怪 掉落 清除进程 减HP 先判断是否已经死亡 广播给附近玩家 =========处理怪物所有状态========= 静止状态并回血 判断是否死亡 被动怪 可以进行攻击了 还不能进行攻击就追踪他 死亡 }, ...
@Author : xyao @Created : 2010.05.12 -module(mod_mon_active). -behaviour(gen_fsm). -export([ start/1, sleep/2, trace/2, revive/2, back/2 ]). -export([init/1, handle_event/3, handle_sync_event/4, handle_info/3, terminate/3, code_change/4]). -include("comm...
5f3923bac9e1d71daa5514c613c66b23466eaf37087b66d281491d144a1caaf9
ghcjs/ghcjs-dom
SVGTests.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.SVGTests (js_hasExtension, hasExtension, hasExtension_, js_getRequiredFeatures,...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGTests.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/SVGTests.hasExtension Mozilla SVGTests.hasExtension documentation> | <-US/docs/Web/API/SVGTests.hasExtension Mozilla SVGTests.hasExtension documentation> | <-US/docs/Web/API/SVGTests.requiredFeatures Mo...
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.SVGTests (js_hasExtension, hasExtension, hasExtension_, js_getRequiredFeatures, getRequiredFeatures, js_getRequiredExtensions, getRequiredExtensions, js_getSystem...
1ecba4cdc634806bb596d1c2000b20ec5d8b69d2b7bd219321590da393e8bc6b
robert-stuttaford/bridge
edit_test.clj
(ns bridge.person.data.edit-test (:require [bridge.person.data :as person.data] [bridge.person.data.edit :as person.data.edit] [bridge.person.schema :as person.schema] [bridge.test.fixtures :as fixtures :refer [TEST-PERSON-ID]] [bridge.test.util :refer [conn db test-set...
null
https://raw.githubusercontent.com/robert-stuttaford/bridge/867d81354457c600cc5c25917de267a8e267c853/test/bridge/person/data/edit_test.clj
clojure
(ns bridge.person.data.edit-test (:require [bridge.person.data :as person.data] [bridge.person.data.edit :as person.data.edit] [bridge.person.schema :as person.schema] [bridge.test.fixtures :as fixtures :refer [TEST-PERSON-ID]] [bridge.test.util :refer [conn db test-set...
1abd5e420613992f6bb2e5837c7166b8804bc2c4301f970238f8246a4fd876ce
Dretch/foundationdb-explorer
JGridSpec.hs
module FDBE.Component.JGridSpec (spec) where import Control.Lens ((&), (.~), (^.)) import qualified Data.Foldable as Foldable import FDBE.Component.JGrid import Monomer import qualified Monomer.Lens as L import Monomer.TestUtil import Test.Hspec (Spec, describe, it, shouldBe) spec :: Spec spec = do getSizeReq res...
null
https://raw.githubusercontent.com/Dretch/foundationdb-explorer/b4c91a71a3beb6533056edd1d1ebad7228640d37/test/FDBE/Component/JGridSpec.hs
haskell
module FDBE.Component.JGridSpec (spec) where import Control.Lens ((&), (.~), (^.)) import qualified Data.Foldable as Foldable import FDBE.Component.JGrid import Monomer import qualified Monomer.Lens as L import Monomer.TestUtil import Test.Hspec (Spec, describe, it, shouldBe) spec :: Spec spec = do getSizeReq res...
94016d8d9916c28bc69c6dde548287803f8980d9e36f8111512b61976955884e
Eonblast/Scalaxis
yaws_xmlrpc.erl
Copyright ( C ) 2003 < > . %% All rights reserved. %% Copyright ( C ) 2006 < > < > %% 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 . Redistribu...
null
https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/contrib/yaws/src/yaws_xmlrpc.erl
erlang
All rights reserved. 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. copyright notice, this list of conditions and the follow...
Copyright ( C ) 2003 < > . Copyright ( C ) 2006 < > < > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS DIRECT , INDIRECT , INCI...
4fc781d4776041cb14d35b48c1d35f50f1ad65c2785f52d7e3491052937831f0
tmattio/js-bindings
declaration.mli
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"] ] open Ts2ocaml_baselib unknown identifiers : - BaseLanguageClient - CancellationToken - ClientCapabilities - DeclarationOptions - DeclarationProvider - DeclarationRegistrationOptions - Disposable ...
null
https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/vscode-languageclient/_gen/declaration.mli
ocaml
import { TextDocumentFeature, BaseLanguageClient } from './client';
[@@@ocaml.warning "-7-11-32-33-39"] [@@@js.implem [@@@ocaml.warning "-7-11-32-33-39"] ] open Ts2ocaml_baselib unknown identifiers : - BaseLanguageClient - CancellationToken - ClientCapabilities - DeclarationOptions - DeclarationProvider - DeclarationRegistrationOptions - Disposable ...
971f6aeb3ce841add34be286c002704090ad730a70673fc875abb97ffd18f8a4
nasa/Common-Metadata-Repository
generics_test.clj
(ns cmr.system-int-test.ingest.generics-test "Tests for the Generic Concept Ingest API" (:require [cheshire.core :as json] [clojure.string :as string] [clojure.test :refer :all] [cmr.mock-echo.client.echo-util :as echo-util] [cmr.common.config :as config] [cmr.common.generics :as gcfg] [cmr.ing...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/1606a1949aad31833d37718d25dce3190be8a9fe/system-int-test/test/cmr/system_int_test/ingest/generics_test.clj
clojure
Tests Check the functions which validate generic metadata remove a required tag these fields are complicated to test, do so another way test that the create was a success test that the created document can be read back and was stored correctly Test the content in sections to make it easy to see where a problem...
(ns cmr.system-int-test.ingest.generics-test "Tests for the Generic Concept Ingest API" (:require [cheshire.core :as json] [clojure.string :as string] [clojure.test :refer :all] [cmr.mock-echo.client.echo-util :as echo-util] [cmr.common.config :as config] [cmr.common.generics :as gcfg] [cmr.ing...
fe242523227a7e9dc6501ceed94dad62025497ee0782f07420f6d35564dcda38
meiersi/blaze-builder
Buffer.hs
# LANGUAGE CPP , BangPatterns , Rank2Types # #ifdef USE_MONO_PAT_BINDS # LANGUAGE MonoPatBinds # #endif -- | Module : Blaze . ByteString . Builder . Internal . Buffer Copyright : ( c ) 2010 -- License : BSD3-style (see LICENSE) -- Maintainer : < > -- Stability : experimental Portability ...
null
https://raw.githubusercontent.com/meiersi/blaze-builder/2d8ce308951656ebf0318097989dc1c017dcff83/Blaze/ByteString/Builder/Internal/Buffer.hs
haskell
| License : BSD3-style (see LICENSE) Stability : experimental Execution of the 'Put' monad and hence also 'Builder's with respect to buffers. * Buffers ** Status information ** Creation and modification ** Conversion to bytestings * Buffer allocation strategies * Executing puts respect to some monad...
# LANGUAGE CPP , BangPatterns , Rank2Types # #ifdef USE_MONO_PAT_BINDS # LANGUAGE MonoPatBinds # #endif Module : Blaze . ByteString . Builder . Internal . Buffer Copyright : ( c ) 2010 Maintainer : < > Portability : tested on GHC only module Blaze.ByteString.Builder.Internal.Buffer ( Buffe...
246e658459c580430b9ec47956558c26c79333ed305e890054b2d801cca97d77
brandonbloom/factjor
core.clj
(ns factjor.core (:refer-clojure :exclude [drop keep identical? = + - * / < <= = >= > not= inc dec pr prn print println and or not boolean count ...
null
https://raw.githubusercontent.com/brandonbloom/factjor/88d5889a740bd54dd0f8480c02be3004c12f9340/src/factjor/core.clj
clojure
Forms for defining words <$> interpreter This one should be obvious Kernel Shuffle words Removing stack elements Duplicating stack elements Permuting stack elements Objects Equality Basic data types Numbers Combinators Preserving combinators dip combinators: invoke the quotation at the top of stack, ...
(ns factjor.core (:refer-clojure :exclude [drop keep identical? = + - * / < <= = >= > not= inc dec pr prn print println and or not boolean count ...
0dc0d200c6acd80f903355f3c11ec5ce80788bd2e98acca798f59b22278fda5e
ndmitchell/supero
Match.hs
module Match(Binding, findExactRhs, findBestRhs, matchBinding, replaceBinding) where import Type import Data.List import Data.Play import Data.Maybe import Control.Monad import General type Binding = [(Int, Expr)] -- find the RHS that matches perfectly findExactRhs :: Func -> [Expr] -> Maybe (Int,Binding,Expr) f...
null
https://raw.githubusercontent.com/ndmitchell/supero/a8b16ea90862e2c021bb139d7a7e9a83700b43b2/Dead/version1/Match.hs
haskell
find the RHS that matches perfectly NOTE ON ARITIES: Given: f x = body asking for: f y z Gives: Apply (body[x/y]) z substituted gives the RHS iff LHS[binding] = RHS replace the appropriate places in the expression
module Match(Binding, findExactRhs, findBestRhs, matchBinding, replaceBinding) where import Type import Data.List import Data.Play import Data.Maybe import Control.Monad import General type Binding = [(Int, Expr)] findExactRhs :: Func -> [Expr] -> Maybe (Int,Binding,Expr) findExactRhs func call = listToMaybe ...
6d7dcf87c788db0497a441c6c0c51fb60234dab6f207f3df4aab62cafd330c5c
ocaml-flambda/ocaml-jst
main_args.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/d1a8d0311b712c4eb51be6ad86b884e89eb3cc3c/driver/main_args.ml
ocaml
************************************************************************ OCaml ...
, projet Para , INRIA Rocquencourt Copyright 1998 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the let mk_a f = "-a", Arg.Unit f, " Build a library" ;; let mk_alert f = "-alert", Arg.String f, Printf...
67bb6d1b165bc02e1297d37dbdc3849b6892043505f6ca1e597594e0d1094389
heechul/crest-z3
ciloptions.mli
* * Copyright ( c ) 2001 - 2003 , * < > * < > * < > * < > * 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/heechul/crest-z3/cfcebadddb5e9d69e9956644fc37b46f6c2a21a0/cil/src/ciloptions.mli
ocaml
* The list of file names * Adds the file to the start of fileNames
* * Copyright ( c ) 2001 - 2003 , * < > * < > * < > * < > * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are * met : * ...
00a1769709c6c79af74585188fb6e72b36cd630baf3e657081b0de22ae964fb5
pelle/oauthentic
core.clj
(ns oauthentic.core (:require [clj-http.client :as client] [clj-http.util :as u]) (:import (java.net URI))) (defn assoc-query-params "Add map of parameters to query section of url. It does not attempt to remove duplicates in existing query string " [url params] (let [u (URI. url) q (....
null
https://raw.githubusercontent.com/pelle/oauthentic/20d85e9bcc4510af52e77f88fe8994fb7d137546/src/oauthentic/core.clj
clojure
-ietf-oauth-v2-31#section-4.1.3 -ietf-oauth-v2-31#section-4.4 -ietf-oauth-v2-31#section-4.3 -ietf-oauth-v2-31#section-6
(ns oauthentic.core (:require [clj-http.client :as client] [clj-http.util :as u]) (:import (java.net URI))) (defn assoc-query-params "Add map of parameters to query section of url. It does not attempt to remove duplicates in existing query string " [url params] (let [u (URI. url) q (....
2e934d0e29179d57e7cce0960149d304f6336998cdf078d57086d04682c3684f
startalkIM/ejabberd
ejabberd_xmlrpc.erl
%%%---------------------------------------------------------------------- %%% File : ejabberd_xmlrpc.erl Author : > %%% Purpose : XML-RPC server that frontends ejabberd commands Created : 21 Aug 2007 by > %%% %%% ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne %%% %%% This program is free software...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/ejabberd_xmlrpc.erl
erlang
---------------------------------------------------------------------- File : ejabberd_xmlrpc.erl Purpose : XML-RPC server that frontends ejabberd commands This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope th...
Author : > Created : 21 Aug 2007 by > ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License along with...
163c5d350ba43e2af4a84b516e36baed787369ba5697380f46b5fca743b5aa5e
theoremoon/silk
syntax.ml
open Typ type typ_exp = string type exp = |Unit |Int of int |Bool of bool |Call of string * exp list |Assign of string * typ_exp option * exp |Var of string |If of exp * exp * exp |MultiExpr of exp list |Defun of string * (string * typ_exp option) list * typ_exp option * exp type exp_t = |TUnit ...
null
https://raw.githubusercontent.com/theoremoon/silk/b3c913cfebad03fc180f41695ca8c6e5dcbd2867/syntax.ml
ocaml
open Typ type typ_exp = string type exp = |Unit |Int of int |Bool of bool |Call of string * exp list |Assign of string * typ_exp option * exp |Var of string |If of exp * exp * exp |MultiExpr of exp list |Defun of string * (string * typ_exp option) list * typ_exp option * exp type exp_t = |TUnit ...
e90123fb864891f0d37dc6702f6e2d536271701e7bf3dd031ce5c8a3a97715c9
softwarelanguageslab/maf
R5RS_various_blur-2.scm
; Changes: * removed : 0 * added : 0 * swaps : 0 * negated predicates : 1 ; * swapped branches: 0 * calls to i d fun : 3 (letrec ((id (lambda (x) x)) (blur (lambda (y) y)) (lp (lambda (a n) (<change> (if (<= n 1) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_various_blur-2.scm
scheme
Changes: * swapped branches: 0
* removed : 0 * added : 0 * swaps : 0 * negated predicates : 1 * calls to i d fun : 3 (letrec ((id (lambda (x) x)) (blur (lambda (y) y)) (lp (lambda (a n) (<change> (if (<= n 1) (id a) ...
2aa7c65faa61ba536058f6855c6e7a28fdb8cfecce3fd8402f4824e2d71ecd87
acl2/acl2
expressions-macros.lisp
Syntheto Library ; Copyright ( C ) 2021 Kestrel Institute ; License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . ; Author : ( ) and ( ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Macros for building expressions . ;; Superseded by expre...
null
https://raw.githubusercontent.com/acl2/acl2/69204c321c7948154d5912e65544f3826c5fd14b/books/kestrel/syntheto/shallow/expressions-macros.lisp
lisp
Superseded by expressions.lisp /-/blob/devel/abstract-syntax/expressions-uml.png Literals. Do we need macros for these? Let's stick with double quotes around literal strings. No macros needed. Other bases can be added later. Variable boolean negation integer negation Binary operators product type ...
Syntheto Library Copyright ( C ) 2021 Kestrel Institute License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . Author : ( ) and ( ) Macros for building expressions . See the UML diagram : (in-package "SYNTHETO") (include-book "centaur/fty/top" :dir :system) (include-bo...
3afcf66c61eb234a09945cae95ce66edbf3797b85f8e1e74a5f7c02715c416b4
gojek/ziggurat
channel_pool_test.clj
(ns ziggurat.messaging.channel-pool-test (:require [clojure.test :refer :all] [ziggurat.messaging.channel-pool :as cpool :refer [channel-pool]] [ziggurat.messaging.producer-connection :refer [producer-connection]] [ziggurat.fixtures :as fix]) (:import (org.apache.commons.pool2.im...
null
https://raw.githubusercontent.com/gojek/ziggurat/7ac8072917aa67cd10b25e940a01bc196d7d8c98/test/ziggurat/messaging/channel_pool_test.clj
clojure
(ns ziggurat.messaging.channel-pool-test (:require [clojure.test :refer :all] [ziggurat.messaging.channel-pool :as cpool :refer [channel-pool]] [ziggurat.messaging.producer-connection :refer [producer-connection]] [ziggurat.fixtures :as fix]) (:import (org.apache.commons.pool2.im...
d64f0cbc7259e819acfd8d0eee0b9ccc90241846d83e854f04ef9f269b2d98a3
schemeorg-community/index.scheme.org
srfi.46.scm
(((name . "syntax-rules") (signature syntax-rules (_) ((_ (literal ...) syntax-rule ...) transformer-spec) ((_ ellipsis (literal ...) syntax-rule ...) transformer-spec)) (subsigs (syntax-rule (pattern (pattern template))) (pattern (pattern _ identifier constant (pattern ......
null
https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/32e1afcfe423a158ac8ce014f5c0b8399d12a1ea/types/srfi.46.scm
scheme
(((name . "syntax-rules") (signature syntax-rules (_) ((_ (literal ...) syntax-rule ...) transformer-spec) ((_ ellipsis (literal ...) syntax-rule ...) transformer-spec)) (subsigs (syntax-rule (pattern (pattern template))) (pattern (pattern _ identifier constant (pattern ......
613f9ae7e52c5191b52581f5e7554e336a958c689a12f4a67f978f51df30fa93
janestreet/memtrace_viewer_with_deps
graph.ml
open! Core_kernel open Memtrace_viewer_common type obj_info = { size : int } let build ~trace ~size = (* Naively divide up the trace into equal segments to get [size] points *) let n = let counter = ref 0 in Filtered_trace.iter ~parse_backtraces:false trace (fun _ _ -> counter := !counter + 1); !coun...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/server/src/graph.ml
ocaml
Naively divide up the trace into equal segments to get [size] points
open! Core_kernel open Memtrace_viewer_common type obj_info = { size : int } let build ~trace ~size = let n = let counter = ref 0 in Filtered_trace.iter ~parse_backtraces:false trace (fun _ _ -> counter := !counter + 1); !counter in let objects : obj_info Obj_id.Table.t = Obj_id.Table.create () in ...
a6e98b438f1b81fa18508c65b7ebe2d993eca0384712a35f6f923382ef670b78
tfausak/rattletrap
check-schema.hs
import qualified Control.Monad as Monad import qualified Data.List as List import qualified System.Directory as Directory import qualified System.FilePath as FilePath import qualified System.Process as Process main :: IO () main = do entries <- Directory.listDirectory output Process.callCommand . unwords $...
null
https://raw.githubusercontent.com/tfausak/rattletrap/cc6d6aba923d840f23de7673cab9a043096d3099/src/util/check-schema.hs
haskell
import qualified Control.Monad as Monad import qualified Data.List as List import qualified System.Directory as Directory import qualified System.FilePath as FilePath import qualified System.Process as Process main :: IO () main = do entries <- Directory.listDirectory output Process.callCommand . unwords $...
90927a5b1550345c354af60337c3471ec85106d278cdffc3bfde0ac7cb60c0d4
seagreen/hjsonschema
Validation.hs
module Local.Validation where import Protolude import Data.Aeson import qualified Data.Aeson as AE import qualified Data.HashMap.Strict as HM import Data.String (String) import Test.Hspec import qualified AlternateSchema as AS import JSONSchema.Draft4 import qualifie...
null
https://raw.githubusercontent.com/seagreen/hjsonschema/fde6e676f79f3f3320a558f20492ad816a2543a7/test/Local/Validation.hs
haskell
Fetching from filesystem. Validation tests that were hard to write in JSON for whatever reason.
module Local.Validation where import Protolude import Data.Aeson import qualified Data.Aeson as AE import qualified Data.HashMap.Strict as HM import Data.String (String) import Test.Hspec import qualified AlternateSchema as AS import JSONSchema.Draft4 import qualifie...
e7ad5dc8ed37fff0b3a05b45da88eae7788181e9f382dac0863432de7ec3bb1b
dizengrong/erlang_game
gateway_dispatch.erl
@author dzR < > %% @doc 网关发送器 %% 玩家登陆之后,发给玩家的消息都通过这个来转发给client_socket模块 %% 不过对于广播类消息则直接由本进程来执行发送了, %% 这样就避免了要复制N份消息再转发了 %% 同时也避免了消息的集中处理 -module (gateway_dispatch). -include ("gateway.hrl"). -include ("log.hrl"). -export([start_link/0, send_to_role/2, change_map/3]). -behaviour(gen_server). -export([init/1, handl...
null
https://raw.githubusercontent.com/dizengrong/erlang_game/4598f97daa9ca5eecff292ac401dd8f903eea867/gerl/src/gateway/gateway_dispatch.erl
erlang
@doc 网关发送器 玩家登陆之后,发给玩家的消息都通过这个来转发给client_socket模块 不过对于广播类消息则直接由本进程来执行发送了, 这样就避免了要复制N份消息再转发了 同时也避免了消息的集中处理 @doc 发送网络消息包给玩家(个人消息只做转发) @doc 玩家改变所在的地图后同步更新socket进程的地图进程数据
@author dzR < > -module (gateway_dispatch). -include ("gateway.hrl"). -include ("log.hrl"). -export([start_link/0, send_to_role/2, change_map/3]). -behaviour(gen_server). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -define(SERVER, {global, ?MODULE}). start_link() ...
036687412ffe6370977a844fb5ed83d6f04a7ae4ba5280e5d60237fc758345a9
nick8325/twee
Utils.hs
-- | Miscellaneous utility functions. # LANGUAGE CPP , MagicHash , module Twee.Utils where import Control.Arrow((&&&)) import Control.Exception import Data.List(groupBy, sortBy) import Data.Ord(comparing) import System.IO import GHC.Prim import GHC.Types import Data.Bits import System.Random import Data.Serialize -...
null
https://raw.githubusercontent.com/nick8325/twee/4d3a64a6cfacc5cf71d0cdb74e2dea510f7caf14/src/Twee/Utils.hs
haskell
| Miscellaneous utility functions. import Test.QuickCheck hiding ((.&.)) Split an interval (inclusive bounds) into a particular number of blocks division rounding up Check that all elements occur exactly once Check that we have the correct number and distribution of blocks Check that all elements occur exactly ...
# LANGUAGE CPP , MagicHash , module Twee.Utils where import Control.Arrow((&&&)) import Control.Exception import Data.List(groupBy, sortBy) import Data.Ord(comparing) import System.IO import GHC.Prim import GHC.Types import Data.Bits import System.Random import Data.Serialize repeatM :: Monad m => m a -> m [a] rep...
e71c6583e93aa0483eee800728083e7ecbf06d2c26e99803c8509e559136b65f
Ericson2314/lighthouse
Main.hs
- Mini - Chess in Haskell - Copyright ( C ) 2007 < > - - 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 ( version 2 of the License ) This program - is distributed in the h...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/kernel/MiniChess/Main.hs
haskell
let whitePlayer = humanPlayer
- Mini - Chess in Haskell - Copyright ( C ) 2007 < > - - 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 ( version 2 of the License ) This program - is distributed in the h...
72efe5a0bc527ce049b60b66f769251c3e036befc9e58519d5ee9121ec649032
LeifAndersen/interactive-syntax-clojure
slurp.clj
(ns interactive-syntax.slurp (:refer-clojure :exclude [slurp])) (defmacro slurp [file] (clojure.core/slurp file))
null
https://raw.githubusercontent.com/LeifAndersen/interactive-syntax-clojure/9d87d6e9cd2037035d96defb479428479977571a/src/interactive_syntax/slurp.clj
clojure
(ns interactive-syntax.slurp (:refer-clojure :exclude [slurp])) (defmacro slurp [file] (clojure.core/slurp file))
e2c84686999e7a0435e6ae0e96ee5bca5b4717ed76704fe79768fb501fafc349
mini-monkey/mini-monkey
mm_codes.erl
%%%------------------------------------------------------------------- @doc MiniMonkey Codes %% %% %% %% @end %%%------------------------------------------------------------------- -module(mm_codes). -export([code_to_modification/1, code_to_access_type/1]). -include("codes.hrl"). -include_lib("eunit/include/eunit...
null
https://raw.githubusercontent.com/mini-monkey/mini-monkey/4afa4385256c0f1d23db522c0725c3291a8c86c8/src/mm_codes.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- ------------------------------------------------------------------------------ Tests ------------------------------------------------------------------------------
@doc MiniMonkey Codes -module(mm_codes). -export([code_to_modification/1, code_to_access_type/1]). -include("codes.hrl"). -include_lib("eunit/include/eunit.hrl"). -type modification() :: add | revoke. -type access_type() :: to_admin | to_pub | to_sub. -spec code_to_modification(integer()) -> modification(). co...
3cd75d0442c99a74cb7c8b5c9a11def24d00c8b0e3bfc3f6d337b45880206243
ocsigen/ocaml-eliom
cmi_format.mli
(**************************************************************************) (* *) (* OCaml *) (* *) (* ...
null
https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/typing/cmi_format.mli
ocaml
************************************************************************ OCaml Fabrice L...
Copyright 2012 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the type pers_flags = | Rectypes | Deprecated of string | Opaque ELIOM | Eliom_loc of Eliom_base.loc type cmi_infos = { cmi_name : string; cmi_sign : Types...
6e4fadccc830cf68bf064136319c9feede3afc994f5b68612e9e8329896cf0eb
appleshan/cl-http
w4-45-11.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*- Patch file for W4 version 45.11 ;;; Reason: Function W4::GET-REFERENCED-URLS-FROM-HTML-STRING: handle arbirary white space before href or src attributes. ;;; Function W4::GET-REFERENCED-URLS-FROM-HTML: watch out for multip...
null
https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/w4/patch/w4-45/w4-45-11.lisp
lisp
Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*- Reason: Function W4::GET-REFERENCED-URLS-FROM-HTML-STRING: handle arbirary white space before href or src attributes. Function W4::GET-REFERENCED-URLS-FROM-HTML: watch out for multiple white space chars in elements. DOMAIN - FIXES.LISP.33 ) ...
Patch file for W4 version 45.11 Written by JCMa , 10/29/01 19:05:13 while running on FUJI - VLM from FUJI:/usr / lib / symbolics / ComLink-39 - 8 - F - MIT-8 - 5.vlod with Open Genera 2.0 , Genera 8.5 , Lock Simple 437.0 , Version Control 405.0 , Compare Merge 404.0 , VC Documentation 401.0 , Logical Pathna...
02113b01fafffa812d7e03ca6118f971ce9faa18d044f7411d7c3e8a2a871b49
lispgames/glop
xcomposite.lisp
;;; XComposite bindings (in-package #:glop-xlib) (define-foreign-library xcomposite (:unix (:or "libXcomposite.so" "libXcomposite.so.1")) (t (:default "libXcomposite"))) (use-foreign-library xcomposite) (defctype x-server-region xid) (defcenum composite-redirect-update (:automatic 0) (:manual 1)) (defcfun ...
null
https://raw.githubusercontent.com/lispgames/glop/45e722ab4a0cd2944d550bf790206b3326041e38/src/x11/xcomposite.lisp
lisp
XComposite bindings possibly should split it up before returning it?
(in-package #:glop-xlib) (define-foreign-library xcomposite (:unix (:or "libXcomposite.so" "libXcomposite.so.1")) (t (:default "libXcomposite"))) (use-foreign-library xcomposite) (defctype x-server-region xid) (defcenum composite-redirect-update (:automatic 0) (:manual 1)) (defcfun ("XCompositeQueryExtensi...
9b361ddb83bcabb2d41a80a6a8f62a526a226d265013fe9c626e63a7cb9b609a
michaelballantyne/syntax-spec
interface.rkt
#lang racket/base (provide syntax-spec (for-syntax racket-expr racket-var racket-macro binding-class-predicate binding-class-constructor nonterminal-expander)) (require "../runti...
null
https://raw.githubusercontent.com/michaelballantyne/syntax-spec/1eca406e83468601ce7507de25fb036f6ff4d0ff/private/syntax/interface.rkt
racket
syntax-spec syntax? -> (values (or/c syntax? #f) (or/c syntax? #f) (or/c syntax? #f)) these all get added to a single begin - for - syntax Racket only applies its trick of allowing mutual recursion between begin-for-syntaxes by allowing forward references apparently only applies to identifiers with module scop...
#lang racket/base (provide syntax-spec (for-syntax racket-expr racket-var racket-macro binding-class-predicate binding-class-constructor nonterminal-expander)) (require "../runti...
e473f7e159cdc938fb4e9983148bb90dbd4aa374d50c5b35aabdf27e81b684ac
MaartenFaddegon/Hoed
Main.hs
-- A program with unexpected output. import CNF import Debug.Hoed.Pure main = runOwp properties $ print (prop_negin_correct negin eg) where properties = [Propositions [ mkProposition cnfModule "prop_negin_complete" `ofType` BoolProposition `withSignature...
null
https://raw.githubusercontent.com/MaartenFaddegon/Hoed/8769d69e309928aab439b22bc3f3dbf5452acc77/examples/CNF_unsound_demorgan__with_properties/Main.hs
haskell
A program with unexpected output.
import CNF import Debug.Hoed.Pure main = runOwp properties $ print (prop_negin_correct negin eg) where properties = [Propositions [ mkProposition cnfModule "prop_negin_complete" `ofType` BoolProposition `withSignature` [SubjectFunction,Argument 0] ...
65b0f300b6a60d7db49a704c5cc2b7283e0323a3b4c1776bc79a2ee0f19ff585
myshov/programming_in_haskell
unfold.hs
import Data.Char type Bit = Int unfold p h t x | p x = [] | otherwise = h x : unfold p h t (t x) chop8 :: [Bit] -> [[Bit]] chop8 [ ]= [] chop8 bits = take 8 bits: chop8 (drop 8 bits) chop8' :: [Bit] -> [[Bit]] chop8' = unfold null (take 8) (drop 8) map' :: (Int -> Int) -> [Int] -> [Int] map' f = unf...
null
https://raw.githubusercontent.com/myshov/programming_in_haskell/3118695cc09a5ea0954917c318bf007b6ae5fcef/lesson7/unfold.hs
haskell
import Data.Char type Bit = Int unfold p h t x | p x = [] | otherwise = h x : unfold p h t (t x) chop8 :: [Bit] -> [[Bit]] chop8 [ ]= [] chop8 bits = take 8 bits: chop8 (drop 8 bits) chop8' :: [Bit] -> [[Bit]] chop8' = unfold null (take 8) (drop 8) map' :: (Int -> Int) -> [Int] -> [Int] map' f = unf...
db726d464611b3834a9f50c1911657f518e403ad89a06512f5eb3d94260d39c7
tweag/asterius
T4441.hs
module Main where import Numeric import System.IO main = do let d = read "2.0e-2" :: Double print $ "Float Version : " ++ (fToStr $ realToFrac d) print $ "Double Version: " ++ (dToStr d) double :: IO Double double = do x <- getLine return $ read x dToStr :: Double -> String dToStr d = show d fToStr :: Flo...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/codeGen/T4441.hs
haskell
module Main where import Numeric import System.IO main = do let d = read "2.0e-2" :: Double print $ "Float Version : " ++ (fToStr $ realToFrac d) print $ "Double Version: " ++ (dToStr d) double :: IO Double double = do x <- getLine return $ read x dToStr :: Double -> String dToStr d = show d fToStr :: Flo...
5a4fbfddb618a1309f496a2ac67feac4b158ec32a632679a7144f8f63ae8371c
sliminality/pandoc-theorem
Env.hs
# OPTIONS_GHC -Wall -Wcompat -Wincomplete - record - updates -Wincomplete - uni - patterns -Wredundant - constraints # -Wredundant-constraints #-} # LANGUAGE OverloadedStrings , PartialTypeSignatures # module Env ( convertBlock , splitTerm ) where import Data.Sequence (Seq((:<|), (:|>)), (|>), (...
null
https://raw.githubusercontent.com/sliminality/pandoc-theorem/8fffd31cb0aaf4e7d5cd7e442190827f6a8481e6/src/Env.hs
haskell
| Represents a LaTeX environment. ^ Type of environment, e.g. Definition, Theorem, etc. ^ Name of the theorem, definition, etc. ^ Body of the environment. | Type of a LaTeX environment. Corresponds to a unique environment name. if the definition term starts with a recognized tag. Pass all other blocks through un...
# OPTIONS_GHC -Wall -Wcompat -Wincomplete - record - updates -Wincomplete - uni - patterns -Wredundant - constraints # -Wredundant-constraints #-} # LANGUAGE OverloadedStrings , PartialTypeSignatures # module Env ( convertBlock , splitTerm ) where import Data.Sequence (Seq((:<|), (:|>)), (|>), (...
a56fb1409bc43233e3a7f60ab71edc49682a16adcdafb9f96b4324998218ab67
tmattio/spin
template_configuration.ml
open Dec_template exception Failed_rule_eval of Spin_error.t let validate_of_rule ~context ~config_name (rule : Configuration.rule) = let context_with_config = Hashtbl.copy context in fun (v : string) -> Hashtbl.add context_with_config config_name v; let result = Template_expr.to_result Temp...
null
https://raw.githubusercontent.com/tmattio/spin/e9955109659d5246a492b6b1312a4c3eb001e86b/lib/spin/template_configuration.ml
ocaml
Find the index of the default value if provided.
open Dec_template exception Failed_rule_eval of Spin_error.t let validate_of_rule ~context ~config_name (rule : Configuration.rule) = let context_with_config = Hashtbl.copy context in fun (v : string) -> Hashtbl.add context_with_config config_name v; let result = Template_expr.to_result Temp...
20ff0696d577e63078c5194cf714e01035670026d3976c7467191b63bdf6e110
hstreamdb/hstream
UtilsSpec.hs
module HStream.UtilsSpec (spec) where import Control.Concurrent import Control.Monad import Data.Either import qualified Data.Set as Set import HStream.Utils import Test.Hspec spec :: Spec spec = parallel $ do utilsSpec timeIntervalSpec timeIntervalSpec...
null
https://raw.githubusercontent.com/hstreamdb/hstream/623ccb8577b992383cfacd7d6577616d245b8583/common/hstream/test/HStream/UtilsSpec.hs
haskell
module HStream.UtilsSpec (spec) where import Control.Concurrent import Control.Monad import Data.Either import qualified Data.Set as Set import HStream.Utils import Test.Hspec spec :: Spec spec = parallel $ do utilsSpec timeIntervalSpec timeIntervalSpec...
f8495a15feb4d666d0058421943ffe25b89a5a92a09a551c2bc04740dbb057dd
hansroland/reflex-dom-inbits
range01.hs
{-# LANGUAGE OverloadedStrings #-} import Reflex.Dom import qualified Data.Text as T main :: IO () main = mainWidget bodyElement bodyElement :: MonadWidget t m => m () bodyElement = do el "h2" $ text "Range Input" rg <- rangeInput def el "p" blank display $ _rangeInput_value rg return ()
null
https://raw.githubusercontent.com/hansroland/reflex-dom-inbits/3bf4ccf43aa45c5df7d3ce42dae38955f657ca33/src/range01.hs
haskell
# LANGUAGE OverloadedStrings #
import Reflex.Dom import qualified Data.Text as T main :: IO () main = mainWidget bodyElement bodyElement :: MonadWidget t m => m () bodyElement = do el "h2" $ text "Range Input" rg <- rangeInput def el "p" blank display $ _rangeInput_value rg return ()
e8213cc6d200d43511ce21a80ffabf32e0389813ddc850e25f5dc2a80fde7886
jaspervdj/websockets
Tests.hs
-------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} module Network.WebSockets.Extensions.PermessageDeflate.Tests ( tests ) where -------------------------------------------------------------------------------- import Control.Exception ...
null
https://raw.githubusercontent.com/jaspervdj/websockets/95dc7159322c8a60cbbbf0911571aef83673ec88/tests/haskell/Network/WebSockets/Extensions/PermessageDeflate/Tests.hs
haskell
------------------------------------------------------------------------------ # LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------
module Network.WebSockets.Extensions.PermessageDeflate.Tests ( tests ) where import Control.Exception (try) import qualified Data.ByteString.Lazy as BL import Network.WebSockets.Extensions.PermessageDeflate import Network.W...
49e8475625f870261f40e627834039f22b27ace07dbe716a42ef0671e8ff1ad6
CNMAT/CNMAT-OM
prf-editor.lisp
(in-package :cnmat) (defclass prfeditor (om::editorview) ((datapanel :accessor datapanel :initform nil) (selection :accessor selection :initform nil))) (defmethod om::class-has-editor-p ((self prf)) t) (defmethod om::get-editor-class ((self prf)) 'prfeditor) (defclass prf-panel (om::om-view) ((selected :a...
null
https://raw.githubusercontent.com/CNMAT/CNMAT-OM/6868e8e007adc3f325d14fee67a62e87d6ea2d00/src/tessellate/prf-editor.lisp
lisp
not very nice (oa::om-with-focused-view self click on beat ? is this beat part of the line's pulses ? ... if not + cmd-click : add the beat set this beat as selection in any case else (if no beat selected) just select the line only '+' applies on no specific selected voice there's a beat selected => remove it...
(in-package :cnmat) (defclass prfeditor (om::editorview) ((datapanel :accessor datapanel :initform nil) (selection :accessor selection :initform nil))) (defmethod om::class-has-editor-p ((self prf)) t) (defmethod om::get-editor-class ((self prf)) 'prfeditor) (defclass prf-panel (om::om-view) ((selected :a...
46d284dad648a99e22c181ef36c66d4c36422d63b2684132318418526f96e953
nikodemus/SBCL
saptran.lisp
optimizations for SAP operations This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the public domain and is...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/compiler/saptran.lisp
lisp
more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. DEFKNOWNs only static symbols on host transforms for converting sap relation operators transforms for optimizing SAP+ Avoid defining WITH-O...
optimizations for SAP operations This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB!C") #!+linkage-table (deftransform foreign-symbol-address ((symbol &opt...
14a4992923cb146665e51f6f107e3f43be135597b6e8ad29509daf42b86270ca
pmundkur/flowcaml
doc_latex.ml
(**************************************************************************) (* *) (* *) , Projet C...
null
https://raw.githubusercontent.com/pmundkur/flowcaml/ddfa8a37e1cb60f42650bed8030036ac313e048a/src-flowcaml/docgen/doc_latex.ml
ocaml
************************************************************************ et en Automatique. All ri...
, Projet Cristal , INRIA Rocquencourt Copyright 2002 , 2003 Institut National de Recherche en Informatique under the terms of the Q Public License version 1.0 . $ I d : doc_latex.ml , v 1.10 2003/06/2...
11f72a814cffab4a9155a1b323065aebb1ceacf95ec90c70b4b6fab9da1c0d63
mflatt/plait
types.rkt
#lang racket/base (require racket/list racket/pretty syntax/srcloc (for-template racket/contract/base racket/base "s-exp.rkt" "tuple.rkt")) (provide gen-tvar make-bool make-num make-sym make-str make-chr make-vd make-sexp ...
null
https://raw.githubusercontent.com/mflatt/plait/ffe5fd20216dd11770f84445fe0f48efdfdb7bff/private/types.rkt
racket
The `non-poly` field controls the layer where a type variable can delay let-based polymorphism to the end of checking a whole module, which allows inferring types of recursive functions (at the expense of potentially looping in the type checker, so we have a fuel limit mean "extension of any poly context". A type ...
#lang racket/base (require racket/list racket/pretty syntax/srcloc (for-template racket/contract/base racket/base "s-exp.rkt" "tuple.rkt")) (provide gen-tvar make-bool make-num make-sym make-str make-chr make-vd make-sexp ...
3802689f2992f71e1530e25179ec621ef7b9efa073e33faff4383c60b8d9aefc
PeterDWhite/Osker
Domain.hs
Copyright ( c ) , 2002 , 2003 Copyright ( c ) OHSU , 2002 , 2003 module Domain ( Domain (..) ) where ---------------------------------------------------------------------- -- Data structure describing the domain, a job control concept ---------------------------------------------------------------------- im...
null
https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Kernel/KernelCore/Domain.hs
haskell
-------------------------------------------------------------------- Data structure describing the domain, a job control concept -------------------------------------------------------------------- Domain information Domain name Sessions of domain Domains immediately under
Copyright ( c ) , 2002 , 2003 Copyright ( c ) OHSU , 2002 , 2003 module Domain ( Domain (..) ) where imports import qualified ProcessName as PN Braid imports import qualified DomainBraid as DB data Domain = Braid for the domain } instance Show Domain where show dom = "{" ++ show (ddDom...
3826670a5dbb74133bc1062c3bfb320ec904237237f3bea111f688d8e070f3b7
simmone/racket-simple-xlsx
bar-3d-chart-test.rkt
#lang racket (require simple-xml) (require rackunit/text-ui rackunit) (require "../../../../xlsx/xlsx.rkt") (require "../../../../sheet/sheet.rkt") (require "../../../../lib/lib.rkt") (require"../../../../xl/charts/bar-chart.rkt") (require"../../../../xl/charts/lib.rkt") (require racket/runtime-path) (define-runtim...
null
https://raw.githubusercontent.com/simmone/racket-simple-xlsx/e0ac3190b6700b0ee1dd80ed91a8f4318533d012/simple-xlsx/tests/xl/charts/bar-chart/bar-3d-chart-test.rkt
racket
#lang racket (require simple-xml) (require rackunit/text-ui rackunit) (require "../../../../xlsx/xlsx.rkt") (require "../../../../sheet/sheet.rkt") (require "../../../../lib/lib.rkt") (require"../../../../xl/charts/bar-chart.rkt") (require"../../../../xl/charts/lib.rkt") (require racket/runtime-path) (define-runtim...
72ff5cdcd5ebc9feea933505ef82f9be5f0f8c2cae2c7afd9e676dd5f49f817c
mirage/colombe
colombe_emile.ml
let some x = Some x let error_msgf fmt = Format.kasprintf (fun err -> Error (`Msg err)) fmt let concatene local = String.concat "." (List.map (function `Atom x -> x | `String x -> x) local) let is_string = function `String _ -> true | `Atom _ -> false let cast_domain = function | `Literal _ -> error_msgf "Imposs...
null
https://raw.githubusercontent.com/mirage/colombe/bbecbb17b581fa1db70a61de14efb51a66f30451/emile/colombe_emile.ml
ocaml
let some x = Some x let error_msgf fmt = Format.kasprintf (fun err -> Error (`Msg err)) fmt let concatene local = String.concat "." (List.map (function `Atom x -> x | `String x -> x) local) let is_string = function `String _ -> true | `Atom _ -> false let cast_domain = function | `Literal _ -> error_msgf "Imposs...
8c64e777905588e5a9847b7e66e28f925bbd347ef24c6b9d93e20bea756d9915
chebert/software-design-for-flexibility
sdf-monolithic-checkers.rkt
#lang racket (require "sdf-utils.rkt") (require "sdf-function-combinators.rkt") Board (struct board (pieces current-color) #:transparent) (define (current-pieces board) (let ((current-color (board-current-color board))) (filter (λ (piece) (eq? (piece-color piece) current-color)) (board-pieces board)))) (def...
null
https://raw.githubusercontent.com/chebert/software-design-for-flexibility/5eacde59855888180482031b9ee27c7c7b6cf4d1/sdf-monolithic-checkers.rkt
racket
Pieces Moves Apply a move to a piece. Update the coordinates of the piece. Update the coordinates of the piece. Apply a move to a board. Replace the piece with the moved piece. Remove the enemy piece, and replace the piece with the moved piece. Pretty-output for seeing what's happening Boards
#lang racket (require "sdf-utils.rkt") (require "sdf-function-combinators.rkt") Board (struct board (pieces current-color) #:transparent) (define (current-pieces board) (let ((current-color (board-current-color board))) (filter (λ (piece) (eq? (piece-color piece) current-color)) (board-pieces board)))) (def...
dcb193e6007f8a8bb5c099a8339385290fcf9e22ed3e8e45eeac7f062823ad12
PascalLG/nubo-hs
CmdInit.hs
----------------------------------------------------------------------------- Nubo Client Application Copyright ( c ) 2017 , -- -- 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...
null
https://raw.githubusercontent.com/PascalLG/nubo-hs/390212b73c31746f4ff03a3e341f92d657db0223/Client/src/CmdInit.hs
haskell
--------------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished ...
Nubo Client Application Copyright ( c ) 2017 , in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ...
8d25901bab58f6e0a7253b2c690403f9f1d1a2d8dfb4a3e8f9d66b796c8b8311
ucsd-progsys/dsolve
relrec.ml
type t = {a: int; b: int} let test pr = assert(pr.a < pr.b) let x = max_int let y = x + 1 let p = {a = x; b = y} let _ = test p
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/relrec.ml
ocaml
type t = {a: int; b: int} let test pr = assert(pr.a < pr.b) let x = max_int let y = x + 1 let p = {a = x; b = y} let _ = test p
841ba2b7dffb01309951f3042c8a201c8a6d8644190d87248aef886ae5b70b80
richardharrington/robotwar
robot_test.clj
(ns robotwar.robot-test (:use [clojure.test] [midje.sweet] [robotwar.robot] [robotwar.constants]) (:require [robotwar.register :as register] [robotwar.world :as world])) (def world (world/init-world [""])) (def x {:pos-key :pos-x :v-key :v-x :desired-v-key :desired-v-x ...
null
https://raw.githubusercontent.com/richardharrington/robotwar/7f826649dd1a141fdacebb30d843773ceb5fee1f/test/robotwar/robot_test.clj
clojure
(ns robotwar.robot-test (:use [clojure.test] [midje.sweet] [robotwar.robot] [robotwar.constants]) (:require [robotwar.register :as register] [robotwar.world :as world])) (def world (world/init-world [""])) (def x {:pos-key :pos-x :v-key :v-x :desired-v-key :desired-v-x ...
25f02c164615035c2cdb704a1bc5c3604f208ba549e123903521367fcd72ff43
osstotalsoft/functional-guy
lazy.hs
import System . Environment import Control . Monad -- main :: IO () -- main = do -- args <- getArgs -- let linesToRead = if length args > 0 -- then read (head args) -- else 0 :: Int -- numbers <- replicateM linesToRead getLine -- let ints = map read numbers :: [Int] -- print (sum...
null
https://raw.githubusercontent.com/osstotalsoft/functional-guy/c02a8b22026c261a9722551f3641228dc02619ba/Chapter4.%20IO%20in%20Haskell/Exercises/03.%20Lazy%20IO/lazy.hs
haskell
main :: IO () main = do args <- getArgs let linesToRead = if length args > 0 then read (head args) else 0 :: Int numbers <- replicateM linesToRead getLine let ints = map read numbers :: [Int] print (sum ints) press Crts+Z to close the stream main' :: IO () main' = do ...
import System . Environment import Control . Monad main :: IO () main = do userInput <- getContents
39528f82ccf2746d91244dd3f07150205b7cbcace39249552db2b1c3acaba7e4
billstclair/trubanc-lisp
api.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*- $ Header : /usr / local / cvsrep / cl - ppcre / api.lisp , v 1.84 2008/07/06 18:12:04 edi Exp $ ;;; The external API for creating and using scanners. Copyright ( c ) 2002 - 2008 , Dr. . All rights reserved . ;;; Redistribution an...
null
https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/cl-ppcre-2.0.1/api.lisp
lisp
Syntax : COMMON - LISP ; Package : CL - PPCRE ; Base : 10 -*- The external API for creating and using scanners. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above co...
$ Header : /usr / local / cvsrep / cl - ppcre / api.lisp , v 1.84 2008/07/06 18:12:04 edi Exp $ Copyright ( c ) 2002 - 2008 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-package :c...
1e65e1c2bd2da39b607a8779048a767ea881d7da7b725e96758264213525da8a
rbkmoney/hellgate
hg_proxy.erl
-module(hg_proxy). -include_lib("damsel/include/dmsl_domain_thrift.hrl"). %% -export([get_call_options/2]). %% -spec get_call_options(dmsl_domain_thrift:'Proxy'(), hg_domain:revision()) -> hg_woody_wrapper:client_opts(). get_call_options(#domain_Proxy{ref = ProxyRef}, Revision) -> ProxyDef = hg_domain:get(Revi...
null
https://raw.githubusercontent.com/rbkmoney/hellgate/c3e7413db06296a72fb64268eca98e63379d2ef5/apps/hellgate/src/hg_proxy.erl
erlang
-module(hg_proxy). -include_lib("damsel/include/dmsl_domain_thrift.hrl"). -export([get_call_options/2]). -spec get_call_options(dmsl_domain_thrift:'Proxy'(), hg_domain:revision()) -> hg_woody_wrapper:client_opts(). get_call_options(#domain_Proxy{ref = ProxyRef}, Revision) -> ProxyDef = hg_domain:get(Revision, ...
24fb7e03f4f2064823e0256a717ff97463fce3ac35b0537206d7ac2b0aa210f3
buntine/Haskell--Craft-of-FP
Chapter12.hs
----------------------------------------------------------------------- Haskell : The Craft of Functional Programming ( c ) Addison - Wesley , 1999 . -- Chapter 12 ----------------------------------------------------------------------- module Chapter12 where -- Overloading and type classes -- ^^^^^^^^^^^^^^...
null
https://raw.githubusercontent.com/buntine/Haskell--Craft-of-FP/a1a8cd70eb9d1609fd384e608b7fe26b2a878803/Chapter12.hs
haskell
--------------------------------------------------------------------- --------------------------------------------------------------------- Overloading and type classes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Why overloading? ^^^^^^^^^^^^^^^^ Testing for membership of a general list, with the equality function as a paramet...
Haskell : The Craft of Functional Programming ( c ) Addison - Wesley , 1999 . Chapter 12 module Chapter12 where Testing for membership of a Boolean list . elemBool :: Bool -> [Bool] -> Bool elemBool x [] = False elemBool x (y:ys) = (x == y) || elemBool x ys elemGen :: (a -> a -> Bool) -> a -> [a] ...
147788a32428e5b5267a2509c2e90db2cfcb4623dc5b63b0f220f05b07b628f3
potatosalad/erlang-jose
jose_jwk_kty_okp_ed448ph.erl
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- %% vim: ts=4 sw=4 ft=erlang noet %%%------------------------------------------------------------------- @author < > 2014 - 2022 , %%% @doc %%% %%% @end Created : 15 Jan 2016 by < > %%%---------------------------...
null
https://raw.githubusercontent.com/potatosalad/erlang-jose/dbc4074066080692246afe613345ef6becc2a3fe/src/jwk/jose_jwk_kty_okp_ed448ph.erl
erlang
vim: ts=4 sw=4 ft=erlang noet ------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- jose_jwk callbacks jose_jwk_kty callbacks jose_jwk_use_sig callbacks API Types ========================================================...
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- @author < > 2014 - 2022 , Created : 15 Jan 2016 by < > -module(jose_jwk_kty_okp_ed448ph). -behaviour(jose_jwk). -behaviour(jose_jwk_kty). -behaviour(jose_jwk_use_sig). -export([from_map/1]). -export([to_key/1])...
d0ad5f9b30ae8d9005eaa2e95c77791541846fba38b65235ac3d26f32ab968b9
nrepl/nrepl
completion_test.clj
(ns nrepl.middleware.completion-test {:author "Bozhidar Batsov"} (:require [clojure.test :refer :all] [nrepl.core :as nrepl] [nrepl.core-test :refer [def-repl-test repl-server-fixture project-base-dir clean-response]]) (:import (java.io File))) (use-fixtures :each repl-server-fixture) (defn dummy-co...
null
https://raw.githubusercontent.com/nrepl/nrepl/af415432ae19c73283bd4cfb96234f528186daa2/test/clojure/nrepl/middleware/completion_test.clj
clojure
(ns nrepl.middleware.completion-test {:author "Bozhidar Batsov"} (:require [clojure.test :refer :all] [nrepl.core :as nrepl] [nrepl.core-test :refer [def-repl-test repl-server-fixture project-base-dir clean-response]]) (:import (java.io File))) (use-fixtures :each repl-server-fixture) (defn dummy-co...
ebc4b038c7b3ca8695957246f782894bd3aa77e97471ea9feb58908754e14d87
andrewthad/packed
Text.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE BinaryLiterals # # LANGUAGE MagicHash # # LANGUAGE ScopedTypeVariables # # LANGUAGE UnboxedSums # # LANGUAGE UnboxedTuples # {-# OPTIONS_GHC -Weverything -fno-warn-unsafe -fno-warn-implicit-prelude -fno-warn-missing-import-lists -O2 #-} module Packed.Text ( Text(..) ,...
null
https://raw.githubusercontent.com/andrewthad/packed/72437b5f99fbe745897a0a27cae72565c9727781/src/Packed/Text.hs
haskell
# LANGUAGE BangPatterns # # OPTIONS_GHC -Weverything -fno-warn-unsafe -fno-warn-implicit-prelude -fno-warn-missing-import-lists -O2 # * Encoding # UNPACK # length in bytes, not in characters The byte-multiplicity for text is always Multiple if a multi-byte character is present. If no multi-byte characters are...
# LANGUAGE BinaryLiterals # # LANGUAGE MagicHash # # LANGUAGE ScopedTypeVariables # # LANGUAGE UnboxedSums # # LANGUAGE UnboxedTuples # module Packed.Text ( Text(..) , empty , singleton , pack , unpack , breakChar , map , toUpper , take , drop , dropEnd , length , decodeAscii , decodeResum...
1d9aef884cb69efc4c4976f66699870d62eea7540cceb27cc67de8222fd66ad0
ghc/packages-containers
Lazy.hs
# LANGUAGE CPP # #if defined(__GLASGOW_HASKELL__) {-# LANGUAGE Safe #-} #endif #include "containers.h" ----------------------------------------------------------------------------- -- | -- Module : Data.Map.Lazy Copyright : ( c ) 2002 ( c ) 2008 -- License : BSD-style -- Maintai...
null
https://raw.githubusercontent.com/ghc/packages-containers/97fe43c54c5c8a9b93ecf5abd7509e8085b63d41/containers/src/Data/Map/Lazy.hs
haskell
# LANGUAGE Safe # --------------------------------------------------------------------------- | Module : Data.Map.Lazy License : BSD-style Maintainer : Portability : portable = Finite Maps (lazy interface) The @'Map' k v@ type represents a finite map (sometimes called a dictionary) from keys o...
# LANGUAGE CPP # #if defined(__GLASGOW_HASKELL__) #endif #include "containers.h" Copyright : ( c ) 2002 ( c ) 2008 * If you are using ' Prelude . Int ' keys , you will get much better performance for most * If you do n't care about ordering , consider using @Data . . Lazy@ from the ...
0efbdff9df064856b247507bf95de057edcd1a9f6e08f346d901ff6898591991
NetComposer/nklib
nklib_types.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2019 . 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 may obtain %% a copy of the...
null
https://raw.githubusercontent.com/NetComposer/nklib/1f29f8f566586618651e4680dcc488f2dc11ff5c/src/nklib_types.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 ) 2019 . 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 -module(nklib_types). -autho...