_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 |
|---|---|---|---|---|---|---|---|---|
32a86ce1b0d1b73fcc7fe9d7843c317eed2dc00ac0db0e0b8d573f58e9727e66 | PrecursorApp/precursor | integrations.cljs | (ns frontend.components.integrations
(:require [cljs.core.async :as async]
[datascript.core :as d]
[frontend.components.common :as common]
[frontend.db :as fdb]
[frontend.sente :as sente]
[frontend.urls :as urls]
[frontend.utils :as utils]
... | null | https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src-cljs/frontend/components/integrations.cljs | clojure | (ns frontend.components.integrations
(:require [cljs.core.async :as async]
[datascript.core :as d]
[frontend.components.common :as common]
[frontend.db :as fdb]
[frontend.sente :as sente]
[frontend.urls :as urls]
[frontend.utils :as utils]
... | |
ab25d7968c5381eecb06de23b4f1241c87d9637bd6760418f03bd53fba088e44 | papachan/data-covid19-colombia | debug.cljs | (ns frontend.debug)
(def debug?
^boolean goog.DEBUG)
| null | https://raw.githubusercontent.com/papachan/data-covid19-colombia/e7e8f72336a0ad9d7d0561332dd1ce8248bfe7e4/src/cljs/frontend/debug.cljs | clojure | (ns frontend.debug)
(def debug?
^boolean goog.DEBUG)
| |
e86267b421746d6526a4e34ce803d4de8dd04f8426247bd93ab4dcd6a364138e | johnlawrenceaspden/hobby-code | scheduling.clj | ;; Scheduling
;; Consider a list of jobs with lengths and weights
(def jobs [{:length 2 :weight 2} {:length 1 :weight 3} {:length 3 :weight 1}])
;; The cost of running each job is the completion time multiplied by the weight
(defn cost [jobs]
(let [lengths (map :length jobs)
weights (map :weight jobs)
... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/scheduling.clj | clojure | Scheduling
Consider a list of jobs with lengths and weights
The cost of running each job is the completion time multiplied by the weight
We might actually take this model literally. Consider a company
and trying to work out where to put the energy of its staff.
Different ways of ordering the jobs result in differ... |
(def jobs [{:length 2 :weight 2} {:length 1 :weight 3} {:length 3 :weight 1}])
(defn cost [jobs]
(let [lengths (map :length jobs)
weights (map :weight jobs)
completions (reductions + lengths)
costs (map * weights completions)
cost (reduce + costs)]
[ cost costs weights completi... |
4b94630a43dd93aea637ed68960ae44392b06b20b814513fad37879030afae47 | scrintal/heroicons-reagent | inbox.cljs | (ns com.scrintal.heroicons.outline.inbox)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "round"
... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/inbox.cljs | clojure | (ns com.scrintal.heroicons.outline.inbox)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "round"
... | |
473f77d06154350c08a4674d6e0b3843fe681d2ece35511c44ec9612f11e43c8 | larcenists/larceny | with-win3.scm | (text
(label foo (ret))
(label bar (ret))
(if (while (!= eax 3)
(seq (pop eax)
(inc eax)
(< eax 10)))
(with-win bar
(alt z! a!))
(with-win foo
(push ebx))))
; foo:
00000000 C3 ret
; bar:
00000001 C3 ret
00000002 E... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/prims/with-win3.scm | scheme | foo:
bar:
| (text
(label foo (ret))
(label bar (ret))
(if (while (!= eax 3)
(seq (pop eax)
(inc eax)
(< eax 10)))
(with-win bar
(alt z! a!))
(with-win foo
(push ebx))))
00000000 C3 ret
00000001 C3 ret
00000002 EB07 ... |
c0caec1ac3ae449cb9ceb1b93dfea1301f59bef3b8b74a26d7065bd29c441217 | ajhc/ajhc | Options.hs | module FrontEnd.Syn.Options(parseOptions) where
import Data.Char
import Data.List
import Text.ParserCombinators.ReadP
parseOptions :: String -> [(String,String)]
parseOptions s = case readP_to_S parse s of
os -> head $ sortBy (\x y -> compare (negate $ length x) (negate $ length y)) [ x | (x,_) <- os ]
token x =... | null | https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/src/FrontEnd/Syn/Options.hs | haskell | module FrontEnd.Syn.Options(parseOptions) where
import Data.Char
import Data.List
import Text.ParserCombinators.ReadP
parseOptions :: String -> [(String,String)]
parseOptions s = case readP_to_S parse s of
os -> head $ sortBy (\x y -> compare (negate $ length x) (negate $ length y)) [ x | (x,_) <- os ]
token x =... | |
3ce33c327a6a5caca13dc14b0eb31c273233c6eb0b4a3c1b99a877b719e1ca22 | kaznum/programming_in_ocaml_exercise | fib.ml | let rec repeat f n x =
if n > 0 then repeat f (n-1) (f x) else x;;
let fib n =
let (fibn, _) =
repeat (fun (a, b) -> (b, (a + b))) n (0, 1)
in fibn;;
| null | https://raw.githubusercontent.com/kaznum/programming_in_ocaml_exercise/6f6a5d62a7a87a1c93561db88f08ae4e445b7d4e/ex4.2/fib.ml | ocaml | let rec repeat f n x =
if n > 0 then repeat f (n-1) (f x) else x;;
let fib n =
let (fibn, _) =
repeat (fun (a, b) -> (b, (a + b))) n (0, 1)
in fibn;;
| |
38cbf9fedc19fbdebe3dedf074c852a2bc30d2f1c901ecfea11d2aac8657b7d2 | ChicagoBoss/ChicagoBoss | custom_filters.erl | -module({{appid}}_custom_filters).
-compile(export_all).
% put custom filters in here, e.g.
%
% my_reverse(Value) ->
% lists:reverse(binary_to_list(Value)).
%
% "foo"|my_reverse => "oof"
| null | https://raw.githubusercontent.com/ChicagoBoss/ChicagoBoss/113bac70c2f835c1e99c757170fd38abf09f5da2/skel/src/view/lib/filter_modules/custom_filters.erl | erlang | put custom filters in here, e.g.
my_reverse(Value) ->
lists:reverse(binary_to_list(Value)).
"foo"|my_reverse => "oof" | -module({{appid}}_custom_filters).
-compile(export_all).
|
0ded8fbe57c34dca752d6c81e73791ce497c951fe5b991ee89917d6213ac3eb2 | zcaudate-me/lein-repack | sort.clj | (ns leiningen.repack.data.sort)
(defn all-branch-nodes [manifest]
(->> (:branches manifest)
(map (fn [[k m]]
(-> m
(select-keys [:coordinate :dependencies])
(assoc :id k))))))
(defn all-branch-deps [manifest]
(->> (:branches manifest)
(map (fn [[k m]... | null | https://raw.githubusercontent.com/zcaudate-me/lein-repack/1eb542d66a77f55c4b5625783027c31fd2dddfe5/src/leiningen/repack/data/sort.clj | clojure | (ns leiningen.repack.data.sort)
(defn all-branch-nodes [manifest]
(->> (:branches manifest)
(map (fn [[k m]]
(-> m
(select-keys [:coordinate :dependencies])
(assoc :id k))))))
(defn all-branch-deps [manifest]
(->> (:branches manifest)
(map (fn [[k m]... | |
16f4b39d77678eaeaa472d738a9f6422a10ee4858b44b3900379ff83f588b38a | clj-kondo/clj-kondo | namespaced_map.clj | (ns clj-kondo.impl.rewrite-clj.parser.namespaced-map
{:no-doc true}
(:require
[clj-kondo.impl.rewrite-clj.node :as node]
[clj-kondo.impl.rewrite-clj.node.seq :refer [namespaced-map-node]]
[clj-kondo.impl.rewrite-clj.reader :as reader]
[clojure.string :as str]))
(defn parse-map-ns
;; parse map namespa... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/626978461cbf113c376634cdf034d7262deb429f/parser/clj_kondo/impl/rewrite_clj/parser/namespaced_map.clj | clojure | parse map namespace inside reader tag | (ns clj-kondo.impl.rewrite-clj.parser.namespaced-map
{:no-doc true}
(:require
[clj-kondo.impl.rewrite-clj.node :as node]
[clj-kondo.impl.rewrite-clj.node.seq :refer [namespaced-map-node]]
[clj-kondo.impl.rewrite-clj.reader :as reader]
[clojure.string :as str]))
(defn parse-map-ns
[reader]
(reader/i... |
d6cb3e00bd1a005653620a57253492733900305772743799f31813b95692597f | aeternity/aeternity | aetx.erl | %%%-------------------------------------------------------------------
( C ) 2017 , Aeternity Anstalt
%%%-------------------------------------------------------------------
%%% @doc
ADT containing all different transactions
%%% @end
%%%-------------------------------------------------------------------
-module(ae... | null | https://raw.githubusercontent.com/aeternity/aeternity/d7704394e11f0e957d61dc6428ef37330230f72d/apps/aetx/src/aetx.erl | erlang | -------------------------------------------------------------------
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
===================================================================
Types
=============================... | ( C ) 2017 , Aeternity Anstalt
ADT containing all different transactions
-module(aetx).
-export([ accounts/1
, deep_fee/1
, deep_fee/2
, deserialize_from_binary/1
, fee/1
, from_db_format/1
, gas_limit/3
, used_gas/4
, inner_gas_limit/3
, fe... |
e67e60ca1e2721b863535a44ec661cfd409bdf794474f941d1219fb98b776ba9 | janestreet/core | test_quickcheck_signature.mli | open! Core
_ Check that the signature generated by deriving quickcheck is able to unify with the
corresponding implementation .
corresponding implementation. *)
module Foo (X : sig
type t
include Comparable.S with type t := t
include Quickcheckable with type t := t
end) : sig
type t1 = Set.M(X).... | null | https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/test/test_quickcheck_signature.mli | ocaml | open! Core
_ Check that the signature generated by deriving quickcheck is able to unify with the
corresponding implementation .
corresponding implementation. *)
module Foo (X : sig
type t
include Comparable.S with type t := t
include Quickcheckable with type t := t
end) : sig
type t1 = Set.M(X).... | |
663e6baf96920496999018678ca39a42faa6d7edc0a5df564fb072b7d25b2747 | sneeuwballen/zipperposition | Unif.mli |
(** {1 Unification and Matching} *)
This file is free software , part of Logtk . See file " license " for more details .
type unif_subst = Unif_subst.t
type subst = Subst.t
type term = InnerTerm.t
type ty = InnerTerm.t
type 'a sequence = ('a -> unit) -> unit
exception Fail
(** Raised when a unification/matching ... | null | https://raw.githubusercontent.com/sneeuwballen/zipperposition/333c4a5b0f8a726f414db901a77ca30921178da5/src/core/Unif.mli | ocaml | * {1 Unification and Matching}
* Raised when a unification/matching attempt fails
* {2 Signatures}
* {2 Base (scoped terms)}
* To be used only on terms without {!InnerTerm.Multiset} constructor
* Can we (syntactically) unify terms of this type? |
This file is free software , part of Logtk . See file " license " for more details .
type unif_subst = Unif_subst.t
type subst = Subst.t
type term = InnerTerm.t
type ty = InnerTerm.t
type 'a sequence = ('a -> unit) -> unit
exception Fail
val _allow_pattern_unif : bool ref
val _unif_bool : bool ref
val norm_log... |
f3d90e44e1a25b7c27e733314c9da7bae60f236267b3074d762b325b60b0ee70 | icicle-lang/zebra-ambiata | Setup.hs | # LANGUAGE CPP #
import Data.Char (isDigit)
import Data.List (intercalate)
import Data.Monoid ((<>))
import Distribution.InstalledPackageInfo
import Distribution.PackageDescription
import Distribution.Simple (buildHook, defaultMainWithHooks, pkgName, pkgVers... | null | https://raw.githubusercontent.com/icicle-lang/zebra-ambiata/394ee5f98b4805df2c76abb52cdaad9fd7825f81/zebra-cli/Setup.hs | haskell | # LANGUAGE CPP #
import Data.Char (isDigit)
import Data.List (intercalate)
import Data.Monoid ((<>))
import Distribution.InstalledPackageInfo
import Distribution.PackageDescription
import Distribution.Simple (buildHook, defaultMainWithHooks, pkgName, pkgVers... | |
456b448ed3dc0441cdad3f72fe8f8d4c398115d4b1892cb6f12fcbc427b40367 | bytekid/mkbtt | equation.mli | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mascott/src/equation.mli | ocaml | ** VALUES ***************************************************************** | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... |
ec7748589e817d18f046035fb69ab568c19f7658ddfd94a25e8d12e96563ee29 | strise/gintonic | index.ml |
let print_position (lexbuf: Lexing.lexbuf) =
let start_p = Lexing.lexeme_start_p lexbuf in
let end_p = Lexing.lexeme_end_p lexbuf in
Printf.sprintf "line %d: char %d..%d: %s"
start_p.pos_lnum
(start_p.pos_cnum - start_p.pos_bol + 1)
(end_p.pos_cnum - end_p.pos_bol + 1)
let print_token (lexbuf: Lexin... | null | https://raw.githubusercontent.com/strise/gintonic/25c0ebc4f492cac40f71de8dee4565f0d89bfa4b/packages/gintonic/src/index.ml | ocaml |
let print_position (lexbuf: Lexing.lexbuf) =
let start_p = Lexing.lexeme_start_p lexbuf in
let end_p = Lexing.lexeme_end_p lexbuf in
Printf.sprintf "line %d: char %d..%d: %s"
start_p.pos_lnum
(start_p.pos_cnum - start_p.pos_bol + 1)
(end_p.pos_cnum - end_p.pos_bol + 1)
let print_token (lexbuf: Lexin... | |
96ccf5fb43f2490b99fd3f57216fcb323b0583204a12a839419dbc7d40ffb2ad | fragnix/fragnix | Data.IP.Op.hs | {-# LANGUAGE Haskell2010 #-}
{-# LINE 1 "Data/IP/Op.hs" #-}
module Data.IP.Op where
import Data.Bits
import Data.IP.Addr
import Data.IP.Mask
import Data.IP.Range
----------------------------------------------------------------
|
> > > toIPv4 [ 127,0,2,1 ] ` masked ` intToMask 7
126.0.0.0
>>> toIPv4 [127,0,2,... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/Data.IP.Op.hs | haskell | # LANGUAGE Haskell2010 #
# LINE 1 "Data/IP/Op.hs" #
--------------------------------------------------------------
-------------------------------------------------------------- | module Data.IP.Op where
import Data.Bits
import Data.IP.Addr
import Data.IP.Mask
import Data.IP.Range
|
> > > toIPv4 [ 127,0,2,1 ] ` masked ` intToMask 7
126.0.0.0
>>> toIPv4 [127,0,2,1] `masked` intToMask 7
126.0.0.0
-}
class Eq a => Addr a where
|
The ' masked ' function takes an ' Addr ' and a con... |
4ab70be75749e887042a4c2cb356c6299279da35925ed4ca35a90b91c57a74d7 | gergoerdi/clash-compucolor2 | CRT5027.hs | {-# LANGUAGE NumericUnderscores, RecordWildCards #-}
# LANGUAGE ViewPatterns , LambdaCase #
module Hardware.Compucolor2.CRT5027 where
import Clash.Prelude
import RetroClash.Clock
import RetroClash.Port
import RetroClash.VGA
import RetroClash.Video
import RetroClash.Utils
import RetroClash.Barbies
import Control.Mona... | null | https://raw.githubusercontent.com/gergoerdi/clash-compucolor2/e5d6835918d25d7fcf9f0a9d7d381a1220331452/src/Hardware/Compucolor2/CRT5027.hs | haskell | # LANGUAGE NumericUnderscores, RecordWildCards # | # LANGUAGE ViewPatterns , LambdaCase #
module Hardware.Compucolor2.CRT5027 where
import Clash.Prelude
import RetroClash.Clock
import RetroClash.Port
import RetroClash.VGA
import RetroClash.Video
import RetroClash.Utils
import RetroClash.Barbies
import Control.Monad.State
import Barbies.TH
import Control.Lens hiding ... |
44d3ac73347bd07c53ab59adabd5935a107047009ee581027c93c2ac5de861fa | patrickt/fastsum | Main.hs | # LANGUAGE DataKinds , DeriveFunctor , FlexibleContexts , KindSignatures , RankNTypes , TypeApplications , TypeOperators , UndecidableInstances #
module Main where
import Data.Monoid hiding (Sum(..))
import Data.Sum
okay , let 's use Data . Sum to solve the expression problem
-- we'll build a little expression lan... | null | https://raw.githubusercontent.com/patrickt/fastsum/818067daa9568a9488af40b6bf11aace6687659a/examples/Main.hs | haskell | we'll build a little expression language, define an F-algebra, and print it out
you don't _have_ to use recursion schemes with Data.Sum, but they sure are nice
recursion schemes library, but who has time for that?
here's our expression type - note that l is a type-level list of functors
numbers
smart constructor.... | # LANGUAGE DataKinds , DeriveFunctor , FlexibleContexts , KindSignatures , RankNTypes , TypeApplications , TypeOperators , UndecidableInstances #
module Main where
import Data.Monoid hiding (Sum(..))
import Data.Sum
okay , let 's use Data . Sum to solve the expression problem
standard fixed point of a Functor .... |
0d9f33b7fa3051d551e89ace4586ba0212db33c112212901a8a9dff47ed5c3e6 | alexkehayias/chocolatier | events.cljs | (ns chocolatier.engine.systems.events
(:require [chocolatier.engine.events :as ev]))
(defn init-events-system
"Adds an :events entry to the state hashmap."
[state]
(assoc-in state ev/queue-path {}))
(defn event-system
"Clear out events queue. Returns update game state."
[state]
(ev/clear-events-queue s... | null | https://raw.githubusercontent.com/alexkehayias/chocolatier/6b77c1dbf10ef7ff83d0b5a2ebb9fda39edcde5a/src/cljs/chocolatier/engine/systems/events.cljs | clojure | (ns chocolatier.engine.systems.events
(:require [chocolatier.engine.events :as ev]))
(defn init-events-system
"Adds an :events entry to the state hashmap."
[state]
(assoc-in state ev/queue-path {}))
(defn event-system
"Clear out events queue. Returns update game state."
[state]
(ev/clear-events-queue s... | |
6d3500c8ff5e10c833a5c426b8044f8dc91e810fc0945e0a7f39c00d4c6fbac5 | db48x/xe2 | terrain.lisp | (in-package :cons-game)
;;; Sector exit
(define-prototype exit (:parent xe2:=launchpad=)
(tile :initform "launchpad")
(categories :initform '(:gateway :player-entry-point :action))
(description :initform "Exit the area by activating this object with the Z key."))
(define-method do-action exit ()
[exit *unive... | null | https://raw.githubusercontent.com/db48x/xe2/7896fcc69f5c6e28eaf6f6abb7966d6663370a66/cons/terrain.lisp | lisp | Sector exit
Indestructible wall of many colors
this is specialized below .
theme variables
other
Sector gateway can point to any kind of sector
Alien base consists of a grid of sectors
press Z to enter. Press F1 for help.") | (in-package :cons-game)
(define-prototype exit (:parent xe2:=launchpad=)
(tile :initform "launchpad")
(categories :initform '(:gateway :player-entry-point :action))
(description :initform "Exit the area by activating this object with the Z key."))
(define-method do-action exit ()
[exit *universe* :player [ge... |
f9adf88ac3ee01744886bc316f84a96d2bf511f28b15917585d77abf12ccc5a2 | gafiatulin/codewars | Monads.hs | Five Fundamental Monads
-- /
# LANGUAGE NoImplicitPrelude #
module Monads where
import Prelude hiding (Monad, Identity, Maybe(..), State, Reader, Writer)
import Data.Monoid
class Monad m where
return :: a -> m a
(>>=) :: m a -> (a -> m b) -> m b
data Identity a = Identity a
deriving (Show, Eq)
data M... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/4%20kyu/Monads.hs | haskell | / | Five Fundamental Monads
# LANGUAGE NoImplicitPrelude #
module Monads where
import Prelude hiding (Monad, Identity, Maybe(..), State, Reader, Writer)
import Data.Monoid
class Monad m where
return :: a -> m a
(>>=) :: m a -> (a -> m b) -> m b
data Identity a = Identity a
deriving (Show, Eq)
data Maybe ... |
f94b302b17c772328fe65a8541374bfd7c900c570db1c1da93accb19f599df83 | graninas/Functional-Design-and-Architecture | Language.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
module Andromeda.LogicControl.Language where
import Andromeda.Hardware.Common
import Andromeda.Hardware.Domain
import Andromeda.LogicControl.Domain
import Andromeda.Common
import qualified Andromeda.Hardware.Language.Hdl as L
import qualified Andromeda.H... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/66b04eabbf1fc4b3a6a9ca192bb1278c0132318f/Second-Edition-Manning-Publications/BookSamples/CH07/Section7p2p2/src/Andromeda/LogicControl/Language.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE GeneralizedNewtypeDeriving #
module Andromeda.LogicControl.Language where
import Andromeda.Hardware.Common
import Andromeda.Hardware.Domain
import Andromeda.LogicControl.Domain
import Andromeda.Common
import qualified Andromeda.Hardware.Language.Hdl as L
import qualified Andromeda.Hardware.Language.Device... |
f3af4f7a5d98048f98251593a0bda7a13ea4767a4ff585edde5a489b2bfab5a5 | lpw25/ecaml | typecheck.mli | (* Typing environments *)
type env
val empty : env
(* Unification variables representing types and dirt *)
type tyvar
type dirtvar
val print_type_and_effect : Format.formatter -> (tyvar * dirtvar) -> unit
(* Type inference *)
val extend_poly_env : loc:Location.t -> env -> tyvar -> Syntax.pattern -> env
val infer : e... | null | https://raw.githubusercontent.com/lpw25/ecaml/4588abb18436fb8a4983a353923ee667bf8c90a0/src/typecheck.mli | ocaml | Typing environments
Unification variables representing types and dirt
Type inference | type env
val empty : env
type tyvar
type dirtvar
val print_type_and_effect : Format.formatter -> (tyvar * dirtvar) -> unit
val extend_poly_env : loc:Location.t -> env -> tyvar -> Syntax.pattern -> env
val infer : env -> Syntax.term -> (tyvar * dirtvar)
|
55116e8aaa7bdf3b00fafc173b330838881c22f2a0800fccef801eca189f49fa | pascal-knodel/haskell-craft | E'9''5.hs | --
--
--
----------------
Exercise 9.5 .
----------------
--
--
--
module E'9''5 where
Notes :
--
-- - Use/See templates for structural induction.
-- - Note: Re/-member/-think/-view the definitions of "sum" and "++".
-- ------------
-- Proposition:
-- ------------
--
-- sum ( left ++ right ) = sum left +... | null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'9''5.hs | haskell |
--------------
--------------
- Use/See templates for structural induction.
- Note: Re/-member/-think/-view the definitions of "sum" and "++".
------------
Proposition:
------------
sum ( left ++ right ) = sum left + sum right
Proof By Structural Induction:
------------------------------
----... | Exercise 9.5 .
module E'9''5 where
Notes :
Induction Beginning ( I.B. ):
( Base case 1 . ) : < = > left : = [ ]
| ( Base case 1 . )
| ( Base case 1 . )
Induction Hypothesis ( I.H. ):
... |
fdf4562437d9e8a4ef22953723d95242081df4f5dae41853711ad35b6205124c | Clojure2D/clojure2d-examples | sphere.clj | (ns rt4.in-one-weekend.ch06b.sphere
(:require [rt4.in-one-weekend.ch06b.hittable :as hittable]
[rt4.in-one-weekend.ch06b.ray :as ray]
[fastmath.core :as m]
[fastmath.vector :as v]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/in_one_weekend/ch06b/sphere.clj | clojure | (ns rt4.in-one-weekend.ch06b.sphere
(:require [rt4.in-one-weekend.ch06b.hittable :as hittable]
[rt4.in-one-weekend.ch06b.ray :as ray]
[fastmath.core :as m]
[fastmath.vector :as v]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)... | |
71e49263651d709589dcfed3b116702ad7f706d0032af9c98bc88d99a94d809a | icicle-lang/icicle-ambiata | Lexer.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Icicle.Test.Sorbet.Lexical.Lexer where
import Icicle.Sorbet.Lexical.Lexer
import Icicle.Sorbet.Lexical.Syntax
import Icicle.Sorbet.Posit... | null | https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/test/Icicle/Test/Sorbet/Lexical/Lexer.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Icicle.Test.Sorbet.Lexical.Lexer where
import Icicle.Sorbet.Lexical.Lexer
import Icicle.Sorbet.Lexical.Syntax
import Icicle.Sorbet.Position
import Icicle.Test.A... |
6c326f540661278207118a4ead2f3027a646de9d63a1f8e667d4c1e81da0c9a4 | arenadotio/blue-http | connection.ml | open Core_kernel
open Async_kernel
open Async_unix
module Request = struct
include Cohttp.Request
include (
Make (Cohttp_async.Io) : module type of Make (Cohttp_async.Io) with type t := t)
end
module Response = struct
include Cohttp.Response
include (
Make (Cohttp_async.Io) : module type of Make (... | null | https://raw.githubusercontent.com/arenadotio/blue-http/f0f4ace55a5a25e92c479c45948f5f2905570ed5/src/connection.ml | ocaml | TODO: Cache DNS lookups until they expire
Don't used chunked encoding with an empty body
Use chunked encoding if there is a body | open Core_kernel
open Async_kernel
open Async_unix
module Request = struct
include Cohttp.Request
include (
Make (Cohttp_async.Io) : module type of Make (Cohttp_async.Io) with type t := t)
end
module Response = struct
include Cohttp.Response
include (
Make (Cohttp_async.Io) : module type of Make (... |
969d3b847bfabed57d73226d9bf5ca335a17ed46c99893c6552d03ace246b264 | evertedsphere/noether | Conv.hs | # LANGUAGE Trustworthy #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
module Lemmata.Conv
( StringConv(..)
, toS
, toSL
, Leniency(..)
) where
import Data.ByteString.Char8 as B
import Data.ByteString.Lazy.Char8 as LB
import Data.Text as T
import Data.Text.Encoding as T
import Data.Te... | null | https://raw.githubusercontent.com/evertedsphere/noether/c4223f64b9df5b0dbbeec1fea726bfff7f5810f5/library/Lemmata/Conv.hs | haskell | # LANGUAGE TypeSynonymInstances # | # LANGUAGE Trustworthy #
# LANGUAGE FlexibleInstances #
module Lemmata.Conv
( StringConv(..)
, toS
, toSL
, Leniency(..)
) where
import Data.ByteString.Char8 as B
import Data.ByteString.Lazy.Char8 as LB
import Data.Text as T
import Data.Text.Encoding as T
import Data.Text.Encoding.Error as T
import Data.Tex... |
0fa2674ea7af12a4cbe8bdf9e8408bf11a4523403b342bd82e286ef80d08de6a | DSiSc/why3 | Macrogen_nlparams.ml |
let (<<) f x = f x
open Macrogen_decls
open Macrogen_params
open Format
module rec X : module type of Macrogen_nlparams_sig = X
include X
module MakeDefaultP = functor (D0:Decls) -> struct
open D0
let nlfree_var_type_name _ fmt = fprintf fmt "int"
let default_variable_value _ fmt = fprintf fmt "(-1)"... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/examples/prover/macro_generator/Macrogen_nlparams.ml | ocaml | For some reason, this version generates a
VERY different wp structure ! |
let (<<) f x = f x
open Macrogen_decls
open Macrogen_params
open Format
module rec X : module type of Macrogen_nlparams_sig = X
include X
module MakeDefaultP = functor (D0:Decls) -> struct
open D0
let nlfree_var_type_name _ fmt = fprintf fmt "int"
let default_variable_value _ fmt = fprintf fmt "(-1)"... |
ca36ee8399e6ea60b304fc19a50cc7d6c24d015793fe0b9258b910eb9002dc8c | lisp/de.setf.xml | schema.lisp | 20100516T160429Z00
from # < doc - node # x3130277E >
(common-lisp:in-package "#") | null | https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/purl-org/vocab/changeset/schema/schema.lisp | lisp | 20100516T160429Z00
from # < doc - node # x3130277E >
(common-lisp:in-package "#") | |
7fd659871aabab4c569259346849d3416f4d94097bbe46854e9114896781eb4a | jlouis/graphql-erlang | failing_error_module.erl | -module(failing_error_module).
-export([crash/2, err/2]).
crash(_Ctx, x) ->
#{ message => "OK" }.
err(_Ctx, x) ->
#{ mesge => "OK" }.
| null | https://raw.githubusercontent.com/jlouis/graphql-erlang/4fd356294c2acea42a024366bc5a64661e4862d7/test/failing_error_module.erl | erlang | -module(failing_error_module).
-export([crash/2, err/2]).
crash(_Ctx, x) ->
#{ message => "OK" }.
err(_Ctx, x) ->
#{ mesge => "OK" }.
| |
b5b24996b5be872ab87af699bf80172174bb7c804eac513f98873bd476b13b62 | hakaru-dev/hakaru | Mh.hs | {-# LANGUAGE OverloadedStrings
, PatternGuards
, DataKinds
, GADTs
, KindSignatures
, RankNTypes
, TypeOperators
, FlexibleContexts #-}
module Main where
import Language.Hakaru.Pretty.Concrete
import Language.Hakaru.Syn... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/commands/Mh.hs | haskell | # LANGUAGE OverloadedStrings
, PatternGuards
, DataKinds
, GADTs
, KindSignatures
, RankNTypes
, TypeOperators
, FlexibleContexts # |
module Main where
import Language.Hakaru.Pretty.Concrete
import Language.Hakaru.Syntax.TypeCheck
import Language.Hakaru.Syntax.IClasses
import Language.Hakaru.Syntax.ABT (ABT(..), dupABT)
import Language.Hakaru.Syntax.AST (Term(..), Transform(..))
import ... |
81803b9c0d49a6a7ab49d095362ffdbdf9bdc726fbf10edd4ecfc76e96053360 | Jovvik/hi | Runner.hs | module Runner
( RunResult (..)
, evalFailsWith
, evalSame
, makeOp
, makeOpExpr
, maybeDiffErrors
, parseFails
, runHi
, runHiExpr
, runHiIO
, runHiIOEq
, showExpr
, (@!)
) where
import Control.Exception (SomeException, catch, try)
import Control.Monad.IO.Class (liftIO)
import Data.Functor.... | null | https://raw.githubusercontent.com/Jovvik/hi/6e56aabf04578ddf64b798dfa30296794c513e1c/hw3/test/Runner.hs | haskell | module Runner
( RunResult (..)
, evalFailsWith
, evalSame
, makeOp
, makeOpExpr
, maybeDiffErrors
, parseFails
, runHi
, runHiExpr
, runHiIO
, runHiIOEq
, showExpr
, (@!)
) where
import Control.Exception (SomeException, catch, try)
import Control.Monad.IO.Class (liftIO)
import Data.Functor.... | |
ff962efb2a158007bd148dc1334569d7700a94aed7dbb4fa73624938dc705e35 | metaocaml/ber-metaocaml | t330-compact-1.ml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
Gc.compact ();;
*
0 CONSTINT 42
2 PUSHACC0
... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-ocaml/t330-compact-1.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
Gc.compact ();;
*
0 CONSTINT 42
2 PUSHACC0
... | |
544aa6f7f44fa33e963f6ef453c9baa78525152a365f233f6f5eda1f36c314fa | aws-beam/aws-erlang | aws_backup.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
%% @doc Backup
%%
Backup is a unified backup service designed to protect Amazon Web Services
%% services and their associated data.
%%
Backup simplifies the creation , migration , restoration , and deletion of
%% backups, whil... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_backup.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
@doc Backup
services and their associated data.
backups, while also providing reporting and auditing.
====================================================================
API
====================================================================
@doc This action removes ... | See -beam/aws-codegen for more details .
Backup is a unified backup service designed to protect Amazon Web Services
Backup simplifies the creation , migration , restoration , and deletion of
-module(aws_backup).
-export([cancel_legal_hold/3,
cancel_legal_hold/4,
create_backup_plan/2,
... |
88ba82dfdcdc1f4f34c0eaf74f31c060845565fb1683222492998cc8acb557c1 | ghollisjr/cl-ana | package.lisp | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
;;;;
This file is part of cl - ana .
;;;;
;;;; cl-ana 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 ... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/generic-math/package.lisp | lisp |
cl-ana is free software: you can redistribute it and/or modify it
(at your option) any later version.
cl-ana is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public Lice... | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
This file is part of cl - ana .
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
... |
d470bc3ea019a7bb7751806687d856d375668ffb22ce8602c1195ad0f784d5c2 | retro/keechma-next-realworld-app | articles.cljs | (ns app.controllers.articles
(:require [keechma.next.controller :as ctrl]
[keechma.next.controllers.pipelines :as pipelines]
[keechma.next.controllers.entitydb :as edb]
[keechma.next.controllers.dataloader :as dl]
[keechma.next.toolbox.pipeline :as pp :refer [pswap! pre... | null | https://raw.githubusercontent.com/retro/keechma-next-realworld-app/47a14f4f3f6d56be229cd82f7806d7397e559ebe/classes/production/realworld-2/app/controllers/articles.cljs | clojure | (ns app.controllers.articles
(:require [keechma.next.controller :as ctrl]
[keechma.next.controllers.pipelines :as pipelines]
[keechma.next.controllers.entitydb :as edb]
[keechma.next.controllers.dataloader :as dl]
[keechma.next.toolbox.pipeline :as pp :refer [pswap! pre... | |
3e195b7e6c0cd7eac6576d15301e26782df6e54889557cefc3b3b1b6577e74cc | spl/ivy | dattrs.mli |
*
* Copyright ( c ) 2006 ,
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source... | null | https://raw.githubusercontent.com/spl/ivy/b1b516484fba637eb24e83d27555d273495e622b/src/deputy/dattrs.mli | ocaml |
*
* Copyright ( c ) 2006 ,
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source... | |
cd466cb410f34b1ae8df7aead30924a803f33f3b0b3e0d64305fcaab571d1b68 | kirasystems/aging-session | project.clj | (defproject kirasystems/aging-session "0.5.1-SNAPSHOT"
:description "Memory based ring session with expiry and time based mutation."
:url "-session"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:repositories [["releases" {:url ""
:sign-releases false
... | null | https://raw.githubusercontent.com/kirasystems/aging-session/33b03199d222a52fc0bfd3b8055fab9cca0ae15b/project.clj | clojure | (defproject kirasystems/aging-session "0.5.1-SNAPSHOT"
:description "Memory based ring session with expiry and time based mutation."
:url "-session"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:repositories [["releases" {:url ""
:sign-releases false
... | |
b6235203dd6219bfdfd246aa48f8533957a142bb49ebb7812a718e446fdcb57d | racket/rhombus-prototype | color.rkt | #lang racket/base
(require racket/class
syntax-color/racket-lexer
"../lex.rkt"
"../lex-comment.rkt"
"like-text.rkt"
"input.rkt")
(define (lex-all-input in fail
#:keep-type? [keep-type? #t]
#:error-ok? [error-ok? #f])
(let loop... | null | https://raw.githubusercontent.com/racket/rhombus-prototype/9c7d1812061de31c60b15d12cd221428c0b72577/shrubbery/tests/color.rkt | racket | Check that the color lexer doesn't crash, even if the input is ill-formed
try dropping (random) characters:
Check tracking of comment regions.
The "^"s here show the range of commenting. Each "^" will be stripped
to produce the actual input.
«
(1 2 ) 3)}^ | #lang racket/base
(require racket/class
syntax-color/racket-lexer
"../lex.rkt"
"../lex-comment.rkt"
"like-text.rkt"
"input.rkt")
(define (lex-all-input in fail
#:keep-type? [keep-type? #t]
#:error-ok? [error-ok? #f])
(let loop... |
054d25b9fa1772750b2bde001c35263bf7d79a315b59b01382fea91c1df7fbc0 | links-lang/links | alias.mli | open Lens_utility
type t = string [@@deriving show, eq, sexp]
module Map : sig
include Lens_map.S with type key = t
end
module Set : sig
include Lens_set.S with type elt = t
val t_of_sexp : Sexp.t -> t
val sexp_of_t : t -> Sexp.t
module Set : sig
include Lens_set.S with type elt = t
val is_disj... | null | https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/lens/alias.mli | ocaml | open Lens_utility
type t = string [@@deriving show, eq, sexp]
module Map : sig
include Lens_map.S with type key = t
end
module Set : sig
include Lens_set.S with type elt = t
val t_of_sexp : Sexp.t -> t
val sexp_of_t : t -> Sexp.t
module Set : sig
include Lens_set.S with type elt = t
val is_disj... | |
54a986c6f2518f1b7bdb670eefe6f72cd12469650ac1bffa7d68054c5967d6ef | mfoemmel/erlang-otp | mod_auth_plain.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1998 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/inets/src/http_server/mod_auth_plain.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1998 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(mod_auth_plain).
-include("httpd.h... |
ba1490182b3756815075d0f3660f6d93f59bd49d94a17c207db6c732cb7bb471 | Relph1119/sicp-solutions-manual | p1-45-expt.scm | (load "src/practices/ch01/p1-43-rec-repeated.scm")
(define (expt base n)
(if (= n 0)
1
((repeated (lambda (x) (* base x)) n) 1)))
| null | https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/practices/ch01/p1-45-expt.scm | scheme | (load "src/practices/ch01/p1-43-rec-repeated.scm")
(define (expt base n)
(if (= n 0)
1
((repeated (lambda (x) (* base x)) n) 1)))
| |
83dd7c27fc65c950ce545e9c71ebb01e36974f1856dde13e3070646daba0a297 | sdiehl/elliptic-curve | BrainpoolP512T1.hs | module Data.Curve.Weierstrass.BrainpoolP512T1
( module Data.Curve.Weierstrass
, Point(..)
* curve
, module Data.Curve.Weierstrass.BrainpoolP512T1
) where
import Protolude
import Data.Field.Galois
import GHC.Natural (Natural)
import Data.Curve.Weierstrass
--------------------------------------------------... | null | https://raw.githubusercontent.com/sdiehl/elliptic-curve/445e196a550e36e0f25bd4d9d6a38676b4cf2be8/src/Data/Curve/Weierstrass/BrainpoolP512T1.hs | haskell | -----------------------------------------------------------------------------
Types
-----------------------------------------------------------------------------
# INLINABLE a_ #
# INLINABLE h_ #
-----------------------------------------------------------------------------
Parameters
---------------------------------... | module Data.Curve.Weierstrass.BrainpoolP512T1
( module Data.Curve.Weierstrass
, Point(..)
* curve
, module Data.Curve.Weierstrass.BrainpoolP512T1
) where
import Protolude
import Data.Field.Galois
import GHC.Natural (Natural)
import Data.Curve.Weierstrass
| curve .
data BrainpoolP512T1
| Field of p... |
6a7b7d6273661a767a75889ce329548f0213db3b5e551edead6e5fe96e73e521 | input-output-hk/plutus | Utils.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeFamilies #-}
module PlutusCore.Generators.QuickCheck.Utils where
import PlutusCore.Default
import PlutusCore.MkPlc hiding (error)
import PlutusCore.Name
import PlutusCore.Pretty
import PlutusIR
import PlutusIR.Compiler.Datatype
import PlutusIR.Core.Instance.Pre... | null | https://raw.githubusercontent.com/input-output-hk/plutus/b82a724f4012e62879e0d6bf9986162dc5c54981/plutus-core/testlib/PlutusCore/Generators/QuickCheck/Utils.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
| Bind a value to a name in a property so that
it is displayed as a `name = thing` binding if the
property fails.
| Like `forAllShrink` but displays the bound value as
a named pretty-printed binding like `letCE`
| Check that a list of potential counter... |
module PlutusCore.Generators.QuickCheck.Utils where
import PlutusCore.Default
import PlutusCore.MkPlc hiding (error)
import PlutusCore.Name
import PlutusCore.Pretty
import PlutusIR
import PlutusIR.Compiler.Datatype
import PlutusIR.Core.Instance.Pretty.Readable
import PlutusIR.Subst
import Data.Kind qualified as GHC
... |
ffc977c779ba8916ab99f1cdf8c57cc7c4dd4d0c0a41df6118fb3c7af78951fe | Lautaro-Garcia/cl-notify | hints.lisp | (in-package :cl-notify)
(defun make-hint (name types values)
(let ((values-as-list (if (listp values) values (list values))))
`(,name (,types ,@values-as-list))))
(defun make-urgency-hint (urgency-level)
(make-hint "urgency" '(:byte) urgency-level))
(defun low-urgency-hint ()
(make-urgency-hint 0))
(defun... | null | https://raw.githubusercontent.com/Lautaro-Garcia/cl-notify/75045f67e897706da4a22197494e7d422c4f9063/src/hints.lisp | lisp | (in-package :cl-notify)
(defun make-hint (name types values)
(let ((values-as-list (if (listp values) values (list values))))
`(,name (,types ,@values-as-list))))
(defun make-urgency-hint (urgency-level)
(make-hint "urgency" '(:byte) urgency-level))
(defun low-urgency-hint ()
(make-urgency-hint 0))
(defun... | |
e9a28907ed85848b9ef627ced7844c863a34f61f7bc8f1c30f35ea71d3c571c8 | fizruk/rzk | Pretty.hs | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Rzk.Free.Syntax.FreeScoped.Pretty where
import Bound.Scope
import Bound.Var
import Data.Bifoldable
import Data.Bifunctor
import Data.Text.Prettyprint.Doc
import Rzk.Free.Syntax.FreeScop... | null | https://raw.githubusercontent.com/fizruk/rzk/3322838a008baee0a775b0d057c041647daa9ccc/rzk/src/Rzk/Free/Syntax/FreeScoped/Pretty.hs | haskell | | Pretty-print an untyped term. | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Rzk.Free.Syntax.FreeScoped.Pretty where
import Bound.Scope
import Bound.Var
import Data.Bifoldable
import Data.Bifunctor
import Data.Text.Prettyprint.Doc
import Rzk.Free.Syntax.FreeScop... |
f26b4c94522be75e316a39008feb18292e3a95dcd9c9b5f1411521d156341ce1 | ghilesZ/geoml | circle.mli | (** Circle manipulation *)
type t = private {center: Point.t; radius: float}
val make : Point.t -> float -> t
val center : t -> Point.t
val radius : t -> float
val translate : float -> float -> t -> t
val reflection : Point.t -> t -> t
val rotate : t -> Point.t -> float -> t
(** radian rotation. [rotate c p f] r... | null | https://raw.githubusercontent.com/ghilesZ/geoml/19af3bcc3e9e8c865ad5a3ea73e3736c0c7b7e7b/src/circle.mli | ocaml | * Circle manipulation
* radian rotation. [rotate c p f] returns the rotated circle of [c] with
[p] as rotation center and [f] a angle in radian
* Same as rotate but the angle is given in degree
* tangent c p returns the tangent of circle c going through point p. p must
lie on c's boundary, otherwise behaviou... |
type t = private {center: Point.t; radius: float}
val make : Point.t -> float -> t
val center : t -> Point.t
val radius : t -> float
val translate : float -> float -> t -> t
val reflection : Point.t -> t -> t
val rotate : t -> Point.t -> float -> t
val rotate_angle : t -> Point.t -> float -> t
val contains : t... |
9b08ecf4c06796d3eafa62d1a0a0f76a69a33ceb21238a14ccc7861a49682f81 | murbard/plebeia | test_utils.ml | open Plebeia.Plebeia_impl
let timed f =
let t1 = Unix.gettimeofday () in
let res = Error.protect f in
let t2 = Unix.gettimeofday () in
(res, t2 -. t1)
let random_segment ?length st =
let open Path in
let open Random.State in
let length =
match length with
1 .. 223
| Some l -> l
in
let re... | null | https://raw.githubusercontent.com/murbard/plebeia/95a0eed6f7b8c6836d15032557467a3e93bd83b8/tests/test_utils.ml | ocaml | open Plebeia.Plebeia_impl
let timed f =
let t1 = Unix.gettimeofday () in
let res = Error.protect f in
let t2 = Unix.gettimeofday () in
(res, t2 -. t1)
let random_segment ?length st =
let open Path in
let open Random.State in
let length =
match length with
1 .. 223
| Some l -> l
in
let re... | |
3bb4b567e8169908f4914639f7dab8d9375efe68f52164219db9b846429a2430 | manuel-serrano/bigloo | eval.scm | ;*---------------------------------------------------------------------*/
* serrano / prgm / project / bigloo / recette / eval.scm * /
;* */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/recette/eval.scm | scheme | *---------------------------------------------------------------------*/
* */
* */
* On fait des tests pour tester eval. */
*---------------------------... | * serrano / prgm / project / bigloo / recette / eval.scm * /
* Author : * /
* Creation : Tue Nov 3 14:42:03 1992 * /
* Last change : Sun Nov 5 20:43:11 2017 ( serrano ) * /
(module r... |
41599876ab66edfeaeafa087a5f431ef9287cfd65d40311f43cc2b03f7395603 | UU-ComputerScience/js-asteroids | Draw.hs | {-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------------------
| Module : Draw
Copyright : ( c ) 2003
License : wxWindows
Maintainer :
Stability : provisional
Portability : portable
Drawing .
... | null | https://raw.githubusercontent.com/UU-ComputerScience/js-asteroids/b7015d8ad4aa57ff30f2631e0945462f6e1ef47a/wxasteroids/src/Graphics/UI/WXCore/Draw.hs | haskell | # OPTIONS -fglasgow-exts #
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
* DC
** Creation
** Draw state
** Double buffering
* Font
* Brush
* Pen
--------------------------------------... | | Module : Draw
Copyright : ( c ) 2003
License : wxWindows
Maintainer :
Stability : provisional
Portability : portable
Drawing .
Copyright : (c) Daan Leijen 2003
License : wxWindows
Maintainer :
Stability : provisional
Por... |
3fa4af63b910ede080937fd357c9247a2218dcef67eee8fd7e79b9ab3b8a7b3e | racket/typed-racket | define-new-subtype.rkt | #lang typed/racket/base
(provide Radians Degrees radians degrees
sin cos tan asin acos atan
degrees->radians radians->degrees
)
(require (prefix-in rkt: (combine-in typed/racket/base racket/math)))
(define-new-subtype Radians (radians Real))
(define-new-subtype Degrees (degrees Real))
(: ... | null | https://raw.githubusercontent.com/racket/typed-racket/1c2da7b7fc3e4b8779cdc3bd670f2e08e460ed1b/typed-racket-test/external/succeed/define-new-subtype.rkt | racket | #lang typed/racket/base
(provide Radians Degrees radians degrees
sin cos tan asin acos atan
degrees->radians radians->degrees
)
(require (prefix-in rkt: (combine-in typed/racket/base racket/math)))
(define-new-subtype Radians (radians Real))
(define-new-subtype Degrees (degrees Real))
(: ... | |
eecf152b8ca058e302ca42250a6469537d73d502196db1c7234d13e76ec9d1d9 | gergoerdi/tandoori | datatype2.hs | data Tagged e = C1 e | C2 e
c1 = C1
| null | https://raw.githubusercontent.com/gergoerdi/tandoori/515142ce76b96efa75d7044c9077d85394585556/input/datatype2.hs | haskell | data Tagged e = C1 e | C2 e
c1 = C1
| |
1b9e1e807bff6d3a003e6ea5a71d0d052e612cfa307574db64c64c172802bc06 | genmeblog/techtest | reshape.clj | (ns techtest.api.reshape
(:refer-clojure :exclude [group-by])
(:require [tech.ml.dataset :as ds]
[tech.ml.dataset.column :as col]
[tech.v2.datatype :as dtype]
[clojure.string :as str]
[techtest.api.utils :refer [iterable-sequence? column-names]]
[techtest... | null | https://raw.githubusercontent.com/genmeblog/techtest/4b8111fde17fcffd7f7fb6fa9454d030f1847adc/src/techtest/api/reshape.clj | clojure | source names
traget column names
renaming map
rename value column
select rhs for join
perform left join
drop unnecessary leftovers
in case when there were multiple values, create vectors
columns to be unrolled
columns to be used as values
the columns used in join
generate join column name
col-to-drop (col-... | (ns techtest.api.reshape
(:refer-clojure :exclude [group-by])
(:require [tech.ml.dataset :as ds]
[tech.ml.dataset.column :as col]
[tech.v2.datatype :as dtype]
[clojure.string :as str]
[techtest.api.utils :refer [iterable-sequence? column-names]]
[techtest... |
9a2702748e902596c3c9ae4c130e8759302f88206f570786066d996d39e09524 | geneweb/geneweb | secure.mli | Copyright ( c ) 1998 - 2007 INRIA
val assets : unit -> string list
(** Returns list of allowed to acces assets *)
val base_dir : unit -> string
(** Returns directory where databases are installed to which acces is allowed *)
val add_assets : string -> unit
(** Add new asset to the [assets] list *)
val set_base_di... | null | https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/util/secure.mli | ocaml | * Returns list of allowed to acces assets
* Returns directory where databases are installed to which acces is allowed
* Add new asset to the [assets] list
* Set base directory
* Check if a filename is safe to read:
- it must not contain the '\000' character
- it must either be relative to the local director... | Copyright ( c ) 1998 - 2007 INRIA
val assets : unit -> string list
val base_dir : unit -> string
val add_assets : string -> unit
val set_base_dir : string -> unit
val check : string -> bool
val open_in : string -> in_channel
val open_in_bin : string -> in_channel
val open_out : string -> out_channel
val open... |
68aead88a86a7de6c26dce6d6b65c0ff7127d9f6b30368e21f1661d902e83656 | jtod/Hydra | Multiply.hs | Multiply : circuit that multiplies two binary natural numbers
This file is part of Hydra , see / README.md for copyright and license
----------------------------------------------------------------------
-- Binary multiplier circuit
----------------------------------------------------------------------
... | null | https://raw.githubusercontent.com/jtod/Hydra/6fa939f719741ccc323d94a333e88f356e5d8486/examples/multiply/Multiply.hs | haskell | --------------------------------------------------------------------
Binary multiplier circuit
--------------------------------------------------------------------
circuit is a functional unit, which uses a start control signal to
initiate a multiplication and produces a ready output signal to
indicate complet... | Multiply : circuit that multiplies two binary natural numbers
This file is part of Hydra , see / README.md for copyright and license
module Multiply where
import HDL.Hydra.Core.Lib
import HDL.Hydra.Circuits.Combinational
import HDL.Hydra.Circuits.Register
Definition of a circuit that multiples two ... |
daf9665e619188e3253cb275a39c5688c717930aebc9a88fbd14b66ac2d17331 | pflanze/chj-schemelib | utf8.scm | Copyright 2016 - 2019 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require eas... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/utf8.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
why not call these ref and set! ?:
-32
);
);
);
) {
) {
) {
);
);
);
necessarily in strings.
"
looks like the validity check is not compiled in:
returns new i
"
XX stupid oo
new i
XX s... | Copyright 2016 - 2019 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require easy
(fixnum-more fixnum-natural0?)
test
(cj-functional values-of)
(cj-source-util-2 assert)
(oo-util ... |
b3049714707782fa24c5f1d63178834b2215363dee74d3ebda6efaeff3ddca60 | mattjbray/ocaml-decoders | encode.mli | include Decoders.Encode.S with type value = CBOR.Simple.t
val undefined : unit encoder
val simple : int encoder
val bytes : string encoder
| null | https://raw.githubusercontent.com/mattjbray/ocaml-decoders/da05e541c1c587151ee3ccadf929e86b287215bb/src-cbor/encode.mli | ocaml | include Decoders.Encode.S with type value = CBOR.Simple.t
val undefined : unit encoder
val simple : int encoder
val bytes : string encoder
| |
f15b30f27a1aa25ad469d3369d9c6016e245b9bbc9d2795485b3ceb29b1f185f | matsubara0507/git-plantation | Team.hs | # LANGUAGE DataKinds #
# LANGUAGE OverloadedLabels #
{-# LANGUAGE TypeOperators #-}
# OPTIONS_GHC -fno - warn - orphans #
module Git.Plantation.Data.Team where
import RIO
import qualified RIO.List as L
import Data.Extensible
import Data.Extensible.Elm.Mappi... | null | https://raw.githubusercontent.com/matsubara0507/git-plantation/55ec98a3c15356ac7a8c07bb0d5dc5779650e921/src/Git/Plantation/Data/Team.hs | haskell | # LANGUAGE TypeOperators #
GitHub Org Team | # LANGUAGE DataKinds #
# LANGUAGE OverloadedLabels #
# OPTIONS_GHC -fno - warn - orphans #
module Git.Plantation.Data.Team where
import RIO
import qualified RIO.List as L
import Data.Extensible
import Data.Extensible.Elm.Mapping
import Elm.Mapping
im... |
6b622c94617fd08ffaf593c41d35a75aac73f1a66b3c89178614deb1667a4ec4 | xapi-project/xen-api-libs | filenameext.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/stdext/filenameext.ml | ocaml | * Makes a new file in the same directory as 'otherfile' |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
c89ffd750ddbaa97bf1ad3513bb16f86510d6c3abafaecf75fe0d770ec985f00 | openmusic-project/openmusic | bpf-player.lisp | ;=========================================================================
OpenMusic : Visual Programming Language for Music Composition
;
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
;
This file is part of the OpenMusic environment sources
;
OpenMusic is free software : you can redist... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/projects/basicproject/classes/bpf-player.lisp | lisp | =========================================================================
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
=================... | OpenMusic : Visual Programming Language for Music Composition
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
This file is part of the OpenMusic environment sources
OpenMusic is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License ... |
2f455a924b1308c4817436cf553e972dd825aa825a9a84a3f8d5d5f865b62ff9 | juji-io/datalevin | bits_test.cljc | (ns datalevin.bits-test
(:require
[datalevin.bits :as sut]
[datalevin.sparselist :as sl]
[datalevin.datom :as d]
[datalevin.constants :as c]
[clojure.test :refer [deftest is]]
[clojure.test.check.generators :as gen]
[clojure.test.check.clojure-test :as test]
[clojure.test.check.properties :as ... | null | https://raw.githubusercontent.com/juji-io/datalevin/c377fcfb27f88114e0f14ffeae75863fb52aebe3/test/datalevin/bits_test.cljc | clojure | binary index preserves the order of values
buffer read/write
extrema bounds
orders | (ns datalevin.bits-test
(:require
[datalevin.bits :as sut]
[datalevin.sparselist :as sl]
[datalevin.datom :as d]
[datalevin.constants :as c]
[clojure.test :refer [deftest is]]
[clojure.test.check.generators :as gen]
[clojure.test.check.clojure-test :as test]
[clojure.test.check.properties :as ... |
57536eee086a9e17a60e99f5691ba1fccc8feeb750b59ae7da04d24dfbe3e24f | ocaml-multicore/reagents | reaction.ml |
* Copyright ( c ) 2015 , < >
*
* Permission to use , copy , modify , and/or distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND T... | null | https://raw.githubusercontent.com/ocaml-multicore/reagents/6721db78b21028c807fb13d0af0aaf9407c662b5/lib/reaction.ml | ocaml |
* Copyright ( c ) 2015 , < >
*
* Permission to use , copy , modify , and/or distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND T... | |
10ea5a971774f85c02506d8f97392882480ab5ac322781b4a3892c7edf7e0afb | haskellari/qc-instances | Strict.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - orphans #
module Test.QuickCheck.Instances.Strict () where
import Prelude ()
import Test.QuickCheck.Instances.CustomPrelude
import Test.QuickCheck
import qualified Data.Strict as S
----------------------------------------------... | null | https://raw.githubusercontent.com/haskellari/qc-instances/94ec49f96c9afd7d29880c22bedfbabe01ad30d5/src/Test/QuickCheck/Instances/Strict.hs | haskell | -----------------------------------------------------------------------------
Pair
-----------------------------------------------------------------------------
| @since 0.3.24
| @since 0.3.24
| @since 0.3.24
| @since 0.3.24
| @since 0.3.24
-------------------------------------------------------------------------... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - orphans #
module Test.QuickCheck.Instances.Strict () where
import Prelude ()
import Test.QuickCheck.Instances.CustomPrelude
import Test.QuickCheck
import qualified Data.Strict as S
instance Arbitrary2 S.Pair where
liftArbi... |
7aa2ac1d72d4b93f3430ccf3191da14d3f2747615a99538fe60bd4bd01ed1c21 | Raynes/bultitude | project.clj | (defproject bultitude "0.2.8"
:min-lein-version "2.0.0"
:description "A library for find Clojure namespaces on the classpath."
:url ""
:license {:name "Eclipse Public License 1.0"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.tcrawley/dynapath "0.2.3"]]
:aliases {"test-all" ["with-prof... | null | https://raw.githubusercontent.com/Raynes/bultitude/fcf65d0e6edb1727421ef619e6ad6b4614c8c7a9/project.clj | clojure | (defproject bultitude "0.2.8"
:min-lein-version "2.0.0"
:description "A library for find Clojure namespaces on the classpath."
:url ""
:license {:name "Eclipse Public License 1.0"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.tcrawley/dynapath "0.2.3"]]
:aliases {"test-all" ["with-prof... | |
7d45bea99a29e6a91d8581b02a5289a9ccf45eecf45c40235ff600cc04b48790 | escherize/data-desk | views.cljs | (ns data-desk.views
(:require
[reagent.core :as r]
[re-frame.core :as re-frame]
[re-com.core :as re-com :refer [at]]
[data-desk.subs :as subs]
[cljs.reader :as reader]
[malli.core :as m]
[clojure.string :as str]))
(defn title []
(let [name (re-frame/subscribe [::subs/name])]
[re-com/title
... | null | https://raw.githubusercontent.com/escherize/data-desk/db3a27ed7f63bbbaa573ae7ea103e35044a0625a/src/data_desk/views.cljs | clojure | [:pre (pr-str edit-path)]
[:pre (pr-str edit-path)]
[:pre (pr-str edit-path)]
"+ button" | (ns data-desk.views
(:require
[reagent.core :as r]
[re-frame.core :as re-frame]
[re-com.core :as re-com :refer [at]]
[data-desk.subs :as subs]
[cljs.reader :as reader]
[malli.core :as m]
[clojure.string :as str]))
(defn title []
(let [name (re-frame/subscribe [::subs/name])]
[re-com/title
... |
7bc88ee41ce59e803af6217759c462d1e67553d6df3621c645728815b3ab7757 | lehins/Color | CIERGB.hs | -- |
-- Module : Graphics.Color.Space.RGB.Derived.CIERGB
Copyright : ( c ) 2020
-- License : BSD3
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
--
module Graphics.Color.Space.RGB.CIERGB
( module Graphics.Color.Space.CIE1931.RGB
) where
import Graphics.Color.Spa... | null | https://raw.githubusercontent.com/lehins/Color/8f17d4d17dc9b899af702f54b69d49f3a5752e7b/Color/src/Graphics/Color/Space/RGB/CIERGB.hs | haskell | |
Module : Graphics.Color.Space.RGB.Derived.CIERGB
License : BSD3
Stability : experimental
Portability : non-portable
| Copyright : ( c ) 2020
Maintainer : < >
module Graphics.Color.Space.RGB.CIERGB
( module Graphics.Color.Space.CIE1931.RGB
) where
import Graphics.Color.Space.CIE1931.RGB
|
f3d793e02bab32110003d5cb9aff9aa6ffbcaa52272eb6bfdb623d5ecf84bb61 | binsec/haunted | range.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/static/ai/domains/range.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
a90166e3c2131cf1826e671e53b97684f55266b4dd01bc73822ed39d59e03e2c | LennMars/algorithms_in_OCaml | rational.ml | open Util
p /. must be positive .
let gcd m n =
let abs k = if k >= 0 then k else -k in
let rec aux m n =
if n = 0 then m
else aux n (m mod n)
in
aux (abs m) (abs n)
let normalize (p, q) =
let (p, q) = if q < 0 then (-p, -q) else if q > 0 then (p, q) else raise Division_by_zero in
let d = gcd... | null | https://raw.githubusercontent.com/LennMars/algorithms_in_OCaml/f7fb8ca9f497883d86be3167bfc98a4a28ac73c9/rational/rational.ml | ocaml | open Util
p /. must be positive .
let gcd m n =
let abs k = if k >= 0 then k else -k in
let rec aux m n =
if n = 0 then m
else aux n (m mod n)
in
aux (abs m) (abs n)
let normalize (p, q) =
let (p, q) = if q < 0 then (-p, -q) else if q > 0 then (p, q) else raise Division_by_zero in
let d = gcd... | |
c40ed37e0d2f97f099a223df3eef04715b34fd36e492c418685cdef1257e1d95 | John-Nagle/pasv | newsimp.lisp |
;;;(declare
;;; (load 'need.o)
;;; (load 'defmac.o)
;;; (load 'enode.o)
;;; (load 'princ.o)
;;; (load 'map.o)
;;; (load 'match.o)
;;; (load 'progvn.o))
;;;(needs-macros)
(declarespecial
boolsymand
truesample falsesample simpflag propagateflag
truenode falsenode trueprop falseprop histo... | null | https://raw.githubusercontent.com/John-Nagle/pasv/04fa44aaabc46b2e231ab83f96b8857dc5977754/src/CPC4/newsimp.lisp | lisp | (declare
(load 'need.o)
(load 'defmac.o)
(load 'enode.o)
(load 'princ.o)
(load 'map.o)
(load 'match.o)
(load 'progvn.o))
(needs-macros)
ss -- propositional tableau routine
ss implements a tableau approach to propositional simplification.
look at propagations after everything else
Rule Applicatio... |
(declarespecial
boolsymand
truesample falsesample simpflag propagateflag
truenode falsenode trueprop falseprop historyprop simpprop
boolsymeq
boolsymimplies
boolsymnot
boolsymnoteq
boolsymor
demonnumber
eduplicatenumber
efirednumber
enumber
estats
falsenode
... |
a489350f8c1a65dfe1700d8bfb60cfcfea3a48fceec0de920eb10dfa148dae85 | linyinfeng/myml | Parser.hs | module Myml.Mymli.Command.Parser
( parseCommand,
)
where
import Control.Applicative
import Myml.Mymli.Command
import Myml.Parser
import Myml.Parser.Common
import Text.Trifecta hiding (Parser)
parseCommand :: Parser Command
parseCommand =
symbol ":"
*> ( parseHelpCommand
<|> parseExitCommand
... | null | https://raw.githubusercontent.com/linyinfeng/myml/c90446431caeebd4b67f9b6a7a172a70b92f138f/mymli/Myml/Mymli/Command/Parser.hs | haskell | module Myml.Mymli.Command.Parser
( parseCommand,
)
where
import Control.Applicative
import Myml.Mymli.Command
import Myml.Parser
import Myml.Parser.Common
import Text.Trifecta hiding (Parser)
parseCommand :: Parser Command
parseCommand =
symbol ":"
*> ( parseHelpCommand
<|> parseExitCommand
... | |
4eaec9d7cfd529a5bac3a4046ff73c4e0f7f1fd4c6e1222f0d5bd80fb69f1782 | glondu/belenios | admin_basic.ml | (**************************************************************************)
(* BELENIOS *)
(* *)
Copyright © 2012 - 2023
(* ... | null | https://raw.githubusercontent.com/glondu/belenios/97daff68e6f224cdf2f30e18e923bd1cb0cbc188/src/web/clients/basic/admin_basic.ml | ocaml | ************************************************************************
BELENIOS
This program is free softw... | Copyright © 2012 - 2023
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
exemption that compiling , linking , and/or using OpenSSL is allowed .
You should have rece... |
e17a52204a7deac3d98e30c9a1042f2662b03a0cad65949cc314b99b13c424b1 | Arc-Compute/Mdev-GPU | Errors.hs | |
Module : Nvidia . Errors
Description : Nvidia Error messages .
Copyright : ( c ) 2022 2666680 Ontario Inc. O\A Arc Compute
License : GNU GPL v.2
Maintainer :
Stability : experimental
Portability : POSIX
Error messages for NVIDIA .
Module : Nvidia.Errors
Description : Nvidia... | null | https://raw.githubusercontent.com/Arc-Compute/Mdev-GPU/b55b976fbffabd3ce4fe21543ca9b812152140a5/src/Nvidia/Errors.hs | haskell | ^ Ok message, the command succeeded correctly.
^ We have a broken framebuffer.
^ The framebuffer is too small.
^ The command was busy, please retry after a timeout.
^ The callback was not scheduled.
^ The card is not present on the system.
^ Call cycle was detected.
^ Dual Link is currently in use.
^ Generic E... | |
Module : Nvidia . Errors
Description : Nvidia Error messages .
Copyright : ( c ) 2022 2666680 Ontario Inc. O\A Arc Compute
License : GNU GPL v.2
Maintainer :
Stability : experimental
Portability : POSIX
Error messages for NVIDIA .
Module : Nvidia.Errors
Description : Nvidia... |
0116e5c905a3807d6b69219b94a144a1c4dd4ef64568ee2f06a36da5f72ab068 | clojure-interop/google-cloud-clients | Key.clj | (ns com.google.cloud.spanner.Key
"Represents a row key in a Cloud Spanner table or index. A key is a tuple of values constrained to
the scalar Cloud Spanner types: currently these are BOOLEAN, INT64, FLOAT64, STRING, BYTES and TIMESTAMP. Values may be null where the table
definition permits it.
Key is used to ... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/Key.clj | clojure | (ns com.google.cloud.spanner.Key
"Represents a row key in a Cloud Spanner table or index. A key is a tuple of values constrained to
the scalar Cloud Spanner types: currently these are BOOLEAN, INT64, FLOAT64, STRING, BYTES and TIMESTAMP. Values may be null where the table
definition permits it.
Key is used to ... | |
6f0775b98b1d6cc973b370d39a71b3d4ef1efb90b90c00dddd4c5b6fbb5de9f2 | larcenists/larceny | listsort.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
Copyright 2007 .
;
; Permission to copy this software, in whole or in part, to use this
; software for any lawful purpose, and to redistribute this software
; is granted subject to the restriction that all copies made of this
; software must includ... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/Benchmarking/R7RS/src/listsort.scm | scheme |
Permission to copy this software, in whole or in part, to use this
software for any lawful purpose, and to redistribute this software
is granted subject to the restriction that all copies made of this
software must include this copyright notice in full.
I also request that you send me a copy of any improvement... | Copyright 2007 .
(import (scheme base)
(scheme read)
(scheme write)
(scheme time)
(scheme sort))
(define (all-characters lo hi)
(define (loop sv0 sv1 chars)
(cond ((< sv1 sv0)
chars)
((or (< sv1 #xd800)
(< #xdfff sv1))
(loop s... |
8cf496f373ea6c8d6bbc6ae98877e9a1f25861babc1f9be6b6a297e7740687f1 | clojure-interop/java-jdk | InternationalFormatter.clj | (ns javax.swing.text.InternationalFormatter
"InternationalFormatter extends DefaultFormatter,
using an instance of java.text.Format to handle the
conversion to a String, and the conversion from a String.
If getAllowsInvalid() is false, this will ask the
Format to format the current text on every edit.
You... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/text/InternationalFormatter.clj | clojure | (ns javax.swing.text.InternationalFormatter
"InternationalFormatter extends DefaultFormatter,
using an instance of java.text.Format to handle the
conversion to a String, and the conversion from a String.
If getAllowsInvalid() is false, this will ask the
Format to format the current text on every edit.
You... | |
af7f9d5a16bc816e260ad1129be6bf6430f75a58e59b6db86bc4b44ede27ba5a | clojerl/clojerl | clj_analyzer.erl | @doc Clojerl analyzer .
%%
%% Processes code in the form of data structures and transform them
%% into AST nodes which get pushed to the `clj_env:env()'.
%%
%% Also implements macroexpansion.
-module(clj_analyzer).
-dialyzer({nowarn_function, analyze_form/2}).
-include("clojerl.hrl").
-include("clojerl_int.hrl").
... | null | https://raw.githubusercontent.com/clojerl/clojerl/506000465581d6349659898dd5025fa259d5cf28/src/erl/clj_analyzer.erl | erlang |
Processes code in the form of data structures and transform them
into AST nodes which get pushed to the `clj_env:env()'.
Also implements macroexpansion.
@doc Analyzes `Form' and transforms it into an `expr()'.
The analyzed `Form' gets pushed into the stack of expressions in
`Env' and the updated environment is... | @doc Clojerl analyzer .
-module(clj_analyzer).
-dialyzer({nowarn_function, analyze_form/2}).
-include("clojerl.hrl").
-include("clojerl_int.hrl").
-include("clojerl_expr.hrl").
-export([ analyze/2
, macroexpand_1/2
, macroexpand/2
, is_special/1
]).
-spec analyze(any(), clj_env:en... |
0f91097e93f35833d44bd0479f3aae0dcc328f05d00f20e9aa734a559cc0ae7f | plow-technologies/rescript-linter | NoJStringInterpolationRule.ml | open Rescript_parser
module Rule : Rule.HASRULE = struct
let meta =
{ Rule.ruleName= "NoJStringInterpolation"
; Rule.ruleIdentifier= "NoJStringInterpolation"
; Rule.ruleDescription=
"[Rescript] Do not use j`<string>` interpolation, use `` instead and explicitly convert args to \
string."... | null | https://raw.githubusercontent.com/plow-technologies/rescript-linter/134083e70d71dd0a9cb48f281814589719817435/lib/rules/NoJStringInterpolationRule.ml | ocaml | open Rescript_parser
module Rule : Rule.HASRULE = struct
let meta =
{ Rule.ruleName= "NoJStringInterpolation"
; Rule.ruleIdentifier= "NoJStringInterpolation"
; Rule.ruleDescription=
"[Rescript] Do not use j`<string>` interpolation, use `` instead and explicitly convert args to \
string."... | |
874ecf90100062d6ff6c1c753ccb47ff872dd4e29f9ef13c7bd3fdaf0fdd381d | Zetawar/zetawar | app.cljs | (ns zetawar.app
(:require
[cognitect.transit :as transit]
[datascript.core :as d]
[zetawar.data :as data]
[zetawar.db :refer [e find-by qe qes qess]]
[zetawar.game :as game]
[zetawar.logging :as log]
[zetawar.players :as players]
[zetawar.util :as util :refer [breakpoint inspect]]))
;;;;;;;;;... | null | https://raw.githubusercontent.com/Zetawar/zetawar/dc1ee8d27afcac1cd98904859289012c2806e58c/src/cljs/zetawar/app.cljs | clojure |
Game setup
TODO: cleanup (relocate?) player stopping
Stop existing players (when starting new games)
TODO: take option map instead of being multiarity
Skip player creation for tests
TODO: take option map instead of being multiarity
Skip player creation for tests | (ns zetawar.app
(:require
[cognitect.transit :as transit]
[datascript.core :as d]
[zetawar.data :as data]
[zetawar.db :refer [e find-by qe qes qess]]
[zetawar.game :as game]
[zetawar.logging :as log]
[zetawar.players :as players]
[zetawar.util :as util :refer [breakpoint inspect]]))
DB Acce... |
461b8eead4c9dd3a0fea620544044a7ce0bc3475cc8ef77753d7bc9a79bd8e82 | i-am-tom/learn-me-a-haskell | Update.hs | # OPTIONS_HADDOCK not - home #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeV... | null | https://raw.githubusercontent.com/i-am-tom/learn-me-a-haskell/08271f6cdd4fc88c26ed7a62ed1e786a900824be/src/HList/Update.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeInType #
# LANGUAGE TypeOperators #
Type mismatch !
Type mismatch!
| The update class is a convenience wrapper around 'UpdateLoop', whic... | # OPTIONS_HADDOCK not - home #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
|
Module : HList . Up... |
6013343162057a45835102c0109fd4bce2cd6eba5f33a1cd42be973fcedfde37 | gedge-platform/gedge-platform | rabbit_mgmt_metrics_gc.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_mgmt_metrics_gc).
-record(state, {... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_management_agent/src/rabbit_mgmt_metrics_gc.erl | erlang | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mgmt_metrics_gc).
-record(state, {basic_... | |
b13aa7adb80c0a26132b6bdc3ff49969eebb1de05728576da6e2c0d957428e02 | hraberg/deuce | dired.clj | (ns deuce.emacs.dired
(:use [deuce.emacs-lisp :only (defun defvar)])
(:require [clojure.core :as c]
[clojure.java.io :as io]
[deuce.emacs-lisp.cons :as cons])
(:import [java.io File])
(:refer-clojure :exclude []))
(defvar completion-ignored-extensions nil
"Completion ignores file name... | null | https://raw.githubusercontent.com/hraberg/deuce/9d507adb6c68c0f5c19ad79fa6ded9593c082575/src/deuce/emacs/dired.clj | clojure | (ns deuce.emacs.dired
(:use [deuce.emacs-lisp :only (defun defvar)])
(:require [clojure.core :as c]
[clojure.java.io :as io]
[deuce.emacs-lisp.cons :as cons])
(:import [java.io File])
(:refer-clojure :exclude []))
(defvar completion-ignored-extensions nil
"Completion ignores file name... | |
c59e6f53fa0e9202c2d860b6dc080565e52b2a04b2cae9e59925a19fd76f25de | craigl64/clim-ccl | system.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 -*-
(in-package :CL-USER)
(clsm:define-system :clim-homegrown
(:pretty-name "CLIM Homegrown"
:default-pathname "clim2:homegrown;"
:journal-directory "clim2:patches;"
:patchable t)
(:module standa... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/homegrown/system.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 -*-
"scroll-pane" |
(in-package :CL-USER)
(clsm:define-system :clim-homegrown
(:pretty-name "CLIM Homegrown"
:default-pathname "clim2:homegrown;"
:journal-directory "clim2:patches;"
:patchable t)
(:module standalone (:clim-standalone) (:type :system))
(:serial standalone
"db-button"
"db-la... |
ef1d78caf25d05df7d512a68544968bcdf71918e36daa8350f7c7e59a310e59d | LaurentMazare/ocaml-torch | device.mli | type t = Torch_core.Device.t =
| Cpu
| Cuda of int
val cuda_if_available : unit -> t
val is_cuda : t -> bool
val get_num_threads : unit -> int
val set_num_threads : int -> unit
| null | https://raw.githubusercontent.com/LaurentMazare/ocaml-torch/a82b906a22c7c23138af16fab497a08e5167d249/src/torch/device.mli | ocaml | type t = Torch_core.Device.t =
| Cpu
| Cuda of int
val cuda_if_available : unit -> t
val is_cuda : t -> bool
val get_num_threads : unit -> int
val set_num_threads : int -> unit
| |
7ca615e0db9eb4294ba6412a19fa9782090ba92e91907370afe8afd66718a917 | adnelson/nixfromnpm | Cli.hs | | The command - line interface
# LANGUAGE NoImplicitPrelude #
module NixFromNpm.Cli (runWithArgs) where
import qualified Options.Applicative as O
import System.Environment (getArgs)
import System.Exit (ExitCode)
import NixFromNpm.Common hiding (getArgs)
import NixFromNpm.Options (NixFromNpmOptions, parseOptions,
... | null | https://raw.githubusercontent.com/adnelson/nixfromnpm/4ab773cdead920d2312e864857fabaf5f739a80e/src/NixFromNpm/Cli.hs | haskell | | Execute an argument parser with a list of arguments.
| Execute the CLI with an argument list, returning an exit code. | | The command - line interface
# LANGUAGE NoImplicitPrelude #
module NixFromNpm.Cli (runWithArgs) where
import qualified Options.Applicative as O
import System.Environment (getArgs)
import System.Exit (ExitCode)
import NixFromNpm.Common hiding (getArgs)
import NixFromNpm.Options (NixFromNpmOptions, parseOptions,
... |
41bc22ba138b1d70a640f46ebfe7be254e5c9225e3c692174b6587afe9c60f04 | WorksHub/client | subs.cljs | (ns wh.admin.activities.subs
(:require [re-frame.core :refer [reg-sub]]
[wh.re-frame.subs :refer [<sub]]
[wh.util :as util]))
(defn normalize-activity
[{:keys [feed-company feed-issue feed-job feed-blog] :as activity}]
(-> activity
(merge
(cond
feed-job {:objec... | null | https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/admin/activities/subs.cljs | clojure | (ns wh.admin.activities.subs
(:require [re-frame.core :refer [reg-sub]]
[wh.re-frame.subs :refer [<sub]]
[wh.util :as util]))
(defn normalize-activity
[{:keys [feed-company feed-issue feed-job feed-blog] :as activity}]
(-> activity
(merge
(cond
feed-job {:objec... | |
59930954429241db3c454ae105c15919f87b056d124b88d624ae85994af43ae9 | bobzhang/ocaml-book | json_meta.bak.ml | open Camlp4.PreCast
open Json_ast
module J_ast = struct
include Json_ast
end
module MetaExpr : sig
(* val meta_t : Loc.t -> Json_ast.t -> Ast.expr *)
end = struct
(** the generator scans all the types defined in the current module
then generate code for the last-appearing recursive bundle
*)
let me... | null | https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/camlp4/code/jake/json_meta.bak.ml | ocaml | val meta_t : Loc.t -> Json_ast.t -> Ast.expr
* the generator scans all the types defined in the current module
then generate code for the last-appearing recursive bundle
due to this can not run in toplevel
val meta_t : Loc.t -> Json_ast.t -> Ast.patt
* to make it able to appear in the toplevel
* exp ant... | open Camlp4.PreCast
open Json_ast
module J_ast = struct
include Json_ast
end
module MetaExpr : sig
end = struct
let meta_float' _loc f =
<:expr< $`flo:f$ >>
include Camlp4Filters.MetaGeneratorExpr(J_ast)
end
module MetaPatt : sig
end
= struct
let meta_float' _loc f =
<:patt< $`flo:f$ >>
inc... |
b334a01f9ed79e7cb91be63310bc0d0f0a6be2ed33ceffa941fc2c4646cb52f2 | links-lang/links | resolveJsonState.ml | open Proc
open Json
open Utility
type handler_id_set = IntSet.t
let empty_state = (IntSet.empty, [])
(* Given a value, extracts the event handlers that need to be sent to the client *)
let rec extract_json_values : Value.t -> (handler_id_set * (Value.chan list)) =
function
Can't - dos
| `PrimitiveFunction _ | `... | null | https://raw.githubusercontent.com/links-lang/links/06051521a967dd60cb5ef22c1d672d3fb8260289/core/resolveJsonState.ml | ocaml | Given a value, extracts the event handlers that need to be sent to the client
Empties
Session channels
Handle lenses similar to primitive values
Everything is empty except XML items
Any attribute with the "key" label is an event handler; add to state.
Namespace of a tag is not relevant for event handlers, ... | open Proc
open Json
open Utility
type handler_id_set = IntSet.t
let empty_state = (IntSet.empty, [])
let rec extract_json_values : Value.t -> (handler_id_set * (Value.chan list)) =
function
Can't - dos
| `PrimitiveFunction _ | `Socket _
| `Resumption _ | `Continuation _ as r ->
raise (Errors.runtime_err... |
42a5d95f3c37c7b49b17fb99f4d0d78ae393a205d26de8422a948283d9dc6c38 | robertluo/fun-map | fun_map.clj | (ns clj-kondo.fun-map
"hooks for macros.
-kondo/clj-kondo/blob/master/doc/hooks.md"
(:require [clj-kondo.hooks-api :as api]))
(defn fw [{:keys [node]}]
(let [[m & body] (-> node :children rest)]
(when (not= (:tag m) :map)
(throw (ex-info "fw need a map as its first argument" {})))
{:node (api/li... | null | https://raw.githubusercontent.com/robertluo/fun-map/d474debe20defb653b00323409c722824bac3247/resources/clj-kondo.exports/robertluo/fun-map/clj_kondo/fun_map.clj | clojure | (ns clj-kondo.fun-map
"hooks for macros.
-kondo/clj-kondo/blob/master/doc/hooks.md"
(:require [clj-kondo.hooks-api :as api]))
(defn fw [{:keys [node]}]
(let [[m & body] (-> node :children rest)]
(when (not= (:tag m) :map)
(throw (ex-info "fw need a map as its first argument" {})))
{:node (api/li... | |
f762561f187f1ee47200fc2836c9157cd51759c59ab25d9fd6da04ee269c07f2 | reborg/clojure-essential-reference | 15.clj | (binding [pprint/*print-base* 16
< 1 >
(pprint/pprint 3405691582))
# xcafebabe | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/9a3eb82024c8e5fbe17412af541c2cd30820c92e/DynamicVariablesintheStandardLibrary/Prettyprintingvariables/15.clj | clojure | (binding [pprint/*print-base* 16
< 1 >
(pprint/pprint 3405691582))
# xcafebabe | |
ee8d41287a762feb63b5bf5f5b585b9716c7e7a2b57415d19d85ce63a709a35c | jyh/metaprl | itt_set_str.ml | doc <:doc<
@module[Itt_set_str]
In this module we define the most common data structures: Sets and Tables.
@docoff
----------------------------------------------------------------
@begin[license]
This file is part of MetaPRL, a modular, higher order
logical framework that provides a logical prog... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/applications/datatypes/itt_set_str.ml | ocaml | doc <:doc<
@module[Itt_set_str]
In this module we define the most common data structures: Sets and Tables.
@docoff
----------------------------------------------------------------
@begin[license]
This file is part of MetaPRL, a modular, higher order
logical framework that provides a logical prog... | |
c5905fcb81300f2967a92f3830fa832f5bbde970fc7a4a5440e6c7b472bbf153 | open-company/open-company-web | image_modal.cljs | (ns oc.web.components.ui.image-modal
(:require [rum.core :as rum]
[oc.web.mixins.ui :as ui-mixins]
[oc.web.dispatcher :as dis]
[oc.web.utils.dom :as dom-utils]))
(defn dismiss-image-modal
([e]
(dom-utils/stop-propagation! e)
(dismiss-image-modal))
([]
(dis/dispatch! [... | null | https://raw.githubusercontent.com/open-company/open-company-web/700f751b8284d287432ba73007b104f26669be91/src/main/oc/web/components/ui/image_modal.cljs | clojure | (ns oc.web.components.ui.image-modal
(:require [rum.core :as rum]
[oc.web.mixins.ui :as ui-mixins]
[oc.web.dispatcher :as dis]
[oc.web.utils.dom :as dom-utils]))
(defn dismiss-image-modal
([e]
(dom-utils/stop-propagation! e)
(dismiss-image-modal))
([]
(dis/dispatch! [... | |
9dff80ba5e0e4be87a4e21635661021f1cc6b0a9b7756817908cd66f4d18dc3f | c-cube/smbc | Parse_ast.ml | (* This file is free software. See file "license" for more details. *)
* { 1 Trivial AST for parsing }
open Common_
module Loc = Tip_loc
type var = string
type ty =
| Ty_bool
| Ty_const of string
| Ty_arrow of ty list * ty
type typed_var = var * ty
* { 2 AST : S - expressions with locations }
type term =
... | null | https://raw.githubusercontent.com/c-cube/smbc/930278367b0a4a46eb0378455fe78dc99fc3133e/src/Parse_ast.ml | ocaml | This file is free software. See file "license" for more details.
[t asserting g]
satisfy/prove this
encode [distinct t1...tn] into [And_{i,j<i} ti!=tj]
negate
* {2 Errors}
* printing exceptions |
* { 1 Trivial AST for parsing }
open Common_
module Loc = Tip_loc
type var = string
type ty =
| Ty_bool
| Ty_const of string
| Ty_arrow of ty list * ty
type typed_var = var * ty
* { 2 AST : S - expressions with locations }
type term =
| True
| False
| Const of string
| App of term * term list
| Ma... |
20dc83d68f482dcf27c8abf507643bc797975bba119deb6bf506f9a267305398 | camfort/fortran-src | ParserSpec.hs | module Language.Fortran.Parser.Fixed.Fortran77.ParserSpec where
import Test.Hspec
import TestUtil
import Language.Fortran.AST
import Language.Fortran.Version
import Language.Fortran.Parser
import Language.Fortran.Parser.Monad ( Parse )
import qualified Language.Fortran.Parser.Fixed.Fortran77 as F77
import qualified L... | null | https://raw.githubusercontent.com/camfort/fortran-src/9229338d6b09a724d38e46bd852f76fe3329d64f/test/Language/Fortran/Parser/Fixed/Fortran77/ParserSpec.hs | haskell | Local variables:
mode: haskell
haskell-program-name: "cabal repl test-suite:spec"
End: | module Language.Fortran.Parser.Fixed.Fortran77.ParserSpec where
import Test.Hspec
import TestUtil
import Language.Fortran.AST
import Language.Fortran.Version
import Language.Fortran.Parser
import Language.Fortran.Parser.Monad ( Parse )
import qualified Language.Fortran.Parser.Fixed.Fortran77 as F77
import qualified L... |
a3a4999d9b5c7fd8866bd10257217880cf65cbdbe1366e37ce0aa5945987ef03 | tweag/webauthn | Verify.hs | # LANGUAGE ExistentialQuantification #
# LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns #
-- | Stability: internal
public keys and signature algorithms are represented with three
-- different types:
--
* ' . CoseSignAlg ' , which is the signature algorithm used , equivalent to a
COSE Algorithm from the CO... | null | https://raw.githubusercontent.com/tweag/webauthn/b9341781bc82ed32a8b729036ae96f636198542f/src/Crypto/WebAuthn/Cose/Internal/Verify.hs | haskell | | Stability: internal
different types:
CBOR structure decodes to
The following main operations are supported for these types:
with 'verify'
* Public Key
* Signature verification
| Verifies an asymmetric signature for a message using a
'Cose.PublicKeyWithSignAlg' Returns an error if the signature algorit... | # LANGUAGE ExistentialQuantification #
# LANGUAGE RecordWildCards #
# LANGUAGE ViewPatterns #
public keys and signature algorithms are represented with three
* ' . CoseSignAlg ' , which is the signature algorithm used , equivalent to a
COSE Algorithm from the COSE registry
* ' . CosePublicKey ' , which is ... |
7f9f712aff7c92a71bd09e80d3ac7ee8b91714a2d1ff38991723726b2bf1b41f | cartazio/tlaps | p_parser.ml |
* proof / parser.ml --- proof parser
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* proof/parser.ml --- proof parser
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
Revision.f "$Rev: 29999 $";;
open Ext
open Property
open Expr.T
open P_t
let enlarge_loc x... | null | https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/proof/p_parser.ml | ocaml | In a usebody, a step name has special meaning, so we strip the
Bang and let it be the underlying Opaque identifier, which will
be bound to the assumptions of the corresponding step. Only
step names can be represented by a Bang with an empty list of
selectors.
See the "operator" case at the en... |
* proof / parser.ml --- proof parser
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* proof/parser.ml --- proof parser
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
Revision.f "$Rev: 29999 $";;
open Ext
open Property
open Expr.T
open P_t
let enlarge_loc x... |
5f282ba845acf14d370fb7a58ecce01bf0fb0770dcfcb664ad1d5c91997d9297 | facebookarchive/pfff | gMain.mli | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
and/or ... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/external/ocamlgtk/src/gMain.mli | ocaml | ************************************************************************
Lablgtk
This program is free software; you can redistribute it
comes with the library. ... | and/or modify it under the terms of the GNU Library General
Public License as published by the Free Software Foundation
version 2 , with the exception described in file COPYING which
GNU Library General Public License for more details .
You should have r... |
3868a1afe87b41b3dcf70744e00df38983b1b49a8ae77e439dbc2777f1d65e5a | grin-compiler/grin | IR.hs | # LANGUAGE DuplicateRecordFields #
# LANGUAGE DeriveAnyClass , DeriveFunctor , TypeFamilies #
# LANGUAGE DeriveFoldable , , PatternSynonyms #
# LANGUAGE TemplateHaskell , StandaloneDeriving , DeriveGeneric #
module AbstractInterpretation.IR
( module AbstractInterpretation.IR
, Int32
, Word32
, Name
) where
impor... | null | https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/AbstractInterpretation/IR.hs | haskell | node item index
satisfy that predicate.
NOTE: "non-deterministic" selector for Any?
inclusive lower, exclusive upper bound
TODO: error checking + validation ; DECISION: catch syntactical error at compile time ; the analyis will not be restrictive ; there will not be runtime checks
^ the selected tag must exist
^... | # LANGUAGE DuplicateRecordFields #
# LANGUAGE DeriveAnyClass , DeriveFunctor , TypeFamilies #
# LANGUAGE DeriveFoldable , , PatternSynonyms #
# LANGUAGE TemplateHaskell , StandaloneDeriving , DeriveGeneric #
module AbstractInterpretation.IR
( module AbstractInterpretation.IR
, Int32
, Word32
, Name
) where
impor... |
0e6c0779580501af2aa43a7091b9029621b798a61511f0da59aa0c79c7525ea2 | BillHallahan/G2 | Chr.hs | module Chr where
import Data.Char
lowerLetters :: [Char]
lowerLetters = map chr [97..97 + 25]
allLetters :: [Char]
allLetters = map chr $ [65..65 + 25] ++ [97..97 + 25]
printBasedOnChr :: Int -> Int
printBasedOnChr x
| chr x == 'A' = x
| chr x == 'B' = x + x
| chr x == 'C' = x + x + x
| chr x == 'D'... | null | https://raw.githubusercontent.com/BillHallahan/G2/53659dc815637820e86eaac46fb5cd16deefa56f/tests/Prim/Chr.hs | haskell | module Chr where
import Data.Char
lowerLetters :: [Char]
lowerLetters = map chr [97..97 + 25]
allLetters :: [Char]
allLetters = map chr $ [65..65 + 25] ++ [97..97 + 25]
printBasedOnChr :: Int -> Int
printBasedOnChr x
| chr x == 'A' = x
| chr x == 'B' = x + x
| chr x == 'C' = x + x + x
| chr x == 'D'... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.