_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 |
|---|---|---|---|---|---|---|---|---|
975a610c4a83372526272446bf4fd2f6b55049d8a87928351887e7a003ff3371 | rtoy/cmucl | fonts.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
;;;
TEXAS INSTRUMENTS INCORPORATED
;;; P.O. BOX 2909
AUSTIN , TEXAS 78769
;;;
Copyright ( C ) 1987 Texas Instruments Incorporated .
;;;
;;; Permission is granted to any individual or institution to use,... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/clx/fonts.lisp | lisp | Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
P.O. BOX 2909
Permission is granted to any individual or institution to use, copy, modify,
and distribute this software, provided that this complete copyright and
permission notice is maintained, intact, in all copies and supporting
... |
TEXAS INSTRUMENTS INCORPORATED
AUSTIN , TEXAS 78769
Copyright ( C ) 1987 Texas Instruments Incorporated .
Texas Instruments Incorporated provides this software " as is " without
(in-package :xlib)
The char - info stuff is here instead of CLX because of uses of int16->card16 .
( defun char-<m... |
7906aa31096d7c1908312d4e9a40a6edd4bb6365e49ea5cc639fddf896d39b85 | clojurewerkz/eep | stats.clj | This source code is dual - licensed under the Apache License , version
2.0 , and the Eclipse Public License , version 1.0 .
;;
;; The APL v2.0:
;;
;; ----------------------------------------------------------------------------------
Copyright ( c ) 2014 - 2014 , , and the ClojureWerkz Team
;;
Licensed unde... | null | https://raw.githubusercontent.com/clojurewerkz/eep/b1f76fc4ff53f7e18baef26a7bf877757237adbd/src/clojurewerkz/eep/stats.clj | clojure |
The APL v2.0:
----------------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDIT... | This source code is dual - licensed under the Apache License , version
2.0 , and the Eclipse Public License , version 1.0 .
Copyright ( c ) 2014 - 2014 , , and the ClojureWerkz Team
distributed under the License is distributed on an " AS IS " BASIS ,
The EPL v1.0 :
Copyright ( c ) 2014 - 2014 , , ... |
8e078cfefb20b3c5315a3f7a1cd9666ae313b70405b817a0bce026ffdc52aa56 | korya/efuns | dynlink.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/ocamlsrc/compat/3.00/dynlink.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License .
$ I d : dynlink.mli , v 1.1 1999/12/1... |
9e3b4cbea96c2217993c6f31a5c3d2521fb4c493f75207c5d58e68f72b954946 | privet-kitty/cl-competitive | montmort.lisp | (defpackage :cp/test/montmort
(:use :cl :fiveam :cp/montmort)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/montmort)
(in-suite base-suite)
(test montmort/hand
(is (equalp #() (make-montmort-sequence 0 1)))
(is (equalp #() (make-montmort-sequence 0 10)))
(is (equalp #(1 0 1 2 9 44 265 1854 ... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/8f9aaab2da1a0fd74e0ccd72f7b8fd17d7f78db1/module/test/montmort.lisp | lisp | (defpackage :cp/test/montmort
(:use :cl :fiveam :cp/montmort)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/montmort)
(in-suite base-suite)
(test montmort/hand
(is (equalp #() (make-montmort-sequence 0 1)))
(is (equalp #() (make-montmort-sequence 0 10)))
(is (equalp #(1 0 1 2 9 44 265 1854 ... | |
e4d8664236730a5911f0301a830a8e67855c9ff290f44a7799d9f5bc81f582e0 | ekmett/constraints | Symbol.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE TypeOperators #
# LANGUAGE TypeFamilies #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE CPP #
| Utilities for working with ' ' constraints .
module Data.Constraint.Symb... | null | https://raw.githubusercontent.com/ekmett/constraints/fde078ddc746b5e939461defaae4b0463559c937/src/Data/Constraint/Symbol.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
implementation details
axioms and operations | # LANGUAGE ScopedTypeVariables #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TypeOperators #
# LANGUAGE TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE CPP #
| Utilities for working with ' ' constraints .
module Data.Constraint.Symbol
( type AppendSymbol
, type (++)
, type Take
, type... |
9af39ea80a42d56d5f4efff656207a436b53af2f4c041e44b4d16953d5f9ffc4 | DaveWM/lobster-writer | figwheel_server.clj | (ns figwheel-server)
(defn handler [request]
{:status 200
:body (slurp "resources/public/index.html")}) | null | https://raw.githubusercontent.com/DaveWM/lobster-writer/98eef942cc61725f0a2e00c34e6952c1e262f1ad/dev/figwheel_server.clj | clojure | (ns figwheel-server)
(defn handler [request]
{:status 200
:body (slurp "resources/public/index.html")}) | |
c82d93284ba1303d2fefd812e5716217a30bc4d0ffb4aafe023f898cbc68f5aa | Quid2/zm | Prim.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric , CPP #
module ZM.Prim(Z.Word7,H.Word8,Z.Array(..)) where
import Flat
import Flat.Decoder
import Flat.Encoder
-- import Data.Model
import qualified Data.Word as H
-- import ZM.Type.Generate
import qualif... | null | https://raw.githubusercontent.com/Quid2/zm/02c0514777a75ac054bfd6251edd884372faddea/test/ZM/Prim.hs | haskell | # LANGUAGE DeriveAnyClass #
import Data.Model
import ZM.Type.Generate
type Word7 = H.Word8
|A 7 bits unsigned integer
-- data Word7 = V0 .. V127
TO BE CHECKED
|An 8 bits unsigned integer
-- data Word8 = V0 | V1 .. | V255
encode (Word8 w) = encode w
decode = Word8 <$> decode
size _ ... | # LANGUAGE DeriveGeneric , CPP #
module ZM.Prim(Z.Word7,H.Word8,Z.Array(..)) where
import Flat
import Flat.Decoder
import Flat.Encoder
import qualified Data.Word as H
import qualified ZM.Type.Array as Z
import qualified ZM.Type.Words as Z
import ZM.Model()
data = deriving... |
7635ae4337cc5ab38ae96b82165277e002bcc017be823d2bcb4392374c360512 | input-output-hk/project-icarus-importer | DevelopmentSpec.hs | # OPTIONS_GHC -fno - warn - orphans #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE Typ... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/wallet-new/test/DevelopmentSpec.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeSynonymInstances #
TODO: Use an arbitrary instance of `BackupPhrase` if available | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
Spec for testing ` development ` endpoints
module Develo... |
5cc4284c5f538cd123993c87fa3b245c1a8670574f45c5acae24577dc3365a0b | weblocks-framework/weblocks | sandbox.lisp |
(in-package :weblocks-demo-popover)
;;; Custom copying from stores to sandbox users
(defun init-sandbox-store ()
"Copies the fixtures from the disk store to a sandbox store (to
ensure users have their own non-peristant sandboxes)."
(let ((sandbox-store (open-store :memory))
(fixtures-store (open-store :pr... | null | https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/contrib/yarek/examples/weblocks-demo-popover/src/sandbox.lisp | lisp | Custom copying from stores to sandbox users
Instances of our model should be obtained from the sandbox store |
(in-package :weblocks-demo-popover)
(defun init-sandbox-store ()
"Copies the fixtures from the disk store to a sandbox store (to
ensure users have their own non-peristant sandboxes)."
(let ((sandbox-store (open-store :memory))
(fixtures-store (open-store :prevalence
(me... |
173e3eb060bd353f26a1cca37153d4d408a85ef01625ee25f7832c329d2fc822 | typeclasses/haskell-phrasebook | test-monitoring.hs | main = propertyMain $ withTests 1 $ property do
exe <- build "monitoring"
(_, Just serverOut, _, server) <- liftIO $
createProcess (proc exe ["aggregate-reports"]){ std_out = CreatePipe }
liftIO (hGetLine serverOut) >>= (=== "The monitoring server has started.")
sender <- liftIO $ spawnProces... | null | https://raw.githubusercontent.com/typeclasses/haskell-phrasebook/2b0aa44ef6f6e9745c51ed47b4e59ff704346c87/tests/test-monitoring.hs | haskell | main = propertyMain $ withTests 1 $ property do
exe <- build "monitoring"
(_, Just serverOut, _, server) <- liftIO $
createProcess (proc exe ["aggregate-reports"]){ std_out = CreatePipe }
liftIO (hGetLine serverOut) >>= (=== "The monitoring server has started.")
sender <- liftIO $ spawnProces... | |
10eb3ff39b949202d2edfb703fe0e3de2176780d544accf1aadaa2f75f9c725f | ocaml/ocaml | cmo_format.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml/ocaml/030a41f564dd1d9e6ba191c2f21ea6704446aeca/file_formats/cmo_format.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2006 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Symbol table information for .cmo and .cma files
open Misc
type reloc_info =
type compilation_unit... |
9dd717b45927856e796f127b6a5620ead1ffdc0952cb387b805f7ff9479c6e5c | ocaml-sf/learn-ocaml-corpus | bval_trivial.ml | open Seq
(* -------------------------------------------------------------------------- *)
(* The size of a tree. *)
let rec size (t : tree) : int =
match t with
| TLeaf _ ->
1
| TNonLeaf offspring ->
1 + size_offspring offspring
and size_offspring (offspring : offspring) : int =
match offspring(... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/alpha_beta/wrong/bval_trivial.ml | ocaml | --------------------------------------------------------------------------
The size of a tree.
--------------------------------------------------------------------------
The height of a tree.
--------------------------------------------------------------------------
Evaluating a tree, with a sense parameter:... | open Seq
let rec size (t : tree) : int =
match t with
| TLeaf _ ->
1
| TNonLeaf offspring ->
1 + size_offspring offspring
and size_offspring (offspring : offspring) : int =
match offspring() with
| Nil ->
0
| Cons ((_move, t), offspring) ->
size t + size_offspring offspring
le... |
42c2736b2acabdf973f240e49f863f5074bd8cecd129654b9bd752c6267ace59 | instedd/planwise | build_icons.clj | (ns planwise.tasks.build-icons
(:require [clojure.xml :as xml]
[clojure.java.io :as io]
[clojure.string :as string]
[taoensso.timbre :as timbre])
(:gen-class))
(timbre/refer-timbre)
(defn process-svg [file]
(info "Processing" file)
(with-open [input (io/input-stream file)]
... | null | https://raw.githubusercontent.com/instedd/planwise/1bc2a5742ae3dc377dddf1f9e9bb60f0d2f59084/src/planwise/tasks/build_icons.clj | clojure | (ns planwise.tasks.build-icons
(:require [clojure.xml :as xml]
[clojure.java.io :as io]
[clojure.string :as string]
[taoensso.timbre :as timbre])
(:gen-class))
(timbre/refer-timbre)
(defn process-svg [file]
(info "Processing" file)
(with-open [input (io/input-stream file)]
... | |
119c8c405cd08097bb3a9dd19982c2c0ec357c754a4fbde95eb43c15ff85b887 | bazurbat/chicken-scheme | modules.scm | ;;;; modules.scm - module-system support
;
Copyright ( c ) 2011 - 2016 , The CHICKEN Team
; 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 abo... | null | https://raw.githubusercontent.com/bazurbat/chicken-scheme/f0c9d1fd8b68eb322e320e65ec40b0bf7d1b41dc/modules.scm | scheme | modules.scm - module-system support
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 followi... | Copyright ( c ) 2011 - 2016 , The CHICKEN Team
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE... |
3e4e1bb86e2093c7b6d3d7c7853dc76de6413f45fc5ce17939b3e32d51ab20aa | jtkristensen/Jeopardy | Generators.hs |
-- Generators to be reused across different test scenarios
module Generators where
import Core.Syntax
import qualified TestConfig as Config
import Control.Monad.State
import Test.Tasty.QuickCheck
constructorName :: Gen C
constructorName = oneof $ return . return <$> ['A'..'Z']
variableName :: Gen X
variableName =... | null | https://raw.githubusercontent.com/jtkristensen/Jeopardy/97ba04a13ead8a7adf2fa7a5bc4ed86fac868c6e/test/Generators.hs | haskell | Generators to be reused across different test scenarios
TODO:
This should be StateT [X] (ReaderT Int) ...
And also, it should generalize to make patterns that work further
than commutativity (like associative unificaiton or something).
-- A sized variable pattern that uses a fresh variable name.
variable :: Stat... |
module Generators where
import Core.Syntax
import qualified TestConfig as Config
import Control.Monad.State
import Test.Tasty.QuickCheck
constructorName :: Gen C
constructorName = oneof $ return . return <$> ['A'..'Z']
variableName :: Gen X
variableName = oneof $ return . return <$> ['a'..'z']
variableSort :: Ge... |
1edf053ec8c7ac09b021f8b3b7b4b6822ffc622db4b5862f1d167a6c50a97118 | freizl/dive-into-haskell | another-mtl-example.hs | {-# LANGUAGE OverloadedStrings #-}
import Control.Monad.Reader
import Control.Monad.State
import Data.Text
import qualified Data.Map.Strict as M
import Prelude hiding (unwords)
--type ContextName = Text
{- Reader Monad, works -}
context :: ReaderT Text IO Text
context = do
name <- ask
return name
main1 :: I... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/codes/monad/another-mtl-example.hs | haskell | # LANGUAGE OverloadedStrings #
type ContextName = Text
Reader Monad, works
Use reader monad in state monad, works
Use state monad in reader monad, FAILED! |
import Control.Monad.Reader
import Control.Monad.State
import Data.Text
import qualified Data.Map.Strict as M
import Prelude hiding (unwords)
context :: ReaderT Text IO Text
context = do
name <- ask
return name
main1 :: IO ()
main1 = do
name <- runReaderT context "CONCRETE_CONTEXT"
print (name)
S... |
f136fe69a4d16ac8f49ea163bcf5009af2ba40a74ada9d9cf4cbc119c73c27ae | soenkehahn/generics-eot | Datatype.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE IncoherentInstances #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Generics.Eot.Dataty... | null | https://raw.githubusercontent.com/soenkehahn/generics-eot/cb001556d716deab72472f8c82f1b0eae326c25b/src/Generics/Eot/Datatype.hs | haskell | | Type for meta information about ADTs.
^ unqualified name of the type
constructor.
^ Record constructor, containing the list of the selector names.
^ Constructor with fields, but without selector names.
The argument gives the number of fields.
^ Constructor without fields.
* datatype
* constructors
* fields | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE IncoherentInstances #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Generics.Eot.Dataty... |
463dca3382115fed543c62f9a6bbe9842dcea93aa59a8cf12f2c5e541568eb03 | galdor/tungsten | timestamp.lisp | (in-package :time)
(defstruct timestamp
(seconds 0 :type integer :read-only t)
(nanoseconds 0 :type integer :read-only t))
(defmethod print-object ((timestamp timestamp) stream)
(print-unreadable-object (timestamp stream :type t)
(with-slots (seconds nanoseconds) timestamp
(format stream "~D ~D" secon... | null | https://raw.githubusercontent.com/galdor/tungsten/61bc5e1c91c8027cce9f079f1eec9368316e181c/tungsten-time/src/timestamp.lisp | lisp | (in-package :time)
(defstruct timestamp
(seconds 0 :type integer :read-only t)
(nanoseconds 0 :type integer :read-only t))
(defmethod print-object ((timestamp timestamp) stream)
(print-unreadable-object (timestamp stream :type t)
(with-slots (seconds nanoseconds) timestamp
(format stream "~D ~D" secon... | |
9cb4b327509db9e15e13888354fce2b925573c8cb41d3a44889ef73217520750 | YoshikuniJujo/test_haskell | Middle.hs | # OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.Khr.Surface.Middle (
-- * Type
S,
-- * Destroy
destroy,
-- * Data Structures
Capabilities(..), Format(..) ) where
import Gpu.Vulkan.Khr.Surface.Middle.Internal
| null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/6694c28f444b99915e7e88dd3b5c38ed44d36466/themes/gui/vulkan/try-vulkan-middle-khr/src/Gpu/Vulkan/Khr/Surface/Middle.hs | haskell | * Type
* Destroy
* Data Structures | # OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.Khr.Surface.Middle (
S,
destroy,
Capabilities(..), Format(..) ) where
import Gpu.Vulkan.Khr.Surface.Middle.Internal
|
9e2bf4eb318739db24e500fe0ef5c18a90d0abd12c26ea0728c900673358768d | dwayne/eopl3 | parser.rkt | #lang eopl
;; Program ::= Expression
;;
;; Expression ::= Number
;;
;; ::= Identifier
;;
;; ::= -(Expression, Expression)
;;
;; ::= zero?(Expression)
;;
;; ::= cons(Expression, Expression)
;;
;; ::= car(Expression)
;;
;; ::= cdr(Expression)
;;
;; ... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/05-ch5/interpreters/racket/EXCEPTIONS-5.40/parser.rkt | racket | Program ::= Expression
Expression ::= Number
::= Identifier
::= -(Expression, Expression)
::= zero?(Expression)
::= cons(Expression, Expression)
::= car(Expression)
::= cdr(Expression)
::= null?(Expression)
::=... | #lang eopl
: : = let { Identifier = Expression } * in Expression
(provide
AST
program
a-program
expression expression?
const-exp
var-exp
diff-exp
zero?-exp
cons-exp
car-exp
cdr-exp
null?-exp
emptylist-exp
list-exp
if-exp
let-exp
proc-exp
letrec-exp
call-exp
try-exp
raise-exp
resu... |
fcd205f287b00fe2328aa58d338f94bcca8cc942d877195daf96edbf91919127 | links-lang/links | eval.mli | type behaviour = Classic | Incremental
module Error : sig
type t =
| InvalidDataType
| InvalidData
| ViolatesFunDepConstraint of Fun_dep.t
end
val put :
?behaviour:behaviour ->
db:Database.t ->
Value.t ->
Phrase_value.t list ->
(unit, Error.t) result
| null | https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/lens/eval.mli | ocaml | type behaviour = Classic | Incremental
module Error : sig
type t =
| InvalidDataType
| InvalidData
| ViolatesFunDepConstraint of Fun_dep.t
end
val put :
?behaviour:behaviour ->
db:Database.t ->
Value.t ->
Phrase_value.t list ->
(unit, Error.t) result
| |
618c2999578078427ecef7593ba08e5216806d27bac300018a44497185536148 | fukamachi/qlot | github.lisp | (defpackage #:qlot/distify/github
(:use #:cl)
(:import-from #:qlot/source
#:source-project-name
#:source-version
#:source-version-prefix
#:source-github-repos
#:source-github-ref
#:source-github-branch
#:... | null | https://raw.githubusercontent.com/fukamachi/qlot/b6048e4ab719e141e3083f192242646920b76ccb/distify/github.lisp | lisp | Old Dexador doesn't accept :basic-auth | (defpackage #:qlot/distify/github
(:use #:cl)
(:import-from #:qlot/source
#:source-project-name
#:source-version
#:source-version-prefix
#:source-github-repos
#:source-github-ref
#:source-github-branch
#:... |
87e04615a454497f9e797118e3d0508b457bab5d20fa51db2a8a9063caac1530 | rizo/snowflake-os | reload.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/ocamlopt.opt/asmcomp/power/reload.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
let fundecl f =
(new Reload... |
29e7b363ff94151e3f8540852052a52a0649417b0ef1522aa07d2ab8b58a40b6 | plumatic/grab-bag | max_ent_test.clj | (ns classify.algorithms.max-ent-test
(:use clojure.test plumbing.core plumbing.test classify.algorithms.max-ent)
(:require
[plumbing.index :as plumbing-index]
[plumbing.io :as io]
[flop.map :as map]
[flop.empirical-gradient :as empirical-gradient]
[classify.core :as classify]))
(deftest unsplat-test... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/classify/test/classify/algorithms/max_ent_test.clj | clojure | same as above
same as above with prior on weights | (ns classify.algorithms.max-ent-test
(:use clojure.test plumbing.core plumbing.test classify.algorithms.max-ent)
(:require
[plumbing.index :as plumbing-index]
[plumbing.io :as io]
[flop.map :as map]
[flop.empirical-gradient :as empirical-gradient]
[classify.core :as classify]))
(deftest unsplat-test... |
1ce3e7a447e2bcbbeab9a23ce232729fdfa09c8ed66fca51e768a9976339f3f4 | alanz/ghc-exactprint | T8633.hs | module Main where
import Language.Haskell.TH.Syntax
t1 = case mkName "^.." of
Name (OccName ".") (NameQ (ModName "^")) -> error "bug0"
Name (OccName "^..") NameS -> return ()
t2 = case mkName "Control.Lens.^.." of
Name (OccName ".") (NameQ (ModName "Control.Lens.^")) -> error "bug1"
N... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T8633.hs | haskell | module Main where
import Language.Haskell.TH.Syntax
t1 = case mkName "^.." of
Name (OccName ".") (NameQ (ModName "^")) -> error "bug0"
Name (OccName "^..") NameS -> return ()
t2 = case mkName "Control.Lens.^.." of
Name (OccName ".") (NameQ (ModName "Control.Lens.^")) -> error "bug1"
N... | |
b46a0bf8eb6eb516033a84af78a3d1505ff876a44b944ea4d0d241188998871b | ocaml/ocamlbuild | shell.mli | (***********************************************************************)
(* *)
(* ocamlbuild *)
(* *)
, , projet Galliu... | null | https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/src/shell.mli | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
Original author :
val is_simple_filename : string... |
0a6ec3cbc077ce54d48aba3cdb4e27d2b7087b79d0ccb0dd71481393e3d9a6bf | typedbyte/effet | Error.hs | # LANGUAGE TemplateHaskell #
-----------------------------------------------------------------------------
-- |
-- Module : Control.Effect.Error
Copyright : ( c ) , 2020
-- License : BSD3 (see the file LICENSE)
-- Maintainer :
-- Stability : stable
-- Portability : portable
--
-- The error ef... | null | https://raw.githubusercontent.com/typedbyte/effet/b1e0e2188ae59f0c079b83be6d59f016c5e4baf5/src/Control/Effect/Error.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Effect.Error
License : BSD3 (see the file LICENSE)
Maintainer :
Stability : stable
Portability : portable
The error effect, similar to the @MonadError@ type class from the
@mtl@ library.
-----------... | # LANGUAGE TemplateHaskell #
Copyright : ( c ) , 2020
module Control.Effect.Error
Error'(..)
, liftEither'
( i.e. , you only have one error effect in your monadic context ) ,
, Error
, throwError
, catchError
, liftEither
, runError'
, runError
* Tagging and
' untagError '' \@\"era... |
37b01d7275dbde0835e40b8cf8dcc0b3dadd9b95ee9ec9605d09e25737ade415 | oral-health-and-disease-ontologies/ohd-ontology | ontology-metrics.lisp | (defun ohd-class-count (path-to-ontology)
(let
((ohd-count 0)
(bfo-count 0)
(fma-count 0)
(ogms-count 0)
(omrse-count 0)
(iao-count 0)
(obi-count 0)
(caro-count 0)
(cdt-count 0)
(ncbi-count 0)
(all-classes-count 0)
(running-total-count... | null | https://raw.githubusercontent.com/oral-health-and-disease-ontologies/ohd-ontology/ba3f502b86487c8ba5fa04ff8ba33312a1679570/src/r21-study/ontology-metrics.lisp | lisp | load the ontology; I do this by creating a merged merged version of
the tooth restoration ontology and all its imports
(print-db count)
return count | (defun ohd-class-count (path-to-ontology)
(let
((ohd-count 0)
(bfo-count 0)
(fma-count 0)
(ogms-count 0)
(omrse-count 0)
(iao-count 0)
(obi-count 0)
(caro-count 0)
(cdt-count 0)
(ncbi-count 0)
(all-classes-count 0)
(running-total-count... |
9952998a9631d068eaa0a3eda075b9ade4a37a1b75e994a2f6ffc107b3caed4c | EarnestResearch/yambda | Encoding.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
-- requestBody is deprecated but it's a record field
# OPTIONS_GHC -Wno - warnings - deprecations #
-- | API GW / WAI conversions
module AWS.Lambda.Wai.Encoding
( gwReqToWai
, waiResToGw
) where
import ... | null | https://raw.githubusercontent.com/EarnestResearch/yambda/b1f45e42447c08d7da4b3f470bdb849c9ea1b200/wai/src/AWS/Lambda/Wai/Encoding.hs | haskell | # LANGUAGE OverloadedStrings #
requestBody is deprecated but it's a record field
| API GW / WAI conversions
| Thrown when response body is not a valid JSON
| Thrown when we can't determine remote host
| Converts API GW request to WAI HTTP request
| Converts WAI HTTP response to API GW response
Note that API ... | # LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
# OPTIONS_GHC -Wno - warnings - deprecations #
module AWS.Lambda.Wai.Encoding
( gwReqToWai
, waiResToGw
) where
import AWS.Lambda.Event.APIGatewayV2 hiding (rawQueryString)
import Control.Arrow ((***))
import Contro... |
22100b7a7e0f9531546075045c4d44bdefbb4b7395f3413ffbf96a69259e47a5 | lpw25/ocaml-typed-effects | tast_iter.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/lpw25/ocaml-typed-effects/79ea08b285c1fd9caf3f5a4d2aa112877f882bea/tools/tast_iter.mli | ocaml | *********************************************************************
OCaml
... | , LexiFi
Copyright 2012 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Asttypes
open Typedtree
class iter... |
142b293c00db9ad7063bcb02c9755884d9c8a0c0256b9464ba689450c398d1b9 | eholk/harlan | returnify-kernels.scm | (library
(harlan middle returnify-kernels)
(export returnify-kernels
danger-type
bounds-check
allocation-failure
num-danger)
(import
(rnrs)
(except (elegant-weapons helpers) ident?)
(harlan helpers))
;; Variables related to danger
;;
;; Be sure to update DAN... | null | https://raw.githubusercontent.com/eholk/harlan/3afd95b1c3ad02a354481774585e866857a687b8/harlan/middle/returnify-kernels.scm | scheme | Variables related to danger
Be sure to update DANGER_TABLE in harlan.cpp
TODO: the danger vector should probably get its own region.
FIXME: this is using a dummy region variable...
This is stupid
This is the stupidest procedure I've ever written
Replaces calls to (error) with set!'s on the error variable and a
... | (library
(harlan middle returnify-kernels)
(export returnify-kernels
danger-type
bounds-check
allocation-failure
num-danger)
(import
(rnrs)
(except (elegant-weapons helpers) ident?)
(harlan helpers))
(define danger-type 'bool)
(define bounds-check '(int 0))
... |
73e7a852a740d1baf86a17a2f08629b5d146904a98d8ca2d14d91b01a15a9d74 | andrejbauer/plzoo | beautify.ml | (** Renaming of bound variables for pretty printing. *)
open Syntax
* Split a variable name into base and numerical postfix , e.g. ,
[ " x42 " ] is split into [ ( " x " , 42 ) ] .
["x42"] is split into [("x", 42)]. *)
let split s =
let n = String.length s in
let i = ref (n - 1) in
while !i >= 0 && '0'... | null | https://raw.githubusercontent.com/andrejbauer/plzoo/ae6041c65baf1eebf65a60617819efeb8dcd3420/src/lambda/beautify.ml | ocaml | * Renaming of bound variables for pretty printing.
* Given a variable [x] and a list of variable names [xs], find a variant of [x] which
does not appear in [xs]. |
open Syntax
* Split a variable name into base and numerical postfix , e.g. ,
[ " x42 " ] is split into [ ( " x " , 42 ) ] .
["x42"] is split into [("x", 42)]. *)
let split s =
let n = String.length s in
let i = ref (n - 1) in
while !i >= 0 && '0' <= s.[!i] && s.[!i] <= '9' do decr i done ;
if !i <... |
0954302e5d6a46a87b11e90fa874f06219f8fd1f82ba901cc52defc06502328b | well-typed/optics | Utils.hs | module Optics.TH.Internal.Utils where
import Control.Monad
import Data.Maybe
import Language.Haskell.TH
import Language.Haskell.TH.Datatype.TyVarBndr
import qualified Data.List as L
import qualified Data.Map as M
import qualified Data.Set as S
import qualified Language.Haskell.TH.Datatype as D
import Data.Set.Optics
... | null | https://raw.githubusercontent.com/well-typed/optics/ba3c5a4d2f110c82238bc2fe7bb187023ab516f5/optics-th/src/Optics/TH/Internal/Utils.hs | haskell | | Apply arguments to a type constructor
| Apply arguments to a function
| Construct a tuple type given a list of types.
| Construct a tuple value given a list of expressions.
| Construct a tuple pattern given a list of patterns.
| Apply arguments to a type constructor.
| Generate many new names from a given base... | module Optics.TH.Internal.Utils where
import Control.Monad
import Data.Maybe
import Language.Haskell.TH
import Language.Haskell.TH.Datatype.TyVarBndr
import qualified Data.List as L
import qualified Data.Map as M
import qualified Data.Set as S
import qualified Language.Haskell.TH.Datatype as D
import Data.Set.Optics
... |
b273593e4da91f5e30fd07489064be98581d7c7792c9dba700d5717f7208d99c | metabase/metabase | verify.clj | (ns build-drivers.verify
(:require
[build-drivers.common :as c]
[build-drivers.lint-manifest-file :as lint-manifest-file]
[clojure.spec.alpha :as s]
[colorize.core :as colorize]
[expound.alpha :as expound]
[metabuild-common.core :as u]
[yaml.core :as yaml])
(:import
(java.util.zip ZipEntry Z... | null | https://raw.githubusercontent.com/metabase/metabase/5e9b52a32dfeab754d218c758d08fffbacb7c0e7/bin/build/src/build_drivers/verify.clj | clojure | print a readable explanation of the spec error | (ns build-drivers.verify
(:require
[build-drivers.common :as c]
[build-drivers.lint-manifest-file :as lint-manifest-file]
[clojure.spec.alpha :as s]
[colorize.core :as colorize]
[expound.alpha :as expound]
[metabuild-common.core :as u]
[yaml.core :as yaml])
(:import
(java.util.zip ZipEntry Z... |
db4e3ec295416146a32ad5d2e3da540a0a3ddc9f650562a261959e96cd8dae4f | tmcgilchrist/tiger | error.ml | open Core_kernel
type t =
| LexingError
| SyntaxError
TODO use with sexp
exception Error of t * Location.t * string
let name_of_error = function
| SyntaxError -> "Syntax error"
| LexingError -> "Lexing error"
let raise_error err loc msg =
raise @@ Error (err, loc, msg)
let syntax_error = raise_error Sy... | null | https://raw.githubusercontent.com/tmcgilchrist/tiger/db4bc99e85ae80c5f15749d66a9e4d8ebe3b2faa/lib/error.ml | ocaml | open Core_kernel
type t =
| LexingError
| SyntaxError
TODO use with sexp
exception Error of t * Location.t * string
let name_of_error = function
| SyntaxError -> "Syntax error"
| LexingError -> "Lexing error"
let raise_error err loc msg =
raise @@ Error (err, loc, msg)
let syntax_error = raise_error Sy... | |
c32d9599afedf54965475f4661c48e66af0a78522d60090926b7696a5ffd6203 | spurious/chibi-scheme-mirror | srfi-1-tests.scm | (import (chibi) (chibi test) (srfi 1))
(test-begin "srfi-1")
;; srfi-1 examples
;; -1/srfi-1.html
(test '(a) (cons 'a '()))
(test '((a) b c d) (cons '(a) '(b c d)))
(test '("a" b c) (cons "a" '(b c)))
(test '(a . 3) (cons 'a 3))
(test '((a b) . c) (cons '(a b) 'c))
(test '(a 7 c) (list 'a (+ 3 4) 'c))
(test '() (list... | null | https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/tests/srfi-1-tests.scm | scheme | srfi-1 examples
-1/srfi-1.html
success , error or other
divergent
divergent | (import (chibi) (chibi test) (srfi 1))
(test-begin "srfi-1")
(test '(a) (cons 'a '()))
(test '((a) b c d) (cons '(a) '(b c d)))
(test '("a" b c) (cons "a" '(b c)))
(test '(a . 3) (cons 'a 3))
(test '((a b) . c) (cons '(a b) 'c))
(test '(a 7 c) (list 'a (+ 3 4) 'c))
(test '() (list))
(test '(a b c) (xcons '(b c) 'a))
... |
c09042949518213a70604ab38558902fc9e570ec6f71258f09f5344c945d6ae5 | rixed/ramen | ipcsv.ml | open Sys
let is_comment c = (List.hd c).[0] = '#'
let print_ip ip off =
let i = Ipaddr.V6.of_string_exn ip in
let a, b, _c, _d = Ipaddr.V6.to_int32 i in
Printf.printf "((uint128_t)%#08lx%08lxULL << 64U) | %s" a b off
let f1 r columns =
if not (is_comment columns) then (
match columns with
| [ips; count... | null | https://raw.githubusercontent.com/rixed/ramen/186790aab3e2f83e53c37800506366948806bc01/tools/ipcsv.ml | ocaml | open Sys
let is_comment c = (List.hd c).[0] = '#'
let print_ip ip off =
let i = Ipaddr.V6.of_string_exn ip in
let a, b, _c, _d = Ipaddr.V6.to_int32 i in
Printf.printf "((uint128_t)%#08lx%08lxULL << 64U) | %s" a b off
let f1 r columns =
if not (is_comment columns) then (
match columns with
| [ips; count... | |
f2629ed66272b154f152b24213f8cb5f4d9e7400e5a1025cf6b54648151eac7a | lally/ppt | ParsedRep.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ppt.Frame.ParsedRep where
import GHC.Generics
import Data.Aeson
import Data.Hashable
import Data.Word
import Ppt.Frame.Types
import Control.Lens hiding (element, noneOf)
|Parsing , Calculation , and Layout
Ppt builds a buffer specification from its i... | null | https://raw.githubusercontent.com/lally/ppt/67587918a6cb72cf4b5402eee222842050c110fc/src/Ppt/Frame/ParsedRep.hs | haskell | |Parsed Representation
^Key, Value
|Literal data members of the Frame. These can be single,
standalone members /or/ a differential. In the latter case, a
single differential declaration in the original specification can
result in multiple members in the layout.
operations on series, just the built-in ops.
con... | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ppt.Frame.ParsedRep where
import GHC.Generics
import Data.Aeson
import Data.Hashable
import Data.Word
import Ppt.Frame.Types
import Control.Lens hiding (element, noneOf)
|Parsing , Calculation , and Layout
Ppt builds a buffer specification from its i... |
8bef540645426ee127f4ec068856e21296e974715147bc952238a6a93442b5a1 | kayceesrk/Quelea | testCtrt.hs | {-# LANGUAGE ScopedTypeVariables, TemplateHaskell #-}
import Control.Applicative ((<$>))
import Quelea.Types
import Quelea.Contract
import Quelea.TH
import TestCtrtDefs
main = do
let f :: Fol () = liftProp $ (Raw $ fol2Z3Ctrt sc) ⇒ (Raw $ fol2Z3Ctrt sc)
isValid "Test1" f >>= \r -> putStrLn $ "Expect True, Resul... | null | https://raw.githubusercontent.com/kayceesrk/Quelea/73db79a5d5513b9aeeb475867a67bacb6a5313d0/tests/UnitTests/testCtrt.hs | haskell | # LANGUAGE ScopedTypeVariables, TemplateHaskell # |
import Control.Applicative ((<$>))
import Quelea.Types
import Quelea.Contract
import Quelea.TH
import TestCtrtDefs
main = do
let f :: Fol () = liftProp $ (Raw $ fol2Z3Ctrt sc) ⇒ (Raw $ fol2Z3Ctrt sc)
isValid "Test1" f >>= \r -> putStrLn $ "Expect True, Result=" ++ show r
let f :: Fol () = liftProp $ (Raw $ fo... |
f33cd1a74d80832f51042f1b4e22215d4eb4f94c303379e7fd6861c73a90a664 | subtitle-master/subtitlemaster | init.cljs | (ns smgui.init
(:require [smgui.main :refer [init]]))
(init)
| null | https://raw.githubusercontent.com/subtitle-master/subtitlemaster/d88c2fb007c6c3d4030fefbd4b7e3eafb0e797a9/src/cljs/smgui/init.cljs | clojure | (ns smgui.init
(:require [smgui.main :refer [init]]))
(init)
| |
dfbff1b648009581eb75d9836fa0143b1b94f0d3396bbd84d9e6139eef005dc8 | thwfhk/lambdaQ | Context.hs | # LANGUAGE FlexibleContexts #
module Context where
import Syntax
import Data.List
import Text.Parsec (ParsecT, getState, setState)
import Data.Functor.Identity (Identity)
import Control.Monad.State
import Control.Monad.Except
type Parser a = ParsecT String Contexts Identity a
type Name = String
data Binding
= Name... | null | https://raw.githubusercontent.com/thwfhk/lambdaQ/55118fb2eed87955ac20f241b8e33c31e302901d/src/Frontend/src/Context.hs | haskell | (Gamma, Omega)
| add pattern wtype bindings
| add pattern type bindings
| add pattern name bindings
helper functions for interacting with Contexts State | # LANGUAGE FlexibleContexts #
module Context where
import Syntax
import Data.List
import Text.Parsec (ParsecT, getState, setState)
import Data.Functor.Identity (Identity)
import Control.Monad.State
import Control.Monad.Except
type Parser a = ParsecT String Contexts Identity a
type Name = String
data Binding
= Name... |
0710110d961e67202fc3dd4dfaefdb195bc477bc200d2253494e250bec88bf63 | chrisdone/prana | Bifoldable.hs | {-# LANGUAGE Safe #-}
# LANGUAGE ScopedTypeVariables #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Bifoldable
Copyright : ( C ) 2011 - 2016
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Po... | null | https://raw.githubusercontent.com/chrisdone/prana/f2e45538937d326aff562b6d49296eaedd015662/prana-boot/packages/base-4.11.1.0/Data/Bifoldable.hs | haskell | # LANGUAGE Safe #
---------------------------------------------------------------------------
|
Module : Data.Bifoldable
License : BSD-style (see the file LICENSE)
Maintainer :
Stability : provisional
Portability : portable
----------------------------------------------------------------------... | # LANGUAGE ScopedTypeVariables #
Copyright : ( C ) 2011 - 2016
@since 4.10.0.0
module Data.Bifoldable
( Bifoldable(..)
, bifoldr'
, bifoldr1
, bifoldrM
, bifoldl'
, bifoldl1
, bifoldlM
, bitraverse_
, bifor_
, bimapM_
, biforM_
, bimsum
, bisequenceA_
, bisequence_
, biasum
,... |
3497dcc31074defcc7299d5827917614800b1e75632b7a0affc020a5a2aa2e20 | hbr/albatross | pool.ml | type next_pointer = int option
type 'a elem =
| Elem of 'a
| Free of next_pointer
type 'a t = {vector: 'a elem Vector.t;
mutable first_free: next_pointer}
let make_empty (): 'a t =
{vector = Vector.make_empty ();
first_free = None}
let capacity (p:'a t): int =
Vector.count p.vector
let has (... | null | https://raw.githubusercontent.com/hbr/albatross/8f28ef97951f92f30dc69cf94c0bbe20d64fba21/ocaml/fmlib/basic/pool.ml | ocaml | Illegal call!
cannot happen | type next_pointer = int option
type 'a elem =
| Elem of 'a
| Free of next_pointer
type 'a t = {vector: 'a elem Vector.t;
mutable first_free: next_pointer}
let make_empty (): 'a t =
{vector = Vector.make_empty ();
first_free = None}
let capacity (p:'a t): int =
Vector.count p.vector
let has (... |
3fa9385b21a0945e2afadb410732fb9ba10a2e5e75fe11fcab5c2b4e269e64a6 | mon-key/unicly | unicly-extend.lisp | : FILE - CREATED < Timestamp : # { 2011 - 09 - 15T19:19:50 - 04:00Z}#{11374 } - by MON >
: FILE unicly / unicly - extend.lisp
;;; ==============================
;;; ==============================
;; :NOTE The inteface defined here is experimental and subject to change!
;;
The current interface as defined below i... | null | https://raw.githubusercontent.com/mon-key/unicly/f9bd21446f35e28766d2f1ada2741399b14d93cb/unicly-extend.lisp | lisp | ==============================
==============================
:NOTE The inteface defined here is experimental and subject to change!
everything is written out by hand as a bunch of macros.
`unique-universal-identifier' b/c of the way we've chosen to interact with
the base UUID class `unique-universal-identifier... | : FILE - CREATED < Timestamp : # { 2011 - 09 - 15T19:19:50 - 04:00Z}#{11374 } - by MON >
: FILE unicly / unicly - extend.lisp
The current interface as defined below is not hooking into the MOP and
There are some issues around defining a direct CLOS oriented
defgeneric / defmethod interface w / r / t subclass... |
0f3e27a67ae0dfb7c024e7b8c71d4d3e229ad227303289fc50ba41be40d28186 | elastic/eui-cljs | spacer.cljs | (ns eui.spacer
(:require ["@elastic/eui/lib/components/spacer/spacer.js" :as eui]))
(def SIZES eui/SIZES)
(def EuiSpacer eui/EuiSpacer)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/spacer.cljs | clojure | (ns eui.spacer
(:require ["@elastic/eui/lib/components/spacer/spacer.js" :as eui]))
(def SIZES eui/SIZES)
(def EuiSpacer eui/EuiSpacer)
| |
34c2aab1707cb942c5b13b76b2723f2a328fb176effbb3b70d22360e55cae933 | ndmitchell/cmdargs | SplitJoin.hs | # LANGUAGE RecordWildCards #
module System.Console.CmdArgs.Explicit.SplitJoin(splitArgs, joinArgs) where
import Data.Char
import Data.Maybe
-- | Given a sequence of arguments, join them together in a manner that could be used on
-- the command line, giving preference to the Windows @cmd@ shell quoting conventions.... | null | https://raw.githubusercontent.com/ndmitchell/cmdargs/7c206f464fa666b2654ae9da59cdff44e310de66/System/Console/CmdArgs/Explicit/SplitJoin.hs | haskell | | Given a sequence of arguments, join them together in a manner that could be used on
the command line, giving preference to the Windows @cmd@ shell quoting conventions.
For an alternative version, intended for actual running the result in a shell, see "System.Process.showCommandForUser"
either I just started,... | # LANGUAGE RecordWildCards #
module System.Console.CmdArgs.Explicit.SplitJoin(splitArgs, joinArgs) where
import Data.Char
import Data.Maybe
joinArgs :: [String] -> String
joinArgs = unwords . map f
where
f x = q ++ g x ++ q
where
hasSpace = any isSpace x
q = ['... |
df52566070446423d96a01f583beb3c0d7a68fa17c3ad36af0f67642e8bc2212 | dmitryvk/sbcl-win32-threads | primordial-type.lisp | 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
;;;; provided with absolutely no wa... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/primordial-type.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.
Has the type system been properly initialized? (I.e. is it OK to
use it?)
(set in cold load)
a vector that maps type codes to layouts, used ... | 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!KERNEL")
(defvar *wild-type*)
(defvar *empty-type*)
(defvar *universal-type*)
(defvar *universal-fun-type*)
... |
1b9d53f2e7412fefd9e93e24e3915bc7795014cf97c857e3f1957804e661cc80 | candera/vmt | balkans.cljc | (ns weathergen.database.balkans)
(def theater-info
{:owners
{0 "Greece"
1 "Slovenia"
2 "NATO"
3 "Bosnia"
4 "Albania"
5 "Hungary"
6 "FRY"
7 "Croatia"}
:size [1024 1024]
:mapping {:left [11 0]
:top [45 49.25]
:bottom [36 37.3]
... | null | https://raw.githubusercontent.com/candera/vmt/8cf450e6c34af87d748152afd7f547b92ae9b38e/src/weathergen/database/balkans.cljc | clojure | Some of these were edited by hand, unfortunately. Some of the
get into all that I just copied them in.
Hand edits above this line | (ns weathergen.database.balkans)
(def theater-info
{:owners
{0 "Greece"
1 "Slovenia"
2 "NATO"
3 "Bosnia"
4 "Albania"
5 "Hungary"
6 "FRY"
7 "Croatia"}
:size [1024 1024]
:mapping {:left [11 0]
:top [45 49.25]
:bottom [36 37.3]
... |
27956b4819f6cdd71fe125704660a62507494ba4d6610b1c92b71f3f204a8dfa | LPCIC/matita | xmlPushParser.mli | Copyright ( C ) 2004 - 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of ... | null | https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/xml/xmlPushParser.mli | ocaml | * callbacks needed to instantiate a parser
tag, attr list
tag
data
target, value
value
* do nothing callbacks (all set to None)
* source from which parse an XML file
* source position in a XML source.
* A position is a pair <line, column>
* raised when a parse error occurs, argument is an error message... | Copyright ( C ) 2004 - 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of ... |
1c2d4effb4c1f49a0e6076e475c3a3c8161038799649aa632ddd839ec615ed7c | bobeff/playground | 016.rkt | Exercise 16 . Define the function image - area , which counts the number of
pixels in a given image . See exercise 6 for ideas .
#lang racket
(require rackunit 2htdp/image)
(include "../data/cat-image.rkt")
(define (image-area image)
(* (image-width image) (image-height image)))
(define rect (rectangle 10 20... | null | https://raw.githubusercontent.com/bobeff/playground/7072dbd7e0acd690749abe1498dd5f247cc21637/htdp-second-edition/exercises/016.rkt | racket | Exercise 16 . Define the function image - area , which counts the number of
pixels in a given image . See exercise 6 for ideas .
#lang racket
(require rackunit 2htdp/image)
(include "../data/cat-image.rkt")
(define (image-area image)
(* (image-width image) (image-height image)))
(define rect (rectangle 10 20... | |
965cb1791a87f78081b4b0eea0250e4dfe2892359c1fb6bbbe0146ad79f47dc8 | mgrabmueller/harpy | Call.hs | {-# OPTIONS -cpp #-}
--------------------------------------------------------------------------
-- |
Module : Harpy . Call
Copyright : ( c ) 2006 - 2015 and
-- License : BSD3
--
-- Maintainer :
-- Stability : provisional
-- Portability : non-portable
--
-- Predefined call stubs for ru... | null | https://raw.githubusercontent.com/mgrabmueller/harpy/6df8f480e568a02c98e20d95effc5f35f204bff6/Harpy/Call.hs | haskell | # OPTIONS -cpp #
------------------------------------------------------------------------
|
License : BSD3
Maintainer :
Stability : provisional
Portability : non-portable
Predefined call stubs for run-time generated code.
------------------------------------------------------------------------
$(c... |
Module : Harpy . Call
Copyright : ( c ) 2006 - 2015 and
module Harpy.Call where
import Harpy.CodeGenMonad
import Data.Word
import Foreign.Ptr
import Foreign.C
#ifndef __HADDOCK__
$(callDecl "callAsVoid" [t|Word32 -> IO ()|])
$ ( callDecl " " [ t|forall a b c d e f g . Ptr a - > Ptr b - > P... |
6367c5c1053632492cc448171a44eca14a5b2315d6fc8e90a044f5d14a85128a | capnproto/capnp-ocaml | message.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* capnp - ocaml
*
* Copyright ( c ) 2013 - 2014 ,
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without ... | null | https://raw.githubusercontent.com/capnproto/capnp-ocaml/dda3d811aa7734110d7af051465011f1f823ffb9/src/runtime/message.mli | ocaml | * [Invalid_message] is raised by accessor functions whenever the access cannot
be completed because the message appears to be ill-formed.
* [Out_of_int_range] is raised by convenience accessor functions when a getter
retrieves a value which cannot be expressed as an OCaml int.
* [invalid_msg err] is equivalen... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* capnp - ocaml
*
* Copyright ( c ) 2013 - 2014 ,
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without ... |
5f83261468044686039ce220d62dce7c8cc96d9020fdf23e4c9bad6d08ec13f3 | clojure-interop/java-jdk | NumberUpSupported.clj | (ns javax.print.attribute.standard.NumberUpSupported
"Class NumberUpSupported is a printing attribute class, a set of integers,
that gives the supported values for a NumberUp attribute.
IPP Compatibility: The NumberUpSupported attribute's canonical array
form gives the lower and upper bound for each range of n... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.print/src/javax/print/attribute/standard/NumberUpSupported.clj | clojure | (ns javax.print.attribute.standard.NumberUpSupported
"Class NumberUpSupported is a printing attribute class, a set of integers,
that gives the supported values for a NumberUp attribute.
IPP Compatibility: The NumberUpSupported attribute's canonical array
form gives the lower and upper bound for each range of n... | |
faf4964b48789597dc9355362198a99d1ee05dd36d13430ac29b5b6afdf44970 | prowdsponsor/diagrams-qrcode | using-haskell-qrencode.hs | {-# LANGUAGE OverloadedStrings #-}
import Lucid.Svg (renderBS) -- lucid-svg
import qualified Data.ByteString.Lazy.Char8 as L8 -- bytestring
import qualified Data.QRCode as QR -- haskell-qrencode
import qualified Diagrams.Backend.SVG as D -- diagrams-svg
import qualified Diagr... | null | https://raw.githubusercontent.com/prowdsponsor/diagrams-qrcode/7c278eb11aa609f1330fb2b419c429e3c396c510/examples/using-haskell-qrencode.hs | haskell | # LANGUAGE OverloadedStrings #
lucid-svg
bytestring
haskell-qrencode
diagrams-svg
diagrams-lib
diagrams-qrcode
Calculate QR code
Draw QR code
Render diagram |
main :: IO ()
main = do
Read input from stdin
input <- getContents
qrcode <- QR.encodeString input Nothing QR.QR_ECLEVEL_M QR.QR_MODE_EIGHT True
let dia = D.scale 6 $ QR.stroke $ QR.pathMatrix $ QR.toMatrix qrcode
L8.putStrLn $ renderBS $ D.renderDia D.SVG (D.SVGOptions (D.mkWidth 250) Nothing "") dia
|
1b7c7963df18d73876610d796afb151a177ddccb00de3a957d0765779c0a90e4 | kaizhang/Taiji | Utils.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
module Bio.Data.Experiment.Utils where
import Control.Lens ((.~), (^.), (%~))
import Data.Function (on)
import Data.List (foldl1', groupBy, sortBy)
import Data.List.Ordere... | null | https://raw.githubusercontent.com/kaizhang/Taiji/f6a050ba0ee6acb6077435566669279455cef350/bio-experiments/src/Bio/Data/Experiment/Utils.hs | haskell | # LANGUAGE OverloadedStrings #
| Split a single experiment into multiple experiments, each containing a
fileset.
| Merge experiments with same id.
| Merge replicates with same number.
| Keep Experiments, Replicates and FileSets that satisfy the predicate.
^ then filter by files
| Keep those experiments having sp... | # LANGUAGE FlexibleContexts #
module Bio.Data.Experiment.Utils where
import Control.Lens ((.~), (^.), (%~))
import Data.Function (on)
import Data.List (foldl1', groupBy, sortBy)
import Data.List.Ordered (nubSort)
import qualifie... |
3e1d1922f386fc5615539a24d3b9608ca0309d09b06fca1eaa155c43e5288d0f | diku-dk/futhark | Warnings.hs | -- | A very simple representation of collections of warnings.
-- Warnings have a position (so they can be ordered), and their
-- 'Pretty'-instance produces a human-readable string.
module Language.Futhark.Warnings
( Warnings,
anyWarnings,
singleWarning,
singleWarning',
listWarnings,
prettyWarnings... | null | https://raw.githubusercontent.com/diku-dk/futhark/98e4a75e4de7042afe030837084764bbf3c6c66e/src/Language/Futhark/Warnings.hs | haskell | | A very simple representation of collections of warnings.
Warnings have a position (so they can be ordered), and their
'Pretty'-instance produces a human-readable string.
| The warnings produced by the compiler. The 'Show' instance
produces a human-readable description.
| True if there are any warnings in the s... | module Language.Futhark.Warnings
( Warnings,
anyWarnings,
singleWarning,
singleWarning',
listWarnings,
prettyWarnings,
)
where
import Data.List (sortOn)
import Data.Monoid
import Futhark.Util.Loc
import Futhark.Util.Pretty
import Language.Futhark.Core (locText, prettyStacktrace)
import Prelude
... |
dfc597aa74d7ae0f76fe504c9e629c9c351909ccb6c41c692a863dbeb5f0b834 | alexeispirit/AutoCAD-Utils | utils-list.lsp | ;;; <LISPDOC>
;;; <SUBR>(list-join-to-string strlist splitter)</SUBR>
;;; <DESC>Join list of strings into string</DESC>
;;; <ARG>strlist - list of strings</ARG>
;;; <ARG>splitter - delimiter</ARG>
;;; <RET>Joined string</RET>
;;; </LISPDOC>
(defun list-join-to-string (strlist splitter)
(if strlist
(str... | null | https://raw.githubusercontent.com/alexeispirit/AutoCAD-Utils/852ddebaa66ff4fb77be99317e6180d5b5dfcc49/utils/utils-list.lsp | lisp | <LISPDOC>
<SUBR>(list-join-to-string strlist splitter)</SUBR>
<DESC>Join list of strings into string</DESC>
<ARG>strlist - list of strings</ARG>
<ARG>splitter - delimiter</ARG>
<RET>Joined string</RET>
</LISPDOC>
<LISPDOC>
<SUBR>(list-remove-duplicates lst)</SUBR>
<DESC>Remove duplicates from list</D... | (defun list-join-to-string (strlist splitter)
(if strlist
(strcat
(vl-princ-to-string (car strlist))
(if (< 0 (length (cdr strlist)))
splitter
"")
(list-join-to-string (cdr strlist) splitter))
""))
(defun list-remove-duplicates (lst)
(if lst
(cons (ca... |
dbe3203c06f8eb93ad774bc0afbd50e0414c8e213fe5e5aa999b8662bedf750a | ghosthamlet/algorithm-data-structure | avl_tree.clj | (ns algorithm-data-structure.data-structures.avl-tree
"-algorithms/tree/master/src/data-structures/tree/avl-tree"
(:require [algorithm-data-structure.data-structures.binary-search-tree :as bst]
[algorithm-data-structure.data-structures.binary-tree-node :as btn]))
(declare balance rotate-left-left rotat... | null | https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/data_structures/avl_tree.clj | clojure | self (assoc-in self (concat [:root] node-path [:right]) right-node) | (ns algorithm-data-structure.data-structures.avl-tree
"-algorithms/tree/master/src/data-structures/tree/avl-tree"
(:require [algorithm-data-structure.data-structures.binary-search-tree :as bst]
[algorithm-data-structure.data-structures.binary-tree-node :as btn]))
(declare balance rotate-left-left rotat... |
5603875ad012ef292d7fa95d467e2335f12f7747f05d015b6b739a970305e9f8 | racket/racket-pkg-website | gravatar.rkt | #lang racket/base
(provide gravatar-hash
gravatar-image-url)
(require file/md5)
(require racket/string)
(define (gravatar-hash email)
(bytes->string/utf-8
(md5
(string-downcase
(string-trim email)))))
(define (gravatar-image-url email [size 80]
#:extension [extensi... | null | https://raw.githubusercontent.com/racket/racket-pkg-website/d25b68c125698d944446f8e0a945eff85caebccd/src/gravatar.rkt | racket | #lang racket/base
(provide gravatar-hash
gravatar-image-url)
(require file/md5)
(require racket/string)
(define (gravatar-hash email)
(bytes->string/utf-8
(md5
(string-downcase
(string-trim email)))))
(define (gravatar-image-url email [size 80]
#:extension [extensi... | |
9068a7915e2165d15e0474146eec799fd699032fd7ece32b26cd71aed9833e46 | chenyukang/eopl | 09.scm | (load-relative "../libs/init.scm")
(load-relative "./base/test.scm")
(load-relative "./base/checked-cases.scm")
(load-relative "./base/data-structures.scm")
add listof type to LANG ,
;; note when cons(var, empytlist), ignore check the list's type and var's type
;; and return a "listof type" with var's type
;; new s... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch7/09.scm | scheme | note when cons(var, empytlist), ignore check the list's type and var's type
and return a "listof type" with var's type
new stuff
new stuff
new stuff
sllgen boilerplate ;;;;;;;;;;;;;;;;
type-to-external-form ;;;;;;;;;;;;;;;;
type-to-external-form : Type -> List
check-equal-type! : Type * Type * Exp -> Unspecifie... | (load-relative "../libs/init.scm")
(load-relative "./base/test.scm")
(load-relative "./base/checked-cases.scm")
(load-relative "./base/data-structures.scm")
add listof type to LANG ,
(define-datatype expval expval?
(num-val
(value number?))
(bool-val
(boolean boolean?))
(proc-val
(proc proc?))
(pai... |
42bc948623c6927d002c06cbbb02245e028f9b77abab9c506fcd202921d0d8e9 | phoityne/haskell-debug-adapter | ConfigurationDone.hs | # LANGUAGE MultiParamTypeClasses #
# OPTIONS_GHC -fno - warn - orphans #
module Haskell.Debug.Adapter.State.GHCiRun.ConfigurationDone where
import Control.Monad.IO.Class
import qualified System.Log.Logger as L
import Control.Monad.State
import Control.Lens
import qualified Haskell.DAP as DAP
import Haskell.Debug.Ad... | null | https://raw.githubusercontent.com/phoityne/haskell-debug-adapter/901a0174fea5c9c6dceb39a03bc54c5d704737e9/src/Haskell/Debug/Adapter/State/GHCiRun/ConfigurationDone.hs | haskell | |
Any errors should be sent back as False result Response
|
@see
@see -adapter-protocol/overview
U.sendConsoleEvent _DEBUG_START_MSG
U.sendStdoutEvent _GHCI_PROMPT_HDA
launch response must be sent after configuration done response.
|
|
| # LANGUAGE MultiParamTypeClasses #
# OPTIONS_GHC -fno - warn - orphans #
module Haskell.Debug.Adapter.State.GHCiRun.ConfigurationDone where
import Control.Monad.IO.Class
import qualified System.Log.Logger as L
import Control.Monad.State
import Control.Lens
import qualified Haskell.DAP as DAP
import Haskell.Debug.Ad... |
799fc79e3cb0f32c43573b121dc2f61b595261ee9b484b11c9b0317b55874bd5 | josefs/Gradualizer | case_pattern2.erl | -module(case_pattern2).
-export([f/2]).
-spec f(integer(), atom()) -> ok.
f(X, Y) ->
case {X, Y} of
{Z, Z} -> ok
end.
| null | https://raw.githubusercontent.com/josefs/Gradualizer/208f5816b0157f282212fc036ba7560f0822f9fc/test/should_fail/case_pattern2.erl | erlang | -module(case_pattern2).
-export([f/2]).
-spec f(integer(), atom()) -> ok.
f(X, Y) ->
case {X, Y} of
{Z, Z} -> ok
end.
| |
bd9f26522ac721ff03763f60fadf9065a7040c3456cb5576a7c322e755b6a99a | Convex-Dev/convex.cljc | listing.clj | (ns convex.task.listing
"Generating `./module/README.md`."
(:require [protosens.maestro.idiom.listing :as P.maestro.idiom.listing]))
;;;;;;;;;;
(defn- -pred
;; Used for creating lists.
[type]
(fn [_alias alias-data]
(contains? (alias-data :convex/type)
type)))
;;;
(defn main
... | null | https://raw.githubusercontent.com/Convex-Dev/convex.cljc/211658a0d8e8f85b21b8dbc89f97a25063bb521c/module/task/src/main/bb/convex/task/listing.clj | clojure |
Used for creating lists.
| (ns convex.task.listing
"Generating `./module/README.md`."
(:require [protosens.maestro.idiom.listing :as P.maestro.idiom.listing]))
(defn- -pred
[type]
(fn [_alias alias-data]
(contains? (alias-data :convex/type)
type)))
(defn main
"Prints `./module/README.md`."
[]
(P.m... |
186bc1759ec5f7ca981607ab94393a1869854889bb8ae6a9443fa0f63ce28055 | janestreet/memtrace_viewer_with_deps | test_ppx.ml |
* Copyright ( c ) 2018 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and 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... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/ipaddr/lib_test/test_ppx.ml | ocaml |
* Copyright ( c ) 2018 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and 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... | |
29fd3aa9a49626ee408147fa4a2b2d1e21fe902af465b81273749c77907b4cd5 | melange-re/melange | lam_pass_alpha_conversion.mli | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* 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 , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/core/lam_pass_alpha_conversion.mli | ocaml | * alpha conversion based on arity | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* 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 , either version 3 of the License , or
* ( at your option ) any later... |
39d782890d0bf7d32c5fb25b637083ed58f672f20555ec6c942cd808393ff122 | AbstractMachinesLab/caramel | location.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/ocaml/parsing/406/location.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Lexing
let absname = ref false
This reference should be in Clflags , but it would create an addit... |
abc53967269aa160056a839a4362b4ddd0f0baad3c27deca4cd5a67bb2dc1a6d | Kappa-Dev/KappaTools | mat_inter.ml | open Fraction
open Intervalles
open Matrices
open Intertab
open Occu1
module type Mat_inter =
sig
type prod
type var
val addzero : bool
val list_var : Remanent_parameters_sig.parameters -> prod -> var list
val solve_inf:
Remanent_parameters_sig.parameters ->
Exception.method_handler ->
prod -> va... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/1d23978c9d2dcf868ba7ed212028802e8d984062/core/KaSa_rep/abstract_domains/numerical_domains/mat_inter.ml | ocaml | improve this algorithm in the presence of -oo ??
variable -> contraintes o� il apparait positivement
contrainte -> nb de monomes non major�e
contrainte -> nb de monome non minor�e
contraintes � r�duire
let solved=Working_list_imperative.make n in (*variable trouv�e
contraintes r�duites ou en cours
let read... | open Fraction
open Intervalles
open Matrices
open Intertab
open Occu1
module type Mat_inter =
sig
type prod
type var
val addzero : bool
val list_var : Remanent_parameters_sig.parameters -> prod -> var list
val solve_inf:
Remanent_parameters_sig.parameters ->
Exception.method_handler ->
prod -> va... |
c7c4ad1cbaebf4a3bd51ff137b5d7f55872977805436c628835b075e1c78ea0e | Frama-C/Frama-C-snapshot | aorai_visitors.ml | (**************************************************************************)
(* *)
This file is part of Aorai plug - in of Frama - C.
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/aorai/aorai_visitors.ml | ocaml | ************************************************************************
alternatives)
Automatique) ... | This file is part of Aorai plug - in of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
( Institut National de Recherche en Informatique et en
INSA ( Insti... |
6c2ed5607c9308a1519f8498c41c2b05ff0c08b30c08305110a5c3dc4da7b0f7 | igorhvr/bedlam | srfi-17.scm | SRFI 17 reference implementation for Twobit , contributed
by < >
Use the LET * syntax scope extension in Twobit to let this SET ! macro
reference the old definition of SET ! in the second clause .
(define-syntax set! let*
(syntax-rules ()
((set! (?e0 ?e1 ...) ?v)
((setter ?e0) ?e1 ... ?v))
... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-1.16.6/full-src/sisc/src/sisc/modules/srfi/srfi-17.scm | scheme | SRFI 17 reference implementation for Twobit , contributed
by < >
Use the LET * syntax scope extension in Twobit to let this SET ! macro
reference the old definition of SET ! in the second clause .
(define-syntax set! let*
(syntax-rules ()
((set! (?e0 ?e1 ...) ?v)
((setter ?e0) ?e1 ... ?v))
... | |
18b666079357297000086195d5d0f38dd54dc840d0e1b4db3de7413964e048f9 | chrovis/clj-hgvs | project.clj | (defproject clj-hgvs "0.4.6"
:description "Clojure(Script) library for handling HGVS"
:url "-hgvs"
:license {:name "Apache License, Version 2.0"
:url "-2.0"}
:dependencies [[org.clojure/clojure "1.9.0" :scope "provided"]
[org.clojure/clojurescript "1.11.60" :scope "provided"]]
:pl... | null | https://raw.githubusercontent.com/chrovis/clj-hgvs/ccf6558b3992d23ff4a210869156fcfcb3c529c5/project.clj | clojure | (defproject clj-hgvs "0.4.6"
:description "Clojure(Script) library for handling HGVS"
:url "-hgvs"
:license {:name "Apache License, Version 2.0"
:url "-2.0"}
:dependencies [[org.clojure/clojure "1.9.0" :scope "provided"]
[org.clojure/clojurescript "1.11.60" :scope "provided"]]
:pl... | |
d2c5b63411e0f59b931d80bfbbc9ad89b12bface3ae9bbd3c268e9febce236fa | danr/hipspec | PropT17.hs | module PropT17 where
import Prelude(Bool(..))
import Zeno
-- Definitions
True && x = x
_ && _ = False
False || x = x
_ || _ = True
not True = False
not False = True
-- Nats
data Nat = S Nat | Z
(+) :: Nat -> Nat -> Nat
Z + y = y
(S x) + y = S (x + y)
(*) :: Nat -> Nat -> Nat
Z * _ = Z
(S x) * y = y + (x... | null | https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/testsuite/prod/zeno_version/PropT17.hs | haskell | Definitions
Nats
Lists
Theorem | module PropT17 where
import Prelude(Bool(..))
import Zeno
True && x = x
_ && _ = False
False || x = x
_ || _ = True
not True = False
not False = True
data Nat = S Nat | Z
(+) :: Nat -> Nat -> Nat
Z + y = y
(S x) + y = S (x + y)
(*) :: Nat -> Nat -> Nat
Z * _ = Z
(S x) * y = y + (x * y)
(==),(/=) :: Nat... |
ea1db41e0ba513522a389083f47e4b44e6783bcb1638302a597e68d2e5006a11 | MLstate/opalang | qmlGenericScheme.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/qmlGenericScheme.mli | ocaml |
generic type scheme, parameterized by types and normal form constraints
* number of type vars in a type definition
TODO: add refresh, etc. here, when they are made generic |
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 , ... |
66cecd37253389c370646bedd59a88d88c1ca97e5b7150a017fd12cca8f8586d | cl-aip/mycin | mycin-r.lisp | ;;;; -*- Mode: Lisp; Syntax: Common-Lisp -*-
Code from Paradigms of AI Programming
Copyright ( c ) 1991
File mycin-r.lisp : Sample parameter list and rulebase for mycin .
(eval-when (:compile-toplevel :load-toplevel :execute)
(require "mycin")
)
;;; Parameters for patient:
(defparm name PATIENT t "Patien... | null | https://raw.githubusercontent.com/cl-aip/mycin/28f10e5e72f29d006fddf3831569d754d4f92049/mycin-r.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp -*-
Parameters for patient:
Parameters for culture:
Parameters for organism: | Code from Paradigms of AI Programming
Copyright ( c ) 1991
File mycin-r.lisp : Sample parameter list and rulebase for mycin .
(eval-when (:compile-toplevel :load-toplevel :execute)
(require "mycin")
)
(defparm name PATIENT t "Patient's name: " t read-line)
(defparm sex PATIENT (member male female) "Sex:"... |
9e68ac7f0374f588369006e3ed2b8a2fb690bf8b74389acb9fd343bd9837958d | formal-land/coq-of-ocaml | impredicative_set.ml | type t =
| Empty
| Node : 'a -> t
let rec t_of_list (l : 'a list) : t =
match l with
| [] -> Empty
| _ :: l -> Node (t_of_list l)
| null | https://raw.githubusercontent.com/formal-land/coq-of-ocaml/c9c86b08eb19d7fd023f48029cc5f9bf53f6a11c/tests/impredicative_set.ml | ocaml | type t =
| Empty
| Node : 'a -> t
let rec t_of_list (l : 'a list) : t =
match l with
| [] -> Empty
| _ :: l -> Node (t_of_list l)
| |
5675377b4af896df8cf73536de7bbbbbddd7d8486362edbf4638132edfd22e92 | blindglobe/clocc | autoload.lisp | ;;; generate and use autoloads
;;;
Copyright ( C ) 2000 - 2008 by
This is Free Software , covered by the GNU GPL ( v2 + )
;;; See
;;;
$ I d : autoload.lisp , v 1.18 2008/09/22 19:25:31 sds Exp $
$ Source : /cvsroot / clocc / clocc / src / cllib / autoload.lisp , v $
(eval-when (:compile-toplevel :load-tople... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/cllib/autoload.lisp | lisp | generate and use autoloads
See
`skip-to-line', `timestamp'
autoload
this will be written into `auto.lisp'
; ; by ~a [ ~a]~2%~ | Copyright ( C ) 2000 - 2008 by
This is Free Software , covered by the GNU GPL ( v2 + )
$ I d : autoload.lisp , v 1.18 2008/09/22 19:25:31 sds Exp $
$ Source : /cvsroot / clocc / clocc / src / cllib / autoload.lisp , v $
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :cllib-base (translate-... |
c390215c5bbf1240b2a360d595cb9613c0415a298f8fbc86eb5cd053b34da409 | input-output-hk/rscoin-haskell | Worker.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
-- | Worker that handles end of period.
module RSCoin.Bank.Worker
( runWorkerDefaultPeriod
, runWorker
, runExplorerWorker
) where
import Control.Exception.Base (AsyncExcept... | null | https://raw.githubusercontent.com/input-output-hk/rscoin-haskell/109d8f6f226e9d0b360fcaac14c5a90da112a810/src/RSCoin/Bank/Worker.hs | haskell | # LANGUAGE FlexibleContexts #
| Worker that handles end of period.
| Start worker which runs appropriate action when a period
finishes. Default period length is used.
IORef is used as synchronization primitive between this worker
and another worker (which communicates with explorers).
Its value is True is empt... | # LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
module RSCoin.Bank.Worker
( runWorkerDefaultPeriod
, runWorker
, runExplorerWorker
) where
import Control.Exception.Base (AsyncException)
import Control.Monad (unless, when)
import ... |
c9999b84dbfa526fbe6f0017a1c3349daffbb02db84f759ea4c17f45c157cc42 | mclumd/Meta-AQUA | explainer.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : Meta - aqua ; Base : 10 -*-
(in-package :metaaqua)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;
;;;; The Meta-AQUA Introspective Multistrategy Learning System
;;;; Version 6
;;;;
Copyright ( C ) 1... | null | https://raw.githubusercontent.com/mclumd/Meta-AQUA/e4d4f83330fd07d1354aec245a49bde9e246c618/explainer.lisp | lisp | Syntax : Common - lisp ; Package : Meta - aqua ; Base : 10 -*-
The Meta-AQUA Introspective Multistrategy Learning System
Version 6
File: explainer.lisp
*******************************************************
This program is free software; you can redistribute it and... |
(in-package :metaaqua)
Copyright ( C ) 1996 ( )
under the terms of the GNU General Public License as published by the Free
You should have received a copy of the GNU General Public License along
Mass Ave , Cambridge , , USA . In emacs type C - h C - w to view license .
... |
8b0c3a9f729ccc6792cd493b16db73b3bee25c1527efc436b3a959935668643a | hstreamdb/hstream | Types.hs | module HStream.Gossip.Client.Types where
import Data.ByteString (ByteString)
import Data.Text (Text)
import Data.Word (Word32)
import qualified Options.Applicative as O
data CliOpts = CliOpts {
targetHost :: ByteString
, targetPort :: Word32
, cliCmd :... | null | https://raw.githubusercontent.com/hstreamdb/hstream/2d57ea42fdba2af19330e1ba06ef30235f5e6a6f/hstream-gossip/src/HStream/Gossip/Client/Types.hs | haskell | module HStream.Gossip.Client.Types where
import Data.ByteString (ByteString)
import Data.Text (Text)
import Data.Word (Word32)
import qualified Options.Applicative as O
data CliOpts = CliOpts {
targetHost :: ByteString
, targetPort :: Word32
, cliCmd :... | |
177d78bc114dc4dbe65f12613c409fe1defc152c45319fd0f670ebf4eb1f579a | ghcjs/ghcjs-boot | TH.hs | | The public face of Template Haskell
For other documentation , refer to :
< >
For other documentation, refer to:
<>
-}
module Language.Haskell.TH(
-- * The monad and its operations
Q,
runQ,
* * Administration : errors , locations and IO
reportError, -- :: Str... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/template-haskell/Language/Haskell/TH.hs | haskell | * The monad and its operations
:: String -> Q ()
:: String -> Q ()
:: Bool -> String -> Q ()
:: Q a -> Q a -> Q a
:: Q Loc
:: IO a -> Q a
** Querying the compiler
:: Name -> Q Info
*** Name lookup
:: String -> Q (Maybe Name)
:: String -> Q (Maybe Name)
*** Instance lookup
*** Roles lookup
*** Annotation ... | | The public face of Template Haskell
For other documentation , refer to :
< >
For other documentation, refer to:
<>
-}
module Language.Haskell.TH(
Q,
runQ,
* * Administration : errors , locations and IO
Loc(..),
* * *
reifyModule,
thisModule,
Info(..), ... |
f63c3b21684d4c9ae78e971727773dd6937cc5f4aba53d1e6d905213c69fa5d9 | mrkkrp/parser-combinators | NonEmpty.hs | -- |
Module : Control . Monad . Combinators . NonEmpty
Copyright : © 2017 – present
License : BSD 3 clause
--
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
The module provides ' NonEmpty ' list variants of some of the functions
-- from "Control.Mona... | null | https://raw.githubusercontent.com/mrkkrp/parser-combinators/290852927db8e252baee8ac7521e153d377e01d3/Control/Monad/Combinators/NonEmpty.hs | haskell | |
Stability : experimental
Portability : portable
from "Control.Monad.Combinators".
| @'some' p@ applies the parser @p@ /one/ or more times and returns a
> word = some letter
should succeed at least once.
@p@. | Module : Control . Monad . Combinators . NonEmpty
Copyright : © 2017 – present
License : BSD 3 clause
Maintainer : < >
The module provides ' NonEmpty ' list variants of some of the functions
@since 0.4.0
module Control.Monad.Combinators.NonEmpty
( some,
endBy1,
someTil... |
3953ac981d3580b47fe8b14777a0d3dc69f9acf44c6b5ee24d3755d3c049b46d | michaelballantyne/syntax-spec | mk.rkt | #lang racket/base
(provide (all-defined-out)
quote cons
(for-space mk quasiquote))
(require "../../../main.rkt"
ee-lib/errors
(for-syntax
racket/base
racket/pretty
syntax/parse
syntax/id-table
syntax/transformer
(except-in... | null | https://raw.githubusercontent.com/michaelballantyne/syntax-spec/1eca406e83468601ce7507de25fb036f6ff4d0ff/test/dsls/minikanren-rs2e/mk.rkt | racket |
Surface syntax
TODO: use syntax-parse and syntax classes for better errors.
Surface syntax for interface macros
Runtime
| #lang racket/base
(provide (all-defined-out)
quote cons
(for-space mk quasiquote))
(require "../../../main.rkt"
ee-lib/errors
(for-syntax
racket/base
racket/pretty
syntax/parse
syntax/id-table
syntax/transformer
(except-in... |
b90e86b2e78a8c6d078475840b9c9bddcad38e0dd377019eea4d5269bc3c20f3 | sulami/spielwiese | 042-coded-triangle-numbers.hs | -- Coded triangle numbers
Problem 42
--
-- The nth term of the sequence of triangle numbers is given by, tn = ½n(n+1);
so the first ten triangle numbers are :
--
1 , 3 , 6 , 10 , 15 , 21 , 28 , 36 , 45 , 55 , ...
--
-- By converting each letter in a word to a number corresponding to its
-- alphabetical position a... | null | https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/hEuler/042-coded-triangle-numbers.hs | haskell | Coded triangle numbers
The nth term of the sequence of triangle numbers is given by, tn = ½n(n+1);
By converting each letter in a word to a number corresponding to its
alphabetical position and adding these values we form a word value. For
value is a triangle number then we shall call the word a triangle word.
... | Problem 42
so the first ten triangle numbers are :
1 , 3 , 6 , 10 , 15 , 21 , 28 , 36 , 45 , 55 , ...
example , the word value for SKY is 19 + 11 + 25 = 55 = t10 . If the word
Using words.txt ( right click and ' Save Link / Target As ... ' ) , a 16 K text file
containing nearly two - thousand common English... |
978e539a1547abb80f75f6f2ee67937a09050789ac9f2b7f950f4f129092c885 | hercules-ci/hercules-ci-agent | State.hs | # LANGUAGE DataKinds #
module Hercules.API.Agent.State where
import Data.ByteString (ByteString)
import Hercules.API.Prelude
import Servant.API
type ContentLength = Header "Content-Length" Integer
data StateAPI auth f = StateAPI
{ getState ::
f
:- "current-task"
:> "state"
:> Cap... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/3aaa80c8fe8cd252b656d40eeec2428afe884c07/hercules-ci-api-agent/src/Hercules/API/Agent/State.hs | haskell | # LANGUAGE DataKinds #
module Hercules.API.Agent.State where
import Data.ByteString (ByteString)
import Hercules.API.Prelude
import Servant.API
type ContentLength = Header "Content-Length" Integer
data StateAPI auth f = StateAPI
{ getState ::
f
:- "current-task"
:> "state"
:> Cap... | |
5592df899ae92c73e14fbdb04393a1cab3386fefd2d17722663e7cf5261359ff | reasonml/reason | migrate_parsetree_406_405_migrate.ml | (**************************************************************************)
(* *)
(* OCaml Migrate Parsetree *)
(* *)
... | null | https://raw.githubusercontent.com/reasonml/reason/4f6ff7616bfa699059d642a3d16d8905d83555f6/src/vendored-omp/src/migrate_parsetree_406_405_migrate.ml | ocaml | ************************************************************************
OCaml Migrate Parsetree
... |
, LexiFi
Copyright 2017 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module Def = Migrate_parsetree_def
module Fr... |
ab06e3b0276baf457f8f09bb1df11bba291e9d4922dbbc59437ff35ca822df67 | bennn/iPoe | comment.rkt | #lang ipoe/free-verse
;; Does anyone
;; even read comments
;; anyway?
| null | https://raw.githubusercontent.com/bennn/iPoe/4a988f6537fb738b4fe842c404f9d78f658ab76f/examples/free-verse/comment.rkt | racket | Does anyone
even read comments
anyway? | #lang ipoe/free-verse
|
abc984ccab26250d1401b5fbbe9182e7b6d3ff72100d70fffc33b342baf3defd | ocaml/odoc | cmti.mli |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/ocaml/odoc/40aa7587a5140a88d77c2ce400f426acf5da79a8/src/loader/cmti.mli | ocaml | * Returns [id, sg, canonical_path]. [canonical_path] is the path set from the
[@canonical] tag. |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
b6db12444c74d33f626b4b32aed04bedbf44b48e26f3e38ab9ab06c239c4d45c | dbuenzli/uucp | gen_num.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 The uucp programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... | null | https://raw.githubusercontent.com/dbuenzli/uucp/09d2186c0828465dbe37ed976c8d8ab7a5e7eeed/support/gen_num.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2014 The uucp programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) ... | |
e3b64962bf99defa046cd20412d6af1e1d7beb8f472f5333bc472608a8260afe | hasura/graphql-data-specification | Definition.hs | module Schema.Model.Type.BooleanExpression.Definition
( definition,
)
where
import Control.Monad (forM)
import DDL qualified
import Data.Coerce (coerce)
import Data.Maybe (catMaybes, fromMaybe)
import Language.GraphQL.Draft.Syntax as GraphQL
import Schema.Context
import Schema.Model.Type.BooleanExpression.Name (na... | null | https://raw.githubusercontent.com/hasura/graphql-data-specification/b82b899a7d015c810a571d31322619aff2154b81/tooling/lib/Schema/Model/Type/BooleanExpression/Definition.hs | haskell | module Schema.Model.Type.BooleanExpression.Definition
( definition,
)
where
import Control.Monad (forM)
import DDL qualified
import Data.Coerce (coerce)
import Data.Maybe (catMaybes, fromMaybe)
import Language.GraphQL.Draft.Syntax as GraphQL
import Schema.Context
import Schema.Model.Type.BooleanExpression.Name (na... | |
3b6cb1146122cc898ad1c9f8bb6e00122683d4dc5306d1d3dc42006fc91c5247 | janestreet/learn-ocaml-workshop | apple.mli | open! Base
type t [@@deriving sexp_of]
(** [create] takes in the [height] and [width] of the area in which an apple can be
generated, as well as a list of [Position.t]s representing the locations on the board
that the apple cannot be placed, and creates an [Apple.t].
[create] returns [None] if there are ... | null | https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/03-snake/lib/apple.mli | ocaml | * [create] takes in the [height] and [width] of the area in which an apple can be
generated, as well as a list of [Position.t]s representing the locations on the board
that the apple cannot be placed, and creates an [Apple.t].
[create] returns [None] if there are no valid positions for the apple.
* [locat... | open! Base
type t [@@deriving sexp_of]
val create : height:int -> width:int -> invalid_locations:Position.t list -> t option
val location : t -> Position.t
|
8b377dfc2c7c1114395518dd5cb876a8a7d7069809854f8fefa65c2c1815420e | GaloisInc/tower | Common.hs | --
Pre - processing helpers for the AST to extract all of the channels associated
-- with a process.
--
( c ) 2014 Galois , Inc.
--
module Tower.AADL.AST.Common
( ThdIds
, getTxThds
, getRxThds
, filterEndpoints
, threadsChannels
, extractTypes
, allConnections
, connectedThreadsSize
, emptyConne... | null | https://raw.githubusercontent.com/GaloisInc/tower/a43f5e36c6443472ea2dc15bbd49faf8643a6f87/tower-aadl/src/Tower/AADL/AST/Common.hs | haskell |
with a process.
------------------------------------------------------------------------------
Used in system composition. All the threads that are connected.
A mapping from channels to the sending and receiving threads on the channel.
Interface below hides the data structure.
| Remove connections that don't ha... | Pre - processing helpers for the AST to extract all of the channels associated
( c ) 2014 Galois , Inc.
module Tower.AADL.AST.Common
( ThdIds
, getTxThds
, getRxThds
, filterEndpoints
, threadsChannels
, extractTypes
, allConnections
, connectedThreadsSize
, emptyConnections
, towerTime
) whe... |
b222e882e79032055f9b343418e89a473a353a2cd81edd076e219717e8cdb643 | yogthos/markdown-clj | core.clj | (ns markdown.core
(:require [clojure.java.io :as io]
[markdown.common
:refer [*inhibit-separator*]]
[markdown.links
:refer [parse-reference-link parse-footnote-link]]
[markdown.transformers
:refer [transformer-vector footer parse-metadata-head... | null | https://raw.githubusercontent.com/yogthos/markdown-clj/f2bce229968efc7d4f8fee86189a9fc50280048d/src/clj/markdown/core.clj | clojure | (ns markdown.core
(:require [clojure.java.io :as io]
[markdown.common
:refer [*inhibit-separator*]]
[markdown.links
:refer [parse-reference-link parse-footnote-link]]
[markdown.transformers
:refer [transformer-vector footer parse-metadata-head... | |
60480b0965c9ec27ee5fa55658072006163000690fb449df5a7cd8e2dcd3fa1c | pcarbonn/H-Calc | TransfosSpec.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE RebindableSyntax #
module Interpreter.TransfosSpec (spec) where
import Interpreter.A_Nucleus
import Interpreter.Transfos
import Control.Exception (evaluate)
import Haskus.Utils.EADT
import Test.Hspec
import Relude hiding (fromInteger, fromRational)
spec :: Spec... | null | https://raw.githubusercontent.com/pcarbonn/H-Calc/00f6d8d4344f43a3356d29fd45c9ec3c23ccce65/test/Interpreter/TransfosSpec.hs | haskell | # LANGUAGE NoImplicitPrelude #
# LANGUAGE RebindableSyntax #
module Interpreter.TransfosSpec (spec) where
import Interpreter.A_Nucleus
import Interpreter.Transfos
import Control.Exception (evaluate)
import Haskus.Utils.EADT
import Test.Hspec
import Relude hiding (fromInteger, fromRational)
spec :: Spec... | |
037b6b36568ce9ea0e322e31ce17d47ecad453a0313eea78e96e7f9bf36092ca | lispbuilder/lispbuilder | keys.lisp |
(in-package #:sdl-examples)
(defun key-test ()
(sdl:with-init ()
(sdl:window 800 400
:title-caption "Key Test" :icon-caption "Key Test")
(sdl:initialise-default-font)
(let ((key-state nil) (key-scancode nil) (key-key nil) (key-mod nil) (key-unicode nil) (key-mod-key nil)
(key-p... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl/examples/keys.lisp | lisp |
(in-package #:sdl-examples)
(defun key-test ()
(sdl:with-init ()
(sdl:window 800 400
:title-caption "Key Test" :icon-caption "Key Test")
(sdl:initialise-default-font)
(let ((key-state nil) (key-scancode nil) (key-key nil) (key-mod nil) (key-unicode nil) (key-mod-key nil)
(key-p... | |
162ba380124d15838cab18ff1bef4b1d6754d2e7d81cf1501e6955872d175ff1 | froggey/Mezzano | bignum-x86-64.lisp | ;;;; x86-64 bignum functions
(in-package :mezzano.internals)
(define-lap-function %%bignum-< ()
(:gc :no-frame :layout #*0)
;; Read lengths.
(sys.lap-x86:mov64 :rax (:r8 #.(- +tag-object+)))
(sys.lap-x86:mov64 :rdx (:r9 #.(- +tag-object+)))
(sys.lap-x86:shr64 :rax #.+object-data-shift+)
(sys.lap-x86:shr64... | null | https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/system/numbers/bignum-x86-64.lisp | lisp | x86-64 bignum functions
Read lengths.
Pick the longest length.
offset
Avoid setting low bits in r10.
Restore saved carry.
Save carry.
Avoid setting low bits in r10.
Restore saved carry.
Sign extend the left argument.
Previous value is not in RSI. Pull from the last word in the bignum.
Sign extend the right ... |
(in-package :mezzano.internals)
(define-lap-function %%bignum-< ()
(:gc :no-frame :layout #*0)
(sys.lap-x86:mov64 :rax (:r8 #.(- +tag-object+)))
(sys.lap-x86:mov64 :rdx (:r9 #.(- +tag-object+)))
(sys.lap-x86:shr64 :rax #.+object-data-shift+)
(sys.lap-x86:shr64 :rdx #.+object-data-shift+)
(sys.lap-x86:mov6... |
f6794c7f23b8d58b11e1ff9c7781cfb2a6077f9be75d9185fe185df630436eca | LambdaHack/LambdaHack | FactionKind.hs | # LANGUAGE DeriveGeneric , GeneralizedNewtypeDeriving #
-- | The type of kinds of factions present in a game, both human
-- and computer-controlled.
module Game.LambdaHack.Content.FactionKind
( FactionKind(..), makeData
, HiCondPoly, HiSummand, HiPolynomial, HiIndeterminant(..)
, TeamContinuity(..), Outcome(..)
... | null | https://raw.githubusercontent.com/LambdaHack/LambdaHack/c6ea2347aac3fcc3b65a2277b04774ab14dda61f/definition-src/Game/LambdaHack/Content/FactionKind.hs | haskell | | The type of kinds of factions present in a game, both human
and computer-controlled.
* Internal operations
| Properties of a particular faction.
^ name of the faction
^ frequency within groups
^ the team the faction identifies with
across games and modes
^ names of actor groups that may naturally fall unde... | # LANGUAGE DeriveGeneric , GeneralizedNewtypeDeriving #
module Game.LambdaHack.Content.FactionKind
( FactionKind(..), makeData
, HiCondPoly, HiSummand, HiPolynomial, HiIndeterminant(..)
, TeamContinuity(..), Outcome(..)
, teamExplorer, hiHeroLong, hiHeroMedium, hiHeroShort, hiDweller
, victoryOutcomes, deafea... |
a6ec873a98dcb9917feb45fe428ddef546ccead8a4ae29cdf56b061491b8f8fa | noinia/hgeometry | Main.hs | module Main (main) where
import qualified Spec
import Test.Hspec.Runner
-- import Test.Hspec
main :: IO ()
main = hspecWith defaultConfig Spec.spec
| null | https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/test/src/Main.hs | haskell | import Test.Hspec | module Main (main) where
import qualified Spec
import Test.Hspec.Runner
main :: IO ()
main = hspecWith defaultConfig Spec.spec
|
4f4be6d8dbbfdcde2c72eee05b9590f89311f42ec049e6dc4833edcf561ccc7f | Opetushallitus/ataru | ssn.cljc | (ns ataru.fixtures.ssn)
(def ssn-list [{:start "010101" :end "0090"}
{:start "010101" :end "0101"}
{:start "010101" :end "0112"}
{:start "010101" :end "0123"}
{:start "010101" :end "0134"}
{:start "010101" :end "0145"}
{:start "0... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/test/cljc/unit/ataru/fixtures/ssn.cljc | clojure | (ns ataru.fixtures.ssn)
(def ssn-list [{:start "010101" :end "0090"}
{:start "010101" :end "0101"}
{:start "010101" :end "0112"}
{:start "010101" :end "0123"}
{:start "010101" :end "0134"}
{:start "010101" :end "0145"}
{:start "0... | |
ad21958b1a40e402677dfa96b8dbfb8b781ce9857e2ef9b0f5011203d4f6cd3f | MLstate/opalang | pass_Purge.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/qmlpasses/pass_Purge.mli | ocaml | *
Purging any type directives
|
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 , ... |
b33ee4c3e7a751c5858f083af6a22337652a24a4f65c7d97df7e34419f163ecf | deedy/Custom-Scheme-Interpreter | part1.ml | let rec fib (n : int) : int =
if n < 1 then 0 else if n = 1 then 1 else
fib (n-1) + fib (n-2)
let fib_refs n=
if (n=0) then 0 else
if (n=1) then 1 else
let s0=ref 0 in
let s1=ref 1 in
let i=ref 1 in
while ((!i)!=n) do (
let tmp=(!s0) in
s0:=(!s1);
s1:=(tmp+(!s1));
i:=(!i)+1;) don... | null | https://raw.githubusercontent.com/deedy/Custom-Scheme-Interpreter/ad49612f809e54eb48f5a3af3428022856574b77/part1.ml | ocaml | let rec fib (n : int) : int =
if n < 1 then 0 else if n = 1 then 1 else
fib (n-1) + fib (n-2)
let fib_refs n=
if (n=0) then 0 else
if (n=1) then 1 else
let s0=ref 0 in
let s1=ref 1 in
let i=ref 1 in
while ((!i)!=n) do (
let tmp=(!s0) in
s0:=(!s1);
s1:=(tmp+(!s1));
i:=(!i)+1;) don... | |
4a5aa0b0db00cb587c6c461f101d2c7142ec3620c21e5b9ecd9ca8ddca239998 | coq/coq | glob_ops.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/0acddf0c9f33751550f686e495ceacaa60e63c14/pretyping/glob_ops.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.