_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 |
|---|---|---|---|---|---|---|---|---|
6195dfc9a260273165efd940072bd05d9b801d2fd40ea8b0b53eb82b28d99e16 | ghcjs/ghcjs | session.hs | {-# LANGUAGE GADTs, KindSignatures #-}
See Trac # 1323 ; crashed GHC 6.6
module Main where
data Zero = Zero
deriving (Show)
-- Change this newtype to a data and all's well
-- and it's not like the class restriction actually restricts
-- the type rather than the constructor
newtype Succ p = Succ p deri... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/gadt/session.hs | haskell | # LANGUAGE GADTs, KindSignatures #
Change this newtype to a data and all's well
and it's not like the class restriction actually restricts
the type rather than the constructor
this line is fine
this line blows up
make Test.hs
make Test.hs |
See Trac # 1323 ; crashed GHC 6.6
module Main where
data Zero = Zero
deriving (Show)
newtype Succ p = Succ p deriving (Show)
class TyNum a where
instance TyNum Zero where
instance (TyNum p) => TyNum (Succ p) where
data List :: * -> * -> * where
Nil :: List a Zero
Cons :: (T... |
6fbcc893ac260bdae12bb3ae280988e3df6dd38b2c2f89aae76df12f94733cb8 | synduce/Synduce | Psi.ml | open Base
open Lang
(**
PsiDef.t is the definition of the problem: the goal is to synthesize the unknowns in target such
that target = orig ∘ repr
*)
type t =
{ filename : string (** The original file of the problem. *)
; id : int (** An identifier for the problem. *)
; target : PMRS.t (**
The target recursi... | null | https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/src/common/Psi.ml | ocaml | *
PsiDef.t is the definition of the problem: the goal is to synthesize the unknowns in target such
that target = orig ∘ repr
* The original file of the problem.
* An identifier for the problem.
*
The target recursion skeleton in the problem.
*
The reference function in the problem.
*
The representation functio... | open Base
open Lang
type t =
; lifting : RType.t list
}
let logics (p : t) = [ p.repr.plogic; p.reference.plogic; p.target.plogic ]
let compare (p1 : t) (p2 : t) = compare p1.id p2.id
let equal (p1 : t) (p2 : t) = compare p1 p2 = 0
let hash (p : t) = p.id
State variables for the algorithm .
let psi_id : int re... |
dcefb3a72a09f10fc135837c1f1e64e7f2c8b65fb3ef77dfe34eefe204dedfa2 | bjorng/wings | wings_io_wx.erl | %%
%% wings_io_wx.erl --
%%
This module contains most of the low - level WX GUI for Wings .
%%
Copyright ( c ) 2001 - 2011
%%
%% See the file "license.terms" for information on usage and redistribution
%% of this file, and for a DISCLAIMER OF ALL WARRANTIES.
%%
%% $Id$
%%
-module(wings_io_wx).
-defi... | null | https://raw.githubusercontent.com/bjorng/wings/1e2c2d62e93a98c263b167c7a41f8611e0ff08cd/src/wings_io_wx.erl | erlang |
wings_io_wx.erl --
See the file "license.terms" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
$Id$
Keyboard and mouse mappings
Needed on mac for some reason
:-/ Fix me
integer()
bool()
Mouse grabbing.
io:format("Grab mouse~n", []),
wings_util... | This module contains most of the low - level WX GUI for Wings .
Copyright ( c ) 2001 - 2011
-module(wings_io_wx).
-define(NEED_OPENGL, 1).
-include("wings.hrl").
-export([init/0, quit/0, version_info/0,
set_cursor/1,hourglass/0,eyedropper/0,
get_mouse_state/0, is_modkey_pressed/1, is_key_pressed/1,
... |
69a0e90513d6dc503c26c6bcf34ad75e1681317b4dee9901b3a232428a3d9509 | GillianPlatform/Gillian | ppx_sat_expander.ml | open Ppxlib
open Ast_builder.Default
module Extension_name = struct
type t = Sat | Ent
let to_string = function
| Sat -> "sat"
| Ent -> "ent"
end
let ppx_sat_runtime = Lident "Ppx_sat_runtime"
let if_then_else = Ldot (ppx_sat_runtime, "if_then_else")
let if_sure_then_else = Ldot (ppx_sat_runtime, "if_sur... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/1c8d65120c04ef87cda689a9d41268e25b5ffa7e/ppx_sat/expander/ppx_sat_expander.ml | ocaml | open Ppxlib
open Ast_builder.Default
module Extension_name = struct
type t = Sat | Ent
let to_string = function
| Sat -> "sat"
| Ent -> "ent"
end
let ppx_sat_runtime = Lident "Ppx_sat_runtime"
let if_then_else = Ldot (ppx_sat_runtime, "if_then_else")
let if_sure_then_else = Ldot (ppx_sat_runtime, "if_sur... | |
301c4080583c3d1874e703fb16a314d2c91b7e731d8a51488900efaae91d6056 | informatimago/lisp | basic.lisp | ;;;;****************************************************************************
FILE : basic.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
;;;;USER-INTERFACE: standard i/o
;;;;DESCRIPTION
;;;;
Quick , Dirty and Ugly BASIC .
;;;;
;;;; This is a silly BASIC inter... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/small-cl-pgms/basic/basic.lisp | lisp | ****************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
USER-INTERFACE: standard i/o
DESCRIPTION
This is a silly BASIC interpreter. The lines are tokenized and stored
as-is in an array indexed by the line number. When i... | FILE : basic.lisp
Quick , Dirty and Ugly BASIC .
without losing the variable using the or GOSUB statements ) .
SYNOPSIS
( LOAD ( COMPILE - FILE " BASIC.LISP " ) )
| SAVE string
simp : : = number | string | identifier | ' ( ' expression ' ) '
: : = comparaiso... |
0d9543aa88b1b6bddf4be92d2fbadb8137c73735795d9aff7214b92ad369241c | Lupino/haskell-periodic | Worker.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariabl... | null | https://raw.githubusercontent.com/Lupino/haskell-periodic/d685e806caf3bb54575fc5cb1ca5a3bf1e98969c/periodic-client/src/Periodic/Trans/Worker.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE UndecidableInstances # | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Periodic.Trans.Worker
( ... |
a78982a6d21a6e494ab2deb206bbdc0aecda162203f9d4bd9830b66f5e4b1d12 | nikita-volkov/rerebase | POSIX.hs | module Data.Time.Clock.POSIX
(
module Rebase.Data.Time.Clock.POSIX
)
where
import Rebase.Data.Time.Clock.POSIX
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/Time/Clock/POSIX.hs | haskell | module Data.Time.Clock.POSIX
(
module Rebase.Data.Time.Clock.POSIX
)
where
import Rebase.Data.Time.Clock.POSIX
| |
a5890b37c17e48aad900447f34cbd05f4b066ab9b31d6d2a85b7e4753b96a675 | fimad/prometheus-haskell | MonadMonitor.hs | # LANGUAGE DefaultSignatures #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
module Prometheus.MonadMonitor (
MonadMonitor (..)
, Monitor
, runMonitor
, MonitorT
, runMonitorT
) where
import Control.Applicative (Applicative)
import Control.Monad.Identity (Identity, runIdentity)
import Con... | null | https://raw.githubusercontent.com/fimad/prometheus-haskell/4e2c2f1da1f891e9de3ce5a5260ae92882a9f35e/prometheus-client/src/Prometheus/MonadMonitor.hs | haskell | # LANGUAGE GADTs #
| MonadMonitor describes a class of Monads that are capable of performing
| Monitor allows the use of Prometheus metrics in pure code. When using
Monitor, all of the metric operations will be collected and queued into
a single IO () value that can be run from impure code.
Because all of the ope... | # LANGUAGE DefaultSignatures #
# LANGUAGE GeneralizedNewtypeDeriving #
module Prometheus.MonadMonitor (
MonadMonitor (..)
, Monitor
, runMonitor
, MonitorT
, runMonitorT
) where
import Control.Applicative (Applicative)
import Control.Monad.Identity (Identity, runIdentity)
import Control.Monad.Trans.Class
... |
adb21cbb1b63303610c6f049dabf39970532c2aca593093deb6784df5b3acd58 | juxt/shop | web.clj | (ns tutorial.oic.web
(:require
[aleph.http :as http]
[integrant.core :as ig]
[manifold.deferred :as d]
[ring.util.codec :as codec]
[yada.yada :as yada]
Note : this may be promoted to yada 1.3.x or a separate Edge
;; module
[tutorial.oic.oic :as oic]
[clojure.tools.logging :as log]))
(defm... | null | https://raw.githubusercontent.com/juxt/shop/c23fc55bca1852bfbabb681a72debc12373c3a36/examples/tutorial.oic/src/tutorial/oic/web.clj | clojure | module
token) to prove that these claims are established for
future request.
We might also redirect appropriately.
For the purposes of this tutorial, let's just print the
user's name.
Error handling | (ns tutorial.oic.web
(:require
[aleph.http :as http]
[integrant.core :as ig]
[manifold.deferred :as d]
[ring.util.codec :as codec]
[yada.yada :as yada]
Note : this may be promoted to yada 1.3.x or a separate Edge
[tutorial.oic.oic :as oic]
[clojure.tools.logging :as log]))
(defmethod ig/init... |
49f2b670cf484b076ba7495b1c53117fbc4b5535ab1dd0f9b499947fff7da6b9 | avik-das/garlic | cond-only-else.scm | (display (cond (else 'default))) (newline)
| null | https://raw.githubusercontent.com/avik-das/garlic/5545f5a70f33c2ff9ec449ef66e6acc7881419dc/test/success/cond-only-else.scm | scheme | (display (cond (else 'default))) (newline)
| |
9b6677833b0f9460b20bacfd7145ca8419cb6b6517e266e5e12e71cd39acc1e0 | haskell-lisp/yale-haskell | derived.scm | ;;; -- compilation unit definition for derived instances
;;;
author :
;;;
(define-compilation-unit derived
(source-filename "$Y2/derived/")
(require global)
(unit derived-instances
(source-filename "derived-instances.scm"))
(unit ast-builders
(source-filename "ast-builders"))
(unit eq-ord
(s... | null | https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/derived/derived.scm | scheme | -- compilation unit definition for derived instances
| author :
(define-compilation-unit derived
(source-filename "$Y2/derived/")
(require global)
(unit derived-instances
(source-filename "derived-instances.scm"))
(unit ast-builders
(source-filename "ast-builders"))
(unit eq-ord
(source-filename "eq-ord"))
(unit ix-enum
(source-filename "i... |
c92378c7c59b958b427eed0b95572c23015abb66459f44f241b5624d0b0ba057 | coot/free-category | Queue.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
{-# LANGUAGE KindSignatures #-}
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Test.Queue (tests) where
import Prelude hiding ((.), id)
i... | null | https://raw.githubusercontent.com/coot/free-category/2404d78385a9bf71ed4fcefb1cd4b6426968b1b0/test/Test/Queue.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures # | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module Test.Queue (tests) where
import Prelude hiding ((.), id)
import Text.Show.Functions ()
import Control.Category.... |
f8a2dea7c9c9856b51220c1817ed64c9c5eb47878d05cf824339d279029bfa82 | OCADml/OSCADml | ragged_tri_array_mesh.ml | open OCADml
open OSCADml
let () =
let mesh =
List.init 10 (fun y ->
let y = y + 1 in
List.init y (fun x -> Float.(v3 (of_int x) (of_int y) (of_int y))) )
|> Mesh.of_ragged
in
print_string @@ Scad.to_string (Scad.of_mesh mesh)
| null | https://raw.githubusercontent.com/OCADml/OSCADml/d2f64a3f6454ff37a3c725b619c6a89252af789d/test/ragged_tri_array_mesh.ml | ocaml | open OCADml
open OSCADml
let () =
let mesh =
List.init 10 (fun y ->
let y = y + 1 in
List.init y (fun x -> Float.(v3 (of_int x) (of_int y) (of_int y))) )
|> Mesh.of_ragged
in
print_string @@ Scad.to_string (Scad.of_mesh mesh)
| |
98307c0949456328580990426637720a3231e4423ca397eb3f49dfc79a2fb2e4 | cxxxr/apispec | coerce.lisp | (uiop:define-package #:apispec/classes/schema/coerce
(:mix #:apispec/classes/schema/core
#:cl)
(:use #:apispec/classes/schema/errors
#:apispec/utils
#:parse-number)
(:import-from #:apispec/classes/schema/core
#:parse-schema-definition)
(:import-from #:apispec/classes/sche... | null | https://raw.githubusercontent.com/cxxxr/apispec/84ff65795dc1a933d484fd3a6cde6a625f77ac88/src/classes/schema/coerce.lisp | lisp |
Number Types
String Types
Array Type
Object Type | (uiop:define-package #:apispec/classes/schema/coerce
(:mix #:apispec/classes/schema/core
#:cl)
(:use #:apispec/classes/schema/errors
#:apispec/utils
#:parse-number)
(:import-from #:apispec/classes/schema/core
#:parse-schema-definition)
(:import-from #:apispec/classes/sche... |
38c7b85b4287b22afa7754aaddb03671ce38ff1beab0f0f36c127d72c7cefa7e | greglook/merkle-db | test_utils.clj | (ns merkle-db.test-utils
(:require
[clojure.spec.alpha :as s]
[clojure.string :as str]
[clojure.test :as test]
[merkledag.link :as link]
[multihash.core :as multihash]
[puget.printer :as puget]))
(defn print-handler
[t]
(condp = t
multihash.core.Multihash
(puget/tagged-handler 'd... | null | https://raw.githubusercontent.com/greglook/merkle-db/449f58005cac0390a40ea15f9bf5403443f3be7d/lib/core/test/merkle_db/test_utils.clj | clojure | (is (valid? s expr))
Asserts that the result of `expr` is valid for spec `s`.
Returns the conformed value.
(is (invalid? s expr))
Asserts that the result of `expr` is not valid for spec `s`. | (ns merkle-db.test-utils
(:require
[clojure.spec.alpha :as s]
[clojure.string :as str]
[clojure.test :as test]
[merkledag.link :as link]
[multihash.core :as multihash]
[puget.printer :as puget]))
(defn print-handler
[t]
(condp = t
multihash.core.Multihash
(puget/tagged-handler 'd... |
32b42cf4daf4387088abcbd3059f628ecb3e29fd2c52411604d83ab125adaddc | tdammers/sprinkles | Expandable.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
{-#LANGUAGE RankNTypes #-}
module Data.Expandable
( ExpandableM (..)
, expand
)
where
import qualified Data.Aeson as JSON
import Data.Text (Text)
import qualified Data.Text as Text
import Data.Vector (Vector)
import qualified Data.Vector as Vector
impo... | null | https://raw.githubusercontent.com/tdammers/sprinkles/a9161e4506427a3cf5f686654edc7ed9aa3ea82b/src/Data/Expandable.hs | haskell | #LANGUAGE RankNTypes # | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
module Data.Expandable
( ExpandableM (..)
, expand
)
where
import qualified Data.Aeson as JSON
import Data.Text (Text)
import qualified Data.Text as Text
import Data.Vector (Vector)
import qualified Data.Vector as Vector
import Data.HashMap.Strict (Has... |
eb40be16728d4d47890294833fe8a8f38e1f6d14670b7e45b8d2933d74244f14 | nygge/pran | pran_ethernet.erl | %%%-------------------------------------------------------------------
%%% File : pran_ethernet.erl
Author : < >
%%% Description :
%%%
Created : 27 Nov 2010 by < >
%%%-------------------------------------------------------------------
-module(pran_ethernet).
%% API
-export([decode/3]).
-include("ethern... | null | https://raw.githubusercontent.com/nygge/pran/2baf7f79720ebf40f5b18364127a6209515c7c91/src/pran_ethernet.erl | erlang | -------------------------------------------------------------------
File : pran_ethernet.erl
Description :
-------------------------------------------------------------------
API
====================================================================
API
===========================================================... | Author : < >
Created : 27 Nov 2010 by < >
-module(pran_ethernet).
-export([decode/3]).
-include("ethernet.hrl").
-define(IPv4,16#0800).
-define(IPv6,16#86DD).
decode(<<S1,S2,S3,S4,S5,S6,
D1,D2,D3,D4,D5,D6,
Type:16,
Payload/binary>>,
Stack,_Opts) ->
Protocol = protocol(Type),
Hdr = #e... |
f72804b1e161dee50e016b369fa784b3f81c500c587cd9ed2b91f78de88ace68 | privet-kitty/dufy | gen-cmf-data.lisp | ;;; This is a script file which generates fundamental data and saves
them as a file .
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload :dufy/internal))
(use-package :dufy/internal)
;;
data
;;
(defparameter *dest-path*
(uiop:merge-pathnames* "cmf-data.lisp" (uiop:current-lisp-file-pathn... | null | https://raw.githubusercontent.com/privet-kitty/dufy/c6ad03a9fca16a759c1c52449ac88420a536feca/src/core/gen-cmf-data.lisp | lisp | This is a script file which generates fundamental data and saves
Output
| them as a file .
(eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload :dufy/internal))
(use-package :dufy/internal)
data
(defparameter *dest-path*
(uiop:merge-pathnames* "cmf-data.lisp" (uiop:current-lisp-file-pathname)))
(defparameter cmf-table-cie1931
(make-array '(471 3) :element-typ... |
12874658de4b7765ebde36f9801fac7d59465df74ec5342d4621ab57474fc460 | camlp4/camlp4 | compile.ml | camlp4r
open Gramext;
value strict_parsing = ref False;
value keywords = ref [];
value _loc = Loc.ghost;
Watch the segmentation faults here ! the compiled file must have been
loaded in with the option pa_extend.cmo -meta_action .
loaded in camlp4 with the option pa_extend.cmo -meta_action. *)
value ma... | null | https://raw.githubusercontent.com/camlp4/camlp4/9b3314ea63288decb857239bd94f0c3342136844/camlp4/unmaintained/compile/compile.ml | ocaml | Names of symbols for error messages; code borrowed to grammar.ml
Compilation
get all entries connected together
main | camlp4r
open Gramext;
value strict_parsing = ref False;
value keywords = ref [];
value _loc = Loc.ghost;
Watch the segmentation faults here ! the compiled file must have been
loaded in with the option pa_extend.cmo -meta_action .
loaded in camlp4 with the option pa_extend.cmo -meta_action. *)
value ma... |
6ee4ac89abecb544f972fe1372c299fda065d24f36aeda63286aba50c616ee8b | emqx/emqx | emqx_coap_message.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
%% /
%%
Copyright ( c ) 2015 < >
%%--------------------------------------------------------------------
... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_gateway/src/coap/emqx_coap_message.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
/
--------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
... | The contents of this file are subject to the Mozilla Public License
Copyright ( c ) 2015 < >
Copyright ( c ) 2017 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASI... |
01b4da7c6909eab306e33079614ab24c0bfb0a62ef6ff3ae28bd0cb05875cd10 | exercism/haskell | Deque.hs | # LANGUAGE TupleSections #
module Deque (Deque, mkDeque, push, pop, shift, unshift) where
import Control.Concurrent.STM ( STM, TMVar, takeTMVar, putTMVar, readTMVar
, swapTMVar, atomically, newEmptyTMVar, newTMVar)
import Control.Monad (void)
data Node a = Node { nodeValue :: a
... | null | https://raw.githubusercontent.com/exercism/haskell/ae17e9fc5ca736a228db6dda5e3f3b057fa6f3d0/exercises/practice/linked-list/.meta/examples/success-standard/src/Deque.hs | haskell | # LANGUAGE TupleSections #
module Deque (Deque, mkDeque, push, pop, shift, unshift) where
import Control.Concurrent.STM ( STM, TMVar, takeTMVar, putTMVar, readTMVar
, swapTMVar, atomically, newEmptyTMVar, newTMVar)
import Control.Monad (void)
data Node a = Node { nodeValue :: a
... | |
b45de8d90aac95035ffad3c99e1500773cb56f3f6d59298b24422a6610379f91 | lspitzner/exference | Proxy.hs | module Data.Proxy where
data Proxy t = Proxy
instance ( Proxy * )
instance ( Proxy * )
-- instance Applicative (Proxy *)
-- instance Foldable (Proxy *)
instance ( Proxy * )
-- instance Bounded (Proxy k s)
instance ( Proxy k s )
instance Data . Eq . ( Proxy k s )
instance Data . Data . Data t = > Da... | null | https://raw.githubusercontent.com/lspitzner/exference/d8a336f8b9df905e54173339f78ba892daa3f688/environment/Proxy.hs | haskell | instance Applicative (Proxy *)
instance Foldable (Proxy *)
instance Bounded (Proxy k s)
instance Text.Read.Read (Proxy k s)
instance Show (Proxy k s)
instance type Rep (Proxy k t) | module Data.Proxy where
data Proxy t = Proxy
instance ( Proxy * )
instance ( Proxy * )
instance ( Proxy * )
instance ( Proxy k s )
instance Data . Eq . ( Proxy k s )
instance Data . Data . Data t = > Data . Data . Data ( Proxy * t )
instance Data . Ord . ( Proxy k s )
instance Ix ( Proxy k s )... |
9bcbd99af3068f91a1a1cbae367e5a75c2b8ff11693c5138746bf94c76f487e2 | wireapp/wire-server | Main.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/be524fac7eb46d5419c319d5f8161f0c518a7f69/tools/stern/exec/Main.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Main
( main,
)
where
... |
92a137762830f3fc993f69efcbfcfa11730dbf17079448f80c17661bfe554d78 | paracetamolo/elastic-mechanism | hashedHeap.ml | Copyright ( C ) 2014 , , ,
All Rights Reserved .
This file is distributed under the terms of the
GNU General Public License version 3 or later .
All Rights Reserved.
This file is distributed under the terms of the
GNU General Public License version 3 or later. *)
(**
Heap enriched with a ... | null | https://raw.githubusercontent.com/paracetamolo/elastic-mechanism/a0e0a9cc56bccf23475300e563371ca8ae6479b0/hashedHeap.ml | ocaml | *
Heap enriched with a hash for fast random access.
When adding an existing element the one with a smaller weight is kept.
internal
Assume the heap is correct everywhere except at node i
Restore the property everywhere
smaller than parent, go up
bigger than a child, go down
everything ok
inserts new obj... | Copyright ( C ) 2014 , , ,
All Rights Reserved .
This file is distributed under the terms of the
GNU General Public License version 3 or later .
All Rights Reserved.
This file is distributed under the terms of the
GNU General Public License version 3 or later. *)
module type HashedHeap =... |
9590818e68f3a3e5f1625d28837af384b4a3b0719acf367dd86e0d0eb8ac706c | mzp/coq-ide-for-ios | indfun_common.ml | open Names
open Pp
open Libnames
let mk_prefix pre id = id_of_string (pre^(string_of_id id))
let mk_rel_id = mk_prefix "R_"
let mk_correct_id id = Nameops.add_suffix (mk_rel_id id) "_correct"
let mk_complete_id id = Nameops.add_suffix (mk_rel_id id) "_complete"
let mk_equation_id id = Nameops.add_suffix id "_equation... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/CoqIDE/coq-8.2pl2/plugins/funind/indfun_common.ml | ocaml | ***************************************************************
Copy of the standart save mechanism but without the much too
slow reduction function
***************************************************************
and ident = Pfedit.get_current_proof_name ()
**************... | open Names
open Pp
open Libnames
let mk_prefix pre id = id_of_string (pre^(string_of_id id))
let mk_rel_id = mk_prefix "R_"
let mk_correct_id id = Nameops.add_suffix (mk_rel_id id) "_correct"
let mk_complete_id id = Nameops.add_suffix (mk_rel_id id) "_complete"
let mk_equation_id id = Nameops.add_suffix id "_equation... |
41eda385a0ed3fc8ef999c14aa4e0f6ed3150683cc22a7ad6a0872af03978af6 | VERIMAG-Polyhedra/VPL | ZNoneItv.ml | open BinInt
open BinNums
open Debugging
open DomainInterfaces
open Itv
open LinTerm
open NumC
open ZNone
module ZNItv =
struct
type itv = { low : ZN.t; up : ZN.t }
* val low : itv - > ZN.t *
let low x = x.low
* val up : itv - > ZN.t *
let up x = x.up
type t = itv
* top : itv *
let top =
{ low = ... | null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/extracted/ZNoneItv.ml | ocaml | * val fromZItv : ZItv.t -> itv *
* val single : coq_Z -> itv *
* val select : mode -> ZN.t -> ZN.t -> itv *
* val oppMode : mode -> mode *
* val bndLow : coq_Z -> itv *
* val isLOW : mode -> bool *
* val isUP : mode -> bool *
* val mulZNNZ : mode -> coq_Z -> coq_Z -> itv *
* val mulZNZN : mode -> coq_Z -> coq_Z -> itv ... | open BinInt
open BinNums
open Debugging
open DomainInterfaces
open Itv
open LinTerm
open NumC
open ZNone
module ZNItv =
struct
type itv = { low : ZN.t; up : ZN.t }
* val low : itv - > ZN.t *
let low x = x.low
* val up : itv - > ZN.t *
let up x = x.up
type t = itv
* top : itv *
let top =
{ low = ... |
b31d02fcbb3ad23d7d20e0eb8e93bc65331cc715818ba0e97f3afd7bd6c5c5cb | typelead/eta | tc157.hs | {-# LANGUAGE RankNTypes #-}
-- Test silly type synonyms
module ShouldCompile where
type C u a = u -- Note 'a' unused
foo :: (forall a. C u a -> C u a) -> u
foo x = undefined x
bar :: Num u => u
bar = foo (\t -> t + t)
-- The (Num u) should not get trapped inside the
-- /\a-abstraction which the compiler construct... | null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/tc157.hs | haskell | # LANGUAGE RankNTypes #
Test silly type synonyms
Note 'a' unused
The (Num u) should not get trapped inside the
/\a-abstraction which the compiler constructs for
This test tickles a bizarre corner case documented |
module ShouldCompile where
foo :: (forall a. C u a -> C u a) -> u
foo x = undefined x
bar :: Num u => u
bar = foo (\t -> t + t)
the arg to foo . But it might because it 's ( C u a ) !
as [ Silly Type Synonym ] in TcMType.lhs
|
5f233e0a5d67344234e6c3572b49ec5cb0a232d3a2d93d3dd13de07776038656 | startalkIM/ejabberd | ejabberd_stun.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2014 ,
%%% @doc
%%%
%%% @end
Created : 8 May 2014 by < >
%%%
ejabberd , Copyright ( C ) 2013 - 2016 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the terms ... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/ejabberd_stun.erl | erlang | -------------------------------------------------------------------
@doc
@end
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warrant... | @author < >
( C ) 2014 ,
Created : 8 May 2014 by < >
ejabberd , Copyright ( C ) 2013 - 2016 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public ... |
cb4621b4698010e60fb140e6b51b44fb33c119e0c5a6d44b21c7cffdcf0fef8c | rurban/clisp | should-eval.lisp | Copyright ( C ) 2002 - 2004 , < >
;; ALL RIGHTS RESERVED.
;;
$ I d : should - eval.lisp , v 1.7 2004/02/20 07:23:42 yuji Exp $
;;
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
;; * Redistributions of sou... | null | https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/sacla-tests/should-eval.lisp | lisp | ALL RIGHTS RESERVED.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributi... | Copyright ( C ) 2002 - 2004 , < >
$ I d : should - eval.lisp , v 1.7 2004/02/20 07:23:42 yuji Exp $
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT
THEORY OF LIABIL... |
9904e438032f014ba9acb41a501af6ed1575a019030ae43c144c9f4499b0b138 | frenetic-lang/netcore-1.0 | Nettle.hs | module Frenetic.Hosts.Nettle where
import Frenetic.Common
import Control.Concurrent.MVar
import qualified Data.ByteString.Lazy as BS
import qualified Data.Set as Set
import qualified Data.Map as Map
import Control.Exception.Base
import Control.Monad.State
import System.IO
import Frenetic.Topo (Switch,Port,Loc)
import ... | null | https://raw.githubusercontent.com/frenetic-lang/netcore-1.0/976b08b740027e8ed19f2d55b1e77f663bee6f02/src/Frenetic/Hosts/Nettle.hs | haskell | TODO(arjun): overflow
The errors below should *never* occur; if they do, we have a bug.
|Installs the static portion of the policy, then react.
a. Receive a message from the switch
b. Receive a policy
update!)
Maybe BUG: Arjun worried might not kill
create switch message channel
create kill message ch... | module Frenetic.Hosts.Nettle where
import Frenetic.Common
import Control.Concurrent.MVar
import qualified Data.ByteString.Lazy as BS
import qualified Data.Set as Set
import qualified Data.Map as Map
import Control.Exception.Base
import Control.Monad.State
import System.IO
import Frenetic.Topo (Switch,Port,Loc)
import ... |
d27cc9009af689c43d4800205af2cee57ee416b9e4cef224b404b677d5bedde1 | cram2/cram | geometry.lisp |
(in-package :cma)
(defclass 2d-point ()
((x :reader x :initarg :x)
(y :reader y :initarg :y)))
(defclass polygon ()
((vertices :initarg :vertices
:reader vertices))
(:documentation "Stores the vertices of a polygon."))
(defgeneric point-in-polygon (point polygon)
(:documentation "Returns T i... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_core/cram_math/src/geometry.lisp | lisp |
(in-package :cma)
(defclass 2d-point ()
((x :reader x :initarg :x)
(y :reader y :initarg :y)))
(defclass polygon ()
((vertices :initarg :vertices
:reader vertices))
(:documentation "Stores the vertices of a polygon."))
(defgeneric point-in-polygon (point polygon)
(:documentation "Returns T i... | |
97317c2cd717c26eddd0c6b7c3892ec4af8475049c9787902c6f2e253978679f | dongcarl/guix | javascript.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2017 Arun Isaac < >
Copyright © 2017 , 2019 , 2020 < >
Copyright © 2017 , 2018 , 2020 , 2021 < >
Copyright © 2017 , 2018 , 2019 , 2020 < >
Copyright © 2018 < >
Copyright © 2021 < >
;;;
;;; This file is part of GNU Guix.
;;;... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/javascript.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 © 2017 Arun Isaac < >
Copyright © 2017 , 2019 , 2020 < >
Copyright © 2017 , 2018 , 2020 , 2021 < >
Copyright © 2017 , 2018 , 2019 , 2020 < >
Copyright © 2018 < >
Copyright © 2021 < >
under the terms of the GNU General Public License as published by
You should have received a ... |
0690a24447ba444f4e7b356689571a3e3284999565a91286ee55ad1b7dcaca0b | f-o-a-m/kepler | SimpleStorageKeys.hs | module Tendermint.SDK.Test.SimpleStorageKeys
( countKey
, countsKey
, paidKey
) where
import Crypto.Hash (SHA256 (..), hashWith)
import Data.ByteArray (convert)
import Data.ByteString (ByteString)
import Data.String.Conversions (cs)
countK... | null | https://raw.githubusercontent.com/f-o-a-m/kepler/6c1ad7f37683f509c2f1660e3561062307d3056b/hs-abci-sdk/test/Tendermint/SDK/Test/SimpleStorageKeys.hs | haskell | module Tendermint.SDK.Test.SimpleStorageKeys
( countKey
, countsKey
, paidKey
) where
import Crypto.Hash (SHA256 (..), hashWith)
import Data.ByteArray (convert)
import Data.ByteString (ByteString)
import Data.String.Conversions (cs)
countK... | |
9bfa2efeec3f32c04ca761699cdc2faf065eb82900524ced2c29de17ac5f0ad6 | CodyReichert/qi | package.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; package.lisp --- TRIVIAL-FEATURES-TESTS package definition.
;;;
Copyright ( C ) 2007 ,
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to d... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/trivial-features-latest/tests/package.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
package.lisp --- TRIVIAL-FEATURES-TESTS package definition.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publ... | Copyright ( C ) 2007 ,
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-package :cl-user)
... |
fbbbbb7d2566b817cf68917a6e22af1b424974ec3258621a967c915e1c44e206 | struktured/ocaml-profiles | errors.ml | let ok_or_fail ret = match ret with
| `Ok o -> o
| `Error(b,s) -> failwith(string_of_bool b ^ ": " ^ s)
| _ -> failwith("Unexpected variant tag")
let wrap_exn f = try `Ok (f()) with e -> `Error e
let to_tuple = function
| `Ok _ as o -> o
| `Error e -> `Error (false, Printexc.to_string e)
let wrap_tuple f = wra... | null | https://raw.githubusercontent.com/struktured/ocaml-profiles/c3af799bf6db6a8ea5bb3e083440b3c0b15fecf4/lib/errors.ml | ocaml | let ok_or_fail ret = match ret with
| `Ok o -> o
| `Error(b,s) -> failwith(string_of_bool b ^ ": " ^ s)
| _ -> failwith("Unexpected variant tag")
let wrap_exn f = try `Ok (f()) with e -> `Error e
let to_tuple = function
| `Ok _ as o -> o
| `Error e -> `Error (false, Printexc.to_string e)
let wrap_tuple f = wra... | |
bc0a08f89718cd8e04aed502a70385a3192c5ec98b98bb5335a4a50d5558e541 | Ramarren/cffi-clutter | triangle.lisp | (in-package :clutter-examples)
;; hard to decide where to keep properties and/or how to best keep them synchronized
;; clearly, a task for Cells! maybe later
;; this is not a very good way to do it, but just to see if it work...
(defclass clutter-triangle ()
((color :accessor color-of :initform (list 1.0 1.0 1.0 1... | null | https://raw.githubusercontent.com/Ramarren/cffi-clutter/498314cf5aa593e57a724252ae65dcf4ac9a835d/examples/triangle.lisp | lisp | hard to decide where to keep properties and/or how to best keep them synchronized
clearly, a task for Cells! maybe later
this is not a very good way to do it, but just to see if it work...
(g-signal-stop-emission-by-name actor "paint")
to check if picking is reduced properly
check if picking picks correctly | (in-package :clutter-examples)
(defclass clutter-triangle ()
((color :accessor color-of :initform (list 1.0 1.0 1.0 1.0) :initarg :color)
(actor :accessor actor-of :initform (rectangle-new) :initarg :actor)))
(defun paint-triangle-with-color (actor r g b a)
(when (eql +true+ (actor-get-paint-visibility actor... |
ef767d8b83c460be9de981d0d1883f94821842098004cc4393292b4038543c1f | c-cube/ocaml-containers | t_immutarray.ml | module Test = (val Containers_testlib.make ~__FILE__ ())
open Test
open CCImmutArray
let print_array f a = to_list a |> Array.of_list |> Q.Print.(array f);;
eq ~printer:(print_array Q.Print.int) (of_list [ 0 ]) (set (of_list [ 5 ]) 0 0)
;;
eq ~printer:(print_array Q.Print.int)
(of_list [ 1; 3; 4; 5 ])
(set (of_l... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/tests/data/t_immutarray.ml | ocaml | module Test = (val Containers_testlib.make ~__FILE__ ())
open Test
open CCImmutArray
let print_array f a = to_list a |> Array.of_list |> Q.Print.(array f);;
eq ~printer:(print_array Q.Print.int) (of_list [ 0 ]) (set (of_list [ 5 ]) 0 0)
;;
eq ~printer:(print_array Q.Print.int)
(of_list [ 1; 3; 4; 5 ])
(set (of_l... | |
eea23a834120f36dbd888755e88b1b70f4a3a9713285d6a254094430885578c6 | elldritch/haskell-for-working-programmers | Main.hs | module Main (main) where
import Test.Hspec (hspec, describe, it, shouldBe)
main :: IO ()
main = hspec $ do
describe "Something" $ do
it "blah" $ do
1 + 1 `shouldBe` 2
| null | https://raw.githubusercontent.com/elldritch/haskell-for-working-programmers/601acb29205c7004c6830d7e593a32280d7699c0/exercises/002-hello-world-project/test/Main.hs | haskell | module Main (main) where
import Test.Hspec (hspec, describe, it, shouldBe)
main :: IO ()
main = hspec $ do
describe "Something" $ do
it "blah" $ do
1 + 1 `shouldBe` 2
| |
74e0ec84fa161c49575ba55a17ed069a9e1c7c75965d23db4700423a582fde2f | bobzhang/fan | cmo_decomp.ml |
(* Format of a .cmo file:
magic number (Config.cmo_magic_number)
absolute offset of compilation unit descriptor
block of relocatable bytecode
debugging information if any
compilation unit descriptor *)
let from filename =
let ic = open_in_bin filename in
let buffer = Misc.input_bytes ic (... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/tools/cmo_decomp.ml | ocaml | Format of a .cmo file:
magic number (Config.cmo_magic_number)
absolute offset of compilation unit descriptor
block of relocatable bytecode
debugging information if any
compilation unit descriptor |
let from filename =
let ic = open_in_bin filename in
let buffer = Misc.input_bytes ic (String.length Config.cmo_magic_number) in
if buffer = Config.cmo_magic_number then begin
let compunit_pos = input_binary_int ic in
seek_in ic compunit_pos;
let cu : compilation_unit = input_value ic in
cu
en... |
71efe6c3847f037f7c50d60291fe96ab5b7da586e66f85aa4cedaf82634aebb1 | haroldcarr/learn-haskell-coq-ml-etc | HC2.hs | # OPTIONS_GHC -fno - warn - missing - signatures #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
-- {-# LANGUAGE KindSignatures #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyK... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/type-level/2018-02-andres-loh-type-level-and-generic/src/HC2.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
{-# LANGUAGE KindSignatures #-}
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
p9... | # OPTIONS_GHC -fno - warn - missing - signatures #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE StandaloneDeriving #
# LANGUAGE UndecidableSuperClasses #
module HC2 where
import ... |
e43146d7d0d8fe215c12a22b11b5960c2841c81ed0e3a993e09dde971a7e199e | cl-rabbit/cl-bunny | redeliveries.lisp | (in-package :cl-bunny.examples)
(defun redeliveries ()
(log:info "=> Subscribing for messages using explicit acknowledgements model")
(let ((connection1 (connection.new))
(connection2 (connection.new))
(connection3 (connection.new)))
(log:info "Starting connections")
(connection.open conn... | null | https://raw.githubusercontent.com/cl-rabbit/cl-bunny/6da7fe161efc8d6bb0b8b09ac8efad03553d765c/examples/guides/queues/redeliveries.lisp | lisp | do some work
acknowledge some messages, they will be removed from the queue
(message.ack message :multiple nil)
some messages are not ack-ed and will remain in the queue for redelivery
<- short form
do some work | (in-package :cl-bunny.examples)
(defun redeliveries ()
(log:info "=> Subscribing for messages using explicit acknowledgements model")
(let ((connection1 (connection.new))
(connection2 (connection.new))
(connection3 (connection.new)))
(log:info "Starting connections")
(connection.open conn... |
9a08f531df869b7833d13fd0062496a07e43ebce77bb47102c307d91807bd358 | MaxBittker/cljsconlang | server.clj | (ns conlang.server
(:require [conlang.handler :refer [app]]
[config.core :refer [env]]
[ring.adapter.jetty :refer [run-jetty]])
(:gen-class))
(defn -main [& args]
(let [port (Integer/parseInt (or (env :port) "3000"))]
(run-jetty app {:port port :join? false})))
| null | https://raw.githubusercontent.com/MaxBittker/cljsconlang/9410cc5f3a9f298e6527054f3cede860ba9d82f0/src/clj/conlang/server.clj | clojure | (ns conlang.server
(:require [conlang.handler :refer [app]]
[config.core :refer [env]]
[ring.adapter.jetty :refer [run-jetty]])
(:gen-class))
(defn -main [& args]
(let [port (Integer/parseInt (or (env :port) "3000"))]
(run-jetty app {:port port :join? false})))
| |
d5a9791ab8fb34178370e41bc14026320b25bb76effccad0628dd0ce1b88b7ff | dmitryvk/sbcl-win32-threads | macroexpand.lisp | (in-package :sb-cltl2)
(defun macroexpand-all (form &optional environment)
(let ((sb-walker::*walk-form-expand-macros-p* t))
(sb-walker:walk-form form environment)))
| null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/contrib/sb-cltl2/macroexpand.lisp | lisp | (in-package :sb-cltl2)
(defun macroexpand-all (form &optional environment)
(let ((sb-walker::*walk-form-expand-macros-p* t))
(sb-walker:walk-form form environment)))
| |
01177df3fd2ae6941382270930ed7779366de198dc8b402774293610b39b14c6 | mlabs-haskell/plutus-simple-model | Class.hs | | Common interface for to Cardano conversions for mock Blockchain
module Cardano.Simple.Cardano.Class (
IsCardanoTx (..),
toUtxo,
) where
import Prelude
import Cardano.Ledger.BaseTypes
import Cardano.Ledger.Core qualified as C
import Cardano.Ledger.Crypto (StandardCrypto)
import Cardano.Ledger.Shelley.UTxO qua... | null | https://raw.githubusercontent.com/mlabs-haskell/plutus-simple-model/a390bbf51bd9a0ad8a27517d1e02be5fd6d3394e/cardano-simple/src/Cardano/Simple/Cardano/Class.hs | haskell | | Common interface for to Cardano conversions for mock Blockchain
module Cardano.Simple.Cardano.Class (
IsCardanoTx (..),
toUtxo,
) where
import Prelude
import Cardano.Ledger.BaseTypes
import Cardano.Ledger.Core qualified as C
import Cardano.Ledger.Crypto (StandardCrypto)
import Cardano.Ledger.Shelley.UTxO qua... | |
b7d19a15f1b29f0fcf191057eb6e2f295a5e42ee56fec2f1d0121598517ebb5d | 8c6794b6/guile-tjit | t-args-06.scm | (define (micro a)
(let lp ((a a) (b 0) (c 0) (d 0) (e 0) (f 0))
(if (< 0 a)
(lp (- a 1) (+ b 1) (+ c 1) (+ d 1) (+ e 1) (+ f 1))
(+ a b c d e f))))
(micro #e1e3)
| null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-args-06.scm | scheme | (define (micro a)
(let lp ((a a) (b 0) (c 0) (d 0) (e 0) (f 0))
(if (< 0 a)
(lp (- a 1) (+ b 1) (+ c 1) (+ d 1) (+ e 1) (+ f 1))
(+ a b c d e f))))
(micro #e1e3)
| |
da1aad99c5fba73b4666c2e9df78572f8e5e49f604be62a515f223a3ac19d986 | janestreet/universe | dynloader.mli | open! Core
open! Async
(** Ocaml plugin loader, from ocaml source file. Wrapper around Dynlink module, including
on the fly async ocaml compilation.
This is a low level module, casual user should rather use [Compiler] apart from
Make to create a dedicated Plugin loader. *)
(** See the labelled argument ... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ocaml_plugin/src/dynloader.mli | ocaml | * Ocaml plugin loader, from ocaml source file. Wrapper around Dynlink module, including
on the fly async ocaml compilation.
This is a low level module, casual user should rather use [Compiler] apart from
Make to create a dedicated Plugin loader.
* See the labelled argument [custom_warnings_spec] for what... | open! Core
open! Async
val default_disabled_warnings : int list
val warnings_spec : disabled_warnings:int list -> string
val default_warnings_spec : string
type t
type dynloader = t
type 'a create_arguments =
?in_dir:string
* The pathname has to be absolute . If not , the behavior is unspecified .
This i... |
51957a24cd1ed9f6b4e9c70d06b5a3bfc8259de54976c06331369492eadf9b81 | fyquah/hardcaml_zprize | four_step.mli | * Multipass NTT algorithm using the 4 step method .
open! Base
open Hardcaml
module Make (Config : Core_config.S) : sig
val logcores : int
module Gf = Gf.Signal
module Axi_stream : Hardcaml_axi.Stream.S
module Multi_parallel_cores : module type of Multi_parallel_cores.Make (Config)
module I : sig
type... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/hardcaml_ntt/src/four_step.mli | ocaml | * Multipass NTT algorithm using the 4 step method .
open! Base
open Hardcaml
module Make (Config : Core_config.S) : sig
val logcores : int
module Gf = Gf.Signal
module Axi_stream : Hardcaml_axi.Stream.S
module Multi_parallel_cores : module type of Multi_parallel_cores.Make (Config)
module I : sig
type... | |
7aac176d01097d064bbc8cb17ce7a73e1edd38601ca002595682f956b704cfab | janestreet/universe | test_stack.ml | open! Core
open Async
open Pam_test
open Import
open Pam
open Expect_test_helpers_core
open Expect_test_helpers_async
module Env = struct
type t =
{ key : string
; data : string
}
[@@deriving fields]
let create = Fields.create
let to_string t = sprintf "%s=%s" (key t) (data t)
end
let get_pam_con... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/pam/test_as_root/test_stack.ml | ocaml | open! Core
open Async
open Pam_test
open Import
open Pam
open Expect_test_helpers_core
open Expect_test_helpers_async
module Env = struct
type t =
{ key : string
; data : string
}
[@@deriving fields]
let create = Fields.create
let to_string t = sprintf "%s=%s" (key t) (data t)
end
let get_pam_con... | |
0097953cf74a5feab4e0b0324a4cfcab28f64a2fd86cc5d6be93e0d66d97d1e4 | bsaleil/lc | nucleic-f64v.scm | NUCLEIC -- 3D structure determination of a nucleic acid .
Author : ( )
;
Last modified : January 27 , 1996
;
; This program is a modified version of the program described in the paper:
;
, , , " Using Multilisp for Solving
; Constraint Satisfaction Problems: an Application to Nucleic Acid 3D
S... | null | https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/unit-tests/benchmarks/nucleic-f64v.scm | scheme |
This program is a modified version of the program described in the paper:
Constraint Satisfaction Problems: an Application to Nucleic Acid 3D
Computation".
The differences between this program and the original are described in
the paper:
-- MATH UTILITIES -------------------------------------------------... | NUCLEIC -- 3D structure determination of a nucleic acid .
Author : ( )
Last modified : January 27 , 1996
, , , " Using Multilisp for Solving
Structure Determination " published in the journal " Lisp and Symbolic
" ? ? ? " published in the " Journal of Functional Programming " .
(##define-ma... |
f43b50bdcbabdb1d5b885812e5deeedb33d6387528dffc89f2c7912b9187670f | haskell/containers | intmap-strictness.hs | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - orphans #
module Main (main) where
import Test.ChasingBottoms.IsBottom
import Test.Tasty (TestTree, TestName, defaultMain, testGroup)
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck (testProperty, Arbitrary(arbitrary), Fun)
#if __GLASGOW_HASKELL__ >= 806
import Test.T... | null | https://raw.githubusercontent.com/haskell/containers/ff3d6af31ab6a27b7c3b8556d06ffc464d9bcb67/containers-tests/tests/intmap-strictness.hs | haskell | ----------------------------------------------------------------------
* Properties
----------------------------------------------------------------------
** Strict module
----------------------------------------------------------------------
given values is not evaluated. This may change in the future, see
-------... | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - orphans #
module Main (main) where
import Test.ChasingBottoms.IsBottom
import Test.Tasty (TestTree, TestName, defaultMain, testGroup)
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck (testProperty, Arbitrary(arbitrary), Fun)
#if __GLASGOW_HASKELL__ >= 806
import Test.T... |
b9dac3295895a278ead75d2316782cc539d12f8bd2f7ec3cc9e56b89fcca0de1 | facebook/duckling | UK.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.Dimensions.UK
( allDimensions
) where
import Duckling.Dimensions.Types
allDimensions :... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Dimensions/UK.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.Dimensions.UK
( allDimensions
) where
import Duckling.Dimensions.Types
allDimensions :: [Seal Dimension]
allDimensions =
[ Seal Duration
, Seal Numeral
, Seal Ordinal
, Seal Time
]
|
7b17d316ee65a09450d79b22d4645393fe8fd9bb75b6bdcf1d611540ae8c48a7 | i-am-tom/learn-me-a-haskell | Bar.hs | # LANGUAGE TemplateHaskell #
module Bar where
bar = [|23|]
| null | https://raw.githubusercontent.com/i-am-tom/learn-me-a-haskell/08271f6cdd4fc88c26ed7a62ed1e786a900824be/vendor/doctest-0.16.0/test/extract/th/Bar.hs | haskell | # LANGUAGE TemplateHaskell #
module Bar where
bar = [|23|]
| |
b88a00774b1b64bad8cb760bbb2a3b853c02e5c294fe9aa7e2886b8e50e8b8f5 | aaronallen8455/hi-fi | Main.hs | # LANGUAGE DerivingVia #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DataKinds #
module Main (main) where
import Data.Aeson
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck
import HiFi
import HiFi.Aeson
main :: IO ()
main = defaultMa... | null | https://raw.githubusercontent.com/aaronallen8455/hi-fi/e3714aa71f052bcd77e1295e1a43f309e6565b76/hi-fi-aeson/test/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DerivingVia #
# LANGUAGE DataKinds #
module Main (main) where
import Data.Aeson
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.QuickCheck
import HiFi
import HiFi.Aeson
main :: IO ()
main = defaultMain testTree
testTree :: TestTree
t... |
f53fb9a20a53b93b85d85e708eb257181b13b83b020de438eac1f2718eb31b1d | gojek/bulwark | core.clj | (ns bulwark.core
(:require [com.netflix.hystrix.core :as hystrix])
(:import (com.netflix.hystrix HystrixCommand HystrixCommand$Setter HystrixCommandProperties
HystrixThreadPoolProperties HystrixExecutable)
(org.slf4j MDC)))
(defn capture-logging-context [f]
(let [contex... | null | https://raw.githubusercontent.com/gojek/bulwark/3d8e3381f43ac6a03d57151196b6cdd31d589c35/src/bulwark/core.clj | clojure | (ns bulwark.core
(:require [com.netflix.hystrix.core :as hystrix])
(:import (com.netflix.hystrix HystrixCommand HystrixCommand$Setter HystrixCommandProperties
HystrixThreadPoolProperties HystrixExecutable)
(org.slf4j MDC)))
(defn capture-logging-context [f]
(let [contex... | |
fc35f88649119a799fdaae4dd5bf6eb3104dd82c4c211d3c59711eae2ad865c0 | jaredly/unison.rs | hello.scm | ; (import matchable)
(display "Hello world\n")
(define (one a) (if (< a 10) a (two (+ a 1))))
(define (two a) (if (> a 15) (one (/ a 2)) (one (+ a 1))))
(define (plus a b) (+ a b))
(display (one 11))
(display (plus 3 4))
| null | https://raw.githubusercontent.com/jaredly/unison.rs/78e660aae7f77b96e373efdd65f7d5d8da4822c3/chicken/hello.scm | scheme | (import matchable) |
(display "Hello world\n")
(define (one a) (if (< a 10) a (two (+ a 1))))
(define (two a) (if (> a 15) (one (/ a 2)) (one (+ a 1))))
(define (plus a b) (+ a b))
(display (one 11))
(display (plus 3 4))
|
9c9d7698b985261c748b5ce7e7d27e08c231bdcd79d73d6901b44ea82d27f42e | arttuka/reagent-material-ui | step_icon.cljs | (ns reagent-mui.material.step-icon
"Imports @mui/material/StepIcon as a Reagent component.
Original documentation is at -ui/api/step-icon/ ."
(:require [reagent.core :as r]
["@mui/material/StepIcon" :as MuiStepIcon]))
(def step-icon (r/adapt-react-class (.-default MuiStepIcon)))
| null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/step_icon.cljs | clojure | (ns reagent-mui.material.step-icon
"Imports @mui/material/StepIcon as a Reagent component.
Original documentation is at -ui/api/step-icon/ ."
(:require [reagent.core :as r]
["@mui/material/StepIcon" :as MuiStepIcon]))
(def step-icon (r/adapt-react-class (.-default MuiStepIcon)))
| |
f3b7a4149460f9d171cb72b9e2fb3f0452bc6e73926ad33e61ac9bcab61da7a4 | techascent/tvm-clj | rocm.clj | (ns tvm-clj.impl.fns.tvm.intrin.rule.rocm
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "tvm.intrin.rule.rocm") | null | https://raw.githubusercontent.com/techascent/tvm-clj/1088845bd613b4ba14b00381ffe3cdbd3d8b639e/src/tvm_clj/impl/fns/tvm/intrin/rule/rocm.clj | clojure | (ns tvm-clj.impl.fns.tvm.intrin.rule.rocm
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "tvm.intrin.rule.rocm") | |
7f925888f03162a6261069983204f934fe3de79669fabc9ef82ac7f1a97f870f | equill/restagraph | dispatcher-files.lisp | Copyright 2020 - 2021 < >
;
Licensed under the GNU General Public License
- for details , see LICENSE.txt in the top - level directory
(in-package #:restagraph)
(declaim (optimize (compilation-speed 0)
(speed 2)
(safety 3)
(debug 3)))
(defun fi... | null | https://raw.githubusercontent.com/equill/restagraph/f850ffb8e7b2218d36b093bde61ed4a1129c6e16/src/dispatcher-files.lisp | lisp |
Simplify references to the relevant policy
Let's just check whether that's connected to a valid session.
Access policies: dispatch "deny" as early as possible
Access policies: deny unauthenticated requests where authentication is required
Access policies: is this an admin-only request?
Client fails to provide t... | Copyright 2020 - 2021 < >
Licensed under the GNU General Public License
- for details , see LICENSE.txt in the top - level directory
(in-package #:restagraph)
(declaim (optimize (compilation-speed 0)
(speed 2)
(safety 3)
(debug 3)))
(defun file... |
e8131f21a6553f9e67f47fe3453ff86d7bce62b11e7b078e8d36f8a09ea5ef6e | tqtezos/minter-sdk | MinterSdk.hs | -- | Commons for this repository.
module Lorentz.Contracts.MinterSdk
( -- * Types
FeeData(..)
-- * Helpers
, inBinFolder
) where
import Fmt (Buildable(..), genericF)
import Lorentz
import System.Environment (lookupEnv)
import System.FilePath ((</>))
----------------------------------------------------... | null | https://raw.githubusercontent.com/tqtezos/minter-sdk/127072de4cd8349b118c32666529e5805991dee8/packages/minter-contracts/src-hs/Lorentz/Contracts/MinterSdk.hs | haskell | | Commons for this repository.
* Types
* Helpers
--------------------------------------------------------------------------
Types
--------------------------------------------------------------------------
--------------------------------------------------------------------------
Helpers
---------------------------... | module Lorentz.Contracts.MinterSdk
FeeData(..)
, inBinFolder
) where
import Fmt (Buildable(..), genericF)
import Lorentz
import System.Environment (lookupEnv)
import System.FilePath ((</>))
data FeeData = FeeData
{ feeAddress :: Address
, feePercent :: Natural
}
customGeneric "FeeData" ligoCombLayou... |
1ec80bc658b011842cd32144599f7ae617499f07899f60febc572f4707c6d7de | cedlemo/OCaml-GI-ctypes-bindings-generator | Combo_box_text_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Combo_box_text_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Combo_box_text_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Combo_box_text_private"
| |
f0ab8c6343cc85b169c7ed08911b06fb6926d14938205e3216935dca81593c67 | kadena-io/chainweaver | ModuleRef.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE Recurs... | null | https://raw.githubusercontent.com/kadena-io/chainweaver/5d40e91411995e0a9a7e782d6bb2d89ac1c65d52/frontend/src/Frontend/ModuleExplorer/ModuleRef.hs | haskell | # LANGUAGE OverloadedStrings #
| Refererencing `Module`s.
License : BSD-style (see the file LICENSE)
* Get more specialized references:
* Get hold of a `Module`
* Pretty printing
----------------------------------------------------------------------------
----------------------------------------------------... | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecursiveDo #
# LANGUAGE ScopedTypeVariab... |
39999d6b48173a65adb7c596e5293d8e7bda5bed2680dba075885ec54c38d8db | YoshikuniJujo/test_haskell | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import Control.Monad
import SDL
main :: IO ()
main = do
initialize [
InitTimer, InitAudio, InitVideo, InitJoystick,
InitGameController, InitEvents ]
window <- createWindow "My SDL Applicsation" defaultWindow
renderer... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/d99a5ca858ce9c440406bf377bceb7b2a80d4f0a/packages/sdl2/try-sdl2/app/Main.hs | haskell | # LANGUAGE OverloadedStrings #
unless (null events) $ print events
unless qpressed (appLoop renderer) | # OPTIONS_GHC -Wall -fno - warn - tabs #
module Main where
import Control.Monad
import SDL
main :: IO ()
main = do
initialize [
InitTimer, InitAudio, InitVideo, InitJoystick,
InitGameController, InitEvents ]
window <- createWindow "My SDL Applicsation" defaultWindow
renderer <- createRenderer window (- 1) def... |
25604fbb0d9e239bf871e6ae0881c38b08ff2148ea45a18a4cf8cfb24c83218a | ktakashi/sagittarius-scheme | http-client.scm | -*- mode : scheme;coding : utf-8 -*-
;;;
;;; net/http-client.scm - Modern HTTP client
;;;
Copyright ( c ) 2021 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redist... | null | https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/f5b7cc00a6a76a400934b5b528b5b22bac05cd84/sitelib/net/http-client.scm | scheme | coding : utf-8 -*-
net/http-client.scm - Modern HTTP client
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of... | Copyright ( c ) 2021 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
( rfc http ) or ( rfc ) are not good as a modern... |
baf2761250ad1f57f65fafece4db14a83ed873b90936681a4cda58c931b1fd19 | mmark-md/mmark-ext | SkylightingSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module Text.MMark.Extension.SkylightingSpec (spec) where
import Test.Hspec
import Text.MMark.Extension.Skylighting
import Text.MMark.Extension.TestUtils
spec :: Spec
spec =
describe "skylighting" $ do
let to = withExt skylighting
context "when info string does not result ... | null | https://raw.githubusercontent.com/mmark-md/mmark-ext/cc7d035224d32a6133789d65cd0e130bcdbf8d2c/tests/Text/MMark/Extension/SkylightingSpec.hs | haskell | # LANGUAGE OverloadedStrings # |
module Text.MMark.Extension.SkylightingSpec (spec) where
import Test.Hspec
import Text.MMark.Extension.Skylighting
import Text.MMark.Extension.TestUtils
spec :: Spec
spec =
describe "skylighting" $ do
let to = withExt skylighting
context "when info string does not result in a successful lookup" $
it ... |
15a8a91134acabb640e3fd476323d3f0b00a403132089d882a28b7c35cf19a71 | onedata/op-worker | atm_workflow_execution_resume_tests.erl | %%%-------------------------------------------------------------------
@author
( C ) 2022 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% Tests of resuming atm workflow exe... | null | https://raw.githubusercontent.com/onedata/op-worker/2c347ac8c1a3f7f9723d4b1825bd915df0f49dde/test_distributed/suites/automation/execution/atm_workflow_execution_resume_tests.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
Tests of resuming atm workflow execution.
@end
-------------------------------------------------------------------
=======================================================... | @author
( C ) 2022 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(atm_workflow_execution_resume_tests).
-author("Bartosz Walkowicz").
-include("atm_workflow_execution_test.hrl").
-include("atm/atm_test_store.hrl").
-export([
resume_atm_workflow_execu... |
41bbe63fb8b7394020f62f18e7f61e7f288cb92969bc497dd9302d382893a2dc | John-Nagle/nqthm | sysload.lisp | Copyright ( C ) 1990 - 1994 Computational Logic , Inc. All Rights
;;; Reserved. See the file LICENSE in this directory for the
;;; complete license agreement.
;;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
;;;
;;; SYSLOAD.LISP
;;;
;;; Utility file to load Common Lisp macro... | null | https://raw.githubusercontent.com/John-Nagle/nqthm/aeafa016e424e9fba968a48bf7dab45ab96a3020/nqthm-1992/examples/fm9001-piton/fm9001/sysload.lisp | lisp | Reserved. See the file LICENSE in this directory for the
complete license agreement.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SYSLOAD.LISP
Utility file to load Common Lisp macros.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This loads... | Copyright ( C ) 1990 - 1994 Computational Logic , Inc. All Rights
(in-package "USER")
(progn
(backquote-setting 'nqthm)
on the size of the Akcl .
# + akcl ( setf si::*multiply - stacks * 4 )
# + akcl ( setf si::*notify - gbc * nil )
# + ( and akcl sparc ) ( setq compiler::*split - files * 20... |
c517c3ac17d48fdeafb722b42a80b74b8f289a83d894fc8129d44b6cb6998ea2 | ucsd-progsys/liquidhaskell | CaseOnRec.hs | {-@ LIQUID "--expect-any-error" @-}
module CaseOnRec where
data Parity = Even | Odd
{-@ f :: n:Int -> Parity / [if n >= 0 then n else -n] @-}
f :: Int -> Parity
f 0 = Even
f n = case f (if n < 0 then n + 1 else n - 1) of
Even -> Odd
Odd -> Even
@ relational f ~ f : : { n1 : _ - > _ ~ n2 : _ - > _
... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/177331c811145dab2606bc442389e0031d7db41b/tests/relational/neg/CaseOnRec.hs | haskell | @ LIQUID "--expect-any-error" @
@ f :: n:Int -> Parity / [if n >= 0 then n else -n] @ | module CaseOnRec where
data Parity = Even | Odd
f :: Int -> Parity
f 0 = Even
f n = case f (if n < 0 then n + 1 else n - 1) of
Even -> Odd
Odd -> Even
@ relational f ~ f : : { n1 : _ - > _ ~ n2 : _ - > _
| true : = > ( ( r1 n1 = = r2 n2 ) < = > ( ( ( n1 - n2 ) mod 2 ) = = 1 ) ) } @
... |
4758c93d8d83aa10a0b4cdd7cc7f6cebee5c9b2edfd60804e02a5d75fc45d6ac | kunstmusik/score | lc.clj | (ns score.lc
"Mini-language for music notation. Originally developed for live coding."
(:require [score.core :refer :all]
[score.freq :refer :all]
[clojure.string :refer [blank?]]
))
(def ^:private restsym
#"([rR])(([:>])(\d+))?")
(def ^:private notesym
#"([a-gA-G][sSbB]?)(... | null | https://raw.githubusercontent.com/kunstmusik/score/87b532ec2e3e273f077be9bdd878427a25d0534c/src/main/score/lc.clj | clojure | TODO - refactor out note symbol and rest processing | (ns score.lc
"Mini-language for music notation. Originally developed for live coding."
(:require [score.core :refer :all]
[score.freq :refer :all]
[clojure.string :refer [blank?]]
))
(def ^:private restsym
#"([rR])(([:>])(\d+))?")
(def ^:private notesym
#"([a-gA-G][sSbB]?)(... |
b12125df57afd96aa633e839f90238f84e8c3b99fdc48f0a5f072a653c3ce895 | MLstate/opalang | w_TypeAbbrevs.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/compiler/libqmlcompil/typer_w/w_TypeAbbrevs.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 , ... |
e45d24f9449a86853f72b10d34cc5117a4b6407f3e8a45cf8aa5691b5e730162 | dgtized/shimmers | triangulating_subdivisions.cljs | (ns shimmers.sketches.triangulating-subdivisions
"Playing with concepts from
-pleasing-triangle-subdivision."
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.common.quil :as cq]
[shimmers.math.geometry.triangle :as triangl... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/triangulating_subdivisions.cljs | clojure | Less randomization from depth, but roughly stays sorted if
always taking from front and adding to the back.
(sort-by by-depth) | (ns shimmers.sketches.triangulating-subdivisions
"Playing with concepts from
-pleasing-triangle-subdivision."
(:require
[quil.core :as q :include-macros true]
[quil.middleware :as m]
[shimmers.common.framerate :as framerate]
[shimmers.common.quil :as cq]
[shimmers.math.geometry.triangle :as triangl... |
b8bbfd6362efc618454858771a275b476f338b0799761368f4a1d65d96eda849 | dmitryvk/sbcl-win32-threads | early-step.lisp | single stepper for SBCL
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
;;;; pro... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/early-step.lisp | lisp | more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
Single stepping works by having compiler insert STEP-CONDITION
signalling forms into code compiled at high debug settings, and
having a handl... | single stepper for SBCL
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!IMPL")
building without SB - THREAD . With SB - THREAD , a slot in the thread
#... |
5c86314654307d30e466e7158849eed8010d0f0327046b1590c5d7170524f149 | andreasabel/helf | Abstract.hs | # LANGUAGE DeriveFunctor
, , , TypeSynonymInstances
, FlexibleInstances
, FlexibleContexts
, UndecidableInstances #
, DeriveFoldable
, DeriveTraversable
, TypeSynonymInstances
, FlexibleInstances
, FlexibleContexts
, UndecidableInstances #-}
module Abstract where
import Prelude hiding ... | null | https://raw.githubusercontent.com/andreasabel/helf/52bc10751f5dac7338adcb085553ba8157692420/src/Abstract.hs | haskell | * Abstract names and identifiers
| Names in the abstract syntax are unique.
^ Positive numbers come from user,
negative from system (e.g. quoting).
^ Name suggestion for printing.
| Local and global names.
^ Locally bound identifier.
^ Declared constant.
^ Defined identifier.
^ Shared expression identifier.... | # LANGUAGE DeriveFunctor
, , , TypeSynonymInstances
, FlexibleInstances
, FlexibleContexts
, UndecidableInstances #
, DeriveFoldable
, DeriveTraversable
, TypeSynonymInstances
, FlexibleInstances
, FlexibleContexts
, UndecidableInstances #-}
module Abstract where
import Prelude hiding ... |
4ff014d695c9a772eb58a6f8e9baa6ea4bdeb882593f3beee938195563da21ce | Bodigrim/poly | Laurent.hs | -- |
Module : Data . Poly . Sparse .
Copyright : ( c ) 2020
Licence : BSD3
Maintainer : < >
--
< polynomials > .
--
-- @since 0.4.0.0
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE PatternSynonyms #-}
module Data.Poly.S... | null | https://raw.githubusercontent.com/Bodigrim/poly/6c90b18f7cbbf3a4d5d1e25a05fe4aca2b4d31fa/src/Data/Poly/Sparse/Laurent.hs | haskell | |
@since 0.4.0.0
# LANGUAGE DataKinds #
# LANGUAGE PatternSynonyms #
| Create a monomial from a power and a coefficient.
@since 0.4.0.0
| Multiply a polynomial by a monomial, expressed as a power and a coefficient.
@since 0.4.0.0
| The polynomial 'X'.
@since 0.4.0.0
| Used to... | Module : Data . Poly . Sparse .
Copyright : ( c ) 2020
Licence : BSD3
Maintainer : < >
< polynomials > .
# LANGUAGE FlexibleContexts #
module Data.Poly.Sparse.Laurent
( Laurent
, VLaurent
, ULaurent
, unLaurent
, toLaurent
, leading
, monomial
, scale
... |
b696c95e6a495c894823be5be22893a8a54fd57f6fceadbbf3532227ffe13265 | startalkIM/ejabberd | http_management_change_muc_opts.erl | -module(http_management_change_muc_opts).
-export([handle/1]).
-include("ejabberd.hrl").
-include("logger.hrl").
-record(muc_online_room, {name_host = {<<"">>, <<"">>} :: {binary(), binary()} | '$1' | {'_', binary()} | '_',
pid = self() :: pid() | '$2' | '_' | '$1'}).
handle(Req) ->
{... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/bdea190b01d90c51a80dcd2d85a66ed9ee01a968/src/http_management_change_muc_opts.erl | erlang | -module(http_management_change_muc_opts).
-export([handle/1]).
-include("ejabberd.hrl").
-include("logger.hrl").
-record(muc_online_room, {name_host = {<<"">>, <<"">>} :: {binary(), binary()} | '$1' | {'_', binary()} | '_',
pid = self() :: pid() | '$2' | '_' | '$1'}).
handle(Req) ->
{... | |
e394fa8ebd2a155fe1237fc596561f7fc0dc4ab1ca1bb895a5f210a232a4dabc | galdor/tungsten | test.lisp | (setf *compile-verbose* nil)
(setf *load-verbose* nil)
;; Load and initialize ASDF
(let* ((current-directory
#+ccl (ccl:current-directory)
#-ccl *default-pathname-defaults*)
(load-pathname
(merge-pathnames *load-pathname* current-directory))
(root-directory
(make-pathn... | null | https://raw.githubusercontent.com/galdor/tungsten/5d6e71fb89af32ab3994c5b2daf8b902a5447447/utils/test.lisp | lisp | Load and initialize ASDF
Run all tests | (setf *compile-verbose* nil)
(setf *load-verbose* nil)
(let* ((current-directory
#+ccl (ccl:current-directory)
#-ccl *default-pathname-defaults*)
(load-pathname
(merge-pathnames *load-pathname* current-directory))
(root-directory
(make-pathname
:directory (bu... |
1ad1a3027fecbb1a6a9e08a47238d895c030533fdf71b74f0d5e06e6ae0be8b7 | ryo-imai-bit/Writing-An-Interpreter-In-Go-In-OCaml | test.ml | open Interpreter
include Lexer
include Token
module To_test = struct
let lex str = let rec gTokens lx ls =
let (lex, tok) = Lexer.nextToken lx in match tok with
| {t_type = Token.EOF; literal = ""} -> (lex, ls @ [tok])
| _ -> gTokens lex (ls @ [tok])
in let (_, tlist) = gTokens (Lexer.newLexer ... | null | https://raw.githubusercontent.com/ryo-imai-bit/Writing-An-Interpreter-In-Go-In-OCaml/20e8f3cee37f810aef82255a351fbb1411a0b3bd/test/lexer/test.ml | ocaml | Run it | open Interpreter
include Lexer
include Token
module To_test = struct
let lex str = let rec gTokens lx ls =
let (lex, tok) = Lexer.nextToken lx in match tok with
| {t_type = Token.EOF; literal = ""} -> (lex, ls @ [tok])
| _ -> gTokens lex (ls @ [tok])
in let (_, tlist) = gTokens (Lexer.newLexer ... |
7bbf2a4de251cedbc1cbb3bd1d1328afda69a8c986ad205b7f42aeb22ff30986 | ftovagliari/ocamleditor | resource_file_widget.ml |
OCamlEditor
Copyright ( C ) 2010 - 2014
This file is part of OCamlEditor .
OCamlEditor 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 y... | null | https://raw.githubusercontent.com/ftovagliari/ocamleditor/53284253cf7603b96051e7425e85a731f09abcd1/src/resource_file_widget.ml | ocaml |
button_add
button_remove
button_up, button_down
_data
* window
|
OCamlEditor
Copyright ( C ) 2010 - 2014
This file is part of OCamlEditor .
OCamlEditor 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 y... |
21f1f8396e6f6ae1a38be6d9b27f8a16fa5cae6ea7586ed91e9877cb239cb998 | ghc/ghc | DmdAnal.hs |
( c ) The GRASP / AQUA Project , Glasgow University , 1993 - 1998
-----------------
A demand analysis
-----------------
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
-----------------
... | null | https://raw.githubusercontent.com/ghc/ghc/93f0e3c49cea484bd6e838892ff8702ec51f34c3/compiler/GHC/Core/Opt/DmdAnal.hs | haskell | ---------------
---------------
---------------
---------------
All of it
************************************************************************
* *
\subsection{Top level stuff}
* ... |
( c ) The GRASP / AQUA Project , Glasgow University , 1993 - 1998
A demand analysis
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
A demand analysis
-}
module GHC.Core.Opt.DmdAnal
( DmdAnalOpts(..)
, dmdAnalProgram
)
where
import GHC.Prelu... |
14e1308ceac5f817d6ccd71f5e308dd3825ca3820b08f21bb3f5d1ed361f77a1 | clojure-emacs/enrich-classpath | jar.clj | (ns unit.cider.enrich-classpath.jar
(:require
[cider.enrich-classpath.jar :as sut]
[cider.enrich-classpath.jdk :as jdk]
[clojure.string :as string]
[clojure.test :refer [are deftest is testing]]))
(deftest wrap72
(testing "Wraps text every 72 characters, inserting one space of padding for every inserte... | null | https://raw.githubusercontent.com/clojure-emacs/enrich-classpath/6331eb6a4b3e54e068cfeadc149e49b73cde0f24/test/unit/cider/enrich_classpath/jar.clj | clojure | (ns unit.cider.enrich-classpath.jar
(:require
[cider.enrich-classpath.jar :as sut]
[cider.enrich-classpath.jdk :as jdk]
[clojure.string :as string]
[clojure.test :refer [are deftest is testing]]))
(deftest wrap72
(testing "Wraps text every 72 characters, inserting one space of padding for every inserte... | |
df65489e0bd06023c5be482b056c70e8cdc46005cffa193d8cc144e2672fc854 | sellout/YACC-is-dead | defsyntax.lisp | (in-package #:yacc-is-dead)
(defun make-new-parser ()
"Creates a new DEFSYNTAX parser, for holding rule-sets."
(make-hash-table))
(defvar *parser* (make-new-parser)
"The default DEFSYNTAX parser, which is modified by DEFSYNTAX.")
(defun get-type-parser (type &optional (parser *parser*))
"This combines the ru... | null | https://raw.githubusercontent.com/sellout/YACC-is-dead/9c5936b1740b3bb416774db4e31f538318a3f09e/defsyntax.lisp | lisp | (in-package #:yacc-is-dead)
(defun make-new-parser ()
"Creates a new DEFSYNTAX parser, for holding rule-sets."
(make-hash-table))
(defvar *parser* (make-new-parser)
"The default DEFSYNTAX parser, which is modified by DEFSYNTAX.")
(defun get-type-parser (type &optional (parser *parser*))
"This combines the ru... | |
c78774a021078651055a2b8ba93f9538e946da8243d80cb03bc2a31a337f7c88 | lipas-liikuntapaikat/lipas | admins.cljc | (ns lipas.data.admins)
(def all
{"city-sports" {:fi "Kunta / liikuntatoimi"
:en "City / sports"
:se "Kommun/ idrottsväsende"}
"city-education" {:fi "Kunta / opetustoimi"
:en "City / education"
... | null | https://raw.githubusercontent.com/lipas-liikuntapaikat/lipas/f60185b597d2a7fca5480b392cd33187bccfb34a/webapp/src/cljc/lipas/data/admins.cljc | clojure | (ns lipas.data.admins)
(def all
{"city-sports" {:fi "Kunta / liikuntatoimi"
:en "City / sports"
:se "Kommun/ idrottsväsende"}
"city-education" {:fi "Kunta / opetustoimi"
:en "City / education"
... | |
92e1ce80a8e5bacaef1467f6399f2ad7565c669888840939d98d48f9d8273193 | adaliu-gh/htdp | 12-212-214.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname 12-212-214) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-d... | null | https://raw.githubusercontent.com/adaliu-gh/htdp/a0fca8af2ae8bdcef40d56f6f45021dd92df2995/8-13%20Arbitrarily%20Large%20Data/12-212-214.rkt | racket | about the language level of this file in a form that our tools can easily process.
----------------------
DATA DEFINITIONS
----------------------
- '() or
- (cons 1String Word)
- '()
- (cons Word List-of-words)
--------------------------------
CONSTANTS
--------------------------------
---------------------
----... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname 12-212-214) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/batch-io)
a Word is one of :
interp... |
0d2d3f1359ae74a979c997663b25ea91ecbdc5aeba28c50508ce0e59253e51ee | geophf/1HaskellADay | Solution.hs | module Y2018.M11.D21.Solution where
-
From @fermatslibrary
" A curious identity involving π and e : "
1 / ( π² + 1 ) + 1 / ( 4π² + 1 ) + 1 / ( 9π² + 1 ) + 1 / ( 16π² + 1 ) + ... = 1 / ( e² - 1 )
How many terms do you have to go out for that equation to be accurate within
0.1 ? 0.01 ? 0.001 ? 0.0001 ? ... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M11/D21/Solution.hs | haskell | }
} | module Y2018.M11.D21.Solution where
-
From @fermatslibrary
" A curious identity involving π and e : "
1 / ( π² + 1 ) + 1 / ( 4π² + 1 ) + 1 / ( 9π² + 1 ) + 1 / ( 16π² + 1 ) + ... = 1 / ( e² - 1 )
How many terms do you have to go out for that equation to be accurate within
0.1 ? 0.01 ? 0.001 ? 0.0001 ? ... |
98ad3cff9926b85e15e5f7584b0d5e2bd39f7efdf90d039762531411a9f32bd9 | haskell/containers | Strict.hs | # LANGUAGE CPP #
#if defined(__GLASGOW_HASKELL__)
{-# LANGUAGE Safe #-}
#endif
#include "containers.h"
-----------------------------------------------------------------------------
-- |
-- Module : Data.Map.Merge.Strict
Copyright : ( c ) 2016
-- License : BSD-style
-- Maintainer :
-- Portabilit... | null | https://raw.githubusercontent.com/haskell/containers/f4aec7fe0d7abf16c3090f0cd632b4a9b683d433/containers/src/Data/Map/Merge/Strict.hs | haskell | # LANGUAGE Safe #
---------------------------------------------------------------------------
|
Module : Data.Map.Merge.Strict
License : BSD-style
Maintainer :
Portability : portable
maps. The key functions are 'merge' and 'mergeA'.
Each of these can be used with several different \"merge tactics... | # LANGUAGE CPP #
#if defined(__GLASGOW_HASKELL__)
#endif
#include "containers.h"
Copyright : ( c ) 2016
This module defines an API for writing functions that merge two
The ' Control . Category . Category ' , ' Applicative ' , and ' Monad ' instances for
' WhenMissing ' tactics are included because they... |
b424031df58cad84cf54644f2451a782823ad622c27b4c85a469c168ec834567 | let-def/owee | owee_elf.ml | [@@@ocaml.warning "+a-4-9-30-40-41-42"]
open Owee_buf
let read_magic t =
ensure t 4 "Magic number truncated";
let {buffer; position} = t in
let valid =
buffer.{position + 0} = 0x7f &&
buffer.{position + 1} = Char.code 'E' &&
buffer.{position + 2} = Char.code 'L' &&
buffer.{position + 3} = Char.c... | null | https://raw.githubusercontent.com/let-def/owee/b48987b99abc927fc1af23fea3d13de5db7944a4/src/owee_elf.ml | ocaml | Architecture type.
Object file version.
Entry point virtual address.
Section header table file offset.
Processor-specific flags.
Section header table entry size.
Section header table entry count.
Section header string table index.
Section header | [@@@ocaml.warning "+a-4-9-30-40-41-42"]
open Owee_buf
let read_magic t =
ensure t 4 "Magic number truncated";
let {buffer; position} = t in
let valid =
buffer.{position + 0} = 0x7f &&
buffer.{position + 1} = Char.code 'E' &&
buffer.{position + 2} = Char.code 'L' &&
buffer.{position + 3} = Char.c... |
b59a555f758be294370a2f88fa774d612a250778d9ae88e110b21c73cb08b223 | simonstl/introducing-erlang-2nd | hof.erl | -module(hof).
-export([tripler/2]).
tripler(Value, Function) -> 3 * Function(Value). | null | https://raw.githubusercontent.com/simonstl/introducing-erlang-2nd/607e9c85fb767cf5519d331ef6ed549aee51fe61/ch07/ex1-hof/hof.erl | erlang | -module(hof).
-export([tripler/2]).
tripler(Value, Function) -> 3 * Function(Value). | |
1a911f5f06285f778ab98445d5036af4dda94eaa694535997c3e770367bf55c4 | openbadgefactory/salava | restructure.clj | (ns salava.core.restructure
(:require [compojure.api.meta :refer [restructure-param]]
[salava.core.session :refer [wrap-rule]]
[salava.core.access :as access]))
(defmethod restructure-param :auth-rules
[_ rule acc]
(update-in acc [:middleware] conj [wrap-rule rule]))
(defmethod restructu... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/clj/salava/core/restructure.clj | clojure | (ns salava.core.restructure
(:require [compojure.api.meta :refer [restructure-param]]
[salava.core.session :refer [wrap-rule]]
[salava.core.access :as access]))
(defmethod restructure-param :auth-rules
[_ rule acc]
(update-in acc [:middleware] conj [wrap-rule rule]))
(defmethod restructu... | |
360634299c0002977425449d241c631245ea49f886b2b39055a66cb6997e4317 | odis-labs/onix | Utils.ml | module Option = struct
include Option
let map_default default f = function
| None -> default
| Some x -> f x
let or_fail msg t =
match t with
| Some x -> x
| None -> failwith msg
let if_some f t =
match t with
| Some x -> f x
| None -> ()
let ( or ) t default =
match t ... | null | https://raw.githubusercontent.com/odis-labs/onix/444245996f7c10697c566f2c60623cea9311cb72/src/onix_core/Utils.ml | ocaml | module Option = struct
include Option
let map_default default f = function
| None -> default
| Some x -> f x
let or_fail msg t =
match t with
| Some x -> x
| None -> failwith msg
let if_some f t =
match t with
| Some x -> f x
| None -> ()
let ( or ) t default =
match t ... | |
17ceac10003818f45f6873e7bed9651c78930da43c740c9d9592f2823b78775c | IndiscriminateCoding/clarity | either.ml | open Fn
type ('l, 'r) t =
Left of 'l | Right of 'r
let _Left x = Left x
let _Right x = Right x
let bimap l r = function
| Left x -> Left (l x)
| Right x -> Right (r x)
include Monad.Make2(struct
type nonrec ('l, 'r) t = ('l, 'r) t
let map f x = bimap id f x
let pure x = Right x
let ap = function
... | null | https://raw.githubusercontent.com/IndiscriminateCoding/clarity/163c16249cb3f01c4244b80be39e9aad0b1ca325/lib/types/either.ml | ocaml | open Fn
type ('l, 'r) t =
Left of 'l | Right of 'r
let _Left x = Left x
let _Right x = Right x
let bimap l r = function
| Left x -> Left (l x)
| Right x -> Right (r x)
include Monad.Make2(struct
type nonrec ('l, 'r) t = ('l, 'r) t
let map f x = bimap id f x
let pure x = Right x
let ap = function
... | |
2d5dcbda0c2faed486e1965089fea91b1f22c44fc6070435793991c6b429d29a | incoherentsoftware/defect-process | Behavior.hs | module Enemy.All.Axe.Behavior
( AxeEnemyBehaviorInstr(..)
, HurtType(..)
, AxeEnemyBehavior(..)
, isHurtBehavior
, isFallenBehavior
, isFallenHurtBehavior
, isWallSplatBehavior
, isWallHurtBehavior
, isIdleBehavior
, isAdvanceBehavior
, isRetreatBehavior
, isLaunchedBehav... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Enemy/All/Axe/Behavior.hs | haskell | module Enemy.All.Axe.Behavior
( AxeEnemyBehaviorInstr(..)
, HurtType(..)
, AxeEnemyBehavior(..)
, isHurtBehavior
, isFallenBehavior
, isFallenHurtBehavior
, isWallSplatBehavior
, isWallHurtBehavior
, isIdleBehavior
, isAdvanceBehavior
, isRetreatBehavior
, isLaunchedBehav... | |
010713c73244b39d0b15eb7c56a549877e9f3edf64a6f366ff96682f5224413a | kmi/irs | load.lisp | Mode : Lisp ; Package :
File created in WebOnto
(in-package "OCML")
(eval-when (eval load)
(ensure-ontology wsmo domain "ocml:library;domains;wsmo;load.lisp" ))
(def-ontology profile :includes (wsmo)
:type :domain
:author "vlad" :allowed-editors ("nil")) | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/profile/load.lisp | lisp | Package : |
File created in WebOnto
(in-package "OCML")
(eval-when (eval load)
(ensure-ontology wsmo domain "ocml:library;domains;wsmo;load.lisp" ))
(def-ontology profile :includes (wsmo)
:type :domain
:author "vlad" :allowed-editors ("nil")) |
d42785d2ad91753468cb7b76069934c008c8270fd5460021a34c203cfe4a7311 | joaopaulomoraes/7-days-of-clojure | cond.clj | (ns seven-days-of-clojure.cond)
(cond
(= 7 (inc 2)) false
(= 16 (* 8 2)) true)
(cond
(= 7 1) "1"
(and (> 7 3) (< 7 10)) "7 is over 3 and under 10"
:whatever-you-want "7 is other")
| null | https://raw.githubusercontent.com/joaopaulomoraes/7-days-of-clojure/ef26ca84f6e149ea44bdac13ef2e391e735b8347/day3/cond.clj | clojure | (ns seven-days-of-clojure.cond)
(cond
(= 7 (inc 2)) false
(= 16 (* 8 2)) true)
(cond
(= 7 1) "1"
(and (> 7 3) (< 7 10)) "7 is over 3 and under 10"
:whatever-you-want "7 is other")
| |
7444fe547c0c2f016e67b5951319267214105fe653538621bb75406a7220b993 | irastypain/sicp-on-language-racket | test_exercise_2_03f.rkt | #lang racket
(require rackunit
"../../src/lib/cons-point.rkt"
"../../src/chapter02/exercise_2_03f.rkt")
(define A (make-point 4.0 2.0))
(define C (make-point 3.0 0.0))
(define ABCD (make-rectangle A C))
(check-equal? (rectangle-perimeter ABCD) 6.0 (printf "test#1 2.03f passed\n"))
(check-equal? (r... | null | https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/test/chapter02/test_exercise_2_03f.rkt | racket | #lang racket
(require rackunit
"../../src/lib/cons-point.rkt"
"../../src/chapter02/exercise_2_03f.rkt")
(define A (make-point 4.0 2.0))
(define C (make-point 3.0 0.0))
(define ABCD (make-rectangle A C))
(check-equal? (rectangle-perimeter ABCD) 6.0 (printf "test#1 2.03f passed\n"))
(check-equal? (r... | |
5164cd9c295f17d31bc49a30f495ca439975ad0f204c775b3c9e2387473cf972 | zehaochen19/vanilla-lang | StaticError.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
module Vanilla.Static.TypeCheck.StaticError where
import Control.Monad.Except
import Data.Text ( Text )
import Vanilla.Syntax.Cons ( ConsVar )
import Vanilla.Syntax.Expr
import Vanill... | null | https://raw.githubusercontent.com/zehaochen19/vanilla-lang/d1e2bbd3125151ce2c0ddc20f735d3a55aeb6bc8/src/Vanilla/Static/TypeCheck/StaticError.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE FlexibleContexts #
module Vanilla.Static.TypeCheck.StaticError where
import Control.Monad.Except
import Data.Text ( Text )
import Vanilla.Syntax.Cons ( ConsVar )
import Vanilla.Syntax.Expr
import Vanilla.Syntax.Type
newtype ... |
1deff85d5e64c841084d788a38d96d48f869d6d9e809004d9840ab77c36ae513 | quark-lang/quark | IR.hs | module Core.Compiler.Definition.IR where
import Core.Inference.Type.AST
import Core.Inference.Type.Pretty ()
import qualified Data.Map as M
import Control.Monad.State
type Constructors = M.Map String String
type MonadCompiler m = (MonadState Constructors m, Monad m, MonadIO m)
data Expression
-- Exp... | null | https://raw.githubusercontent.com/quark-lang/quark/69c994371a8a838b2991e6d6c30fb45aa20e747a/app/Core/Compiler/Definition/IR.hs | haskell | Expressions
Statements | module Core.Compiler.Definition.IR where
import Core.Inference.Type.AST
import Core.Inference.Type.Pretty ()
import qualified Data.Map as M
import Control.Monad.State
type Constructors = M.Map String String
type MonadCompiler m = (MonadState Constructors m, Monad m, MonadIO m)
data Expression
= Lamb... |
4be04aaf205e7753e969862e4275de93a2316bd2172a15fc726f7bcd0a387837 | samrushing/irken-compiler | t_tls13.scm | ;; -*- Mode: Irken -*-
(include "lib/basis.scm")
(include "lib/map.scm")
(include "lib/urandom.scm")
(include "lib/codecs/hex.scm")
(include "lib/codecs/base64.scm")
(include "lib/rope.scm")
(include "lib/asn1/ber.scm")
(include "lib/crypto/ctbig.scm")
(include "lib/crypto/pem.scm")
(include "lib/crypto/sig.scm")
(inc... | null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_tls13.scm | scheme | -*- Mode: Irken -*-
to connect:
$ openssl s_client -connect hostname:4433 -alpn echo |
(include "lib/basis.scm")
(include "lib/map.scm")
(include "lib/urandom.scm")
(include "lib/codecs/hex.scm")
(include "lib/codecs/base64.scm")
(include "lib/rope.scm")
(include "lib/asn1/ber.scm")
(include "lib/crypto/ctbig.scm")
(include "lib/crypto/pem.scm")
(include "lib/crypto/sig.scm")
(include "lib/crypto/sodium... |
1121cfccd5913f0a63fec40a6ffd44ea64f9dc135c66634ba001d10bcf4302a2 | ds26gte/tex2page | scmxlate-skip-lines-tex2page.rkt | 3
| null | https://raw.githubusercontent.com/ds26gte/tex2page/da40f08ea5d5d9956d3a0fbe6d4448bcef9e4f00/scmxlate-skip-lines-tex2page.rkt | racket | 3
| |
90a5ec39db71229bf4bd1e7d4b01474a643143fddeaf953aa6065b2b99513ddf | lisp/de.setf.resource | resource-lifecycle.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.resource.implementation ; -*-
(in-package :de.setf.resource.implementation)
(:documentation
"This file defines tests for the persistence life-cycle for property objects."
(copyright
"Copyright 2010 [james anderson](mailto:) All... | null | https://raw.githubusercontent.com/lisp/de.setf.resource/27bf6dfb3b3ca99cfd5a6feaa5839d99bfb4d29e/test/resource-lifecycle.lisp | lisp | Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.resource.implementation ; -*-
without even the
(test:execute-test :resource.resource-lifecycle.**)
test atomic slots and
(print parents)
(print (person-parents baby))
(eq (wilbur::node "") (wilbur::node "")) |
(in-package :de.setf.resource.implementation)
(:documentation
"This file defines tests for the persistence life-cycle for property objects."
(copyright
"Copyright 2010 [james anderson](mailto:) All Rights Reserved"
"'de.setf.resource' is free software: you can redistribute it and/or modify it under the ter... |
5f17e32cea3aea6e4b30be2d07e7eb354d94ef9a2f60109b716385ee0cbffb4f | lambe-lang/nethra | nethra_toy_parser.mli | module Pass = Pass.Impl
(**/**)
module Basic = Basic
module Expression = Expression
module Bindings = Bindings
(**/**)
| null | https://raw.githubusercontent.com/lambe-lang/nethra/2ac839aa086a683d8e15abfa2f042b53875af36b/lib/nethra/toy/system/t01_parser/nethra_toy_parser.mli | ocaml | */*
*/* | module Pass = Pass.Impl
module Basic = Basic
module Expression = Expression
module Bindings = Bindings
|
4763662b0181e6f045ed8af440b42aada64005515f8fa10c2c254b878644b8c6 | haskell-hvr/missingh | Utils.hs | {-# LANGUAGE Safe #-}
arch - tag : Maybe utilities
Copyright ( c ) 2005 - 2011 < >
All rights reserved .
For license and copyright information , see the file LICENSE
Copyright (c) 2005-2011 John Goerzen <>
All rights reserved.
For license and copyright information, see the file LICENSE
-}
|
Mod... | null | https://raw.githubusercontent.com/haskell-hvr/missingh/e1a73bd9547db967b4e8d76a443000d06ce95ac4/src/Data/Maybe/Utils.hs | haskell | # LANGUAGE Safe #
| Like 'forceMaybe', but lets you customize the error message raised if
'Nothing' is supplied. | arch - tag : Maybe utilities
Copyright ( c ) 2005 - 2011 < >
All rights reserved .
For license and copyright information , see the file LICENSE
Copyright (c) 2005-2011 John Goerzen <>
All rights reserved.
For license and copyright information, see the file LICENSE
-}
|
Module : Data . Mayb... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.