_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 |
|---|---|---|---|---|---|---|---|---|
d1798243545479108db602846e61511947de09c5756ab537f269b1b9e81bfadd | GlideAngle/flare-timing | Difficulty.hs | # LANGUAGE DuplicateRecordFields #
module Flight.Gap.Distance.Difficulty
( SumOfDifficulty(..)
, Chunking(..)
, Difficulty(..)
, gradeDifficulty
) where
import Data.Ratio ((%))
import Data.Maybe (catMaybes)
import Data.Ord(Down(Down))
import Data.List (sortOn, nub)
import qualified Data.Map.Strict... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/34873946be9b93c37048ed118ef5b4649c71d630/lang-haskell/gap-effort/library/Flight/Gap/Distance/Difficulty.hs | haskell | | The sum of all chunk difficulties.
| The range of chunking used in working out difficulty. For each chunk in
the range, add together the number of pilots down in that chunk to the
number of pilots downward bound within the lookahead number of chunks to get
the difficulty of a single chunk. The ratio of this to ... | # LANGUAGE DuplicateRecordFields #
module Flight.Gap.Distance.Difficulty
( SumOfDifficulty(..)
, Chunking(..)
, Difficulty(..)
, gradeDifficulty
) where
import Data.Ratio ((%))
import Data.Maybe (catMaybes)
import Data.Ord(Down(Down))
import Data.List (sortOn, nub)
import qualified Data.Map.Strict... |
189c819184e06b0bbf9a1dcfd9df1eef9f865461e7622cecd76a4363d58e54ec | facebookarchive/pfff | foo.ml | open Foo
type tbar = int
let x = 1
let foo i =
i
| null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/tests/ml/parsing/foo.ml | ocaml | open Foo
type tbar = int
let x = 1
let foo i =
i
| |
79abbb3ec4b50004743bd15513a0cbea21c85c280d67b8b52c1f102884d0a57e | dstcruz/Write-Yourself-A-Scheme-In-48-Hours | exercise_1_1.hs | module Main where
import Control.Monad (liftM)
import System.Environment
import Text.ParserCombinators.Parsec hiding (spaces)
main :: IO ()
main = do
args <- getArgs
putStrLn (readExpr (args !! 0))
data LispVal = Atom String
| List [LispVal]
| DottedList [LispVal] LispVal
... | null | https://raw.githubusercontent.com/dstcruz/Write-Yourself-A-Scheme-In-48-Hours/19765a03fb01d788066259d115c7798518224ad9/ch02/parsing/exercise_1_1.hs | haskell | module Main where
import Control.Monad (liftM)
import System.Environment
import Text.ParserCombinators.Parsec hiding (spaces)
main :: IO ()
main = do
args <- getArgs
putStrLn (readExpr (args !! 0))
data LispVal = Atom String
| List [LispVal]
| DottedList [LispVal] LispVal
... | |
dd5f4c9104d54bb40860218b1478a8fcd0875e51fef69fee5cefce04bb60307d | carl-eastlund/dracula | doublecheck.rkt | #lang racket
(require
racket/require
(path-up "self/require.rkt")
"../lang/defun.rkt"
"../lang/do-check.rkt"
racket/gui/dynamic
racket/stxparam
(cce-in function)
(prefix-in r: (fasttest-in random))
(fasttest-in rackunit)
rackunit
(for-syntax
syntax/stx
racket/stxparam-exptime
(cce-in ... | null | https://raw.githubusercontent.com/carl-eastlund/dracula/a937f4b40463779246e3544e4021c53744a33847/teachpacks/doublecheck.rkt | racket |
RANDOM GENERATOR FUNCTIONS
DEFPROPERTY and CHECK-PROPERTIES
Mutable variable holding thunks generated but not run so far.
Each thunk constructs a test suite for a doublecheck property.
Subsets of the options:
Error:
SIGNATURE AND UNIT
Random macros
Random primitive types
Random custom atoms... | #lang racket
(require
racket/require
(path-up "self/require.rkt")
"../lang/defun.rkt"
"../lang/do-check.rkt"
racket/gui/dynamic
racket/stxparam
(cce-in function)
(prefix-in r: (fasttest-in random))
(fasttest-in rackunit)
rackunit
(for-syntax
syntax/stx
racket/stxparam-exptime
(cce-in ... |
a11c9fa6d8ef7f9c3f164aafc9add21eb10606f800a9e37917e6719d2a28d427 | lemmaandrew/CodingBatHaskell | nTwice.hs | From
Given a string and an int n , return a string made of the first and last n chars from
the string . The string length will be at least n.
Given a string and an int n, return a string made of the first and last n chars from
the string. The string length will be at least n.
-}
import Test.Hspec ( hspec, des... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/String-1/nTwice.hs | haskell | From
Given a string and an int n , return a string made of the first and last n chars from
the string . The string length will be at least n.
Given a string and an int n, return a string made of the first and last n chars from
the string. The string length will be at least n.
-}
import Test.Hspec ( hspec, des... | |
96ea6d074f9bd23206032fc69670d0abf07c0276749062efa428ce5af4202a30 | rescript-lang/rescript-compiler | js_of_lam_tuple.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
* Copyright ( C ) 2017 - , Authors of ReScript
* 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... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/e60482c6f6a69994907b9bd56e58ce87052e3659/jscomp/core/js_of_lam_tuple.ml | ocaml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
* Copyright ( C ) 2017 - , Authors of ReScript
* 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... | |
4c575918445fd7864365ba65339ca91d0a904fd02a7a60d986ea8d4d97d57d7d | alanzplus/EOPL | 3.7-test.rkt | #lang eopl
(require rackunit "let-interpreter.rkt")
(require rackunit/text-ui)
(define let-test
(test-suite
"Tests for let"
(check-equal?
(run "+(3, +(1,4))")
(num-val 8))
(check-equal?
(run "*(3, *(1,4))")
(num-val 12))
(check-equal?
(run "/(3,4)")
(num-val 0))
... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch3/3.7-test.rkt | racket | #lang eopl
(require rackunit "let-interpreter.rkt")
(require rackunit/text-ui)
(define let-test
(test-suite
"Tests for let"
(check-equal?
(run "+(3, +(1,4))")
(num-val 8))
(check-equal?
(run "*(3, *(1,4))")
(num-val 12))
(check-equal?
(run "/(3,4)")
(num-val 0))
... | |
3b8081ee29e4784f6fc4ffe25bedc309d6ef15c62e7f6572c164b93710026a2d | neovimhaskell/nvim-hs | Classes.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
|
Module : Neovim . RPC.Classes
Description : Data types and classes for the RPC components
Copyright : ( c )
License : Apache-2.0
Maintainer :
Stability... | null | https://raw.githubusercontent.com/neovimhaskell/nvim-hs/9d0a040c24f060da57e47e1b720b99ad32e6dfc7/src/Neovim/RPC/Classes.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
| See -rpc/msgpack-rpc/blob/master/spec.md for
details about the msgpack rpc specification.
| Request in the sense of the msgpack rpc specification
Parameters
* Message identifier that has to be put in the response to this request
* Function name
*... | # LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
|
Module : Neovim . RPC.Classes
Description : Data types and classes for the RPC components
Copyright : ( c )
License : Apache-2.0
Maintainer :
Stability : experimental
Portability : GHC
Import this module qualif... |
17b0bc9932be34770dd36dbdb22a0a47727d04b0f5c45707ed218bb4e9c13aa8 | argp/bap | smtexec.mli | *
Interface for executing command line driven SMT solvers .
XXX : This module is designed for Unix systems and is not
portable .
@author ejs
Interface for executing command line driven SMT solvers.
XXX: This module is designed for Unix systems and is not
portable.
@author ejs
*)
t... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/smtexec.mli | ocaml | * The result of solving a formula.
* The formula was valid or unsatisfiable.
* The formula was invalid or satisfiable.
* The solver failed. Possible reasons for this include the formula having invalid syntax and the solver running out of memory.
* The solver took too long to solve the formula.
* Convert a result ... | *
Interface for executing command line driven SMT solvers .
XXX : This module is designed for Unix systems and is not
portable .
@author ejs
Interface for executing command line driven SMT solvers.
XXX: This module is designed for Unix systems and is not
portable.
@author ejs
*)
t... |
5492e03a1322662dd433f06edceb6d716d100caf8beb708e63e486b727f3daf2 | wangzhe3224/cs3110 | main.ml | open Ast
(** [parse s] parses [s] into an AST. *)
let parse (s : string) : expr =
let lexbuf = Lexing.from_string s in
let ast = Parser.prog Lexer.read lexbuf in
ast
(** [is_value e] is whether [e] is a value. *)
let is_value : expr -> bool = function
| Fun _ -> true
| Var _ | App _ -> false
module VarSet ... | null | https://raw.githubusercontent.com/wangzhe3224/cs3110/33c1b9662ee5ba4bd13d7ec5a116b539bf086605/lambda-subst/lambda/main.ml | ocaml | * [parse s] parses [s] into an AST.
* [is_value e] is whether [e] is a value.
* [fv e] is a set-like list of the free variables of [e].
* [replace e y x] is [e] with the name [x] replaced
by the name [y] anywhere it occurs.
* [subst e v x] is [e] with [v] substituted for [x], that
is, [e{v/x}].
* [eval e] ... | open Ast
let parse (s : string) : expr =
let lexbuf = Lexing.from_string s in
let ast = Parser.prog Lexer.read lexbuf in
ast
let is_value : expr -> bool = function
| Fun _ -> true
| Var _ | App _ -> false
module VarSet = Set.Make(String)
let singleton = VarSet.singleton
let union = VarSet.union
let diff = ... |
c05555e77462868e90b2cf8049805bbe256c9e76d44e1b25eb70379f017e9fc2 | Kappa-Dev/KappaTools | kappa_printer.ml | (******************************************************************************)
(* _ __ * The Kappa Language *)
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
(* | ' / ********************************************************************... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/term/kappa_printer.ml | ocaml | ****************************************************************************
_ __ * The Kappa Language
| ' / ********************************************************************
| . \ * This file is distributed under the terms of the
|_|\_\ * GN... | | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
let cc_mix ~noCounters ?env f mix =
let domain = match env with
| None -> None
| Some e -> Some (Model.domain e) in
match mix with
| [] -> Format.fprintf f "0"
| _ ->
Pp.list
(fun f -> Format.fprintf f " +@ ")
... |
cdef613546739fb138da877b713ab091d83a20f35dd908318304f31c6db6f422 | gedge-platform/gedge-platform | prometheus_metric_spec.erl | %% @hidden
-module(prometheus_metric_spec).
-export([get_value/2,
get_value/3,
fetch_value/2,
registry/1,
name/1,
labels/1,
help/1,
constant_labels/1,
duration_unit/1,
extract_common_params/1]).
-ifdef(TEST).
-export([validate_metric_nam... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/prometheus/src/prometheus_metric_spec.erl | erlang | @hidden
====================================================================
Types
====================================================================
====================================================================
Public API
====================================================================
================... | -module(prometheus_metric_spec).
-export([get_value/2,
get_value/3,
fetch_value/2,
registry/1,
name/1,
labels/1,
help/1,
constant_labels/1,
duration_unit/1,
extract_common_params/1]).
-ifdef(TEST).
-export([validate_metric_name/1,
... |
638b098c3bd4bcdbbb040d1f18bf51ffe1d8c906a85144b2b7319dcfaee82eab | zcaudate/hara | inheritance.clj | (ns hara.core.base.inheritance
(:require [clojure.set :as set])
(:refer-clojure :exclude [ancestors]))
(defn ancestor-list
"Lists the direct ancestors of a class
(ancestor-list clojure.lang.PersistentHashMap)
=> [clojure.lang.PersistentHashMap
clojure.lang.APersistentMap
clojure.lang.AFn
... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/core/base/inheritance.clj | clojure | (ns hara.core.base.inheritance
(:require [clojure.set :as set])
(:refer-clojure :exclude [ancestors]))
(defn ancestor-list
"Lists the direct ancestors of a class
(ancestor-list clojure.lang.PersistentHashMap)
=> [clojure.lang.PersistentHashMap
clojure.lang.APersistentMap
clojure.lang.AFn
... | |
2efbefba82320c52512d17873dd24e5167315745c5cc140988d82a18d1880ab8 | typedclojure/typedclojure | doc.clj | Copyright ( c ) , contributors .
;; 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 epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/e6f9233818763bf610a379dc7393c9b04fcbb9e5/typed/clj.checker/src/typed/cljc/doc.clj | clojure | 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 epl-v10.html 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 ... | Copyright ( c ) , contributors .
(ns typed.cljc.doc
(:require [clojure.core.typed.current-impl :as impl]
[clojure.pprint :as pp]
[clojure.core.typed.coerce-utils :as coerce]
[clojure.string :as str]
[typed.clojure :as-alias t]
[typed.cljc.runtime... |
a65e2792041e90767f7a0300e8ff413721879f4588bd55fb33e1f10715c9cc3e | pallix/lacij | graph.clj | Copyright © 2010 - 2013 Fraunhofer Gesellschaft
Licensed under the EPL V.1.0
(ns lacij.edit.graph
(:use [lacij.view.graphview :only [view-graph]]
[lacij.model.history :only [add-state]]
[lacij.view.nodeview :only [create-nodeview]]
[lacij.view.straightedgeview :only [create-straight-edgev... | null | https://raw.githubusercontent.com/pallix/lacij/ee9b7dcda13f25f7460acb5995b7970a7564c11e/src/lacij/edit/graph.clj | clojure | set initial state: | Copyright © 2010 - 2013 Fraunhofer Gesellschaft
Licensed under the EPL V.1.0
(ns lacij.edit.graph
(:use [lacij.view.graphview :only [view-graph]]
[lacij.model.history :only [add-state]]
[lacij.view.nodeview :only [create-nodeview]]
[lacij.view.straightedgeview :only [create-straight-edgev... |
f669a3d7c835fb2a1313401317268c2283a7d6429e20e237acbf7c3fc5f85e98 | nextjournal/advent-of-clerk | day_10.clj | # 🎄 Advent of Clerk : Day 10
(ns advent-of-clerk.day-10
(:require [nextjournal.clerk :as clerk])) | null | https://raw.githubusercontent.com/nextjournal/advent-of-clerk/9f358c9f13995f591981a26fc3683dea574933b1/src/advent_of_clerk/day_10.clj | clojure | # 🎄 Advent of Clerk : Day 10
(ns advent-of-clerk.day-10
(:require [nextjournal.clerk :as clerk])) | |
3c7294d9fc1b0f957c13d5a99be0ecf0d32f3ca3404c8411c51c9107b56f2caf | swaywm/cl-wlroots | xcursor-manager.lisp | (in-package #:wlr/types/xcursor-manager)
(export '(xcursor-manager
xcursor-manager-create
xcursor-manager-destroy
xcursor-manager-get-xcursor
xcursor-manager-load
xcursor-manager-set-cursor-image
xcursor-manager-theme))
(defcfun "wlr_xcursor_manager_create" (:pointer (:struct xcursor-manager))
(na... | null | https://raw.githubusercontent.com/swaywm/cl-wlroots/f8a33979e45086ecd5c7deefd5ee067b941e0998/wlr/types/xcursor-manager.lisp | lisp | (in-package #:wlr/types/xcursor-manager)
(export '(xcursor-manager
xcursor-manager-create
xcursor-manager-destroy
xcursor-manager-get-xcursor
xcursor-manager-load
xcursor-manager-set-cursor-image
xcursor-manager-theme))
(defcfun "wlr_xcursor_manager_create" (:pointer (:struct xcursor-manager))
(na... | |
6cbd13d8d57f037492bb33246aaa9402441bde0105109b94cf3c9976e7bc00ba | headwinds/reagent-reframe-material-ui | demo-text-field.cljs | (ns example.demos.demo-text-field
(:require [reagent.core :as r]
["material-ui" :as mui]
["material-ui-icons" :as mui-icons]
[reagent.impl.template :as rtpl])
)
TextField cursor fix :
(defonce text-jedi-state (r/atom "Wage peace."))
(defonce text-sith-state (r/atom "Anger... | null | https://raw.githubusercontent.com/headwinds/reagent-reframe-material-ui/8a6fba82a026cfedca38491becac85751be9a9d4/src/example/demos/demo-text-field.cljs | clojure | To fix cursor jumping when controlled input value is changed,
Create-element + convert-props-value is the same as what adapt-react-class does.
Select doesn't require cursor fix so default can be used.
Same as previous, alternative to adapt-react-class | (ns example.demos.demo-text-field
(:require [reagent.core :as r]
["material-ui" :as mui]
["material-ui-icons" :as mui-icons]
[reagent.impl.template :as rtpl])
)
TextField cursor fix :
(defonce text-jedi-state (r/atom "Wage peace."))
(defonce text-sith-state (r/atom "Anger... |
01e0cedb63326c7167b63f4c24e43087e9208481d56b9225ef98d69ba6c4a2d1 | tbsklg/advent-of-code-2022 | Day12.hs | module Day12 where
import Data.List (elemIndex, elemIndices, nub, sort)
import qualified Data.Map as M
import Data.Maybe (catMaybes, fromJust)
import qualified Data.Set as S
type Location = (Int, Int)
type Grid = [String]
data BFS = BFS
{ queue :: [Location],
visited :: S.Set Location,
parents :: M.Map Lo... | null | https://raw.githubusercontent.com/tbsklg/advent-of-code-2022/d62ac6ceb3910c572f09b5163b2ab9e5c09d7b91/src/Day12.hs | haskell | module Day12 where
import Data.List (elemIndex, elemIndices, nub, sort)
import qualified Data.Map as M
import Data.Maybe (catMaybes, fromJust)
import qualified Data.Set as S
type Location = (Int, Int)
type Grid = [String]
data BFS = BFS
{ queue :: [Location],
visited :: S.Set Location,
parents :: M.Map Lo... | |
0aeda6252e87a149f063b805f8b824a579a9a7d3205a64a64d13cfc2e9e3a2b2 | nyu-acsys/drift | churchNum03.ml |
let rec bot _ = bot ()
let fail _ = assert false
let rec c12_COEFFICIENT_1238 = 0
let rec c11_COEFFICIENT_1237 = 0
let rec c10_COEFFICIENT_1236 = 0
let rec c9_COEFFICIENT_1235 = 0
let rec c8_COEFFICIENT_1221 = 0
let rec c7_COEFFICIENT_1220 = 0
let rec c6_COEFFICIENT_1219 = 0
let rec c5_COEFFIC... | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/termination/churchNum03.ml | ocaml |
let rec bot _ = bot ()
let fail _ = assert false
let rec c12_COEFFICIENT_1238 = 0
let rec c11_COEFFICIENT_1237 = 0
let rec c10_COEFFICIENT_1236 = 0
let rec c9_COEFFICIENT_1235 = 0
let rec c8_COEFFICIENT_1221 = 0
let rec c7_COEFFICIENT_1220 = 0
let rec c6_COEFFICIENT_1219 = 0
let rec c5_COEFFIC... | |
a331227e3888d055486c555fa109c6e7801ba73a4287b9f6ef43cb62ac8dce5e | struktured/ocaml-gemini | gemini.ml | open Common
module Auth = Auth
module Cfg = Cfg
module Nonce = Nonce
module Rest = Rest
module Result = Json.Result
module Inf_pipe = Inf_pipe
module V1 = struct
let path = ["v1"]
module Side = Side
module Exchange = Exchange
module Timestamp = Timestamp
module Market_data = Market_data
module Order_event... | null | https://raw.githubusercontent.com/struktured/ocaml-gemini/8dc095edcdc02c3090f7fd9da8cc940ecded32d6/lib/gemini.ml | ocaml | open Common
module Auth = Auth
module Cfg = Cfg
module Nonce = Nonce
module Rest = Rest
module Result = Json.Result
module Inf_pipe = Inf_pipe
module V1 = struct
let path = ["v1"]
module Side = Side
module Exchange = Exchange
module Timestamp = Timestamp
module Market_data = Market_data
module Order_event... | |
a914c3bdc49d226e2df47874a26f0a33894c0d9428176977c799fa0599f46810 | cl-fui/subtext | frame.lisp | ;;; ----------------------------------------------------------------------------
;; Frame
;;
;; contains an echobar at the bottom, and content on top.
;;
;; key processing:
;;
All keys are sent to minibuf ( which may send them back up )
;;; ----------------------------------------------------------------------------
... | null | https://raw.githubusercontent.com/cl-fui/subtext/28cfc31007664552257bd4d04370f7365030ab2e/src/gtk/frame.lisp | lisp | ----------------------------------------------------------------------------
Frame
contains an echobar at the bottom, and content on top.
key processing:
----------------------------------------------------------------------------
return nil to keep processing | All keys are sent to minibuf ( which may send them back up )
(in-package #:subtext)
(defgeneric -pre-initial-display (target frame))
(defparameter *frame* nil)
(defparameter *echo* *standard-output*)
(defclass frame (gtk-window)
((holder :accessor holder :initform (make-instance 'gtk-box :orientation :vertical... |
fb1004e3515dc409261ecdf2a6c9485d5956a913173e1901c7a1fad0bf93df30 | helium/blockchain-core | blockchain_ledger_exporter_v1.erl | %%%-------------------------------------------------------------------
%% @doc
%% == Blockchain Ledger Exporter ==
%% @end
%%%-------------------------------------------------------------------
-module(blockchain_ledger_exporter_v1).
-export([
export/1
]).
-spec export(blockchain_ledger_v1:ledger()) -> any().
exp... | null | https://raw.githubusercontent.com/helium/blockchain-core/9011de7537ecfd737074b85b7b16e7d8e1ceef00/src/ledger/v1/blockchain_ledger_exporter_v1.erl | erlang | -------------------------------------------------------------------
@doc
== Blockchain Ledger Exporter ==
@end
------------------------------------------------------------------- | -module(blockchain_ledger_exporter_v1).
-export([
export/1
]).
-spec export(blockchain_ledger_v1:ledger()) -> any().
export(Ledger) ->
[
{securities, export_securities(Ledger)},
{accounts, export_accounts(Ledger)},
{gateways, export_gateways(Ledger)},
{chain_vars, export_chain_... |
1cf8bce05626d86a77b47a5e4a7ef107c7077e2f2d00a852101dcd1edcfb31ad | cedlemo/OCaml-GI-ctypes-bindings-generator | Tree_selection.mli | open Ctypes
type t
val t_typ : t typ
val count_selected_rows :
t -> int32
val get_mode :
t -> Selection_mode.t
(*Not implemented gtk_tree_selection_get_selected type interface not implemented*)
(*Not implemented gtk_tree_selection_get_selected_rows type interface not implemented*)
val get_tree_view :
t -> Tree_... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Tree_selection.mli | ocaml | Not implemented gtk_tree_selection_get_selected type interface not implemented
Not implemented gtk_tree_selection_get_selected_rows type interface not implemented
Not implemented gtk_tree_selection_set_select_function type callback not implemented | open Ctypes
type t
val t_typ : t typ
val count_selected_rows :
t -> int32
val get_mode :
t -> Selection_mode.t
val get_tree_view :
t -> Tree_view.t ptr
val iter_is_selected :
t -> Tree_iter.t structure ptr -> bool
val path_is_selected :
t -> Tree_path.t structure ptr -> bool
val select_all :
t -> unit
val... |
84b5be84b7bad422e1c0328c8450b53d0bba8b21b1657f5d92d81d78d7e683a3 | gergoerdi/metafun | Instantiate.hs | # LANGUAGE FlexibleContexts #
module Language.Kiff.Typing.Instantiate (instantiate) where
import Language.Kiff.Syntax
import Language.Kiff.Typing.State
import qualified Data.Map as Map
import Control.Monad.State
type TvMap = Map.Map Tv Tv
type Instantiate = StateT TvMap Typing
getTv :: Tv -> Inst... | null | https://raw.githubusercontent.com/gergoerdi/metafun/b279ebfa90cd177ff276f98d42fbbccfcca33374/src/Language/Kiff/Typing/Instantiate.hs | haskell | # LANGUAGE FlexibleContexts #
module Language.Kiff.Typing.Instantiate (instantiate) where
import Language.Kiff.Syntax
import Language.Kiff.Typing.State
import qualified Data.Map as Map
import Control.Monad.State
type TvMap = Map.Map Tv Tv
type Instantiate = StateT TvMap Typing
getTv :: Tv -> Inst... | |
a2e70262ca8cab7826a7e2825fabf2b3eeff3361e62818ff6561acf97425422f | yetibot/yetibot | giphy.clj | (ns yetibot.commands.giphy
(:require
[taoensso.timbre :refer [info warn error]]
[clojure.string :refer [split join trim]]
[yetibot.core.hooks :refer [cmd-hook]]
[yetibot.api.giphy :as api]))
(defn report-if-error [response success-fn]
(let [{:keys [meta data]} response]
(if (= (:status meta) 20... | null | https://raw.githubusercontent.com/yetibot/yetibot/2fb5c1182b1a53ab0e433d6bab2775ebd43367de/src/yetibot/commands/giphy.clj | clojure | error | (ns yetibot.commands.giphy
(:require
[taoensso.timbre :refer [info warn error]]
[clojure.string :refer [split join trim]]
[yetibot.core.hooks :refer [cmd-hook]]
[yetibot.api.giphy :as api]))
(defn report-if-error [response success-fn]
(let [{:keys [meta data]} response]
(if (= (:status meta) 20... |
261c02b8e899592fd006ab88d8210395ac2ac0c5acbcb197fd8941a9fbc6c8fc | haslab/HAAP | BotHugo186.hs | # LANGUAGE ScopedTypeVariables , ViewPatterns #
module BotHugo186 where
import OracleT1 hiding (roda)
import OracleT2
import OracleT3
import OracleT4
import LI11718
import Safe
import Data.Maybe
import Control.Monad
import Data.Fixed
import Data.List
import Data.Map (Map(..))
import qualified Data.Map as Map
--i... | null | https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/examples/plab/svn/2017li1g186/src/BotHugo186.hs | haskell | import Debug.Trace
factores
^ identificador do jogador dentro do estado
else tuning
trace ("aumenta" ++show angA ++ " " ++ show dir' ++ "\n" ++ show vel ++ " " ++ show aceleraV ++ "\n" ++ show (fwd quieto) ++ "\n" ++ show ([aceleraV,travaV]))
acoes2 = [(turbina p,turbinaV),(id,(0,0))]
| morte1 == morte2 = c... | # LANGUAGE ScopedTypeVariables , ViewPatterns #
module BotHugo186 where
import OracleT1 hiding (roda)
import OracleT2
import OracleT3
import OracleT4
import LI11718
import Safe
import Data.Maybe
import Control.Monad
import Data.Fixed
import Data.List
import Data.Map (Map(..))
import qualified Data.Map as Map
... |
3357cad4a23b3b0950feb3fc39d169a9b47bd0b6477cf96ae6e975964b48c579 | fukamachi/sxql | operator.lisp | (in-package :cl-user)
(defpackage sxql.operator
(:use :cl
:sxql.sql-type)
(:import-from :sxql.sql-type
:sql-statement-p
:conjunctive-op-expressions
:sql-all-type))
(in-package :sxql.operator)
(cl-package-locks:lock-package :sxql.operator)
(cl-syntax:use-synta... | null | https://raw.githubusercontent.com/fukamachi/sxql/cc3478cacb0557475a59cf619dad66c5dc8080ba/src/operator.lisp | lisp | Only downcase all caps | (in-package :cl-user)
(defpackage sxql.operator
(:use :cl
:sxql.sql-type)
(:import-from :sxql.sql-type
:sql-statement-p
:conjunctive-op-expressions
:sql-all-type))
(in-package :sxql.operator)
(cl-package-locks:lock-package :sxql.operator)
(cl-syntax:use-synta... |
95b4fe190629aa3dd8ed0c5f3ede4a652053614d530d693e27a2beeaf455f8c8 | fujita-y/digamma | 38.scm | #!nobacktrace
(define-library (srfi 38)
(import (core))
(export write-with-shared-structure
read-with-shared-structure
(rename (write-with-shared-structure write/ss)
(read-with-shared-structure read/ss))))
| null | https://raw.githubusercontent.com/fujita-y/digamma/31f1512de2d406448ba3a9c8c352c56f30eb99e4/sitelib/srfi/38.scm | scheme | #!nobacktrace
(define-library (srfi 38)
(import (core))
(export write-with-shared-structure
read-with-shared-structure
(rename (write-with-shared-structure write/ss)
(read-with-shared-structure read/ss))))
| |
68b95775f112aeb11e4fd453abd309d453a27efb9883f08a250822a72cdc05f0 | mihaimaruseac/hindent | Markdone.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
| A subset of markdown that only supports @#headings@ and code
-- fences.
--
-- All content must be in section headings with proper hierarchy,
-- anything else is rejected.
module HIndent.Interna... | null | https://raw.githubusercontent.com/mihaimaruseac/hindent/488b70c9c2eb79efd8719389bf37b0faa76d0b9e/internal/HIndent/Internal/Test/Markdone.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
fences.
All content must be in section headings with proper hierarchy,
anything else is rejected.
| A markdone token.
| A markdone document.
| Parse error.
| Parse into a forest. | # LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
| A subset of markdown that only supports @#headings@ and code
module HIndent.Internal.Test.Markdone
( Token(..)
, Markdone(..)
, tokenize
, parse
) where
import Control.DeepSeq
import Control.Monad.Catch
import Control.Monad.State.Strict (State, evalStat... |
1e002dd9741a6d5be3d000ce3bd86ea2081b56382b748dab9668f31a2a676701 | static-analysis-engineering/codehawk | xconsequenceTest.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Unit Testing Framework
Author : Adapted from : ( )
------------------------------------------------------------------------------
... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/c1b3158e0d73cda7cfc10d75f6173f4297991a82/CodeHawk/CHT/CH_tests/xprlib_tests/txxprlib/xconsequenceTest.mli | ocaml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Unit Testing Framework
Author : Adapted from : ( )
------------------------------------------------------------------------------
... | |
0ffd68b33a59a0201ad0983c0adbd6093fdd4fbf44e6665b7279625f6df74268 | the-real-blackh/sodium-2d-game-engine | CleanMouse.hs | module FRP.Sodium.GameEngine2D.CleanMouse where
import FRP.Sodium
import FRP.Sodium.GameEngine2D.Platform
import Data.Set (Set)
import qualified Data.Set as S
| On some browsers we get dirty events . If we get two MouseDown events in a row ,
then we throw out the second one .
cleanMouse :: Platform p =>
... | null | https://raw.githubusercontent.com/the-real-blackh/sodium-2d-game-engine/fb765eb50d39f0297274c2d24cd71dcec2dc2c2a/FRP/Sodium/GameEngine2D/CleanMouse.hs | haskell | Suppress MouseDown if this touch is already down. | module FRP.Sodium.GameEngine2D.CleanMouse where
import FRP.Sodium
import FRP.Sodium.GameEngine2D.Platform
import Data.Set (Set)
import qualified Data.Set as S
| On some browsers we get dirty events . If we get two MouseDown events in a row ,
then we throw out the second one .
cleanMouse :: Platform p =>
... |
6482678a6954901b7f50ad2a64d299c18e2fa6a06252a42c95694672d8210a00 | gregnwosu/haskellbook | WordNumber.hs | module WordNumber where
import Data.List
digitToWord :: Int -> String
digitToWord 0 = "zero"
digitToWord 1 = "one"
digitToWord 2 = "two"
digitToWord 3 = "three"
digitToWord 4 = "four"
digitToWord 5 = "five"
digitToWord 6 = "six"
digitToWord 7 = "seven"
digitToWord 8 = "eight"
digitToWord 9 = "nine"
digits :: Int ->... | null | https://raw.githubusercontent.com/gregnwosu/haskellbook/b21fb6772e58f07cff334d9c551d0477ec856897/chapter14/testing/WordNumber.hs | haskell | module WordNumber where
import Data.List
digitToWord :: Int -> String
digitToWord 0 = "zero"
digitToWord 1 = "one"
digitToWord 2 = "two"
digitToWord 3 = "three"
digitToWord 4 = "four"
digitToWord 5 = "five"
digitToWord 6 = "six"
digitToWord 7 = "seven"
digitToWord 8 = "eight"
digitToWord 9 = "nine"
digits :: Int ->... | |
230dbc80255a32b8b98e8d6db68759156eb31d9c12cd7fc1af885fcf5edcdcae | Frama-C/Frama-C-snapshot | Strategy.ml | (**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/Strategy.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Software
Foundation ,... |
491591e103d0cd1303730611c630b47b92b5a615127030668f250923dd6c78a9 | tud-fop/vanda-haskell | Range.hs | -----------------------------------------------------------------------------
-- |
-- Module : LimitedQueue
Copyright : ( c ) 2017
-- License : BSD-style
--
-- Maintainer :
-- Stability : unknown
-- Portability : portable
--
-- This module contains ranges and range vectors to represent subseq... | null | https://raw.githubusercontent.com/tud-fop/vanda-haskell/3214966361b6dbf178155950c94423eee7f9453e/library/Data/Range.hs | haskell | ---------------------------------------------------------------------------
|
Module : LimitedQueue
License : BSD-style
Maintainer :
Stability : unknown
Portability : portable
This module contains ranges and range vectors to represent subsequences as
a range of indices.
---------------------... | Copyright : ( c ) 2017
module Data.Range
Range(Epsilon)
, RvMem
, Rangevector
, singletons
, entire
, safeConc
, isNonOverlapping
, singleton
, fromList
, (!)
, vectorLength
, withCapacity
, (//)
, intoRangevector
, subsetEq
) where
import qualified Data.Vector.Unboxed as V... |
f20273143bdaba3a00609470d15fd2fd9d06848b87d058195c04131ef7d52e32 | uim/uim | anthy-utf8.scm | ;;; anthy.scm: Anthy (UTF-8) for uim.
;;; charset: UTF-8
;;;
Copyright ( c ) 2003 - 2013 uim Project
;;;
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
1 . Redistributions of sou... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/anthy-utf8.scm | scheme | anthy.scm: Anthy (UTF-8) for uim.
charset: UTF-8
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditi... | Copyright ( c ) 2003 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR... |
cf19c8703837c253827b8d39973f716af8beafd1d1097ced7e0ba0adea5fdd32 | project-oak/hafnium-verification | JavaProfilerSamples.mli |
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/test_determinator/JavaProfilerSamples.mli | ocaml |
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
9a806a84fa36c13f20239b84373e55b13b819330e5318809395807c6fadae6a7 | louisabraham/domical | jsooTop.ml | Js_of_ocaml library
* /
* Copyright ( C ) 2014 Hugo Heuzard
*
* 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 , with linking exception ;
* either version 2.1 of the... | null | https://raw.githubusercontent.com/louisabraham/domical/9293b7f7a1dd405561a3f2e0bd168a2b49eed708/toplevel/lib/jsooTop.ml | ocaml | XXX HACK!
Format.eprintf "execute callback for %s@." name; | Js_of_ocaml library
* /
* Copyright ( C ) 2014 Hugo Heuzard
*
* 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 , with linking exception ;
* either version 2.1 of the... |
673fdfeda79fceffd36e853cd5d20ed169c6819f35ecd2046a4751fbcd1e2ded | charlieg/Sparser | names1.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1993,1994,1995 -- all rights reserved
;;;
;;; File: "names"
Module : " : people : "
version : 1.4 December 1995
initiated 6/8/93 v2.3 , added indexes 6/15 .
1.1 ( 1/7/94 ) Beginning to simplify the indexing . Tweek... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/core/people/names1.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "names"
(3/4) a little work on versions
--------
object
--------
specialize the name ??
(standard-prefix . person-prefix)
(version . person-version)))
------------
operations
------------
--- make
Called from Categorize-and-form-name.... | copyright ( c ) 1993,1994,1995 -- all rights reserved
Module : " : people : "
version : 1.4 December 1995
initiated 6/8/93 v2.3 , added indexes 6/15 .
1.1 ( 1/7/94 ) Beginning to simplify the indexing . Tweeked that 10/3 .
( 2/24/95 ) moved in the name maker from [ names : fsa : examine ... |
51334ab1ee5a09e480cdb1d8eea74d65a6dc6ca798ee74641aa3ccc58535bcb2 | racket/racket7 | multi-top-data.rkt | #lang racket/base
(require "compiled-in-memory.rkt"
"serialize.rkt"
"header.rkt"
"eager-instance.rkt"
"reserved-symbol.rkt"
"../host/linklet.rkt")
(provide build-shared-data-linklet)
;; When multiple top-level forms are compiled separately (e.g., for a
;; `begin` sequence)... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/compile/multi-top-data.rkt | racket | When multiple top-level forms are compiled separately (e.g., for a
`begin` sequence), then each has its own serialization of syntax
objects and module path indxes, but we want that information to be
shared acrosss forms that are compiled together. So, re-serialize
the data here in a way that can be shared across t... | #lang racket/base
(require "compiled-in-memory.rkt"
"serialize.rkt"
"header.rkt"
"eager-instance.rkt"
"reserved-symbol.rkt"
"../host/linklet.rkt")
(provide build-shared-data-linklet)
(define (build-shared-data-linklet cims ns)
(define mpis (make-module-path-index-table)... |
91a94ddb5196245973ff5cf11e808c85d4307848e4ca0c55a8ffbd4b6e41660b | tweag/gazelle_cabal | SLib.hs | {-# LANGUAGE OverloadedStrings #-}
module Sublibrary.SLib (dummyText) where
import Data.Text (Text)
dummyText :: Text
dummyText = "dummyText"
| null | https://raw.githubusercontent.com/tweag/gazelle_cabal/e1a975029b7c5aa228239a8c96fca2f774b08114/example/package-b/slib/Sublibrary/SLib.hs | haskell | # LANGUAGE OverloadedStrings # |
module Sublibrary.SLib (dummyText) where
import Data.Text (Text)
dummyText :: Text
dummyText = "dummyText"
|
9781cf3b7a78b2debbe37a7ed3bb5642123bad706f1a977b6da64c30cc5646b7 | scicloj/scicloj-data-science-handbook | 01_intro.clj | (ns scicloj.04-visualization.01-intro
(:require [notespace.api :as notespace]
[notespace.kinds :as kind]
[tablecloth.api :as tc]))
Notespace
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Listen for changes in the namespace and update notespace
;; automatically
;; Hidden kinds should not sho... | null | https://raw.githubusercontent.com/scicloj/scicloj-data-science-handbook/78df3d31e7d02ecf2e1ffc8f2e8125a625dd8162/src/scicloj/04_visualization/01_intro.clj | clojure |
Listen for changes in the namespace and update notespace
automatically
Hidden kinds should not show in the notespace page
Manually start an empty notespace
the notes and listens to file changes
Clear an existing notespace browser
Evaluating a whole notespace
techascent/tech.viz {:mvn/version "0.4.3"}... | (ns scicloj.04-visualization.01-intro
(:require [notespace.api :as notespace]
[notespace.kinds :as kind]
[tablecloth.api :as tc]))
Notespace
^kind/hidden
(comment
(notespace/init-with-browser)
(notespace/listen)
(notespace/init)
(notespace/eval-this-notespace)
(notespace/render-static-... |
e6c81ac71aa9f76c934f452bd804f4c5a043fd2bc59e059fe58472fd51964ca5 | nextjournal/clerk | errors.clj | # Viewer Errors 💣 💥
;; Different ways that viewers can blow up.
(ns errors
(:require [nextjournal.clerk :as clerk]))
An undefined symbol in a ` : render - fn ` will error on ` ->viewer - fn ` during read .
(clerk/with-viewer {:render-fn '(fn [x] boom)}
42)
;; If `->viewer-fn` succeeds, it can still blow up ... | null | https://raw.githubusercontent.com/nextjournal/clerk/94dfb96138cfc549c3e4c0948f6ebf71380a4676/notebooks/viewers/errors.clj | clojure | Different ways that viewers can blow up.
If `->viewer-fn` succeeds, it can still blow up at render time. | # Viewer Errors 💣 💥
(ns errors
(:require [nextjournal.clerk :as clerk]))
An undefined symbol in a ` : render - fn ` will error on ` ->viewer - fn ` during read .
(clerk/with-viewer {:render-fn '(fn [x] boom)}
42)
(clerk/with-viewer {:render-fn '(fn [x] (throw (ex-info "I blow up when called" {:some "data"})... |
b7b320b1f868c8fd8dde141c3174a8f3ec0a0e518fbfb4788b76ae04907031b6 | GaloisInc/HaLVM | Hello.hs | BANNERSTART
- Copyright 2006 - 2008 , Galois , Inc.
- This software is distributed under a standard , three - clause BSD license .
-- - Please see the file LICENSE, distributed with this software, for specific
-- - terms and conditions.
Author : < >
BANNEREND
import Hypervisor.Debug
main = writeDebugConso... | null | https://raw.githubusercontent.com/GaloisInc/HaLVM/3ec1d7e4b6bcb91304ba2bfe8ee280cb1699f24d/examples/Core/Hello/Hello.hs | haskell | - Please see the file LICENSE, distributed with this software, for specific
- terms and conditions. | BANNERSTART
- Copyright 2006 - 2008 , Galois , Inc.
- This software is distributed under a standard , three - clause BSD license .
Author : < >
BANNEREND
import Hypervisor.Debug
main = writeDebugConsole "Hello\n"
|
b2ea9824052ab7703e288184303045fc54801d39b0ae72459aa870aed4c3a286 | scicloj/tablecloth.time | datatypes.clj | (ns tablecloth.time.utils.datatypes
(:require [tech.v3.datatype :refer [elemwise-datatype]]
[tech.v3.datatype.datetime.packing :as datetime-packing]
[tech.v3.datatype.datetime.base :as datetime-base]
[clojure.set :refer [union]]))
(defn get-datatype
"Returns the datatype keyword... | null | https://raw.githubusercontent.com/scicloj/tablecloth.time/dcd2c49d81ed79c4c66ab4b5f38cc9ddc60e4615/src/tablecloth/time/utils/datatypes.clj | clojure | (ns tablecloth.time.utils.datatypes
(:require [tech.v3.datatype :refer [elemwise-datatype]]
[tech.v3.datatype.datetime.packing :as datetime-packing]
[tech.v3.datatype.datetime.base :as datetime-base]
[clojure.set :refer [union]]))
(defn get-datatype
"Returns the datatype keyword... | |
981a087d81d06b9589198eeb083391549b98195a7bc22e01d2492996b6d6534c | HumbleUI/HumbleUI | animation.clj | (ns examples.animation
(:require
[io.github.humbleui.ui :as ui]))
(def ui
(ui/center
(ui/row
(ui/column
(ui/animation "dev/images/animated.gif")
(ui/gap 0 10)
(ui/label "GIF"))
(ui/gap 10 0)
(ui/column
(ui/animation "dev/images/animated.webp")
(ui/g... | null | https://raw.githubusercontent.com/HumbleUI/HumbleUI/de398f39599ded25e2f3f69d45764a3dd057d2c6/dev/examples/animation.clj | clojure | (ns examples.animation
(:require
[io.github.humbleui.ui :as ui]))
(def ui
(ui/center
(ui/row
(ui/column
(ui/animation "dev/images/animated.gif")
(ui/gap 0 10)
(ui/label "GIF"))
(ui/gap 10 0)
(ui/column
(ui/animation "dev/images/animated.webp")
(ui/g... | |
386bf0cb6ec363ef4f3f83cf57fb70ee825dd5b154a078fd0a2eebd36f8bc086 | BinaryAnalysisPlatform/bap | bap_disasm_symtab.mli | open Bap_core_theory
open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Image_internal_std
module Disasm = Bap_disasm_driver
module Callgraph = Bap_disasm_calls
module Insn = Bap_disasm_insn
type block = Bap_disasm_block.t
type edge = Bap_disasm_block.edge
type cfg = Bap_disasm_rec.Cfg.t
type t [@@deriving c... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_disasm/bap_disasm_symtab.mli | ocaml | open Bap_core_theory
open Core_kernel[@@warning "-D"]
open Bap_types.Std
open Image_internal_std
module Disasm = Bap_disasm_driver
module Callgraph = Bap_disasm_calls
module Insn = Bap_disasm_insn
type block = Bap_disasm_block.t
type edge = Bap_disasm_block.edge
type cfg = Bap_disasm_rec.Cfg.t
type t [@@deriving c... | |
8b1df3f776f390f321ca60e2f898e26e20fcb80edeed379748f6c88531552679 | OctaviPascual/cis194-IntroductionToHaskell | JoinList.hs | # OPTIONS_GHC -Wall #
# LANGUAGE FlexibleInstances , TypeSynonymInstances #
module JoinList where
import Data.Monoid
import Buffer
import Sized
import Scrabble
import Editor
data JoinList m a = Empty
| Single m a
| Append m (JoinList m a) (JoinList m a)
deriving (Eq, Show)
-... | null | https://raw.githubusercontent.com/OctaviPascual/cis194-IntroductionToHaskell/771c9c72d10744dd6593a7478698de640106bb90/homework-07/JoinList.hs | haskell | ------------------------------ Exercise 1 ----------------------------------
------------------------------ Exercise 2 ----------------------------------
Get the Int value of a Sized tag
Safe list indexing function (provided)
------------------------------ Exercise 3 ----------------------------------
---------------... | # OPTIONS_GHC -Wall #
# LANGUAGE FlexibleInstances , TypeSynonymInstances #
module JoinList where
import Data.Monoid
import Buffer
import Sized
import Scrabble
import Editor
data JoinList m a = Empty
| Single m a
| Append m (JoinList m a) (JoinList m a)
deriving (Eq, Show)
... |
abebf87ea396668b5473407db3269a75646404d12bc65ce68373e7554bc519ed | SimonHauguel/Paso | Expr.hs | module Paso.Parser.AST.Expr where
import Data.List.NonEmpty
import Paso.Program.Types
data Expr
= If Expr (NonEmpty ToExpr)
| NumberI Integer
| NumberF Float
| Str String
| Let String Expr
| UIdentifier String
| Lambda String Expr
| FunctionCall Expr Expr
| Imperatif [Expr]
der... | null | https://raw.githubusercontent.com/SimonHauguel/Paso/6ee509749bf28b5823a7be946ce855eef13dc54d/src/Paso/Parser/AST/Expr.hs | haskell | NOTE : This is not an expression
It's a meta-value
^ _ pattern [Irrefutable]
^ a b .. <variable-name> pattern [Irrefutable]
^ TODO {TEMP TO STRING}
^ Like a Value constructor but not evaluate
^ When we get a recursive pattern
^ Patterns that can fail
^ Patterns that can not fail
^ "Map" representation
from a... | module Paso.Parser.AST.Expr where
import Data.List.NonEmpty
import Paso.Program.Types
data Expr
= If Expr (NonEmpty ToExpr)
| NumberI Integer
| NumberF Float
| Str String
| Let String Expr
| UIdentifier String
| Lambda String Expr
| FunctionCall Expr Expr
| Imperatif [Expr]
der... |
3b1e5879b5097450389cc63f58ca56802bac2e303cc284212e97967b6d89bda3 | coast-framework/coast | code.clj | (ns coast.generators.code
(:require [clojure.string :as string]
[clojure.java.io :as io]
[clojure.java.jdbc :as jdbc]
[clojure.set :as set]
[coast.db.connection :refer [connection spec]]
[coast.utils :as utils])
(:import (java.io File)))
(def pattern #"_... | null | https://raw.githubusercontent.com/coast-framework/coast/f31c74c7a875207a717a407e52c6449a53da2c69/src/coast/generators/code.clj | clojure | (ns coast.generators.code
(:require [clojure.string :as string]
[clojure.java.io :as io]
[clojure.java.jdbc :as jdbc]
[clojure.set :as set]
[coast.db.connection :refer [connection spec]]
[coast.utils :as utils])
(:import (java.io File)))
(def pattern #"_... | |
90ed8e1657b30b2c8a1e6e7161fb5aa83b206a8ac5171d12cecf17cadff4bb1e | soegaard/metapict | exercises-angles-in-right-triangle.rkt | #lang racket
(require metapict math/base racket/math)
;;;
;;; EXAMPLE: The file generates a random right-angled triangle.
;;;
(define (random-letters)
(def first-letter (string-ref "ads" (random 3)))
(def small-letters (for/list ([i 3]) (~a (integer->char (+ (char->integer first-letter) i)))))
(def large-letter... | null | https://raw.githubusercontent.com/soegaard/metapict/47ae265f73cbb92ff3e7bdd61e49f4af17597fdf/metapict/examples/exercises-angles-in-right-triangle.rkt | racket |
EXAMPLE: The file generates a random right-angled triangle.
return unit vector in the direction of v
Given points A, B and C in device coordinates,
return a curve (in device coordinates) for a right angle marker
Given points A,B, and, C in logical coordinates
and a size in device units, return a curve in logica... | #lang racket
(require metapict math/base racket/math)
(define (random-letters)
(def first-letter (string-ref "ads" (random 3)))
(def small-letters (for/list ([i 3]) (~a (integer->char (+ (char->integer first-letter) i)))))
(def large-letters (map string-upcase small-letters))
(values small-letters large-lette... |
62849af7300f687c8c51fc7a1299f8d67e1845ef8e931d12503e8520d75377b6 | rd--/hsc3 | nrt.02.hs | import Sound.Osc.Packet {- hosc3 -}
import Sound.Sc3 {- hsc3 -}
sy :: Synthdef
sy = synthdef "sin" (out 0 (sinOsc ar (control kr "freq" 440) 0 * 0.2))
b0,b1,b2,b3 :: Bundle
b0 = bundle 0.0 [g_new [(1, AddToTail, 0)], d_recv sy]
b1 = bundle 0.5 [s_new "sin" 1001 AddToHead 1 []]
b2 = bundle 3.0 [n_free [1001]]
b3 = bun... | null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Nrt/nrt.02.hs | haskell | hosc3
hsc3 |
sy :: Synthdef
sy = synthdef "sin" (out 0 (sinOsc ar (control kr "freq" 440) 0 * 0.2))
b0,b1,b2,b3 :: Bundle
b0 = bundle 0.0 [g_new [(1, AddToTail, 0)], d_recv sy]
b1 = bundle 0.5 [s_new "sin" 1001 AddToHead 1 []]
b2 = bundle 3.0 [n_free [1001]]
b3 = bundle 3.5 [nrt_end]
main :: IO ()
main = do
writeNrt "/tmp/nrt.... |
c6b18437d56f362efde6cf74483f33d848fed98781c134f351c858502d9eabc0 | dradtke/Lisp-Text-Editor | gtk.layout-containers.lisp | (in-package :gtk)
(defcfun (fixed-put "gtk_fixed_put") :void
(fixed g-object)
(widget g-object)
(x :int)
(y :int))
(export 'fixed-put)
(defcfun (fixed-move "gtk_fixed_move") :void
(fixed g-object)
(widget g-object)
(x :int)
(y :int))
(export 'fixed-move)
(defcfun (layout-put "gtk_layout_put") :void... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/cl-gtk2/gtk/gtk.layout-containers.lisp | lisp | (in-package :gtk)
(defcfun (fixed-put "gtk_fixed_put") :void
(fixed g-object)
(widget g-object)
(x :int)
(y :int))
(export 'fixed-put)
(defcfun (fixed-move "gtk_fixed_move") :void
(fixed g-object)
(widget g-object)
(x :int)
(y :int))
(export 'fixed-move)
(defcfun (layout-put "gtk_layout_put") :void... | |
16915811c7c44237acbdbe1d3575e69403bba2dca883eab8a41d132b02cc59df | lambdaclass/erlang-katana | ktn_maps.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% ktn_maps: functions useful for handling maps
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-module(ktn_maps).
-export([
get/2,
get/3
]).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%... | null | https://raw.githubusercontent.com/lambdaclass/erlang-katana/ebb6b1358c974b5e3b16f5e95422061385ae34ac/src/ktn_maps.erl | erlang |
ktn_maps: functions useful for handling maps
Public API
| -module(ktn_maps).
-export([
get/2,
get/3
]).
-spec get(term(), map()) -> term().
get(Keys, Map) ->
get(Keys, Map, undefined, error).
-spec get(term(), map(), term()) -> term().
get(Keys, Map, Default) ->
get(Keys, Map, Default, default).
@private
-spec get(term(), map(), term()... |
7cd71082afb7c13efcb4a38cd77ee5d594b99c7cddea91e770e5bd3f2bb9bf40 | unisonweb/unison | OpenCodebaseError.hs | {-# LANGUAGE DeriveAnyClass #-}
-- | Open codebase error type.
module Unison.Codebase.Init.OpenCodebaseError
( OpenCodebaseError (..),
)
where
import U.Codebase.Sqlite.DbId (SchemaVersion)
import Unison.Prelude
-- | An error that can occur when attempting to open a codebase.
data OpenCodebaseError
= -- | The c... | null | https://raw.githubusercontent.com/unisonweb/unison/6b91db24f44ce223f2dc4b015c6f203cd78c571b/parser-typechecker/src/Unison/Codebase/Init/OpenCodebaseError.hs | haskell | # LANGUAGE DeriveAnyClass #
| Open codebase error type.
| An error that can occur when attempting to open a codebase.
| The codebase doesn't exist.
| The codebase exists, but its schema version is unknown to this application.
| The codebase exists, but requires a migration before it can be used.
current version
... |
module Unison.Codebase.Init.OpenCodebaseError
( OpenCodebaseError (..),
)
where
import U.Codebase.Sqlite.DbId (SchemaVersion)
import Unison.Prelude
data OpenCodebaseError
OpenCodebaseDoesntExist
OpenCodebaseUnknownSchemaVersion SchemaVersion
| OpenCodebaseFileLockFailed
OpenCodebaseRequiresMigratio... |
db2a70c31adae20bef92d44f911c22c8fea6bbe78501e23c52bcf58903c20e36 | shirok/Gauche-lisp15 | test-basic.scm | ;;;
;;; Test LISP1.5
;;;
(use gauche.test)
(use gauche.parameter)
(use file.util)
(test-start "LISP1.5")
(test-section "Basic modules")
(use LISP1.5.axioms)
(test-module 'LISP1.5.axioms)
(use LISP1.5.memory)
(test-module 'LISP1.5.memory)
(use LISP1.5.mexpr)
(test-module 'LISP1.5.mexpr)
(define (test-m mexpr expec... | null | https://raw.githubusercontent.com/shirok/Gauche-lisp15/d40163e6aa473608dd38a23f9cb67f13af676722/test-basic.scm | scheme |
Test LISP1.5
y] = [atom[x] -> [atom[y] -> eq[x;y]; T -> F];\
cdr[y]];\
r];\
NIL] -> r;\
apnd[cdr[xs];r]]]]]")
\
\
append[cdr[xs];r]]]]"))
\
\
cons[car[xs];NIL]]]]"))
If you don't want `gosh' to exit with nonzero status even if
the test fails, pass #f to :exit-on-failure. |
(use gauche.test)
(use gauche.parameter)
(use file.util)
(test-start "LISP1.5")
(test-section "Basic modules")
(use LISP1.5.axioms)
(test-module 'LISP1.5.axioms)
(use LISP1.5.memory)
(test-module 'LISP1.5.memory)
(use LISP1.5.mexpr)
(test-module 'LISP1.5.mexpr)
(define (test-m mexpr expected)
(test* mexpr expec... |
6e349b5baee1ce151c5e5e2e31deeb2782786071c28b49990feabb6a3d14c7c5 | ucsd-progsys/nate | frx_misc.mli | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of Objective Caml
(* *)
, , and ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/frx/frx_misc.mli | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of Objective Caml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
7f31c4e8b67f6cfd2a72e0bd095af18f9f283f4997029fa2b65c0a0f181c849a | ndmitchell/hlint | HsExpr.hs | # LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns , MultiParamTypeClasses , FlexibleInstances , FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
module GHC.Util.HsExpr (
dotApps, lambda
, simplifyExp, niceLambda, niceLambdaR
, Brackets(..)
, rebracket1, appsBracket, transformAppsM, fromA... | null | https://raw.githubusercontent.com/ndmitchell/hlint/d06148be027179469333a892294fb7a90b9ea51c/src/GHC/Util/HsExpr.hs | haskell | | 'dotApp a b' makes 'a . b'.
| @lambda [p0, p1..pn] body@ makes @\p1 p1 .. pn -> body@
| 'paren e' wraps 'e' in parens if 'e' is non-atomic.
version never removes brackets.
A list of application, with any necessary brackets.
Replace appliciations 'f $ x' with 'f (x)'.
An expression of the form, 'let x = y in z... | # LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns , MultiParamTypeClasses , FlexibleInstances , FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
module GHC.Util.HsExpr (
dotApps, lambda
, simplifyExp, niceLambda, niceLambdaR
, Brackets(..)
, rebracket1, appsBracket, transformAppsM, fromA... |
5a8307de345555b6bffe07b89912054855fd97ccda8b247d4017db3926036844 | rizo/snowflake-os | sort.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/libraries/stdlib/sort.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 , with
$ I d : sort.mli , v 1.14 2005 - 10 -... |
2f5a2c7d0ada80f5f7370d98ad8c240df20c31b19fe2136ca722bcbb0eb6b493 | den1k/vimsical | commands.clj | (ns vimsical.backend.handlers.vims.commands
(:require
[clojure.spec.alpha :as s]
[vimsical.backend.components.datomic :as datomic]
[vimsical.backend.components.server.interceptors.event-auth :as event-auth]
[vimsical.backend.components.snapshot-store :as snapshot-store]
[vimsical.backend.components.sna... | null | https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/backend/vimsical/backend/handlers/vims/commands.clj | clojure |
* Context specs
* New
* Delete
* Title
* Snapshots
| (ns vimsical.backend.handlers.vims.commands
(:require
[clojure.spec.alpha :as s]
[vimsical.backend.components.datomic :as datomic]
[vimsical.backend.components.server.interceptors.event-auth :as event-auth]
[vimsical.backend.components.snapshot-store :as snapshot-store]
[vimsical.backend.components.sna... |
0679b86568d040b2715d5869bc9c8b3eb2e73fa13290563a816bbc7da3ba6c46 | rotatef/json-streams | fail20.lisp | ()
(:begin-object
"Double colon"
:error)
| null | https://raw.githubusercontent.com/rotatef/json-streams/5da012e8133affbf75024e7500feb37394690752/tests/json.org/fail20.lisp | lisp | ()
(:begin-object
"Double colon"
:error)
| |
7be0ded43c2d03c6ef508cf184f81ac24f4efe59f326eaec7ea3dc218745f6b3 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | BankConnectionsResourceBalance.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the types generated from the schema BankConnectionsResourceBalance
module StripeAPI.Types.BankConnectionsResour... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/BankConnectionsResourceBalance.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema BankConnectionsResourceBalance
# SOURCE #
# SOURCE #
| cash:
| credit:
| current: The balances owed to (or by) the account holder.
Each value is a integer amount. A positive amount indicates money owed to the ac... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.BankConnectionsResourceBalance where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
imp... |
b7aac431ece9214e4879c1d5263205d0aa3129366a51a34c8ad457353f193778 | rtoy/cmucl | rand-xoroshiro.lisp | ;;; -*- Mode: Lisp; Package: Kernel -*-
;;;
;;; **********************************************************************
This code was written as part of CMU Common Lisp and has been
;;; placed in the public domain, and is provided 'as is'.
;;;
(ext:file-comment
"$Header: src/code/rand-xoroshiro.lisp $")
;;;
;;; ***... | null | https://raw.githubusercontent.com/rtoy/cmucl/ba5c5d2a6813c3c1504d9f884790f34b2e93d63f/src/code/rand-xoroshiro.lisp | lisp | -*- Mode: Lisp; Package: Kernel -*-
**********************************************************************
placed in the public domain, and is provided 'as is'.
**********************************************************************
/.
Random state hackery:
Generate a random seed that can be used for seeding ... | This code was written as part of CMU Common Lisp and has been
(ext:file-comment
"$Header: src/code/rand-xoroshiro.lisp $")
Support for the xoroshiro128 + random number generator by
Blackman and ( ) . See
(in-package "LISP")
(intl:textdomain "cmucl")
(export '(random-state random-state-p random *random-st... |
e85614414e5ec1ff85938a9ccd5d3e26066abf0b34eb6b1b2ad1ac7eec40f378 | vikram/lisplibraries | stores.lisp |
(in-package :weblocks-elephant-demo)
;;; Multiple stores may be defined. The last defined store will be the
;;; default.
(defstore *elephant-store* :elephant
:spec `(:BDB ,(namestring (merge-pathnames (make-pathname :directory '(:relative "data"))
(asdf-system-directory :weblocks-elephant-demo)))))
| null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/examples/weblocks-elephant-demo/conf/stores.lisp | lisp | Multiple stores may be defined. The last defined store will be the
default. |
(in-package :weblocks-elephant-demo)
(defstore *elephant-store* :elephant
:spec `(:BDB ,(namestring (merge-pathnames (make-pathname :directory '(:relative "data"))
(asdf-system-directory :weblocks-elephant-demo)))))
|
26e0c5edaf790319dd5e91aa3f5a610e2b972fede26f047bd84c7ee1ddc14b5b | typedbyte/finito | Constraint.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module AI.Search.FiniteDomain.Int.Constraint
( (#=)
, (#/=)
, (#<)
, (#<=)
, (#>)
, (#>=)
, (/\)
, (\/)
, Constraint
, FD
, Labeling(..)
, allDifferent
, between
, initNewVar
, labeling
, newVar
, not'
, runFD
) where
--... | null | https://raw.githubusercontent.com/typedbyte/finito/6755377cdd1108f518f40930c6184b44829930c2/src/AI/Search/FiniteDomain/Int/Constraint.hs | haskell | base
domain
propeller
transformers
created variables and specified constraints.
| A constraint restricts the possible values of an involved 'Expression'.
| Enforces that the value of an expression is less than the value of another
expression.
| Enforces that the value of an expression is less than or e... | # LANGUAGE GeneralizedNewtypeDeriving #
module AI.Search.FiniteDomain.Int.Constraint
( (#=)
, (#/=)
, (#<)
, (#<=)
, (#>)
, (#>=)
, (/\)
, (\/)
, Constraint
, FD
, Labeling(..)
, allDifferent
, between
, initNewVar
, labeling
, newVar
, not'
, runFD
) where
im... |
fa0b45b30ecb048f4319e245d12cd1ccd7f02869d17ad222c6a2cd613e1a0323 | jasonkuhrt-archive/hpfp-answers | Wrap.hs | module Wrap where
data Wrap f a =
Wrap (f a)
deriving (Eq, Show)
instance (Functor f) => Functor (Wrap f) where
fmap f (Wrap a) = Wrap (fmap f a)
| null | https://raw.githubusercontent.com/jasonkuhrt-archive/hpfp-answers/c03ae936f208cfa3ca1eb0e720a5527cebe4c034/chapter-16-functor/Wrap.hs | haskell | module Wrap where
data Wrap f a =
Wrap (f a)
deriving (Eq, Show)
instance (Functor f) => Functor (Wrap f) where
fmap f (Wrap a) = Wrap (fmap f a)
| |
5e339ff7f431dcab3a1fe391c6e69deaee3866bc5930f5fea5f36ce7bfa02520 | ThoughtWorksInc/stonecutter | change_password.clj | (ns stonecutter.test.view.change-password
(:require [midje.sweet :refer :all]
[net.cgrand.enlive-html :as html]
[stonecutter.test.view.test-helpers :as th]
[stonecutter.routes :as r]
[stonecutter.view.change-password :refer [change-password-form
... | null | https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/test/stonecutter/test/view/change_password.clj | clojure | (ns stonecutter.test.view.change-password
(:require [midje.sweet :refer :all]
[net.cgrand.enlive-html :as html]
[stonecutter.test.view.test-helpers :as th]
[stonecutter.routes :as r]
[stonecutter.view.change-password :refer [change-password-form
... | |
d82267aa131ab966726b339453534151c7fa45fff706a11dd4cac1ee3b71e7ff | Frozenlock/siren | core.cljs | (ns siren.core
(:require [domina :as domina]
[domina.events :as events]
[domina.css :as css]
[enfocus.core :as ef]
[enfocus.effects :as eff]
[enfocus.events :as efe]))
;; ====================== We need a little 'X' close button =====================
(decla... | null | https://raw.githubusercontent.com/Frozenlock/siren/8f8bf7754b399bc02a3afe9c07abdc436f2973bf/src/siren/core.cljs | clojure | ====================== We need a little 'X' close button =====================
============================ Main Siren functions =============================
now a standalone var: the users can use it directly.
the acceleration is used to hide any margin that can't be removed by a resize | (ns siren.core
(:require [domina :as domina]
[domina.events :as events]
[domina.css :as css]
[enfocus.core :as ef]
[enfocus.effects :as eff]
[enfocus.events :as efe]))
(declare remove-siren!)
(defn add-close-button! [element]
(let [close-button (domina/... |
f27d26232aede8e17faad65420868fed0186cf86ebe912b870614df577c9d993 | input-output-hk/cardano-ledger | Decoder.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE NumericUnderscores #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamili... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/libs/cardano-ledger-binary/src/Cardano/Ledger/Binary/Decoding/Decoder.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
* Decoders
** Versioning
** Error reporting
** Compatibility tools
** Custom decoders
*** Containers
*** Time
*** Network
** Lifted @cborg@ decoders
------------------------------------------------------------------------------
--... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE NumericUnderscores #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Cardano.Ledger.Binary.Decoding.Decoder (
Decoder,
... |
4c829e828894cad90301d1ba458e2c30f611c817cbee7348cc973e99c50cb416 | ndmitchell/catch | Hello.hs |
module Hello where
main = putStrLn "Hello, Neil!"
| null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/examples/Example/Hello.hs | haskell |
module Hello where
main = putStrLn "Hello, Neil!"
| |
4c6533c5154eeb9bb77d653858ef0f79870cfd8b9deff4d47d3f6c3ef5879624 | basho/riak_cs | storage_stats_test.erl | %% ---------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2014 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . Y... | null | https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/riak_test/tests/storage_stats_test.erl | erlang | ---------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permiss... | Copyright ( c ) 2007 - 2014 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
d1808773642c3bb45566f9b29bbd62b992043273152fbb8cb4b55672575b1edc | cl21/cl21 | shlyfile.lisp | (in-package :cl-user)
(ql:quickload '(:quickdist :split-sequence :cl-ppcre :cl-fad))
(defpackage cl21.update-dist
(:use :cl)
(:import-from :split-sequence
:split-sequence)
(:export :release-new-tags
:release-tag)
(:documentation "Provides Shelly tasks for releasing a git project wit... | null | https://raw.githubusercontent.com/cl21/cl21/c36644f3b6ea4975174c8ce72de43a4524dd0696/shlyfile.lisp | lisp | (in-package :cl-user)
(ql:quickload '(:quickdist :split-sequence :cl-ppcre :cl-fad))
(defpackage cl21.update-dist
(:use :cl)
(:import-from :split-sequence
:split-sequence)
(:export :release-new-tags
:release-tag)
(:documentation "Provides Shelly tasks for releasing a git project wit... | |
7d9cb6c0565841890c4c519d5fdee97472efd05fec980c672ab6f7fb5dcbf525 | ragkousism/Guix-on-Hurd | libcanberra.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2014 , 2015 < >
Copyright © 2016 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/libcanberra.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
Copyright © 2014 , 2015 < >
Copyright © 2016 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages libcanberra)
#:use-modul... |
92516e7515493448565cc2f9ef47100d5d3afb7efcaae6d94e2a5f05c56ea541 | uw-unsat/jitsynth | options.rkt | #lang rosette
(require "debug.rkt")
(require rosette/solver/smt/boolector)
(require rosette/solver/smt/z3)
(provide MINPROGLEN
MAXPROGLEN
COMPUTE_BOUND
THREADS
SLEEPTIME
OVERALL_TIMEOUT
QUERY_TIMEOUT
LS_REORDER?
PARAM_CORR?
RW_PRUNE?
... | null | https://raw.githubusercontent.com/uw-unsat/jitsynth/69529e18d4a8d4dace884bfde91aa26b549523fa/common/options.rkt | racket | For synthesis/compiler-query
-1 = no timeout
Overall timeout for creating compiler, no timeout by default
Timeout for a single query, no timeout by default
Whether or not to include optimizations
(debugln (~a "LS_REORDER?: " LS_REORDER?-const))
(debugln (~a "RW_PRUNE?: " RW_PRUNE?-const))
Option for reasoning a... | #lang rosette
(require "debug.rkt")
(require rosette/solver/smt/boolector)
(require rosette/solver/smt/z3)
(provide MINPROGLEN
MAXPROGLEN
COMPUTE_BOUND
THREADS
SLEEPTIME
OVERALL_TIMEOUT
QUERY_TIMEOUT
LS_REORDER?
PARAM_CORR?
RW_PRUNE?
... |
32b41ed45093b26ac00481bbd72719184edaa715fddc80d9133a75b5a23c02db | hypernumbers/hypernumbers | hn_file_upload.erl | @author < >
%%% @doc Functions to handle file uploads.
( C ) 2011 - 2014 , Hypernumbers.com
%%%-------------------------------------------------------------------
%%%
%%% LICENSE
%%%
%%% This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public L... | null | https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/hypernumbers-1.0/src/hn_file_upload.erl | erlang | @doc Functions to handle file uploads.
-------------------------------------------------------------------
LICENSE
This program is free software: you can redistribute it and/or modify
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
... | @author < >
( C ) 2011 - 2014 , Hypernumbers.com
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3
You should have received a copy of the GNU Affero General Public License
-module(hn_file_upload).
-export([
handle_upload/3,
... |
9b7e7ea257410babb68759a15b70d0046c08f23e708d94b419ae8bf4c6e0d036 | bradrn/brassica | Paradigm.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Criterion.Main (bench, nf, defaultMain)
import Brassica.Paradigm
main :: IO ()
main = defaultMain
[ bench "small" $ nf (build smallParadigm) smallWords
, bench "mid" $ nf (build smallParadigm) largeWords
, bench "mid2" $ nf (build largeParad... | null | https://raw.githubusercontent.com/bradrn/brassica/068d413c302905b6cd737753c4d66c4e8ca248e4/bench/Paradigm.hs | haskell | # LANGUAGE OverloadedStrings # |
module Main where
import Criterion.Main (bench, nf, defaultMain)
import Brassica.Paradigm
main :: IO ()
main = defaultMain
[ bench "small" $ nf (build smallParadigm) smallWords
, bench "mid" $ nf (build smallParadigm) largeWords
, bench "mid2" $ nf (build largeParadigm) smallWords
, bench "large"... |
5aa18b79df54de5b0a7942374d7cc229a3cedab2bfbbcb0e3a2002b6ecedb5bc | GrammaticalFramework/gf-core | Console.hs | # LANGUAGE CPP #
module GF.System.Console(
-- ** Console IO
* * * Changing which character encoding to use for console IO
setConsoleEncoding,changeConsoleEncoding,
-- *** Console colors
TermColors(..),getTermColors
) where
import System.IO
import Control.Monad(guard)
import Control.Monad.Trans(MonadIO... | null | https://raw.githubusercontent.com/GrammaticalFramework/gf-core/9b4f2dd18b64b770aaebfa1885085e8e3447f119/src/compiler/GF/System/Console.hs | haskell | ** Console IO
*** Console colors | # LANGUAGE CPP #
module GF.System.Console(
* * * Changing which character encoding to use for console IO
setConsoleEncoding,changeConsoleEncoding,
TermColors(..),getTermColors
) where
import System.IO
import Control.Monad(guard)
import Control.Monad.Trans(MonadIO(..))
#ifdef mingw32_HOST_OS
import System.Win3... |
edfa3be3ccb39843c0c2781d5c83b69f24487d06f707cc27be369afd97cc2d59 | diasbruno/language-js | Switch.hs | module Test.Switch where
import Test.Hspec
import Test.Helpers
testSwitch = do
shouldBe (testStatement "var x;")
"Right (SVariable \"var\" [BindVar (LI \"x\") Nothing])"
shouldBe (testStatement "let x;")
"Right (SVariable \"let\" [BindVar (LI \"x\") Nothing])"
shouldBe (testStatement "var x = 1")
... | null | https://raw.githubusercontent.com/diasbruno/language-js/c986bb904e717fa8dd84f52473440ea726a275be/t/Test/Switch.hs | haskell | module Test.Switch where
import Test.Hspec
import Test.Helpers
testSwitch = do
shouldBe (testStatement "var x;")
"Right (SVariable \"var\" [BindVar (LI \"x\") Nothing])"
shouldBe (testStatement "let x;")
"Right (SVariable \"let\" [BindVar (LI \"x\") Nothing])"
shouldBe (testStatement "var x = 1")
... | |
1e7bbc885f4118e23cfe85c853971bcc3e589c8eb06303a99afecb94be2e4c48 | containium/containium | jetty9.clj | 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 /.
(ns containium.systems.ring.jetty9
"The Jetty 9 implementation of the Ring system."
(:require [containium.systems :refer (require-system St... | null | https://raw.githubusercontent.com/containium/containium/dede4098de928bed9ce8fccfc0a3891655ee162e/src/containium/systems/ring/jetty9.clj | clojure | Normal implementation.
Test implementation. | 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 /.
(ns containium.systems.ring.jetty9
"The Jetty 9 implementation of the Ring system."
(:require [containium.systems :refer (require-system St... |
894073cb32cb18fbc9f769458eb99da46edbbd0a00713b246a028b467a3402c6 | redis-sd/erlang-ryng | smoke_SUITE.erl | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
%% vim: ts=4 sw=4 ft=erlang noet
-module(smoke_SUITE).
-include_lib("common_test/include/ct.hrl").
%% ct.
-export([all/0]).
-export([groups/0]).
-export([init_per_suite/1]).
-export([end_per_suite/1]).
-export([init_per_group... | null | https://raw.githubusercontent.com/redis-sd/erlang-ryng/6b9f3db2f6380de09b173721108083aade4d53ee/test/smoke_SUITE.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
ct.
Tests.
====================================================================
Tests
====================================================================
--------------------------------------------------------------------
--------------------------------------------------------------... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
-module(smoke_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([all/0]).
-export([groups/0]).
-export([init_per_suite/1]).
-export([end_per_suite/1]).
-export([init_per_group/2]).
-export([end_per_group/2]).
-expo... |
552ddf5e08bac8ad0b095b8ba1f63826f296a643bce8a4a8c00454f996529f29 | mirage/irmin | value.ml |
* Copyright ( c ) 2013 - 2022 < >
*
* 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/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin-git/value.ml | ocaml |
* Copyright ( c ) 2013 - 2022 < >
*
* 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... | |
7caed0191fc1f640504566390518da34ab34fd34192a1cbef78d6902249a7cc8 | spawnfest/eep49ers | xref_base.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2000 - 2017 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/tools/src/xref_base.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2000 - 2017 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(xref_base).
Avoid warning for local function error/1 clashing with autoimported BIF .
-compile({no_auto_i... |
96b0bc758ff59fea00be5c80f15a8cf569199ec499906051263e72a39f9ae564 | Spivoxity/obc-3 | gcmap.mli |
* gcmap.mli
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006 - -2016 J. M. Spivey
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 ... | null | https://raw.githubusercontent.com/Spivoxity/obc-3/9e5094df8382ac5dd25ff08768277be6bd71a4ae/compiler/gcmap.mli | ocaml | null_map -- map with no pointers
ptr_map -- map for a single pointer
union -- union of a list of maps
flex_map -- map for an open array parameter
save_map -- name a gcmap with a symbol
put_maps -- output all named maps |
* gcmap.mli
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006 - -2016 J. M. Spivey
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1 ... |
a70e5f53684d53fcb7feded8c44bf04f41b5b06c0364c9ac5429c68fd07138bc | camllight/camllight | breakpoints.mli | (******************************* Breakpoints ***************************)
#open "lambda";;
(*** Debugging. ***)
value debug_breakpoints : bool ref;;
(*** Information about breakpoints. ***)
value breakpoints_count : unit -> int;;
Breakpoint number - > event .
value breakpoints : (int * event) list ref;;
(* `Non... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/debugger/breakpoints.mli | ocaml | ****************************** Breakpoints **************************
** Debugging. **
** Information about breakpoints. **
`None' if no breakpoint at `pc'; `Some instruction' otherwise.
Is there a breakpoint at `pc' ?
List of breakpoints at `pc'.
** Set and remove breakpoints **
Ensure the current version in in... |
#open "lambda";;
value debug_breakpoints : bool ref;;
value breakpoints_count : unit -> int;;
Breakpoint number - > event .
value breakpoints : (int * event) list ref;;
value instruction_at_pc : int -> char option;;
value breakpoint_at_pc : int -> bool;;
value breakpoints_at_pc : int -> int list;;
value upd... |
1f85381fc5ef61b5370194fe8e30efd832a3c55fabc4e2fe12164af9839f2fbb | blamario/grampa | Boolean.hs | # LANGUAGE FlexibleContexts , FlexibleInstances , KindSignatures , RecordWildCards , ScopedTypeVariables ,
TypeFamilies , TemplateHaskell , UndecidableInstances #
TypeFamilies, TemplateHaskell, UndecidableInstances #-}
module Boolean where
import Control.Applicative
import qualified Data.Bo... | null | https://raw.githubusercontent.com/blamario/grampa/8a5e70123b7cf8bbefb4ac75fefa7d7e053267cb/grammatical-parsers/examples/Boolean.hs | haskell | # LANGUAGE FlexibleContexts , FlexibleInstances , KindSignatures , RecordWildCards , ScopedTypeVariables ,
TypeFamilies , TemplateHaskell , UndecidableInstances #
TypeFamilies, TemplateHaskell, UndecidableInstances #-}
module Boolean where
import Control.Applicative
import qualified Data.Bo... | |
f2119f6a552374827dafe7a641359e8229e42433a06af4a62deac98ab20f7c7d | SamB/coq | g_natsyntax.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/parsing/g_natsyntax.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i $Id$ i
Nice syntax for naturals. | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Notation
val nat_of... |
310f4b2da9dd54c3b16dae727131d2bab0227e9e6fa8ac962ee443e51f021661 | ml4tp/tcoq | hashcons.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/lib/hashcons.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Generic hash-consing.
* Type of o... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* { 6 Hashconsing functorial... |
9ea5bde2cc733e30153e7a5b6e991259aa0b31876f5db8e5e90ae9411593481c | jeapostrophe/exp | typeshift.rkt | #lang racket/base
(require racket/list
racket/string)
(define (build-rx ws)
(unless (= 1 (length (remove-duplicates (map string-length ws))))
(error 'typeshift "Unequal length input or no input: ~v" ws))
(define tpos
(for/list ([i (in-range (string-length (first ws)))])
(define os (map (λ (w... | null | https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/typeshift.rkt | racket | #lang racket/base
(require racket/list
racket/string)
(define (build-rx ws)
(unless (= 1 (length (remove-duplicates (map string-length ws))))
(error 'typeshift "Unequal length input or no input: ~v" ws))
(define tpos
(for/list ([i (in-range (string-length (first ws)))])
(define os (map (λ (w... | |
5b5ca7ec1b2119a25604651d2c31492d6278d579c5adebd4a9cc7d4a2a7d6f58 | sKabYY/palestra | lisp.scm | ; lisp
(require scheme/mpair)
(define (m-eval exp env)
(cond ((self-evaluating? exp) exp)
((variable? exp) (lookup-variable-value exp env))
((quoted? exp) (text-of-quotation exp))
((assignment? exp) (eval-assignment exp env))
((definition? exp) (eval-definition exp env))
((if... | null | https://raw.githubusercontent.com/sKabYY/palestra/0906cc3a1fb786093a388d5ae7d59120f5aae16c/old1/sicp/4/lisp.scm | scheme | lisp
self-evaluating
variable
quote
assignment
(define <var> <value>)
(define (<var> <p1> <p2> ...) <body>)
define symbol
define proc
define symbol
define proc
lambda
if
begin
application
cond
clause else no |
(require scheme/mpair)
(define (m-eval exp env)
(cond ((self-evaluating? exp) exp)
((variable? exp) (lookup-variable-value exp env))
((quoted? exp) (text-of-quotation exp))
((assignment? exp) (eval-assignment exp env))
((definition? exp) (eval-definition exp env))
((if? exp) ... |
5ac64b8efe294721f72a6effc1d2efbb9f8e462086f5dbe5c9c6c3138898d78a | huangz1990/SICP-answers | 57-deriv.scm | 57-deriv.scm
(load "57-sum.scm")
(load "57-product.scm")
(define (deriv exp var)
(cond ((number? exp)
0)
((variable? exp)
(if (same-variable? exp var)
1
0))
((sum? exp)
(make-sum (deriv (addend exp) var)
... | null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/57-deriv.scm | scheme | number
variable | 57-deriv.scm
(load "57-sum.scm")
(load "57-product.scm")
(define (deriv exp var)
(cond ((number? exp)
0)
((variable? exp)
(if (same-variable? exp var)
1
0))
((sum? exp)
(make-sum (deriv (addend exp) var)
... |
0af5105677dd9a99ce554c9fd9b0c23d640d10e63f272f0f3c64950347e1fc3a | stchang/macrotypes | fomega2.rkt | #lang turnstile/base
(extends "sysf.rkt" #:except #%datum ∀ ~∀ ∀? Λ inst λ #%app →)
(reuse String #%datum #:from "stlc+reco+var.rkt")
same as fomega.rkt except here λ and # % app works as both type and terms
; - uses definition from stlc, but tweaks type? and kind? predicates
;; → is also both type and kind
Syste... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-example/turnstile/examples/optimize/fomega2.rkt | racket | - uses definition from stlc, but tweaks type? and kind? predicates
→ is also both type and kind
Type relation:
Types:
- types from sysf.rkt
- String from stlc+reco+var
Terms:
- extend ∀ Λ inst from sysf
- #%datum from stlc+reco+var
Try to keep "type?" backward compatible with its uses so far,
eg in the defin... | #lang turnstile/base
(extends "sysf.rkt" #:except #%datum ∀ ~∀ ∀? Λ inst λ #%app →)
(reuse String #%datum #:from "stlc+reco+var.rkt")
same as fomega.rkt except here λ and # % app works as both type and terms
System F_omega
(provide define-type-alias
★ ∀★ ∀
λ #%app → Λ inst
(for-syntax ... |
d817f204fd39cd467fd7aa88f7684611d0e243c89d8da74343e41725e08da80f | toaq/zugai | XbarUtils.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module XbarUtils where
import Control.Monad.State
import Data.List (sortOn)
import Data.Map (Map)
import Data.M... | null | https://raw.githubusercontent.com/toaq/zugai/155dc3452b664da8e34ed215e7d4652d668a70a4/src/XbarUtils.hs | haskell | terminator
Source word
Tag and source text
not really "below" but... it's useful for little v movement | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module XbarUtils where
import Control.Monad.State
import Data.List (sortOn)
import Data.Map (Map)
import Data.M... |
a7dd2fd30244298c8778bf8d44d2217bcf6648484b8205c36f918ead6d25efef | ds-wizard/engine-backend | List_Locale_GET.hs | module Wizard.Api.Handler.Config.List_Locale_GET where
import Control.Monad.Reader (asks)
import qualified Data.UUID as U
import Servant
import Shared.Api.Handler.Common
import Shared.Model.Context.TransactionState
import Wizard.Api.Handler.Common
import Wizard.Model.Context.AppContext
import Wizard.Model.Context.Bas... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/a68a0759da042fdf506f4f60ef63cfeaf910762b/engine-wizard/src/Wizard/Api/Handler/Config/List_Locale_GET.hs | haskell | module Wizard.Api.Handler.Config.List_Locale_GET where
import Control.Monad.Reader (asks)
import qualified Data.UUID as U
import Servant
import Shared.Api.Handler.Common
import Shared.Model.Context.TransactionState
import Wizard.Api.Handler.Common
import Wizard.Model.Context.AppContext
import Wizard.Model.Context.Bas... | |
1334033a23026d018d580c16adccefaf059c3be4421a55c188291311e5c20132 | Bertkiing/ErlangLearner | erlang_keyword_if.erl | -module(erlang_keyword_if).
-export([test_if/2]).
test_if(A,B) ->
if
A == 5 ->
io:format("A = 5~n",[]), a_equals_5;
B == 6 ->
io:format("B = 6~n",[]), b_equals_6;
A = = 2 并且 B = = 3
io:format("A == 2,B == 3~n",[]),
a_equals_2_and_b_equals_3;
A = = 2 或者 B... | null | https://raw.githubusercontent.com/Bertkiing/ErlangLearner/ce917684ee91e6d43864291f0e34050e7e004ca5/erlang_keyword_if.erl | erlang | -module(erlang_keyword_if).
-export([test_if/2]).
test_if(A,B) ->
if
A == 5 ->
io:format("A = 5~n",[]), a_equals_5;
B == 6 ->
io:format("B = 6~n",[]), b_equals_6;
A = = 2 并且 B = = 3
io:format("A == 2,B == 3~n",[]),
a_equals_2_and_b_equals_3;
A = = 2 或者 B... | |
db0fccbd1af5fd3a6e16c29855bc586196c8594b8b9ba0cc41356ac2686d81ef | davidlazar/ocaml-semantics | arith07.ml | 65 / -3
| null | https://raw.githubusercontent.com/davidlazar/ocaml-semantics/6f302c6b9cced0407d501d70ad25c2d2aefbb77d/tests/unit/arith07.ml | ocaml | 65 / -3
| |
5e47ce2da74e00119b65d2c2c857538b85db14c6946194b25b76d57ee7056398 | mmontone/gestalt | wlambda-other.lisp | (defmacro wlambda (args &rest body)
(labels
((map-tree (f g tree)
(if (atom tree)
(funcall g tree)
(funcall f (car tree)
(mapcar (lambda (arg) (map-tree f g arg)) (cdr tree)))))
(register-possible-weakref (possible-weakref table)
(when (and (symbolp possible-weakref) (equal (posit... | null | https://raw.githubusercontent.com/mmontone/gestalt/fd019c0ca03b4efc73b9ddd3db1e3ed211233428/src/wlambda-other.lisp | lisp | Other possible design
use (declare (weak var1 var2 ... varn))
is transformed into the following:
Let's try to improve it with weak references checking
And now we have: | (defmacro wlambda (args &rest body)
(labels
((map-tree (f g tree)
(if (atom tree)
(funcall g tree)
(funcall f (car tree)
(mapcar (lambda (arg) (map-tree f g arg)) (cdr tree)))))
(register-possible-weakref (possible-weakref table)
(when (and (symbolp possible-weakref) (equal (posit... |
5057d6e9995bb306145d01da2373ce7bcc9ccd625a90fb6f37a3a3bd2371a67f | clojurians-org/haskell-example | Main.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
module Main where
import GHC.Generics (Generic)
import Data.Aeson (Value)
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString as SB
import Data.Text.Lazy... | null | https://raw.githubusercontent.com/clojurians-org/haskell-example/c96b021bdef52a121e04ea203c8c3e458770a25a/oracle-to-yaml/src/Main.hs | haskell | >>> repl | # LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
module Main where
import GHC.Generics (Generic)
import Data.Aeson (Value)
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString as SB
import Data.Text.Lazy... |
c715de6c8c069abf4774c538f819a19ffc28c6c7c8330709a3fa36fb9fbec47e | LambdaCon/2015 | hackney_app.erl | %%% -*- erlang -*-
%%%
This file is part of hackney released under the Apache 2 license .
%%% See the NOTICE for more information.
%%%
Copyright ( c ) 2012 - 2014 < >
%%%
-module(hackney_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1,
ensure_deps_started/0,
... | null | https://raw.githubusercontent.com/LambdaCon/2015/0149877454b88815b9fcb9cba8ffd9b37c149026/Elixir%20love%20at%20first%20sip/src/demos/currencies_skeleton/deps/hackney/src/hackney_app/hackney_app.erl | erlang | -*- erlang -*-
See the NOTICE for more information.
Application callbacks
===================================================================
Application callbacks
===================================================================
@doc return a config value
@doc return a config value | This file is part of hackney released under the Apache 2 license .
Copyright ( c ) 2012 - 2014 < >
-module(hackney_app).
-behaviour(application).
-export([start/2, stop/1,
ensure_deps_started/0,
get_app_env/1, get_app_env/2]).
start(_StartType, _StartArgs) ->
hackney_deps:ensure(),
... |
db4733f84f467f8bbec25952347fd31a924a7805e0690ece1357bd8de52cc6fe | fulcrologic/semantic-ui-wrapper | ui_list_list.cljc | (ns com.fulcrologic.semantic-ui.elements.list.ui-list-list
(:require
[com.fulcrologic.semantic-ui.factory-helpers :as h]
#?(:cljs ["semantic-ui-react$ListList" :as ListList])))
(def ui-list-list
"A list can contain a sub list.
Props:
- as (elementType): An element type to render as (string or func... | null | https://raw.githubusercontent.com/fulcrologic/semantic-ui-wrapper/7bd53f445bc4ca7e052c69596dc089282671df6c/src/main/com/fulcrologic/semantic_ui/elements/list/ui_list_list.cljc | clojure | (ns com.fulcrologic.semantic-ui.elements.list.ui-list-list
(:require
[com.fulcrologic.semantic-ui.factory-helpers :as h]
#?(:cljs ["semantic-ui-react$ListList" :as ListList])))
(def ui-list-list
"A list can contain a sub list.
Props:
- as (elementType): An element type to render as (string or func... | |
69dc5465498b5b6b6b5977327ed3c95805eee3ab61161292c1fd2d750b4cd5ce | SimulaVR/godot-haskell | HUD.hs | module Game.HUD where
import Control.Lens
import Control.Monad
import qualified Data.Text as T
import Godot
import Godot.Core.CanvasItem as CanvasItem
import Godot.Core.Label as Label
import Godot.Core.Timer as Timer
import Project.Support
import Project.Scenes.HUD()
data HUD = HUD { _hBase :: CanvasLayer }
instance ... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/examples/dodge-the-creeps/src/Game/HUD.hs | haskell | module Game.HUD where
import Control.Lens
import Control.Monad
import qualified Data.Text as T
import Godot
import Godot.Core.CanvasItem as CanvasItem
import Godot.Core.Label as Label
import Godot.Core.Timer as Timer
import Project.Support
import Project.Scenes.HUD()
data HUD = HUD { _hBase :: CanvasLayer }
instance ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.