_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 |
|---|---|---|---|---|---|---|---|---|
b01aea36f3ddd5e9a58a659843d5b164aea55ce6689ba22f81c81ff40eca502c | byorgey/haxr | test_client.hs | -- A simple client that calls the methods in test_server.hs
import System.Environment (getArgs)
import System.Exit (exitFailure)
import System.IO (hPutStrLn, stderr)
import System.Time
import Network.XmlRpc.Client
time :: String -> IO CalendarTime
time url = remote url "examples.time"
add :: String -> Int -> Int ->... | null | https://raw.githubusercontent.com/byorgey/haxr/0a643b9b8ce1265736b1bc454d7df47c57bd9f50/examples/test_client.hs | haskell | A simple client that calls the methods in test_server.hs |
import System.Environment (getArgs)
import System.Exit (exitFailure)
import System.IO (hPutStrLn, stderr)
import System.Time
import Network.XmlRpc.Client
time :: String -> IO CalendarTime
time url = remote url "examples.time"
add :: String -> Int -> Int -> IO Int
add url = remote url "examples.add"
fault :: String... |
7a98ee1e7aeadb34f5ab7b845fdfb25b1c328f6a550f4f1ab93ea31bf869b0ed | haskell-jp/makeMistakesToLearnHaskell | no-slash.hs | main = print (60 1.7 * 1.7)
| null | https://raw.githubusercontent.com/haskell-jp/makeMistakesToLearnHaskell/1174d5c6bb82e57622be8033607a4d049e30ae7e/test/assets/2/no-slash.hs | haskell | main = print (60 1.7 * 1.7)
| |
8c5352c857a3513f8bef1162bfc6f549a498071b88eeef5349cfc9f9ee374aec | paurkedal/ocaml-caqti | unikernel.ml | Copyright ( C ) 2022 < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any later version , with the ... | null | https://raw.githubusercontent.com/paurkedal/ocaml-caqti/601723929a52326ed98e01c63dafd2db20ea5f52/caqti-mirage/unikernel/unikernel.ml | ocaml | Copyright ( C ) 2022 < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any later version , with the ... | |
d1aa1c838941f07ca95a77cff10725fa293c16373619b05c66d02e8b7829956e | ejgallego/dualquery | nfp.ml | Copyright ( c ) 2014 , The Trustees of the University of Pennsylvania
All rights reserved .
LICENSE : 3 - clause BSD style .
See the LICENSE file for details on licensing .
All rights reserved.
LICENSE: 3-clause BSD style.
See the LICENSE file for details on licensing.
*)
Convert NetFli... | null | https://raw.githubusercontent.com/ejgallego/dualquery/f8355212a760ef77ad3fb07f3bb595e775bf06d2/netflix-parser/nfp.ml | ocaml | Reads an entry, returns the customer id
eprintf "Line: %s%!" line;
eprintf "Entry: %s%!" line;
Read a movie file
Dependent on my copy
Ignore . and .. | Copyright ( c ) 2014 , The Trustees of the University of Pennsylvania
All rights reserved .
LICENSE : 3 - clause BSD style .
See the LICENSE file for details on licensing .
All rights reserved.
LICENSE: 3-clause BSD style.
See the LICENSE file for details on licensing.
*)
Convert NetFli... |
2232fcf3ee80c55e2ac614d8aa13006b3edb005204bc7c5fb45d6aa3e382d1d7 | huangjs/cl | cartan_new.lisp | ;;this program is derived from maxima/share/calculus/cartan.lisp
I add clifford operator & , & 2
I add clifford differential operator d_c
(defprop $\| %\| verb)
(defprop $\| "|" op)
(putopr "|" '$\|)
(add2lnc (quote "|") $props)
(defprop $\| dimension-infix dimension)
(defprop $\| (32 124 32) dissym)
(defprop ... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/diff_form/cartan_new.lisp | lisp | this program is derived from maxima/share/calculus/cartan.lisp
exterior operator @
(($& simp) $ext105
another clifford operator with different basis.
before using &2 operator you must "infix("&2")$ " | I add clifford operator & , & 2
I add clifford differential operator d_c
(defprop $\| %\| verb)
(defprop $\| "|" op)
(putopr "|" '$\|)
(add2lnc (quote "|") $props)
(defprop $\| dimension-infix dimension)
(defprop $\| (32 124 32) dissym)
(defprop $\| 120 lbp)
(defprop $\| 180 rbp)
(defprop $\| parse-infix led... |
5e591685458a595d21c724499514f8b44274830577a8dc2f94f6db9d93c431d5 | matijapretnar/eff | translateExEff2NoEff.ml | open Utils
open SyntaxNoEff
open Language.Term
open Language
open Type
module NoEff = SyntaxNoEff
module ExEffTypes = Type
module ExEff = Term
module Sub = Language.Substitution
type optimization_config = { purity_aware_translation : bool }
type state = { config : optimization_config }
let initial_state optimization... | null | https://raw.githubusercontent.com/matijapretnar/eff/1be07f0c7fbaadf5c28437bf11fe818aa76640e7/src/05-backends/plain-ocaml/translateExEff2NoEff.ml | ocaml | Handler type - Case 2: non-empty input dirt
Handler coercion - Case 1
Handler coercion - Case 2
Handler coercion - Case 3
Handler coercion - Case 4
Handler - Case 1
Handler - Case 2
Handler - Case 3
Handle - Case 1
Handle - Case 2
Handle - Case 3
Bind - Case 1
Bind - Case 2 | open Utils
open SyntaxNoEff
open Language.Term
open Language
open Type
module NoEff = SyntaxNoEff
module ExEffTypes = Type
module ExEff = Term
module Sub = Language.Substitution
type optimization_config = { purity_aware_translation : bool }
type state = { config : optimization_config }
let initial_state optimization... |
4c7c3ee14db318be639ced0699a17defd78303609eaba922fe0d53bf9bb80ec6 | ocaml-community/yojson | safe.mli | val to_basic : t -> Basic.t
*
Tuples are converted to JSON arrays ,
Variants are converted to JSON strings or arrays of a string ( constructor )
and a json value ( argument ) .
Long integers are converted to JSON strings .
Examples :
{ v
` Tuple [ ` Int 1 ; ` Float 2.3 ] - > ... | null | https://raw.githubusercontent.com/ocaml-community/yojson/a3fbc94d1d57bcacb00d3b1b9ec4aa602326a4d0/lib/safe.mli | ocaml | val to_basic : t -> Basic.t
*
Tuples are converted to JSON arrays ,
Variants are converted to JSON strings or arrays of a string ( constructor )
and a json value ( argument ) .
Long integers are converted to JSON strings .
Examples :
{ v
` Tuple [ ` Int 1 ; ` Float 2.3 ] - > ... | |
f43b50a538d6311d8695fd3cdbb908832227850947ce94ba7c76d84918d0aa30 | dariusf/ppx_polyprint | PPUtil.ml |
open Ast_mapper
open Asttypes
open Longident
module Names = struct
open Printf
open Str
let runtime = "PolyPrint"
let printers = "Printers"
let default_annotation = "polyprint"
let default_module = "DefaultTraceConfig"
let default_module_sig = "TraceConfig"
let to_string = ["to_string"; "string... | null | https://raw.githubusercontent.com/dariusf/ppx_polyprint/6cd87e948a27888d251f851424ad8bd5545989ad/src/PPUtil.ml | ocaml | * Recurses down a curried lambda to get the body
Returns a lambda with n wildcard parameters, e.g. fun _ _ -> body
let failure loc =
raise
(Location.Error
"{stamp=" ^ string_of_int stamp ^ " name=" ^ name ^ " flags=" ^ string_of_int flags ^ "}"
Printtyp.string_of_path |
open Ast_mapper
open Asttypes
open Longident
module Names = struct
open Printf
open Str
let runtime = "PolyPrint"
let printers = "Printers"
let default_annotation = "polyprint"
let default_module = "DefaultTraceConfig"
let default_module_sig = "TraceConfig"
let to_string = ["to_string"; "string... |
ed4c010f39764a611b2a7ad1d58fe7b1c9c3209f3e173af79e26488bbadda15e | mfoemmel/erlang-otp | OrberApp_IFR_impl.erl | %%--------------------------------------------------------------------
%%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1999 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/orber/src/OrberApp_IFR_impl.erl | erlang | --------------------------------------------------------------------
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. S... | Copyright Ericsson AB 1999 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module('OrberApp_IFR_impl').
-include_li... |
6be8e64924af78257a7baf6e9c2bdf883ea2181f3e54da7176d37493c36610d1 | shayne-fletcher/zen | monty.ml | module Monty = struct
[ dtr w p n ] where [ n ] is the number of doors , selects which " door
to remain " ( closed ) given the winning door [ w ] and the player
chosen door [ p ]
to remain" (closed) given the winning door [w] and the player
chosen door [p]*)
let rec dtr w p n =
if p <> w then... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/monty/monty.ml | ocaml | The player hasn't chosen the winning door, so leave that closed
The player chose the winning door, so pick any other door to keep
closed
[gen_game d] generates a game with [d] doors and returns a game
with a winning door, a player selected door and a door to keep
closed before if the player wants to swi... | module Monty = struct
[ dtr w p n ] where [ n ] is the number of doors , selects which " door
to remain " ( closed ) given the winning door [ w ] and the player
chosen door [ p ]
to remain" (closed) given the winning door [w] and the player
chosen door [p]*)
let rec dtr w p n =
if p <> w then... |
34b9520a4fabb3dd7c909db0a6fc2d8535f6cbe32bd7ad602af9f717d7180b2d | pixlsus/registry.gimp.org_static | leon-morph-edges.scm | (define (leon-morph-edges img drw cnt)
(let* (
(i 0)
(nl 0)
)
(gimp-context-push)
(gimp-image-undo-group-start img)
(set! nl (car (gimp-layer-copy (car (gimp-image-get-active-layer img)) FALSE)))
(gimp-image-add-layer img nl -1)
(gimp-displays-flush)
(w... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/leon-morph-edges.scm | scheme | (define (leon-morph-edges img drw cnt)
(let* (
(i 0)
(nl 0)
)
(gimp-context-push)
(gimp-image-undo-group-start img)
(set! nl (car (gimp-layer-copy (car (gimp-image-get-active-layer img)) FALSE)))
(gimp-image-add-layer img nl -1)
(gimp-displays-flush)
(w... | |
f5cd6d4e2889c2b5ed40554741b33d9a2323d30c7efded5cd72697fe839274c7 | Rotaerk/vulkanTest | Local.hs | module Data.Acquire.Local (
module Data.Acquire,
allocateAcquire_,
with_
) where
import Control.Monad.Trans.Resource
import Data.Acquire
allocateAcquire_ :: MonadResource m => Acquire a -> m a
allocateAcquire_ = fmap snd . allocateAcquire
with_ :: MonadUnliftIO m => Acquire a -> m b -> m b
with_ a m = with a $... | null | https://raw.githubusercontent.com/Rotaerk/vulkanTest/7163768a8a833d55e0e44de697569089033f25d9/sandbox/sandbox/src/Data/Acquire/Local.hs | haskell | module Data.Acquire.Local (
module Data.Acquire,
allocateAcquire_,
with_
) where
import Control.Monad.Trans.Resource
import Data.Acquire
allocateAcquire_ :: MonadResource m => Acquire a -> m a
allocateAcquire_ = fmap snd . allocateAcquire
with_ :: MonadUnliftIO m => Acquire a -> m b -> m b
with_ a m = with a $... | |
882f09f20c736b00c1757a4550a47e33b167acc72d59b8cf1da5f85899d7e67e | dgiot/dgiot | emqx_zone.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2018 - 2022 EMQ Technologies Co. , Ltd. 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 o... | null | https://raw.githubusercontent.com/dgiot/dgiot/c601555e45f38d02aafc308b18a9e28c543b6f2c/src/emqx_zone.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 ... | Copyright ( c ) 2018 - 2022 EMQ Technologies Co. , Ltd. 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(emqx_zone).
-behaviour(gen_server).
-include("emqx.hrl").
-include("emqx_mqtt.hrl").
-... |
e1dfa86e565bd4880f073ba9c1996c3c1176c1aeb80d88492250ac160120eccb | google/ormolu | newline-single-line-body.hs | function :: Int -> Int
function a =
aReallyLongFunctionNameThatShouldStayOnThisLineToAvoidOverflowing 10000 a
function' :: String -> String
function' s = case s of
"ThisString" -> -- And a comment here is okay
"Yay"
_ -> "Boo"
| null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/value/function/newline-single-line-body.hs | haskell | And a comment here is okay | function :: Int -> Int
function a =
aReallyLongFunctionNameThatShouldStayOnThisLineToAvoidOverflowing 10000 a
function' :: String -> String
function' s = case s of
"Yay"
_ -> "Boo"
|
dda1b85705852cd1984624b2e739a53a56904741c2b4092f6b023d94e5167b8f | hyperfiddle/electric | popover_pure.cljc | (ns peter.y2022.popover-pure
(:require #?(:clj [datascript.core :as d])
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.ui.codemirror :refer [read-edn write-edn]]))
;; (dom/div) returns a pure value (doesn't mount to dom)
( dom / div ! ) is just ( dom / ... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/peter/y2022/popover_pure.cljc | clojure | (dom/div) returns a pure value (doesn't mount to dom)
When we return a pure value we can do fun stuff with it!
`dom/on` makes this a bit more convenient:
(dom/on btn :click "hi")
This desugars to
(binding [dom/event (new (:click btn))] "hi")
This decoupling allows for more pure code.
A few more wishful... | (ns peter.y2022.popover-pure
(:require #?(:clj [datascript.core :as d])
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.ui.codemirror :refer [read-edn write-edn]]))
( dom / div ! ) is just ( dom / mount ! ( dom / div ) )
( let [ btn ( dom / button ) ... |
601d473ab151d8c9487875c8f546835bfb73d068c203d6582d5f43a90f2caf8e | dparis/gen-phzr | input_enabled.cljs | (ns phzr.component.input-enabled
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->InputEnabled
"The InputEnabled component allows a Game Object to have its own InputHandler and process input related events."
([]
(js/P... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/component/input_enabled.cljs | clojure | (ns phzr.component.input-enabled
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->InputEnabled
"The InputEnabled component allows a Game Object to have its own InputHandler and process input related events."
([]
(js/P... | |
afa801bae7bb8de0fde02841c4d21097910e9a84fbb1328e2db843ec37743253 | GlideAngle/flare-timing | Pilots.hs | module Flight.Gap.Pilots
( PilotId(..)
, PilotName(..)
, Pilot(..)
, PilotsAtEss(..)
, PilotsPresent(..)
, PilotsFlying(..)
, PilotsLanded(..)
, PilotsLaunched(..)
) where
import Control.DeepSeq
import Data.Aeson (ToJSON(..), FromJSON(..))
import GHC.Generics (Generic)
instance Sho... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/gap-allot/library/Flight/Gap/Pilots.hs | haskell | | Order by name then by id.
| The number of pilots completing the speed section of the task.
| The number of pilots present for a task.
@ newtype PilotsPresent = PilotsPresent {x :: Integer} @
| The number of pilots flying a task.
@ newtype PilotsFlying = PilotsFlying {x :: Integer} @
| The number of pilots having... | module Flight.Gap.Pilots
( PilotId(..)
, PilotName(..)
, Pilot(..)
, PilotsAtEss(..)
, PilotsPresent(..)
, PilotsFlying(..)
, PilotsLanded(..)
, PilotsLaunched(..)
) where
import Control.DeepSeq
import Data.Aeson (ToJSON(..), FromJSON(..))
import GHC.Generics (Generic)
instance Sho... |
d9683a8230b4404d45fef273b3d293b1c385c6b5d0dcd6ccfc7fb7eb6fd04ca6 | florence/cover | contracts.rkt | #lang racket/base
(provide coverage/c coverage-gen/c)
(require racket/contract)
;; if its a file path, will be an absolute path
(define coverage/c (-> any/c exact-positive-integer?
(or/c 'covered 'uncovered 'irrelevant)))
(define coverage-gen/c (->* (coverage/c (listof path-string?)) (path-strin... | null | https://raw.githubusercontent.com/florence/cover/bc17e4e22d47b1da91ddaa5eafefe28f4675e85c/cover-lib/cover/private/contracts.rkt | racket | if its a file path, will be an absolute path | #lang racket/base
(provide coverage/c coverage-gen/c)
(require racket/contract)
(define coverage/c (-> any/c exact-positive-integer?
(or/c 'covered 'uncovered 'irrelevant)))
(define coverage-gen/c (->* (coverage/c (listof path-string?)) (path-string?) any))
|
4b5a06cd7ac27805cb64706d2028a1b8e4deca6724505123cdc359cede57c0f9 | google/haskell-trainings | ColorMap.hs | Copyright 2021 Google LLC
--
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, software
distributed und... | null | https://raw.githubusercontent.com/google/haskell-trainings/214013fc324fd6c8f63b874a58ead0c1d3e6788c/haskell_102/codelab/01_mastermind/src/ColorMap.hs | haskell |
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 governing perm... | Copyright 2021 Google LLC
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTI... |
cf692acd412de769d848679ed30e357f09cd849bf6d489a99c061398f754635d | nuprl/gradual-typing-performance | games-cards-adapted.rkt | #lang typed/racket/base
(provide
Card<%>
Card*
Card
Deck
Region
RegionCallback
Table
Table<%>
;; --
make-deck
make-region
make-table
set-region-callback!
region-callback
region-h
region-label
region-w
region-x
region-y
shuffle-list
)
(require
typed/racket/class
)
(define-ty... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/gofish/base/games-cards-adapted.rkt | racket | --
Because 'region' is not really a struct ...
It's a 'make-struct-type' wrapped in a macro | #lang typed/racket/base
(provide
Card<%>
Card*
Card
Deck
Region
RegionCallback
Table
Table<%>
make-deck
make-region
make-table
set-region-callback!
region-callback
region-h
region-label
region-w
region-x
region-y
shuffle-list
)
(require
typed/racket/class
)
(define-type Card<... |
3f6adf2dae4a757e5418dbfd53cd7e11926536ea08af83ec611b47ddb2ef3a75 | zcaudate/hara | environment_test.clj | (ns hara.core.environment-test
(:use hara.test)
(:require [hara.core.environment :as env]
[clojure.java.io :as io]))
^{:refer hara.core.environment/properties :added "3.0"}
(fact "returns jvm properties in a nested map for easy access"
(->> (env/properties)
:os)
=> (contains {:arch anything
... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/core/environment_test.clj | clojure | (ns hara.core.environment-test
(:use hara.test)
(:require [hara.core.environment :as env]
[clojure.java.io :as io]))
^{:refer hara.core.environment/properties :added "3.0"}
(fact "returns jvm properties in a nested map for easy access"
(->> (env/properties)
:os)
=> (contains {:arch anything
... | |
0ae96509b70a2ab6c24faa1cbef3bb15c191f2fc6e53fabd35816de6cb21dad9 | hammerlab/ketrew | unix_process.ml | (**************************************************************************)
Copyright 2014 , 2015 :
< > ,
< > ,
Arun < > ,
< > ... | null | https://raw.githubusercontent.com/hammerlab/ketrew/8940d48fbe174709f076b7130974ecd0ed831d58/src/lib/unix_process.ml | ocaml | ************************************************************************
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | Copyright 2014 , 2015 :
< > ,
< > ,
Arun < > ,
< >
Licensed under the Apache License , Version 2.0 ( the " Licen... |
150b507d216b4d5a7c83b6b41faac75c758e262bd8077a41afe42c1dbd012a37 | alanz/ghc-exactprint | Cg008.hs | # LANGUAGE MagicHash , BangPatterns #
{-# OPTIONS_GHC -O0 #-}
-- Variant of cgrun066; compilation as a module is different.
module Cg008 (hashStr) where
import Foreign.C
import Data.Word
import Foreign.Ptr
import GHC.Exts
import Control.Exception
hashStr :: Ptr Word8 -> Int -> Int
hashStr (Ptr a#) (I# len#) = loo... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/Cg008.hs | haskell | # OPTIONS_GHC -O0 #
Variant of cgrun066; compilation as a module is different. | # LANGUAGE MagicHash , BangPatterns #
module Cg008 (hashStr) where
import Foreign.C
import Data.Word
import Foreign.Ptr
import GHC.Exts
import Control.Exception
hashStr :: Ptr Word8 -> Int -> Int
hashStr (Ptr a#) (I# len#) = loop 0# 0#
where
loop h n | isTrue# (n GHC.Exts.==# len#) = I# h
| ot... |
09221c2768508f73baae235e720639cc2ac36545abba2020f806607fecbe6af7 | tsloughter/kuberl | kuberl_v1beta1_json_schema_props.erl | -module(kuberl_v1beta1_json_schema_props).
-export([encode/1]).
-export_type([kuberl_v1beta1_json_schema_props/0]).
-type kuberl_v1beta1_json_schema_props() ::
#{ 'ref' => binary(),
'schema' => binary(),
'additionalItems' => maps:map(),
'additionalProperties' => maps:map(),
'allOf' =>... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_json_schema_props.erl | erlang | -module(kuberl_v1beta1_json_schema_props).
-export([encode/1]).
-export_type([kuberl_v1beta1_json_schema_props/0]).
-type kuberl_v1beta1_json_schema_props() ::
#{ 'ref' => binary(),
'schema' => binary(),
'additionalItems' => maps:map(),
'additionalProperties' => maps:map(),
'allOf' =>... | |
4bb502faf5ca5c807a01ddb7560d06ce3c7e42b810f93ec96615b8eeaf449e33 | sunshineclt/Racket-Helper | homework1-e迭代.rkt | #lang racket
(define (isEven? n)
(if (= (remainder n 2) 0)
#t
#f))
(define (square x) (* x x))
(define (qpower a n now result)
(if (= n 0)
(begin (display result) (display #\newline))
(begin
(if (isEven? n)
(qpower a (quotient n 2) (square now) result)
(qpo... | null | https://raw.githubusercontent.com/sunshineclt/Racket-Helper/bf85f38dd8d084db68265bb98d8c38bada6494ec/%E9%99%88%E4%B9%90%E5%A4%A9/Week1/homework1-e%E8%BF%AD%E4%BB%A3.rkt | racket | #lang racket
(define (isEven? n)
(if (= (remainder n 2) 0)
#t
#f))
(define (square x) (* x x))
(define (qpower a n now result)
(if (= n 0)
(begin (display result) (display #\newline))
(begin
(if (isEven? n)
(qpower a (quotient n 2) (square now) result)
(qpo... | |
f4aefc354c784ab84f3906efc65c8476eeee9da36354bde677b3bd928fd1c4a6 | lambdaisland/npmdemo | core.cljs | (ns npmdemo.core
(:require [express]))
(enable-console-print!)
(set! *warn-on-infer* true)
(defonce server (atom nil))
(defn start-server []
(println "Starting server")
(let [app (express)]
(.get app "/" (fn [req res] (.send res "Hello, world!")))
(.listen app 3000 (fn [] (println "Example app listeni... | null | https://raw.githubusercontent.com/lambdaisland/npmdemo/d8bb320bc80be8a7f66f39843634d35b15d434d7/boot/src/npmdemo/core.cljs | clojure | (ns npmdemo.core
(:require [express]))
(enable-console-print!)
(set! *warn-on-infer* true)
(defonce server (atom nil))
(defn start-server []
(println "Starting server")
(let [app (express)]
(.get app "/" (fn [req res] (.send res "Hello, world!")))
(.listen app 3000 (fn [] (println "Example app listeni... | |
d7c4e2cbb3e03b94b8af088977b4e33c13003d81ed72d2c0e4f72c4b4734808f | ghc/packages-Cabal | Hello.hs | module Main where
import A
main :: IO ()
main = putStrLn a
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/CustomPreProcess/Hello.hs | haskell | module Main where
import A
main :: IO ()
main = putStrLn a
| |
e9a97f7d6e634add4c9d0fa99de8325a9451d0f717637b836a62f64e5517e62e | wireapp/wire-server | TeamUserSearch.hs | {-# LANGUAGE StrictData #-}
# OPTIONS_GHC -Wno - orphans #
-- Disabling to stop warnings on HasCallStack
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and... | null | https://raw.githubusercontent.com/wireapp/wire-server/72a03a776d4a8607b0a9c3e622003467be914894/services/brig/src/Brig/User/Search/TeamUserSearch.hs | haskell | # LANGUAGE StrictData #
Disabling to stop warnings on HasCallStack
# OPTIONS_GHC -Wno-redundant-constraints #
This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be ... | # OPTIONS_GHC -Wno - orphans #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
... |
daa6176757e7e07b93a03c927943e3ef4ab76dda2b4e29e374d0a05204fc3951 | haskell-repa/repa | Operator.hs |
module Data.Repa.Query.Source.Primitive.Operator
( map, map2, map3, map4, map5, map6, map7
, zip, zip2, zip3, zip4, zip5, zip6, zip7
, fold, folds
, filter
, groups, groupsBy)
where
import Control.Monad.State.Strict
import Data.Repa.Query.Source.Primitive.Projection
import Data.... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-query/Data/Repa/Query/Source/Primitive/Operator.hs | haskell | --------------------------------------------------------------------------------------------- Map
| Apply a scalar function to every element of a flow.
| Apply a scalar function to every element of a flow.
| Apply a scalar function to every element of a flow.
| Apply a scalar function to every element of a flow.
|... |
module Data.Repa.Query.Source.Primitive.Operator
( map, map2, map3, map4, map5, map6, map7
, zip, zip2, zip3, zip4, zip5, zip6, zip7
, fold, folds
, filter
, groups, groupsBy)
where
import Control.Monad.State.Strict
import Data.Repa.Query.Source.Primitive.Projection
import Data.... |
bd065bbf975d725dd1f28db2b57a8c8116b746d74616847850d5be5b4a104e2d | alephcloud/hs-yet-another-logger | Internal.hs | -- |
-- Module: System.Logger.Internal
-- Copyright:
Copyright ( c ) 2016 - 2020 < >
Copyright ( c ) 2014 - 2015 PivotCloud , Inc.
-- License: Apache License, Version 2.0
Maintainer : < >
-- Stability: experimental
--
# LANGUAGE CPP #
# LANGUAGE UnicodeSyntax #
module System.Logger.Internal
( ssho... | null | https://raw.githubusercontent.com/alephcloud/hs-yet-another-logger/bdeb95980b69839b1acf1a8cef53426bbd073531/src/System/Logger/Internal.hs | haskell | |
Module: System.Logger.Internal
Copyright:
License: Apache License, Version 2.0
Stability: experimental
microseconds precision.
milliseconds precision.
the given sub-second precision.
| Convert a 'TimeSpec' value into 'UTCTime'
| Copyright ( c ) 2016 - 2020 < >
Copyright ( c ) 2014 - 2015 PivotCloud , Inc.
Maintainer : < >
# LANGUAGE CPP #
# LANGUAGE UnicodeSyntax #
module System.Logger.Internal
( sshow
, formatIso8601
, formatIso8601Milli
, formatIso8601Micro
, timeSpecToUtc
) where
import Data.Monoid.Unicode
import Data... |
d6ee09a1a7340d606c19a34a05d82599c579c8ef74c349631aa4876b272042a8 | tlaplus/tlapm | mlproof.mli | Copyright 2003 INRIA
open Expr;;
type rule =
| Close of expr (* p, -p / (.) [p]*)
| Close_refl of string * expr (* -r(a,a) / (.) [r a]*)
| Close_sym of string * expr * expr
r(a , b ) , , a ) / ( . ) [ r a b ]
| False (* fals... | null | https://raw.githubusercontent.com/tlaplus/tlapm/b82e2fd049c5bc1b14508ae16890666c6928975f/zenon/mlproof.mli | ocaml | p, -p / (.) [p]
-r(a,a) / (.) [r a]
false / (.) []
-true / (.) []
--p / p [p]
-(p\/q) / -p, -q [p q]
-(p=>q) / p, -q [p q]
-A.p / -p(t(-p)) [-A.p]
-A.p / -p(t(-p)) [-A.p]
E.p... | Copyright 2003 INRIA
open Expr;;
type rule =
| Close_sym of string * expr * expr
r(a , b ) , , a ) / ( . ) [ r a b ]
p/\q / p , q [ p q ]
p<=>q / -p , -q | p , q [ p q ]
-(p<=>q ) / -p , q | p , -q [ p q ]
| P_NotP of expr * expr
| P_NotP_sym of strin... |
5307f93bc99d3cb28243dd6f9245dea63328079a4ec5ea34d6915d62d621ef98 | racket/eopl | lang.rkt | #lang eopl
;; language for EXPLICIT-REFS
(provide (all-defined-out))
;;;;;;;;;;;;;;;; grammatical specification ;;;;;;;;;;;;;;;;
(define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not #\newline))) skip)
(identifier
(letter (arbno (or letter digit "_" "-" "?")))
symbo... | null | https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter4/explicit-refs/lang.rkt | racket | language for EXPLICIT-REFS
grammatical specification ;;;;;;;;;;;;;;;;
new for explicit-refs
sllgen boilerplate ;;;;;;;;;;;;;;;; | #lang eopl
(provide (all-defined-out))
(define the-lexical-spec
'((whitespace (whitespace) skip)
(comment ("%" (arbno (not #\newline))) skip)
(identifier
(letter (arbno (or letter digit "_" "-" "?")))
symbol)
(number (digit (arbno digit)) number)
(number ("-" digit (arbno digit)) number)... |
d861db9139173395fe792a1df5615eca51c26b6d01a3caeb4e6a76ac20457175 | weavejester/clj-daemon | server.clj | (ns clj-daemon.server
(:use [net.tcp.server :only (tcp-server wrap-io)]
[clj-daemon.classloader :only (url-classloader eval-string)])
(:require [clj-json.core :as json]))
(defn wrap-json [handler & [keywords?]]
(wrap-io
(fn [reader writer]
(let [input (ref (json/parsed-seq reader keywords?))
... | null | https://raw.githubusercontent.com/weavejester/clj-daemon/42a709af51b2d2602c8e15dadec911fb0cb542bf/src/clj_daemon/server.clj | clojure | (ns clj-daemon.server
(:use [net.tcp.server :only (tcp-server wrap-io)]
[clj-daemon.classloader :only (url-classloader eval-string)])
(:require [clj-json.core :as json]))
(defn wrap-json [handler & [keywords?]]
(wrap-io
(fn [reader writer]
(let [input (ref (json/parsed-seq reader keywords?))
... | |
549a92021298dda9a519f0a508f0f6d64a2a6d0e24ca51105f960870d1d6b591 | OlafChitil/hat | SystemBuiltin.hs | module Hat.SystemBuiltin where
import Hat.Hat as T
import Hat.SystemBuiltinTypes
import Hat.PreludeBuiltinTypes
import qualified System.Exit
toExitCode :: RefExp -> R ExitCode -> System.Exit.ExitCode
toExitCode h (R ExitSuccess _) = System.Exit.ExitSuccess
toExitCode h (R (ExitFailure rnum) _) = System.Exit.ExitFailu... | null | https://raw.githubusercontent.com/OlafChitil/hat/8840a480c076f9f01e58ce24b346850169498be2/Hat/SystemBuiltin.hs | haskell | module Hat.SystemBuiltin where
import Hat.Hat as T
import Hat.SystemBuiltinTypes
import Hat.PreludeBuiltinTypes
import qualified System.Exit
toExitCode :: RefExp -> R ExitCode -> System.Exit.ExitCode
toExitCode h (R ExitSuccess _) = System.Exit.ExitSuccess
toExitCode h (R (ExitFailure rnum) _) = System.Exit.ExitFailu... | |
4af34258a1fb29532fd0521a32d870e539450e27605df23e7c5bf3256ad17670 | ygrek/mldonkey | gnutellaClients.ml | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/networks/gnutella/gnutellaClients.ml | ocaml | ***********************************************************************
Global Values
********************************... | Copyright 2001 , 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
... |
47b22eb38e9bf10b8f03fb1e8fddc386d4433b449ae4d53f1bc9de2a32821511 | S8A/htdp-exercises | ex014.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-beginner-reader.ss" "lang")((modname ex014) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex014.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-beginner-reader.ss" "lang")((modname ex014) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-decimal #f #t none ... |
103bfeb56533ccd0254304c4ddb5939daee3f3375df493610c2cc478dccb6e28 | babashka/babashka | core_test.clj | (ns progrock.core-test
(:require [clojure.test :refer :all]
[clojure.string :as str]
[progrock.core :as pr]))
(deftest test-progress-bar
(let [bar (pr/progress-bar 50)]
(is (= (:total bar) 50))
(is (= (:progress bar) 0))
(is (not (:done? bar)))))
(deftest test-tick
(let [bar ... | null | https://raw.githubusercontent.com/babashka/babashka/665ae4dd97535bf72a5ce34a19d624e74e5c4fe8/test-resources/lib_tests/progrock/core_test.clj | clojure | BB-TEST-PATCH: Make windows compatible | (ns progrock.core-test
(:require [clojure.test :refer :all]
[clojure.string :as str]
[progrock.core :as pr]))
(deftest test-progress-bar
(let [bar (pr/progress-bar 50)]
(is (= (:total bar) 50))
(is (= (:progress bar) 0))
(is (not (:done? bar)))))
(deftest test-tick
(let [bar ... |
848c8a45ea4895cd9f46de26d055d9569bff147567dbe108211c15fc6c24e585 | fission-codes/fission | Properties.hs | module Web.UCAN.Proof.Properties
( reflexive
, antisymmetric
, transitive
) where
import RIO
import Web.UCAN.Proof.Class
reflexive :: DelegationSemantics res => res -> Bool
reflexive res =
res `canDelegate` res
antisymmetric :: (DelegationSemantics res, Eq res) => res -> res -> Bool
an... | null | https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/hs-ucan/library/Web/UCAN/Proof/Properties.hs | haskell | module Web.UCAN.Proof.Properties
( reflexive
, antisymmetric
, transitive
) where
import RIO
import Web.UCAN.Proof.Class
reflexive :: DelegationSemantics res => res -> Bool
reflexive res =
res `canDelegate` res
antisymmetric :: (DelegationSemantics res, Eq res) => res -> res -> Bool
an... | |
52213760876741c678207fd46a7500cc830a9e8ea8f868be442051979e7ccea4 | ocaml-sf/learnocaml-cpge-public | prelude.ml | type 'a bst =
| Empty
| Node of 'a bst * 'a * 'a bst
| null | https://raw.githubusercontent.com/ocaml-sf/learnocaml-cpge-public/f903aaa78254c8397c8d138c13bb2976c1d9ef3d/exercises/bst/prelude.ml | ocaml | type 'a bst =
| Empty
| Node of 'a bst * 'a * 'a bst
| |
0b589ab9a1dfdc64183a757ac7f1ea3972c58fb00819629f947f005385f0f6e2 | apinf/proxy42 | vegur_websocket_client.erl | Copyright ( c ) 2013 - 2015 , Heroku Inc < > .
%%% All rights reserved.
%%%
%%% 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,... | null | https://raw.githubusercontent.com/apinf/proxy42/01b483b711881391e8306bf64b83b4df9d0bc832/apps/vegur/test/vegur_websocket_client.erl | erlang | All rights reserved.
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 following disclaimer.
* Redistributions... | Copyright ( c ) 2013 - 2015 , Heroku Inc < > .
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE ,
... |
d44064c2534dcc38665f0e073345636223bc8cfc1815a35b7296a864ef6d059b | kaoskorobase/hsndfile | normalize.hs | module Main where
import qualified Sound.File.Sndfile.Buffer.StorableVector.Examples as StorableVector
import qualified Sound.File.Sndfile.Buffer.Vector.Examples as Vector
import System.Environment
main = do
(inFile:outFile:args) <- getArgs
let f = case args of
["StorableVector"] -> ... | null | https://raw.githubusercontent.com/kaoskorobase/hsndfile/f532a1fdf119a543d7db20fe21f11ced5cffbb21/examples/normalize.hs | haskell | module Main where
import qualified Sound.File.Sndfile.Buffer.StorableVector.Examples as StorableVector
import qualified Sound.File.Sndfile.Buffer.Vector.Examples as Vector
import System.Environment
main = do
(inFile:outFile:args) <- getArgs
let f = case args of
["StorableVector"] -> ... | |
b5b01eab8b65c651c9d7fed1eabb0863e4af7aa8efec524a9d823af026f5af2a | melusina-org/cl-rashell | posix.lisp | posix.lisp — utilities
;;;; Rashell (-org/cl-rashell)
This file is part of Rashell .
;;;;
Copyright © 2017–2022
;;;; All rights reserved.
This file must be used under the terms of the MIT License .
;;;; This source file is licensed as described in the file LICENSE, which
;;;; you should have received as p... | null | https://raw.githubusercontent.com/melusina-org/cl-rashell/61ddd7587c075c7f4439698f4762a38e45e26cb1/testsuite/posix.lisp | lisp | Rashell (-org/cl-rashell)
All rights reserved.
This source file is licensed as described in the file LICENSE, which
you should have received as part of this distribution. The terms
are also available at
End of file `posix.lisp' | posix.lisp — utilities
This file is part of Rashell .
Copyright © 2017–2022
This file must be used under the terms of the MIT License .
(in-package #:org.melusina.rashell/testsuite)
Rashell POSIX Interface
(define-testcase testsuite-find-expr ()
(assert-equal
'("(" "-not" "(" "-name" "*.c" ")"... |
3063cf83e63fb35c90b18f7e8217b80ed7a9eb9b122860cc8c0d029ce80b48ae | Kappa-Dev/KappaTools | js_graphlogger.ml | (******************************************************************************)
(* _ __ * The Kappa Language *)
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
(* | ' / ********************************************************************... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/8206b2d6402214dd4294ed0e624895aa87d3cfeb/gui/js_graphlogger.ml | ocaml | ****************************************************************************
_ __ * The Kappa Language
| ' / ********************************************************************
| . \ * This file is distributed under the terms of the
|_|\_\ * GN... | | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
class type graph_logger =
object
method setData : Js.js_string Js.t -> unit Js.meth
method clearData : unit Js.meth
end;;
let create_graph_logger (id : string) (on_click : Js.js_string Js.t -> unit)
: graph_logger Js.t =
J... |
27da91cbdd102a2e483f941b5493dc777c1fd1863afe16519ba6d93b56a3d617 | chrisdone/prana | TopHandler.hs | # LANGUAGE Trustworthy #
{-# LANGUAGE CPP
, NoImplicitPrelude
, MagicHash
, UnboxedTuples
, UnliftedFFITypes
#-}
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
Module : GHC.TopHandler
Copyright ... | null | https://raw.githubusercontent.com/chrisdone/prana/f2e45538937d326aff562b6d49296eaedd015662/prana-boot/packages/base-4.11.1.0/GHC/TopHandler.hs | haskell | # LANGUAGE CPP
, NoImplicitPrelude
, MagicHash
, UnboxedTuples
, UnliftedFFITypes
#
# OPTIONS_HADDOCK hide #
---------------------------------------------------------------------------
|
License : see libraries/base/LICENSE
Maintainer :
Stability : internal
... | # LANGUAGE Trustworthy #
Module : GHC.TopHandler
Copyright : ( c ) The University of Glasgow , 2001 - 2002
Portability : non - portable ( GHC Extensions )
( e.g. @Main.main@ , ' Control . Concurrent.forkIO ' , and foreign exports )
module GHC.TopHandler (
runMainIO, runIO, runIOFastExit... |
b7e469ddafd330059bc82f0322ac3bd3eb676b012ec8be2c4315b551db82e0c8 | mlemerre/l-lang | llvmenv.mli | Copyright 2013
s All translation are done using [ Llvm.global_context ( ) ] , and
in a single Llvm module named [ the_module ] .
in a single Llvm module named [the_module]. *)
val the_module: Llvm.llmodule;;
(* Returns a llvalue according to a their name. *)
val lookup_function: string -> Llvm.llvalue;;
va... | null | https://raw.githubusercontent.com/mlemerre/l-lang/88201e861c6cc30bb3b9510d7f55c681eded4085/src/llvm/llvmenv.mli | ocaml | Returns a llvalue according to a their name. | Copyright 2013
s All translation are done using [ Llvm.global_context ( ) ] , and
in a single Llvm module named [ the_module ] .
in a single Llvm module named [the_module]. *)
val the_module: Llvm.llmodule;;
val lookup_function: string -> Llvm.llvalue;;
val lookup_global: string -> Llvm.llvalue;;
|
eb5f859eae3cc0b1d0d098bca966bb64057216960db1301bed90086533a63986 | google/codeworld | source.hs |
Copyright 2020 The CodeWorld Authors . 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 applicable law or agreed to ... | null | https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/codeworld-compiler/test/testcases/indentedDecl/source.hs | haskell |
Copyright 2020 The CodeWorld Authors . 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 applicable law or agreed to ... | |
768ff59e63a903d4d3cf3b3122e3f01fa8668dda4be5e84f29097a3b132d1bf7 | GrammaTech/sel | flet-2.lisp | (flet ((f ()
(+ 1 2)
(- 1 2)
(/ 1 2)
(* 1 2)))
nil)
| null | https://raw.githubusercontent.com/GrammaTech/sel/a59174c02a454e8d588614e221cf281260cf12f8/test/etc/lisp-scopes/flet-2.lisp | lisp | (flet ((f ()
(+ 1 2)
(- 1 2)
(/ 1 2)
(* 1 2)))
nil)
| |
b5af88342cc75f228fbb68d8779b34cc38bb51ba1d515bfcf59d3e8960ba49d2 | jkrasnay/luhmann | asciidoc.clj | (ns luhmann.asciidoc
(:require
[babashka.fs :as fs]
[clojure.string :as string]
[luhmann.core :as luhmann]
[luhmann.log :as log]
[luhmann.watcher :as watcher])
(:import
[org.asciidoctor Asciidoctor Asciidoctor$Factory Options SafeMode]))
(defonce asciidoctor (atom nil))
(defn replace-ext
... | null | https://raw.githubusercontent.com/jkrasnay/luhmann/c1824cd4aedebb3208994c0aa022c9c70ddc16db/src/main/clojure/luhmann/asciidoc.clj | clojure | ============================================================
start/stop
============================================================
Registrations
| (ns luhmann.asciidoc
(:require
[babashka.fs :as fs]
[clojure.string :as string]
[luhmann.core :as luhmann]
[luhmann.log :as log]
[luhmann.watcher :as watcher])
(:import
[org.asciidoctor Asciidoctor Asciidoctor$Factory Options SafeMode]))
(defonce asciidoctor (atom nil))
(defn replace-ext
... |
069e1def55797578167b4600f11e4dd19e121916333a61295eb18785b9106883 | default-kramer/plisqin | main.rkt | #lang racket
(module+ test
(require rackunit))
;; Notice
;; To install (from within the package directory):
$ raco pkg install
;; To install (once uploaded to pkgs.racket-lang.org):
$ raco pkg install < < name > >
;; To uninstall:
$ raco pkg remove < < name > >
;; To view documentation:
;; $ raco docs... | null | https://raw.githubusercontent.com/default-kramer/plisqin/26421c7c42656c873c4e0a4fc7f48c0a3ed7770f/plisqin-lib/main.rkt | racket | Notice
To install (from within the package directory):
To install (once uploaded to pkgs.racket-lang.org):
To uninstall:
To view documentation:
$ raco docs <<name>>
desired license.
Some users like to add a `private/` directory, place auxiliary files there,
and require them in `main.rkt`.
See the current... | #lang racket
(module+ test
(require rackunit))
$ raco pkg install
$ raco pkg install < < name > >
$ raco pkg remove < < name > >
For your convenience , we have included a LICENSE.txt file , which links to
the GNU Lesser General Public License .
If you would prefer to use a different license , repl... |
be26665b26f4aba6d0c55bf2f63bacbdb4b2b583ac3568002faf1c6f8dc795f1 | rainoftime/PFAD | ch1.erl | -module(ch1).
-export([
minfree/1,
devide_and_conquer_minfree/1
]).
%% @doc O(N^2): N=length(Numbers)
-spec minfree([non_neg_integer()]) -> non_neg_integer().
minfree(Numbers) ->
hd(lists:dropwhile(fun (X) -> lists:member(X, Numbers) end, lists:seq(0, length(Numbers)))).
%% @doc O(N): ... | null | https://raw.githubusercontent.com/rainoftime/PFAD/e594c027fc49da6f546701f6a550271b99442e0a/ch1/ch1.erl | erlang | @doc O(N^2): N=length(Numbers)
@doc O(N): N=length(Numbers) | -module(ch1).
-export([
minfree/1,
devide_and_conquer_minfree/1
]).
-spec minfree([non_neg_integer()]) -> non_neg_integer().
minfree(Numbers) ->
hd(lists:dropwhile(fun (X) -> lists:member(X, Numbers) end, lists:seq(0, length(Numbers)))).
-spec devide_and_conquer_minfree([non_neg_intege... |
db026bfea4e2076f4c84c505379a92ab5f51d8f04f550f826d7d089945ef7183 | mmottl/gsl-ocaml | matrix_complex.ml | gsl - ocaml - OCaml interface to GSL
Copyright ( © ) 2002 - 2012 - Olivier Andrieu
Distributed under the terms of the GPL version 3
let () = Error.init ()
open Bigarray
open Gsl_complex
type complex_mat_bigarr =
(Complex.t, Bigarray.complex64_elt, Bigarray.... | null | https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/src/matrix_complex.ml | ocaml | gsl - ocaml - OCaml interface to GSL
Copyright ( © ) 2002 - 2012 - Olivier Andrieu
Distributed under the terms of the GPL version 3
let () = Error.init ()
open Bigarray
open Gsl_complex
type complex_mat_bigarr =
(Complex.t, Bigarray.complex64_elt, Bigarray.... | |
b5add8690cc262573285ce5aa1dc78e8d77bb7ac7936f35dc741f1423f33388e | trptcolin/reply | completion.clj | (ns reply.completion
(:require [clojure.string :as str]))
(def non-word-chars
["\\s" ","
"\\(" "\\)"
"\\[" "\\]"
"\\{" "\\}"])
(defn input-up-to [^String input index]
(let [topmost-index (min index (.length input))]
(.substring input 0 topmost-index)))
(defn not-in-charset [characters]
(str "[^"... | null | https://raw.githubusercontent.com/trptcolin/reply/ca2fbb8c0ff2ae704ca22ce6a79e6edebba5cc91/src/clj/reply/completion.clj | clojure | (ns reply.completion
(:require [clojure.string :as str]))
(def non-word-chars
["\\s" ","
"\\(" "\\)"
"\\[" "\\]"
"\\{" "\\}"])
(defn input-up-to [^String input index]
(let [topmost-index (min index (.length input))]
(.substring input 0 topmost-index)))
(defn not-in-charset [characters]
(str "[^"... | |
2f763780995ca16ebdfef4c000389a6eaf0136630c10715bc87ca5cc35f21eca | tolysz/ghcjs-stack | Foo.hs | module Foo where
import Distribution.TestSuite
tests :: IO [Test]
tests = return [Test $ TestInstance
{ run = return (Finished (Fail "A"))
, name = "test A"
, tags = []
, options = []
, setOption = \_ _-> Left "No Options"
}]
| null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/Cabal/tests/PackageTests/DuplicateModuleName/src/Foo.hs | haskell | module Foo where
import Distribution.TestSuite
tests :: IO [Test]
tests = return [Test $ TestInstance
{ run = return (Finished (Fail "A"))
, name = "test A"
, tags = []
, options = []
, setOption = \_ _-> Left "No Options"
}]
| |
a00bd6509255050b209c1f35d6faf8576e38b3df1e284dfe13f315d13d00b68a | OCamlPro/ocaml-benchs | optimization.mli | (***************************************************************************)
Copyright ( C ) 2000 - 2013 LexiFi SAS . All rights reserved .
(* *)
(* This program is free software: you can redistribute it and/or modify *)
it ... | null | https://raw.githubusercontent.com/OCamlPro/ocaml-benchs/98047e112574e6bf55137dd8058f227a9f40281b/lexifi-g2pp/optimization.mli | ocaml | *************************************************************************
This program is free software: you can redistribute it and/or modify
or (at your option) any later version.
... | Copyright ( C ) 2000 - 2013 LexiFi SAS . All rights reserved .
it under the terms of the GNU General Public License as published
by the Free Software Foundation , either version 3 of the License ,
You should have received a copy of the GNU General Public License
type termin... |
9c647b561163c62042253043a500ae96d730add3e3a62ceeae56b24dc0d7e463 | sulami/spielwiese | 056-powerful-digit-sum.hs | -- Powerful digit sum
Problem 56
--
A googol ( 10 ^ 100 ) is a massive number : one followed by one - hundred zeros ;
100100 is almost unimaginably large : one followed by two - hundred zeros .
Despite their size , the sum of the digits in each number is only 1 .
--
Considering natural numbers of the form , a... | null | https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/hEuler/056-powerful-digit-sum.hs | haskell | Powerful digit sum
maximum digital sum?
# OPTIONS_GHC -O2 # | Problem 56
A googol ( 10 ^ 100 ) is a massive number : one followed by one - hundred zeros ;
100100 is almost unimaginably large : one followed by two - hundred zeros .
Despite their size , the sum of the digits in each number is only 1 .
Considering natural numbers of the form , ab , where a , b < 100 , what... |
2cf03f3a6aab7c4b9fe34b7135299570a52b94fe69616649884180aef6a8ca32 | LexiFi/lrt | lrt_ppx_runtime.ml | (******************************************************************************)
Copyright ( C ) 2020 by LexiFi .
(* *)
This source file is released under the terms of the MIT license as part ... | null | https://raw.githubusercontent.com/LexiFi/lrt/038ff963bd066c9d94cffb9896b04b6b8696f136/lib/lrt_ppx_runtime.ml | ocaml | ****************************************************************************
of the lrt package. Details can be found in the attached LICENSE file.
****************************************************************************
*/*
* Runtim... | Copyright ( C ) 2020 by LexiFi .
This source file is released under the terms of the MIT license as part
* Runtime components of [ \[@@deriving t\ ] ] and [ \[%path ? .\ ] ] .
module Types = struct
module Ttype = Ttype
open Stype.Internal
type 'a lazy_t =... |
d24d5ab2d999df732bff6db927c91bc8209829312b1546175676d298536ca4e1 | saikyun/clobits | c.clj | (ns clobits.c
(:require [clobits.native-interop :refer [*native-image*]]))
(defmacro with-heap
[bindings & body]
(@#'clojure.core/assert-args
(vector? bindings) "a vector for its bindings"
(even? (count bindings)) "an even number of forms in binding vector")
(cond (= 0 (count bindings)) `(do ~@body)
... | null | https://raw.githubusercontent.com/saikyun/clobits/67bc60cbf6bed8a5178d552d3485e4117fb4df10/src/clj/clobits/c.clj | clojure | (ns clobits.c
(:require [clobits.native-interop :refer [*native-image*]]))
(defmacro with-heap
[bindings & body]
(@#'clojure.core/assert-args
(vector? bindings) "a vector for its bindings"
(even? (count bindings)) "an even number of forms in binding vector")
(cond (= 0 (count bindings)) `(do ~@body)
... | |
f13ba974fe61b08724d7ba3aeaa61d6aacd2d0d8004c142ce94b24c08bf0ccd1 | OCamlPro/ocp-indent | js-begin.ml | let f = function
| zoo -> begin
foo;
bar;
end
;;
let g = function
| zoo -> (
foo;
bar;
)
;;
let () =
begin match foo with
| Bar -> snoo
end
;;
| null | https://raw.githubusercontent.com/OCamlPro/ocp-indent/9e26c0a2699b7076cebc04ece59fb354eb84c11c/tests/failing-output/js-begin.ml | ocaml | let f = function
| zoo -> begin
foo;
bar;
end
;;
let g = function
| zoo -> (
foo;
bar;
)
;;
let () =
begin match foo with
| Bar -> snoo
end
;;
| |
35441da64ae9a494ad22c196f11836cadab5e2354037b29f581332e58a444377 | wireapp/wire-server | Brig.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/1fcda9671f2b4cb8cb5574d9c9d9de5cf915b043/libs/wire-api/src/Wire/API/Routes/Internal/Brig.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Wire.API.Routes.Internal.... |
09b8e42f848fa0b685006fc636786faaedf8954e21607706f4d2ebe6ddf48814 | AlacrisIO/legicash-facts | side_chain.ml | open Lwt.Infix
open Legilogic_lib
open Lib
open Yojsoning
open Marshaling
open Persisting
open Types
open Signing
open Merkle_trie
open Legilogic_ethereum
open Side_chain_server_config
module TokenAmount = Ethereum_chain.TokenAmount
module Invoice = struct
[@warning "-39-32"]
type t = {recipient: Address.t; amou... | null | https://raw.githubusercontent.com/AlacrisIO/legicash-facts/5d3663bade68c09bed47b3f58fa12580f38fdb46/src/alacris_lib/side_chain.ml | ocaml | * Default (empty) state for a new operator
Module for Maps from Side_chain.TxHeader.tx_revision to (unsigned) Transaction
* What we need for the system is the pair of Revision and state digest
State.t
1e13 wei = 1e-5 ether ~= .24 cent | open Lwt.Infix
open Legilogic_lib
open Lib
open Yojsoning
open Marshaling
open Persisting
open Types
open Signing
open Merkle_trie
open Legilogic_ethereum
open Side_chain_server_config
module TokenAmount = Ethereum_chain.TokenAmount
module Invoice = struct
[@warning "-39-32"]
type t = {recipient: Address.t; amou... |
38c4716576038ace735a78995ec29d5ede1c0806f7416e1906450ad350d59d60 | racket/htdp | std-grammar.rkt | #reader scribble/reader
#lang racket/base
(require "common.rkt"
scribble/decode)
(provide prim-nonterms
racketgrammar*+library
racketgrammar*+qq)
(define ex-str "This is a string with \" inside")
(define-syntax-rule (racketgrammar*+library
#:literals lits
... | null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-doc/scribblings/htdp-langs/std-grammar.rkt | racket | } | #reader scribble/reader
#lang racket/base
(require "common.rkt"
scribble/decode)
(provide prim-nonterms
racketgrammar*+library
racketgrammar*+qq)
(define ex-str "This is a string with \" inside")
(define-syntax-rule (racketgrammar*+library
#:literals lits
... |
a5b5fe185eac99741ad00401e7890cbe433a3675e385f44d3bb7a709c44ddb5c | sirherrbatka/statistical-learning | types.lisp | (cl:in-package #:statistical-learning.model-protocol)
(defclass fundamental-model (sl.common:proxy-enabled)
((%parameters :initarg :parameters
:reader parameters)))
(defclass fundamental-model-parameters (sl.common:proxy-enabled)
())
(defclass fundamental-training-state ()
((%training-parame... | null | https://raw.githubusercontent.com/sirherrbatka/statistical-learning/777bf0893d2f949bb1f641fb1ced978394bbc206/source/model-protocol/types.lisp | lisp | (cl:in-package #:statistical-learning.model-protocol)
(defclass fundamental-model (sl.common:proxy-enabled)
((%parameters :initarg :parameters
:reader parameters)))
(defclass fundamental-model-parameters (sl.common:proxy-enabled)
())
(defclass fundamental-training-state ()
((%training-parame... | |
d58e7eab5a7605983c1e0ab8e0eb341ef9b64f28a899011246d23a363374c414 | shirok/Gauche | process-context.scm | ;;
This is a cushion module to use ( scheme process - context ) from Gauche
;;
(define-module scheme.process-context (use r7rs-setup))
| null | https://raw.githubusercontent.com/shirok/Gauche/ecaf82f72e2e946f62d99ed8febe0df8960d20c4/lib/scheme/process-context.scm | scheme | This is a cushion module to use ( scheme process - context ) from Gauche
(define-module scheme.process-context (use r7rs-setup))
| |
94a0a1a5b792799c86ae753ca334c5bfd9ae78d282f91375f693d6db06e9e72d | travelping/eradius | eradius_dict.erl | @private
%% @doc Dictionary server
-module(eradius_dict).
-export([start_link/0, lookup/2, load_tables/1, load_tables/2, unload_tables/1, unload_tables/2]).
-export_type([attribute/0, attr_value/0, table_name/0, attribute_id/0, attribute_type/0,
attribute_prim_type/0, attribute_encryption/0, vendor_id/0, value... | null | https://raw.githubusercontent.com/travelping/eradius/4bf56b94f76ee83349ce0356b82c45ea25bb9f1e/src/eradius_dict.erl | erlang | @doc Dictionary server
------------------------------------------------------------------------------------------
-- API
------------------------------------------------------------------------------------------
-- gen_server callbacks
unused callbacks
------------------------------------------------------------... | @private
-module(eradius_dict).
-export([start_link/0, lookup/2, load_tables/1, load_tables/2, unload_tables/1, unload_tables/2]).
-export_type([attribute/0, attr_value/0, table_name/0, attribute_id/0, attribute_type/0,
attribute_prim_type/0, attribute_encryption/0, vendor_id/0, value_id/0]).
-behaviour(gen_s... |
b7dadae7cb0999871aafda55a2ea0d8a888986ca650d0d0effe13d60f1e819ca | haskell-beam/beam | Extract.hs | module Database.Beam.Query.Extract
( -- * SQL @EXTRACT@ support
ExtractField(..),
extract_,
* * SQL92 fields
hour_, minutes_, seconds_,
year_, month_, day_,
HasSqlTime, HasSqlDate
) where
import Database.Beam.Query.Internal ( QGenExpr(..) )
import Database.Beam.Backend.SQL ... | null | https://raw.githubusercontent.com/haskell-beam/beam/596981a1ea6765b9f311d48a2ec4d8460ebc4b7e/beam-core/Database/Beam/Query/Extract.hs | haskell | * SQL @EXTRACT@ support
| A field that can be extracted from SQL expressions of type 'tgt'
that results in a type 'a', in backend 'be'.
| Extracts the given field from the target expression
| Type-class for types that contain a time component
time field
| Type-class for types that contain a date component | module Database.Beam.Query.Extract
ExtractField(..),
extract_,
* * SQL92 fields
hour_, minutes_, seconds_,
year_, month_, day_,
HasSqlTime, HasSqlDate
) where
import Database.Beam.Query.Internal ( QGenExpr(..) )
import Database.Beam.Backend.SQL ( BeamSqlBackend, BeamSqlBackendS... |
9608723a2fd31c835f44e74400d8e00db2841bb86c426f039481efdad68d75a5 | ocaml-sf/learn-ocaml-corpus | master.ml | (* BEGIN EXCLUDE
(* Beautiful inefficient definition: *)
let rec inorder t =
match t with
| Leaf ->
[]
| Node (u, x, v) ->
inorder u @ [x] @ inorder v
let rec preorder t =
match t with
| Leaf ->
[]
| Node (u, x, v) ->
[x] @ preorder u @ preorder v
(* Efficient definition: *)
let ... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/stereo/master.ml | ocaml | BEGIN EXCLUDE
(* Beautiful inefficient definition:
Efficient definition:
BEGIN INCLUDE
TO DO: Define this function.
END INCLUDE
BEGIN EXCLUDE
inorder t []
let rec preorder t k =
match t with
| Leaf ->
k
| Node (u, x, v) ->
x :: preorder u (preorder v k)
END EXCLUDE
BEGIN INCLUDE... |
let rec inorder t =
match t with
| Leaf ->
[]
| Node (u, x, v) ->
inorder u @ [x] @ inorder v
let rec preorder t =
match t with
| Leaf ->
[]
| Node (u, x, v) ->
[x] @ preorder u @ preorder v
let rec inorder t k =
match t with
| Leaf ->
k
| Node (u, x, v) ->
inor... |
61cda34cbf3a6e6cf71500ba95342ae86b7f92da0735310577a0c0208d64c0db | mtesseract/nakadi-client | Subscription.hs | |
Module : Network . . Subscriptions . Stats
Description : Implementation of Nakadi Subscription API
Copyright : ( c ) 2017 , 2018
License : :
Stability : experimental
Portability : POSIX
This module implements the @\/subscriptions\/SUBSCRIPTIONS@ API .
Module : Network.N... | null | https://raw.githubusercontent.com/mtesseract/nakadi-client/f8eef3ac215459081b01b0b48f0b430ae7701f52/src/Network/Nakadi/Subscriptions/Subscription.hs | haskell | # LANGUAGE FlexibleContexts #
| @GET@ to @\/subscriptions\/SUBSCRIPTION@. Looks up subscription
information for a subscription ID.
^ Subscription ID
| @DELETE@ to @\/subscriptions\/SUBSCRIPTION@. Deletes a
subscription by subscription ID. | |
Module : Network . . Subscriptions . Stats
Description : Implementation of Nakadi Subscription API
Copyright : ( c ) 2017 , 2018
License : :
Stability : experimental
Portability : POSIX
This module implements the @\/subscriptions\/SUBSCRIPTIONS@ API .
Module : Network.N... |
736c8dd5b11bf08e42d560da6cd463fed751bba441e77879cbd6075a467653f7 | acw/eve | EVE.hs | module EVE(
-- * State initialization
EVE, Offline, Online, Keyed
, initializeEVEOffline
, initializeEVEOnline
, initializeEVEKeyed
, addUserInfo
, removeUserInfo
, goOffline
)
where
import EVE.State
| null | https://raw.githubusercontent.com/acw/eve/95c3a158e181e9708c2f3b5d998512bbc1b06e57/src/EVE.hs | haskell | * State initialization | module EVE(
EVE, Offline, Online, Keyed
, initializeEVEOffline
, initializeEVEOnline
, initializeEVEKeyed
, addUserInfo
, removeUserInfo
, goOffline
)
where
import EVE.State
|
d2ea8c5b0455a44e512b6cd4853301ef306db954b60c64ec0a6330dd815d1765 | metaocaml/ber-metaocaml | ambiguity.ml | (* TEST
* expect
*)
[@@@warning "-8-11-12"] (* reduce the noise. *)
type ('a, 'b) eq = Refl : ('a, 'a) eq;;
[%%expect{|
type ('a, 'b) eq = Refl : ('a, 'a) eq
|}];;
let ret_e1 (type a b) (b : bool) (wit : (a, b) eq) (x : a) (y : b) =
match wit with
| Refl -> if b then x else y
| _ -> x
;;
[%%expect{|
Line 3,... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-gadts/ambiguity.ml | ocaml | TEST
* expect
reduce the noise. |
type ('a, 'b) eq = Refl : ('a, 'a) eq;;
[%%expect{|
type ('a, 'b) eq = Refl : ('a, 'a) eq
|}];;
let ret_e1 (type a b) (b : bool) (wit : (a, b) eq) (x : a) (y : b) =
match wit with
| Refl -> if b then x else y
| _ -> x
;;
[%%expect{|
Line 3, characters 29-30:
3 | | Refl -> if b then x else y
... |
b0a4cbf25d960e31dd3e16573617eb0b0f68409d3bf95c37300680b42522338d | clash-lang/clash-compiler | Instances.hs | |
Copyright : ( C ) 2022 Google Inc
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Orphan instances for types in " Clash . Cores . Xilinx . DcFifo . Internal . Types " . They
are housed here due to TemplateHaskell stage restrictions .
Copyright : (C)... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/92e34274a3ed39bbb5e21bbf26a3eb02c6fbd8e2/clash-cores/src/Clash/Cores/Xilinx/DcFifo/Internal/Instances.hs | haskell | |
Copyright : ( C ) 2022 Google Inc
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Orphan instances for types in " Clash . Cores . Xilinx . DcFifo . Internal . Types " . They
are housed here due to TemplateHaskell stage restrictions .
Copyright : (C)... | |
8d4da850f431f0692b38797d8929b1fdbdc83547d2638f859cbff5c69e5100cc | elastic/eui-cljs | accordion.cljs | (ns eui.accordion
(:require ["@elastic/eui/lib/components/accordion/accordion.js" :as eui]))
(def EuiAccordion eui/EuiAccordion)
(def PADDING_SIZES eui/PADDING_SIZES)
(def EuiAccordionClass eui/EuiAccordionClass)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/accordion.cljs | clojure | (ns eui.accordion
(:require ["@elastic/eui/lib/components/accordion/accordion.js" :as eui]))
(def EuiAccordion eui/EuiAccordion)
(def PADDING_SIZES eui/PADDING_SIZES)
(def EuiAccordionClass eui/EuiAccordionClass)
| |
fa022aaf5c699cbfa2a98d4379d8ec56e610fef8c75c89054ac30efa70a7597a | kupl/LearnML | original.ml | type formula =
| True
| False
| Not of formula
| AndAlso of (formula * formula)
| OrElse of (formula * formula)
| Imply of (formula * formula)
| Equal of (exp * exp)
and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp)
let rec eval (f : formula) : bool =
match f with
| Not True -> false... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub48/original.ml | ocaml | type formula =
| True
| False
| Not of formula
| AndAlso of (formula * formula)
| OrElse of (formula * formula)
| Imply of (formula * formula)
| Equal of (exp * exp)
and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp)
let rec eval (f : formula) : bool =
match f with
| Not True -> false... | |
9db830987546db533c2988daa23c9a0050eeffb2f19808f9fb7bf1481d97612e | soegaard/sketching | sketch-array.rkt | #lang sketching
(define ys #f)
(define (y i) (vector-ref ys i))
(define (setup)
(size 640 360)
(:= ys (make-vector width 0.)))
(define (draw)
(background 204)
(for ([i (in-range (- width 1) 0 -1)])
(:= ys i (y (- i 1))))
(:= ys 0 mouse-y)
(for ([i (in-range 1 width)])
(line i (y i) (- i ... | null | https://raw.githubusercontent.com/soegaard/sketching/99892486efad866eabe6ab34515fb3951b2a7858/sketching-examples/examples/sketch-array.rkt | racket | #lang sketching
(define ys #f)
(define (y i) (vector-ref ys i))
(define (setup)
(size 640 360)
(:= ys (make-vector width 0.)))
(define (draw)
(background 204)
(for ([i (in-range (- width 1) 0 -1)])
(:= ys i (y (- i 1))))
(:= ys 0 mouse-y)
(for ([i (in-range 1 width)])
(line i (y i) (- i ... | |
fe83f9a204e6621837229479cab004580fd45da8b6bca9d3e30c2d48d0d3fa91 | thoughtbot/carnival | Site.hs | module Model.Site
( findSites
, findMemberSite
, createSite
, destroySite
, overSiteQuota
, siteBranded
, upsertDemoSite
) where
import Import
import Database.Esqueleto hiding ((==.), delete, on)
import qualified Database.Esqueleto as E
findSites :: UserId -> DB [Entity Site]
findSite... | null | https://raw.githubusercontent.com/thoughtbot/carnival/1cd4bd02ea6884b86020029257ab69ec3892a168/Model/Site.hs | haskell | module Model.Site
( findSites
, findMemberSite
, createSite
, destroySite
, overSiteQuota
, siteBranded
, upsertDemoSite
) where
import Import
import Database.Esqueleto hiding ((==.), delete, on)
import qualified Database.Esqueleto as E
findSites :: UserId -> DB [Entity Site]
findSite... | |
593707e9bb5a8ce0b31e191908556c47c0e358151d3f915a639c140f1f293bf8 | alanz/ghc-exactprint | LayoutIn4.hs | module LayoutIn4 where
--Layout rule applies after 'where','let','do' and 'of'
--In this Example: rename 'ioFun' to 'io'
main = ioFun "hello" where ioFun s= do let k = reverse s
--There is a comment
s <- getLine
let q = (k ++ s)
... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/transform/LayoutIn4.hs | haskell | Layout rule applies after 'where','let','do' and 'of'
In this Example: rename 'ioFun' to 'io'
There is a comment | module LayoutIn4 where
main = ioFun "hello" where ioFun s= do let k = reverse s
s <- getLine
let q = (k ++ s)
putStr q
putStr "foo"
|
1bae85bcdbe477dd20aed691553f472bb3bdf00de15c3400260903dc64689fbc | brandonbloom/proact | tools.cljc | (ns proact.widgets.tools
(:require [proact.html :as html] ;XXX
[proact.widgets.controls :as ctrl]
[proact.widgets.layout :as layout]))
(declare tree-view)
(def entry-view
{:template
(fn [{[k v] :item}]
{:prototype layout/row
:children
[(html/div {"style" {"font-weight" ... | null | https://raw.githubusercontent.com/brandonbloom/proact/bb4f9e4b316316c93e4f751c47112ba5307e1fd0/src/proact/widgets/tools.cljc | clojure | XXX | (ns proact.widgets.tools
[proact.widgets.controls :as ctrl]
[proact.widgets.layout :as layout]))
(declare tree-view)
(def entry-view
{:template
(fn [{[k v] :item}]
{:prototype layout/row
:children
[(html/div {"style" {"font-weight" "bold"
"paddi... |
af40b5b205236b9d4aac72ce35822c3a364577d096d11039e723e442b7812486 | RolfRolles/PandemicML | EvaluateFingerprint.ml |
# use " c:\\paframework\\Projects\\Peephole\\EvaluateFingerprint.ml " ; ;
#use "c:\\paframework\\Projects\\Peephole\\EvaluateFingerprint.ml";;
*)
#use "c:\\paframework\\framework.ml";;
let num_random_tests = 16
let initial_hash_value = 0xdefec8edl
let ri32 () = Int64.to_int32 (Random.int64 0x100000000L)
let make... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Projects/Peephole/EvaluateFingerprint.ml | ocaml | let h = Int32.add h outstate.esp in
some shit with flags
let extractfl v = None in
Needs to take the liveness context into account |
# use " c:\\paframework\\Projects\\Peephole\\EvaluateFingerprint.ml " ; ;
#use "c:\\paframework\\Projects\\Peephole\\EvaluateFingerprint.ml";;
*)
#use "c:\\paframework\\framework.ml";;
let num_random_tests = 16
let initial_hash_value = 0xdefec8edl
let ri32 () = Int64.to_int32 (Random.int64 0x100000000L)
let make... |
4bb2ae52781c425516c4a07555c459f590f40a0015e2e467914744108dbb874c | kanaka/bartender | server.clj | (ns rend.server
(:require [clojure.data.json :as json]
[cognitect.transit :as transit]
[compojure.core :refer [GET]]
[compojure.route :as route]
[org.httpkit.server :refer [run-server with-channel send!
close on-close on-receive]]... | null | https://raw.githubusercontent.com/kanaka/bartender/4357fde74adb228a3cd3fcc12cae4926da899b4e/src/rend/server.clj | clojure | [ring.middleware.defaults :refer [wrap-defaults site-defaults]]
TODO: make reloadable:
-clojure/ring/wiki/Reloading
(prn :ws-broadcast :count (count string))
echo it
(wrap-defaults site-defaults)
(wrap-file "static") | (ns rend.server
(:require [clojure.data.json :as json]
[cognitect.transit :as transit]
[compojure.core :refer [GET]]
[compojure.route :as route]
[org.httpkit.server :refer [run-server with-channel send!
close on-close on-receive]]... |
9b34f5fbb5e9f2c8ef055703092c86951edb12a1856c8b05dd7d4194dd13294f | bpiel/guildsman | dx.clj | (ns com.billpiel.guildsman.dx
(:require [com.billpiel.guildsman.util :as ut]
[com.billpiel.guildsman.data-type :as dt]
[com.billpiel.guildsman.ops.gen-util :as ogu]
[clojure.walk :as walk]))
(defn- spacer [n] (apply str (repeat n " ")))
(defn- dx-stack-text*
[words width col indent]
(... | null | https://raw.githubusercontent.com/bpiel/guildsman/59c9a7459de19525cfc54112f02127e0777a00ce/src/clj/com/billpiel/guildsman/dx.clj | clojure | (ns com.billpiel.guildsman.dx
(:require [com.billpiel.guildsman.util :as ut]
[com.billpiel.guildsman.data-type :as dt]
[com.billpiel.guildsman.ops.gen-util :as ogu]
[clojure.walk :as walk]))
(defn- spacer [n] (apply str (repeat n " ")))
(defn- dx-stack-text*
[words width col indent]
(... | |
0dce9d25118d29005676e88b7c67fda10a94f261db9990620ab1b5620c06fb60 | basho/riak_kv | riak_kv_ensembles.erl | %% -------------------------------------------------------------------
%%
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
except in compliance with the License . You may ob... | null | https://raw.githubusercontent.com/basho/riak_kv/aeef1591704d32230b773d952a2f1543cbfa1889/src/riak_kv_ensembles.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 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
-modul... |
593bd5d1fb63d45dff1165ff8d321a6f0084ccec38bc09b2d133e95e05479d9c | Bogdanp/racket-kafka | connection.rkt | #lang racket/base
(require openssl
racket/match
racket/tcp
"error.rkt"
"help.rkt"
(prefix-in proto: "protocol.bnf"))
;; connection ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(provide
connection?
connect
connected?
disconnect
make-request-evt
get-req... | null | https://raw.githubusercontent.com/Bogdanp/racket-kafka/d8a257b0a2897a08ea91828566a41ecacfe675b1/kafka-lib/private/connection.rkt | racket | connection ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
manager ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
manager state ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
version ranges ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | #lang racket/base
(require openssl
racket/match
racket/tcp
"error.rkt"
"help.rkt"
(prefix-in proto: "protocol.bnf"))
(provide
connection?
connect
connected?
disconnect
make-request-evt
get-requests-in-flight)
(struct connection (ch mgr [versions #:mutable]))
(def... |
b595dd33e53bfe7144c5f18bb10052babb95312da6019305487b7fb88de48b49 | palkan/erlgrpc | erlgrpc_sup.erl | -module(erlgrpc_sup).
-author(palkan).
-include_lib("erlgrpc/include/priv.hrl").
-behaviour(supervisor).
%% API
-export([start_link/0, start_client/1, stop_client/1]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type, StartArgs), #{
id => I,
st... | null | https://raw.githubusercontent.com/palkan/erlgrpc/5a764009020e993ffcc31952c5478c9f4526f3ad/src/erlgrpc_sup.erl | erlang | API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
===================================================================
Supervisor callback... | -module(erlgrpc_sup).
-author(palkan).
-include_lib("erlgrpc/include/priv.hrl").
-behaviour(supervisor).
-export([start_link/0, start_client/1, stop_client/1]).
-export([init/1]).
-define(CHILD(I, Type, StartArgs), #{
id => I,
start => {I, start_link, StartArgs},
restart => permanent,
shutdown => 5000,
typ... |
e765714c318b0f2e8092af6d32e587e769e9d601a729498f375b4c0e07039c0f | matsen/pplacer | stockholm.ml | open Ppatteries
type sline =
| Header
| Footer
| Markup of string
| Alignment of string * string
let stockholm_regexp = Str.regexp begin
(* each line is either ... *)
"\\(" ^ (String.concat "\\|" [
(* nothing but whitespace (matched at the end of the group), *)
"";
the header ( group 2 ) ,
"... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/stockholm.ml | ocaml | each line is either ...
nothing but whitespace (matched at the end of the group),
and finally, strip off any trailing whitespace. For an explanation of the
* hideous regexp here, see fasta.ml. | open Ppatteries
type sline =
| Header
| Footer
| Markup of string
| Alignment of string * string
let stockholm_regexp = Str.regexp begin
"\\(" ^ (String.concat "\\|" [
"";
the header ( group 2 ) ,
"\\(# STOCKHOLM 1.0\\)";
the footer ( group 3 ) ,
"\\(//\\)";
markup ( group 4 ) ,
"\\(#=... |
a7a147fea0ab9f388b9b5a4b3ce4f0bd219d22869b952d4e5d25d2612de1772e | arttuka/reagent-material-ui | project.clj | (defproject reagent-material-ui-example "1.0.0"
:dependencies [[org.clojure/clojure "1.11.1"]
[org.clojure/clojurescript "1.11.60"]
[reagent "1.2.0"]
[arttuka/reagent-material-ui "5.11.12-0"
#_#_ :exclusions [arttuka/reagent-material-ui-js]]
... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/4fc4b44891919d2b84160eb411d52227dd89e0a5/example/project.clj | clojure | (defproject reagent-material-ui-example "1.0.0"
:dependencies [[org.clojure/clojure "1.11.1"]
[org.clojure/clojurescript "1.11.60"]
[reagent "1.2.0"]
[arttuka/reagent-material-ui "5.11.12-0"
#_#_ :exclusions [arttuka/reagent-material-ui-js]]
... | |
9baa09088f8f309714a9ce3465933e3d77ad7e2e72c9d3c3592f3398bc0f3b10 | ragkousism/Guix-on-Hurd | engineering.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 , 2016 < >
Copyright © 2015 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2016 , 2017 < >
Copyright © 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it an... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/engineering.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 © 2015 , 2016 < >
Copyright © 2015 < >
Copyright © 2016 < >
Copyright © 2016 < >
Copyright © 2016 , 2017 < >
Copyright © 2016 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with G... |
346a6fa86c6b70fbbef8453377678b846666de57888812d0dce5b67c8bb655ef | realworldocaml/mdx | lexer_mdx.mli | type token =
[ `Block of Block.Raw.t | `Section of int * string | `Text of string ]
val markdown_token : Lexing.lexbuf -> (token list, [ `Msg of string ]) result
val cram_token : Lexing.lexbuf -> (token list, [ `Msg of string ]) result
| null | https://raw.githubusercontent.com/realworldocaml/mdx/d23b06b2d97bc1c6037880a8e81f177f0140255b/lib/lexer_mdx.mli | ocaml | type token =
[ `Block of Block.Raw.t | `Section of int * string | `Text of string ]
val markdown_token : Lexing.lexbuf -> (token list, [ `Msg of string ]) result
val cram_token : Lexing.lexbuf -> (token list, [ `Msg of string ]) result
| |
78e8c004b196ef5f33baa0d184f78ddaf969c98b9f5d7b8283cc2c3a60b34675 | Th30n/cl-shake | image.lisp | ;;;; Defines `image-manager' which is responsible for taking care of images
;;;; used for rendering.
(in-package #:shake.render)
(defstruct image-opts
(width 0 :type fixnum :read-only t)
(height 0 :type fixnum :read-only t)
(depth 1 :type fixnum :read-only t))
(defstruct image
(name nil :type string :read-on... | null | https://raw.githubusercontent.com/Th30n/cl-shake/80550dba138fee977bf2f6deb62739dc7f381216/shake/image.lisp | lisp | Defines `image-manager' which is responsible for taking care of images
used for rendering.
In case of array texture, maps file name to layer index.
We need to have a valid LAYER-MAP, otherwise we are using a
defaulted image.
TODO: Better error handling.
TODO : Calc for different formats .
Account for mipmaps; T... |
(in-package #:shake.render)
(defstruct image-opts
(width 0 :type fixnum :read-only t)
(height 0 :type fixnum :read-only t)
(depth 1 :type fixnum :read-only t))
(defstruct image
(name nil :type string :read-only t)
(tex-type :texture-2d :read-only t)
(opts nil :type (or null image-opts))
(files nil :typ... |
3db8a337e52d9e63b4763f1fdc1a2ef7866bba0d36a1fa6538d8dc96ec22d72c | google/lisp-koans | format.lisp | Copyright 2013 Google Inc.
;;;
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, software
distrib... | null | https://raw.githubusercontent.com/google/lisp-koans/df5e58dc88429ef0ff202d0b45c21ce572144ba8/koans-solved/format.lisp | lisp |
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 governing per... | Copyright 2013 Google Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
T as the first argument to FORMAT prints the string to standard output .
NIL as the first argument to FORMAT causes it to return the string .
(define-test format-basic
a string that is STRING= to its format cont... |
19716dcaa12863f13a320200550878fa6961ebee9cb1e978006c58cfa3dabb63 | alanz/ghc-exactprint | T10891.hs | # LANGUAGE TypeFamilies #
# LANGUAGE TemplateHaskell #
module T10891 where
import Language.Haskell.TH
import System.IO
class C a where
f :: a -> Int
class C' a where
type F a :: *
type F a = a
f' :: a -> Int
class C'' a where
data Fd a :: *
instance C' Int where
type F Int = Bool
f' = id
instance C... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T10891.hs | haskell | # LANGUAGE TypeFamilies #
# LANGUAGE TemplateHaskell #
module T10891 where
import Language.Haskell.TH
import System.IO
class C a where
f :: a -> Int
class C' a where
type F a :: *
type F a = a
f' :: a -> Int
class C'' a where
data Fd a :: *
instance C' Int where
type F Int = Bool
f' = id
instance C... | |
d257aa10a6d7f1a141007458d4ef159ce23b605634b1daef3b01a28b3449c61b | ChrisPenner/advent-of-code-haskell | Day04.hs | # LANGUAGE TypeApplications #
# LANGUAGE QuasiQuotes #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE BlockArguments #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
module Y2019.Day04 where
import Control.Lens
import Control.Lens.Regex.Text
import Data.T... | null | https://raw.githubusercontent.com/ChrisPenner/advent-of-code-haskell/da10d53b3e98b67c9cb499dd8b2ddadd121c932e/src/Y2019/Day04.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
main :: IO ()
& lengthOf (traversed . re _Show . filteredBy (packed . [regex|(\d)\1|] . match) . filtered (\s -> s == sort s))
& print
main :: IO ()
main = print . length $ do
n <- numbers
guard (sort (show n) == show n)
... | # LANGUAGE TypeApplications #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE BlockArguments #
# LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
module Y2019.Day04 where
import Control.Lens
import Control.Lens.Regex.Text
import Data.Text.Lens
import Data.List
import qualified Data.Text as T
numb... |
7d9440e9a0902253983b212bd9bd69874d0638b54e797731e67d3a8a15774c04 | input-output-hk/cardano-ledger-byron | Map.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
module Cardano.Chain.Delegation.Map
( Map(..)
-- * Query
, memberR
, notMemberR
, pairMember
, lookupR
-- * Update
, insert
-- * Conversion/traversal
, fromList
, keysSet
)
where
import Card... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/cardano-ledger/src/Cardano/Chain/Delegation/Map.hs | haskell | # LANGUAGE DeriveAnyClass #
* Query
* Update
* Conversion/traversal
have to worry about the elements only
------------------------------------------------------------------------------
Query
------------------------------------------------------------------------------
-----------------------------------------... | # LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
module Cardano.Chain.Delegation.Map
( Map(..)
, memberR
, notMemberR
, pairMember
, lookupR
, insert
, fromList
, keysSet
)
where
import Cardano.Prelude hiding (Map)
import Data.Bimap (Bimap)
import qualified Data.Bimap as Bimap
im... |
42b8221dbb0979b5ef6845d348bc8827b73c564878ebbe1a99adf26a6a18e02d | erlangonrails/devdb | bitcask_qc_fsm.erl | %% -------------------------------------------------------------------
%%
bitcask : - inspired key / value store
%%
Copyright ( c ) 2010 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except i... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/riak-0.11.0/deps/bitcask/test/bitcask_qc_fsm.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissi... | bitcask : - inspired key / value store
Copyright ( c ) 2010 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... |
68c6647fa8120f7b1f1a3e06a2bd279f81e184bdfdf83a87f00d8a8e030b031f | mit-pdos/mcqc | Expr.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
module Parser.Expr where
import GHC.Generics hiding (Constructor)
import Data.Aeson
import Data.Text
import qualified Data.HashMap.Strict as M
-- Patterns
data Pattern = PatCtor { name :: Te... | null | https://raw.githubusercontent.com/mit-pdos/mcqc/85b5a65f1750ffb7c2336fa4c9266cc238aeeb5e/src/Parser/Expr.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveAnyClass #
Patterns
Cases
Types
Inductive constructor
Expressions | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
module Parser.Expr where
import GHC.Generics hiding (Constructor)
import Data.Aeson
import Data.Text
import qualified Data.HashMap.Strict as M
data Pattern = PatCtor { name :: Text, argnames :: [Text] }
| PatTuple { items :: [Pattern] }
... |
94878e9b0b1a3b0c96bb4f9555c90074a16e824921f895b8f610e57d0ba1b8da | mbj/stratosphere | ByteMatchTupleProperty.hs | module Stratosphere.WAFRegional.ByteMatchSet.ByteMatchTupleProperty (
module Exports, ByteMatchTupleProperty(..),
mkByteMatchTupleProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.WAFR... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/wafregional/gen/Stratosphere/WAFRegional/ByteMatchSet/ByteMatchTupleProperty.hs | haskell | # SOURCE # | module Stratosphere.WAFRegional.ByteMatchSet.ByteMatchTupleProperty (
module Exports, ByteMatchTupleProperty(..),
mkByteMatchTupleProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
... |
91965dbb2166e681cf5c0dabef14a836a92d36a43804581c7383c0c362c9b6e7 | RichiH/git-annex | Command.hs | running git commands
-
- Copyright 2010 - 2013 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010-2013 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Git.Command where
import Common
import Git
import Git.Types
import quali... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Git/Command.hs | haskell | Runs git in the specified repo.
Runs git in the specified repo, throwing an error if it fails.
Runs git and forces it to be quiet, throwing an error if it fails.
Runs a git command and returns its output, lazily.
-
- Also returns an action that should be used when the output is all
- read (or no more is neede... | running git commands
-
- Copyright 2010 - 2013 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2010-2013 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Git.Command where
import Common
import Git
import Git.Types
import quali... |
1e42c467989a1bf089497ce97cc5d2a40afb8e9cb599a67917811c4df476cbd6 | chenyukang/eopl | 36.scm | Add a begin expression(exercise4.4 ) to CPS - IN .
You should not need to add anything to CPS - OUT
TODO
(load-relative "../libs/init.scm")
(load-relative "./base/test.scm")
(load-relative "./base/cps-effects.scm")
(load-relative "./base/data-structures-effects.scm")
(load-relative "./base/store-effects.scm")
(l... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch6/36.scm | scheme | grammatical specification ;;;;;;;;;;;;;;;;
new stuff
sllgen boilerplate ;;;;;;;;;;;;;;;; | Add a begin expression(exercise4.4 ) to CPS - IN .
You should not need to add anything to CPS - OUT
TODO
(load-relative "../libs/init.scm")
(load-relative "./base/test.scm")
(load-relative "./base/cps-effects.scm")
(load-relative "./base/data-structures-effects.scm")
(load-relative "./base/store-effects.scm")
(l... |
11c41b5d8cd229344d49bd5ad9a093e6c2c2cf850cc2697189e894fe2af4b20f | veddox/atlantis | creator.lisp | ;;;
Atlantis is a framework for creating text - adventure worlds .
;;; This is the Common Lisp implementation.
;;;
This is an ATL code - generating module to ease the world creation
;;; process for non-coders (and those too lazy to write more than
;;; necessary...).
;;;
Licensed under the terms of the GNU .
au... | null | https://raw.githubusercontent.com/veddox/atlantis/78c50322fd8d7a0f05e8d20f17aa32054fdc8789/lisp/creator.lisp | lisp |
This is the Common Lisp implementation.
process for non-coders (and those too lazy to write more than
necessary...).
date: 20/06/2015
To use the spreadsheet import function, load this file from inside a Lisp
interpreter and call the (world-creator) function.
This code has been automatically generated by the
... | Atlantis is a framework for creating text - adventure worlds .
This is an ATL code - generating module to ease the world creation
Licensed under the terms of the GNU .
author :
To avoid confused players , I have diked this out of the Atlantis main menu .
(defun import-spreadsheet (spreadsheet atl-file)
... |
e653b5f5081a18ad04e3aea732fc6178419603114d35a094fd3f5de6320485e8 | typeclasses/dsv | test-with-hedgehog.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ApplicativeDo #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
import DSV.TestPrelude
import qualified DSV.Tests.FileFoldCsv
import qualified DSV.Tests.FileStrictCsvRead
import qualified DSV.Tests.FileStrictCsvZipView
import qual... | null | https://raw.githubusercontent.com/typeclasses/dsv/ae4eb823e27e4c569c4f9b097441985cf865fbab/dsv/test/test-with-hedgehog.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ApplicativeDo #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
import DSV.TestPrelude
import qualified DSV.Tests.FileFoldCsv
import qualified DSV.Tests.FileStrictCsvRead
import qualified DSV.Tests.FileStrictCsvZipView
import qualified DSV.Tests.Header
import quali... |
89366aca33522919b86ec0abda55c0e70d76c1d1014d3266509da2a8b9350707 | imdea-software/leap | Bridge.ml |
(***********************************************************************)
(* *)
LEAP
(* *)
, IMDEA ... | null | https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/system/Bridge.ml | ocaml | *********************************************************************
... |
LEAP
, IMDEA Software Institute
Copyright 2011 IMDEA Software Institute
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compl... |
55b8cbbec4f813525d29e3458e5a829d09fc0c2c8be56129acd57228a62a1542 | conreality/conreality | intent_designation.mli | (* This is free and unencumbered software released into the public domain. *)
type t =
| Unknown
| Hostile
| Neutral
| Friendly
val to_float : t -> float
val to_string : t -> string
| null | https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/consensus/model/intent_designation.mli | ocaml | This is free and unencumbered software released into the public domain. |
type t =
| Unknown
| Hostile
| Neutral
| Friendly
val to_float : t -> float
val to_string : t -> string
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.