_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 |
|---|---|---|---|---|---|---|---|---|
00f3e553e58bc358a4e728414282b7044bac6317c98e097b343988288ed1e3b5 | arevkov/clojure-web-app | user_controller.cljs | (ns clojure-web-app.controllers.user-controller
(:require [clojure-web-app.controllers.common :refer [add-item del-item upd-item]]
[clojure-web-app.views.user-form :refer [show-form]]
[clojure-web-app.views.user-table :refer [show-panel]]))
(declare show-user-table)
(defonce api-prefix "/api... | null | https://raw.githubusercontent.com/arevkov/clojure-web-app/95eca4ee40c675c23d03c3137b8a360166eec96d/src/cljs/clojure_web_app/controllers/user_controller.cljs | clojure | Event | (ns clojure-web-app.controllers.user-controller
(:require [clojure-web-app.controllers.common :refer [add-item del-item upd-item]]
[clojure-web-app.views.user-form :refer [show-form]]
[clojure-web-app.views.user-table :refer [show-panel]]))
(declare show-user-table)
(defonce api-prefix "/api... |
30bbfe2291dbc2845ec686826134f27a6f46d221ef5fc11362619a27c31b992d | khibino/haskell-relational-record | ToSql.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeOperators #
# LANGUAGE DefaultSignatures #
-- |
-- Module : Database.Record.ToSql
Copyright : 2013 - 2017
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : ... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/persistable-record/src/Database/Record/ToSql.hs | haskell | |
Module : Database.Record.ToSql
License : BSD3
Maintainer :
Stability : experimental
Portability : unknown
This module defines interfaces
* Conversion from record type into list of database value type
* Derivation rules of 'RecordToSql' conversion
* Make parameter list for updating with key
|... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeOperators #
# LANGUAGE DefaultSignatures #
Copyright : 2013 - 2017
from Haskell type into list of database value type .
module Database.Record.ToSql (
ToSqlM, execToSqlM, RecordToSql, runFromRecord... |
f7114a362a5febf74d74d6c88eecbefd6cda583320754149895f878a27d8dcf2 | exercism/ocaml | example.ml | let hello = "Hello, World!"
| null | https://raw.githubusercontent.com/exercism/ocaml/914e58d48e58a96fe7635fe4b06cc103af4ed683/exercises/practice/hello-world/.meta/example.ml | ocaml | let hello = "Hello, World!"
| |
b616517b324d36043cac606fbc34ddc27d9d4c573cc033eda26de13eafdf6eb2 | algas/haskell-servant-cookbook | Main.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad.Trans.Except (ExceptT, runExceptT)
import Data.Proxy
import Data.Text (Text)
import qualified Data.Text as T
import HelloApi
import ... | null | https://raw.githubusercontent.com/algas/haskell-servant-cookbook/56a2b5dbc5702377a8e483c14769966799d7fb89/https-client/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
module Main where
import Control.Monad.Trans.Except (ExceptT, runExceptT)
import Data.Proxy
import Data.Text (Text)
import qualified Data.Text as T
import HelloApi
import Network.HTTP.Client (Mana... |
18dcb261784e5428969ed967c05969ab718400403d81ed071e160cda2de81a72 | astrada/ocaml-extjs | ext_chart_Highlight.mli | * A mixin providing highlight functionality for Ext . ...
{ % < p > A mixin providing highlight functionality for < a href="#!/api / Ext.chart.series . Series " rel="Ext.chart.series . Series " class="docClass">Ext.chart.series . Series</a>.</p > % }
{% <p>A mixin providing highlight functionality for <... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_chart_Highlight.mli | ocaml | * {% <p>Un-highlight any existing highlights</p> %}
* [of_configs c] casts a config object [c] to an instance of class [t]
* [to_configs o] casts instance [o] of class [t] to a config object | * A mixin providing highlight functionality for Ext . ...
{ % < p > A mixin providing highlight functionality for < a href="#!/api / Ext.chart.series . Series " rel="Ext.chart.series . Series " class="docClass">Ext.chart.series . Series</a>.</p > % }
{% <p>A mixin providing highlight functionality for <... |
56f90a4972d0a496af8149527241d01bf8204748cd034f5766bf2fff0c6bdae5 | PacktWorkshops/The-Clojure-Workshop | repl.clj | 2
(println "I am not afraid of parentheses")
3
(* (+ 1 2 3) (- 10 3))
4
(println "Well done!")
5
(System/exit 0)
| null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter01/Activity1.01/repl.clj | clojure | 2
(println "I am not afraid of parentheses")
3
(* (+ 1 2 3) (- 10 3))
4
(println "Well done!")
5
(System/exit 0)
| |
7904c903f5b9d4b3f9558f1b469a2cabbbe88c61c3d38be9e85b80344ca892a5 | Helium4Haskell/helium | ClassInstance13.hs | class X a where
f :: a -> Int
class X a => Y a where
g :: a -> (Int, Int)
instance X Int where
f = (+1)
instance Y Int where
g x = (f x, -f x)
instance X a => X [a] where
f [] = 0
f (x:xs) = f x + f xs
instance Y a => Y [a] where
g [] = (0, 0)
g (x:xs) = (f x, f xs)
a :: Y a => a -... | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeClasses/ClassInstance13.hs | haskell | class X a where
f :: a -> Int
class X a => Y a where
g :: a -> (Int, Int)
instance X Int where
f = (+1)
instance Y Int where
g x = (f x, -f x)
instance X a => X [a] where
f [] = 0
f (x:xs) = f x + f xs
instance Y a => Y [a] where
g [] = (0, 0)
g (x:xs) = (f x, f xs)
a :: Y a => a -... | |
b95c2aa111584236d7106f33a5d4a3785e2438c7772c76013bd88a59d1ab347b | HaskellZhangSong/Introduction_to_Haskell | LabelTree.hs | import Control.Monad.State
data Tree a = Leaf a | Node (Tree a) a (Tree a) deriving (Show,Eq)
increase :: State Int Int
increase = state $ \i -> (i,i+1)
ntAux :: Tree a -> State Int (Tree (a,Int))
ntAux (Leaf a) = do
nl <- increase
return (Leaf (a,nl))
ntAux (Node l n r) = do
... | null | https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell/0478693817f761c17624b1eebf20b0cad8810993/Chapter12/LabelTree.hs | haskell | import Control.Monad.State
data Tree a = Leaf a | Node (Tree a) a (Tree a) deriving (Show,Eq)
increase :: State Int Int
increase = state $ \i -> (i,i+1)
ntAux :: Tree a -> State Int (Tree (a,Int))
ntAux (Leaf a) = do
nl <- increase
return (Leaf (a,nl))
ntAux (Node l n r) = do
... | |
e47b33b546ed7459a677d4419a25509775bf97fa439e2452a439a75281750c23 | seek-oss/serverless-haskell | Main.hs | module Main where
import AWSLambda.Handler
import AWSLambda.Events.S3Event
import Data.Aeson.Alternative
main :: IO ()
main = lambdaMain $ handlerIntArray `alternative` handlerS3
handlerIntArray :: [Int] -> IO String
handlerIntArray values = do
putStrLn "This should go to logs"
pure $ "Highest value is " ++ sho... | null | https://raw.githubusercontent.com/seek-oss/serverless-haskell/dbea96e657e23fd4a3fef03bdf182f060dc2590d/example-project/app/Main.hs | haskell | module Main where
import AWSLambda.Handler
import AWSLambda.Events.S3Event
import Data.Aeson.Alternative
main :: IO ()
main = lambdaMain $ handlerIntArray `alternative` handlerS3
handlerIntArray :: [Int] -> IO String
handlerIntArray values = do
putStrLn "This should go to logs"
pure $ "Highest value is " ++ sho... | |
ef4a10fc63428e3a0a9e780294bc7439a043b7a03c235ccf314975f120d95f6e | mbj/stratosphere | DriftCheckBaselinesProperty.hs | module Stratosphere.SageMaker.ModelPackage.DriftCheckBaselinesProperty (
module Exports, DriftCheckBaselinesProperty(..),
mkDriftCheckBaselinesProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stra... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/ModelPackage/DriftCheckBaselinesProperty.hs | haskell | # SOURCE #
# SOURCE #
# SOURCE #
# SOURCE # | module Stratosphere.SageMaker.ModelPackage.DriftCheckBaselinesProperty (
module Exports, DriftCheckBaselinesProperty(..),
mkDriftCheckBaselinesProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.Resour... |
7a5935224b1106b85b580efced226282b4c85a2e7fc21cbd4c5a30cad1e0ea02 | prg-titech/baccaml | log.ml | type level =
[ `App
| `Warn
| `Info
| `Debug
| `Error
]
let log_level : level ref = ref `Error
let error s =
match !log_level with
| `Error -> Printf.fprintf stderr "[err] %s\n" s
| _ -> ()
;;
let debug s =
match !log_level with
| `Debug -> Printf.fprintf stderr "[debug] %s\n" s
| _ -> ()
;;
... | null | https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/log/log.ml | ocaml | type level =
[ `App
| `Warn
| `Info
| `Debug
| `Error
]
let log_level : level ref = ref `Error
let error s =
match !log_level with
| `Error -> Printf.fprintf stderr "[err] %s\n" s
| _ -> ()
;;
let debug s =
match !log_level with
| `Debug -> Printf.fprintf stderr "[debug] %s\n" s
| _ -> ()
;;
... | |
d88e2e03f9fb028cd02b29839e30cb833adf3ad6d9efbc5bdf1895b7161b0aad | kafka4beam/kflow | kflow_config.erl | -module(kflow_config).
-export([pipes/0]).
pipes() ->
[test_workflow()].
test_workflow() ->
#{ start => {kflow_dummy_source, start_link}
, args => #{id => foo}
}.
| null | https://raw.githubusercontent.com/kafka4beam/kflow/2c44379a2934385a17fb504e7a933c859da7ab06/test/pipe_config/kflow_config.erl | erlang | -module(kflow_config).
-export([pipes/0]).
pipes() ->
[test_workflow()].
test_workflow() ->
#{ start => {kflow_dummy_source, start_link}
, args => #{id => foo}
}.
| |
0b65b75238ac7a66abac04782007433f0e5661121df9649127e0fd572ed54aab | hanshuebner/vlm | sysdcl.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : SCT ; Base : 10 ; Lowercase : Yes -*-
(defsystem alpha-ivory-emulator
(:pretty-name "Alpha Ivory Emulator"
:default-pathname "VLM:EMULATOR;"
:default-destination-pathname "BETA:/home/beta/palter/VLM/emulator/"
:required-systems ("Alpha-Assembler... | null | https://raw.githubusercontent.com/hanshuebner/vlm/20510ddc98b52252a406012a50a4d3bbd1b75dd0/emulator/sysdcl.lisp | lisp | Syntax : Common - Lisp ; Package : SCT ; Base : 10 ; Lowercase : Yes -*- |
(defsystem alpha-ivory-emulator
(:pretty-name "Alpha Ivory Emulator"
:default-pathname "VLM:EMULATOR;"
:default-destination-pathname "BETA:/home/beta/palter/VLM/emulator/"
:required-systems ("Alpha-Assembler")
:maintain-journals nil
:patchable nil)
(:module includes (("aistat.sid" "vlm:e... |
9fbb7f10a06cb53f8a4bcc34c3ec41ad44db8c9cf8a5b8f292e5852849ab6f08 | OCamlPro/ocp-build | autoconfCommon.ml | (**************************************************************************)
(* *)
(* Typerex Tools *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-autoconf/autoconfCommon.ml | ocaml | ************************************************************************
Typerex Tools
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU General Public License version 3 described in the file
open OcpCompat
let homedir = try
Sys.getenv "HOME"
with Not_found -> "/"
let curdir = Sys.getcwd ()
let find_content filename =
try
List.assoc filename Au... |
73d6ed0f366bb35907a944402d5dedcecce64c4c884a8662d692cb8471506d04 | klutometis/clrs | 5-2.scm | (require-extension syntax-case check)
(load "../5/chapter.scm")
(import chapter-5)
(define excutienda '(5 1 3 4 2))
(check (random-search 6 excutienda) => #f)
(check (deterministic-search 6 excutienda) => #f)
(check (scramble-search 6 excutienda) => #f)
| null | https://raw.githubusercontent.com/klutometis/clrs/f85a8f0036f0946c9e64dde3259a19acc62b74a1/5/5-2.scm | scheme | (require-extension syntax-case check)
(load "../5/chapter.scm")
(import chapter-5)
(define excutienda '(5 1 3 4 2))
(check (random-search 6 excutienda) => #f)
(check (deterministic-search 6 excutienda) => #f)
(check (scramble-search 6 excutienda) => #f)
| |
ae9fada97bf42d42b18a41e50d58c7a015e4011d5b736391f4f64eb91a96b660 | rtoy/cmucl | alloc.lisp | ;;; -*- Package: SPARC -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/assembly/sparc/alloc.lisp $")
;;;
;;... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/assembly/sparc/alloc.lisp | lisp | -*- Package: SPARC -*-
**********************************************************************
**********************************************************************
Stuff to handle allocating simple objects.
But we do everything inline now that we have a better pseudo-atomic. | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/assembly/sparc/alloc.lisp $")
Written by .
(in-package "SPARC")
|
db897203f471dfd284330c897f4724269be65314b4b8528183534193a7966de7 | justinmeiners/exercises | 3_01.scm |
(define (make-accumulator partial-sum)
(lambda (term)
(begin (set! partial-sum (+ partial-sum term))
partial-sum)))
(define A (make-accumulator 5))
(display (A 10))
(newline)
(display (A 10))
| null | https://raw.githubusercontent.com/justinmeiners/exercises/9491bc16925eae12e048ccd3f424b870ebdc73aa/sicp/3/3_01.scm | scheme |
(define (make-accumulator partial-sum)
(lambda (term)
(begin (set! partial-sum (+ partial-sum term))
partial-sum)))
(define A (make-accumulator 5))
(display (A 10))
(newline)
(display (A 10))
| |
c749c172f5a315c258bed3f498e3328a17434b9ea30f5b9a9d19c48c62bebb8e | jafingerhut/thalia | clojure.java.data-0.1.1.clj | {"namespaces"
{"clojure.java.data"
[{"private" true,
"ns" "clojure.java.data",
"name" "when-available",
"macro" true,
"line" 105,
"column" 1,
"tag" nil,
"source"
"(defmacro ^{:private true} when-available\n [sym & body]\n (try\n (when (resolve sym)\n (list* 'do body))\n (... | null | https://raw.githubusercontent.com/jafingerhut/thalia/20c98eec8168ff72c5b3965cc048b817d34a4583/doc/clojuredocs/clojure.java.data-0.1.1.clj | clojure | {"namespaces"
{"clojure.java.data"
[{"private" true,
"ns" "clojure.java.data",
"name" "when-available",
"macro" true,
"line" 105,
"column" 1,
"tag" nil,
"source"
"(defmacro ^{:private true} when-available\n [sym & body]\n (try\n (when (resolve sym)\n (list* 'do body))\n (... | |
d05d35ea16a382adbb5810d2229f0cdeaa24d40714af1d3e15eb1cddf83f3fb7 | tomjridge/kv-hash | frontend_old.ml |
( * * The frontend : record updates in two logs ( rotating between them ) .
(** The frontend: record updates in two logs (rotating between them). *)
open Util
FIXME change when finished testing
type config = {
control_filename:string;
log0_filename:string;
log1_filename:string;
}
FIXME only for testing
... | null | https://raw.githubusercontent.com/tomjridge/kv-hash/c2c10fddb8fb1dab0cdde8aaf9a3e1be2c703255/src/_old/frontend_old.ml | ocaml | * The frontend: record updates in two logs (rotating between them).
increasing int
which log generation was last merged; 0
indicates "None"; usually we don't rotate
logs till previous log has merged
merge_enabled: int;
let write arr t =
arr.(active_log) <... |
( * * The frontend : record updates in two logs ( rotating between them ) .
open Util
FIXME change when finished testing
type config = {
control_filename:string;
log0_filename:string;
log1_filename:string;
}
FIXME only for testing
let const_max_log_len = 4_000_000
let const_1GiB = 1_073_741_824[@@warni... |
d26ed7bc1190d6286d91e6eb77ff64fc1b0bfcd3711a0b812219ab68ba3069c7 | camlp4/camlp4 | Camlp4FoldGenerator.ml | camlp4r
(****************************************************************************)
(* *)
(* OCaml *)
(* ... | null | https://raw.githubusercontent.com/camlp4/camlp4/9b3314ea63288decb857239bd94f0c3342136844/camlp4/Camlp4Filters/Camlp4FoldGenerator.ml | ocaml | **************************************************************************
OCaml
... | camlp4r
Copyright 2006 - 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 the special
Authors :
* - : initial version
* - Nicolas Pouillard: initial ... |
27a0e416b0cb1008b30cdfbf1a5b668eecd345bc6b532345b1d151b2354fb29f | JeffreyBenjaminBrown/hode | TIndex.hs | module Hode.Test.Rslt.TIndex where
import qualified Data.Map as M
import qualified Data.Set as S
import Test.HUnit
import Hode.Rslt.Types
import Hode.Rslt.Index
import Hode.Rslt.Valid
import qualified Hode.Test.Rslt.RData as D
test_module_rslt_index :: Test
test_m... | null | https://raw.githubusercontent.com/JeffreyBenjaminBrown/hode/79a54a6796fa01570cde6903b398675c42954e62/hode-test/Hode/Test/Rslt/TIndex.hs | haskell | module Hode.Test.Rslt.TIndex where
import qualified Data.Map as M
import qualified Data.Set as S
import Test.HUnit
import Hode.Rslt.Types
import Hode.Rslt.Index
import Hode.Rslt.Valid
import qualified Hode.Test.Rslt.RData as D
test_module_rslt_index :: Test
test_m... | |
df515867f0c242c40e22f10c838e589c356b9bed3260be1b7855462903c1d446 | haskell-tools/haskell-tools | LetBind_res.hs | module Refactor.InlineBinding.LetBind where
a = () | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/InlineBinding/LetBind_res.hs | haskell | module Refactor.InlineBinding.LetBind where
a = () | |
cb6b4f95b16657b918d4a1be7139f9c6c65d328ca023a595079ac81a142a577f | spell-music/amsterdam | Whiny.hs | | Three oscillators are connected in a manner such as to form
a basic instrument with LFO control of pitch .
The LFO function is variable and a few linear functions exemplify
how the pitch parameter can be managed in a continuous fashion .
The instrument gives one opportunities for any pitch envelopes that
... | null | https://raw.githubusercontent.com/spell-music/amsterdam/ab491022c7826c74eab557ecd11794268f5a5ae0/01-basic-instruments/Whiny.hs | haskell | sinus
sawtooth
more complex | | Three oscillators are connected in a manner such as to form
a basic instrument with LFO control of pitch .
The LFO function is variable and a few linear functions exemplify
how the pitch parameter can be managed in a continuous fashion .
The instrument gives one opportunities for any pitch envelopes that
... |
0f20dbff98ce3930f42ad39c8dbd732362645ceaef77f8013662a299069b248c | ocaml-ppx/ppx_import | ppx_types_migrate.ml | module At = Asttypes
(* copy_mutable_flag / private_flag / arg_label are not exported by
Ppxlib so not worth the pain of the hack *)
let copy_mutable_flag (l : At.mutable_flag) : Ppxlib.mutable_flag =
match l with At.Immutable -> Ppxlib.Immutable | At.Mutable -> Ppxlib.Mutable
let copy_private_flag (l : At.priva... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx_import/8f1892be0dd25f9cbecb85d8eeb5bd01881deed7/src/ppx_types_migrate.ml | ocaml | copy_mutable_flag / private_flag / arg_label are not exported by
Ppxlib so not worth the pain of the hack
Here we want to do a hack due to the large type | module At = Asttypes
let copy_mutable_flag (l : At.mutable_flag) : Ppxlib.mutable_flag =
match l with At.Immutable -> Ppxlib.Immutable | At.Mutable -> Ppxlib.Mutable
let copy_private_flag (l : At.private_flag) : Ppxlib.private_flag =
match l with At.Private -> Ppxlib.Private | At.Public -> Ppxlib.Public
let copy... |
b743d96ecd7e6ea0f27c0d0add59b73608442cc0a9e9bc7ea0909183b1671918 | mauricioszabo/repl-tooling | interpreter.cljs | (ns repl-tooling.editor-integration.interpreter
(:require [sci.core :as sci]
[clojure.set :as set]
[promesa.core :as p]
[paprika.collection :as coll]
[clojure.string :as str]
[repl-tooling.editor-integration.commands :as cmds]
[repl-tooling.edito... | null | https://raw.githubusercontent.com/mauricioszabo/repl-tooling/1cea9b411cc118d71266cb8e035e146325baf410/src/repl_tooling/editor_integration/interpreter.cljs | clojure | (ns repl-tooling.editor-integration.interpreter
(:require [sci.core :as sci]
[clojure.set :as set]
[promesa.core :as p]
[paprika.collection :as coll]
[clojure.string :as str]
[repl-tooling.editor-integration.commands :as cmds]
[repl-tooling.edito... | |
c684e519c906d8b2a7ea5e69c9cff744ecb27fe582d3f952772bb5e78933f92b | agda/agda | Common.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE UndecidableInstances #
module Agda.TypeChecking.Serialise.Instances.Common (SerialisedRange(..)) where
import Control.Monad ( (<=<) )
import Control.Monad.IO.Class ( MonadIO(..) )
import Control.Monad.Except ( MonadError(..) )
import Control.Mona... | null | https://raw.githubusercontent.com/agda/agda/6c7d9d08417d74b99a29af24ac787f979bae4f16/src/full/Agda/TypeChecking/Serialise/Instances/Common.hs | haskell | # OVERLAPPING #
# OVERLAPPABLE #
icode [] = icode0'
icode (x : xs) = icode2' x xs
value = vcase valu where valu [] = valu0 []
valu _ = malformed
| Encode a list of key-value pairs as a flat list.
As we need to call `convert' in the tail position, the resulting lis... | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE UndecidableInstances #
module Agda.TypeChecking.Serialise.Instances.Common (SerialisedRange(..)) where
import Control.Monad ( (<=<) )
import Control.Monad.IO.Class ( MonadIO(..) )
import Control.Monad.Except ( MonadError(..) )
import Control.Mona... |
8ef9a3a892886e45c6777b84c2b3e82708bbe7ee3933e0dd90e8013d12292966 | spechub/Hets | Morphism.hs | {-# LANGUAGE DeriveDataTypeable #-}
|
Module : ./Maude / Morphism.hs
Description :
Copyright : ( c ) , Uni Bremen 2008 - 2009
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
Definition of morphisms for . ... | null | https://raw.githubusercontent.com/spechub/Hets/f582640a174df08d4c965d7c0a1ab24d1a31000d/Maude/Morphism.hs | haskell | # LANGUAGE DeriveDataTypeable #
* Types
** Auxiliary type
* Construction
* Combination
* Testing
* Conversion
* Modification
* Application
* Types
** Auxiliary types
* Helper functions
TODO: Handle Attrs in Op Renamings.
| Extract the 'Symbol's from a 'Renaming', if possible.
| Rename sorts in the profile... | |
Module : ./Maude / Morphism.hs
Description :
Copyright : ( c ) , Uni Bremen 2008 - 2009
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : portable
Definition of morphisms for .
Module : ./Maude/Morphism.hs... |
813c1ff4542ea9dbbe197df74704fcddeb28a5930a34989f6467fca24778d310 | rsharifnasab/my-learning | Print1.hs | module Print1 where
main :: IO ()
main = putStrLn "hello world!"
| null | https://raw.githubusercontent.com/rsharifnasab/my-learning/8555583a772c96e334e3fdace5a295a21c31ea8b/haskell/3-string/Print1.hs | haskell | module Print1 where
main :: IO ()
main = putStrLn "hello world!"
| |
69e0f0ad65f6b0bb41c23fbe34c69c80c1e317db57af65afbf655d1083cf80d3 | sifive/RiscvSpecFormal | TestMain.hs | import qualified HaskellTarget as T
import Simulator.All
import Data.IORef
import System.Environment
instance AbstractEnvironment () where
envPre _ _ _ _ = return ()
envPost _ _ _ _ = return ()
getMod :: IO (Bool,T.Mod)
getMod = do
args <- getArgs
if "Reg" `elem` args then return (False,T.testReg)
... | null | https://raw.githubusercontent.com/sifive/RiscvSpecFormal/a57c67fe2640641c379720678f4d1d445edd1ae3/Haskell/TestMain.hs | haskell | import qualified HaskellTarget as T
import Simulator.All
import Data.IORef
import System.Environment
instance AbstractEnvironment () where
envPre _ _ _ _ = return ()
envPost _ _ _ _ = return ()
getMod :: IO (Bool,T.Mod)
getMod = do
args <- getArgs
if "Reg" `elem` args then return (False,T.testReg)
... | |
82bdf8281cbfc8fadaf1df1e27284801da815a458e40b598f92f02368fbadbf1 | aryx/fork-efuns | server.ml | s : / server.ml
(*s: copyright header *)
(***********************************************************************)
(* *)
(* ____________ *)
(* ... | null | https://raw.githubusercontent.com/aryx/fork-efuns/8f2f8f66879d45e26ecdca0033f9c92aec2b783d/ipc/server.ml | ocaml | s: copyright header
*********************************************************************
____________
... | s : / server.ml
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Common
open Unix
open Efuns
let efuns_property = " _ EFUNS_SERVER "
let u... |
7df337d5694e0c26b522acbed1d5d3c2bc42b2e345b97be8c77de9f6c92690f3 | Beluga-lang/Beluga | list.mli | include module type of Stdlib.List
* [ take_circularly k \[x1 ; x2 ; ... ; xn\ ] ] is the list of the first [ k ]
elements taken fron the sequence
[ \[x1 ; x2 ; ... ; xn ; x1 ; x2 ; ... ; xn ; x1 ; ... \ ] ] . If [ k < 0 ] , then [ \[\ ] ]
is returned .
@raise Invalid_argument if the input lis... | null | https://raw.githubusercontent.com/Beluga-lang/Beluga/e51fc3026b0250fed3d0d95196512f65484ccf22/src/optparser/list.mli | ocaml | * [maximum_element max default xs] is the maximum element in [xs] by
comparison using [maximum], or [default] if [xs] is empty. | include module type of Stdlib.List
* [ take_circularly k \[x1 ; x2 ; ... ; xn\ ] ] is the list of the first [ k ]
elements taken fron the sequence
[ \[x1 ; x2 ; ... ; xn ; x1 ; x2 ; ... ; xn ; x1 ; ... \ ] ] . If [ k < 0 ] , then [ \[\ ] ]
is returned .
@raise Invalid_argument if the input lis... |
1eae798b6ea2f7a03271a3d695111963db7024469235dbb77f2963faaa5a73cf | xray-tech/xorc-xray | http.clj | (ns re.service.http
(:require [clj-http.client :as http]
[clojure.string :as str]
[integrant.core :as ig]
[re.effects :as effects]
[re.rpc :as rpc]
[re.tracing :as tracing]))
(defmethod ig/init-key :re.service/http [_ {:keys [rpc]}]
(fn [{:keys [:core/mes... | null | https://raw.githubusercontent.com/xray-tech/xorc-xray/ee1c841067207c5952473dc8fb1f0b7d237976cb/src/re/service/http.clj | clojure | ; FIXME handle connection errors | (ns re.service.http
(:require [clj-http.client :as http]
[clojure.string :as str]
[integrant.core :as ig]
[re.effects :as effects]
[re.rpc :as rpc]
[re.tracing :as tracing]))
(defmethod ig/init-key :re.service/http [_ {:keys [rpc]}]
(fn [{:keys [:core/mes... |
bd4ef0ca38ac81124531a94df04a013e58720a0a88f5961ce4308bf0cca8f2b4 | blmstrm/clj-spotify | util_test.clj | (ns clj-spotify.util-test
(:require [clojure.test :refer :all]
[clj-spotify.util :as util]
[clj-spotify.test-fixtures :as tfixt])
(:import [org.apache.commons.codec.binary Hex]))
(deftest test-base64-encode-image
(testing "Testing encoding of image to base65."
(let [base64-image (util/... | null | https://raw.githubusercontent.com/blmstrm/clj-spotify/6d5bc596202e1ba42b3c78ae6551b9ea155aad73/test/clj_spotify/util_test.clj | clojure | (ns clj-spotify.util-test
(:require [clojure.test :refer :all]
[clj-spotify.util :as util]
[clj-spotify.test-fixtures :as tfixt])
(:import [org.apache.commons.codec.binary Hex]))
(deftest test-base64-encode-image
(testing "Testing encoding of image to base65."
(let [base64-image (util/... | |
83b8a5c3004cbf9ac6ab801252b241f44bad78a1bde64500dac3537db1cc1c5a | samcoy3/advent-of-code-template | Day15.hs | module Days.Day15 (runDay) where
{- ORMOLU_DISABLE -}
import Data.List
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Maybe
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Vector (Vector)
import qualified Data.Vector as Vec
import qualified Util.Util as U
import qu... | null | https://raw.githubusercontent.com/samcoy3/advent-of-code-template/ddc27cfd7ca36d6ebf0df2a2297347d02ee0f1a6/src/Days/Day15.hs | haskell | ORMOLU_DISABLE
---------- PARSER ------------
-------- TYPES ------------
---------- PART A ------------
---------- PART B ------------ | module Days.Day15 (runDay) where
import Data.List
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Maybe
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Vector (Vector)
import qualified Data.Vector as Vec
import qualified Util.Util as U
import qualified Program.RunDa... |
f768e7e9b2eaa6ff0dfc8cac4c5dc781888545e9efa27d881290e292574da63f | GeorgeJahad/cdt | utils.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file COPYING at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms ... | null | https://raw.githubusercontent.com/GeorgeJahad/cdt/75bbdb76a93a996424e71dff202e7b0c1a742e44/src/cdt/utils.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file COPYING at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
Contribu... | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns cdt.utils
(:require [clojure.string :as str])
(:import java.io.File
clojure.lang.Compiler))
(import com.sun.jdi.Bootstrap)
(defn regex-filter [regex seq]
(filter #(re-find regex (.name %)) seq))
(defn get... |
c6e2069a55109757802711eba2f79a09b16c9b443fb2fe3020deab2c0a0fe5ba | yurug/ocaml4.04.0-copatterns | types.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/yurug/ocaml4.04.0-copatterns/b3ec6a3cc203bd2cde3b618546d29e10f1102323/typing/types.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 Asttypes
type type_expr =
{ mutable desc: type_desc;
mutable level: int;
id: int }
and... |
0452e1e40c7565dd3ed8379c1a319179894ce0bb7e5bd667a2b58d06ef108158 | henrikurms/tail2futhark | AST.hs | | Originally from APLAcc by
module Tail2Futhark.TAIL.AST where
type Ident = String
data Rank
= R Integer
| Unsupported
-- | Radd Rank Rank Unsupported
deriving (Show)
data BType = IntT
| DoubleT
| BoolT
| CharT
| ComplexT
| Btyv Iden... | null | https://raw.githubusercontent.com/henrikurms/tail2futhark/505c0c98eec1d93834671b12c041cb873133aff1/src/Tail2Futhark/TAIL/AST.hs | haskell | | Radd Rank Rank Unsupported
| FunT Type Type
| ShT Rank
| SiT Rank
| ViT Rank | | Originally from APLAcc by
module Tail2Futhark.TAIL.AST where
type Ident = String
data Rank
= R Integer
| Unsupported
deriving (Show)
data BType = IntT
| DoubleT
| BoolT
| CharT
| ComplexT
| Btyv Ident
deriving (Show, Eq)
data Type
=... |
760a9dfc58ec54819ad7742a6d10ff9d7a159cc61bb7cb6702f16e7a513df6b9 | sjl/caves | coords.clj | (ns caves.coords
(:use [caves.utils :only [abs]]))
(defn radial-distance
"Return the radial distance between two points.
There might be a better name for this, but in a nutshell:
3333333
3222223
3211123
321.123
3211123
3222223
3333333
"
[[x1 y1] [x2 y2]]
(m... | null | https://raw.githubusercontent.com/sjl/caves/d39ee73eb5c54877d9706b16193b6cb044b2aaf6/src/caves/coords.clj | clojure | (ns caves.coords
(:use [caves.utils :only [abs]]))
(defn radial-distance
"Return the radial distance between two points.
There might be a better name for this, but in a nutshell:
3333333
3222223
3211123
321.123
3211123
3222223
3333333
"
[[x1 y1] [x2 y2]]
(m... | |
12989998624fb5d83225112615c2fc79708a2f6d602f4df64e5e059146b0c7de | inhabitedtype/ocaml-aws | modifyGlobalReplicationGroup.mli | open Types
type input = ModifyGlobalReplicationGroupMessage.t
type output = ModifyGlobalReplicationGroupResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/elasticache/lib/modifyGlobalReplicationGroup.mli | ocaml | open Types
type input = ModifyGlobalReplicationGroupMessage.t
type output = ModifyGlobalReplicationGroupResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
9f45f77fb0cf7e72a74d6425e3d88c170b7b8262e37775ac4a176d3f23d6d3ec | ghc/ghc | T14339.hs | # LANGUAGE DataKinds #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE UndecidableInstances #
module Bug where
import GHC.TypeLits
newtype Foo = Foo Int
class Bar a where
bar :: a
instance (TypeError (Text "Boo")) => Bar Foo where
bar = undefined
newtype Baz = Baz Foo
deriving Bar
-- Apparently we derive... | null | https://raw.githubusercontent.com/ghc/ghc/aed1974e92366ab8e117734f308505684f70cddf/testsuite/tests/deriving/should_compile/T14339.hs | haskell | Apparently we derive
Is that really what we want? It defers the type
error... surely we should use standalone deriving
if that is what we want? | # LANGUAGE DataKinds #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE UndecidableInstances #
module Bug where
import GHC.TypeLits
newtype Foo = Foo Int
class Bar a where
bar :: a
instance (TypeError (Text "Boo")) => Bar Foo where
bar = undefined
newtype Baz = Baz Foo
deriving Bar
instance TypeError (... |
785974f5989abcc0057b5bfe9b75a816ec321d969d82697348830b59460f221d | f-me/carma-public | Hotel.hs | module Carma.Model.Service.Hotel where
import Data.Text
import Data.Typeable
import Data.Model
import Data.Model.View
import Carma.Model.LegacyTypes
import Carma.Model.Service (Service)
data Hotel = Hotel
{ ident :: PK Int Hotel ""
, caseAddress_address :: F PickerField "caseAddress_address" "Адрес кейса"
, c... | null | https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/carma-models/src/Carma/Model/Service/Hotel.hs | haskell | module Carma.Model.Service.Hotel where
import Data.Text
import Data.Typeable
import Data.Model
import Data.Model.View
import Carma.Model.LegacyTypes
import Carma.Model.Service (Service)
data Hotel = Hotel
{ ident :: PK Int Hotel ""
, caseAddress_address :: F PickerField "caseAddress_address" "Адрес кейса"
, c... | |
61d97525d20c1127cac78aa53e6e448f397ba2d6a5870a97231fbf221168be1a | zenspider/schemers | exercise.5.24.scm | #!/usr/bin/env csi -s
(require rackunit)
(require-library machine)
(import machine)
(require-library ec-eval)
(import ec-eval)
Exercise 5.24
;; Implement `cond' as a new basic special form without reducing it to
;; `if'. You will have to construct a loop that tests the predicates
;; of successive `cond' clauses un... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_5/exercise.5.24.scm | scheme | Implement `cond' as a new basic special form without reducing it to
`if'. You will have to construct a loop that tests the predicates
of successive `cond' clauses until you find one that is true, and
then use `ev-sequence' to evaluate the actions of the clause. | #!/usr/bin/env csi -s
(require rackunit)
(require-library machine)
(import machine)
(require-library ec-eval)
(import ec-eval)
Exercise 5.24
(define input-src-good
'((exp (begin
(define (append x y)
(if (null? x)
y
(cons (car x) (append (cdr x) y))))
... |
c3d5bd02f2e47e58ad4e44ecbb78a7cf890bb71df78e28abf3f33cb594101060 | tezos/tezos-mirror | store.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2023 < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/bbca5502eb430d3915ad697259d3bffc62c2d01d/src/lib_dac_node/store.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2023 < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN A... |
e20c4c5d58675597ed79490a95c023fa87d8e2d3e7096952c4feb14886f421d6 | rtoy/ansi-cl-tests | case.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Fri Oct 18 19:56:44 2002
;;;; Contains: Tests of CASE
(in-package :cl-test)
(deftest case.1
(case 'a)
nil)
(deftest case.2
(case 10 (10 'a))
a)
(deftest case.3
(case (copy-seq "abc") ("abc" 'a))
nil)
(deftest case.4
(case 'z ((a b c) 1)
... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/case.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of CASE
Show that the key expression is evaluated only once.
No implicit tagbody
Test that explicit calls to macroexpand in subforms
are done in the correct environment
(deftest case.error.1
(signals-error (case) program-error)
t) | Author :
Created : Fri Oct 18 19:56:44 2002
(in-package :cl-test)
(deftest case.1
(case 'a)
nil)
(deftest case.2
(case 10 (10 'a))
a)
(deftest case.3
(case (copy-seq "abc") ("abc" 'a))
nil)
(deftest case.4
(case 'z ((a b c) 1)
((d e) 2)
((f z g) 3)
(t 4))
... |
7376f72211cf11c169c3b226b2fae0ce4ee766a78e4bf426960d8342b38f4d5d | froydnj/binascii | octets.lisp | ;;;; octets.lisp -- substrate for encoding functionality
(cl:in-package :binascii)
(defun case-fold-decode-table (decode-table encode-table)
(loop with table = (copy-seq decode-table)
for c across encode-table
do (setf (aref table (char-code (char-downcase c)))
(aref table (char-code c)))
... | null | https://raw.githubusercontent.com/froydnj/binascii/0fb0a9e5773148fd04d50efef08c1cc10f6fc487/octets.lisp | lisp | octets.lisp -- substrate for encoding functionality
ways to express that and we don't want to go through
weirdly.
if ELEMENT-TYPE is a subtype of
FIXME: we should check to see if we actually
consumed all the input. If we didn't, then we need
to reallocate V and continue decoding. Even though
it is only consid... |
(cl:in-package :binascii)
(defun case-fold-decode-table (decode-table encode-table)
(loop with table = (copy-seq decode-table)
for c across encode-table
do (setf (aref table (char-code (char-downcase c)))
(aref table (char-code c)))
finally (return table)))
(defun canonicalize-element-... |
1dabfc156d55ac8932676260b4c5b3e6cde3b4d09db3679cc5878754d8f4127e | tommaisey/aeon | ring1.help.scm | ;; (ring1 a b)
Ring modulation plus first source . Return the value of ( ( a*b ) +
;; a). This is more efficient than using separate unit generators for
;; the multiply and add.
See also , Ring1 , Ring2 , Ring3 , Ring4 .
(audition
(out 0 (mul (ring1 (f-sin-osc ar 800 0)
(f-sin-osc ar (x-line kr 200 500... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/binary-ops/ring1.help.scm | scheme | (ring1 a b)
a). This is more efficient than using separate unit generators for
the multiply and add. |
Ring modulation plus first source . Return the value of ( ( a*b ) +
See also , Ring1 , Ring2 , Ring3 , Ring4 .
(audition
(out 0 (mul (ring1 (f-sin-osc ar 800 0)
(f-sin-osc ar (x-line kr 200 500 5 do-nothing) 0))
0.125)))
(let ((a (f-sin-osc ar 800 0))
(b (f-sin-osc ar (x-line kr 200 500 5 ... |
60175b1f5eee55d0f39df680dca5185ff823468fd283fddebe26aab3747ebc41 | tomahawkins/atom | Scheduling.hs | -- |
-- Module: Scheduling
-- Description: Rule scheduling
Copyright : ( c ) 2013 Lee Pike
--
Algorithms for scheduling rules in Atom
module Language.Atom.Scheduling
( schedule
, Schedule
, reportSchedule
) where
import Text.Printf
import Data.List
import Language.Atom.Analysis
import Language.Atom.E... | null | https://raw.githubusercontent.com/tomahawkins/atom/e552e18859c6d249af4b293e9d2197878c0fd4fd/Language/Atom/Scheduling.hs | haskell | |
Module: Scheduling
Description: Rule scheduling
Algorithm for assigning rules to phases for a given period
(assuming they aren't given an exact phase):
find the set of phases containing the minimum number of rules such that
they are at least as large as the rule's offset. Then take the smallest
of those p... | Copyright : ( c ) 2013 Lee Pike
Algorithms for scheduling rules in Atom
module Language.Atom.Scheduling
( schedule
, Schedule
, reportSchedule
) where
import Text.Printf
import Data.List
import Language.Atom.Analysis
import Language.Atom.Elaboration
import Language.Atom.UeMap
| Schedule expressed a... |
d2ad614cf9f97ff807ea9713fe8320ab363e64e1b1049a6f1a4f59d121155cf2 | exoscale/ablauf | ast.clj | (ns ablauf.job.ast
"Specifies an AST and provides helper functions
to build it"
(:require [clojure.spec.alpha :as s]))
(def hierarchy
"AST node types hierarchy"
(-> (make-hierarchy)
(derive :ast/seq :ast/branch)
(derive :ast/par :ast/branch)
(derive :ast/try :ast/branch)))
(s/def :ast/nod... | null | https://raw.githubusercontent.com/exoscale/ablauf/c7496a46b364c4d311c785eb5dfba12b844958ca/src/ablauf/job/ast.clj | clojure | (ns ablauf.job.ast
"Specifies an AST and provides helper functions
to build it"
(:require [clojure.spec.alpha :as s]))
(def hierarchy
"AST node types hierarchy"
(-> (make-hierarchy)
(derive :ast/seq :ast/branch)
(derive :ast/par :ast/branch)
(derive :ast/try :ast/branch)))
(s/def :ast/nod... | |
1794a0f7b9bdb6ec363a400c31fc3ac875a9487d90fa4917b192e94d01fb96d2 | 2600hz/kazoo | kzd_temporal_rules_sets.erl | %%%-----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz
%%% @doc
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% @end
%%%--------... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_documents/src/kzd_temporal_rules_sets.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
----------------------------------------------------------------------------- | ( C ) 2010 - 2020 , 2600Hz
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kzd_temporal_rules_sets).
-export([new/0]).
-export([flags/1, flags/2, set_flags/2]).
-export([name/1, na... |
507373b21bad72e8c187587538aa47a972186f8fe6e0abf2c5393e000dbd4481 | padsproj/opads | ppx_pads.ml | open Ast_mapper
open Ast_helper
open Asttypes
open Parsetree
open Longident
open Location
open Utility
let pads_mapper argv =
{ default_mapper with
structure = fun mapper strl ->
let rec pads_replace acc str =
(* Processes PADS descriptions *)
match str with
| { pstr_desc = Pstr_... | null | https://raw.githubusercontent.com/padsproj/opads/bb9a380e73ea68954b30acf785294f95004ffcfb/ppx/ppx_pads.ml | ocaml | Processes PADS descriptions
Rest is unchanged | open Ast_mapper
open Ast_helper
open Asttypes
open Parsetree
open Longident
open Location
open Utility
let pads_mapper argv =
{ default_mapper with
structure = fun mapper strl ->
let rec pads_replace acc str =
match str with
| { pstr_desc = Pstr_extension
(({txt = "pads"}, PS... |
ca76f7819cf6f6f0ab8f3c762170bc7c6444200c772c92a9ac1ac8a98a9f3310 | agrafix/Spock | Router.hs | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeFamilies #
module Web.Routing.Router where
#if MIN_VERSION_base(4,8,0)
#else
import Control.Applicative
#endif
import Control.Monad.RWS.Strict
import qualified Data.Ha... | null | https://raw.githubusercontent.com/agrafix/Spock/6055362b54f2fae5418188c3fc2fc1659ca43e79/reroute/src/Web/Routing/Router.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE TypeFamilies #
module Web.Routing.Router where
#if MIN_VERSION_base(4,8,0)
#else
import Control.Applicative
#endif
import Control.Monad.RWS.Strict
import qualified Data.HashMap.Strict as HM
import Da... |
3cba41c9ea186eb21b7fb8092f3bdc81d480b412695a87257e641ab63d071b8b | gergoerdi/clashilator | main.hs | {-# LANGUAGE RecordWildCards, ApplicativeDo #-}
import Clash.Driver.Manifest
import Clash.Clashilator
import System.FilePath
import Options.Applicative
import Data.String (fromString)
data Options = Options
{ manifestPath :: FilePath
, outputDir :: FilePath
, clkName :: Maybe String
}
options :: Pars... | null | https://raw.githubusercontent.com/gergoerdi/clashilator/c1125a706fe378c1cd877a937fc9c317aaef49ed/src/main.hs | haskell | # LANGUAGE RecordWildCards, ApplicativeDo # |
import Clash.Driver.Manifest
import Clash.Clashilator
import System.FilePath
import Options.Applicative
import Data.String (fromString)
data Options = Options
{ manifestPath :: FilePath
, outputDir :: FilePath
, clkName :: Maybe String
}
options :: Parser Options
options = do
manifestPath <- strO... |
44765f9c5734101b039bd8f22b2d6bd7279e7f67004d01eb8591c8843fa42bfd | LightTable/fetch | lazy_store.cljs | (ns fetch.lazy-store
(:refer-clojure :exclude [get set])
(:require [fetch.core :as core])
(:use [cljs.reader :only [read-string]]))
(def cache (atom {}))
(defn ->vector [ks]
(if-not (vector? ks)
[ks]
ks))
(defn set [ks v]
(let [ks (->vector ks)]
(swap! cache assoc-in ks v)))
(defn latest [ks c... | null | https://raw.githubusercontent.com/LightTable/fetch/ec9ccb95665c6f267fc13af2f3083c5d452a8ce3/src/fetch/lazy_store.cljs | clojure | (ns fetch.lazy-store
(:refer-clojure :exclude [get set])
(:require [fetch.core :as core])
(:use [cljs.reader :only [read-string]]))
(def cache (atom {}))
(defn ->vector [ks]
(if-not (vector? ks)
[ks]
ks))
(defn set [ks v]
(let [ks (->vector ks)]
(swap! cache assoc-in ks v)))
(defn latest [ks c... | |
5a533cc2b16526acd7600264aa2a9810387ec489a31c1615d3bae74a18912ea4 | CodeforSouth/fbi-api | businesses.clj | (ns fbi-api.handlers.businesses
(:require [fbi-api.validations :as validate]
[fbi-api.util :as util]
[fbi-api.db :as db]))
(defn validate-businesses-params
"Recieves all businesses query parameters (nil when not specified) and
returns a map of valid and invalid params"
[{:keys [zipCodes... | null | https://raw.githubusercontent.com/CodeforSouth/fbi-api/ddc1f1c45269bd9a0401c5047d0c5ab1dbe299ba/src/fbi_api/handlers/businesses.clj | clojure | (ns fbi-api.handlers.businesses
(:require [fbi-api.validations :as validate]
[fbi-api.util :as util]
[fbi-api.db :as db]))
(defn validate-businesses-params
"Recieves all businesses query parameters (nil when not specified) and
returns a map of valid and invalid params"
[{:keys [zipCodes... | |
cbfa9b4c2c80d01dfdad1a0616ab3b6ad3f627d64339b9e733c0b28fa45f712b | EveryTian/Haskell-Codewars | folding-your-way-to-the-moon.hs | -your-way-to-the-moon
module Codewars.Kata.Fold where
foldTo :: Double -> Maybe Int
foldTo distance
| distance <= 0 = Nothing
| distance <= 0.0001 = Just 0
| otherwise = 1 +++ foldTo (distance / 2)
where x +++ Just y = Just (x + y)
| null | https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/7kyu/folding-your-way-to-the-moon.hs | haskell | -your-way-to-the-moon
module Codewars.Kata.Fold where
foldTo :: Double -> Maybe Int
foldTo distance
| distance <= 0 = Nothing
| distance <= 0.0001 = Just 0
| otherwise = 1 +++ foldTo (distance / 2)
where x +++ Just y = Just (x + y)
| |
3c4eddd66046cb7643313a2394cdda1842967b391e11246d864210f69c871cc4 | haskell/hackage-security | TypedEmbedded.hs | -- | Embedded languages with meta level types
module Hackage.Security.Util.TypedEmbedded (
(:=:)(Refl)
, TypeOf
, Unify(..)
, Typed(..)
, AsType(..)
) where
import MyPrelude
-- | Type equality proofs
--
-- This is a direct copy of "type-equality:Data.Type.Equality"; if we don't
-- mind the dependency we... | null | https://raw.githubusercontent.com/haskell/hackage-security/745b294e8cda2b46a21a6d1766a87f699a0277a8/hackage-security/src/Hackage/Security/Util/TypedEmbedded.hs | haskell | | Embedded languages with meta level types
| Type equality proofs
This is a direct copy of "type-equality:Data.Type.Equality"; if we don't
mind the dependency we can use that package directly.
| Equality check that gives us a type-level equality proof.
| Embedded languages with type inference
By default (for l... | module Hackage.Security.Util.TypedEmbedded (
(:=:)(Refl)
, TypeOf
, Unify(..)
, Typed(..)
, AsType(..)
) where
import MyPrelude
data a :=: b where
Refl :: a :=: a
type family TypeOf (f :: * -> *) :: * -> *
class Unify f where
unify :: f typ -> f typ' -> Maybe (typ :=: typ')
class Unify (TypeOf f)... |
1ecb2dc94363912aab73e63ab3dbaf20f409bf4ebf318ceb22a08551742d98bc | jrm-code-project/LISP-Machine | experiments.lisp |
;;; experiments.lisp
(common-lisp t)
(defun fact (n)
(if (zerop n)
1
(* n (fact (- n 1)))))
(defun reverse-list (l)
(cond
((null l) nil)
((atom l) l)
((consp l) (append (reverse-list (cdr l)) (list (car l))))
(t (error "not a list"))))
(defstruct (ship)
ship-x-position
ship-y-po... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/rauen/experiments.lisp | lisp | experiments.lisp |
(common-lisp t)
(defun fact (n)
(if (zerop n)
1
(* n (fact (- n 1)))))
(defun reverse-list (l)
(cond
((null l) nil)
((atom l) l)
((consp l) (append (reverse-list (cdr l)) (list (car l))))
(t (error "not a list"))))
(defstruct (ship)
ship-x-position
ship-y-position
ship-x-veloc... |
92c7b6ed4ffbacc7cb9fa1216b3daeaee01d943de2e203b18f84bdf960d23303 | uw-unsat/jitsynth | gentests.rkt | #lang rosette
(require "utils.rkt")
(define lines (file->lines "linux/test/rawtests.c"))
(define out (open-output-file "linux/test/bpf-tests.rkt" #:exists 'replace))
(displayln "#lang rosette" out)
(displayln (~a "(require \"utils.rkt\" "
"\"../../common/data-utils.rkt\" "
"\"../../bpf/... | null | https://raw.githubusercontent.com/uw-unsat/jitsynth/69529e18d4a8d4dace884bfde91aa26b549523fa/linux/test/gentests.rkt | racket | #lang rosette
(require "utils.rkt")
(define lines (file->lines "linux/test/rawtests.c"))
(define out (open-output-file "linux/test/bpf-tests.rkt" #:exists 'replace))
(displayln "#lang rosette" out)
(displayln (~a "(require \"utils.rkt\" "
"\"../../common/data-utils.rkt\" "
"\"../../bpf/... | |
c9c7bb99dea3b7135998419ca76cedd9a2f9e7bc449d1ad866aaaea07b6739b9 | mbutterick/beautiful-racket | expander.rkt | #lang br
(require racket/stxparam)
(provide (all-defined-out)
#%app #%top #%datum #%top-interaction)
(define-macro top #'#%module-begin)
(define-macro-cases ternary
[(_ EXPR) #'EXPR]
[(_ COND TRUE-EXPR FALSE-EXPR) #'(if COND TRUE-EXPR FALSE-EXPR)])
(define-macro-cases logical-or
[(_ VAL) #'VAL]
[(_ ... | null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/scriptish-demo/expander.rkt | racket | (require racket/gui)
(define (alert text) | #lang br
(require racket/stxparam)
(provide (all-defined-out)
#%app #%top #%datum #%top-interaction)
(define-macro top #'#%module-begin)
(define-macro-cases ternary
[(_ EXPR) #'EXPR]
[(_ COND TRUE-EXPR FALSE-EXPR) #'(if COND TRUE-EXPR FALSE-EXPR)])
(define-macro-cases logical-or
[(_ VAL) #'VAL]
[(_ ... |
2f1f3b25c5f644cc9e7b3a4955aa188de2313c746e8afd0a3c3d999ab39af2bf | cky/guile | box-module.scm | ;;; examples/box-dynamic-module/box-module.scm -- Scheme module exporting
some functionality from the shared library libbox - module .
;;; Commentary:
;;; This is the Scheme part of the dynamic library module (box-module).
;;; When you do a (use-modules (box-module)) in this directory,
;;; this file gets loaded a... | null | https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/examples/box-dynamic-module/box-module.scm | scheme | examples/box-dynamic-module/box-module.scm -- Scheme module exporting
Commentary:
This is the Scheme part of the dynamic library module (box-module).
When you do a (use-modules (box-module)) in this directory,
this file gets loaded and will load the compiled extension.
Code:
Then export the procedures which sho... | some functionality from the shared library libbox - module .
Author :
Date : 2001 - 06 - 06
(define-module (box-module))
First , load the library .
(load-extension "libbox-module" "scm_init_box")
(export make-box box-ref box-set!)
|
89b1ea677b753fc73ab57dad4d370c45eec7efbd17016735f3816093234258f7 | uw-unsat/serval | mul.rkt | #lang rosette
(require
"common.rkt")
(provide
mul-r/m32
mul-r/m64)
(define (interpret-mul cpu src n)
(define v1 (trunc n (cpu-gpr-ref cpu rax)))
(define v2 (cpu-gpr-ref cpu src))
(define lower ((core:bvmul-proc) v1 v2))
(define upper ((core:bvmulhu-proc) v1 v2))
(define upper-bit (if (bvzero? upper)... | null | https://raw.githubusercontent.com/uw-unsat/serval/be11ecccf03f81b8bd0557acf8385a6a5d4f51ed/serval/x86/interp/mul.rkt | racket | CF and OF are cleared if the higher-order bits are 0
REX.W + F7 /4 | #lang rosette
(require
"common.rkt")
(provide
mul-r/m32
mul-r/m64)
(define (interpret-mul cpu src n)
(define v1 (trunc n (cpu-gpr-ref cpu rax)))
(define v2 (cpu-gpr-ref cpu src))
(define lower ((core:bvmul-proc) v1 v2))
(define upper ((core:bvmulhu-proc) v1 v2))
(define upper-bit (if (bvzero? upper)... |
66d4264de2f672cec9a478bc5ecb10781712643eed2121a9b0074366316bd446 | music-suite/music-suite | Meta.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - unused - imports
-fno - warn - redundant - constraints #
-fno-warn-redundant-constraints #-}
-- |
-- Provides a way to annotate data-types with 'Transformable' meta-data.
Inspired by Clojure meta -... | null | https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/src/Music/Time/Meta.hs | haskell | # LANGUAGE GADTs #
|
Provides a way to annotate data-types with 'Transformable' meta-data.
* Attributes
** Creating attributes
unwrapTAttr,
* Meta-data
** Creating meta-data
** Add meta-data to arbitrary types
| Class of values that can be wrapped.
| Class of values that can be wrapped and transformed.
| An ... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - unused - imports
-fno - warn - redundant - constraints #
-fno-warn-redundant-constraints #-}
Inspired by Clojure meta - data and Diagrams styles .
module Music.Time.Meta
AttributeClass,
TAttributeClass,
Attri... |
19acc01fc4117a90f8d89cd66e661a612b1620ce96555f0c06c5365b33b1a479 | mirage/irmin | custom_storage.ml |
* Copyright ( c ) 2022 Tarides < >
*
* 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 ... | null | https://raw.githubusercontent.com/mirage/irmin/5374885b8ab849e929651c25b9f6a9ea4233a017/examples/custom_storage.ml | ocaml | * Create a configuration module for our storage. Here we demonstrate a simple
configuration for setting the initial size of the hash table.
* Types
* Initialisation / Closing
* Operations |
* Copyright ( c ) 2022 Tarides < >
*
* 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 ... |
fb23981ab76e862ad4f6aec08704ed699a85f65a4b53f7531b56af9dce5b04b2 | well-typed/large-records | Row080.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module Common.RowOfSize.Row080 (ExampleRow) where
import Data.Record.Anon
import Bench.Types
type ExampleRow = [
-- 00 .. 09
"t00" := T 00
, "t01" := T 01
, "t02" := T 02
, "t03" := T 03
, "t04" := T 04
, "t05" := T 05
, "t06" := T 06
, "t... | null | https://raw.githubusercontent.com/well-typed/large-records/78d0966e4871847e2c17a0aa821bacf38bdf96bc/large-records-benchmarks/bench/large-anon/Common/RowOfSize/Row080.hs | haskell | 00 .. 09 | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module Common.RowOfSize.Row080 (ExampleRow) where
import Data.Record.Anon
import Bench.Types
type ExampleRow = [
"t00" := T 00
, "t01" := T 01
, "t02" := T 02
, "t03" := T 03
, "t04" := T 04
, "t05" := T 05
, "t06" := T 06
, "t07" := T 07
, ... |
f34019188fe56e8c3c6d76b828d7d31e8e85ab34c775893118da9e89e62964a1 | facebook/pyre-check | classHierarchyGraph.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/d6a6955c4f3e18b9727c7682c78e88532c451bb0/source/interprocedural/classHierarchyGraph.ml | ocaml | ClassHierarchyGraph: defines a class hierarchy graph. This can be used to
* find all classes deriving from a given class.
* Graph of root classes and their children, stored in the ocaml heap.
Return the immediate children
Add an edge in the graph
Remove roots that now have incoming edges
* Mapping from a clas... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
378cca42e8f8990cb9a385537a49bfff67ca6a1becf344cf5a6d0fc22fb72398 | erlang/sourcer | sourcer_model.erl | -module(sourcer_model).
-export([
init/2,
change_configuration/2,
open_document/5,
change_document/4,
save_document/2,
close_document/2,
change_watched_files/2
]).
-type path_item() :: {'lib'|'app'|'file', string()}.
-type state() :: #{
'workspace' => string(),
'open_documents' =... | null | https://raw.githubusercontent.com/erlang/sourcer/27ea9c63998b9e694eb7b654dd05b831b989e69e/apps/sourcer/src2/sourcer_model.erl | erlang | -define(LOG(X), State#state.logger:log(X)).
| -module(sourcer_model).
-export([
init/2,
change_configuration/2,
open_document/5,
change_document/4,
save_document/2,
close_document/2,
change_watched_files/2
]).
-type path_item() :: {'lib'|'app'|'file', string()}.
-type state() :: #{
'workspace' => string(),
'open_documents' =... |
84c66eda1f37a9fbccc605232d194cf7f0c971d77387c73730ef4b101e790bac | SRI-CSL/f3d | glu-ffi.lisp | (in-package :gl)
ALL OF THIS SHOULD USE MKVAR AND DEF - FOREIGN - CONSTANT
;;;
TessCallback
(defconstant GLU_TESS_BEGIN 100100)
(defconstant GLU_BEGIN 100100)
(defconstant GLU_TESS_VERTEX 100101)
(defconstant GLU_VERTEX ... | null | https://raw.githubusercontent.com/SRI-CSL/f3d/93285f582198bfbab33ca96ff71efda539b1bec7/f3d-gl/gl-ffi/glu-ffi.lisp | lisp | (in-package :gl)
ALL OF THIS SHOULD USE MKVAR AND DEF - FOREIGN - CONSTANT
TessCallback
(defconstant GLU_TESS_BEGIN 100100)
(defconstant GLU_BEGIN 100100)
(defconstant GLU_TESS_VERTEX 100101)
(defconstant GLU_VERTEX 100... | |
6411aff291358227fa83b031c6241901f56a30ce0101127f0ad80cf67e1484d3 | pirapira/coq2rust | declaremods.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/library/declaremods.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* [import_module export mp] is a syn... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Vernacexpr
*... |
3ae398f1a04d5e1592701839b88fc87c3a7437d31a7c1df5a32cea97b0c49be7 | macourtney/Dark-Exchange | send_trade_message.clj | (ns darkexchange.model.calls.send-trade-message
(:require [clojure.contrib.logging :as logging]
[darkexchange.model.actions.action-keys :as action-keys]
[darkexchange.model.identity :as identity-model]
[darkexchange.model.trade :as trade-model]
[darkexchange.model.trade... | null | https://raw.githubusercontent.com/macourtney/Dark-Exchange/1654d05cda0c81585da7b8e64f9ea3e2944b27f1/src/darkexchange/model/calls/send_trade_message.clj | clojure | (ns darkexchange.model.calls.send-trade-message
(:require [clojure.contrib.logging :as logging]
[darkexchange.model.actions.action-keys :as action-keys]
[darkexchange.model.identity :as identity-model]
[darkexchange.model.trade :as trade-model]
[darkexchange.model.trade... | |
b70468ba7fdf75025528d09e720ba04b62180bbf4d5121dc3ae6a4a7de560118 | conal/Fran | Vector3.hs | -- 3D Vectors (static)
module Vector3
(
Vector3(..),
instance Vector3 ( Eq , Show , , VectorSpace , Transformable3 )
xVector3, yVector3, zVector3, -- :: Vector3 -- unit vectors
vector3XYZ, -- :: RealVal -> RealVal -> Vector3
: : Vector3 - > ( RealVal , ... | null | https://raw.githubusercontent.com/conal/Fran/a113693cfab23f9ac9704cfee9c610c5edc13d9d/src/Vector3.hs | haskell | 3D Vectors (static)
:: Vector3 -- unit vectors
:: RealVal -> RealVal -> Vector3
:: Length -> Radians -> Vector3
(-) follows from negate and +
This is here so we can use + and - on Vector3B.
|
module Vector3
(
Vector3(..),
instance Vector3 ( Eq , Show , , VectorSpace , Transformable3 )
: : Vector3 - > ( RealVal , )
: : Vector3 - > ( Length , Radians )
instance
) where
import BaseTypes
import VectorSpace
import Force
data Vector3 = Vector3XYZ Real... |
819b270f7d21e72e96b0d1e52b4c253581d2c282bbc18bf475f396963ba9a6c8 | justinethier/cyclone | base.scm | ;;;; Cyclone Scheme
;;;;
;;;;
Copyright ( c ) 2014 - 2021 ,
;;;; All rights reserved.
;;;;
This module contains unit tests for threading / SRFI 18 .
;;;;
(import
(scheme base)
(cyclone test))
(define vec #(1 2))
(test-group
"vector literals"
(test #(1 2) vec)
(test vec (vector 1 2))
)
(test-group... | null | https://raw.githubusercontent.com/justinethier/cyclone/ad1ac3a13570b18c354ff293c10d1ad6143e68a3/tests/base.scm | scheme | Cyclone Scheme
All rights reserved.
| Copyright ( c ) 2014 - 2021 ,
This module contains unit tests for threading / SRFI 18 .
(import
(scheme base)
(cyclone test))
(define vec #(1 2))
(test-group
"vector literals"
(test #(1 2) vec)
(test vec (vector 1 2))
)
(test-group
"strings"
(test "??>" "??>")
)
(test-group
"make-list"
(t... |
99218f954e7473470397e236407f0dba833a628c35c46268f46dc20f8a0e710e | facebookarchive/duckling_old | cycles.clj | ; Cycles are like a heart beat, the next starts just when the previous ends.
; Unlike durations, they have an absolute position in the time, it's just that this position is periodic.
; Examples of phrases involving cycles:
- this week
; - today (= this day)
; - last month
; - last 2 calendar months (last 2 months is ... | null | https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/nb/rules/cycles.clj | clojure | Cycles are like a heart beat, the next starts just when the previous ends.
Unlike durations, they have an absolute position in the time, it's just that this position is periodic.
Examples of phrases involving cycles:
- today (= this day)
- last month
- last 2 calendar months (last 2 months is interpreted as a dur... | - this week
As soon as you put a quantity ( 2 months ) , the cycle becomes a duration .
(
"second (cycle)"
#"(?i)sekund(er)?"
{:dim :cycle
:grain :second}
"minute (cycle)"
#"(?i)minutt(er)?"
{:dim :cycle
:grain :minute}
"hour (cycle)"
#"(?i)time(r)?"
{:dim :cycle
:grain :hour}
"day... |
748cc9e4c74ce3e7757749a0377c06ab24fc6826972e95b3192383140ee4609e | magnolia-lang/magnolia-lang | Syntax.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeF... | null | https://raw.githubusercontent.com/magnolia-lang/magnolia-lang/1c5a968f21e43d2807d53000a693a620b862e5b6/src/lib/Magnolia/Syntax.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
* AST nodes
$mgAst
TODO(bchetioui, 07/07/21): cleanup node names. This is put on hold to
avoid too much rebasing of a big PR.
** Generic AST nodes
** AST nodes after the parsing phase
** AST nodes after the type checking phase
** Ut... | # LANGUAGE DataKinds #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Magnolia.Syn... |
f1c9f289c499dcbbb07f0cbebaa6f733369f5466bdcf52d3c9cab893656d97b9 | clojournal/clojournal | payee.cljc | (ns com.clojournal.alpha.payee)
| null | https://raw.githubusercontent.com/clojournal/clojournal/483619cbd9a1dc544c9930cf135d10a3de91337b/src/main/com/clojournal/alpha/payee.cljc | clojure | (ns com.clojournal.alpha.payee)
| |
e37d7729b51c26ca6d1ce322bf9a344133b2a0d3ce44934289b175b4aab1fa15 | dfinity/motoko | pipeline.ml | open Mo_def
open Mo_frontend
open Mo_types
open Mo_values
open Mo_interpreter
open Ir_def
open Ir_interpreter
open Ir_passes
open Mo_config
open Printf
module ResolveImport = Resolve_import
type stat_env = Scope.t
type dyn_env = Interpret.scope
type env = stat_env * dyn_env
(* Diagnostics *)
let phase heading nam... | null | https://raw.githubusercontent.com/dfinity/motoko/e62ac29ff2188f590960e7061c325494d0d314b9/src/pipeline/pipeline.ml | ocaml | Diagnostics
Dumping
Parsing
a back door to enable the `prim` syntax, for our test suite
Import file name resolution
Printing dependency information
Checking
Prelude and internals
Stable compatibility
The prim module
Imported file loading
Loading a file (or string) implies lexing, parsing, resolvi... | open Mo_def
open Mo_frontend
open Mo_types
open Mo_values
open Mo_interpreter
open Ir_def
open Ir_interpreter
open Ir_passes
open Mo_config
open Printf
module ResolveImport = Resolve_import
type stat_env = Scope.t
type dyn_env = Interpret.scope
type env = stat_env * dyn_env
let phase heading name =
if !Flags.ve... |
ef9dfbd67377e6555b264fc0e2dd0c24be31caad2022a633355459fe1aec70cd | NorfairKing/the-notes | Regression.hs | module MachineLearning.SupervisedLearning.Regression where
import Notes
import Functions.Application.Macro
import Functions.Basics.Macro
import Functions.Basics.Terms
import Geometry.AffineSpaces.Terms
import LinearAlgebra.VectorSpaces.Terms
import ... | null | https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/MachineLearning/SupervisedLearning/Regression.hs | haskell | Statistical Learning Theory: we minimize the empirical risk directly without estimating the likelihood.
prior: P(model)
likelihood: P(data|model)
posterior: P(model|data)
evidence: P(data)
SVD of ridge regression solution | module MachineLearning.SupervisedLearning.Regression where
import Notes
import Functions.Application.Macro
import Functions.Basics.Macro
import Functions.Basics.Terms
import Geometry.AffineSpaces.Terms
import LinearAlgebra.VectorSpaces.Terms
import ... |
cfe250595e52b8aa0d1e674a355962dc530240cfc710ef5d6edc79c98231b1c1 | Deaf-Clojurian/sudoku-solver | solver.clj | (ns sudoku-solver.models.solver
(:require
[schema.core :as s]
[sudoku-solver.wire.common :as wire.common]))
(s/defschema Matrix wire.common/skeleton-internal)
(s/defschema MatrixSolving wire.common/skeleton-solving)
| null | https://raw.githubusercontent.com/Deaf-Clojurian/sudoku-solver/223ef9fd178f96f13747fc99a32d76c94d890729/src/sudoku_solver/models/solver.clj | clojure | (ns sudoku-solver.models.solver
(:require
[schema.core :as s]
[sudoku-solver.wire.common :as wire.common]))
(s/defschema Matrix wire.common/skeleton-internal)
(s/defschema MatrixSolving wire.common/skeleton-solving)
| |
c5d5c4cdaeb7200199e13ec3f433c53cca80ef588cf33dc2ded54e8cc711aa83 | andrewjstone/rafter | rafter_sup.erl | -module(rafter_sup).
-behaviour(supervisor).
-include("rafter_opts.hrl").
%% API
-export([start_link/0, start_peer/2, stop_peer/1]).
%% Supervisor callbacks
-export([init/1]).
%% ===================================================================
%% API functions
%% ================================================... | null | https://raw.githubusercontent.com/andrewjstone/rafter/6bc630b487ef26770df78afbbc97995cfe0b7b5a/src/rafter_sup.erl | erlang | API
Supervisor callbacks
===================================================================
API functions
===================================================================
@doc Start an individual peer. In production, this will only be called once
on each machine with node/local name semantics.
communicate w... | -module(rafter_sup).
-behaviour(supervisor).
-include("rafter_opts.hrl").
-export([start_link/0, start_peer/2, stop_peer/1]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
For testing , this allows us to start 5 nodes in one erlang VM and
-spec start_peer(atom() |... |
ba686446d365a91a56d5145a06f13c3d9bd9d7b832fe9b671800912ff54c2b76 | clojure-emacs/cider-nrepl | test_filter_tests.clj | (ns cider.nrepl.middleware.test-filter-tests
"empty tests for tests testing the filter feature
in `cider.nrepl.middleware.test-test` namespace"
(:require
[clojure.test :refer :all]))
(deftest ^:smoke a-puff-of-smoke-test
(is true "puff"))
(deftest ^:integration ^:smoke a-smokey-test
(is true "puff"))
(d... | null | https://raw.githubusercontent.com/clojure-emacs/cider-nrepl/cd29bd761e58707d438b3373d7512c9e33ded865/test/clj/cider/nrepl/middleware/test_filter_tests.clj | clojure | (ns cider.nrepl.middleware.test-filter-tests
"empty tests for tests testing the filter feature
in `cider.nrepl.middleware.test-test` namespace"
(:require
[clojure.test :refer :all]))
(deftest ^:smoke a-puff-of-smoke-test
(is true "puff"))
(deftest ^:integration ^:smoke a-smokey-test
(is true "puff"))
(d... | |
9cbb3408417ddd5d4092c25627885f9608945ab941d4834f1cff31ce02a6bc48 | NoobsEnslaver/scheme_book | going_further.scm | -*- coding : utf-8 ; -*-
(define-syntax let
(syntax-rules ()
[(_ ((x e) ...) b1 b2 ...)
((lambda (x ...) b1 b2 ...) e ...)]))
(define-syntax and
(syntax-rules ()
[(_) #t]
[(_ e) e]
[(_ e1 e2 e3 ...)
(if e1 (and e2 e3 ...) #f)]))
(define-syntax or
(syntax-rules ()
[(_) #f]
[(_... | null | https://raw.githubusercontent.com/NoobsEnslaver/scheme_book/48091a6f6afd08fa8e0a2b1d12a0df4e5e785cdb/src/scheme/going_further.scm | scheme | -*-
+bad-and
incorrect!
-bad-and
+bad-or
incorrect!
-bad-or
-list2-def
+factorial
-factorial
+factorial-iter
-factorial-iter
+fibonacci
+fibonacci-acc
+factor
-factor
+call/cc-example-1
-call/cc-example-1
+call/cc-product
-call/cc-product
+call/cc-factorial
-call/cc-factorial
+call/cc-example-2
-call/cc-example-2
+c... | (define-syntax let
(syntax-rules ()
[(_ ((x e) ...) b1 b2 ...)
((lambda (x ...) b1 b2 ...) e ...)]))
(define-syntax and
(syntax-rules ()
[(_) #t]
[(_ e) e]
[(_ e1 e2 e3 ...)
(if e1 (and e2 e3 ...) #f)]))
(define-syntax or
(syntax-rules ()
[(_) #f]
[(_ e) e]
[(_ e1 e2 e3 ...... |
49246a06f8ae1ff5f135ed5cd69c7630cc40e9918349079f09c152e428dc5751 | scrive/haskell-soap | Exception.hs | {-# LANGUAGE OverloadedStrings, DeriveDataTypeable #-}
module Network.SOAP.Exception
( SOAPParsingError(..)
, SOAPFault(..), extractSoapFault
) where
import Control.Exception as E
import Data.Typeable
import Text.XML (Document)
import Text.XML.Cursor
import qualified Data.Text as T
data SOAPParsingError ... | null | https://raw.githubusercontent.com/scrive/haskell-soap/b237ca8c7d5411e9b5fcf239db02c53df9ba41d4/soap/src/Network/SOAP/Exception.hs | haskell | # LANGUAGE OverloadedStrings, DeriveDataTypeable #
| Exception to be thrown when transport encounters an exception that is
acutally a SOAP Fault.
| Try to find a SOAP Fault in a document. |
module Network.SOAP.Exception
( SOAPParsingError(..)
, SOAPFault(..), extractSoapFault
) where
import Control.Exception as E
import Data.Typeable
import Text.XML (Document)
import Text.XML.Cursor
import qualified Data.Text as T
data SOAPParsingError = SOAPParsingError String deriving (Show, Typeable)
ins... |
15b7ed44710a2b3e6fa8695a9a5d9b0e9c362a3a19371f16fe27fb5bf41a4459 | hexlet-codebattle/battle_asserts | orthogonal_vectors.clj | (ns battle-asserts.issues.orthogonal-vectors
(:require [clojure.test.check.generators :as gen]))
(def level :medium)
(def tags ["math"])
(def description
{:en "Create a function that takes two vectors and checks if them are orthogonal or not.
Two vectors are orthogonal if their dot product is equal to ze... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/94dbb426bf8b97921e7c6f50f177c5b7369ced1d/src/battle_asserts/issues/orthogonal_vectors.clj | clojure | (ns battle-asserts.issues.orthogonal-vectors
(:require [clojure.test.check.generators :as gen]))
(def level :medium)
(def tags ["math"])
(def description
{:en "Create a function that takes two vectors and checks if them are orthogonal or not.
Two vectors are orthogonal if their dot product is equal to ze... | |
08a952909a53562ce221614740fd4f0bcbf9955d1dfee89f55ad6b1f2344ae87 | markandrus/twilio-haskell | APIKey.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-#LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
-------------------------------------------------------------------------------
-- |
-- Module : Twilio.APIKey
Copyright : ( C ) 2017-
-- License : BSD-style (see the file L... | null | https://raw.githubusercontent.com/markandrus/twilio-haskell/00704dc86dbf2117b855b1e2dcf8b6c0eff5bfbe/src/Twilio/APIKey.hs | haskell | #LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
|
Module : Twilio.APIKey
License : BSD-style (see the file LICENSE)
Stability : provisional
-----------------------------------------------------------------------------
* Resource | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ViewPatterns #
Copyright : ( C ) 2017-
Maintainer : < >
module Twilio.APIKey
APIKey(..)
, APIKeySID
, Twilio.APIKey.get
) where
import Control.Monad
import Control.Monad.Catch
import Data.Aeson
import Data.Monoid... |
536b05b2ee73c0a86b1acfd36afcbd14ab94758423099f94fbf677cb355f1473 | ntoronto/drbayes | indexes.rkt | #lang typed/racket/base
(require racket/list
math/flonum
"../set.rkt"
"../flonum.rkt"
"types.rkt"
"../utils.rkt")
(provide (all-defined-out))
(: make-constant-splitter (-> (Listof+2 Plain-Prob-Interval) Interval-Splitter))
(define ((make-constant-splitter Is) A)
(revers... | null | https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/private/arrow/indexes.rkt | racket | #lang typed/racket/base
(require racket/list
math/flonum
"../set.rkt"
"../flonum.rkt"
"types.rkt"
"../utils.rkt")
(provide (all-defined-out))
(: make-constant-splitter (-> (Listof+2 Plain-Prob-Interval) Interval-Splitter))
(define ((make-constant-splitter Is) A)
(revers... | |
159bf2e47fdd3aebc422ae1389386ce477e170ef4ad71449e068ea020bb53555 | rfkm/zou | args_mapper.clj | (ns zou.web.handler.args-mapper)
(declare process-param)
(defn- dispatch-param-processor [{:keys [sym] :as m}]
(some #(and (.startsWith (name sym) (name %)) %)
(sort #(compare
(count (name %2))
(count (name %1)))
(->> process-param
methods
... | null | https://raw.githubusercontent.com/rfkm/zou/228feefae3e008f56806589cb8019511981f7b01/web/src/zou/web/handler/args_mapper.clj | clojure | no infix | (ns zou.web.handler.args-mapper)
(declare process-param)
(defn- dispatch-param-processor [{:keys [sym] :as m}]
(some #(and (.startsWith (name sym) (name %)) %)
(sort #(compare
(count (name %2))
(count (name %1)))
(->> process-param
methods
... |
9f112c6a92cd40d0305e7483f17255c9a3d4200a26f1a6bab65a6786e94bc55c | codinuum/cca | test_SMP.ml |
Copyright 2012 - 2020 Codinuum Software Lab < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in wri... | null | https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/util/test_SMP.ml | ocaml |
Copyright 2012 - 2020 Codinuum Software Lab < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in wri... | |
e4e281f68daec955e4ae5570f9a66216c5d7b1c922665eb9a27a21a749ad12c6 | esengie/fpl-exploration-tool | Infer.hs | module CodeGen.RightSide.Infer(
buildRightInfer,
populateForalls,
genCheckMetaEq
) where
import Control.Monad.State
import Control.Monad.Except (throwError, lift)
import Control.Lens
import Language.Haskell.Exts.Simple
import qualified Data.Map as Map
import AST hiding (Var, name, Name)
import qualified AST (T... | null | https://raw.githubusercontent.com/esengie/fpl-exploration-tool/bf655e65d215da4d7cae703dda7a7fde1a180b43/src/langGenerator/CodeGen/RightSide/Infer.hs | haskell | populate foralls
write all metas given as args + add |- A judgements to be inferred
returns checks for contexts and infers the part after |-
equality goes like this "checkEq a b >> infer (consCtx v) a"
[[Exp]]
check metas for equality after all of them are added
---------------------------------------------------... | module CodeGen.RightSide.Infer(
buildRightInfer,
populateForalls,
genCheckMetaEq
) where
import Control.Monad.State
import Control.Monad.Except (throwError, lift)
import Control.Lens
import Language.Haskell.Exts.Simple
import qualified Data.Map as Map
import AST hiding (Var, name, Name)
import qualified AST (T... |
61ffb32a403f2bfb9cff4b554c94b5024e5e97ac7b9e6f16bba186b84d335375 | HunterYIboHu/htdp2-solution | ex506-is-prime.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex506-is-prime) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor r... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter6/Section32-Designing-accumulator-style-function/ex506-is-prime.rkt | racket | about the language level of this file in a form that our tools can easily process.
N -> Boolean
N [List-of N] -> Boolean
(1) not be divided by n;
N -> Boolean | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex506-is-prime) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
determines whether n0 is a prime .
(check-e... |
b3eca7324bf70bb6fdd784b122cf031d21e0d7a8db42d976575e9a8c491846a8 | septract/jstar-old | jimple_global_types.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This file is part of jStar
src / jimple_syntax / jimple_global_types.mli
Release
$ Release$
Version
$ Rev$
$ Copyright$
jStar is distributed under a BSD l... | null | https://raw.githubusercontent.com/septract/jstar-old/c3b4fc6c1efc098efcdb864edbf0c666130f5fe5/src/jimple_syntax/jimple_global_types.mli | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This file is part of jStar
src / jimple_syntax / jimple_global_types.mli
Release
$ Release$
Version
$ Rev$
$ Copyright$
jStar is distributed under a BSD l... | |
492b0897ee0f1e7d1a2cb5751ba63cb95da42f4da4b930a69f50aaf98ee7c6f0 | anik545/OwlPPL | helpers.mli | (** Utilities for working with distributions
A set of utilities for generating statistics and printing distributions
*)
open Dist
* { 2 : samples Samples }
val sample_mean : ?n:int -> float dist -> float
(** *)
val sample_variance : ?n:int -> float dist -> float
(** *)
val take_k_samples : int -> 'a dist -> ... | null | https://raw.githubusercontent.com/anik545/OwlPPL/ad650219769d5f32564cc771d63c9a52289043a5/ppl/lib/helpers.mli | ocaml | * Utilities for working with distributions
A set of utilities for generating statistics and printing distributions
*
*
*
* Removes duplicates and sums the probabilities associated so that each value appears once
*
*
*
*
*
*
*
*
* |
open Dist
* { 2 : samples Samples }
val sample_mean : ?n:int -> float dist -> float
val sample_variance : ?n:int -> float dist -> float
val take_k_samples : int -> 'a dist -> 'a array
val unduplicate : ('a * prob) list -> ('a * prob) list
val flatten : (('a * prob) list * prob) list -> ('a * prob) list
val norm... |
a902245fdb393601f7333e2421aa04d044ab569e38b68ec7b4293f0c518fb3d9 | tqtezos/minter-sdk | SwapPermitBurnFee.hs | -- | Lorentz bindings for the swap with permit contract
module Lorentz.Contracts.Swaps.SwapPermitBurnFee where
import Lorentz
import Lorentz.Contracts.NonPausableSimpleAdmin
import Lorentz.Contracts.Swaps.AllowlistedFee as AllowlistedFee
import Lorentz.Contracts.Swaps.Basic
import Lorentz.Contracts.Swaps.Burn
import ... | null | https://raw.githubusercontent.com/tqtezos/minter-sdk/6239f6ee8435977085c00c194224d4223386841a/packages/minter-contracts/src-hs/Lorentz/Contracts/Swaps/SwapPermitBurnFee.hs | haskell | | Lorentz bindings for the swap with permit contract
Types
--------------------------------------------------------------------------
Errors
-------------------------------------------------------------------------- | module Lorentz.Contracts.Swaps.SwapPermitBurnFee where
import Lorentz
import Lorentz.Contracts.NonPausableSimpleAdmin
import Lorentz.Contracts.Swaps.AllowlistedFee as AllowlistedFee
import Lorentz.Contracts.Swaps.Basic
import Lorentz.Contracts.Swaps.Burn
import Lorentz.Contracts.Swaps.SwapPermit
data BurnSwapFeeStor... |
02f16b70a2d829e0b81fc0471da71f2c56a78d48594967aa90ad74d9d92d7f33 | ekmett/semigroupoids | Bitraversable.hs | # LANGUAGE CPP #
{-# LANGUAGE Safe #-}
-----------------------------------------------------------------------------
-- |
Copyright : ( C ) 2011 - 2015
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : provisional
-- Portability : portable
--
-------------------... | null | https://raw.githubusercontent.com/ekmett/semigroupoids/f63f7a2d696fdd6ed72eea90798fca1f86d6d040/src/Data/Semigroup/Bitraversable.hs | haskell | # LANGUAGE Safe #
---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : provisional
Portability : portable
-------------------------------------------------------------------------- | # LANGUAGE CPP #
Copyright : ( C ) 2011 - 2015
Maintainer : < >
module Data.Semigroup.Bitraversable
( Bitraversable1(..)
, bifoldMap1Default
) where
import Control.Applicative
#if !(MIN_VERSION_base(4,11,0))
import Data.Semigroup
#endif
import Data.Semigroup.Traversable.Class
bifoldMap1Default... |
6e80dfa8b193f8c71295c7cd7d2213aac1552d478621e2ae0edc3cff6c6ae831 | bobzhang/ocaml-book | inspect.ml | -*- Mode : Tuareg ; -*-
* = = = ----------------------------------------------------------------------===
* Version : $ I d : inspect.ml , v 0.0 2012/02/22 22:37:31 bobzhang1988 Exp $
* = = = ----------------------------------------------------------------------===
*===------------------------------... | null | https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/ffi/inspect/inspect.ml | ocaml | let i = inspect |- ignore | -*- Mode : Tuareg ; -*-
* = = = ----------------------------------------------------------------------===
* Version : $ I d : inspect.ml , v 0.0 2012/02/22 22:37:31 bobzhang1988 Exp $
* = = = ----------------------------------------------------------------------===
*===------------------------------... |
5c973a3fc4d6baa07b9f5433e2f7375d9c2706ba0d677c733695e457fd21d1b5 | garrigue/lablgtk | kaimono.ml | (**************************************************************************)
Lablgtk - Examples
(* *)
(* This code is in the public domain. *)
(* You may f... | null | https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/examples/kaimono.ml | ocaml | ************************************************************************
This code is in the public domain.
You may freely copy parts of it in your application.
... | Lablgtk - Examples
$ Id$
open StdLabels
open Printf
let _ = GMain.init ()
let file_dialog ~title ~callback ?filename () =
let sel = GWindow.file_chooser_dialog ~action:`OPEN ~title ?filename () in
sel#add_button_stock `CANCEL `CANCEL ;
sel#add_select_bu... |
dbd28e5befeeb4b027f3837fd5b10716335fe775c910e51e8eda7c236816ca29 | stylewarning/quickutil | io.lisp | (in-package #:quickutil-utilities.utilities)
(defutil stream-direction (:version (1 . 0)
:category streams)
"Return the direction of the stream `stream`: `:input`, `:output`, or `:io`."
#>%%%>
(defun stream-direction (stream)
%%DOC
(let ((in? (input-stream-p stream))
... | null | https://raw.githubusercontent.com/stylewarning/quickutil/5adb3463d99095145325c4013117bd08a8f6cac2/quickutil-utilities/utilities/io.lisp | lisp | (in-package #:quickutil-utilities.utilities)
(defutil stream-direction (:version (1 . 0)
:category streams)
"Return the direction of the stream `stream`: `:input`, `:output`, or `:io`."
#>%%%>
(defun stream-direction (stream)
%%DOC
(let ((in? (input-stream-p stream))
... | |
b62880c0957bfd8443fcb3cedda7c72d3ebea132515d77520a85688a3120c2d2 | BranchTaken/Hemlock | either.mli | (** Either type.
The {!type:Either.t} type is useful in either-or logic such as set partitioning. *)
* { 1 Type }
type ('a, 'b) t =
| First of 'a
| Second of 'b
* { 1 Comparison }
val hash_fold: ('a -> Hash.State.t -> Hash.State.t) -> ('b -> Hash.State.t -> Hash.State.t)
-> ('a, 'b) t -> Hash.State.t -> ... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/src/basis/either.mli | ocaml | * Either type.
The {!type:Either.t} type is useful in either-or logic such as set partitioning.
* [fmt ~alt fmt_a fmt_b t] uses the formatter [fmt_a] or [fmt_b] to format a syntactically valid
representation of [t]. If [~alt=true], the value is enclosed by parentheses.
* {1 Access} |
* { 1 Type }
type ('a, 'b) t =
| First of 'a
| Second of 'b
* { 1 Comparison }
val hash_fold: ('a -> Hash.State.t -> Hash.State.t) -> ('b -> Hash.State.t -> Hash.State.t)
-> ('a, 'b) t -> Hash.State.t -> Hash.State.t
* [ hash_fold hash_fold_a hash_fold_b t state ] incorporates the hash of [ t ] into [ state ]... |
ff6c6b41b92f9bd9d844218cc0c6a32ef3222a4085673b3d155989bbbcd16fd2 | ocaml-toml/To.ml | lenses.ml | let safe_find key table =
try
let value = Types.Table.find (Types.Table.Key.of_string key) table in
Some value
with Not_found -> None
type ('a, 'b) lens =
{ get : 'a -> 'b option
; set : 'b -> 'a -> 'a option
}
let key k =
{ get = (fun value -> safe_find k value)
; set =
(fun new_value val... | null | https://raw.githubusercontent.com/ocaml-toml/To.ml/215922367a2783af22e12e08bd8182e4cd149be0/src/lenses.ml | ocaml | let safe_find key table =
try
let value = Types.Table.find (Types.Table.Key.of_string key) table in
Some value
with Not_found -> None
type ('a, 'b) lens =
{ get : 'a -> 'b option
; set : 'b -> 'a -> 'a option
}
let key k =
{ get = (fun value -> safe_find k value)
; set =
(fun new_value val... | |
5c653cc99fdb85fe03bddeba66a17db9072f25ce2dfcba5f09357ebfe0f5ac6d | UU-ComputerScience/uhc | Setup.hs | -----------------------------------------------------------------------------
-- |
-- Module : Setup
Copyright : Martin Sjögren 2004
--
-- Maintainer :
-- Portability : portable
--
This is an alternative build system that delegates everything to the @make@
program . All the commands just end u... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/Setup.hs | haskell | ---------------------------------------------------------------------------
|
Module : Setup
Maintainer :
Portability : portable
arguments. The intention was to allow preexisting packages that used
such packages were converted over to the \"Simple\" build system instead.
Consequently this module is n... | Copyright : Martin Sjögren 2004
This is an alternative build system that delegates everything to the @make@
program . All the commands just end up calling @make@ with appropriate
makefiles to be wrapped into Cabal packages . In practice essentially all
Haskell tools using a backend build system base... |
ee0b37433d449c374dfe388f48c12a6c9c3c5bd7d4d4b4ad7a2ceb6e98daf5bd | ocurrent/ocurrent | log_rules.mli | val r : Resource.t
val rules_csv : Resource.t
| null | https://raw.githubusercontent.com/ocurrent/ocurrent/98b9bea39dcaf00757d41f61ce4efaee47aefc5d/lib_web/log_rules.mli | ocaml | val r : Resource.t
val rules_csv : Resource.t
| |
9dc4990649ffc087063e2927338963ac4b073bd8b01f519d572030f9f64b9976 | dwango/fialyzer | solver.mli | type solution = Type.t Base.Map.M(Type_variable).t (* public for test *)
[@@deriving sexp_of]
val string_of_sol : solution -> string
val init : solution
val solve : filename:string -> solution -> Constraint.t -> (solution, exn) result
val lookup_type : solution -> Type.t -> Type.t
| null | https://raw.githubusercontent.com/dwango/fialyzer/3c4b4fc2dacf84008910135bfef16e4ce79f9c89/lib/solver.mli | ocaml | public for test |
[@@deriving sexp_of]
val string_of_sol : solution -> string
val init : solution
val solve : filename:string -> solution -> Constraint.t -> (solution, exn) result
val lookup_type : solution -> Type.t -> Type.t
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.