_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
7e917bbcbe67a5201659153241e52b7404fdf8049d2721fd8b0e8633f7b3d063
morpheusgraphql/morpheus-graphql
GQLScalar.hs
# LANGUAGE ConstrainedClassMethods # {-# LANGUAGE GADTs #-} # LANGUAGE KindSignatures # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE NoImplicitPrelude # module Data.Morpheus.Types.GQLScalar ( EncodeScalar (..), DecodeScalar (..), toScalar, scalarToJSON, scalarFromJSO...
null
https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/f9684d1451fd4ee3aabdb821424fd352003a3982/morpheus-graphql-core/src/Data/Morpheus/Types/GQLScalar.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # | GraphQL Scalar Serializer | GraphQL Scalar parser value parsing and validating for exhaustive pattern matching should be handled all scalar types : 'Int', 'Float', 'String', 'Boolean' invalid values can be reported with 'Left' constructor : @ decodeScalar...
# LANGUAGE ConstrainedClassMethods # # LANGUAGE KindSignatures # # LANGUAGE ScopedTypeVariables # # LANGUAGE NoImplicitPrelude # module Data.Morpheus.Types.GQLScalar ( EncodeScalar (..), DecodeScalar (..), toScalar, scalarToJSON, scalarFromJSON, scalarValidator, ) where import qualified Data.A...
be5574edb4dd877ca0f536e719026e644239fa363592604d9191aa6e38922636
atgreen/lisp-openshift
packages.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*- $ Header : /usr / local / cvsrep / documentation - template / packages.lisp , v 1.11 2010/08/05 19:24:27 edi Exp $ Copyright ( c ) 2006 - 2010 , Dr. . All rights reserved . ;;; Redistribution and use in source and binary forms, w...
null
https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/documentation-template-0.4.2/packages.lisp
lisp
Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*- 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 copyright notice, this list of conditions and the...
$ Header : /usr / local / cvsrep / documentation - template / packages.lisp , v 1.11 2010/08/05 19:24:27 edi Exp $ Copyright ( c ) 2006 - 2010 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILI...
b27618b117c4498c409f516fcb4e61de92caa47d7e9072065bba70aabf5c7360
Chris00/ocaml-cairo
draw.ml
(* This file is part of the tutorial / *) let pi_4 = atan 1. let two_pi = 8. *. pi_4 let draw_path_moveto cr = Cairo.set_line_width cr 0.1; Cairo.set_source_rgb cr 0. 0. 0.; Cairo.move_to cr 0.25 0.25 let draw_path_lineto cr = draw_path_moveto cr; Cairo.line_to cr 0.5 0.375; Cairo.rel_line_to cr 0.25 ...
null
https://raw.githubusercontent.com/Chris00/ocaml-cairo/202674a8d0c533b689ceacdb523ca167611e1b4c/examples/draw.ml
ocaml
This file is part of the tutorial / Drawing code goes here baseline, descent, ascent, height extents: width & height (in dashed blue) text bearing (solid blue line) text's advance (blue dot) reference point (x,y) (red dot) write output
let pi_4 = atan 1. let two_pi = 8. *. pi_4 let draw_path_moveto cr = Cairo.set_line_width cr 0.1; Cairo.set_source_rgb cr 0. 0. 0.; Cairo.move_to cr 0.25 0.25 let draw_path_lineto cr = draw_path_moveto cr; Cairo.line_to cr 0.5 0.375; Cairo.rel_line_to cr 0.25 (-0.125) let draw_path_arcto cr = draw_pat...
b86af078cd7ad3442b3f3f9f553b4cd653e8aee40faf160598549450780fd8c7
g-andrade/erlchronos
erlchronos_ticked_gen_serv.erl
-module(erlchronos_ticked_gen_serv). -behaviour(ticked_gen_server). -export([start_link/3]). -export([init/1, tick_duration/2, handle_call/3, handle_cast/2, handle_info/2, handle_tick/4, terminate/2, code_change/3]). -record(state, { tick_counte...
null
https://raw.githubusercontent.com/g-andrade/erlchronos/45bd22a78c0a27d78be44b2b07f330511747e7cd/test/erlchronos_ticked_gen_serv.erl
erlang
-module(erlchronos_ticked_gen_serv). -behaviour(ticked_gen_server). -export([start_link/3]). -export([init/1, tick_duration/2, handle_call/3, handle_cast/2, handle_info/2, handle_tick/4, terminate/2, code_change/3]). -record(state, { tick_counte...
31493a9df77a1b1f44ca9648a5f896967e7e9c3c78995640b2fcea57f8e0bb86
ghc/ghc
Main.hs
# LANGUAGE CPP # # OPTIONS_GHC -fno - warn - missing - signatures # # OPTIONS_GHC -fno - warn - overlapping - patterns # # OPTIONS_GHC -fno - warn - name - shadowing # -- The above warning suppression flags are a temporary kludge. -- While working on this module you are encouraged to remove it and fix -- any warnings i...
null
https://raw.githubusercontent.com/ghc/ghc/faea4bcdf4e71120a5480530fb1879e4439ed512/utils/genapply/Main.hs
haskell
The above warning suppression flags are a temporary kludge. While working on this module you are encouraged to remove it and fix any warnings in the module. See -style#warnings for details Note [Genapply target as host for RTS macros] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We improperly include *HOST...
# LANGUAGE CPP # # OPTIONS_GHC -fno - warn - missing - signatures # # OPTIONS_GHC -fno - warn - overlapping - patterns # # OPTIONS_GHC -fno - warn - name - shadowing # module Main(main) where #include "../../rts/include/ghcconfig.h" #include "../../rts/include/stg/MachRegsForHost.h" #include "../../rts/include/rts/C...
99df6f48d511d65abdfb676d63141188b2d5fb788e571c61e67133fd6c250052
clojure-interop/google-cloud-clients
CloudRedisStubSettings$Builder.clj
(ns com.google.cloud.redis.v1.stub.CloudRedisStubSettings$Builder "Builder for CloudRedisStubSettings." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.redis.v1.stub CloudRedisStubSettings$Builder])) (defn delete-instance-settings "Returns the builder for the settings used for calls...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.redis/src/com/google/cloud/redis/v1/stub/CloudRedisStubSettings%24Builder.clj
clojure
(ns com.google.cloud.redis.v1.stub.CloudRedisStubSettings$Builder "Builder for CloudRedisStubSettings." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.redis.v1.stub CloudRedisStubSettings$Builder])) (defn delete-instance-settings "Returns the builder for the settings used for calls...
b7d017500e30e288ba3e3d07cc5574b275bf4d43720b897d093f756dacd6ff9b
DavidAlphaFox/egame
egame_app.erl
-module(egame_app). -behaviour(application). -export([start/2]). -export([stop/1]). start(_Type, _Args) -> egame_sup:start_link(). stop(_State) -> ok.
null
https://raw.githubusercontent.com/DavidAlphaFox/egame/b00293964f309eb4f7458d9610a5ec8dd18ea062/src/egame_app.erl
erlang
-module(egame_app). -behaviour(application). -export([start/2]). -export([stop/1]). start(_Type, _Args) -> egame_sup:start_link(). stop(_State) -> ok.
4b27bf04552e05ac604a2551583081539f8fd2e07b5369b710c40813baad49f3
UChicago-PL/smyth
pretty.ml
open Lang (* Parameters *) let indent_size : int = 2 let max_inner : int = 30 (* Pretty printing types *) type state = { indent : int ; app_needs_parens : bool ; fancy_needs_parens : bool } type 'a printer = state -> 'a -> string (* Helpers *) let make_indent : int -> string = fun n -> Strin...
null
https://raw.githubusercontent.com/UChicago-PL/smyth/08fea281f70d3ee604fde9dde140c8a570d6905d/lib/smyth/pretty.ml
ocaml
Parameters Pretty printing types Helpers Collections Applications Patterns Types Expressions
open Lang let indent_size : int = 2 let max_inner : int = 30 type state = { indent : int ; app_needs_parens : bool ; fancy_needs_parens : bool } type 'a printer = state -> 'a -> string let make_indent : int -> string = fun n -> String.make (indent_size * n) ' ' type paren_type = | Round ...
29d65420e253a8a94e3d91dbf65269bbd45d30fbefa7f349ce6e8aece979c2c3
GaloisInc/semmc
Test.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE TypeApplications # module Main ( main ) where import qualified Control.Concurrent as C import Control.Monad ( replicateM_, when ) import Data.Proxy ( Proxy(..) ) import qualified System.Environment as E import qu...
null
https://raw.githubusercontent.com/GaloisInc/semmc/4dc4439720b3b0de8812a68f8156dc89da76da57/semmc-ppc/tools/Test.hs
haskell
# LANGUAGE GADTs # printf "Received test result with nonce %d\n" (R.resultNonce tr) r18 base r18 (modified) ctx2 ctx0 = V.zeroState (Proxy @PPC)
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE TypeApplications # module Main ( main ) where import qualified Control.Concurrent as C import Control.Monad ( replicateM_, when ) import Data.Proxy ( Proxy(..) ) import qualified System.Environment as E import qualified System.Exit as ...
79f96efc1a413efabb1291c5de745851f63a96db3f880138940f57c12b16ca10
rtoy/cmucl
derive.lisp
(in-package 'c) (defun foo (x y z r) (declare (type (unsigned-byte 8) x) (type (unsigned-byte 4) y) (type (signed-byte 8) z) (type unsigned-byte r)) (values (+ x y) (+ y z) (+ z r) (- x y) (- y z) (- z r) (* x y) (* y z) (* z r) (ash z -2)))
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/tests/derive.lisp
lisp
(in-package 'c) (defun foo (x y z r) (declare (type (unsigned-byte 8) x) (type (unsigned-byte 4) y) (type (signed-byte 8) z) (type unsigned-byte r)) (values (+ x y) (+ y z) (+ z r) (- x y) (- y z) (- z r) (* x y) (* y z) (* z r) (ash z -2)))
153b07d63b2e3f355cb9473e9122355fc1a6edc40646b68c1c96763a5f73289d
rkaippully/gamgee
Property.hs
# OPTIONS_GHC -fno - warn - orphans # -- | Property based tests module Gamgee.Test.Property ( propertyTests ) where import Control.Monad.ST (ST) import qualified Crypto.Random as CR import qualified Data.ByteArray.Encoding as BE import qualified Data.ByteString as BS imp...
null
https://raw.githubusercontent.com/rkaippully/gamgee/9e510c24b221181e78cd3bdd79c76b4030ddcc23/test/Gamgee/Test/Property.hs
haskell
| Property based tests | Ensures that an effect succeeded, fail the ST monad otherwise
# OPTIONS_GHC -fno - warn - orphans # module Gamgee.Test.Property ( propertyTests ) where import Control.Monad.ST (ST) import qualified Crypto.Random as CR import qualified Data.ByteArray.Encoding as BE import qualified Data.ByteString as BS import qualified Data.Text ...
58d0804290b3ebd3b456f56f15d9dd6562aa745a5f19a719c0f08e78f251a935
spawnfest/eep49ers
app1.erl
-module(app1). -behaviour(application). %% Application callbacks -export([start/2, stop/1]). -export([config_change/3]). start(_Type, _StartArgs) -> case app1_sup:start_link() of {ok, Pid} -> {ok, Pid}; Error -> Error end. stop(_State) -> ok. config_change(Changed, _New, _Removed) -> ca...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/sasl/test/release_handler_SUITE_data/app1_app2/lib1/app1-1.0/src/app1.erl
erlang
Application callbacks
-module(app1). -behaviour(application). -export([start/2, stop/1]). -export([config_change/3]). start(_Type, _StartArgs) -> case app1_sup:start_link() of {ok, Pid} -> {ok, Pid}; Error -> Error end. stop(_State) -> ok. config_change(Changed, _New, _Removed) -> catch ets:insert(otp_6162, ...
20c0e44e713b44d56acf0d77d63eea3188b403648cafedaab7ea1038e80bf774
jmlowenthal/staged-streams.agda
StreamList.hs
-- -- list like wrappers for abstract streams -- -- These specify the versions used when fusion occurs. -- -- So we can check our stream implementations, which are only used when -- fusion happens, are fast. -- module Bench.StreamList where import Prelude import qualified Prelude import Properties.Utils import qual...
null
https://raw.githubusercontent.com/jmlowenthal/staged-streams.agda/3ac5fbff18808a505185c88000a817046de35d0d/lib/stream-fusion-0.1.2.5/tests/Bench/StreamList.hs
haskell
list like wrappers for abstract streams These specify the versions used when fusion occurs. So we can check our stream implementations, which are only used when fusion happens, are fast. * Basic interface * List transformations reverse :: [a] -> [a] transpose :: [[a]] -> [[a]] * Reducing lists (fol...
module Bench.StreamList where import Prelude import qualified Prelude import Properties.Utils import qualified Data.Stream as Stream cons :: a -> [a] -> [a] snoc :: [a] -> a -> [a] append :: [a] -> [a] -> [a] head :: [a] -> a last :: [a] -> a tail :: ...
0175aa6fe9aa434efa74afd3b24dd02e545665a2391ed43611b3681ae3dcec8f
erpuno/ldap
tcp_listener.erl
@author < > %% @doc Generic TCP listener -module(tcp_listener). -behaviour(gen_server). -export([start_link/2]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(state, { listener, % Listening socket acceptor, ...
null
https://raw.githubusercontent.com/erpuno/ldap/7f8618e8ce9fc579118c9f67e0ccd2591f43a0f7/src/tcp_listener.erl
erlang
@doc Generic TCP listener Listening socket Asynchronous acceptor's internal reference New client connected - spawn a new process using the simple_one_for_one supervisor.
@author < > -module(tcp_listener). -behaviour(gen_server). -export([start_link/2]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(state, { FSM handling module }). -spec start_link(integer(), atom()) -> ignore | {'error', _} | {ok...
fc171e22bd82acc89f26f9661fde80b4526c9cbe99ab906d8385fcea94fc8b5b
EasyCrypt/easycrypt
ecHiNotations.ml
(* -------------------------------------------------------------------- *) open EcUtils open EcSymbols open EcLocation open EcParsetree open EcTypes open EcEnv module TT = EcTyping (* -------------------------------------------------------------------- *) type nterror = | NTE_Typing of EcTyping.tyerror | NTE_T...
null
https://raw.githubusercontent.com/EasyCrypt/easycrypt/f87695472e70c313ef2966e20979b1afcc2e543e/src/ecHiNotations.ml
ocaml
-------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- Translate bound idents and their ty...
open EcUtils open EcSymbols open EcLocation open EcParsetree open EcTypes open EcEnv module TT = EcTyping type nterror = | NTE_Typing of EcTyping.tyerror | NTE_TyNotClosed | NTE_DupIdent | NTE_UnknownBinder of symbol | NTE_AbbrevIsVar exception NotationError of EcLocation.t * EcEnv.env * nterror let nterror ...
c6310b1d195284fa0b74532024ff1186793b4a049db7aec848a894aafd7ab1b1
unison-code/uni-instr-sel
ConstraintFolder.hs
| Copyright : Copyright ( c ) 2012 - 2017 , < > License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <> License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > Main authors: Gabriel Hjort ...
null
https://raw.githubusercontent.com/unison-code/uni-instr-sel/2edb2f3399ea43e75f33706261bd6b93bedc6762/hlib/instr-sel/Language/InstrSel/Constraints/ConstraintFolder.hs
haskell
------------ Data types ------------ | Contains all the folder functions. The idea is that each function will recursively call the appropriate reconstruct function on every argument of the part, thus traversing the entire constraint and folding it from the bottom up. See also the 'ConstraintReconstructor' module...
| Copyright : Copyright ( c ) 2012 - 2017 , < > License : BSD3 ( see the LICENSE file ) Maintainer : Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <> License : BSD3 (see the LICENSE file) Maintainer : -} Main authors : < > Main authors: Gabriel Hjort ...
33907ee8059ba23dfd22949bd9850446482f79ea8a5066d3bbdf08a7fe5a17a4
basho/riak-erlang-client
riakc_set.erl
%% ------------------------------------------------------------------- %% %% riakc_set: Eventually-consistent set type %% Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file exce...
null
https://raw.githubusercontent.com/basho/riak-erlang-client/ea4fcd062f55a67e31c7294a1b8b8ccd957526c8/src/riakc_set.erl
erlang
------------------------------------------------------------------- riakc_set: Eventually-consistent set type 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 fo...
Copyright ( c ) 2013 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY @doc ...
0c159e5d1ca8df12877e0ba48704fc245deccbe48e96ae4124aaa7aeea9367ab
alexandroid000/improv
StringConst.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Ros.Test_msgs.StringConst where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosBinary ...
null
https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/Tests/test_msgs/golden/StringConst.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # module Ros.Test_msgs.StringConst where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosBinary import Ros.Internal.Msg.MsgInfo import qualified GHC.Generics as G impo...
5d67bccdb9ea9232d61bd55edbde67975e80cd5f2115322cb3950a6cc03d2e90
mtolly/onyxite-customs
Time.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # {-# LANGUAGE DerivingVia #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # {-# LANGUAGE MultiWayIf ...
null
https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib-game/src/Onyx/Game/Time.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE MultiWayIf # # LANGUAGE PatternSynonyms # just F is invalid past sustain continues to future | Events in the input list must not overlap. shouldn't happen we don't need to make PF, those get inserted later Empty P PF ...
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # # LANGUAGE TypeOperators # # LAN...
3ece4190ee15c307514c2c4bd644644cf3c23245c9c9bbb09551afdeec3910f3
plumatic/grab-bag
provision_test.clj
(ns crane.provision-test (:use clojure.test crane.provision) (:require [clojure.java.io :as java-io] [clojure.set :as set] [crane.config :as config])) (deftest rsync-cmd-test (is (= ["rsync" "-avzL" "--delete" "-e" "ssh -o StrictHostKeyChecking=no -i keypath" "foo/" "bar/" ...
null
https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/crane/test/crane/provision_test.clj
clojure
(ns crane.provision-test (:use clojure.test crane.provision) (:require [clojure.java.io :as java-io] [clojure.set :as set] [crane.config :as config])) (deftest rsync-cmd-test (is (= ["rsync" "-avzL" "--delete" "-e" "ssh -o StrictHostKeyChecking=no -i keypath" "foo/" "bar/" ...
c456c21509b84c64bbea10b7230c56553d75af3005abc61b2e50c6eaaa344d99
NorfairKing/bevel
AuthSpec.hs
module Bevel.API.Server.Handler.AuthSpec (spec) where import Bevel.API import Bevel.API.Data import Bevel.API.Data.Gen () import Bevel.API.Server.TestUtils import Bevel.Client import Network.HTTP.Types as HTTP import Test.QuickCheck import Test.Syd import Test.Syd.Validity spec :: Spec spec = serverSpec $ do descri...
null
https://raw.githubusercontent.com/NorfairKing/bevel/8cc74d83d058f916acf4cf247341852600d9456e/bevel-api-server-gen/test/Bevel/API/Server/Handler/AuthSpec.hs
haskell
module Bevel.API.Server.Handler.AuthSpec (spec) where import Bevel.API import Bevel.API.Data import Bevel.API.Data.Gen () import Bevel.API.Server.TestUtils import Bevel.Client import Network.HTTP.Types as HTTP import Test.QuickCheck import Test.Syd import Test.Syd.Validity spec :: Spec spec = serverSpec $ do descri...
cb91f6465642c23f69b524c5826e1a537b1620493c5d098bc503e204fc95a313
erlangonrails/devdb
comm.erl
2007 - 2010 fuer Informationstechnik Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Unless required by applicable law or agreed to in writing,...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/src/comm.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2007 - 2010 fuer Informationstechnik Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > This module allows to configure Scalaris for using Distributed Erlang Messages consist of a tup...
f183bd4d304a1cd46faa5ec19f043878512092ae0b8290a6a0f6e66398a2a532
jacekschae/learn-reitit-course-files
user.clj
(ns user (:require [integrant.repl :as ig-repl] [integrant.core :as ig] [integrant.repl.state :as state] [cheffy.server] [next.jdbc :as jdbc] [next.jdbc.sql :as sql])) (ig-repl/set-prep! (fn [] (-> "resources/config.edn" slurp ig/read-string))) (def go i...
null
https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/25-delete-recipe/dev/src/user.clj
clojure
(ns user (:require [integrant.repl :as ig-repl] [integrant.core :as ig] [integrant.repl.state :as state] [cheffy.server] [next.jdbc :as jdbc] [next.jdbc.sql :as sql])) (ig-repl/set-prep! (fn [] (-> "resources/config.edn" slurp ig/read-string))) (def go i...
bd4aba5f8308f2b02b17a246f801824b0766cc810eec06052f9b27bd7426bc9d
tek/polysemy-hasql
Database.hs
module Polysemy.Hasql.Data.Database where import Hasql.Connection (Connection) import Hasql.Statement (Statement) import Polysemy.Hasql.Data.DbType (Name) import Polysemy.Hasql.Data.SqlCode (SqlCode) import Polysemy.Hasql.DeriveStatement (DeriveQuery) data InitDb m = InitDb { tag :: Text, thunk :: Connecti...
null
https://raw.githubusercontent.com/tek/polysemy-hasql/e1ed71cacf6f329ee1428c3012d582c9eb6cf497/packages/hasql/lib/Polysemy/Hasql/Data/Database.hs
haskell
Additionally, it exposes managed access to the raw 'Connection' resource and automatic table initialization as higher-order actions. One is to use automatically derived codecs: @ prog :: Member Database r => Sem r () prog = do @ The other works by providing an explicit 'Statement': @ statement :: Statemen...
module Polysemy.Hasql.Data.Database where import Hasql.Connection (Connection) import Hasql.Statement (Statement) import Polysemy.Hasql.Data.DbType (Name) import Polysemy.Hasql.Data.SqlCode (SqlCode) import Polysemy.Hasql.DeriveStatement (DeriveQuery) data InitDb m = InitDb { tag :: Text, thunk :: Connecti...
e470b5bd49bce495dacbbc8c77163abb964991428037736743204ef18d0201e2
ruricolist/serapeum
conditions.lisp
(in-package #:serapeum) (defmacro ignoring (type &body body) "DEPRECATED: use `alexandria:ignore-some-conditions` instead." (simple-style-warning "~s is deprecated, use ~s instead" 'ignoring 'ignore-some-conditions) `(ignore-some-conditions (,type) ,@body)) (defun maybe-invoke-resta...
null
https://raw.githubusercontent.com/ruricolist/serapeum/3bc682d41f64d08192cc676cb34903238e28dd55/conditions.lisp
lisp
(in-package #:serapeum) (defmacro ignoring (type &body body) "DEPRECATED: use `alexandria:ignore-some-conditions` instead." (simple-style-warning "~s is deprecated, use ~s instead" 'ignoring 'ignore-some-conditions) `(ignore-some-conditions (,type) ,@body)) (defun maybe-invoke-resta...
3cb95ffcad4dd69067f095adfbcccdcf23dcfe74d801093c1c9a403ef15d4967
jacekschae/conduit
runner.cljs
(ns test.runner (:require [doo.runner :refer-macros [doo-tests]] [test.core-test])) (doo-tests 'test.core-test)
null
https://raw.githubusercontent.com/jacekschae/conduit/732d56d5bd981bd47fab3cdd1b2d96ea27b1e7ff/test/runner.cljs
clojure
(ns test.runner (:require [doo.runner :refer-macros [doo-tests]] [test.core-test])) (doo-tests 'test.core-test)
5916e262d5b2f0355bc8fcd1163d304daec493d1068b9f1b099d12dc613e517e
txyyss/Project-Euler
Euler049.hs
The arithmetic sequence , 1487 , 4817 , , in which each of the terms increases by 3330 , is unusual in two ways : ( i ) each of the three terms are prime , and , ( ii ) each of the 4 - digit numbers are permutations of one another . There are no arithmetic sequences made up of three 1- , 2- , or 3 - digit...
null
https://raw.githubusercontent.com/txyyss/Project-Euler/d2f41dad429013868445c1c9c1c270b951550ee9/Euler049.hs
haskell
in this sequence?
The arithmetic sequence , 1487 , 4817 , , in which each of the terms increases by 3330 , is unusual in two ways : ( i ) each of the three terms are prime , and , ( ii ) each of the 4 - digit numbers are permutations of one another . There are no arithmetic sequences made up of three 1- , 2- , or 3 - digit...
545183665a43c90cfca73fb2b10d2d22499ef87eee9bf859824f9772914a6a34
cjdev/cloud-seeder
MainSpec.hs
module Network.CloudSeeder.MainSpec (spec) where import Control.Monad.Except (ExceptT, runExceptT) import Control.Monad.Mock (WithResult(..)) import Data.Function ((&)) import Data.Functor.Identity (runIdentity) import Data.Semigroup ((<>)) import Network.AWS.CloudFormation (StackStatus(..), ExecutionStatus(..)) impor...
null
https://raw.githubusercontent.com/cjdev/cloud-seeder/242a3826a0cef58e1c390b51177e025781aecc66/test-suite/Network/CloudSeeder/MainSpec.hs
haskell
module Network.CloudSeeder.MainSpec (spec) where import Control.Monad.Except (ExceptT, runExceptT) import Control.Monad.Mock (WithResult(..)) import Data.Function ((&)) import Data.Functor.Identity (runIdentity) import Data.Semigroup ((<>)) import Network.AWS.CloudFormation (StackStatus(..), ExecutionStatus(..)) impor...
88584fff64bd8a74f2402ecdb5e69e1820804a24a168478a00162f92d32680a3
AlacrisIO/legicash-facts
ppx_deriving_rlp_runtime_core.mli
open Rlping module Rlp = Rlp module Rlping = Rlping module Rlp_encode = Rlp_encode module Rlp_decode = Rlp_decode module Private : sig val marshal_of_to : 'a to_rlp_item -> 'a marshal_rlp val unmarshal_of_of : 'a of_rlp_item -> 'a unmarshal_rlp val rlping_of_to_and_of : 'a to_rlp_item -> 'a of_rlp_ite...
null
https://raw.githubusercontent.com/AlacrisIO/legicash-facts/5d3663bade68c09bed47b3f58fa12580f38fdb46/src/ppx_deriving_rlp/src/ppx_deriving_rlp_runtime_core.mli
ocaml
* Given a type `a` which has pre_rlping, produce the full rlping for it.
open Rlping module Rlp = Rlp module Rlping = Rlping module Rlp_encode = Rlp_encode module Rlp_decode = Rlp_decode module Private : sig val marshal_of_to : 'a to_rlp_item -> 'a marshal_rlp val unmarshal_of_of : 'a of_rlp_item -> 'a unmarshal_rlp val rlping_of_to_and_of : 'a to_rlp_item -> 'a of_rlp_ite...
c88397c4ad9d3820a70e88f0d74f13f8511a0227d85da320374cdc69e9f923f3
JacquesCarette/Drasil
GenDefs.hs
# LANGUAGE PostfixOperators # module Drasil.Projectile.GenDefs (genDefns, posVecGD) where import Prelude hiding (cos, sin) import Language.Drasil import Theory.Drasil (GenDefn, TheoryModel, gd, gdNoRefs, equationalModel') import Utils.Drasil (weave) import Language.Drasil.Chunk.Concept.NamedCombinators import qualifie...
null
https://raw.githubusercontent.com/JacquesCarette/Drasil/a1c22b739c958ae169e8fe4fb2ea2b0a670dc7df/code/drasil-example/projectile/lib/Drasil/Projectile/GenDefs.hs
haskell
-------- Notes -------- Notes -------- Notes -------- Notes Helper for making rectilinear derivations Helper for making vector derivations
# LANGUAGE PostfixOperators # module Drasil.Projectile.GenDefs (genDefns, posVecGD) where import Prelude hiding (cos, sin) import Language.Drasil import Theory.Drasil (GenDefn, TheoryModel, gd, gdNoRefs, equationalModel') import Utils.Drasil (weave) import Language.Drasil.Chunk.Concept.NamedCombinators import qualifie...
68e77c3b923c62648e6729e745666aa084bbaecc1f08787b9d37be2d506f5311
homebaseio/datalog-console
tree_table_cards.cljs
(ns datalog-console.workspaces.tree-table-cards {:no-doc true} (:require [nubank.workspaces.core :as ws] [nubank.workspaces.model :as wsm] [nubank.workspaces.card-types.react :as ct.react] [reagent.core :as r] [datascript.core :as d] [datalog-console.compo...
null
https://raw.githubusercontent.com/homebaseio/datalog-console/a041f920ffb6434a14f81efe79197d56819d6363/src/dev/datalog_console/workspaces/tree_table_cards.cljs
clojure
(ns datalog-console.workspaces.tree-table-cards {:no-doc true} (:require [nubank.workspaces.core :as ws] [nubank.workspaces.model :as wsm] [nubank.workspaces.card-types.react :as ct.react] [reagent.core :as r] [datascript.core :as d] [datalog-console.compo...
96e448dfffe6678b32dfcd54eabbe8af63297698fe9331e9d29357ecf1f0f386
penpot/penpot
features.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC ;; This namespace is only to export the functions for toggle features (ns features (:require [app.main.fe...
null
https://raw.githubusercontent.com/penpot/penpot/e43fc0feb0f46dc27e2a3b89e32241ba2fab9a05/frontend/src/features.cljs
clojure
Copyright (c) KALEIDOS INC This namespace is only to export the functions for toggle features
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns features (:require [app.main.features :as features])) (defn ^:export components-v2 [] (features/toggle-feature! :components-v2))
ed6b9b9769995d0c2fbbf4599e3f920136f06b43bb21869ac270b07d45ce68c9
Smoltbob/Caml-Est-Belle
alpha_if.ml
let x = 1 in let _ = if true then let x = 2 in () else () in print_int x
null
https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/tests/gen-code/valid/alpha_if.ml
ocaml
let x = 1 in let _ = if true then let x = 2 in () else () in print_int x
6baddf811d0d01fbf4d0e63155bf2776373288b8a826156bdba9c935935847fc
nmunro/mtg-api
translation.lisp
(defpackage mtg-api/translation (:use :cl) (:export #:make-translation #:name #:language #:multiverse-id)) (in-package :mtg-api/translation) (defclass translation () ((name :initarg :name :initform "" :reader name) (language :initarg :language :init...
null
https://raw.githubusercontent.com/nmunro/mtg-api/f796794cde8a483278f22d7ac7e6c46302685ec1/src/cards/translation.lisp
lisp
(defpackage mtg-api/translation (:use :cl) (:export #:make-translation #:name #:language #:multiverse-id)) (in-package :mtg-api/translation) (defclass translation () ((name :initarg :name :initform "" :reader name) (language :initarg :language :init...
fc182c616fa96a20d07d9b4941532047bc521deadfe63ccb228ec59c0a3059a2
ItsMeijers/Lambdabox
Translate.hs
# LANGUAGE MultiParamTypeClasses # module Lambdabox.Translate ( Translate (..) ) where import Data.Text(Text) import Lambdabox.Exchange -- | Class for translating data types for specefic exchanges Change into phantom type and GADT class Exchange e => Translate e a b where translate :: e -> a -> b
null
https://raw.githubusercontent.com/ItsMeijers/Lambdabox/c19a8ae7d37b9f8ab5054d558fe788a5d4483092/src/Lambdabox/Translate.hs
haskell
| Class for translating data types for specefic exchanges
# LANGUAGE MultiParamTypeClasses # module Lambdabox.Translate ( Translate (..) ) where import Data.Text(Text) import Lambdabox.Exchange Change into phantom type and GADT class Exchange e => Translate e a b where translate :: e -> a -> b
3ab6247ffdc07f511f340a4ec699003293a9ce5afdc8649b872555e6cea8e69d
clash-lang/clash-compiler
MutualRecursion.hs
{-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} -- TODO: When it is possible to completely unfold and evaluate these in the evaluator and evaluate this test should be changed to -- show that the PE can reduce the entity to a constant -- module MutualRecursion where import Control.DeepSeq import Nume...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/PartialEvaluation/MutualRecursion.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # TODO: When it is possible to completely unfold and evaluate these show that the PE can reduce the entity to a constant TODO I can't think of a meaningful test until unrolling and primitive evaluation are implemented. The best that can be said right now is that...
in the evaluator and evaluate this test should be changed to module MutualRecursion where import Control.DeepSeq import Numeric.Natural import Clash.Prelude import Clash.Backend import Clash.Core.PartialEval import Clash.Core.Literal import Clash.Core.Subst import Clash.Debug import Clash.GHC.PartialEval impor...
8f969a555189dbd925bf3d7bb6afbbeb637b4cb2a1766dca105a674314d232f9
kadena-io/chainweaver
NodeInfoSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Frontend.Network.NodeInfoSpec where import qualified Pact.Types.ChainId as Pact import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit import Frontend.Network.NodeInfo (sortChainIds) tests :: TestTree tests = testGroup "NodeInfoSpec" [ testCase "Sort ChainIds" $ ...
null
https://raw.githubusercontent.com/kadena-io/chainweaver/3ea0bb317c07ddf954d4ebf24b33d1be7d5f9c45/frontend/tests/Frontend/Network/NodeInfoSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Frontend.Network.NodeInfoSpec where import qualified Pact.Types.ChainId as Pact import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit import Frontend.Network.NodeInfo (sortChainIds) tests :: TestTree tests = testGroup "NodeInfoSpec" [ testCase "Sort ChainIds" $ sortChainIds (Pact.ChainId <$> [...
10e38c5d17df988f836be2ac773d1efe5f40a79a0d655bbf7c2e032b9e6d09d5
haskell-beam/beam
employee3sql-1.hs
{-# LANGUAGE ImpredicativeTypes #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE UndecidableInstances # # LANGUAGE CPP # -- ! BUILD_COMMAND: runhaskell --ghc-arg=-fglasgow-exts -XStandaloneDeriving -XTypeSynonymInstances -XDeriveGeneric -XGADTs -XOverloadedStrings -XFlexibleCont...
null
https://raw.githubusercontent.com/haskell-beam/beam/3dc9f47b081384c99b45f3b4264f419ebc6d7b09/docs/beam-templates/employee3sql-1.hs
haskell
# LANGUAGE ImpredicativeTypes # ! BUILD_COMMAND: runhaskell --ghc-arg=-fglasgow-exts -XStandaloneDeriving -XTypeSynonymInstances -XDeriveGeneric -XGADTs -XOverloadedStrings -XFlexibleContexts -XFlexibleInstances -XTypeFamilies -XTypeApplications -XAllowAmbiguousTypes -XPartialTypeSignatures -I../../docs/beam-template...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE UndecidableInstances # # LANGUAGE CPP # ! EXTRA_DEPS : employee3common.hs employee3commonsql.hs module Main where #include "employee3common.hs" [ jamesOrder1, bettyOrder1, jamesOrder2 ] <- runBeamSqlite conn $ do ...
0d3a391692dfa200e64ba9e6cb5638199f64c78c855f63ff8c704a7f4e539441
compassus/compassus
util.cljc
(ns compassus.util (:require [om.util :as om-util] [om.next.impl.parser :as parser])) (defn collect [key mixins] (->> (map (fn [m] (get m key)) mixins) (remove nil?))) (defn collect-1 [key mixins] (first (keep key mixins)))
null
https://raw.githubusercontent.com/compassus/compassus/3e95aa4bd27a56c82aa2ed3eb101b8cd260b00dd/src/main/compassus/util.cljc
clojure
(ns compassus.util (:require [om.util :as om-util] [om.next.impl.parser :as parser])) (defn collect [key mixins] (->> (map (fn [m] (get m key)) mixins) (remove nil?))) (defn collect-1 [key mixins] (first (keep key mixins)))
b6b0c4716a998cf3b9eae03c848dc48b9e52ee31334ca4d5c9401addfa3da611
carl-eastlund/dracula
match.rkt
#lang scheme (require (for-syntax scheme/match scheme/struct-info "define.ss" "function.ss" "syntax.ss")) (define-syntax-rule (match? e p ...) (match e [p #t] ... [_ #f])) (define-syntax (define-struct-pattern stx) (parameterize ([current-syntax stx]) (synt...
null
https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/private/scheme/match.rkt
racket
define-match-expander is STUPIDLY non-uniform about variable expressions
#lang scheme (require (for-syntax scheme/match scheme/struct-info "define.ss" "function.ss" "syntax.ss")) (define-syntax-rule (match? e p ...) (match e [p #t] ... [_ #f])) (define-syntax (define-struct-pattern stx) (parameterize ([current-syntax stx]) (synt...
dcc040eaa60761c318f1e883144cd42ced1aaf3033550a94966fe67a4e008a09
Nick-Chapman/niz
disassemble_reachable.ml
module Z = Z_machine let story_file = Sys.argv.(1) let the_mem = Z.Mem.create ~story_file module I_decoder = Z.I_decoder.F(struct let the_mem = the_mem end) let () = I_decoder.disassemble_reachable()
null
https://raw.githubusercontent.com/Nick-Chapman/niz/603a437ace7c6babcb08648a98c6ace099e99216/bin/disassemble_reachable.ml
ocaml
module Z = Z_machine let story_file = Sys.argv.(1) let the_mem = Z.Mem.create ~story_file module I_decoder = Z.I_decoder.F(struct let the_mem = the_mem end) let () = I_decoder.disassemble_reachable()
98411fa3ad9e327f39ace8e008d81cfa7a7e8b12a466e5ed6198a0c478735665
themetaschemer/malt
A-equality.rkt
#lang racket ;;—————————————————–—————————————————–—————————————————– ;; Equality checks for mostly for testing. ;;—————————————————–—————————————————–—————————————————– (require "1-flats.ss") (require rackunit) ;;—————————————————–—————————————————–—————————————————– ;; These parameters can be overriden to account ...
null
https://raw.githubusercontent.com/themetaschemer/malt/78a04063a5a343f5cf4332e84da0e914cdb4d347/flat-tensors/tensors/A-equality.rkt
racket
—————————————————–—————————————————–—————————————————– Equality checks for mostly for testing. —————————————————–—————————————————–—————————————————– —————————————————–—————————————————–—————————————————– These parameters can be overriden to account for different type of numbers used inside tensors. ————————————————...
#lang racket (require "1-flats.ss") (require rackunit) (define tolerance (make-parameter 0.0001)) (define equal-within-tolerance? (make-parameter (λ (actual expected) (< (abs (- actual expected)) (tolerance))))) (define tensor-equal? (λ (actual expected) (or (equal? actual expected) (and ...
4d018a3dac1aef3ea90c07a87141f06dbf5041c79f2a4bfa687968f3b33134e9
CyberCat-Institute/open-game-engine
OpenGames.hs
module OpenGames ( module OG , Kleisli(..) ) where import OpenGames.Engine.Engine as OG import OpenGames.Engine.TLL as OG import OpenGames.Engine.OpenGames as OG import OpenGames.Engine.OpticClass as OG import OpenGames.Engine.Diagnostics as OG import Control.Arrow as OG (Kleisli(..))
null
https://raw.githubusercontent.com/CyberCat-Institute/open-game-engine/86031c42bf13178554c21cd7ab9e9d18f1ca6963/src/OpenGames.hs
haskell
module OpenGames ( module OG , Kleisli(..) ) where import OpenGames.Engine.Engine as OG import OpenGames.Engine.TLL as OG import OpenGames.Engine.OpenGames as OG import OpenGames.Engine.OpticClass as OG import OpenGames.Engine.Diagnostics as OG import Control.Arrow as OG (Kleisli(..))
58943ed99ae2f131403c6d1a5fefc4f79f6708bd244b1dfa0c9a650f71130286
mirage/capnp-rpc
vat.ml
open Lwt.Infix open Capnp_rpc_lwt module Log = Capnp_rpc.Debug.Log module ID_map = Auth.Digest.Map module Make (Network : S.NETWORK) (Underlying : Mirage_flow.S) = struct module CapTP = CapTP_capnp.Make (Network) let hash = `SHA256 (* Only support a single hash for now *) type connection_attempt = (CapTP.t, ...
null
https://raw.githubusercontent.com/mirage/capnp-rpc/f04fa96a583994b71731bc1288833f8304c9ce81/capnp-rpc-net/vat.ml
ocaml
Only support a single hash for now Fires when a connection is removed Out-going connections being attempted. Accepted connections Already replaced by a new one? We need to start a new connection attempt. Already connected; use that. We're already trying to establish a connection, wait for that. [t] isn...
open Lwt.Infix open Capnp_rpc_lwt module Log = Capnp_rpc.Debug.Log module ID_map = Auth.Digest.Map module Make (Network : S.NETWORK) (Underlying : Mirage_flow.S) = struct module CapTP = CapTP_capnp.Make (Network) type connection_attempt = (CapTP.t, Capnp_rpc.Exception.t) result Lwt.t type t = { network ...
fed8bff2c78a7b5aa1255f6d9fd254436a6ab532eda5a89c2c22970686aea0c5
iijlab/postgresql-pure
Pure.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedLabels #-} # LANGUAGE OverloadedStrings # # LANGUAGE TypeApplicatio...
null
https://raw.githubusercontent.com/iijlab/postgresql-pure/2a640f102f3e3540aedbcf4cfb5d1ed10310f773/src/Database/HDBC/PostgreSQL/Pure.hs
haskell
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE OverloadedLabels # # LANGUAGE TypeSynonymInstances # | * Connection * Transaction | A configuration of a connection. Default configuration is 'def', which is following. >>> address def >>> user def "postgres" >>> password...
# LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedStrings # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wno - orphans # This is a compatible interface with @HDBC - postgresql@ 's @Database . ...
f8b2badf53c1377fa9b105d95c1d0f83b1aa0eb1537f64f1f463231cf325dcf9
nuvla/ui
subs.cljs
(ns sixsq.nuvla.ui.main.subs (:require [re-frame.core :refer [reg-sub]] [sixsq.nuvla.ui.cimi.subs :as api-subs] [sixsq.nuvla.ui.main.spec :as spec] [sixsq.nuvla.ui.session.subs :as session-subs])) (reg-sub ::loading? (fn [db] (::spec/loading? db))) (reg-sub ::not-foun...
null
https://raw.githubusercontent.com/nuvla/ui/52718be9e639345b031673e69bc231b38974f3a9/code/src/cljs/sixsq/nuvla/ui/main/subs.cljs
clojure
(ns sixsq.nuvla.ui.main.subs (:require [re-frame.core :refer [reg-sub]] [sixsq.nuvla.ui.cimi.subs :as api-subs] [sixsq.nuvla.ui.main.spec :as spec] [sixsq.nuvla.ui.session.subs :as session-subs])) (reg-sub ::loading? (fn [db] (::spec/loading? db))) (reg-sub ::not-foun...
86842dd9496c618151ac8c8b969bd1a4411cbe0631a5ae46eefd0dee2759b9bf
static-analysis-engineering/codehawk
bCHPowerOpcodeRecords.mli
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/d2e83cef7430defdc4cf30fc1495fe4ff64d9f9d/CodeHawk/CHB/bchlibpower32/bCHPowerOpcodeRecords.mli
ocaml
chutil bchlib bchpower32
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
8f6c0850c9ff140b38a6958d67eba71fabdcdf8a57613e8f03f87f404e76ab46
bugczw/Introduction-to-Functional-Programming-in-OCaml
return.ml
let f1 = function n -> (function x -> n+x);; (f1 17) 73;; f1 17 73;; let f2 = fun n x -> n+x;; f2 17 73;; (f2 17) 73;;
null
https://raw.githubusercontent.com/bugczw/Introduction-to-Functional-Programming-in-OCaml/13c4d1f92e7479f8eb10ea5d4c43a598b6676d0f/OCaml_MOOC_W4_ALL/return.ml
ocaml
let f1 = function n -> (function x -> n+x);; (f1 17) 73;; f1 17 73;; let f2 = fun n x -> n+x;; f2 17 73;; (f2 17) 73;;
0be1e2e53e5ae3e991336e1727f4265af8f0b61e0dd00fc66b3441b50db4f266
static-analysis-engineering/codehawk
bCHAssemblyInstructions.mli
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/c1b3158e0d73cda7cfc10d75f6173f4297991a82/CodeHawk/CHB/bchlibx86/bCHAssemblyInstructions.mli
ocaml
bchlib bchlibx86 * Holds an array of all of the assembly instructions, made available through a class instance reference. This is the backing store of all assembly instructions. * Return a reference to the class wrapper of the array of assembly instructions. * Create an array of the given size to hold...
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
76e2b8ed797c87d9b96e13766add6e11c85b72ba4abbc147daa426dd59027a85
AdaCore/why3
coq.ml
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University (* ...
null
https://raw.githubusercontent.com/AdaCore/why3/3b8e66acaa0f2df0118728c7c5c8c4a4b47de4f3/src/printer/coq.ml
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University General Public License version 2.1 , with the special exception open Format open Pp open Ident open Ty open Term open Decl open Printer let black_list = [ "_"; "Axiom"...
c9746bc76526af0719eb27d11465e5db31e63632e4735711046cde0db6e856ab
CRogers/obc
peepopt.ml
* peepopt.ml * * This file is part of the Oxford Oberon-2 compiler * 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 . Redistributions...
null
https://raw.githubusercontent.com/CRogers/obc/49064db244e0c9d2ec2a83420c8d0ee917b54196/compiler/peepopt.ml
ocaml
Temporarily expand abbreviations Static bounds checks A little constant folding Convert int to char or short, then store char Specially for INC(local) and INC(global) For simultaneous assignment Void returns Tidy up jumps and labels: Introduce specialized instructions Avoid out-of-line constants Sm...
* peepopt.ml * * This file is part of the Oxford Oberon-2 compiler * 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 . Redistributions...
2aad667c0408786da20a69930ef5381c3197752748cb3bbc1cf70d5bc7f0b5b0
cky/guile
coverage.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; Copyright ( C ) 2010 Free Software Foundation , Inc. ;;; ;;; This library is free software; you can redistribute it and/or ;;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 3 of the Li...
null
https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/module/system/vm/coverage.scm
scheme
coding : utf-8 ; -*- This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A P...
Copyright ( C ) 2010 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA (define-module (system vm coverage) #:use-module (...
f91ab79283c11f7dca1395b2163d1af1d31bda5d20d10c9dd097cba2bb67741f
dyzsr/ocaml-selectml
syntaxerr.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/parsing/syntaxerr.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 error = Unclosed of Location.t * string * Location.t * string | Expecting of Location.t * str...
ae6781119bf205578fc022ebb1d97c2fef896c5d497fe0f78a06727237c1f256
alavrik/piqi
piq.ml
Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014 , 2017 Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed...
null
https://raw.githubusercontent.com/alavrik/piqi/bcea4d44997966198dc295df0609591fa787b1d2/piqilib/piq.ml
ocaml
upper-level setting overrides lower-level setting try looking in lower-level aliases piq format can not be defined for non-primitive types already defined, just check flag inherit the record-level setting when the local per-field setting is * missing resolve Piq representation format settings stuff ...
Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014 , 2017 Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed...
8b5638a7d7690c39c4e8df9d31b6be3c230106eaf48c486ace5afaf86a2d1260
OctopiChalmers/haski
Type.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE Rank2Types #-} # LANGUAGE UndecidableInstances # -- needed for the pattern synonyms {-# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #-} module Haski.Type ( module Haski.Type ...
null
https://raw.githubusercontent.com/OctopiChalmers/haski/97835d6d90d0c82d29864db03955db0aaaf08c67/src/Haski/Type.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE Rank2Types # needed for the pattern synonyms # OPTIONS_GHC -fplugin GHC.TypeLits.Normalise # user defined type NOTE: `Typeable a` is not strictly needed since typeRepLT already gives us a type-representation, but it's convenient since it implements much of the boilerplate ...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE UndecidableInstances # module Haski.Type ( module Haski.Type , eqT, gcast , KnownNat , (:~:)(..) ) where import Haski.Enum import Data.Int (Int8) import Data.Typeable import Control.Applicative ...
3ed3da74df80495b6804a688e6f5586dd92c5a57cf9400c2e05a720a7f67cf86
kelamg/HtDP2e-workthrough
ex13.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-advanced-reader.ss" "lang")((modname ex13) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t #...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex13.rkt
racket
about the language level of this file in a form that our tools can easily process.
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-advanced-reader.ss" "lang")((modname ex13) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t #t none #f () #f))) (define (string-first str) (if (> (string-length str) 0) (s...
0fbd3788db7b1e83ff1e0fe7c5cac93aa11f6503a9888d00a0918f9971244e12
nasa/PRECiSA
TypeConversions.hs
-- Notices: -- Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved . -- Disclaimers No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTO...
null
https://raw.githubusercontent.com/nasa/PRECiSA/91e1e7543c5888ad5fb123d3462f71d085b99741/PRECiSA/src/Common/TypeConversions.hs
haskell
Notices: Disclaimers
Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved . No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , INCLUDING , BUT NOT LIMIT...
6d2c18dc3fb72c074b4e29f860872bb41da67fb8a64dcc7d501e2944223a32cc
anuragsoni/shuttle
input_channel.mli
open! Core open! Async_kernel open Async_unix type t [@@deriving sexp_of] val create : ?buf_len:int -> ?time_source:[> read ] Time_source.T1.t -> Fd.t -> t val time_source : t -> Time_source.t val buffer_size : t -> int val is_closed : t -> bool val closed : t -> unit Deferred.t val close : t -> unit Deferred.t val r...
null
https://raw.githubusercontent.com/anuragsoni/shuttle/4b6b477cc9cc811ad717e9ac663b4c4e7346f4b6/http11/src/input_channel.mli
ocaml
* [drain t] reads chunks of data from the reader and discards them. * [pipe] returns a reader pipe that contains the results of reading chunks from an input_channel.
open! Core open! Async_kernel open Async_unix type t [@@deriving sexp_of] val create : ?buf_len:int -> ?time_source:[> read ] Time_source.T1.t -> Fd.t -> t val time_source : t -> Time_source.t val buffer_size : t -> int val is_closed : t -> bool val closed : t -> unit Deferred.t val close : t -> unit Deferred.t val r...
3ee7b7a14feef6ad304a0221ddef217aea62d3d6ba7c5f15ac4a79b47a889f6c
csabahruska/gpipe-quake3
BSP.hs
{-# LANGUAGE OverloadedStrings, PackageImports #-} module BSP where import Control.Applicative import Control.Monad import Data.Bits import Data.Char import Data.Int import Data.Word import "linear" Linear import Data.Binary as B import Data.Binary.Get as B import Data.Binary.IEEE754 import Data.Vector (Vector) impor...
null
https://raw.githubusercontent.com/csabahruska/gpipe-quake3/cf625599b6220cf8b4b27a931f94446a080529e6/BSP.hs
haskell
# LANGUAGE OverloadedStrings, PackageImports # / ^ Game-related object descriptions ^ Stores texture information ^ Stores the splitting planes ^ Stores the leafs of the nodes ^ Stores the leaf's indices into the faces ^ Stores the leaf's indices into the brushes ^ Descriptions of rigid world geometry in map ^ ...
module BSP where import Control.Applicative import Control.Monad import Data.Bits import Data.Char import Data.Int import Data.Word import "linear" Linear import Data.Binary as B import Data.Binary.Get as B import Data.Binary.IEEE754 import Data.Vector (Vector) import qualified Data.ByteString as SB8 import qualified...
f177e36fa5f39ca93c47cacf1fd418289c099b0d12a91033858c09f1186b8cf8
amuletml/amulet
Emit.hs
# LANGUAGE OverloadedStrings , NamedFieldPuns , FlexibleContexts , FlexibleInstances , TupleSections , ViewPatterns , ScopedTypeVariables , TemplateHaskell , QuasiQuotes , TypeFamilies # OverloadedStrings, NamedFieldPuns, FlexibleContexts , FlexibleInstances, TupleSections, ViewPatterns , ScopedTypeVariable...
null
https://raw.githubusercontent.com/amuletml/amulet/1beab4d6ca3fc53b151fe2ba97bc82e6afa9fc0d/src/Backend/Lua/Emit.hs
haskell
^ A foreign function whose body should be inlined when used. | A "normal" toplevel declaration, which should just be referenced by variable. Purely exists so we don't accidentally start putting random things One should use 'simpleOf' instead of using the 'LuaSimp' constructor, for that additional safety. state...
# LANGUAGE OverloadedStrings , NamedFieldPuns , FlexibleContexts , FlexibleInstances , TupleSections , ViewPatterns , ScopedTypeVariables , TemplateHaskell , QuasiQuotes , TypeFamilies # OverloadedStrings, NamedFieldPuns, FlexibleContexts , FlexibleInstances, TupleSections, ViewPatterns , ScopedTypeVariable...
7ed8faaa4d101c424247d18e9c35a1662269f11a3814fc88e92a8a4cab71a52a
lisp-korea/sicp
ex-4-3-longfin.scm
4.3 Variations on a Scheme -- Nondeterministic Computing (define (prime-sum-pair list1 list2) (let ((a (an-element-of list1)) (b (an-element-of list2))) (require (prime? (+ a b))) (list a b))) (define (prime? x) (define (iter n) (cond ((= n x) true) ((= (remainder x n) 0) false) (else (iter (+...
null
https://raw.githubusercontent.com/lisp-korea/sicp/4cdc1b1d858c6da7c9f4ec925ff4a724f36041cc/ch04/4.3/ex-4-3-longfin.scm
scheme
Driver loop ; ; input : ;;; Starting a new problem ; ; Amb - Eval value : ; ; input : try-again ; ; Amb - Eval value : ; ; input : try-again ; ; Amb - Eval value : ; ; input : try-again ;;; There are no more values of ; ; input : ; ; Starting a new problem ; ; ; Amb - Eval value : ( 30 11 ...
4.3 Variations on a Scheme -- Nondeterministic Computing (define (prime-sum-pair list1 list2) (let ((a (an-element-of list1)) (b (an-element-of list2))) (require (prime? (+ a b))) (list a b))) (define (prime? x) (define (iter n) (cond ((= n x) true) ((= (remainder x n) 0) false) (else (iter (+...
efe4ffa8812509860dc93374bb4054f2591c41fa8bb1b5ef157393d9a0aec915
spawnfest/eep49ers
wxXmlResource.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2020 . 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 applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxXmlResource.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 lan...
Copyright Ericsson AB 2008 - 2020 . 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(wxXmlResource). -include("wxe.hrl"). -export([ xrcctrl/3 ,attachUnknownControl/3,attachUnknownControl/4,clea...
be0b67528b6385a18b5cdaef3a29e2830d8977d26684a7bff17002541f8f54cb
albertoruiz/easyVision
hello.hs
import Vision.GUI.Simple import Image import Image.Capture main = do img <- loadRGB "../../data/images/transi/dscn2070.jpg" runIt $ browser "image" [img] (const Draw)
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/tour/hello.hs
haskell
import Vision.GUI.Simple import Image import Image.Capture main = do img <- loadRGB "../../data/images/transi/dscn2070.jpg" runIt $ browser "image" [img] (const Draw)
6894bdbd3d42902d6026da9c8af187475234aa6b84147038186b53a37e3c0716
haskell/haskell-language-server
HLS.hs
# LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PolyKinds # module Development.IDE.Plugin.HLS ( asGhcIdePlugin , Log(..) ) where import Control.Exception (SomeException) import Control.Lens ...
null
https://raw.githubusercontent.com/haskell/haskell-language-server/6f5a73507f8d9266a486feaf8695c052362b9b95/ghcide/src/Development/IDE/Plugin/HLS.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # --------------------------------------------------------------------- various error message specific builders ^ command that failed to parse ^ Plugin that created the command ^ The JSON Error message | Map a set of plugins to the underlying ghcide eng...
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # module Development.IDE.Plugin.HLS ( asGhcIdePlugin , Log(..) ) where import Control.Exception (SomeException) import Control.Lens ((^.)) import Control.Monad import qualified Data...
81f311fc6521890d0f42eaf6ceef48acaba93e24d5c2d8642d558f4095f3b783
atongen/setml
game_status.ml
type t = | New | Started | Complete let to_string = function | New -> "new" | Started -> "started" | Complete -> "complete" let of_string = function | "new" -> New | "started" -> Started | "complete" -> Complete | ts -> raise (Invalid_argument ("Unknown game status: " ^ ts))
null
https://raw.githubusercontent.com/atongen/setml/8afee909ba6656506a69f79fd8682b37f2d2928a/src/shared/game_status.ml
ocaml
type t = | New | Started | Complete let to_string = function | New -> "new" | Started -> "started" | Complete -> "complete" let of_string = function | "new" -> New | "started" -> Started | "complete" -> Complete | ts -> raise (Invalid_argument ("Unknown game status: " ^ ts))
d81b9eaf8549786b7106a4e00b7bb47434d548a9d2f9047554954cd33ea5080e
ocaml/dune
arg.ml
open Stdune include Cmdliner.Arg module Stanza = Dune_lang.Stanza module Package = Dune_engine.Package module String_with_vars = Dune_lang.String_with_vars module Pform = Dune_lang.Pform module Dep_conf = Dune_rules.Dep_conf module Context_name = Dune_engine.Context_name let package_name = conv Package.Name.conv modu...
null
https://raw.githubusercontent.com/ocaml/dune/60a36f07c790402beb5f2e42db25b390f9ff0aba/bin/arg.ml
ocaml
open Stdune include Cmdliner.Arg module Stanza = Dune_lang.Stanza module Package = Dune_engine.Package module String_with_vars = Dune_lang.String_with_vars module Pform = Dune_lang.Pform module Dep_conf = Dune_rules.Dep_conf module Context_name = Dune_engine.Context_name let package_name = conv Package.Name.conv modu...
70d79311f480f7f3de2b8e21fbddd6e4c79071df377ee03c791258789ee1c05b
smimram/monadic-synth
obx.ml
Trying to recreate . open Msynth open Extlib open Stream let synth ?(master_volume=cst 1.) ?(detune=cst 0.1) (* detuning in semitone *) ?(unison=cst 1) (* number of unison channels *) ?(stereo_amount=cst 0.5) ?(stereo_mode=cst `Spread) ?(lfo_form=cst `Sine) ?(lfo_rate=cst 2.) ?(l...
null
https://raw.githubusercontent.com/smimram/monadic-synth/100d5cb6f84443c2379311faae5ab950214abcae/examples/obx.ml
ocaml
detuning in semitone number of unison channels Noise Sub-oscillator Pitch bend Low pass filter let reverb = Stereo.freeverb () in >>= reverb Board. LED animation
Trying to recreate . open Msynth open Extlib open Stream let synth ?(master_volume=cst 1.) ?(stereo_amount=cst 0.5) ?(stereo_mode=cst `Spread) ?(lfo_form=cst `Sine) ?(lfo_rate=cst 2.) ?(lfo_pwm1=cst 0.5) ?(lfo_pwm2=cst 0.5) ?(osc1_shape=cst `Saw) ?(osc2_shape=cst `Square) ...
3606c7f310206ba1b2117eb556a49adcbbff5eb04e8497c8f4a747d7e042b576
antono/guix-debian
pki.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 , 2014 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of t...
null
https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/guix/pki.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2013 , 2014 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (guix pki) #:use-module (guix config) #:use-module (guix pk-crypto) #:use-module ((gui...
77b5957f60f997ba9cadc34cdf7932e1add333682ca2572684a9db7624883424
TempusMUD/cl-tempus
corpse-retrieval.lisp
(in-package #:tempus) (defcommand (ch "retrieve") (:standing) (send-to-char ch "You can't do that here.~%")) (define-special corpse-retrieval (trigger self ch command vars) (+spec-mob+) (declare (ignore vars)) (when (and (eql trigger 'command) (string= (first (command-info-pattern command)) "retrie...
null
https://raw.githubusercontent.com/TempusMUD/cl-tempus/c5008c8d782ba44373d89b77c23abaefec3aa6ff/src/specials/corpse-retrieval.lisp
lisp
(in-package #:tempus) (defcommand (ch "retrieve") (:standing) (send-to-char ch "You can't do that here.~%")) (define-special corpse-retrieval (trigger self ch command vars) (+spec-mob+) (declare (ignore vars)) (when (and (eql trigger 'command) (string= (first (command-info-pattern command)) "retrie...
3f0a37e90fa01afd0f5dff4c8917d4074b9fe4748a9ddaeb733e66d58b6d77fc
eamsden/Animas
Point2.hs
# LANGUAGE MultiParamTypeClasses , FlexibleInstances # -- | Module : FRP.Animas . Point2 Copyright : ( c ) and , Yale University , 2003 -- License : BSD-style (see the LICENSE file in the distribution) -- -- Maintainer : -- Stability : provisional Portability : non - portable ( GHC e...
null
https://raw.githubusercontent.com/eamsden/Animas/2404d1de20982a337109fc6032cb77b022514f9d/src/FRP/Animas/Point2.hs
haskell
| License : BSD-style (see the LICENSE file in the distribution) Maintainer : Stability : provisional 2D point abstraction (R^2). ToDo: Deriving Show, or provide dedicated show instance? | X coordinate | Y coordinate
# LANGUAGE MultiParamTypeClasses , FlexibleInstances # Module : FRP.Animas . Point2 Copyright : ( c ) and , Yale University , 2003 Portability : non - portable ( GHC extensions ) module FRP.Animas.Point2 ( Point2(..), point2X, point2Y ) where import FRP.Animas.VectorSpace () impor...
72db7fd66e5f132d90cada47e52b145ee75f0ecf6c4d137a8f064290a30a23a3
input-output-hk/plutus-apps
Types.hs
# LANGUAGE DataKinds # {-# LANGUAGE OverloadedStrings #-} module Types ( -- * Generate config types AppOpts(..) , ConfigCommand(..) , NetworkName(..) -- * Node config types , NodeOpts(..) , NodeDirectory(..) , NodeDbPath , createNodeDbDirPath , getNodeDbDirPath ...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/62efdd2bfab3e076d40e07f8f4d7864a7f2ccc91/plutus-pab-executables/pab-cli/Types.hs
haskell
# LANGUAGE OverloadedStrings # * Generate config types * Node config types * Chain index config types * PAB config types * Other types | Smart constructor for 'NodeSocketPath'. All kinds of possible exceptions here such as `isDoesNotExistError`, `isPermissionError`, etc. | Waits until the given node socket pat...
# LANGUAGE DataKinds # module Types ( AppOpts(..) , ConfigCommand(..) , NetworkName(..) , NodeOpts(..) , NodeDirectory(..) , NodeDbPath , createNodeDbDirPath , getNodeDbDirPath , NodeSocketPath(..) , createNodeSocketFilePath , getNodeSocketFilePath , remov...
22ae6ea2694b1479bd1994181357c41b850efe8b1f5f5e6fdde2739d147a4d1e
logseq/mldoc
property.ml
open Angstrom open Prelude open Conf Property kinds : 1 . [ [ a ] ] , [ [ b ] ] , [ [ c [ [ d ] ] ] ] 2 . [ [ a ] ] , # b , # c 3 . " abc " 4 . [ [ c ] ] blabla [ [ b ] ] Property kinds: 1. [[a]], [[b]], [[c [[d]]]] 2. [[a]], #b, #c 3. "abc" 4. [[c]] blabla [[b]] *) (* steps:...
null
https://raw.githubusercontent.com/logseq/mldoc/4e402979224f8e4700675ec0b7467a0d0c1721cf/lib/syntax/property.ml
ocaml
steps: 1. check whether the property value is enclosed by quotes, if so, return empty 1. parsing all the links 2. if there's no links, check whether it's separated by `,`
open Angstrom open Prelude open Conf Property kinds : 1 . [ [ a ] ] , [ [ b ] ] , [ [ c [ [ d ] ] ] ] 2 . [ [ a ] ] , # b , # c 3 . " abc " 4 . [ [ c ] ] blabla [ [ b ] ] Property kinds: 1. [[a]], [[b]], [[c [[d]]]] 2. [[a]], #b, #c 3. "abc" 4. [[c]] blabla [[b]] *) let prop...
732845619b99f9ccdc1f29a9fd766dd8c65202624b4336703907cfc095a21662
tel/saltine
Util.hs
{-# LANGUAGE BangPatterns #-} module Crypto.Saltine.Internal.Util ( module Crypto.Saltine.Internal.Util , withCString , allocaBytes ) where import Data.ByteString (ByteString) import Data.ByteString.Unsafe import Data.Monoid import Foreign.C import Foreign.Marshal.Alloc (mallocBytes, allocaBytes) ...
null
https://raw.githubusercontent.com/tel/saltine/b00e00fa8ce8bf4ee176a9d3deead57c590fc686/src/Crypto/Saltine/Internal/Util.hs
haskell
# LANGUAGE BangPatterns # | Returns @Nothing@ if the subtraction would result in an underflow or a negative number. with wraparound. The @fst . cycleSuc@ is whether the wraparound occurred (i.e. @fst . cycleSucc == (== maxBound)@). it. | Computes the orbit of a endomorphism... in a very brute force manner. Exist...
module Crypto.Saltine.Internal.Util ( module Crypto.Saltine.Internal.Util , withCString , allocaBytes ) where import Data.ByteString (ByteString) import Data.ByteString.Unsafe import Data.Monoid import Foreign.C import Foreign.Marshal.Alloc (mallocBytes, allocaBytes) import Foreign.Ptr import GHC....
d178f204d5179ff2875ba26c39b68426b6377cc511d41896b40d692a59113543
zhangchiqing/beginner-friendly-haskell-for-web-development
Ping.hs
module SimpleService.HTTP.Action.Ping where import SimpleService.Types.Pong (success) import Web.Scotty (ActionM, json) ping :: ActionM () ping = json success
null
https://raw.githubusercontent.com/zhangchiqing/beginner-friendly-haskell-for-web-development/70a620c76f0a08dfb2caa8788c7c9dfa801122e9/a-simple-http-service/src/SimpleService/HTTP/Action/Ping.hs
haskell
module SimpleService.HTTP.Action.Ping where import SimpleService.Types.Pong (success) import Web.Scotty (ActionM, json) ping :: ActionM () ping = json success
7bceb4c6a11158e4ac5c3effb9c738cf9103ce16a0de3feb55e907655d2afe1d
mfikes/fifth-postulate
ns162.cljs
(ns fifth-postulate.ns162) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns162.cljs
clojure
(ns fifth-postulate.ns162) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
1948b23460e98210d0afab113ec8f17695aa71a8872e08e1c3a90feb072c0576
coq/coq
tac2match.mli
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/3030748e82b43e1fde289eeb43e76e3f862145e2/plugins/ltac2/tac2match.mli
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
d2c5ae03ead25e678c7d54adfaa0f99122bbdf9815f8ccd0398646d63a796166
jordanthayer/ocaml-search
dlist.ml
$ I d : , v 1.3 2003/09/27 01:12:01 ruml Exp ruml $ The set is a singly linked list , with a pointer to the object contained by the item Created by Jordan , Dec 07 . Tweaked by , Jan 08 . want destructive insertion . The set is a singly linked list, with a pointer to the ...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/structs/dlist.ml
ocaml
first cell is always dummy. nil is point-to-self *************** basics **************** put after dummy empty, so terminate n is last - terminate dummy plenty more
$ I d : , v 1.3 2003/09/27 01:12:01 ruml Exp ruml $ The set is a singly linked list , with a pointer to the object contained by the item Created by Jordan , Dec 07 . Tweaked by , Jan 08 . want destructive insertion . The set is a singly linked list, with a pointer to the ...
cbb123a101b3920f79df95fef951250e91acdbd628ec42ed1e7c19f840580300
matijapretnar/eff
dirt.ml
open Utils (** dirt parameters *) module Param = Symbol.Make (Symbol.Parameter (struct let ascii_symbol = "drt" let utf8_symbol = "δ" end)) module Row = struct type t = Param of Param.t | Empty end type t = { effect_set : Effect.Set.t; row : Row.t } let print ?max_level drt ppf = let print ?at_level = Prin...
null
https://raw.githubusercontent.com/matijapretnar/eff/0b0ec7a83e7db4d040ed8fdfc1ac6e3c0f344be1/src/01-language/dirt.ml
ocaml
* dirt parameters
open Utils module Param = Symbol.Make (Symbol.Parameter (struct let ascii_symbol = "drt" let utf8_symbol = "δ" end)) module Row = struct type t = Param of Param.t | Empty end type t = { effect_set : Effect.Set.t; row : Row.t } let print ?max_level drt ppf = let print ?at_level = Print.print ?max_level ?at_...
b7afc0b58e00e9c3f6c10765b5d04c37cb017e268075a2d898d22c6ac34a4e3b
thheller/shadow-grove
html.clj
(ns shadow.grove.others.html (:refer-clojure :exclude (str)) (:require [shadow.grove.builder :as build] [shadow.grove.protocols :as p]) (:import [java.io Writer StringWriter] [clojure.lang IDeref] com.google.common.html.HtmlEscapers)) (set! *warn-on-reflection* true) (defrecord Ele...
null
https://raw.githubusercontent.com/thheller/shadow-grove/2398f30b89aadd38f1c18081b9290bacf5f7d0e0/src/test/shadow/experiments/grove/others/html.clj
clojure
<tag key="val" ...> static attributes can be emitted as is since it is unlikely we will XSS ourselves dynamic attrs must be escaped properly </tag> only text is passed through as is everything else must be escaped
(ns shadow.grove.others.html (:refer-clojure :exclude (str)) (:require [shadow.grove.builder :as build] [shadow.grove.protocols :as p]) (:import [java.io Writer StringWriter] [clojure.lang IDeref] com.google.common.html.HtmlEscapers)) (set! *warn-on-reflection* true) (defrecord Ele...
2cb7075a549a30f3c81941a7b5baffb65d93b66898a0c210722dcda222302c09
Olical/depot
zip.clj
(ns depot.zip "Extra zipper helpers." (:require [rewrite-clj.zip :as rzip] [clojure.zip :as zip])) (defn- zip-skip-ws "Skip whitespace, comments, and uneval nodes." [loc next-fn skip-fn end?-fn] (loop [loc loc] (cond (nil? loc) loc (end?-fn loc) loc (#{:comment :whitespace ...
null
https://raw.githubusercontent.com/Olical/depot/afc872578fcd7a58ff67fa2eb46714436dbec28c/src/depot/zip.clj
clojure
key found, just replace the value key not found, add it to the end of the map whitespace nodes preceding the last key in the map. This way we maintain the same use of commas, newlines, whitespace copy the whitespace nodes into the end of the map insert key and value
(ns depot.zip "Extra zipper helpers." (:require [rewrite-clj.zip :as rzip] [clojure.zip :as zip])) (defn- zip-skip-ws "Skip whitespace, comments, and uneval nodes." [loc next-fn skip-fn end?-fn] (loop [loc loc] (cond (nil? loc) loc (end?-fn loc) loc (#{:comment :whitespace ...
6632116597d66b4d3a888834bda52164e5af46b5c9ae17ce346840bbca23ddc1
htm-community/clortex
rdse.clj
(ns clortex.domain.encoders.rdse (:use midje.sweet) (:require [clortex.utils.math :refer :all] [clojure.set :refer [difference union]])) (defn bottom-sorter "sorts buckets by their bottom value" [x y] (let [c (compare (x :bottom) (y :bottom))] (if (zero? c) (compare x y) ...
null
https://raw.githubusercontent.com/htm-community/clortex/69003a352140510f47c6b8e18ad6a98a7b5a3bba/src/clortex/domain/encoders/rdse.clj
clojure
removed from find-bucket to make it pure (swap! buckets update-in [:bins (:index bucket) :read] inc) bitstring (sdr->bitstring sdr bits) (println (str "precalculating [" (- 0 (* step band)) "," (* step band) "]"))
(ns clortex.domain.encoders.rdse (:use midje.sweet) (:require [clortex.utils.math :refer :all] [clojure.set :refer [difference union]])) (defn bottom-sorter "sorts buckets by their bottom value" [x y] (let [c (compare (x :bottom) (y :bottom))] (if (zero? c) (compare x y) ...
ea5cb23dc018edc79f29c0acbba95d19f6f492f3018d709d43d004f6d963fb44
vascokk/rivus_cep
rivus_cep_event_gen.erl
-module(rivus_cep_event_gen). %% API -export([generate_event/3]). generate_event(Id, EventName, ParamCount) when is_integer(ParamCount) andalso ParamCount>0 -> generate(ParamCount, [list_to_atom(EventName ++ integer_to_list(Id))]). generate(0, Acc) -> list_to_tuple(Acc); generate(ParamCount, Acc) -> gen...
null
https://raw.githubusercontent.com/vascokk/rivus_cep/e9fe6ed79201d852065f7fb2a24a880414031d27/priv/rivus_cep_event_gen.erl
erlang
API
-module(rivus_cep_event_gen). -export([generate_event/3]). generate_event(Id, EventName, ParamCount) when is_integer(ParamCount) andalso ParamCount>0 -> generate(ParamCount, [list_to_atom(EventName ++ integer_to_list(Id))]). generate(0, Acc) -> list_to_tuple(Acc); generate(ParamCount, Acc) -> generate(P...
e59935d2c11c28697c31d02a778d005563864f0dfb63b11b41f3f7e3cedec108
arttuka/reagent-material-ui
blinds_two_tone.cljs
(ns reagent-mui.icons.blinds-two-tone "Imports @mui/icons-material/BlindsTwoTone as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def blinds-two-tone (create-svg...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/blinds_two_tone.cljs
clojure
(ns reagent-mui.icons.blinds-two-tone "Imports @mui/icons-material/BlindsTwoTone as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def blinds-two-tone (create-svg...
6dffa47c2fb745b5f814bda7f96b68bbbcee932b7efac2ba99c463a9e04d751f
dbuenzli/jsonc
jsonc.ml
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/dbuenzli/jsonc/b6adf836a2812f25d934e85ba3b6daa5fe77fd14/src-jsoo/jsonc.ml
ocaml
Value codecs Value location (unused in this backend) assumes no prototype tricks JSON values uids for object codecs. JSON codecs and value codec types [true] if location should be computed (unused). behaviour on dup members (unused). behaviour on unknown member. backend decoder. currently decoded o...
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
6eeee90b6af4e05eaa4f93fe35a87e3bc53063bfc24ac2b23e6ca267d4d50b73
elastic/apm-agent-ocaml
metrics.ml
module Metric_transaction = struct type t = { type_ : string; [@key "type"] name : string; } [@@deriving yojson_of] let make ~name ~type_ = { name; type_ } end module Metric_span = struct type t = { type_ : string; [@key "type"] subtype : string; } [@@deriving yojson_of] let make ~typ...
null
https://raw.githubusercontent.com/elastic/apm-agent-ocaml/6eb74081abedc949cfe0fa548ca4396e76540f63/core/metrics.ml
ocaml
module Metric_transaction = struct type t = { type_ : string; [@key "type"] name : string; } [@@deriving yojson_of] let make ~name ~type_ = { name; type_ } end module Metric_span = struct type t = { type_ : string; [@key "type"] subtype : string; } [@@deriving yojson_of] let make ~typ...
330afb42ac7efd40d9ebaf491cdea8972d7b3769a1fe471b5bd3cde754147c24
clash-lang/clash-compiler
NatExp.hs
Make sure Clash can evaluate exponentation on type - level ' 's -- see -lang/clash-compiler/issues/960 module NatExp where import Clash.Prelude triggered2 :: forall (n :: Nat) (d :: Nat) . ( KnownNat n,KnownNat d,1 <= n,1 <= d) => SNat n -> SNat d -> BitVector ((d*n)^2) triggered2 _ _ = pack (repeat False ...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Types/NatExp.hs
haskell
see -lang/clash-compiler/issues/960
Make sure Clash can evaluate exponentation on type - level ' 's module NatExp where import Clash.Prelude triggered2 :: forall (n :: Nat) (d :: Nat) . ( KnownNat n,KnownNat d,1 <= n,1 <= d) => SNat n -> SNat d -> BitVector ((d*n)^2) triggered2 _ _ = pack (repeat False :: Vec ((d*n)^2) Bool) triggered3 :: f...
11113333094ae80d063dce6baf2acacd73edca8e1831e941d40c288cc454ab1a
typedclojure/typedclojure
malli_cljs.cljs
Copyright ( c ) , contributors . ;; 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/typedclojure/typedclojure/7e2a8e1e60fd282601eaad72e528c1f7ee5e492d/typed/malli/src/typed/cljs/provider/malli_cljs.cljs
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 ) , contributors . (ns typed.cljs.provider.malli-cljs "Automatically convert malli annotations into types." (:require [typed.malli.schema-to-type :as s->t] [malli.core :as m])) (m/=> var-type-syntax [:=> [:cat :symbol] :any]) (defn var-type-syntax [var-qsym] (some-> (some #(...
2afc4533e987daeeb459e6d247610b5b51b3640d9658174d61e18984ba7d2014
Tclv/HaskellBook
ThrowDown.hs
import System.Random import Data.Monoid import Control.Monad.Trans.State import Control.Monad (replicateM) import Control.Applicative (liftA2, liftA3) data Die = DieOne | DieTwo | DieThree | DieFour | DieFive | DieSix deriving (Eq, Show) intToDie :: Int -> Die intToDie n = case n of 1 -> DieOn...
null
https://raw.githubusercontent.com/Tclv/HaskellBook/78eaa5c67579526b0f00f85a10be3156bc304c14/ch23/ThrowDown.hs
haskell
Repeats a single value What you actually want
import System.Random import Data.Monoid import Control.Monad.Trans.State import Control.Monad (replicateM) import Control.Applicative (liftA2, liftA3) data Die = DieOne | DieTwo | DieThree | DieFour | DieFive | DieSix deriving (Eq, Show) intToDie :: Int -> Die intToDie n = case n of 1 -> DieOn...
0b291ed8b1d1c19c00df0ddcbf7ab2a18948195d8135ea7e03e3033df2894d2a
cram2/cram
defmfun.lisp
Macro for defining GSL functions . 2008 - 04 - 16 20:49:50EDT defmfun.lisp Time - stamp : < 2016 - 06 - 14 23:39:02EDT defmfun.lisp > ;; Copyright 2008 , 2009 , 2010 , 2014 , 2016 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it an...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/init/defmfun.lisp
lisp
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publi...
Macro for defining GSL functions . 2008 - 04 - 16 20:49:50EDT defmfun.lisp Time - stamp : < 2016 - 06 - 14 23:39:02EDT defmfun.lisp > Copyright 2008 , 2009 , 2010 , 2014 , 2016 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as publishe...
1b576b31bdf27fb0da2a1e49bc19ed2dea4221bd0322394d8770867fa39b2fa7
bravit/hid-examples
Main.hs
# LANGUAGE TemplateHaskell # module Main where import Predicates data Shape = Circle Double | Square Double | Triangle Double Double Double $(mkPredicates ''Shape) main :: IO () main = mapM_ print [isCircle s1, isSquare s2, isTriangle s3] where s1 = Circle 4 s2 = Square 10 s3 = Triangle 1 1 ...
null
https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/ch12/th/predicates/Main.hs
haskell
# LANGUAGE TemplateHaskell # module Main where import Predicates data Shape = Circle Double | Square Double | Triangle Double Double Double $(mkPredicates ''Shape) main :: IO () main = mapM_ print [isCircle s1, isSquare s2, isTriangle s3] where s1 = Circle 4 s2 = Square 10 s3 = Triangle 1 1 ...
5f0e2f31ae0614871a38f7b3aed8283d4a8d9f405506019371dc40c9cd4f00d5
sibylfs/sibylfs_src
fs_ast.mli
(****************************************************************************) Copyright ( c ) 2013 , 2014 , 2015 , , , , ( as part of the SibylFS project ) (* *) (* Permission to use, copy, modify, and/or d...
null
https://raw.githubusercontent.com/sibylfs/sibylfs_src/30675bc3b91e73f7133d0c30f18857bb1f4df8fa/fs_test/lib/fs_ast.mli
ocaml
************************************************************************** Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright no...
Copyright ( c ) 2013 , 2014 , 2015 , , , , ( as part of the SibylFS project ) THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL PROFITS , WHETHER IN AN ACTION OF CONTRACT , NEGLIGENCE OR OTHER TORTIOUS ACTION , ARISING OUT OF OR IN CONNE...
ccc4c4c07d213b0ff526c8b88ed0a4ead65b74f84a6b2e72160485d93d459bed
chenyukang/eopl
10.scm
(load-relative "../libs/init.scm") (load-relative "./base/environments.scm") ;;;;;;;;;;;;;;;; grammatical specification ;;;;;;;;;;;;;;;; (define the-lexical-spec '((whitespace (whitespace) skip) (comment ("%" (arbno (not #\newline))) skip) (identifier (letter (arbno (or letter digit "_" "-" "?"))) ...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch3/10.scm
scheme
grammatical specification ;;;;;;;;;;;;;;;; sllgen boilerplate ;;;;;;;;;;;;;;;; an expressed value is either a number, a boolean or a procval. extractors: expval->num : ExpVal -> Int expval->bool : ExpVal -> Bool the interpreter ;;;;;;;;;;;;;;;; used as map for the list (run "foo") -> error
(load-relative "../libs/init.scm") (load-relative "./base/environments.scm") (define the-lexical-spec '((whitespace (whitespace) skip) (comment ("%" (arbno (not #\newline))) skip) (identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol) (number (digit (arbno digit)) number) (numbe...
2186f17ed5f8056c941c4e6037b3dc4e123cbd97d890470147a0efd33ad3f6c5
NorfairKing/intray
Client.hs
# LANGUAGE DataKinds # module Intray.Client ( module Intray.Client, module Intray.API, module Servant.API, module Servant.Client, module Servant.Auth.Client, module Data.Mergeless, module Data.UUID.Typed, ) where import Data.Aeson as JSON import Data.Mergeless import qualified Data.UUID.Ty...
null
https://raw.githubusercontent.com/NorfairKing/intray/3335692a5445e86bf308420d4ab025d6ab11b10d/intray-client/src/Intray/Client.hs
haskell
# LANGUAGE DataKinds # module Intray.Client ( module Intray.Client, module Intray.API, module Servant.API, module Servant.Client, module Servant.Auth.Client, module Data.Mergeless, module Data.UUID.Typed, ) where import Data.Aeson as JSON import Data.Mergeless import qualified Data.UUID.Ty...
fc1dca3834f41ed6112a830b8aae01eec7b4f4b4ff12681d91e524f4c8fa2672
Apress/beg-haskell
Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad.IO.Class import Database . Persist -- only Persistent import Database.Esqueleto -- Persistent + Esqueleto import Database.Persist.Sqlite import Data.Time.Clock import Chapter11.Database import Chapter11.Gender import Chapter11.Query mai...
null
https://raw.githubusercontent.com/Apress/beg-haskell/aaacbf047d553e6177c38807e662cc465409dffd/chapter11/src/Main.hs
haskell
# LANGUAGE OverloadedStrings # only Persistent Persistent + Esqueleto Create table structure Insert initial data Run a query
module Main where import Control.Monad.IO.Class import Database.Persist.Sqlite import Data.Time.Clock import Chapter11.Database import Chapter11.Gender import Chapter11.Query main :: IO () main = do runSqlite "example.db" $ do runMigration migrateAll insertInitialData c1 <- getCl...
192481a79f6c1ab308b4bfbabfa3291fc429ef77a62d2df00e8b4ddbadf5d845
maxlapshin/parsexml
parsexml_xpath.erl
-module(parsexml_xpath). -export([parse/1, find/2]). parse(XML) -> unpack_ns(parsexml:parse(XML)). unpack_ns({Tag, Headers, Children}) -> {NS,CleanTag} = case binary:split(Tag, <<":">>) of [T1,T2] -> {T1,T2}; [T1] -> {undefined,T1} end, {{NS,CleanTag}, [unpack_header(H) || H <- Headers], [unpack_ns(Ch) || Ch...
null
https://raw.githubusercontent.com/maxlapshin/parsexml/6910cae5bd25fe00edf7dec4ee44e1e2bc08b505/src/parsexml_xpath.erl
erlang
lookup_path(XML, []) -> XML; lookup_path({_, _, _}, [_|_]) -> undefined; lookup_path(List, [Tag|_] = Segments) -> {Tag, _, [Body]} when length(Segments) == 1 -> Body; {Tag, _, _} = XML -> lookup_path(XML, Segments); false -> case re:run(Tag, "(.*)\\[(\\d+)\\]", [{capture,all_but_first,binary}]) of ...
-module(parsexml_xpath). -export([parse/1, find/2]). parse(XML) -> unpack_ns(parsexml:parse(XML)). unpack_ns({Tag, Headers, Children}) -> {NS,CleanTag} = case binary:split(Tag, <<":">>) of [T1,T2] -> {T1,T2}; [T1] -> {undefined,T1} end, {{NS,CleanTag}, [unpack_header(H) || H <- Headers], [unpack_ns(Ch) || Ch...
b0d4e28ee19a21daf6d9d0132b142577a71d76f2d4a6e1793365d003fb9bbf92
korya/efuns
lexgen.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/inliner/perf/Lex/lexgen.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . $ I d : lexgen.ml , v 1.1 1999/11/22 10:36:00 lefessan Exp $ open Syntax type regexp = Empty | Chars...
b5b714c73cbedd1b6eaed9572512d162164266f6b001f4831ed530384b33f336
tomjridge/kv-hash
test12.ml
(** Test config file format *) open Kv_hash let _ = Printf.printf "%s: testing write/read of config\n%!" __MODULE__; Private.Config.test ~fn:"KVHASH_CONFIG_TEST"; ()
null
https://raw.githubusercontent.com/tomjridge/kv-hash/e3208df60bce95724086e8a465b0485dea3c4e7e/test/test12.ml
ocaml
* Test config file format
open Kv_hash let _ = Printf.printf "%s: testing write/read of config\n%!" __MODULE__; Private.Config.test ~fn:"KVHASH_CONFIG_TEST"; ()
f0f2fd7a21730a5b445f09ba00e76f7d8e81a5d1c78dc6178dd46ee89b2bea41
ghc/testsuite
T3772_A.hs
module T3772_A where class DeepSeq a => C a where -- class C a where gen :: Int -> a instance C Double where gen = fromIntegral instance C a => C [a] where # INLINE gen # gen n = replicate n (gen n) class DeepSeq a where deepSeq :: a -> b -> b instance DeepSeq Double where deepSeq = seq instance DeepS...
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/simplCore/should_compile/T3772_A.hs
haskell
class C a where User INLINE ( 3 args ) ! DFun ( with auto INLINE pragma ) We do n't want to eta - expand this , lest $ cdeepSeq gets inlined in it ! DFun User INLINE( 3 args )! DFun (with auto INLINE pragma) We don't want to eta-expand this, lest $cdeepSeq gets inlined in it! DFun
module T3772_A where class DeepSeq a => C a where gen :: Int -> a instance C Double where gen = fromIntegral instance C a => C [a] where # INLINE gen # gen n = replicate n (gen n) class DeepSeq a where deepSeq :: a -> b -> b instance DeepSeq Double where deepSeq = seq instance DeepSeq a => DeepSeq [a]...
d05876c8f7489536dede2b252e8a25f75b8d3ccc5725d885dbb0fe2bd10bfe24
erlcloud/eini
eini_app.erl
-module(eini_app). -behaviour(application). %% Application callbacks -export([start/2, stop/1]). %% =================================================================== %% Application callbacks %% =================================================================== start(_StartType, _StartArgs) -> eini_sup:start_li...
null
https://raw.githubusercontent.com/erlcloud/eini/6fcbb5d10b661eb0f92c8fff0ec87db2fd761917/src/eini_app.erl
erlang
Application callbacks =================================================================== Application callbacks ===================================================================
-module(eini_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> eini_sup:start_link(). stop(_State) -> ok.
ff6843cd5cfe7e400660975218aa12a5bd1b4a0cd1a7e206e1d233c4eaba065e
pmundkur/flowcaml
option.mli
(**************************************************************************) (* *) (* *) , Projet C...
null
https://raw.githubusercontent.com/pmundkur/flowcaml/ddfa8a37e1cb60f42650bed8030036ac313e048a/src-flowcaml/utils/option.mli
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 : option.mli , v 1.2 2003/06/26 1...