_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 |
|---|---|---|---|---|---|---|---|---|
e1a9a7612251f95919f14497fc45e6c036bb5a47c225af2868291faf3b21b5d2 | tonymorris/fp-course | ApplicativeTest.hs | # OPTIONS_GHC -fno - warn - type - defaults #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module Course.ApplicativeTest where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (testCase, (@?=))
import Test.Tasty.QuickCheck (testPropert... | null | https://raw.githubusercontent.com/tonymorris/fp-course/73a64c3d4d0df58654a1a9a0ee9d9b11c3818911/test/Course/ApplicativeTest.hs | haskell | # OPTIONS_GHC -fno - warn - type - defaults #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
module Course.ApplicativeTest where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (testCase, (@?=))
import Test.Tasty.QuickCheck (testPropert... | |
3151861983c94743c63b5ac0e46867ad10a3bfbbbfcc171fef7881b635ecc84d | haskell/ghcide | Server.hs | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE DuplicateRecordFields #
{-# LANGUAGE RankNTypes #-}
module Development.IDE.LSP.Server
( WithMessage(..)
, PartialHandlers(..)
) where
import Data.Default
import Language.Haskell.LSP.... | null | https://raw.githubusercontent.com/haskell/ghcide/3ef4ef99c4b9cde867d29180c32586947df64b9e/src/Development/IDE/LSP/Server.hs | haskell | # LANGUAGE RankNTypes #
how to wrap a response
actual work
old notification handler
actual work
how to wrap a response
how to wrap the additional req
actual work | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE DuplicateRecordFields #
module Development.IDE.LSP.Server
( WithMessage(..)
, PartialHandlers(..)
) where
import Data.Default
import Language.Haskell.LSP.Types
import qualified Langu... |
95520e9c65a35c7dd14b1ddec6715a27368f52c5bfb3b64b2954318098d50871 | ConsenSys/constellation | Test.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE StrictData #-}
module Constellation.Enclave.Key.Test where
import Test.Tasty (TestTree, testGroup)
tests :: TestTree
tests = testGroup "Enclave.Key" []
| null | https://raw.githubusercontent.com/ConsenSys/constellation/8fcd2d38b097da5242f511d2fb2149a9764f2f7b/test/Constellation/Enclave/Key/Test.hs | haskell | # LANGUAGE StrictData # | # LANGUAGE NoImplicitPrelude #
module Constellation.Enclave.Key.Test where
import Test.Tasty (TestTree, testGroup)
tests :: TestTree
tests = testGroup "Enclave.Key" []
|
2e22fad2cc6b9c5244efef41096e93d84f70a2354b1f72c951439b4eb22260dd | erlang/otp | core_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2006 - 2023 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/compiler/test/core_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2006 - 2023 . 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(core_SUITE).
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per... |
4921d7dcffd5a1ab15bcab672958381fdbe16056f3b9c63e2fa5b764986f3f05 | elastic/runbld | vagrant.clj | (ns runbld.hosting.vagrant
(:require
[clojure.java.io :as jio]
[runbld.hosting :refer [HostingProvider]]))
(defn this-host? [facts]
(or (.exists (jio/file "/vagrant"))
(.exists (jio/file "/home/vagrant"))
(.exists (jio/file "/Users/vagrant"))))
(defrecord VagrantHosting [facts]
HostingProvider... | null | https://raw.githubusercontent.com/elastic/runbld/7afcb1d95a464dc068f95abf3ad8a7566202ce28/src/clj/runbld/hosting/vagrant.clj | clojure | (ns runbld.hosting.vagrant
(:require
[clojure.java.io :as jio]
[runbld.hosting :refer [HostingProvider]]))
(defn this-host? [facts]
(or (.exists (jio/file "/vagrant"))
(.exists (jio/file "/home/vagrant"))
(.exists (jio/file "/Users/vagrant"))))
(defrecord VagrantHosting [facts]
HostingProvider... | |
1ffdeb435335c1f5db9c92dd4f652dc3bea13b88b1a8eaa1f164794003d22b66 | nd/bird | 7.2.4.hs | Sum k * 2^k = O(n*2^n)
from Concrete Math, p.55 | null | https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch07/7.2.4.hs | haskell | Sum k * 2^k = O(n*2^n)
from Concrete Math, p.55 | |
e7310ec5584da07e7fd0e7c8cbf3ca6605bdc1ba71cdf24e750126e49e3f7b35 | kronkltd/jiksnu | actions_test.clj | (ns jiksnu.modules.core.actions-test
(:require [jiksnu.mock :as mock]
[jiksnu.modules.core.actions :as actions]
[jiksnu.test-helper :as th]
[midje.sweet :refer :all]))
(th/module-test ["jiksnu.modules.core"
"jiksnu.modules.web"])
(facts "#'jiksnu.modules.core.act... | null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/test/jiksnu/modules/core/actions_test.clj | clojure | (ns jiksnu.modules.core.actions-test
(:require [jiksnu.mock :as mock]
[jiksnu.modules.core.actions :as actions]
[jiksnu.test-helper :as th]
[midje.sweet :refer :all]))
(th/module-test ["jiksnu.modules.core"
"jiksnu.modules.web"])
(facts "#'jiksnu.modules.core.act... | |
be83e8b82ac5bda47decab8eaff50ccbcdef1e2d133d09de973053b443d63523 | MinaProtocol/mina | transaction_union_payload.ml | (* transaction_union_payload.ml *)
[%%import "/src/config.mlh"]
open Core_kernel
open Currency
[%%ifdef consensus_mechanism]
open Snark_params.Tick
[%%endif]
open Signature_lib
module Tag = Transaction_union_tag
module Body = struct
type ('tag, 'public_key, 'token_id, 'amount, 'bool) t_ =
{ tag : 'tag
... | null | https://raw.githubusercontent.com/MinaProtocol/mina/46a32b07d3d2fa57beee34e0d73d633610ecb6cf/src/lib/mina_base/transaction_union_payload.ml | ocaml | transaction_union_payload.ml
In this case,
amount - fee should be defined. In other words,
amount >= fee
For all user commands, the fee excess is just the fee.
For all user commands, the fee excess is just the fee. |
[%%import "/src/config.mlh"]
open Core_kernel
open Currency
[%%ifdef consensus_mechanism]
open Snark_params.Tick
[%%endif]
open Signature_lib
module Tag = Transaction_union_tag
module Body = struct
type ('tag, 'public_key, 'token_id, 'amount, 'bool) t_ =
{ tag : 'tag
; source_pk : 'public_key
; rec... |
a62cb4a069c8d581712d0544b540dc925121839991cd9aa0ed10423305b5ff54 | olivermg/owlisp | graph.lisp | (in-package :owlisp/cfg)
(export '(make-node
make-graph))
(defun make-node (&key content (parents '()) (children '()))
(labels ((notify-others (others exists-action add-action)
(loop
for o in others
do (when (not (funcall o exists-action #'self))
(funcall o add-action #'self))))
(notify-... | null | https://raw.githubusercontent.com/olivermg/owlisp/dbf6d1d9e813f16124c170a0e1bfe155752e017b/src/obsolete/cfg/graph.lisp | lisp | (in-package :owlisp/cfg)
(export '(make-node
make-graph))
(defun make-node (&key content (parents '()) (children '()))
(labels ((notify-others (others exists-action add-action)
(loop
for o in others
do (when (not (funcall o exists-action #'self))
(funcall o add-action #'self))))
(notify-... | |
6170326506d6e83468a2361bea11c5a9062a459c7e144318ae807f9193d2b3ac | pbrisbin/msu | Match.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module MSU.Match
( Match(..)
, matches
, matchesMaybe
)
where
import Control.Applicative ((<|>))
import Data.Aeson
import Data.Maybe (fromMaybe)
data Match a
= Any
-- ^ Always matches
| Eq a
-- ^ Matches if equal
| In [a]
... | null | https://raw.githubusercontent.com/pbrisbin/msu/ed601633422b8668e5a9d0b4b294b5525ffe7ef0/src/MSU/Match.hs | haskell | # LANGUAGE OverloadedStrings #
^ Always matches
^ Matches if equal
^ Matches if element
| Apply a @'Match'@ to get @'Bool'@
Accepts @'Maybe'@ purefuly for convenience of current use (where matches are
optional keys in JSON).
| Apply a @'Match'@ to a @'Maybe'@ to get @'Bool'@
A @'Nothing'@ always matches.
| # LANGUAGE LambdaCase #
module MSU.Match
( Match(..)
, matches
, matchesMaybe
)
where
import Control.Applicative ((<|>))
import Data.Aeson
import Data.Maybe (fromMaybe)
data Match a
= Any
| Eq a
| In [a]
instance FromJSON a => FromJSON (Match a) where
parseJSON = withObject "match op... |
8a7e263d2f66b8d890ca261827759138903d54de525c753c77dab884559120a7 | mikpe/pdp10-tools | token.erl | -*- erlang - indent - level : 2 -*-
%%%
token handling for pdp10 - elf as
Copyright ( C ) 2013 - 2020
%%%
This file is part of pdp10 - tools .
%%%
pdp10 - tools 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 Softwa... | null | https://raw.githubusercontent.com/mikpe/pdp10-tools/99216b63317fe5b5ac18f1a0d3c81b464f8b8f40/erlang/apps/as/src/token.erl | erlang |
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
FIXME: quoting | -*- erlang - indent - level : 2 -*-
token handling for pdp10 - elf as
Copyright ( C ) 2013 - 2020
This file is part of pdp10 - tools .
pdp10 - tools 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 Foundatio... |
b22c8bf0836b5d4ab7c0f675dadb4efbe26832ae89b640334eeed3979bbb20bf | sulami/spielwiese | 039-integer-right-triangles.hs | -- Integer right triangles
Problem 39
--
If p is the perimeter of a right angle triangle with integral length sides ,
{ a , b , c } , there are exactly three solutions for p = 120 .
--
{ 20,48,52 } , { 24,45,51 } , { 30,40,50 }
--
For which value of p ≤ 1000 , is the number of solutions maximised ?
--
{-# OPT... | null | https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/hEuler/039-integer-right-triangles.hs | haskell | Integer right triangles
# OPTIONS_GHC -O2 # | Problem 39
If p is the perimeter of a right angle triangle with integral length sides ,
{ a , b , c } , there are exactly three solutions for p = 120 .
{ 20,48,52 } , { 24,45,51 } , { 30,40,50 }
For which value of p ≤ 1000 , is the number of solutions maximised ?
triangle :: Int -> Int
triangle n = length $ ... |
d1b216fff835e11c72e4bd6d782f787840f0febd2229f08c57b206b830160753 | kupl/LearnML | patch.ml | type exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp)
type formula =
| True
| False
| Not of formula
| AndAlso of (formula * formula)
| OrElse of (formula * formula)
| Imply of (formula * formula)
| Equal of (exp * exp)
let rec eval_exp (a : exp) : int =
match a with
| Num n -> n
| Pl... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub58/patch.ml | ocaml | type exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp)
type formula =
| True
| False
| Not of formula
| AndAlso of (formula * formula)
| OrElse of (formula * formula)
| Imply of (formula * formula)
| Equal of (exp * exp)
let rec eval_exp (a : exp) : int =
match a with
| Num n -> n
| Pl... | |
e1a1f337407ce2a1963382f4f791da08f8eb7a50bbcebef596266df28c7101c8 | crategus/cl-cffi-gtk | gtk.list-store.lisp | ;;; ----------------------------------------------------------------------------
;;; gtk.list-store.lisp
;;;
;;; The documentation of this file is taken from the GTK 3 Reference Manual
Version 3.24 and modified to document the Lisp binding to the GTK library .
;;; See <>. The API documentation of the Lisp binding is
... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/da748ec5300141e9f07aabeeab7a9acb2b37ecf2/gtk/gtk.list-store.lisp | lisp | ----------------------------------------------------------------------------
gtk.list-store.lisp
The documentation of this file is taken from the GTK 3 Reference Manual
See <>. The API documentation of the Lisp binding is
This program is free software: you can redistribute it and/or modify
it under the terms o... | Version 3.24 and modified to document the Lisp binding to the GTK library .
available from < -cffi-gtk/ > .
Copyright ( C ) 2009 - 2011
Copyright ( C ) 2011 - 2021
as published by the Free Software Foundation , either version 3 of the
the GNU Lesser General Public License that clarifies the terms for us... |
119dd19f86fd897bacfaecb18b92d0b5efeebe3c8440201f77d933312c487c74 | typedbyte/switch | Main.hs | # LANGUAGE DataKinds #
module Main where
-- base
import Control.Monad (forM_, unless, void)
import Control.Monad.IO.Class (liftIO)
import Graphics.GPipe
GPipe - GLFW
import qualified Graphics.GPipe.Context.GLFW as GLFW
-- switch
import Device.Nintendo.Switch
import Madgwick
toV3 :: V4 a -> V3 a
toV3... | null | https://raw.githubusercontent.com/typedbyte/switch/f83ca31619cbc81ec7a7862f60543855ebbc1c85/test/Cube/Main.hs | haskell | base
switch
ack
window
cube vertices
ack
Capture button resets rotation because of sensor drift | # LANGUAGE DataKinds #
module Main where
import Control.Monad (forM_, unless, void)
import Control.Monad.IO.Class (liftIO)
import Graphics.GPipe
GPipe - GLFW
import qualified Graphics.GPipe.Context.GLFW as GLFW
import Device.Nintendo.Switch
import Madgwick
toV3 :: V4 a -> V3 a
toV3 (V4 x y z _) = V3... |
588d9ccd626f8379e2ff53336fc1b77125aa197769052e826641991830fb1549 | fstamour/breeze | server.lisp |
(in-package #:common-lisp-user)
(pushnew :hunchentoot-no-ssl *features*)
(ql:quickload 'hunchentoot)
(defpackage #:breeze.documentation-server
(:use :cl :alexandria :hunchentoot))
(in-package #:breeze.documentation-server)
(defvar *server* (make-instance 'hunchentoot:easy-acceptor :port 4242))
(start *server*)... | null | https://raw.githubusercontent.com/fstamour/breeze/8c52a797ddf664533b2533b838faa8aaf3606785/scratch-files/server.lisp | lisp | (stop *server*)
uri
path of the file
content type |
(in-package #:common-lisp-user)
(pushnew :hunchentoot-no-ssl *features*)
(ql:quickload 'hunchentoot)
(defpackage #:breeze.documentation-server
(:use :cl :alexandria :hunchentoot))
(in-package #:breeze.documentation-server)
(defvar *server* (make-instance 'hunchentoot:easy-acceptor :port 4242))
(start *server*)... |
1392e8f14b58871734b005c2321354cd3f70614657c6cf0a579a4881a5903540 | CloudI/CloudI | ranch1_transport.erl | Copyright ( c ) 2012 - 2016 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_ranch1/src/ranch1_transport.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2012 - 2016 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(ranch1_transport).
-export([sendfile/6]).
-... |
04578324ce72d5b2f413f9c89baeec2197d436d0429384e8edce000a7a94d342 | the-dr-lazy/cascade | Prelude.hs | |
Module : Cascade . Api . Network . Anatomy . Prelude
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE LONG DESCR... | null | https://raw.githubusercontent.com/the-dr-lazy/cascade/014a5589a2763ce373e8c84a211cddc479872b44/cascade-api/src/Cascade/Api/Network/Anatomy/Prelude.hs | haskell | |
Module : Cascade . Api . Network . Anatomy . Prelude
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE LONG DESCR... | |
419c2db2e9406e97a9e59188f7ac866e9f97cbe08f1f76bec3ba366cc6be6e07 | mfoemmel/erlang-otp | wxImageList.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 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 with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxImageList.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. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 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(wxImageList).
-include("wxe.hrl")... |
aee4fa59bdb365fe161e02744caba13160c3dcce971b2cc4bd96d888a04028b1 | conal/MemoTrie | MemoTrie.hs | # LANGUAGE GADTs , TypeFamilies , TypeOperators , ScopedTypeVariables , CPP #
{-# LANGUAGE StandaloneDeriving, FlexibleInstances #-}
# LANGUAGE DefaultSignatures , FlexibleContexts , LambdaCase #
# OPTIONS_GHC -Wall -fenable - rewrite - rules #
ScopedTypeVariables works around a 6.10 bug . The forall keyword is
-... | null | https://raw.githubusercontent.com/conal/MemoTrie/f0ab0340331b18cbca63c107acc78e46c8fb25c5/src/Data/MemoTrie.hs | haskell | # LANGUAGE StandaloneDeriving, FlexibleInstances #
supposed to be recognized in a RULES pragma.
--------------------------------------------------------------------
|
Module : Data.MemoTrie
License : BSD3
Maintainer :
Stability : experimental
You can automatically derive generic instance... | # LANGUAGE GADTs , TypeFamilies , TypeOperators , ScopedTypeVariables , CPP #
# LANGUAGE DefaultSignatures , FlexibleContexts , LambdaCase #
# OPTIONS_GHC -Wall -fenable - rewrite - rules #
ScopedTypeVariables works around a 6.10 bug . The forall keyword is
Copyright : ( c ) Conal Elliott 2008 - 2016
Tri... |
b0211d4dc9790148b3d4a7b853b7b68aa9c17f60951e6db79526a61ca4a21a41 | pfdietz/ansi-test | rename-file.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Thu Jan 8 06:22:53 2004
;;;; Contains: Tests for RENAME-FILE
(deftest rename-file.1
(let ((pn1 #p"file-to-be-renamed.txt")
(pn2 #p"file-that-was-renamed.txt"))
(delete-all-versions pn1)
(delete-all-versions pn2)
(with-open-file (s pn1 :direc... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/files/rename-file.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for RENAME-FILE
Error tests | Author :
Created : Thu Jan 8 06:22:53 2004
(deftest rename-file.1
(let ((pn1 #p"file-to-be-renamed.txt")
(pn2 #p"file-that-was-renamed.txt"))
(delete-all-versions pn1)
(delete-all-versions pn2)
(with-open-file (s pn1 :direction :output) (format s "Whatever~%"))
(let ((results (mu... |
7754cfef89f5da1975acfd384a6cc923d6433edd0548fca193b9e14462187347 | appositum/rola | Parser.hs | module Rola.Parser
( parseExpr
, readExpr
, Parser
) where
import Data.List (foldl1')
import Data.Void (Void)
import Rola.Syntax
import Text.Megaparsec
import Text.Megaparsec.Char
import Text.Megaparsec.Char.Lexer (de... | null | https://raw.githubusercontent.com/appositum/rola/7d733d4c586dc1c2114418510d6cbf3a1a7ac692/src/Rola/Parser.hs | haskell | module Rola.Parser
( parseExpr
, readExpr
, Parser
) where
import Data.List (foldl1')
import Data.Void (Void)
import Rola.Syntax
import Text.Megaparsec
import Text.Megaparsec.Char
import Text.Megaparsec.Char.Lexer (de... | |
2892b928d3a6322a4d3c9ab2843a134c4e2bfa17962383657e237fddd045121c | Helium4Haskell/helium | TypeSynErr.hs | module TypeSynErr where
type A a a b eenlangenaam = (a,a,c,eenlangenam)
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticerrors/TypeSynErr.hs | haskell | module TypeSynErr where
type A a a b eenlangenaam = (a,a,c,eenlangenam)
| |
95d8b6ceed90108869323b4335326fdd9f476816348ca2f0a5e835a63519e2f1 | vbrankov/hdf5-ocaml | h5a.mli | module Info : sig
type t = {
corder_valid : bool;
corder : H5o.Msg_crt_idx.t;
cset : H5t.Cset.t;
data_size : int }
end
module Iterate : sig
type 'a t = Hid.t -> string -> Info.t -> 'a -> H5_raw.Iter.t
end
external create : Hid.t -> string -> Hid.t -> ?acpl:Hid.t -> ?aapl:Hid.t -> ... | null | https://raw.githubusercontent.com/vbrankov/hdf5-ocaml/7abc763189767cd6c92620f29ce98f6ee23ba88f/src/raw/h5a.mli | ocaml | module Info : sig
type t = {
corder_valid : bool;
corder : H5o.Msg_crt_idx.t;
cset : H5t.Cset.t;
data_size : int }
end
module Iterate : sig
type 'a t = Hid.t -> string -> Info.t -> 'a -> H5_raw.Iter.t
end
external create : Hid.t -> string -> Hid.t -> ?acpl:Hid.t -> ?aapl:Hid.t -> ... | |
99396c75704b1091071db5f8b12094f607d5f5ea6f49a2875d8223c15f308b44 | ekmett/indexed | Group.hs | # LANGUAGE PolyKinds #
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
-----------------------------------------------------------------------------
-- |
-- Module : Indexed.Group
Copyright : ( C ) 2012
-- License : BSD-style (see the file LICENSE)
Maintainer : < >
-- Stability : experimen... | null | https://raw.githubusercontent.com/ekmett/indexed/331b5dd12eee9dfa89d8bf2dda18dce04030167b/src/Indexed/Group.hs | haskell | # LANGUAGE GADTs #
---------------------------------------------------------------------------
|
Module : Indexed.Group
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
Indexed groups and groupoids
------------------------------------------------------... | # LANGUAGE PolyKinds #
# LANGUAGE DataKinds #
Copyright : ( C ) 2012
Maintainer : < >
module Indexed.Group
( Group(..)
, Groupoid(..)
, IGroup(..)
) where
import Indexed.Types
import Indexed.Monoid
import Data.Monoid
class Monoid m => Group m where
inv :: m -> m
class Cat k => Groupoid k ... |
50a8a8953fea1ca9d89ca2fdbd7fd2ac53ac8af8eb8f0e2e9e684902318977ff | jellelicht/guix | apr.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2014 , 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundat... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/apr.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
Copyright © 2014 , 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages apr)
#:use-module ((guix licenses) #:prefix l:)
... |
ad17bba6f93b9c3284d24e8d0f4b74a2d9455674691306cb3c622ca7718e1937 | ocaml-flambda/ocaml-jst | emitcode.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/1bb6c797df7c63ddae1fc2e6f403a0ee9896cc8e/bytecomp/emitcode.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Generation of bytecode for .cmo files
open Cmo_format
open Instruct
val to_file: out_channel -> Compi... |
248e3d6c51135b6b2a684ff71a05920bf8df67a815d7fd0805fbce5a84f5171f | lowasser/TrieMap | SetOp.hs | # LANGUAGE CPP , BangPatterns , ViewPatterns , FlexibleInstances #
{-# OPTIONS -O -fspec-constr -fliberate-case -fstatic-argument-transformation #-}
module Data.TrieMap.RadixTrie.SetOp () where
import Control.Monad.Option
import Data.TrieMap.RadixTrie.Base
import Data.TrieMap.RadixTrie.Search ()
import Prelude hidin... | null | https://raw.githubusercontent.com/lowasser/TrieMap/1ab52b8d83469974a629f2aa577a85de3f9e867a/Data/TrieMap/RadixTrie/SetOp.hs | haskell | # OPTIONS -O -fspec-constr -fliberate-case -fstatic-argument-transformation # | # LANGUAGE CPP , BangPatterns , ViewPatterns , FlexibleInstances #
module Data.TrieMap.RadixTrie.SetOp () where
import Control.Monad.Option
import Data.TrieMap.RadixTrie.Base
import Data.TrieMap.RadixTrie.Search ()
import Prelude hiding (lookup)
#define V(f) f (VVector) (k)
#define U(f) f (PVector) (Word)
#define E... |
c1e7ee7ebb64ce75c387a6beb42294eece711412a7844f47de039f98ed6ee377 | MLstate/opalang | baseSet.mli |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/baseSet.mli | ocaml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | |
95d781f68ceb452f5062420805a5769fbea46605c53e012591ff3723ade2c179 | GillianPlatform/Gillian | JSILSMemory.ml | open Gillian
open Gillian.Gil_syntax
open Javert_utils
open Js2jsil_lib
module GAsrt = Asrt
module SSubst = Gillian.Symbolic.Subst
module L = Logging
module SVal = Gillian.Symbolic.Values
module PFS = Gillian.Symbolic.PureContext
module TypEnv = Gillian.Symbolic.TypEnv
open Gillian.Logic
module M = struct
type init_... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/06739278bc266d218c1516d4c8e670b4edff9041/Gillian-JS/lib/Semantics/JSILSMemory.ml | ocaml | * Errors
Perhaps we are looking for metadata?
We don't maintain any context
failing_constraint
Cases in which the prop exists
I need the case in which the prop does not exist
TODO: This probably needs to be a bit more sophisticated
Expected dom - dom
if dom_diff' != {} then we have to put the excess pr... | open Gillian
open Gillian.Gil_syntax
open Javert_utils
open Js2jsil_lib
module GAsrt = Asrt
module SSubst = Gillian.Symbolic.Subst
module L = Logging
module SVal = Gillian.Symbolic.Values
module PFS = Gillian.Symbolic.PureContext
module TypEnv = Gillian.Symbolic.TypEnv
open Gillian.Logic
module M = struct
type init_... |
15938b932764cc1ce4fdc2e3ea6df2e5e86abd690c1baf040a9f1be57d2cbc31 | dradtke/Lisp-Text-Editor | accel-group.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; accel-group -- GtkAccelGroup
;;;
Copyright ( C ) 2007 , < >
;;;
(in-package :gtk-cffi)
(defclass accel-group (object)
())
(defbitfield accel-flags
:visible :locked)
(defcfun "gtk_accel_group_new" :pointer)
(defmethod gconstructor ((accel-group accel-... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/gtk-cffi-20120208-cvs/gtk/accel-group.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
accel-group -- GtkAccelGroup
| Copyright ( C ) 2007 , < >
(in-package :gtk-cffi)
(defclass accel-group (object)
())
(defbitfield accel-flags
:visible :locked)
(defcfun "gtk_accel_group_new" :pointer)
(defmethod gconstructor ((accel-group accel-group) &key &allow-other-keys)
(gtk-accel-group-new))
(defcfun gtk-accel-group-connect :v... |
ab32242a3c66c5000a254f4c09b475afcbfb689971b0149c10ac2e18405a4515 | ndmitchell/catch | MonadFail2.hs |
module MonadFail2 where
main = putChar 'a' `bind` putChar 'b'
bind :: Monad m => m a -> m b -> m b
bind a b = a >> b
| null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/examples/Example/MonadFail2.hs | haskell |
module MonadFail2 where
main = putChar 'a' `bind` putChar 'b'
bind :: Monad m => m a -> m b -> m b
bind a b = a >> b
| |
fe55530935b52e777799883862a6776ac27caa16da73a1d24f85f0872d7dccb9 | ktakashi/r7rs-postgresql | copy.scm | ;; example how to do copy data.
(import (scheme base)
(scheme write)
(postgresql))
(define conn (make-postgresql-connection
"localhost" "5432" #f "postgres" "postgres"))
(define (print . args) (for-each display args) (newline))
(postgresql-open-connection! conn)
(postgresql-login! conn)
(guard (e (else #... | null | https://raw.githubusercontent.com/ktakashi/r7rs-postgresql/94fdaeccee6caa5e9562a8f231329e59ce15aae7/copy.scm | scheme | example how to do copy data. |
(import (scheme base)
(scheme write)
(postgresql))
(define conn (make-postgresql-connection
"localhost" "5432" #f "postgres" "postgres"))
(define (print . args) (for-each display args) (newline))
(postgresql-open-connection! conn)
(postgresql-login! conn)
(guard (e (else #t)) (postgresql-execute-sql! con... |
7f6491e869e80e0add31823a9affe4f2a9ffde2fbc129efa4ca0284bf95fdf31 | jrclogic/SMCDEL | CoinFlip.hs | module SMCDEL.Examples.CoinFlip where
import Data.Map.Strict (fromList)
import Data.List ((\\))
import SMCDEL.Language
import SMCDEL.Symbolic.S5 (boolBddOf)
import SMCDEL.Symbolic.K
coinStart :: BelScene
coinStart = (BlS [P 0] law obs, actual) where
law = boolBddOf (PrpF $ P 0)
obs = fromList [ ("a", allsa... | null | https://raw.githubusercontent.com/jrclogic/SMCDEL/10bd5ba2f1f3cc85e4b0f23d5eddbb26f05df5bf/src/SMCDEL/Examples/CoinFlip.hs | haskell | module SMCDEL.Examples.CoinFlip where
import Data.Map.Strict (fromList)
import Data.List ((\\))
import SMCDEL.Language
import SMCDEL.Symbolic.S5 (boolBddOf)
import SMCDEL.Symbolic.K
coinStart :: BelScene
coinStart = (BlS [P 0] law obs, actual) where
law = boolBddOf (PrpF $ P 0)
obs = fromList [ ("a", allsa... | |
4cdd7a595285a650d0aafd5b3a32f92d86b230100c5cd512e8ff24e25b12091e | sgimenez/laby | version.mli |
* Copyright ( C ) 2007 - 2014 The laby team
* You have permission to copy , modify , and redistribute under the
* terms of the GPL-3.0 . For full license terms , see gpl-3.0.txt .
* Copyright (C) 2007-2014 The laby team
* You have permission to copy, modify, and redistribute under the
* terms of the GPL... | null | https://raw.githubusercontent.com/sgimenez/laby/47f9560eb827790d26900bb553719afb4b0554ea/src/version.mli | ocaml |
* Copyright ( C ) 2007 - 2014 The laby team
* You have permission to copy , modify , and redistribute under the
* terms of the GPL-3.0 . For full license terms , see gpl-3.0.txt .
* Copyright (C) 2007-2014 The laby team
* You have permission to copy, modify, and redistribute under the
* terms of the GPL... | |
9572bff2048858a17ead5fc28455438dc2626e9aa87e43d5850efdb3fe6f27b1 | bennn/dissertation | ocm-struct.rkt | #lang typed/racket/base
(provide
(struct-out $ocm)
set-$ocm-tentative!
set-$ocm-min-entrys!
set-$ocm-min-row-indices!
set-$ocm-finished!
set-$ocm-base!
)
;; =============================================================================
(struct $ocm
([min-entrys : (Vectorof Entry-Type)]
[min-row-indic... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/quadT/typed/ocm-struct.rkt | racket | =============================================================================
----------------------------------------------------------------------------- | #lang typed/racket/base
(provide
(struct-out $ocm)
set-$ocm-tentative!
set-$ocm-min-entrys!
set-$ocm-min-row-indices!
set-$ocm-finished!
set-$ocm-base!
)
(struct $ocm
([min-entrys : (Vectorof Entry-Type)]
[min-row-indices : (Vectorof (U Index-Type No-Value-Type))]
[finished : Finished-Value-Type]... |
8530a94603525125a0efac84fcaac1a59ef71d0fd08272fe4e812ee1bc8b3b12 | diagrams/diagrams-lib | ThreeD.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
-----------------------------------------------------------------------------
-- |
-- Module : Diagrams.ThreeD
Copyright : ( c ) 2013 - 2015 diagrams - lib team ( see LICENSE )
-- License : B... | null | https://raw.githubusercontent.com/diagrams/diagrams-lib/6f66ce6bd5aed81d8a1330c143ea012724dbac3c/src/Diagrams/ThreeD.hs | haskell | # LANGUAGE TypeFamilies #
# LANGUAGE TypeSynonymInstances #
---------------------------------------------------------------------------
|
Module : Diagrams.ThreeD
License : BSD-style (see LICENSE)
Maintainer :
functionality from a group of more specific modules:
space and various syste... | # LANGUAGE FlexibleContexts #
Copyright : ( c ) 2013 - 2015 diagrams - lib team ( see LICENSE )
This module defines the three - dimensional vector space R^3 ,
three - dimensional transformations , and various predefined
three - dimensional shapes . This module re - exports useful
* " Diagrams . ... |
437f4667a55411d35a7b48ceffaa636ebc264829282de14492fcf4c2e1999e71 | shentufoundation/deepsea | Semantics2.mli | open AST
open BinNums
open Cop
open Coqlib
open Datatypes
open Globalenvs
open Integers
open Labels
open List0
open LowValues
open MachineModel
open Maps0
open PeanoNat
open Specif
open StmtExpressionless
val code_labels : code -> label list
val function_labels : coq_function -> label list
val genv_list_labels : gen... | null | https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/backend/extraction/Semantics2.mli | ocaml | open AST
open BinNums
open Cop
open Coqlib
open Datatypes
open Globalenvs
open Integers
open Labels
open List0
open LowValues
open MachineModel
open Maps0
open PeanoNat
open Specif
open StmtExpressionless
val code_labels : code -> label list
val function_labels : coq_function -> label list
val genv_list_labels : gen... | |
dc9f04f3f7633065bd5ae14a7902dcb1350c0c8f576ce4b80d314214d98b112b | tarides/ocaml-jit | rwo_segfault.ml | module List = ListLabels
;;
type 'a expr =
| Base of 'a
| Const of bool
| And of 'a expr list
| Or of 'a expr list
| Not of 'a expr
;;
let rec eval expr base_eval =
(* a shortcut, so we don't need to repeatedly pass [base_eval]
explicitly to [eval] *)
let eval' expr = eval expr base_e... | null | https://raw.githubusercontent.com/tarides/ocaml-jit/fe2fce1a5bb89acf5f7239917f6098d53c2c14ec/tests/rwo_segfault.ml | ocaml | a shortcut, so we don't need to repeatedly pass [base_eval]
explicitly to [eval] | module List = ListLabels
;;
type 'a expr =
| Base of 'a
| Const of bool
| And of 'a expr list
| Or of 'a expr list
| Not of 'a expr
;;
let rec eval expr base_eval =
let eval' expr = eval expr base_eval in
match expr with
| Base base -> base_eval base
| Const bool -> bool
| And... |
8b09a0c0963dc46f47d8dc453aa9fb435f03228cf9b71ce52284add5d5effb86 | damballa/parkour | conf.clj | (ns parkour.conf
(:refer-clojure :exclude [assoc! get])
(:require [clojure.string :as str]
[clojure.reflect :as reflect]
[parkour.util :refer [returning]]
[parkour.util.shutdown :as shutdown])
(:import [java.io Writer]
[java.util List Map Set]
[org.apache.... | null | https://raw.githubusercontent.com/damballa/parkour/2b3c5e1987e18b4c4284dfd4fcdaba267a4d7fbc/src/clojure/parkour/conf.clj | clojure | (ns parkour.conf
(:refer-clojure :exclude [assoc! get])
(:require [clojure.string :as str]
[clojure.reflect :as reflect]
[parkour.util :refer [returning]]
[parkour.util.shutdown :as shutdown])
(:import [java.io Writer]
[java.util List Map Set]
[org.apache.... | |
2685f306b87b183dc9efe57a9ea459331ec1ce8ae754f1bf01b73d3252b54ab8 | zadean/xqerl | xs_normalizedString_SUITE.erl | -module('xs_normalizedString_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['cbcl-normalizedstring-001'/1]).
-export(['cbcl-normalizedstring-002'/1]).
... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/xs/xs_normalizedString_SUITE.erl | erlang | -module('xs_normalizedString_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['cbcl-normalizedstring-001'/1]).
-export(['cbcl-normalizedstring-002'/1]).
... | |
d9d77f19ebfafd2caed38535f85831f1569d8a3155021f7d6954810bd24646b9 | andreasabel/helf | HeredNormVal.hs | {-
Values are always in beta normal form.
We use hereditary substitution.
-}
# LANGUAGE OverlappingInstances , IncoherentInstances , UndecidableInstances ,
PatternGuards , TupleSections #
PatternGuards, TupleSections #-}
module HeredNormVal where
import Prelude hiding (pi,abs,mapM,lookup)
import Control.M... | null | https://raw.githubusercontent.com/andreasabel/helf/b0f9a48598012af4ab8459b94cd0de90553b5b7b/src/HeredNormVal.hs | haskell |
Values are always in beta normal form.
We use hereditary substitution.
import Concrete (Name as CName)
import Context
* beta-normal values
}
}-> Head
}
constant Lambda
NDontCare -> error "Cannot view DontCare Value"
* smart constructors
* environment handling
see MapEnv.hs
* evaluation
reify v = fa... |
# LANGUAGE OverlappingInstances , IncoherentInstances , UndecidableInstances ,
PatternGuards , TupleSections #
PatternGuards, TupleSections #-}
module HeredNormVal where
import Prelude hiding (pi,abs,mapM,lookup)
import Control.Monad.Reader hiding (mapM)
import Control.Applicative hiding (empty)
import Co... |
aeee1dd3026f9fa3fe477f1e0a280891ce5565f9baa32e36e067cf746c6f4955 | yesodweb/wai | Internal.hs | # OPTIONS_GHC -fno - warn - deprecations #
module Network.Wai.Handler.Warp.Internal (
-- * Settings
Settings (..)
, ProxyProtocol(..)
-- * Low level run functions
, runSettingsConnection
, runSettingsConnectionMaker
, runSettingsConnectionMakerSecure
, Transport (..)
-- * Connection
, Conne... | null | https://raw.githubusercontent.com/yesodweb/wai/3887d7c51db18ea28d42efafe3dd17f34ff9cb6d/warp/Network/Wai/Handler/Warp/Internal.hs | haskell | * Settings
* Low level run functions
* Connection
** Receive
** Buffer
** Sendfile
* Version
* Data types
* Time out manager
|
In order to provide slowloris protection, Warp provides timeout handlers. We
follow these rules:
* A timeout is created when a connection is opened.
* When all request headers ... | # OPTIONS_GHC -fno - warn - deprecations #
module Network.Wai.Handler.Warp.Internal (
Settings (..)
, ProxyProtocol(..)
, runSettingsConnection
, runSettingsConnectionMaker
, runSettingsConnectionMakerSecure
, Transport (..)
, Connection (..)
, socketConnection
, Recv
, RecvBuf
, Buffer
, Buf... |
c27b611d94774991c44f0642c65dfb06cc44c207a591c4590fb0bcc677df3124 | haskus/haskus-system | Input.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE ScopedTypeVariables #
module Haskus.System.Linux.Internals.Input
( Property (..)
, EventType (..)
, SyncEventType (..)
... | null | https://raw.githubusercontent.com/haskus/haskus-system/38b3a363c26bc4d82e3493d8638d46bc35678616/haskus-system/src/lib/Haskus/System/Linux/Internals/Input.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveDataTypeable #
=============================================================
From linux/include/uapi/linux/input-event-codes.h
and linux/Documentation/input/event-codes.txt
=============================================================
| Device properties and quir... | # LANGUAGE DeriveGeneric #
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
# LANGUAGE TemplateHaskell #
# LANGUAGE ScopedTypeVariables #
module Haskus.System.Linux.Internals.Input
( Property (..)
, EventType (..)
, SyncEventType (..)
, KeyEventType (..)
, Key (..)
, RelativeAxe (..)
, Absolut... |
0afd54859c64c74bf5cbd205ed80b5276903ea887f27660bb7ce6e19d4fbe41d | pgj/mirage-kfreebsd | echoserver2.ml | open Lwt (* provides >>= and join *)
provides Time , Console and Main
let map f m_in =
let m_out = Lwt_mvar.create_empty () in
let rec map_h () =
Lwt_mvar.take m_in >>=
f >>= fun b ->
Lwt_mvar.put m_out b >>
map_h () in
(* t is left unused in this implementation, but should really be
retu... | null | https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-test/regress/lwt/echoserver2.ml | ocaml | provides >>= and join
t is left unused in this implementation, but should really be
returned and used to cancel the thread when no longer needed.
this t is also left unused but shoule be returned
this t is also left unused but shoule be returned
define mailboxes
define loops
starts loops | provides Time , Console and Main
let map f m_in =
let m_out = Lwt_mvar.create_empty () in
let rec map_h () =
Lwt_mvar.take m_in >>=
f >>= fun b ->
Lwt_mvar.put m_out b >>
map_h () in
let t = map_h () in
m_out
let split ab =
let ma = Lwt_mvar.create_empty () in
let mb = Lwt_mvar.create_e... |
bad167346efd0fe4813f0f650a93a1c2070fb17339369638975f762963c0e72d | AshleyYakeley/Truth | ScopeBuilder.hs | module Pinafore.Language.Grammar.Interpret.ScopeBuilder
( ScopeBuilder
, runScopeBuilder
, Docs
, exposeDocs
, sourcePosScopeBuilder
, interpScopeBuilder
, refScopeBuilder
, pureScopeBuilder
, allocateVarScopeBuilder
) where
import Pinafore.Language.DefDoc
import Pinafore.Langua... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/53900d89022f68bffb08d5c07b4e783ab0a0542e/Pinafore/pinafore-language/lib/Pinafore/Language/Grammar/Interpret/ScopeBuilder.hs | haskell | > ScopeBuilder | module Pinafore.Language.Grammar.Interpret.ScopeBuilder
( ScopeBuilder
, runScopeBuilder
, Docs
, exposeDocs
, sourcePosScopeBuilder
, interpScopeBuilder
, refScopeBuilder
, pureScopeBuilder
, allocateVarScopeBuilder
) where
import Pinafore.Language.DefDoc
import Pinafore.Langua... |
dc8c21854ace93d2492af127cbbbce30071e10693ecea693a1184845298e45a4 | alephcloud/hs-configuration-tools | Maybe.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UnicodeSyntax #
# OPTIONS_GHC -fno - warn - orphans #
-- |
-- Module: Configuration.Utils.Maybe
-- Description: Configuration of Optional Values
Copyright : Copyright © 2015 PivotCloud , Inc.
... | null | https://raw.githubusercontent.com/alephcloud/hs-configuration-tools/987cc513206b76ad9e7426c33713a659d28229ae/src/Configuration/Utils/Maybe.hs | haskell | |
Module: Configuration.Utils.Maybe
Description: Configuration of Optional Values
Stability: experimental
This module provides tools for defining Maybe configuration types.
* Simple Maybe Values
$simplemaybe
* Record Maybe Values
$recordmaybe
-----------------------------------------------------------------... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UnicodeSyntax #
# OPTIONS_GHC -fno - warn - orphans #
Copyright : Copyright © 2015 PivotCloud , Inc.
License : MIT
Maintainer : < >
module Configuration.Utils.Maybe
(
maybeOption
) wh... |
70df482762542ac49055c7b888fb5d138239278028ae79ead0666133b366849a | cardmagic/lucash | finite-type.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
; Finite types (i.e. record types with a fixed set of elements).
;
; An enumeration is really a special case of a finite type.
;
; (define-finite-type <id and dispatch-macro>
; <type name>
; (<constructor field name> ...)
; <predicate>
; <vector of ... | null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scheme/big/finite-type.scm | scheme | Finite types (i.e. record types with a fixed set of elements).
An enumeration is really a special case of a finite type.
(define-finite-type <id and dispatch-macro>
<type name>
(<constructor field name> ...)
<predicate>
<vector of elements>
<name accessor>
<index accessor>
(<field name> <field... | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
( maker < element name > 1 < constructor field value > )
where DEFINE - DISPATCH - MACRO defines an ENUM - like dispatcher .
( c ' )
(define-syntax define-finite-type
(lambda (form rename compare)
(let ((destruct (lambda (proc)
... |
374f2fb57f31076ec87a91f7620b120d33877122243c19ee2a7ec0de06e540bd | CryptoKami/cryptokami-core | TypesSpec.hs | # LANGUAGE ScopedTypeVariables #
module Test.Pos.Slotting.TypesSpec
( spec
) where
import Universum
import Test.Hspec (Spec, describe, it, shouldBe, shouldSatisfy)
import Data.Map
import Data.Maybe (isJust, isNothing)
import Data.Time.Units (Millisecond, Sec... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lib/test/Test/Pos/Slotting/TypesSpec.hs | haskell | --------------------------------------------------------------------------
Test data
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Unit tests
------------------------------------------------------------------------... | # LANGUAGE ScopedTypeVariables #
module Test.Pos.Slotting.TypesSpec
( spec
) where
import Universum
import Test.Hspec (Spec, describe, it, shouldBe, shouldSatisfy)
import Data.Map
import Data.Maybe (isJust, isNothing)
import Data.Time.Units (Millisecond, Sec... |
b455b8a01fdf8e2eb552e61132f1edb7f2bf80bf12b42612063d425d11756c9c | kudu-dynamics/blaze | FcmpLeOp.hs | module Blaze.Types.Pil.Op.FcmpLeOp where
-- This module is generated. Please use app/gen_pil_ops/Main.hs to modify.
import Blaze.Prelude
data FcmpLeOp expr = FcmpLeOp
{ left :: expr
, right :: expr
} deriving (Eq, Ord, Show, Functor, Foldable, Traversable, Generic, FromJSON, ToJSON)
instance Hashable a => Has... | null | https://raw.githubusercontent.com/kudu-dynamics/blaze/a385bb3b37a0a0e061217ebdd70dd0eecbb20332/src/Blaze/Types/Pil/Op/FcmpLeOp.hs | haskell | This module is generated. Please use app/gen_pil_ops/Main.hs to modify. | module Blaze.Types.Pil.Op.FcmpLeOp where
import Blaze.Prelude
data FcmpLeOp expr = FcmpLeOp
{ left :: expr
, right :: expr
} deriving (Eq, Ord, Show, Functor, Foldable, Traversable, Generic, FromJSON, ToJSON)
instance Hashable a => Hashable (FcmpLeOp a)
|
b328aebe315c073fbae243e84b27ec96a89ec76f99222e3fcad896413ba8cd0a | mhuebert/yawn | sci_config.cljc | (ns yawn.sci-config
(:require [applied-science.js-interop]
[sci.core :as sci]
[yawn.convert :as convert]
[yawn.hooks]
[yawn.react]
[yawn.view :as v]))
(defn ^:macro defview
"Defines view function."
[_ _ name & args]
(v/defview:impl name args))
(def v... | null | https://raw.githubusercontent.com/mhuebert/yawn/ac5059c7428300136e125104edd6a05b3c18382c/src/main/yawn/sci_config.cljc | clojure | (ns yawn.sci-config
(:require [applied-science.js-interop]
[sci.core :as sci]
[yawn.convert :as convert]
[yawn.hooks]
[yawn.react]
[yawn.view :as v]))
(defn ^:macro defview
"Defines view function."
[_ _ name & args]
(v/defview:impl name args))
(def v... | |
62622f0575cd045c2dd3e4dbb6d4dd7291408093a2c82ba2c0d2c2034e3f4d18 | erlang/otp | ssl_session.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2007 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/624a967f15d607416f51c61a4d0d70bf754cc222/lib/ssl/src/ssl_session.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2007 - 2022 . 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(ssl_session).
-include("ssl_handshake.hrl").
-include("ssl_internal.hrl").
-include("ssl_api.hrl").
Int... |
da025fc493be11e2dac043bfbf48df31ed77e3a1f1896e50c31a1fb1448a7eb1 | Convex-Dev/convex-web | markdown.cljs | (ns convex-web.site.markdown
(:require
[clojure.string :as str]
[convex-web.site.gui :as gui]
[convex-web.site.backend :as backend]
[reagent.core :as reagent]))
(defn MarkdownPage [_ {:keys [scroll-to markdown]} _]
(reagent/with-let [nodes-ref (reagent/atom nil)
... | null | https://raw.githubusercontent.com/Convex-Dev/convex-web/3ef3a73eb9b381d1aa82f93d229687ffed2e8396/src/main/clojure/convex_web/site/markdown.cljs | clojure | -- Markdown
This code is copied from Reitit:
-- On this page | (ns convex-web.site.markdown
(:require
[clojure.string :as str]
[convex-web.site.gui :as gui]
[convex-web.site.backend :as backend]
[reagent.core :as reagent]))
(defn MarkdownPage [_ {:keys [scroll-to markdown]} _]
(reagent/with-let [nodes-ref (reagent/atom nil)
... |
7eac3bdcf76e58456ffb8867d3b5f6ab39b5fa9ede3aa2b4fd18a2dc59085687 | ethereum/act | safemathraw.act.parsed.hs | [Transition (AlexPn 0 1 1) "add" "SafeAdd" add(uint256 x, uint256 y) [IffIn (AlexPn 62 4 1) uint256 [EAdd (AlexPn 90 6 7) (EUTEntry (AlexPn 88 6 5) "x" []) (EUTEntry (AlexPn 92 6 9) "y" [])],Iff (AlexPn 95 8 1) [EEq (AlexPn 114 10 15) (EnvExp (AlexPn 104 10 5) Callvalue) (IntLit (AlexPn 117 10 18) 0)]] (Direct (Post []... | null | https://raw.githubusercontent.com/ethereum/act/36b65b71eea22ebe4287f066190ecf47f4394fa3/tests/frontend/pass/safemath/safemathraw.act.parsed.hs | haskell | [Transition (AlexPn 0 1 1) "add" "SafeAdd" add(uint256 x, uint256 y) [IffIn (AlexPn 62 4 1) uint256 [EAdd (AlexPn 90 6 7) (EUTEntry (AlexPn 88 6 5) "x" []) (EUTEntry (AlexPn 92 6 9) "y" [])],Iff (AlexPn 95 8 1) [EEq (AlexPn 114 10 15) (EnvExp (AlexPn 104 10 5) Callvalue) (IntLit (AlexPn 117 10 18) 0)]] (Direct (Post []... | |
dde7cb6203461c1eb19760b539fbc383a3f6d18f7831635956badc90c5634f7d | sky-big/RabbitMQ | pmon.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/src/pmon.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
===============... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2011 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
4bed9a1332039b4b1455d44dcb9c3c31cae8dec47e2d7d4d05acf23a10bc3401 | manuel-serrano/hop | js_out.scm | ;*=====================================================================*/
* serrano / prgm / project / hop/2.5.x / scheme2js / js_out.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/scheme2js/js_out.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* This file is part of Scheme2JS/HOP. */
*===========================... | * serrano / prgm / project / hop/2.5.x / scheme2js / js_out.scm * /
* Author : * /
* Creation : 2007 - 11 * /
* Last change : Thu Jul 18 13:41:32 2013 ( serrano ) * /
* Copyr... |
ca6fa20f59fb81d6a8c514188101f19bdbc593910734f9fd183aec8e9d35207e | dramforever/finlog | DAG.hs | { - # LANGUAGE TemplateHaskell # - }
{-# LANGUAGE DeriveAnyClass #-}
module Finlog.Framework.DAG where
import Control.Monad.Free
import Data.Foldable
import qualified Data.HashMap.Strict as HM
import qualified Data.HashSet as HS
import Data.Hashable
import qualified Data.Text as T
impo... | null | https://raw.githubusercontent.com/dramforever/finlog/ca642dfa7ea89b131ab13b6b267fabf317e12d9c/src/Finlog/Framework/DAG.hs | haskell | # LANGUAGE DeriveAnyClass #
Avoid Template Haskell to speed up compilation
# INLINE revMap #
# INLINE revMap # | { - # LANGUAGE TemplateHaskell # - }
module Finlog.Framework.DAG where
import Control.Monad.Free
import Data.Foldable
import qualified Data.HashMap.Strict as HM
import qualified Data.HashSet as HS
import Data.Hashable
import qualified Data.Text as T
import Finlog.Utils.Unique... |
7d930ca7c979f8043f161b235ed66b1f1d30c1933fccba4fa8f8d5830f402d39 | argp/bap | cfg_ssa.ml |
Static Single Assignment translation
@author
Static Single Assignment translation
@author Ivan Jager
*)
open Big_int_Z
open Big_int_convenience
open Util
open Ssa
open Cfg
open Type
open BatListFull
module D = Debug.Make(struct let name = "Cfg_ssa" and default=`NoDebug end)
open D
module VH... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/cfg_ssa.ml | ocaml | A translation context (for translating to SSA)
Called to add a let variable to the context
FIXME: We didn't used to add these to to_oldvar, do we want to now?
VH.add to_oldvar v' v
Called to remove a let variable from the context
share the strings in the variable names we create, to save memory
@return a r... |
Static Single Assignment translation
@author
Static Single Assignment translation
@author Ivan Jager
*)
open Big_int_Z
open Big_int_convenience
open Util
open Ssa
open Cfg
open Type
open BatListFull
module D = Debug.Make(struct let name = "Cfg_ssa" and default=`NoDebug end)
open D
module VH... |
33b1243c93aefc1f94a28f24ee93cec7a1e787dc8663463fc7c955675ad3345b | bmeurer/ocaml-arm | config.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/utils/config.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
val version: string
val stan... |
84202288cf0c081da36d2f2fb7a9c602756fb4371249a3b02dad8a5bf41417d9 | LaurentMazare/ocaml-jupyter-async | setup.ml | open! Core
open! Async
module Msg = Jupyter_async_message.Message
module Config = struct
type t =
{ control_port : int
; shell_port : int
; transport : string
; signature_scheme : string
; stdin_port : int
; hb_port : int
; ip : string
; iopub_port : int
; key : string
}
[@@... | null | https://raw.githubusercontent.com/LaurentMazare/ocaml-jupyter-async/c7a4e237c108ffa8be9ccfe560ff4758ff6bf74c/tests/setup.ml | ocaml | Subscribe to all topics. | open! Core
open! Async
module Msg = Jupyter_async_message.Message
module Config = struct
type t =
{ control_port : int
; shell_port : int
; transport : string
; signature_scheme : string
; stdin_port : int
; hb_port : int
; ip : string
; iopub_port : int
; key : string
}
[@@... |
81a85a66b98ef373c70ab49a3b2b00edb5d6ced10d02802b31c8b70c76b836d5 | ksseono/the-joy-of-clojure | udp.clj | (ns joy.udp
(:refer-clojure :exclude [get]))
(defn beget [this proto]
(assoc this ::prototype proto))
(defn get [m k]
(when m
(if-let [[_ v] (find m k)]
v
(recur (::prototype m) k))))
(def put assoc)
(comment
(beget {:sub 0} {:super 1})
= > { : sub 0 , : joy.udp/prototype { : super 1 } }
... | null | https://raw.githubusercontent.com/ksseono/the-joy-of-clojure/4fee3fb2750236b85b59ae9d7a83e0929040e4f0/src/clj/ch09/joy/udp.clj | clojure |
cat
=> true
=> true
=> nil
=> true
compiler
=> "cc"
=> "clang"
=> "/home"
=> "/Users"
=> #{:joy.udp/unix}
=> #{:joy.udp/unix}
=> true
=> false
'home' match dispatch value: :joy.udp/osx -> :joy.udp/bsd and
:joy.udp/unix, and neither is preferred
=> "/Users"
=> "/Users"
=> {:parents {:joy.udp/osx #{:joy.udp/uni... | (ns joy.udp
(:refer-clojure :exclude [get]))
(defn beget [this proto]
(assoc this ::prototype proto))
(defn get [m k]
(when m
(if-let [[_ v] (find m k)]
v
(recur (::prototype m) k))))
(def put assoc)
(comment
(beget {:sub 0} {:super 1})
= > { : sub 0 , : joy.udp/prototype { : super 1 } }
... |
9848af4eb05caa48c9e3252a046fc70147554013c794853d0e4c75fd4771f167 | cyverse-archive/DiscoveryEnvironmentBackend | directory.clj | (ns donkey.services.filesystem.directory
(:use [clojure-commons.validators]
[kameleon.uuids :only [uuidify]]
[slingshot.slingshot :only [try+ throw+]])
(:require [clojure.tools.logging :as log]
[clojure.string :as string]
[cemerick.url :as url]
[cheshire.core :as ... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/Donkey/src/donkey/services/filesystem/directory.clj | clojure | (ns donkey.services.filesystem.directory
(:use [clojure-commons.validators]
[kameleon.uuids :only [uuidify]]
[slingshot.slingshot :only [try+ throw+]])
(:require [clojure.tools.logging :as log]
[clojure.string :as string]
[cemerick.url :as url]
[cheshire.core :as ... | |
4fe73e39e6103f84ce4530bf86239cc2f4738fefb2c0923dbce03a061385ba29 | haskell-webgear/webgear | Static.hs | {- |
Handlers for serving static resources
-}
module WebGear.Core.Handler.Static (
serveDir,
serveFile,
) where
import Control.Arrow ((<<<))
import Control.Exception.Safe (catchIO)
import Control.Monad.IO.Class (MonadIO (..))
import qualified Data.ByteString.Lazy as LBS
import qualified Data.Text as Text
import q... | null | https://raw.githubusercontent.com/haskell-webgear/webgear/3c6d6307c650ce573226a216256948256ca27c4b/webgear-core/src/WebGear/Core/Handler/Static.hs | haskell | |
Handlers for serving static resources
| Serve files under the specified directory.
| The directory to serve
response will be returned for requests to the root path if this | module WebGear.Core.Handler.Static (
serveDir,
serveFile,
) where
import Control.Arrow ((<<<))
import Control.Exception.Safe (catchIO)
import Control.Monad.IO.Class (MonadIO (..))
import qualified Data.ByteString.Lazy as LBS
import qualified Data.Text as Text
import qualified Network.Mime as Mime
import System.Fil... |
8a850586d77864c68f6f930106bd93e3865ecd5e966f9bcdaeafddc4d3e9e5b5 | mathematical-systems/clml | zaxpy.lisp | ;;; Compiled by f2cl version:
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:0... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/blas/zaxpy.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t)
(:relaxed-array-decls t) (:coerce-assigns :as-needed)
(:array-type ':array) (:array-slicing t)
(:declare-common nil) (:float-format double-float)) | ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ "
" $ I d :... |
def00bfaf56187095df02f669e035a582f376e962772ea64d6518225e434bb9a | ixmatus/prizm | Blending.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module HUnit.Blending (tests) where
import Data.Convertible
import Data.Prizm.Color
import Data.Prizm.Color.CIE as CIE
import Test.Framework (Test)
import Test.Framework.Pr... | null | https://raw.githubusercontent.com/ixmatus/prizm/8baceff70b44a14bc67bac9efdd5270620567cec/tests/HUnit/Blending.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
module HUnit.Blending (tests) where
import Data.Convertible
import Data.Prizm.Color
import Data.Prizm.Color.CIE as CIE
import Test.Framework (Test)
import Test.Framework.Providers.HUnit as HUnit
import ... |
953961013d5c6cb68bf007f803d5c603ea7c9ec353de2f437829eba290738cb0 | gelisam/giggles-is-you | GLFW.hs | {-# OPTIONS_HADDOCK hide #-}
# LANGUAGE CPP #
| Support for using GLFW as the window manager backend .
module Graphics.Gloss.Internals.Interface.Backend.GLFW
(GLFWState)
where
import Data.IORef
import Data.Maybe (fromJust)
import Control.Concurrent
import Control.Monad
import Graphic... | null | https://raw.githubusercontent.com/gelisam/giggles-is-you/6487120b219bad80ff87a43f1d7d9fb97d17dfb5/gloss/Graphics/Gloss/Internals/Interface/Backend/GLFW.hs | haskell | # OPTIONS_HADDOCK hide #
[Note: FreeGlut]
~~~~~~~~~~~~~~~~
On freeglut-based installations (usually linux) we need to explicitly
window, otherwise opening a gloss window again from GHCi will crash.
We assume also assume that only linux installations use freeglut.
| Status of Ctrl, Alt or Shift (Up or Dow... | # LANGUAGE CPP #
| Support for using GLFW as the window manager backend .
module Graphics.Gloss.Internals.Interface.Backend.GLFW
(GLFWState)
where
import Data.IORef
import Data.Maybe (fromJust)
import Control.Concurrent
import Control.Monad
import Graphics.Gloss.Data.Display
import q... |
68f5fae64d2ab8f33f01c1b1017e6eaedc8aa319923bc260c040f6917c4d7c28 | initc3/SaUCy | Decl.hs | # OPTIONS_GHC -Wall #
--------------------------------------------------------------------------------
-- |
-- Module : Language.ILC.Decl
Copyright : ( C ) 2018
-- License : BSD-style (see LICENSE)
Maintainer : ( )
-- Stability : experimental
--
-- Defines top-level variable declarations... | null | https://raw.githubusercontent.com/initc3/SaUCy/199154c1f488af4561e4bf1f7f5f3ef8876dfa6b/src/Language/ILC/Decl.hs | haskell | ------------------------------------------------------------------------------
|
Module : Language.ILC.Decl
License : BSD-style (see LICENSE)
Stability : experimental
Defines top-level variable declarations and type declarations.
---------------------------------------------------------------------... | # OPTIONS_GHC -Wall #
Copyright : ( C ) 2018
Maintainer : ( )
module Language.ILC.Decl (
TopDecl(..)
, ValCon
, declToAssoc
, getCustomData
, custTyToExpr
) where
import Language.ILC.Infer.Infer
import Language.ILC.Syntax
import Language.ILC.Type
data TopDecl = Decl Name Expr
... |
dae6c1b6cc054a849d554a01ba2816beaed84a199516f569b0c4336756cd841a | lowasser/TrieMap | Zippable.hs | # LANGUAGE MagicHash , UnboxedTuples , BangPatterns , NamedFieldPuns , FlexibleInstances #
module Data.TrieMap.WordMap.Zippable () where
import Data.TrieMap.TrieKey
import Data.TrieMap.WordMap.Base
import GHC.Exts
instance Zippable SNode where
empty = nil
clear (WHole _ path) = fromUTuple clearPath path
assign... | null | https://raw.githubusercontent.com/lowasser/TrieMap/1ab52b8d83469974a629f2aa577a85de3f9e867a/Data/TrieMap/WordMap/Zippable.hs | haskell | # LANGUAGE MagicHash , UnboxedTuples , BangPatterns , NamedFieldPuns , FlexibleInstances #
module Data.TrieMap.WordMap.Zippable () where
import Data.TrieMap.TrieKey
import Data.TrieMap.WordMap.Base
import GHC.Exts
instance Zippable SNode where
empty = nil
clear (WHole _ path) = fromUTuple clearPath path
assign... | |
aca276cbf40c0ffc5c98fd082686db513ebec65e0b0fa67adfba06f96b07de3a | benknoble/frosthaven-manager | start.rkt | #lang racket
(provide
(contract-out
[start-view (->* ()
(#:on-level (-> level/c any)
#:on-player (-> num-players/c any))
(is-a?/c view<%>))]))
(require racket/gui/easy
frosthaven-manager/defns)
(define (start-view #:on-level [on-level voi... | null | https://raw.githubusercontent.com/benknoble/frosthaven-manager/c865ec8b9487831ff64b887d111b97195c9931d2/gui/start.rkt | racket | no separate eventspace: block main until this window closed | #lang racket
(provide
(contract-out
[start-view (->* ()
(#:on-level (-> level/c any)
#:on-player (-> num-players/c any))
(is-a?/c view<%>))]))
(require racket/gui/easy
frosthaven-manager/defns)
(define (start-view #:on-level [on-level voi... |
30ad7d51cdba7620e3a8a35217e780ae3976fadc7666606944f83a67187bc45e | mariari/Misc-Lisp-Scripts | interesting-problems.lisp | ;; This is the list overflowing problem
;; suppose we have a list, and we graphed it as a bar graph
;; now suppose that we wanted to see how many units of water
this structure can hold . likes to talk about this problem a fair
;; Here is my solution
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quick... | null | https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/interesting-problems.lisp | lisp | This is the list overflowing problem
suppose we have a list, and we graphed it as a bar graph
now suppose that we wanted to see how many units of water
Here is my solution | this structure can hold . likes to talk about this problem a fair
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload '(:fare-quasiquote-readtable
:trivia.quasiquote
:trivia))
(use-package 'trivia))
(named-readtables:in-readtable :fare-quasiquote)
(defun wa... |
fbdf9c3a6c1e1134a785bd722ba79d4172616fb326c80ea2bc0b269b22f6d907 | lexi-lambda/freer-simple | Reader.hs | module Tests.Reader (tests) where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.QuickCheck (testProperty)
import Control.Monad.Freer (run)
import Control.Monad.Freer.Reader (ask, local, runReader)
tests :: TestTree
tests = testGroup "Reader tests"
[ testProperty "Reader passes along environment: n + x"... | null | https://raw.githubusercontent.com/lexi-lambda/freer-simple/e5ef0fec4a79585f99c0df8bc9e2e67cc0c0fb4a/tests/Tests/Reader.hs | haskell | ------------------------------------------------------------------------------
Examples --
------------------------------------------------------------------------------
t1rr' = run t1
No instance for (Member (Reader Int) Void)
arising from a use of `t1'
The opposite order of layers | module Tests.Reader (tests) where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.QuickCheck (testProperty)
import Control.Monad.Freer (run)
import Control.Monad.Freer.Reader (ask, local, runReader)
tests :: TestTree
tests = testGroup "Reader tests"
[ testProperty "Reader passes along environment: n + x"... |
61a0bb3ac7b583baa7977f70b48b2807bc4133c7bf43e134aaa0e168ca1b2d03 | aleksandr-vin/Google-Code-Jam-Practice | A. Alien Language, refactoried.lisp | Google Code Jam -- Qualification Round 2009
;;;; A. Alien Language
Practicing for GCJ 2010 , , 2010 - 03 - 07
;;;;
Refactoried code .
(defparameter *trace* nil "Tracing of the interpret-test-cases")
(defparameter *in* nil "Input stream for the program")
(defparameter *out* t "Output strea... | null | https://raw.githubusercontent.com/aleksandr-vin/Google-Code-Jam-Practice/733c125dbcb1e264655b9bc8742db35b2da5dda3/2009Qual/A.%20Alien%20Language%2C%20refactoried.lisp | lisp | A. Alien Language
interpreting list of chars
collecting a set of heads
interpreting a single character
A list of tails of matched heads of the words.
As we will work only with list, so no copy-tree.
All words match a void pattern at startup.
(test) | Google Code Jam -- Qualification Round 2009
Practicing for GCJ 2010 , , 2010 - 03 - 07
Refactoried code .
(defparameter *trace* nil "Tracing of the interpret-test-cases")
(defparameter *in* nil "Input stream for the program")
(defparameter *out* t "Output stream for the program")
(defpara... |
2383e443e08d57df884256e80d955de617b27aeccaa372cbd733e4c3dff05996 | cracauer/sbcl-ita | debug-dump.lisp | ;;;; stuff that creates debugger information from the compiler's
;;;; internal data structures
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;... | null | https://raw.githubusercontent.com/cracauer/sbcl-ita/f85a8cf0d1fb6e8c7b258e898b7af3233713e0b9/src/compiler/debug-dump.lisp | lisp | stuff that creates debugger information from the compiler's
internal data structures
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
debug blocks
The LOCATION-INFO structure holds the info... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!C")
(deftype byte-buffer () '(vector (unsigned-byte 8)))
(defvar *byte-buffer*)
(declaim (type byte-buffer *... |
e442aa0bd530e475f5a459570b7e95c450787b2e0f02067fc9d16fcae08213c3 | RefactoringTools/wrangler | eqc_unfold_app.erl | -module(eqc_unfold_app).
-compile(export_all).
-include_lib("eqc/include/eqc.hrl").
collect_app_locs(AST, ModName) ->
F = fun (T, S) ->
case wrangler_syntax:type(T) of
application ->
Op = wrangler_syntax:application_operator(T),
case lists:keysearch(fun_def, 1, wrangler_syntax:get_ann(Op... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/d3d84879b4269759b26d009013edc5bcff49a1af/qc_test/eqc_unfold_app.erl | erlang | filename newerator
Properties for 'generalise a function'
generate 'gen a function' commands.
| -module(eqc_unfold_app).
-compile(export_all).
-include_lib("eqc/include/eqc.hrl").
collect_app_locs(AST, ModName) ->
F = fun (T, S) ->
case wrangler_syntax:type(T) of
application ->
Op = wrangler_syntax:application_operator(T),
case lists:keysearch(fun_def, 1, wrangler_syntax:get_ann(Op... |
51c4e1ec3e33e15e299832a7eb03a128a28702f23c444b16f207ead90fdff5cf | koto-bank/lbge | camera.lisp | (in-package :lbge.render)
(defclass camera ()
((matrix :documentation "Camera matrix"
:initform nil
:reader camera-projection-matrix)
(view-matrix :documentation "Camera view matrix"
:initform nil
:accessor camera-view-matrix)))
(defclass ortho-camera (camera)
... | null | https://raw.githubusercontent.com/koto-bank/lbge/491e99a9eb6aeeabf85c8daf1ef83f2809ec3a76/src/render/camera.lisp | lisp | (in-package :lbge.render)
(defclass camera ()
((matrix :documentation "Camera matrix"
:initform nil
:reader camera-projection-matrix)
(view-matrix :documentation "Camera view matrix"
:initform nil
:accessor camera-view-matrix)))
(defclass ortho-camera (camera)
... | |
19575e19c72661843646e86934c237862a454a7634196ae051ca9f7e31b374c1 | cfpb/qu | test_util.clj | (ns qu.test-util
(:require [clojure.test :refer :all]
[ring.mock.request :as mockreq]
[org.httpkit.client :as client]
[qu.main :as main]
[qu.app :as app]
[qu.app.webserver :as webserver]
[qu.app.mongo :refer [new-mongo]]
[qu.loader :a... | null | https://raw.githubusercontent.com/cfpb/qu/f460d9ab2f05ac22f6d68a98a9641daf0f7c7ba4/test/qu/test_util.clj | clojure | (ns qu.test-util
(:require [clojure.test :refer :all]
[ring.mock.request :as mockreq]
[org.httpkit.client :as client]
[qu.main :as main]
[qu.app :as app]
[qu.app.webserver :as webserver]
[qu.app.mongo :refer [new-mongo]]
[qu.loader :a... | |
1e5c4cd89e0a7c8716b2227081e684ead67d6416b7bc93c1ef70e1c06a3c0388 | tezos/tezos-mirror | config_command.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/57a3510f333bf35a321e07daf65bb1f65dc58a5c/src/lib_node_config/config_command.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2020 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WIT... |
0f300726740f33c479b1decb9f5af05c1d7324f0f50e34971fed3c449ea5ee4c | sinelaw/infernu | Date.hs | # LANGUAGE TupleSections #
module Infernu.Builtins.Date
(dateRowType)
where
import Control.Monad (foldM)
import Infernu.Builtins.Util
import Infernu.InferState (Infer)
import Infernu.Prelude
import Infernu.Types
dateFunc :: Type -> Type
dateF... | null | https://raw.githubusercontent.com/sinelaw/infernu/e8b7aff6ea628c9099fb82aa011eb5c12aca36ba/src/Infernu/Builtins/Date.hs | haskell | Note: many of these functions accept multiple optional parameters, but there are other ways to
achieve the same result. Leaving these optional parameters out.
, "setYear"
, "toGMTString"
, "toLocaleFormat"
, "toSource"
, "toLocaleDateString"
, "toLocaleString" | # LANGUAGE TupleSections #
module Infernu.Builtins.Date
(dateRowType)
where
import Control.Monad (foldM)
import Infernu.Builtins.Util
import Infernu.InferState (Infer)
import Infernu.Prelude
import Infernu.Types
dateFunc :: Type -> Type
dateF... |
e2e9e71df4c8e53ba8b4d1b32205b579978dfb96bc0ca5b75f45817b974f3cae | jiesoul/soul-talk | views.cljs | (ns soul-talk.series.views
(:require [soul-talk.common.views :as c]
[reagent.core :as r]
[re-frame.core :refer [subscribe dispatch dispatch-sync]]
[soul-talk.utils :as du]
[soul-talk.routes :refer [navigate!]]
["semantic-ui-react" :refer [Form Button Table D... | null | https://raw.githubusercontent.com/jiesoul/soul-talk/630de08c6549b206d59023764d5f2576d97d1030/home/src/soul_talk/series/views.cljs | clojure | (ns soul-talk.series.views
(:require [soul-talk.common.views :as c]
[reagent.core :as r]
[re-frame.core :refer [subscribe dispatch dispatch-sync]]
[soul-talk.utils :as du]
[soul-talk.routes :refer [navigate!]]
["semantic-ui-react" :refer [Form Button Table D... | |
aebe0b6aa1d6a06b3a2a6b6dc7e0ce18bfb7bf1a7d1de82b9600a4fb4b132948 | chaw/r7rs-libs | ngrams-example.sps | ;;; filename: test-ngrams.scm
;;;
Time - stamp : < 2010 - 02 - 28 01:15:00 dcavar >
;;; encoding: UTF-8
;;;
Copyright ( C ) 2010 by .
;;;
;;; This library is free software; you can redistribute it
;;; and/or modify it under the terms of the Creative Commons
GNU Lesser General Public License as published by the
... | null | https://raw.githubusercontent.com/chaw/r7rs-libs/b8b625c36b040ff3d4b723e4346629a8a0e8d6c2/nltk-examples/ngrams-example.sps | scheme | filename: test-ngrams.scm
encoding: UTF-8
This library is free software; you can redistribute it
and/or modify it under the terms of the Creative Commons
either version 2.1 of the License ,
or (at your option) any later version.
useful, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANT... | Time - stamp : < 2010 - 02 - 28 01:15:00 dcavar >
Copyright ( C ) 2010 by .
GNU Lesser General Public License as published by the
The Scheme NLTK is distributed in the hope that it will be
write to the Free Software Foundation , Inc. , 59 Temple
Place , Suite 330 , Boston , MA 02111 - 1307 USA
Author : ... |
bae6d05684cda63e190b25bd26cc50b33c196ef7c9c15d1e9baffb1935e79179 | aziem/binaryninja-ocaml | callingconvention.ml | open Ctypes
open Foreign
module B = Ffi_bindings.Bindings(Ffi_generated_types)(Ffi_generated)
module U = Utils
open Ffi_bindings
open B
type bn_callingconvention = Typedefs.bn_callingconvention Ctypes.structure Ctypes_static.ptr
| null | https://raw.githubusercontent.com/aziem/binaryninja-ocaml/5773d791ebb717816b8c47863bce8122f39764b4/lib/callingconvention.ml | ocaml | open Ctypes
open Foreign
module B = Ffi_bindings.Bindings(Ffi_generated_types)(Ffi_generated)
module U = Utils
open Ffi_bindings
open B
type bn_callingconvention = Typedefs.bn_callingconvention Ctypes.structure Ctypes_static.ptr
| |
191706bb105f1414fa155dc7c7cc843b8037e5d3605e059a41717aae93117814 | exercism/ocaml | run_length_encoding.ml | let encode _ =
failwith "'encode' is missing"
let decode _ =
failwith "'decode' is missing"
| null | https://raw.githubusercontent.com/exercism/ocaml/bfd6121f757817865a34db06c3188b5e0ccab518/exercises/practice/run-length-encoding/run_length_encoding.ml | ocaml | let encode _ =
failwith "'encode' is missing"
let decode _ =
failwith "'decode' is missing"
| |
90df8e4d925bb63e1519c8fdd7ace7ac45b3e863104cebc04ec99724e5d08c3a | albertoruiz/easyVision | Matching.hs | # LANGUAGE RecordWildCards #
module Contours.Matching(
Shape(..), ShapeMatch(..),
shape, shapeMatches, shapeMatch,
elongated, isEllipse,
GN, prepareGNS, stepGN, stepGN'
) where
import Control.Arrow((***),(&&&))
import Numeric.LinearAlgebra
import Numeric.LinearAlgebra.Util(norm,diagl,(¦),(¿))
import T... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/contours/contours/src/Contours/Matching.hs | haskell | --------------------------------------------------------------------
--------------------------------------------------------------------
-------------------------------------------------------------------
--------------------------------------------------------------------
| checks if a polyline is very similar to ... | # LANGUAGE RecordWildCards #
module Contours.Matching(
Shape(..), ShapeMatch(..),
shape, shapeMatches, shapeMatch,
elongated, isEllipse,
GN, prepareGNS, stepGN, stepGN'
) where
import Control.Arrow((***),(&&&))
import Numeric.LinearAlgebra
import Numeric.LinearAlgebra.Util(norm,diagl,(¦),(¿))
import T... |
54e80037a95bbc9e325aa020e24a9418ed9ca5b874211cfbd5db58ec3582891c | code-iai/ros_emacs_utils | swank-hyperdoc.lisp | (in-package :swank)
(defslimefun hyperdoc (string)
(let ((hyperdoc-package (find-package :hyperdoc)))
(when hyperdoc-package
(multiple-value-bind (symbol foundp symbol-name package)
(parse-symbol string *buffer-package*)
(declare (ignore symbol))
(when foundp
(funcall (f... | null | https://raw.githubusercontent.com/code-iai/ros_emacs_utils/67aafa699ff0d8c6476ec577a8587bac3d498028/slime_wrapper/slime/contrib/swank-hyperdoc.lisp | lisp | (in-package :swank)
(defslimefun hyperdoc (string)
(let ((hyperdoc-package (find-package :hyperdoc)))
(when hyperdoc-package
(multiple-value-bind (symbol foundp symbol-name package)
(parse-symbol string *buffer-package*)
(declare (ignore symbol))
(when foundp
(funcall (f... | |
467678884ec19de6a53348c79a76dbdd4ad082d73060c6b5e7fb85c19490ec7c | tlaplus/tlapm | phrase.ml | Copyright 2004 INRIA
open Expr;;
type inductive_arg =
| Param of string
| Self
;;
type phrase =
| Hyp of string * expr * int
| Def of definition
| Sig of string * string list * string
| Inductive of
string * string list * (string * inductive_arg list) list * string
;;
type zphrase =
| Zhyp o... | null | https://raw.githubusercontent.com/tlaplus/tlapm/b82e2fd049c5bc1b14508ae16890666c6928975f/zenon/phrase.ml | ocaml | Copyright 2004 INRIA
open Expr;;
type inductive_arg =
| Param of string
| Self
;;
type phrase =
| Hyp of string * expr * int
| Def of definition
| Sig of string * string list * string
| Inductive of
string * string list * (string * inductive_arg list) list * string
;;
type zphrase =
| Zhyp o... | |
bceb473b5be41e2a2ea2eac5abbc7b3f1e32edd26b40633b875e68aee587f735 | geremih/xcljb | shm.clj | This file is automatically generated . DO NOT MODIFY .
(clojure.core/ns
xcljb.gen.shm
(:require xcljb.conn-ext xcljb.gen.shm-types))
(def
-XCLJB
{:minor-version 1,
:major-version 1,
:header "shm",
:extension-multiword false,
:extension-name "Shm",
:extension-xname "MIT-SHM"})
(clojure.core/defn
quer... | null | https://raw.githubusercontent.com/geremih/xcljb/59e9ff795bf00595a3d46231a7bb4ec976852396/src/xcljb/gen/shm.clj | clojure | Manually written. | This file is automatically generated . DO NOT MODIFY .
(clojure.core/ns
xcljb.gen.shm
(:require xcljb.conn-ext xcljb.gen.shm-types))
(def
-XCLJB
{:minor-version 1,
:major-version 1,
:header "shm",
:extension-multiword false,
:extension-name "Shm",
:extension-xname "MIT-SHM"})
(clojure.core/defn
quer... |
f4ab607662a06988aefdfd8d5fae7864feafdef7cc9df592e721cb73d148ff46 | Mzk-Levi/texts | Equality.hs | # LANGUAGE TypeOperators , TypeSynonymInstances , FlexibleInstances ,
UndecidableInstances , IncoherentInstances , GADTs #
UndecidableInstances, IncoherentInstances, GADTs #-}
--------------------------------------------------------------------------------
-- |
Module : Data . Comp . . Equality
Copyr... | null | https://raw.githubusercontent.com/Mzk-Levi/texts/34916d6531af9bc39e50b596247ac2017d8cfdc3/compdata-param-master/src/Data/Comp/Param/Equality.hs | haskell | ------------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
This module defines equality for signatures, which lifts to equality for
terms.
------------------------------------------------------------------------------
|Equality on parametric ... | # LANGUAGE TypeOperators , TypeSynonymInstances , FlexibleInstances ,
UndecidableInstances , IncoherentInstances , GADTs #
UndecidableInstances, IncoherentInstances, GADTs #-}
Module : Data . Comp . . Equality
Copyright : ( c ) 2011 ,
Maintainer : < >
Portability : non - portabl... |
513a638c94d4e3fb51cf3f7cc7d588526c37c460e815aef98b1a3cf6a0f03ae7 | CDSoft/abp | IncludeSpec.hs |
This file is part of ABP .
ABP is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
ABP is distributed... | null | https://raw.githubusercontent.com/CDSoft/abp/98e042066869aa5b898096c31b51d2b6dc316456/test/IncludeSpec.hs | haskell | # LANGUAGE QuasiQuotes, OverloadedStrings #
----------
---------- |
This file is part of ABP .
ABP is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
ABP is distributed... |
8ef07051a89a9ab58a4f605a75fa5964c8c9213d2372938009a7c8e01e958c17 | dwayne/eopl3 | interpreter.test.rkt | #lang racket
(require "./interpreter.rkt")
(require rackunit)
(check-equal?
(run "5")
(num-val 5))
(check-equal?
(run "x")
(num-val 10))
(check-equal?
(run "zero?(i)")
(bool-val #f))
(check-equal?
(run "zero?(-(i, 1))")
(bool-val #t))
(check-equal?
(run "-(55, -(x, 11))")
(num-val 56))
(check-equal?
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/03-ch3/interpreters/racket/NAMELESS-LETREC/interpreter.test.rkt | racket | #lang racket
(require "./interpreter.rkt")
(require rackunit)
(check-equal?
(run "5")
(num-val 5))
(check-equal?
(run "x")
(num-val 10))
(check-equal?
(run "zero?(i)")
(bool-val #f))
(check-equal?
(run "zero?(-(i, 1))")
(bool-val #t))
(check-equal?
(run "-(55, -(x, 11))")
(num-val 56))
(check-equal?
... | |
2f9a99049b6e767a13d18723a4d21a3af7b59174234b55b4e9650c5e630dcdaa | district0x/district-registry | project.clj | (defproject district0x/district-registry "1.0.0"
:description "A community-curated registry of marketplaces on the district0x Network."
:url "-registry"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[camel-snake-kebab "0.4.0"]
[cljs-web3 "0.19.0-0-10"]
... | null | https://raw.githubusercontent.com/district0x/district-registry/c2dcf7978d2243a773165b18e7a76632d8ad724e/project.clj | clojure | needed until v0.6.13 is officially released
-wallet/issues/64 | (defproject district0x/district-registry "1.0.0"
:description "A community-curated registry of marketplaces on the district0x Network."
:url "-registry"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[camel-snake-kebab "0.4.0"]
[cljs-web3 "0.19.0-0-10"]
... |
256aa468aa19b3d9a1efada4d6dcbe798995158badbf2d3eeedfe98cb9c560e4 | synduce/Synduce | sum.ml |
let s0 = 0
let f0 x5 x6 = x5 + (x6 + x6)
let rec sum2 = function Null -> s0 | Node(a, l, r) -> f0 a (sum2 l)
| null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/extras/solutions/constraints/symmetric_tree/sum.ml | ocaml |
let s0 = 0
let f0 x5 x6 = x5 + (x6 + x6)
let rec sum2 = function Null -> s0 | Node(a, l, r) -> f0 a (sum2 l)
| |
6cd4035b0a100e9c3996e82a6acbc8f36148e5fe2ae7d1d0e773232b0db951f9 | threatgrid/ctia | setup_env.clj | #!/usr/bin/env bb
;; Example:
;; LOG_PATH=$(mktemp -d) ./scripts/actions/setup-env.clj
(ns actions.setup-env
(:require [actions.actions-helpers :as h]))
(defn setup-env [{:keys [sh getenv]}]
(let [log-path (getenv "LOG_PATH")]
(assert log-path)
(-> (sh "mkdir" "-p" log-path)
:exit
#{0}
... | null | https://raw.githubusercontent.com/threatgrid/ctia/03e695d7fe9cf2545c04815036e1da3be5a017e4/scripts/actions/setup_env.clj | clojure | Example:
LOG_PATH=$(mktemp -d) ./scripts/actions/setup-env.clj | #!/usr/bin/env bb
(ns actions.setup-env
(:require [actions.actions-helpers :as h]))
(defn setup-env [{:keys [sh getenv]}]
(let [log-path (getenv "LOG_PATH")]
(assert log-path)
(-> (sh "mkdir" "-p" log-path)
:exit
#{0}
(assert "Failed to create LOG_PATH")))
(assert (not (getenv "... |
9e43e11d2e20515a6ca9aee232e7b0f1e306caeaaea634dd1061bf7f10d3dbf4 | tsloughter/kuberl | kuberl_v1_scale_spec.erl | -module(kuberl_v1_scale_spec).
-export([encode/1]).
-export_type([kuberl_v1_scale_spec/0]).
-type kuberl_v1_scale_spec() ::
#{ 'replicas' => integer()
}.
encode(#{ 'replicas' := Replicas
}) ->
#{ 'replicas' => Replicas
}.
| null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_scale_spec.erl | erlang | -module(kuberl_v1_scale_spec).
-export([encode/1]).
-export_type([kuberl_v1_scale_spec/0]).
-type kuberl_v1_scale_spec() ::
#{ 'replicas' => integer()
}.
encode(#{ 'replicas' := Replicas
}) ->
#{ 'replicas' => Replicas
}.
| |
5abe2262727ae625b2bb0d14ad0199d3949dcc6aa54fff1d0497e88dda3f9296 | SimulaVR/godot-haskell | HUD.hs | | This file is AUTOGENERATED by godot - haskell - project - generator . DO NOT EDIT
# LANGUAGE FlexibleContexts , FunctionalDependencies , MultiParamTypeClasses ,
UndecidableInstances , OverloadedStrings , TemplateHaskell , TypeApplications ,
TypeFamilies , DataKinds , TypeOperators , FlexibleInstances , Ran... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/examples/dodge-the-creeps/src/Project/Scenes/HUD.hs | haskell | | This file is AUTOGENERATED by godot - haskell - project - generator . DO NOT EDIT
# LANGUAGE FlexibleContexts , FunctionalDependencies , MultiParamTypeClasses ,
UndecidableInstances , OverloadedStrings , TemplateHaskell , TypeApplications ,
TypeFamilies , DataKinds , TypeOperators , FlexibleInstances , Ran... | |
6be40ec7eb741b2e8ba9c6cba78f4403887fd4cd90ebfa3d416b158931ebf903 | samply/blaze | token_quantity_spec.clj | (ns blaze.db.impl.search-param.composite.token-quantity-spec
(:require
[blaze.byte-string-spec]
[blaze.coll.core-spec]
[blaze.db.impl.codec-spec]
[blaze.db.impl.search-param.quantity-spec]
[blaze.db.impl.search-param.util-spec]
[blaze.fhir-path-spec]))
| null | https://raw.githubusercontent.com/samply/blaze/e84c106b5ca235600c20ba74fe8a2295eb18f350/modules/db/test/blaze/db/impl/search_param/composite/token_quantity_spec.clj | clojure | (ns blaze.db.impl.search-param.composite.token-quantity-spec
(:require
[blaze.byte-string-spec]
[blaze.coll.core-spec]
[blaze.db.impl.codec-spec]
[blaze.db.impl.search-param.quantity-spec]
[blaze.db.impl.search-param.util-spec]
[blaze.fhir-path-spec]))
| |
bf4a76a7b863fef0b69a54520d44de0fa2d6ffaf36c965b969d9530d2bfc6faa | nfrisby/coxswain | SimplifyWanteds.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
module SimplifyWanteds (simplifyWanteds) where
import Control.Monad (forM)
import Articulation
import Data.Monoid ((<>))
import Data.Word (Word16)
import E
import GHCAPI
import KnownNat16
import LowLevel
import NormalForms
import Reduce (try_reduce)
import SimplifyGiven... | null | https://raw.githubusercontent.com/nfrisby/coxswain/bfd5777964a5b4ba64e1bcc4cf18df1c9d8fc558/coxswain/src/SimplifyWanteds.hs | haskell | # LANGUAGE GADTs #
---
---
isn't actually bound by the implication constraint it claims to be
bound by.
under those givens. If your given constraints are "simple" or you
don't have error messages, then this pass will be unnecessary.
TODO: Contradictions also need this, but I haven't done that yet
because it'll ... | # LANGUAGE LambdaCase #
module SimplifyWanteds (simplifyWanteds) where
import Control.Monad (forM)
import Articulation
import Data.Monoid ((<>))
import Data.Word (Word16)
import E
import GHCAPI
import KnownNat16
import LowLevel
import NormalForms
import Reduce (try_reduce)
import SimplifyGivens (renSubst,slurpRen)
i... |
69cee544fe7e3ed0074e840fefdf7ff22e27c695035a0ae8cfa48f2a65b9a017 | sunshineclt/Racket-Helper | graphic.rkt | #lang racket/gui
(require racket/gui/base)
定义向量
(define (make-vect x y) (cons x y))
(define (xcor-vect v)(car v))
(define (ycor-vect v)(cdr v))
(define (add-vect v1 v2)
(make-vect (+ (xcor-vect v1)
(xcor-vect v2))
(+ (ycor-vect v1) (ycor-vect v2))))
(define (sub-vect v1 v2)
(make-vect ... | null | https://raw.githubusercontent.com/sunshineclt/Racket-Helper/bf85f38dd8d084db68265bb98d8c38bada6494ec/%E9%99%88%E4%B9%90%E5%A4%A9/Week4/graphic.rkt | racket | 定义线段
start, end都是线段端点(向量),坐标相对于绝对原点
定义frame
向量转换器
定义painter
segment-list是线段列表
accumulate
flatmap
将点组成的集合的集合转化为线段
转换painter
恒等
水平翻转
在右侧递归排列
在右上递归排列
square-limit
drawLine | #lang racket/gui
(require racket/gui/base)
定义向量
(define (make-vect x y) (cons x y))
(define (xcor-vect v)(car v))
(define (ycor-vect v)(cdr v))
(define (add-vect v1 v2)
(make-vect (+ (xcor-vect v1)
(xcor-vect v2))
(+ (ycor-vect v1) (ycor-vect v2))))
(define (sub-vect v1 v2)
(make-vect ... |
81ff1b4832924ba7b38b4c7da8e9dd26ba369abfa54a8038d68db840c8ee977b | logseq/logseq | api.cljs | (ns frontend.extensions.zotero.api
(:require [camel-snake-kebab.core :as csk]
[camel-snake-kebab.extras :as cske]
[cljs-http.client :as http]
[cljs.core.async
:refer [<! >! alt! chan close! go go-loop timeout]]
[clojure.string :as str]
[frontend... | null | https://raw.githubusercontent.com/logseq/logseq/b78c689458953dbbcf8fd93f09523508aa9040a1/src/main/frontend/extensions/zotero/api.cljs | clojure | taken from -common/blob/master/src/cljc/metosin/core/async/debounce.cljc
"/users/475425/collections?v=3" | (ns frontend.extensions.zotero.api
(:require [camel-snake-kebab.core :as csk]
[camel-snake-kebab.extras :as cske]
[cljs-http.client :as http]
[cljs.core.async
:refer [<! >! alt! chan close! go go-loop timeout]]
[clojure.string :as str]
[frontend... |
9cf7554d330f79067984e3c8d24bbc852654ad8916c5b2c32dea27311cd6241e | racketscript/racketscript | wcm-eq-key.rkt | #lang racket
(struct posn (x y) #:transparent)
(define (extract-current-continuation-marks key)
(continuation-mark-set->list
(current-continuation-marks)
key))
(displayln
(with-continuation-mark (posn 1 2) 'value
(extract-current-continuation-marks (posn 1 2))))
(displayln
(let ([p (posn 1 2)])
(wit... | null | https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/tests/wcm/wcm-eq-key.rkt | racket | #lang racket
(struct posn (x y) #:transparent)
(define (extract-current-continuation-marks key)
(continuation-mark-set->list
(current-continuation-marks)
key))
(displayln
(with-continuation-mark (posn 1 2) 'value
(extract-current-continuation-marks (posn 1 2))))
(displayln
(let ([p (posn 1 2)])
(wit... | |
477091fb03a160263a319b4c72118ec7132c0456e3dff971dceeaab212a7b6d1 | scymtym/architecture.builder-protocol | util.lisp | ;;;; util.lisp --- Unit tests for utilities provided by the architecture.builder-protocol system.
;;;;
Copyright ( C ) 2015 , 2016 Jan Moringen
;;;;
Author : < >
(cl:in-package #:architecture.builder-protocol.test)
(in-suite :architecture.builder-protocol)
(test normalize-relation.smoke
"Smoke test for the ... | null | https://raw.githubusercontent.com/scymtym/architecture.builder-protocol/a48abddff7f6e0779b89666f46ab87ef918488f0/test/util.lisp | lisp | util.lisp --- Unit tests for utilities provided by the architecture.builder-protocol system.
| Copyright ( C ) 2015 , 2016 Jan Moringen
Author : < >
(cl:in-package #:architecture.builder-protocol.test)
(in-suite :architecture.builder-protocol)
(test normalize-relation.smoke
"Smoke test for the `normalize-relation' function."
(flet ((do-it (spec)
(multiple-value-list (normalize-relation ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.