_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 |
|---|---|---|---|---|---|---|---|---|
72a4d74bd8d06ed93e854157b638f61ced5fac98d4bbb45b1900d4b3cda7e1e3 | dcavar/schemeNLP | trigraph.scm | ":"; exec mzscheme -r $0 "$@"
;;; ----------------------------------------------------
;;; Filename: trigraph.ss
Author : < >
;;;
( C ) 2006 by
;;;
;;; This code is published under the restrictive GPL!
;;; Please find the text of the GPL here:
;;;
;;;
;;; It is free for use, change, etc. as long as the c... | null | https://raw.githubusercontent.com/dcavar/schemeNLP/daa0ddcc4fa67fe00dcf6054c4d30d11a00b2f7f/src/trigraph.scm | scheme | exec mzscheme -r $0 "$@"
----------------------------------------------------
Filename: trigraph.ss
This code is published under the restrictive GPL!
Please find the text of the GPL here:
It is free for use, change, etc. as long as the copyright
note above is included in any modified version of the code.
... |
Author : < >
( C ) 2006 by
1 . The text file is loaded into memory .
2 . Trigrams of characters are created from the corpus .
3 . The absolute counts are relativized .
4 . The hash - table is dumped ( serialized ) to stdout .
If the command line parameters contain more than one text file ,
(de... |
a4f1574d81202af74b2a3e7faef694c970e893745e12e2382c4efe67bf37e100 | borodust/alien-works-delivery | init.lisp | (require 'asdf)
(load (merge-pathnames "quicklisp.lisp"
(uiop:pathname-directory-pathname *load-pathname*)))
(quicklisp-quickstart:install
:dist-url "")
(ql-util:without-prompting
(let ((init-file (ql:add-to-init-file)))
(with-open-file (out init-file :direction :output
... | null | https://raw.githubusercontent.com/borodust/alien-works-delivery/ba498c7dcd5a00d8034bc92da480189aa539bedc/msix/image/resources/init.lisp | lisp | (require 'asdf)
(load (merge-pathnames "quicklisp.lisp"
(uiop:pathname-directory-pathname *load-pathname*)))
(quicklisp-quickstart:install
:dist-url "")
(ql-util:without-prompting
(let ((init-file (ql:add-to-init-file)))
(with-open-file (out init-file :direction :output
... | |
a5c5ca3b09de3e40a96669257980231a37dad09006cf9f10adda24e55c1f4f11 | lingnand/VIMonad | HintedGrid.hs | {-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses #-}
-----------------------------------------------------------------------------
-- |
Module : XMonad . Layout . HintedGrid
Copyright : ( c )
-- License : BSD-style (see LICENSE)
--
-- Maintainer : <>
-- Stability : unstable
-- Port... | null | https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/XMonadContrib/XMonad/Layout/HintedGrid.hs | haskell | # LANGUAGE TypeSynonymInstances, MultiParamTypeClasses #
---------------------------------------------------------------------------
|
License : BSD-style (see LICENSE)
Maintainer : <>
Stability : unstable
Portability : unportable
A not so simple layout that attempts to put all windows in a square gr... |
Module : XMonad . Layout . HintedGrid
Copyright : ( c )
module XMonad.Layout.HintedGrid (
Grid(..), arrange, defaultRatio
) where
import Prelude hiding ((.))
import XMonad
import XMonad.StackSet
import Control.Monad.State
import Data.List
import Data.Ord
infixr 9 .
(.) :: (Functor f) => (a ... |
e600253e379270342b45d0313533a41269ceca7f9eee52a7d089a68447e2c0c0 | vaibhavsagar/experiments | Concurrent.hs | -----------------------------------------------------------------------------
-- |
-- Module : Control.Concurrent
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : experimental
-- Portability : non-po... | null | https://raw.githubusercontent.com/vaibhavsagar/experiments/378d7ba97eabfc7bbeaa4116380369ea6612bfeb/hugs/packages/base/Control/Concurrent.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Concurrent
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : non-portable (concurrency)
A common interface to a collection of useful conc... | Copyright : ( c ) The University of Glasgow 2001
module Control.Concurrent (
ThreadId,
#ifdef __GLASGOW_HASKELL__
myThreadId,
#endif
forkIO,
#ifdef __GLASGOW_HASKELL__
killThread,
throwTo,
#endif
#ifdef __GLASGOW_HASKELL__
#endif
module Control.Concurrent.MVar,
module Control.Concurren... |
a1777fb68ea85d029ca7dd18382b51f3078a50fb8dad1afa70fd2d3e30633c38 | active-group/reacl | console.cljs | (ns reacl2.trace.console
"Tracers to be used with [[reacl2.trace.core/add-tracer!]] that issue log entries via `js/console.log`."
(:require [reacl2.trace.core :as trace]
[reacl2.core :as reacl])
(:refer-clojure :exclude [reduced cycle]))
;; small log dsl, for easier abstractions
(defrecord ^:private... | null | https://raw.githubusercontent.com/active-group/reacl/946e85a946d9659706b8875f9d1d2a7e0da55592/src/reacl2/trace/console.cljs | clojure | small log dsl, for easier abstractions
Note: styling has to be 'turned on' and 'turned off' again. (cannot nest them)
strings, esp:
but otherwise looks ugly and shows internals .
TODO: don't grab into reacl guts here:
ends an actual or marked group.
Note: js/console allows nesting groups; this monad not. | (ns reacl2.trace.console
"Tracers to be used with [[reacl2.trace.core/add-tracer!]] that issue log entries via `js/console.log`."
(:require [reacl2.trace.core :as trace]
[reacl2.core :as reacl])
(:refer-clojure :exclude [reduced cycle]))
(defrecord ^:private LogMulti [args])
(defn ^:no-doc multi [& ... |
76ce7d2eaadb8c8e9922769b4074843d9b075aeed403eab43e86100903cf213a | jyh/metaprl | itt_hoas_sequent.mli |
* Native sequent representation .
*
* ----------------------------------------------------------------
*
* @begin[license ]
* Copyright ( C ) 2005 Mojave Group , Caltech
*
* This program is free software ; you can redistribute it and/or
* modify it under the terms of the GNU General Public Li... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/itt/reflection/experimental/itt_hoas_sequent.mli | ocaml |
* Sequents and their types.
* A sequent with depth 'd.
* A sequent context variable at depth 'd.
* Hypothesis depth check.
* Rewrites.
* Tactics.
!
* @docoff
*
* -*-
* Local Variables:
* Caml-master: "compile"
* End:
* -*-
|
* Native sequent representation .
*
* ----------------------------------------------------------------
*
* @begin[license ]
* Copyright ( C ) 2005 Mojave Group , Caltech
*
* This program is free software ; you can redistribute it and/or
* modify it under the terms of the GNU General Public Li... |
3e32ca19ad625730a777924693ad94e03ba31fe9a7fcb0f94cb1b722b9e4ee52 | yi-editor/yi | BufferNew.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
Module : . . Vim . Ex . Commands . BufferNew
License :
-- Maintainer :
-- Stability : experimental
-- Portability : portable
module Yi.Keymap.Vim.Ex.Commands.BufferNew (parse) where
import Control.Applicative (Alternative(..))
import... | null | https://raw.githubusercontent.com/yi-editor/yi/58c239e3a77cef8f4f77e94677bd6a295f585f5f/yi-keymap-vim/src/Yi/Keymap/Vim/Ex/Commands/BufferNew.hs | haskell | # LANGUAGE OverloadedStrings #
|
Maintainer :
Stability : experimental
Portability : portable | Module : . . Vim . Ex . Commands . BufferNew
License :
module Yi.Keymap.Vim.Ex.Commands.BufferNew (parse) where
import Control.Applicative (Alternative(..))
import Control.Monad (void)
import qualified Data.Attoparsec.Text as P (anyChar, cha... |
9c9c3dcbf045d70660522944e79b50cae1e59d2c920bfaae7b8e29dec0299fe9 | SecPriv/webspec | ast_utils.ml | (********************************************************************************)
Copyright ( c ) 2021
(* *)
(* Permission is hereby granted, free of charge, to any person obtaining a *)
(* c... | null | https://raw.githubusercontent.com/SecPriv/webspec/9f500bd85400551d8bf0e117ac5aa57088f9bc20/compiler/src/ast_utils.ml | ocaml | ******************************************************************************
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
th... | Copyright ( c ) 2021
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABI... |
9d74cfbdf1ba3efd0528a79caf77415272eda493f51b03ed8a52b072ddffe7d8 | dgtized/shimmers | quil.cljc | (ns shimmers.common.quil
(:require
[quil.core :as q :include-macros true]
[thi.ng.geom.core :as g]
[thi.ng.geom.rect :as rect]
[thi.ng.geom.vector :as gv]
[thi.ng.math.core :as tm]))
(defn rel-h [p]
(* (q/height) p))
(defn rel-w [p]
(* (q/width) p))
(defn rel-pos
([[w h]] (rel-pos w h))
([w ... | null | https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/common/quil.cljc | clojure | gc/circle | (ns shimmers.common.quil
(:require
[quil.core :as q :include-macros true]
[thi.ng.geom.core :as g]
[thi.ng.geom.rect :as rect]
[thi.ng.geom.vector :as gv]
[thi.ng.math.core :as tm]))
(defn rel-h [p]
(* (q/height) p))
(defn rel-w [p]
(* (q/width) p))
(defn rel-pos
([[w h]] (rel-pos w h))
([w ... |
0888e0762378a13f75c96ec6ee44689a0665ac79abc5364869266ecc5e988e0a | camlspotter/ocamloscope.2 | t10_include_ext.ml | include List
| null | https://raw.githubusercontent.com/camlspotter/ocamloscope.2/49b5977a283cdd373021d41cb3620222351a2efe/tests/t10_include_ext.ml | ocaml | include List
| |
abe86a90833783320f9558bb6028ff0cfcd7df580932b33cbe14547bab018cd6 | landakram/kiwi-desktop | keybindings.cljs | (ns kiwi.keybindings
(:require
[re-frame.core :as re-frame :refer [after dispatch dispatch-sync enrich path register-handler register-sub subscribe]]
[kiwi.routes :as routes]))
(def mousetrap (js/require "mousetrap"))
(defn- toggle-editing! []
(dispatch [:assoc-editing? (not @(subscribe [:editing?]))]))
(... | null | https://raw.githubusercontent.com/landakram/kiwi-desktop/cc7d0a5f28430f39d43dffb26850183601fd28f9/src/cljs/kiwi/keybindings.cljs | clojure | (ns kiwi.keybindings
(:require
[re-frame.core :as re-frame :refer [after dispatch dispatch-sync enrich path register-handler register-sub subscribe]]
[kiwi.routes :as routes]))
(def mousetrap (js/require "mousetrap"))
(defn- toggle-editing! []
(dispatch [:assoc-editing? (not @(subscribe [:editing?]))]))
(... | |
9d9d9e51b357c014da38a3045cf8f4dca7d918da2b33947bc7963f1d522157ba | NorfairKing/smos | Application.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -fno - warn - orphans #
module Smos.Web.Server.Application where
import Smos.Web.Server.Foundation
import Smos.Web.Server.Handler
mkYesodDispatch "App" resourcesApp
| null | https://raw.githubusercontent.com/NorfairKing/smos/a3ed8fdbcb8f298bc49866bf6d0ee59a964ba0da/smos-web-server/src/Smos/Web/Server/Application.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -fno - warn - orphans #
module Smos.Web.Server.Application where
import Smos.Web.Server.Foundation
import Smos.Web.Server.Handler
mkYesodDispatch "App" resourcesApp
|
218c10ddfef55da3dc56dff2dc111da3698c73e8571353afaf17777e30b9b406 | fulcro-legacy/fulcro3 | mock_server_remote.cljs | (ns com.fulcrologic.fulcro.networking.mock-server-remote
"Simple adapter code that allows you to use a generic parser 'as if' it were a client remote in CLJS."
(:require
[com.fulcrologic.fulcro.algorithms.tx-processing :as txn]
[taoensso.timbre :as log]
[edn-query-language.core :as eql]
[cljs.core.a... | null | https://raw.githubusercontent.com/fulcro-legacy/fulcro3/5d1b9ab274406afd68b792192d5a783f29963314/src/main/com/fulcrologic/fulcro/networking/mock_server_remote.cljs | clojure | (ns com.fulcrologic.fulcro.networking.mock-server-remote
"Simple adapter code that allows you to use a generic parser 'as if' it were a client remote in CLJS."
(:require
[com.fulcrologic.fulcro.algorithms.tx-processing :as txn]
[taoensso.timbre :as log]
[edn-query-language.core :as eql]
[cljs.core.a... | |
8902bad84d75b2aca38018bfd45259d9b31c6f17d9ef61eee8ff8db27f62f3b5 | cl-rabbit/cl-bunny | emit-logs-topic.lisp | (ql:quickload :cl-bunny.examples)
(in-package :cl-bunny.examples)
(with-connection ("amqp://")
(with-channel ()
(let* ((args (cdr sb-ext:*posix-argv*))
(severity (if (car args) (car args) "anonimous.info"))
(msg (format nil "~{~a ~}" (cdr args)))
(x (exchange.declare "topic_logs... | null | https://raw.githubusercontent.com/cl-rabbit/cl-bunny/6da7fe161efc8d6bb0b8b09ac8efad03553d765c/examples/tutorials/emit-logs-topic.lisp | lisp | (ql:quickload :cl-bunny.examples)
(in-package :cl-bunny.examples)
(with-connection ("amqp://")
(with-channel ()
(let* ((args (cdr sb-ext:*posix-argv*))
(severity (if (car args) (car args) "anonimous.info"))
(msg (format nil "~{~a ~}" (cdr args)))
(x (exchange.declare "topic_logs... | |
bf7893671998cd3b56a3d46549b89e2d6caf12d8fed58103ba0b369e720b55a2 | may-liu/qtalk | suite.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2013 ,
%%% @doc
%%%
%%% @end
Created : 27 Jun 2013 by < >
%%%-------------------------------------------------------------------
-module(suite).
%% API
-compile(export_all).
-include("suite.hrl").
%%%===============... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/test/suite.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
===================================================================
API
===================================================================
=========================... | @author < >
( C ) 2013 ,
Created : 27 Jun 2013 by < >
-module(suite).
-compile(export_all).
-include("suite.hrl").
init_config(Config) ->
DataDir = proplists:get_value(data_dir, Config),
PrivDir = proplists:get_value(priv_dir, Config),
[_, _|Tail] = lists:reverse(filename:split(DataDir)),
... |
9c97ffa255a83cb8aae947be2a891df8eb172431f516b61e82e05aa583678bb2 | pouriya/pipeline | test.erl | %%%-------------------------------------------------------------------
@author
( C ) 2018 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 31 . Jan 2018 10:38 AM
%%%-------------------------------------------------------------------
-module(test).
-author("pouriya").
%% API
-export([]).
| null | https://raw.githubusercontent.com/pouriya/pipeline/f0e9a1ac562222a63c4ebd53a440889cc98ce817/test.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API | @author
( C ) 2018 , < COMPANY >
Created : 31 . Jan 2018 10:38 AM
-module(test).
-author("pouriya").
-export([]).
|
f52b10c368f0c1e23436e36e2e4a0871574f97122bd4dcb8174525f913706b83 | mvoidex/hsdev | Schema.hs | # LANGUAGE TemplateHaskell , OverloadedStrings #
module HsDev.Database.SQLite.Schema (
schema, commands
) where
import qualified Data.Text as T
import Data.List (unfoldr)
import Database.SQLite.Simple (Query(..))
import HsDev.Database.SQLite.Schema.TH
schema :: T.Text
schema = T.pack $schemaExp
commands :: [Quer... | null | https://raw.githubusercontent.com/mvoidex/hsdev/016646080a6859e4d9b4a1935fc1d732e388db1a/src/HsDev/Database/SQLite/Schema.hs | haskell | # LANGUAGE TemplateHaskell , OverloadedStrings #
module HsDev.Database.SQLite.Schema (
schema, commands
) where
import qualified Data.Text as T
import Data.List (unfoldr)
import Database.SQLite.Simple (Query(..))
import HsDev.Database.SQLite.Schema.TH
schema :: T.Text
schema = T.pack $schemaExp
commands :: [Quer... | |
9dbff5ba7021db7f9c078031c25dbe72f1b430175847fa760f7e58921955e577 | andrenth/srsly | srslyd_config.ml | open Lwt
open Printf
open Release_lwt
open Release.Config.Value
open Release.Config.Validation
open Log_lwt
open Util
module O = Release.Util.Option
module Value = Release.Config.Value
type srslyd_config =
{ lock_file : Lwt_io.file_name
; control_socket : Lwt_io.file_name
; background : bool
; log_l... | null | https://raw.githubusercontent.com/andrenth/srsly/fce92645781a6a6037512be4d35116ec53737b17/src/srslyd_config.ml | ocaml | DICT_FLAG_FOLD_FIX | DICT_FLAG_LOCK | open Lwt
open Printf
open Release_lwt
open Release.Config.Value
open Release.Config.Validation
open Log_lwt
open Util
module O = Release.Util.Option
module Value = Release.Config.Value
type srslyd_config =
{ lock_file : Lwt_io.file_name
; control_socket : Lwt_io.file_name
; background : bool
; log_l... |
8c79d3163f8e7693bb400c8ab1fa9b657fa0985fe63899cf51b173e384943fc0 | sebsheep/elm2node | Space.hs | # OPTIONS_GHC -Wall -fno - warn - unused - do - bind #
# LANGUAGE BangPatterns , UnboxedTuples , OverloadedStrings #
module Parse.Space
( Parser
--
, chomp
, chompAndCheckIndent
--
, checkIndent
, checkAligned
, checkFreshLine
--
, docComment
)
where
import Data.Word (Word8, Word16)
import For... | null | https://raw.githubusercontent.com/sebsheep/elm2node/602a64f48e39edcdfa6d99793cc2827b677d650d/compiler/src/Parse/Space.hs | haskell |
SPACE PARSING
CHECKS -- to be called right after a `chomp`
\n
{
-
-
\t
LINE COMMENTS
\n
MULTI COMMENTS
-
|
\n
\t
-
}
{
-
DOCUMENTATION COMMENT
{
-
| | # OPTIONS_GHC -Wall -fno - warn - unused - do - bind #
# LANGUAGE BangPatterns , UnboxedTuples , OverloadedStrings #
module Parse.Space
( Parser
, chomp
, chompAndCheckIndent
, checkIndent
, checkAligned
, checkFreshLine
, docComment
)
where
import Data.Word (Word8, Word16)
import Foreign.Ptr (Ptr, ... |
2237da9f258e74833eac46dc89a9546db2863a2c9213b22eb6fc97c5b25e1255 | static-analysis-engineering/codehawk | bCHLoopStructure.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/c1b3158e0d73cda7cfc10d75f6173f4297991a82/CodeHawk/CHB/bchlibx86/bCHLoopStructure.ml | ocaml | chutil
bchlib
bchlibx86 | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
9befca0e71834da54a0e67142106fed779ae7541fe7ad99816dd70930617f447 | fogfish/uid | uid.erl | %%
Copyright 2012 , 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 applicable law or agreed to in writing... | null | https://raw.githubusercontent.com/fogfish/uid/37ceb06c1b064dd5070dd2b6b55c30f3d4c1f4e8/src/uid.erl | erlang |
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 language g... | Copyright 2012 , 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(uid).
-include("uid.hrl").
-export([
z/0
, l/0
, l/1
, g/0
, g/1
, encode/1
, encode/2
, decode/1
, decode/2
,... |
75946d3004ac814bc339cb043d25b7e0482beb4af1bda709913da13bfae62cef | PolyB/kvm | Errors.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
module System.Linux.Kvm.Errors
(
Error(..)
,ErrorT
,MonadError
,runError
,execIO
,exTag
,throwE
) where
import qualified Ether.Except as I
import Control.Exception
import Control.Monad.IO.Class
data Error = ErrorIO IOExcepti... | null | https://raw.githubusercontent.com/PolyB/kvm/a0431d6558906ec90376864ac665a27978a6a671/src/System/Linux/Kvm/Errors.hs | haskell | # LANGUAGE ConstraintKinds #
| like `liftIO`, but `catch` the error into a `ErrorIO` `MonadError` | # LANGUAGE FlexibleContexts #
module System.Linux.Kvm.Errors
(
Error(..)
,ErrorT
,MonadError
,runError
,execIO
,exTag
,throwE
) where
import qualified Ether.Except as I
import Control.Exception
import Control.Monad.IO.Class
data Error = ErrorIO IOException
| ErrorTooMuchRamUse... |
7471b99bddac667d4dbdf7e4884c71519857f8432ff2399a6c8ed49141588938 | drdo/logic-translation | FOMLO.hs | # LANGUAGE LambdaCase #
# LANGUAGE OverloadedLists #
# LANGUAGE PatternSynonyms #
# LANGUAGE UnicodeSyntax #
module FOMLO
( SimpleFOMLO (..), FOMLO
, pattern Pred, pattern Eq, pattern Less, pattern Exists, pattern Forall
, simpleFreeVars, freeVars
, sfomloImplies, fomloImplies, sfomloSimplify, fomloSimplify
... | null | https://raw.githubusercontent.com/drdo/logic-translation/3efca7ce74b2e018a6ac4a8dacfc8a2dcfbd467f/library/FOMLO.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
These detect some cases where x implies y
--------------------------------------
------------------------------------------------------------------------------ | # LANGUAGE LambdaCase #
# LANGUAGE OverloadedLists #
# LANGUAGE PatternSynonyms #
# LANGUAGE UnicodeSyntax #
module FOMLO
( SimpleFOMLO (..), FOMLO
, pattern Pred, pattern Eq, pattern Less, pattern Exists, pattern Forall
, simpleFreeVars, freeVars
, sfomloImplies, fomloImplies, sfomloSimplify, fomloSimplify
... |
795424cff1e012a8650e6bb286a46790a457c8b7ea3e2a2e0b63a4db0bdb6a17 | haskell-works/hw-prim | AsVector64s.hs | # LANGUAGE CPP #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
module HaskellWorks.Data.Vector.AsVector64s
( AsVector64s(..)
) where
import Control.Monad.ST
import Data.Word
import Fore... | null | https://raw.githubusercontent.com/haskell-works/hw-prim/16f9b4631b7eed6a1f0dd56615b1c9bbf28381d0/src/HaskellWorks/Data/Vector/AsVector64s.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE Rank2Types # | # LANGUAGE CPP #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
module HaskellWorks.Data.Vector.AsVector64s
( AsVector64s(..)
) where
import Control.Monad.ST
import Data.Word
import Foreign.ForeignPtr
import qualified Data.ByteString as BS
import... |
e575c81af449e4a454ee5cd4c0bd979a07e9761341d0d386551141d5d3f1f289 | jtdaugherty/tracy | Add.hs | module Tracy.Materials.Add
( add
)
where
import Control.Lens
import Control.Monad
import Tracy.Types
add :: Material -> Material -> Material
add m1 m2 =
Material { _doShading = addShading m1 m2
, _doAreaShading = addAreaShading m1 m2
, _doPathShading = addPathShading m1 m2
... | null | https://raw.githubusercontent.com/jtdaugherty/tracy/ad36ea16a3b9cda5071ca72374d6e1c1b415d520/src/Tracy/Materials/Add.hs | haskell | module Tracy.Materials.Add
( add
)
where
import Control.Lens
import Control.Monad
import Tracy.Types
add :: Material -> Material -> Material
add m1 m2 =
Material { _doShading = addShading m1 m2
, _doAreaShading = addAreaShading m1 m2
, _doPathShading = addPathShading m1 m2
... | |
8b1a979a76b3c8a8558c127d2b25cdcfa1a14691a41f194cf0c9e27ba5028c58 | MinaProtocol/mina | mina_block.ml | module Header = Mina_block_header
| null | https://raw.githubusercontent.com/MinaProtocol/mina/7a380064e215dc6aa152b76a7c3254949e383b1f/src/lib/mina_wire_types/mina_block/mina_block.ml | ocaml | module Header = Mina_block_header
| |
d90bb2bc640480da832680ee78535a573d1dff9c088544ec3f07084f9df6ce41 | webyrd/Barliman | test-hard-interp.scm | (load "chez-load-interp.scm")
(load "mk/test-check.scm")
(test 'append-empty
(run 1 (q)
(evalo
`(begin
(define append
(lambda (l s)
(if (null? l)
s
(cons (car l)
(append (cdr l) s)))))
(a... | null | https://raw.githubusercontent.com/webyrd/Barliman/c2ede326c32fab3c792da782035b5a5a73b08087/cocoa/Barliman/mk-and-rel-interp/test-hard-interp.scm | scheme | flipping rand/body eval order makes this one too hard,
but dynamic ordering via eval-application fixes it!
the following are still overfitting
probably need to demote quote and some others
(time (test 'append-hard-9
(evalo `(begin
(define append
(lambda (l s)
(if (null? l) ,q ,r)))
(list
(append '() '())
(append '(... | (load "chez-load-interp.scm")
(load "mk/test-check.scm")
(test 'append-empty
(run 1 (q)
(evalo
`(begin
(define append
(lambda (l s)
(if (null? l)
s
(cons (car l)
(append (cdr l) s)))))
(a... |
8cb0e4b76bbd4bfaccac6d91b130647e3143960f11a98d3b36b37e41663028bd | TheLortex/mirage-monorepo | buf_read.ml | exception Buffer_limit_exceeded
type t = {
mutable buf : Cstruct.buffer;
mutable pos : int;
mutable len : int;
mutable flow : Flow.source option; (* None if we've seen eof *)
mutable consumed : int; (* Total bytes consumed so far *)
max_size : int;
}
type 'a parser = t -> 'a
let return =... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/0c29acffaf08dc0008097d36225a14960769f132/duniverse/eio/lib_eio/buf_read.ml | ocaml | None if we've seen eof
Total bytes consumed so far
We don't have enough data yet, so we'll need to do a read.
If the buffer is empty, we might as well use all of it:
[n] bytes won't fit. We need to resize the buffer.
Skip isn't atomic, so discard everything in this case for consistency. | exception Buffer_limit_exceeded
type t = {
mutable buf : Cstruct.buffer;
mutable pos : int;
mutable len : int;
max_size : int;
}
type 'a parser = t -> 'a
let return = Fun.const
let map f x r = f (x r)
let pair x y r =
let a = x r in
let b = y r in
a, b
let bind x f r = f (x r) r
module Syntax = str... |
42928fd94039598366755fd4c744538519de5f0730a5d3700c3611c10683e74f | Apress/practical-webdev-haskell | TypesSpec.hs | module Domain.Auth.TypesSpec (spec) where
import ClassyPrelude
import Test.Hspec
import Domain.Auth.Types
spec :: Spec
spec = do
describe "mkEmail" $ do
describe "should pass" $
mkEmailSpec "" True
describe "should fail" $ do
mkEmailSpec "invalid " False
mkEmailSpec "email@test." False
... | null | https://raw.githubusercontent.com/Apress/practical-webdev-haskell/17b90c06030def254bb0497b9e357f5d3b96d0cf/12/test/Domain/Auth/TypesSpec.hs | haskell | module Domain.Auth.TypesSpec (spec) where
import ClassyPrelude
import Test.Hspec
import Domain.Auth.Types
spec :: Spec
spec = do
describe "mkEmail" $ do
describe "should pass" $
mkEmailSpec "" True
describe "should fail" $ do
mkEmailSpec "invalid " False
mkEmailSpec "email@test." False
... | |
056881f21e611cad9a03ea85e088b2b77f7b086232ee2005924ba919fdcda632 | nklein/draw | state.lisp | (in-package #:draw-vecto)
(defmethod %with-saved-state ((renderer vecto-renderer) thunk)
(push-font renderer)
(push-font-size renderer)
(unwind-protect
(vecto:with-graphics-state
(funcall thunk))
(pop-font-size renderer)
(pop-font renderer)))
| null | https://raw.githubusercontent.com/nklein/draw/2b7a51fa06c81a46dffc439a35b3b0ac18c94893/src/vecto/state.lisp | lisp | (in-package #:draw-vecto)
(defmethod %with-saved-state ((renderer vecto-renderer) thunk)
(push-font renderer)
(push-font-size renderer)
(unwind-protect
(vecto:with-graphics-state
(funcall thunk))
(pop-font-size renderer)
(pop-font renderer)))
| |
9b5e9e168636461b87d77c666ce52732806406614eec47204a9bf0d3e43d343c | ndmitchell/hoogle | Download.hs | # LANGUAGE TupleSections #
module Input.Download(downloadInput, DownloadInput(..)) where
import System.FilePath
import Control.Monad.Extra
import System.Directory
import Data.Conduit.Binary (sinkFile)
import qualified Network.HTTP.Conduit as C
import Network.Connection
import qualified Data.Conduit as C
import Genera... | null | https://raw.githubusercontent.com/ndmitchell/hoogle/6067c110e6f865e8b780dc2ad2aaab3561b6baac/src/Input/Download.hs | haskell | | Download all the input files to input/ | # LANGUAGE TupleSections #
module Input.Download(downloadInput, DownloadInput(..)) where
import System.FilePath
import Control.Monad.Extra
import System.Directory
import Data.Conduit.Binary (sinkFile)
import qualified Network.HTTP.Conduit as C
import Network.Connection
import qualified Data.Conduit as C
import Genera... |
3c0373a4622c9f48eae53b74be2f703141bf1aa33a9e088e6eb5e83a0d33e24b | thiago-negri/DuDuHoX | Base.hs | module DuDuHoX.World.Base where
import DuDuHoX.Game
import DuDuHoX.World.Types
(|+|) :: WorldPosition -> WorldPosition -> WorldPosition
a |+| b = WorldPosition (worldX a + worldX b) (worldY a + worldY b)
(|-|) :: WorldPosition -> WorldPosition -> WorldPosition
a |-| b = WorldPosition (worldX a - ... | null | https://raw.githubusercontent.com/thiago-negri/DuDuHoX/34942751c807ce69cd20d1a1a6fde4d6520460a4/src/DuDuHoX/World/Base.hs | haskell | module DuDuHoX.World.Base where
import DuDuHoX.Game
import DuDuHoX.World.Types
(|+|) :: WorldPosition -> WorldPosition -> WorldPosition
a |+| b = WorldPosition (worldX a + worldX b) (worldY a + worldY b)
(|-|) :: WorldPosition -> WorldPosition -> WorldPosition
a |-| b = WorldPosition (worldX a - ... | |
f264ca277515d8729633df48d38bb3d4037bb058934ae48cba0bdb42f73c7308 | onyx-platform/onyx | checkpoint.clj | (ns onyx.checkpoint
"Onyx checkpoint interfaces.")
(defmulti storage :onyx.peer/storage)
State storage interfaces
(defmulti write-checkpoint
(fn [storage tenancy-id job-id replica-version epoch task-id slot-id checkpoint-type checkpoint]
(type storage)))
(defmulti cancel!
(fn [storage]
(type storage)... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/checkpoint.clj | clojure | Consistent coordinate write interfaces | (ns onyx.checkpoint
"Onyx checkpoint interfaces.")
(defmulti storage :onyx.peer/storage)
State storage interfaces
(defmulti write-checkpoint
(fn [storage tenancy-id job-id replica-version epoch task-id slot-id checkpoint-type checkpoint]
(type storage)))
(defmulti cancel!
(fn [storage]
(type storage)... |
00c1f7062ea03abfccd7d1ecc30ed454a32fcd836f6011476506b405bc63ec69 | seanomlor/programming-in-haskell | product.hs | product' :: Num a => [a] -> a
product' [] = 1
product' (n:ns) = n * product' ns
| null | https://raw.githubusercontent.com/seanomlor/programming-in-haskell/e05142e6709eeba2e95cf86f376a32c9e629df88/06-recursive-functions/product.hs | haskell | product' :: Num a => [a] -> a
product' [] = 1
product' (n:ns) = n * product' ns
| |
b3dfce5106b3f4d07b91cd6d61c56a430eef82445e052b4a895788c3907c9d38 | anton-k/handle-pattern-servant-app | ToggleLog.hs | -- | Toggle logs handler
module Server.ToggleLog
( Env(..)
, handle
) where
import DI.Log
import DI.Setup
data Env = Env
{ log :: Log
, setup :: Setup
}
-----------------------------------------
-- Handler
handle :: Env -> IO ()
handle (Env Log{..} Setup{..}) = do
logInfo "toggle log call"
toggleL... | null | https://raw.githubusercontent.com/anton-k/handle-pattern-servant-app/4a9b6a4635e5555bd3b7a2ca9de76f06491104f4/src/Server/ToggleLog.hs | haskell | | Toggle logs handler
---------------------------------------
Handler | module Server.ToggleLog
( Env(..)
, handle
) where
import DI.Log
import DI.Setup
data Env = Env
{ log :: Log
, setup :: Setup
}
handle :: Env -> IO ()
handle (Env Log{..} Setup{..}) = do
logInfo "toggle log call"
toggleLogs
|
2420bb4f373ef756d21c0760c39fdebc6f0d26707a0cf0c55d0df7dceab32ba8 | ragkousism/Guix-on-Hurd | scsi.scm | ;;; GNU Guix --- Functional package management for GNU
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
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/scsi.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 © 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 scsi)
#:use-module ((guix licenses)
#:select (gpl2+ bsd-3))
#:use... |
6ebec6476c0ec2a1e1ddba5eb354e0419e79a174d0bc77e62dece0e73b20dff5 | Holmusk/servant-docs-simple | parse.hs | -- stack runghc --package servant-docs-simple
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeOperators #-}
module Main where
import Servant.API ((:>), Post, ReqBody)
import Servant.Docs.Simple.Parse (parseApi)
import Servant.Docs.Simple.Render (ApiDocs (..))
-- Our API type
type API... | null | https://raw.githubusercontent.com/Holmusk/servant-docs-simple/ab3edfa619ce1d91f0f68a4cb63b003215c17003/examples/parse.hs | haskell | stack runghc --package servant-docs-simple
# LANGUAGE TypeOperators #
Our API type
Intermediate documentation structure
Raw output of the documentation structure.
When actually building documentation, | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Main where
import Servant.API ((:>), Post, ReqBody)
import Servant.Docs.Simple.Parse (parseApi)
import Servant.Docs.Simple.Render (ApiDocs (..))
type API = "hello" :> "world" :> Request :> Response
type Request = ReqBody '[()] ()
type Response = Pos... |
8a820b0269f91497e739a4bfc4181a5fdecfa65d939a47cc252cb6a2265a3a51 | zen-lang/zen | core.clj | (ns zen.core
(:require
[zen.misc]
[zen.v2-validation :as v2]
[zen.effect]
[zen.utils]
[zen.store]))
(defn load-ns [ztx ns]
(zen.store/load-ns ztx ns))
(defn load-ns! [ztx ns]
(zen.store/load-ns! ztx ns))
(defn read-ns [ztx ns-name]
(zen.store/read-ns ztx ns-name))
(defn new-context [& [{paths... | null | https://raw.githubusercontent.com/zen-lang/zen/35fadab87e545e7eef27be7220c4c645ba6a11c9/src/zen/core.clj | clojure | (ns zen.core
(:require
[zen.misc]
[zen.v2-validation :as v2]
[zen.effect]
[zen.utils]
[zen.store]))
(defn load-ns [ztx ns]
(zen.store/load-ns ztx ns))
(defn load-ns! [ztx ns]
(zen.store/load-ns! ztx ns))
(defn read-ns [ztx ns-name]
(zen.store/read-ns ztx ns-name))
(defn new-context [& [{paths... | |
fea0c14082ff9af993de0d4db8171a5f759204b330d0307e98725ffae308538a | gren-lang/compiler | Code.hs | {-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -Wall #
module Reporting.Render.Code
( Source,
toSource,
toSnippet,
toPair,
Next (..),
whatIsNext,
nextLineStartsWithKeyword,
nextLineStartsWithCloseCurly,
)
where
import Data.ByteString qualified as B
import Data.ByteString.UTF8 qualifi... | null | https://raw.githubusercontent.com/gren-lang/compiler/49d5e5c5994a846d82c9518dcee06112c7630664/compiler/src/Reporting/Render/Code.hs | haskell | # LANGUAGE OverloadedStrings #
CODE
CODE FORMATTING
RENDER PAIR
WHAT IS NEXT? | # OPTIONS_GHC -Wall #
module Reporting.Render.Code
( Source,
toSource,
toSnippet,
toPair,
Next (..),
whatIsNext,
nextLineStartsWithKeyword,
nextLineStartsWithCloseCurly,
)
where
import Data.ByteString qualified as B
import Data.ByteString.UTF8 qualified as UTF8_BS
import Data.Char qual... |
1f825d697f32d9043925860e5042effc039d88c9c79340500fba68bffc1cd93f | michiakig/sicp | ex-5.19-breakpoints.scm | ;;;; Structure and Interpretation of Computer Programs
Chapter 5 Section 2 A Register Machine Simulator
Exercise 5.19 adding breakpoints
;; redefine make-new-machine to support new execute and breakpoint interface
(define (make-new-machine)
(let ((pc (make-register 'pc))
(flag (make-register 'flag))
... | null | https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch5/ex-5.19-breakpoints.scm | scheme | Structure and Interpretation of Computer Programs
redefine make-new-machine to support new execute and breakpoint interface
new "fields" for the machines
-- comment out if not wanted
new execute for handling breakpoints
are there any breakpoints set on this instruction?
if not, continue
otherwise, print out br... | Chapter 5 Section 2 A Register Machine Simulator
Exercise 5.19 adding breakpoints
(define (make-new-machine)
(let ((pc (make-register 'pc))
(flag (make-register 'flag))
(stack (make-stack))
(the-instruction-sequence '())
(labels '())
(breakpoints '()))
(let ((the-ops
... |
88548a3bfab5c9063c3682e74e977fd7cb73892ee66a2e5bf1f0b57c529074d8 | racket/gui | radio-box.rkt | #lang racket/base
(require racket/class
ffi/unsafe
ffi/unsafe/objc
"../../syntax.rkt"
"item.rkt"
"button.rkt"
"types.rkt"
"const.rkt"
"utils.rkt"
"window.rkt"
"../common/event.rkt"
"image.rkt")
(provide
(protect-out r... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/cocoa/radio-box.rkt | racket | ----------------------------------------
In case we were in 0-item mode, switch to Radio mode to | #lang racket/base
(require racket/class
ffi/unsafe
ffi/unsafe/objc
"../../syntax.rkt"
"item.rkt"
"button.rkt"
"types.rkt"
"const.rkt"
"utils.rkt"
"window.rkt"
"../common/event.rkt"
"image.rkt")
(provide
(protect-out r... |
8c0a85e2c27a73e7735822a776c8c871f1421cef43906f130fdc329e9dd5b199 | ghc/nofib | MatMult.hs | {-# OPTIONS -cpp #-}
{-# LANGUAGE BangPatterns #-}
{- Matrix multiplication using a torus (gentleman algorithm) -- FR10 -- -}
RL / JB ParCo2005 : eliminate result communication ( Maybe - Type )
JB PhD2008 : adapt for simple PhD skeleton tests
JB MSR07/2008 : modified to use all available toroid skeletons .... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/parallel/matmult/MatMult.hs | haskell | # OPTIONS -cpp #
# LANGUAGE BangPatterns #
Matrix multiplication using a torus (gentleman algorithm) -- FR10 --
ghc-6.9
workaround hacks needed for ghc-6.9:
as name suggests: it is strict!
--------- matrix strategies here:
== Int -> [[Int]] -> Done
do not use it!
OK?
bad ?
best?
result splitted
approx.... |
RL / JB ParCo2005 : eliminate result communication ( Maybe - Type )
JB PhD2008 : adapt for simple PhD skeleton tests
JB MSR07/2008 : modified to use all available toroid skeletons .
JB MSR07/2008 : derived a straight - forward GpH program using identical
helpers and strategies
JB optimi... |
3d641824e108c39b194b52ad91ce376922114f961f40aa50ead3db4c8aebe283 | haroldcarr/learn-haskell-coq-ml-etc | Aop.hs | module Aop where
import Prelude hiding (curry, uncurry)
import Test.HUnit (Counts, Test (TestList), runTestTT)
import qualified Test.HUnit.Util as U (t, tt)
ch 1 1/18
1.1 Datatypes 1/18
-- define data types
data Bool' = False' | True'
data Char' = AChar | BChar -- ...
data ... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/book/1996-Bird-de_Moor-Algebra_of_Programming/aop/src/Aop.hs | haskell | define data types
...
define functions on those types
curried
uncurried
than the function space D -> C in an abstract setting.
parameterized data types
recursive data types
structural recursion over natural numbers
use built-in numbers rather than structural numbers
conversion between them
homomorphism with... | module Aop where
import Prelude hiding (curry, uncurry)
import Test.HUnit (Counts, Test (TestList), runTestTT)
import qualified Test.HUnit.Util as U (t, tt)
ch 1 1/18
1.1 Datatypes 1/18
data Bool' = False' | True'
data Either' = LBool Bool' | RChar Char'
type Both = (Bool'... |
9c26a6d531c59277a6e878feea603ef9ece38df7906e71bf4505899a41a8d40a | xapix-io/axel-f | merger.cljc | (ns axel-f.merger)
(defn decorator-by-path [path]
(fn [v]
(letfn [(decorate [[k & path] x]
(cond
(= "*" k) (mapv (partial decorate path) x)
k {k (decorate path x)}
:else x))]
(decorate path v))))
(defn map-exhaustive [f a b]
(let [a-c (count ... | null | https://raw.githubusercontent.com/xapix-io/axel-f/ec8fca880033e0ae78a8d9f42538d4a71fba29bd/src/axel_f/merger.cljc | clojure | (ns axel-f.merger)
(defn decorator-by-path [path]
(fn [v]
(letfn [(decorate [[k & path] x]
(cond
(= "*" k) (mapv (partial decorate path) x)
k {k (decorate path x)}
:else x))]
(decorate path v))))
(defn map-exhaustive [f a b]
(let [a-c (count ... | |
422223153b82fa8f9a46fcdab411a19d31139efa90d698f7a9124e8dad6d2825 | cornell-netlab/yates | Simulation_Util.ml | open Core
open Yates_types.Types
open Yates_routing.Util
open Yates_solvers.Solvers
(**************************************************************)
(* Helper functions for simulator *)
(**************************************************************)
let store_paths log_paths scheme topo out_dir algorithm n : unit =
... | null | https://raw.githubusercontent.com/cornell-netlab/yates/fc30922933fae3184923f7b138d24454a9537536/simulator/Simulation_Util.ml | ocaml | ************************************************************
Helper functions for simulator
************************************************************
************************************************************
************************************************************
Return src and dst for a given path (edge ... | open Core
open Yates_types.Types
open Yates_routing.Util
open Yates_solvers.Solvers
let store_paths log_paths scheme topo out_dir algorithm n : unit =
if log_paths || n = 0 then
let _ = match (Sys.file_exists out_dir) with
| `No -> Unix.mkdir out_dir
| _ -> () in
let out_dir = out_dir ^ "paths/"... |
0c07e633d1397779999edcafdfaac9d6ec3ce581e0eabddead899b46b1c719a7 | ghcjs/ghcjs-boot | Lex.hs | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
Module : Text . Read .
Copyright : ( c ) The University of Glasgow 2002
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
--... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/Text/Read/Lex.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : provisional
Portability : non-portable (uses Text.ParserCombinators.ReadP)
----------------------------------------------------------------... | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
Module : Text . Read .
Copyright : ( c ) The University of Glasgow 2002
The cut - down , used by Text . Read
module Text.Read.Lex
( Lexeme(..), Number
, numberToInteger, numberToFixed, numberToRational, numberToRangedRational
, lex,... |
7ead2dc68a3184970f070c9513edfce76a3cd2b560b24818f2be632d4e43631d | lspector/Clojush | negative_to_zero.clj | ;; negative_to_zero.clj
,
;;
Problem Source : ( / )
;;
Given a vector of integers in [ -1000,1000 ] with length < = 50 , return the
vector where all negative integers have been replaced by 0 .
;;
;; NOTE: This problem gets lots of solutions that don't generalize. We could add
;; another error that finds the... | null | https://raw.githubusercontent.com/lspector/Clojush/685b991535607cf942ae1500557171a0739982c3/src/clojush/problems/software/negative_to_zero.clj | clojure | negative_to_zero.clj
NOTE: This problem gets lots of solutions that don't generalize. We could add
another error that finds the integer error at each position in vector with
penalty for wrong size of vector, which might help with generalization (but might not).
Atom generators
end constants
end input instruc... | ,
Problem Source : ( / )
Given a vector of integers in [ -1000,1000 ] with length < = 50 , return the
vector where all negative integers have been replaced by 0 .
input stack has 1 input vector of integers
(ns clojush.problems.software.negative-to-zero
(:use clojush.pushgp.pushgp
[clojush pushs... |
fa0d6d652eb4a1c8373473e86ebcf8fb2a43d690d513b54a177e3e1e5e728a39 | CryptoKami/cryptokami-core | Core.hs | # LANGUAGE TemplateHaskell #
-- | Arbitrary instances for core.
module Pos.Arbitrary.Core
( CoinPairOverflowSum (..)
, CoinPairOverflowSub (..)
, CoinPairOverflowMul (..)
, DoubleInZeroToOneRange (..)
, EoSToIntOverflow (..)
, IntegerToCoinNoOverflow (..)
, IntegerToCo... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/core/Pos/Arbitrary/Core.hs | haskell | | Arbitrary instances for core.
NOTE: Deriving an 'Arbitrary' instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
(As of derive-2.6.2)
Using, as an example,
{-# LANGUAGE TemplateHaskell #
`A`'s inner types can be anything for which the constraints make sense
----------------------------------------------------... | # LANGUAGE TemplateHaskell #
module Pos.Arbitrary.Core
( CoinPairOverflowSum (..)
, CoinPairOverflowSub (..)
, CoinPairOverflowMul (..)
, DoubleInZeroToOneRange (..)
, EoSToIntOverflow (..)
, IntegerToCoinNoOverflow (..)
, IntegerToCoinOverflow (..)
, LessThanZe... |
f347c76755ceb27aedad41ec0e3d01f7bdceb37d96e1f1dbc20b93c7694ff271 | yashrk/raylib-scm | raylib-utils.scm | ;; Data structure helper functions
(define (bounding-box-max box)
(let ((new-vector (foreign-lambda* vector-3 (((c-pointer (struct BoundingBox)) box))
"Vector3* vector = (Vector3*)malloc(sizeof(Vector3));
*vector = box->max;
C_return(vector);")))
(set-finalizer! new-vector free)
new-vector))... | null | https://raw.githubusercontent.com/yashrk/raylib-scm/b4c6fe17374ce4ddd4162fda37f4691b1e35b5f2/raylib-utils.scm | scheme | Data structure helper functions
")))
")))
")
")
")
")
")
")
")
")
")
")
")
Gray
Yellow
Gold
Orange
Pink
Red
Maroon
Green
Dark Green
Blue
Dark Blue
Purple
Violet
Dark Purple
Beige
Brown
White
Black
Blank (Transparent)
Magenta |
(define (bounding-box-max box)
(let ((new-vector (foreign-lambda* vector-3 (((c-pointer (struct BoundingBox)) box))
(set-finalizer! new-vector free)
new-vector))
(define (bounding-box-min box)
(let ((new-vector (foreign-lambda* vector-3 (((c-pointer (struct BoundingBox)) box))
(set-finalizer! new-vect... |
9b641c724182e30c6151e2cdbf3360803e806d0b546098a9f334c0da9534306f | melange-re/melange | lam_iter.ml | Copyright ( C ) 2018 - Hongbo Zhang , 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 License , or
* ( at your option ) an... | null | https://raw.githubusercontent.com/melange-re/melange/bcaf468572532f255262999d78af80585f25ecc0/jscomp/core/lam_iter.ml | ocaml | Copyright ( C ) 2018 - Hongbo Zhang , 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 License , or
* ( at your option ) an... | |
0ab7efa9c8a7fc444b9701df65e374d89e24e6da3ba2420baeb6d4e67fd31103 | winterland1989/magic-haskell | ReaderRender.hs | module ReaderRender where
import Control.Applicative
newtype Reader r a = Reader { runReader :: r -> a }
instance Functor (Reader r) where
fmap f m = Reader $ \r -> f (runReader m r)
instance Applicative (Reader r) where
pure a = Reader $ \_ -> a
a <*> b = Reader $ \r -> runReader a r $ runReader b r
... | null | https://raw.githubusercontent.com/winterland1989/magic-haskell/027362d7feb175b10eafa6f12873009ae7e0fb57/code/ReaderRender.hs | haskell | module ReaderRender where
import Control.Applicative
newtype Reader r a = Reader { runReader :: r -> a }
instance Functor (Reader r) where
fmap f m = Reader $ \r -> f (runReader m r)
instance Applicative (Reader r) where
pure a = Reader $ \_ -> a
a <*> b = Reader $ \r -> runReader a r $ runReader b r
... | |
25ad25d19ba1e87942af66f2b9ec9d297d0961759a3bde171d8d5e731b8c334f | Helium4Haskell/helium | IndirectRecTypeSyn.hs | module IndirectRecTypeSyn where
type A = B
type B = (C,C)
type C = [A]
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticerrors/IndirectRecTypeSyn.hs | haskell | module IndirectRecTypeSyn where
type A = B
type B = (C,C)
type C = [A]
| |
85a0023b63332c4eb5b8a1982aea83fb3dcd63b98ac126b82714d95b79b1226c | broadinstitute/firecloud-ui | body.cljs | (ns broadfcui.common.table.body
(:require
[dmohs.react :as react]
[broadfcui.common :as common]
[broadfcui.common.flex-utils :as flex]
[broadfcui.common.icons :as icons]
[broadfcui.common.table.utils :as table-utils]
[broadfcui.utils :as utils]
[broadfcui.utils.react :as react-utils]
))
(def... | null | https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/common/table/body.cljs | clojure | (ns broadfcui.common.table.body
(:require
[dmohs.react :as react]
[broadfcui.common :as common]
[broadfcui.common.flex-utils :as flex]
[broadfcui.common.icons :as icons]
[broadfcui.common.table.utils :as table-utils]
[broadfcui.utils :as utils]
[broadfcui.utils.react :as react-utils]
))
(def... | |
259850a1388be7e416c1deaf4a2116e805c138fa67c3037fde534cd49eb8a246 | AlexKnauth/debug | language-info.rkt | #lang racket/base
(provide get-language-info)
(require racket/match)
(define (get-language-info data)
(define other-get-info
(match data
[(vector mod sym data2)
((dynamic-require mod sym) data2)]
[_ (lambda (key default) default)]))
(lambda (key default)
(case key
[(configure-run... | null | https://raw.githubusercontent.com/AlexKnauth/debug/aa798842c09ece55c2a088f09d30e398d2b77fee/debug/lang/language-info.rkt | racket | #lang racket/base
(provide get-language-info)
(require racket/match)
(define (get-language-info data)
(define other-get-info
(match data
[(vector mod sym data2)
((dynamic-require mod sym) data2)]
[_ (lambda (key default) default)]))
(lambda (key default)
(case key
[(configure-run... | |
aec3bcb5c7183e429067690d40451f5fa4b2afc26f04a0b208bbd6f5acf850d6 | roddyyaga/ocoi | responses.ml | module Created = struct
module type Int = sig
type t = int
end
module Int = struct
type t = int
end
end
module type No_content = sig
type t = unit
end
module No_content = struct
type t = unit
end
module type Json = sig
type t
val t_of_yojson : Yojson.Safe.t -> t
end
module type Json_list =... | null | https://raw.githubusercontent.com/roddyyaga/ocoi/0a07e9457add9890cb507ac8bb4e55044d86a640/js_ocoi/responses.ml | ocaml | module Created = struct
module type Int = sig
type t = int
end
module Int = struct
type t = int
end
end
module type No_content = sig
type t = unit
end
module No_content = struct
type t = unit
end
module type Json = sig
type t
val t_of_yojson : Yojson.Safe.t -> t
end
module type Json_list =... | |
db97a2a191d3718441063f1a2b003a0512657a7abceca35a13280d1ed09c48ab | Deep-Symmetry/afterglow | chris.clj | (ns afterglow.shows.chris
"Cues for shows Chris wants to run for Rhett. Useful as an example of
how a small show run by someone unfamiliar with Afterglow was
organized after a few years of not working with it."
(:require [afterglow.beyond :as beyond]
[afterglow.channels :as chan]
[afterg... | null | https://raw.githubusercontent.com/Deep-Symmetry/afterglow/417063841a5a2f5637e33f774ac6a69d1e70e6bf/src/afterglow/shows/chris.clj | clojure | A chase which overlays on other movement cues, gradually taking over the lights
Some macros based on the pan/tilt oscillator cues
Spread a rainbow across a bar of music
Spread a rainbow across the light grid
Spread a rainbow across just the main rig, repeating
beyond that, irrespective of other lights' positions.... | (ns afterglow.shows.chris
"Cues for shows Chris wants to run for Rhett. Useful as an example of
how a small show run by someone unfamiliar with Afterglow was
organized after a few years of not working with it."
(:require [afterglow.beyond :as beyond]
[afterglow.channels :as chan]
[afterg... |
a8ffbbd6c89aeca3051cc6f89f5a9f506a746d24cd843cfe8febb77635ed9fde | clojurewerkz/machine_head | conversion.clj | (ns clojurewerkz.machine-head.conversion
"Internal conversion functions that transform
Clojure data structures to Paho Java client classes"
(:require [clojurewerkz.support.chars :refer [to-char-array]]
[clojurewerkz.support.bytes :refer [to-byte-array]]
[clojurewerkz.prope... | null | https://raw.githubusercontent.com/clojurewerkz/machine_head/e213613cc0375e4acaadd4103d80ac69cc5f17fb/src/clojure/clojurewerkz/machine_head/conversion.clj | clojure | (ns clojurewerkz.machine-head.conversion
"Internal conversion functions that transform
Clojure data structures to Paho Java client classes"
(:require [clojurewerkz.support.chars :refer [to-char-array]]
[clojurewerkz.support.bytes :refer [to-byte-array]]
[clojurewerkz.prope... | |
3ba9b5a5fe50f325c518bb7cb686e7e13f8c44edd02665a9c2c8326f852fb26a | PLTools/OCanren | test022newsyntax.ml | open OCanren
open OCanren.Std
let _ =
Stdlib.List.iter (fun n -> print_endline (GT.show Std.Nat.ground n)) @@
Stream.take ~n:1 @@
run q (fun n ->
ocanren {fresh c in Nat.(<=) 0 n
& Nat.(<=) n 0
& n == Nat.zero })
(fun rr ... | null | https://raw.githubusercontent.com/PLTools/OCanren/1ead64bde16b0eb339a6bf790ea871e19bbaccd0/regression/test022newsyntax.ml | ocaml | open OCanren
open OCanren.Std
let _ =
Stdlib.List.iter (fun n -> print_endline (GT.show Std.Nat.ground n)) @@
Stream.take ~n:1 @@
run q (fun n ->
ocanren {fresh c in Nat.(<=) 0 n
& Nat.(<=) n 0
& n == Nat.zero })
(fun rr ... | |
49d81ad885b6af9f243fa334acd73edb184669c4eda9c3afe4aac24e57ec7de7 | re-xyr/speff | Native.hs | # LANGUAGE CPP #
# LANGUAGE UnboxedTuples #
{-# LANGUAGE UnliftedNewtypes #-}
-- |
Copyright : ( c ) 2023
-- License: BSD3
-- Maintainer:
-- Stability: experimental
Portability : non - portable ( GHC only )
--
Delimited control monad based on the GHC primops introduced by . This implementat... | null | https://raw.githubusercontent.com/re-xyr/speff/419f07733cf5f1359c84f3dacb487896e06e3506/src/Sp/Internal/Ctl/Native.hs | haskell | # LANGUAGE UnliftedNewtypes #
|
License: BSD3
Maintainer:
Stability: experimental
computations not utilizing delimited control. On the other hand, frequent capture in this monad is slower than the
monadic implementation.
handlers to be installed in the middle of the prompt frame and the control call.
| Instal... | # LANGUAGE CPP #
# LANGUAGE UnboxedTuples #
Copyright : ( c ) 2023
Portability : non - portable ( GHC only )
Delimited control monad based on the GHC primops introduced by . This implementation is zero cost for
module Sp.Internal.Ctl.Native
( Marker
, Ctl
, freshMarker
, prompt
, c... |
e9daffbc48dd80dd4a237dfde39f5d0f8e3bed8d57a5213bfa1c367816770b05 | mtgred/netrunner | state.clj | (ns game.core.state)
(defrecord State
[angel-arena-info
active-player
bonus
click-state
corp
corp-phase-12
effects
effect-completed
eid
encounters
end-run
end-time
end-turn
events
format
gameid
history
log
loser
losing-deck-id
losing-user
mark
options... | null | https://raw.githubusercontent.com/mtgred/netrunner/f3928b220355a4186301d0067344f1dd1ad37eac/src/clj/game/core/state.clj | clojure | (ns game.core.state)
(defrecord State
[angel-arena-info
active-player
bonus
click-state
corp
corp-phase-12
effects
effect-completed
eid
encounters
end-run
end-time
end-turn
events
format
gameid
history
log
loser
losing-deck-id
losing-user
mark
options... | |
9af5664f67429b264db3224f8cf6d7994fcfb63aaff20083da1a225874c73fd6 | bitc/hs-term-emulator | InternalSpec.hs | # LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
module System.Terminal.Emulator.Parsing.InternalSpec where
import Control.Applicative (many)
import Data.Attoparsec.Text
import Data.Text (Text)
import qualified System.Console.ANSI.Types as SGR
import System.Terminal.Emulator.Parsing (parseTermAtom)
imp... | null | https://raw.githubusercontent.com/bitc/hs-term-emulator/0fa71907da15d592f68adc17c4dc470d9b44d243/hs-term-emulator/test/System/Terminal/Emulator/Parsing/InternalSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE OverloadedLists #
module System.Terminal.Emulator.Parsing.InternalSpec where
import Control.Applicative (many)
import Data.Attoparsec.Text
import Data.Text (Text)
import qualified System.Console.ANSI.Types as SGR
import System.Terminal.Emulator.Parsing (parseTermAtom)
import System.Terminal.Emulator.Parsin... |
a08fe1f4ebf5d3a991ad8c7158c2ac1f64fd745c6ae42c6bf3b5f259150a800d | fakedata-haskell/fakedata | BirdSpec.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
module BirdSpec where
import qualified Data.Map as M
import Data.Text hiding (all, map)
import qualified Data.Text as T
import qualified Data.Vector as V
import Faker hiding (defaultFakerSettings)
import Faker.Creature.Bird
import Test.Hspec
import T... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/ea938c38845b274e28abe7f4e8e342f491e83c89/test/BirdSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
module BirdSpec where
import qualified Data.Map as M
import Data.Text hiding (all, map)
import qualified Data.Text as T
import qualified Data.Vector as V
import Faker hiding (defaultFakerSettings)
import Faker.Creature.Bird
import Test.Hspec
import TestImport
import Faker.Internal
is... |
7db729d0e7fb2195fbb7b527b934c1210f034488ef4553ff6164313b08155528 | ucsd-progsys/nate | frx_synth.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_synth.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... |
595681a3b2e9f2131e2e82b73371a802b7f886e151f941863f2d7b77fa0f1226 | sbcl/sbcl | arith-2.pure.lisp | ;;;; arithmetic tests with side effects
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This software is in th... | null | https://raw.githubusercontent.com/sbcl/sbcl/ab82559ed51674d8b0cd956662f3b7c81f5edac9/tests/arith-2.pure.lisp | lisp | arithmetic tests with side effects
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information. |
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(defmacro define-compiled-fun (fun name)
`(progn
(declaim (notinline ,name))
(defun ,name (&rest args)
(declare (optimize safety))
(case (length ar... |
c7ba72a29c20c6dbf143bf3968a685ffa7e24ae068c595db4734b4801025eeb1 | rudymatela/fitspec | haskell-src-exts.hs | # LANGUAGE TemplateHaskell #
import Test.FitSpec
import Language.Haskell.Exts
instance Eq a => Eq (ParseResult a) where
ParseOk x == ParseOk y = x == y
ParseFailed l1 s1 == ParseFailed l2 s2 = l1 == l2 && s1 == s2
_ == _ = False
deriveMutableCascading ''ParseResult
deriveMutableCascading ''Module
deriveMutableC... | null | https://raw.githubusercontent.com/rudymatela/fitspec/f67b0dfc4d7413d62e6c6f4df36df3703f2a4302/bench/haskell-src-exts.hs | haskell | Not true:
_ -> True | # LANGUAGE TemplateHaskell #
import Test.FitSpec
import Language.Haskell.Exts
instance Eq a => Eq (ParseResult a) where
ParseOk x == ParseOk y = x == y
ParseFailed l1 s1 == ParseFailed l2 s2 = l1 == l2 && s1 == s2
_ == _ = False
deriveMutableCascading ''ParseResult
deriveMutableCascading ''Module
deriveMutableC... |
b7a1ed2b10f848a22d916af898816edab58c1fb6d2903204bd3447961611d915 | dongcarl/guix | arcan.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2019 L p R n d n < >
;;;
;;; 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
the Free Software Foundation ; either version... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/packages/arcan.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 © 2019 L p R n d n < >
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 arcan)
#:use-module (guix build-system cmake)
#:use-module (guix bu... |
35bc839e0f5c8985836f84646c70a09a717d3629545141c7d39d4d328505011b | melange-re/melange | string.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/stdlib-412/stdlib_modules/string.ml | ocaml | ************************************************************************
OCaml
... | , projet Gallium , INRIA Rocquencourt
Copyright 2014 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
external length : string -> int = "%string_length"
external get : string -> int -> char = "%string_safe_g... |
8bada5633d40f1a22d1d0a717cb0bf54c16a07d1e61281bdff3720fb3a623252 | hjwylde/werewolf | Command.hs | |
Module : Game . Werewolf . Message . Command
Description : Suite of command messages used throughout the game .
Copyright : ( c ) , 2016
License : :
A ' Message ' is used to relay information back to either all players or a single player . This module
defines suite of command mess... | null | https://raw.githubusercontent.com/hjwylde/werewolf/d22a941120a282127fc3e2db52e7c86b5d238344/app/Game/Werewolf/Message/Command.hs | haskell | * Quit
* Boot
* Circle
* Choose
* End
* Help
* Raise
* Status
* Unvote
* Version
* Vote | |
Module : Game . Werewolf . Message . Command
Description : Suite of command messages used throughout the game .
Copyright : ( c ) , 2016
License : :
A ' Message ' is used to relay information back to either all players or a single player . This module
defines suite of command mess... |
808fac166f5225c4d97f284c004b0d01d9c2032b07a39535cb7bf11fb70b449b | vehicle-lang/vehicle | Polarity.hs | # OPTIONS_GHC -Wno - orphans #
module Vehicle.Compile.Type.Subsystem.Polarity
( module Core,
)
where
import Vehicle.Compile.Type.Core
import Vehicle.Compile.Type.Monad
import Vehicle.Compile.Type.Subsystem.InputOutputInsertion
import Vehicle.Compile.Type.Subsystem.Polarity.AnnotationRestrictions (assertUnquantifi... | null | https://raw.githubusercontent.com/vehicle-lang/vehicle/3a3548f9b48c3969212ccb51e954d4d4556ea815/vehicle/src/Vehicle/Compile/Type/Subsystem/Polarity.hs | haskell | -----------------------------------------------------------------------------
Conversion | # OPTIONS_GHC -Wno - orphans #
module Vehicle.Compile.Type.Subsystem.Polarity
( module Core,
)
where
import Vehicle.Compile.Type.Core
import Vehicle.Compile.Type.Monad
import Vehicle.Compile.Type.Subsystem.InputOutputInsertion
import Vehicle.Compile.Type.Subsystem.Polarity.AnnotationRestrictions (assertUnquantifi... |
d14599428a90ad56b332bc973979bf18f0af10a6ae31d4c153cea2fe3a5bef6e | dhess/sicp-solutions | ex2.37.scm | (define (accumulate op initial sequence)
(if (null? sequence)
initial
(op (car sequence)
(accumulate op initial (cdr sequence)))))
(define (dot-product v w)
(accumulate + 0 (map * v w)))
(define nil (quote ()))
(define (accumulate-n op init seqs)
(if (null? (car seqs))
nil
(co... | null | https://raw.githubusercontent.com/dhess/sicp-solutions/2cf78db98917e9cb1252efda76fddc8e45fe4140/chap2/ex2.37.scm | scheme | (define (accumulate op initial sequence)
(if (null? sequence)
initial
(op (car sequence)
(accumulate op initial (cdr sequence)))))
(define (dot-product v w)
(accumulate + 0 (map * v w)))
(define nil (quote ()))
(define (accumulate-n op init seqs)
(if (null? (car seqs))
nil
(co... | |
99c1ed87ca3a24c86e4bed0fd5d88916cc5caa2c2ecf40ef22f408860bc36c55 | ygmpkk/house | PCIBridge.hs | | PCI to PCI bridges
module Kernel.PCI.PCIBridge
( PCIBridge, toPCIBridge
, primBus, secBus, subBus
) where
import Kernel.PCI.ConfigSpace
import Kernel.PCI.DevInfo
import Kernel.PCI.Device
import Data.Word
import H.Monad(H)
import Kernel.Bits
data PCIBridge = P { _primBus :: Word8
... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/kernel/Kernel/PCI/PCIBridge.hs | haskell | | PCI to PCI bridges
module Kernel.PCI.PCIBridge
( PCIBridge, toPCIBridge
, primBus, secBus, subBus
) where
import Kernel.PCI.ConfigSpace
import Kernel.PCI.DevInfo
import Kernel.PCI.Device
import Data.Word
import H.Monad(H)
import Kernel.Bits
data PCIBridge = P { _primBus :: Word8
... | |
afd982d0b810957e18e7e727dca28020594a3910e1367a718de656b120b0007b | psholtz/MIT-SICP | exercise1-46.scm | ;;
Exercise 1.46
;;
;; Several of the numerical methods described in this chapter are instances of an extremely
;; general computational strategy known as iterative improvement. Iterative improvement says that,
;; to compute something, we start with an initial guess for the answer, test if the guess
;; is good enou... | null | https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-1.3/mit-scheme/exercise1-46.scm | scheme |
Several of the numerical methods described in this chapter are instances of an extremely
general computational strategy known as iterative improvement. Iterative improvement says that,
to compute something, we start with an initial guess for the answer, test if the guess
is good enough, and otherwise improve th... | Exercise 1.46
gues as the new guess . Write a procedure " iterative - improve " that takes two procedures as
(define (iterative-improvement good-enough? improve)
(lambda (first-guess)
(define (iteration guess)
(if (good-enough? guess)
guess
(iteration (improve guess))))
(iteration first-guess... |
26be229fb52aa2aa14589e2deaee226643a8bb44a451edcf0843e8a18ea05dfd | deadeyejoe/fabrikk | core.cljc | (ns fabrikk.output.core
(:require [fabrikk.build-context.interface :as context]
[fabrikk.entity.interface :as entity]
[fabrikk.directory.interface :as directory]))
(defn ->result [context]
(-> context context/primary entity/value))
(defn ->result-meta [context]
(let [bare-entity (->resul... | null | https://raw.githubusercontent.com/deadeyejoe/fabrikk/c731cd435baaf241450a9b280286b894c8cee81c/components/output/src/fabrikk/output/core.cljc | clojure | if factory is nil, don't record it | (ns fabrikk.output.core
(:require [fabrikk.build-context.interface :as context]
[fabrikk.entity.interface :as entity]
[fabrikk.directory.interface :as directory]))
(defn ->result [context]
(-> context context/primary entity/value))
(defn ->result-meta [context]
(let [bare-entity (->resul... |
7f8bc0cdd4741cd071082a155abb165522a487f3b1135663aad946ebf42cb046 | fetburner/Coq2SML | conv_oracle.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/kernel/conv_oracle.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
use recommended default
summary o... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Created by as part of the... |
830ea5c51dd132df49b05988f3668bcaa457d609f273ed657ee0218f6b12c665 | ndmitchell/catch | Template.hs |
module Template(Template, templateInit, templateGet) where
import Req
import Reduce
import Fixp
import System.IO
import Safe
import General
import Data.Proposition
import Data.IORef
import Data.Char
import Data.List
import Control.Monad
import Yhc.Core
data Template = Template Core Handle (IORef [(Req, Reqs)])
te... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/analyse/Template.hs | haskell | need to make it more abstract, and then more concrete, to satisfy the cache
expr is Call
can do it more efficiently, a fixp cut
a let bound var |
module Template(Template, templateInit, templateGet) where
import Req
import Reduce
import Fixp
import System.IO
import Safe
import General
import Data.Proposition
import Data.IORef
import Data.Char
import Data.List
import Control.Monad
import Yhc.Core
data Template = Template Core Handle (IORef [(Req, Reqs)])
te... |
8d0c83945229f389777b2c4fa446fbcf9c85edc4fce116e8a53048dfc906ee06 | Plutonomicon/Shrinker | Tactics.hs | module Shrink.Tactics.Tactics (
tactList,
) where
import Shrink.ScopeM (liftScope, newName)
import Shrink.Tactics.Util (appBind, completeTactic, equiv, makeLambs, sepMaybe, subTerms, succeds, unsub, weakEquiv, whnf, withTemplate)
import Shrink.Types (Tactic, WhnfRes (Err, Success, Unclear))
import Control.Monad (gu... | null | https://raw.githubusercontent.com/Plutonomicon/Shrinker/37bf56e83d0d568232ff2be1ae4daf1946a81189/src/Shrink/Tactics/Tactics.hs | haskell | module Shrink.Tactics.Tactics (
tactList,
) where
import Shrink.ScopeM (liftScope, newName)
import Shrink.Tactics.Util (appBind, completeTactic, equiv, makeLambs, sepMaybe, subTerms, succeds, unsub, weakEquiv, whnf, withTemplate)
import Shrink.Types (Tactic, WhnfRes (Err, Success, Unclear))
import Control.Monad (gu... | |
0f43f190ee10e3e4f986df46dc0422d01a37ffaa73aae096e4e4b82ee88d29e2 | russ/openpoker | bot.erl | Copyright ( C ) 2005 - 2008 Wager Labs , SA
%%%%
%%%% THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
CREATIVE COMMONS PUBLIC LICENSE ( " CCPL " OR " LICENSE " ) . THE WORK IS
%%%% PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF
%%%% THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICE... | null | https://raw.githubusercontent.com/russ/openpoker/62edd72a35b9ef52f55da9303cf1e06142e95895/src/bot.erl | erlang |
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF
THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT
LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT
AND AGREE TO BE BOUND BY THE TERM... | Copyright ( C ) 2005 - 2008 Wager Labs , SA
CREATIVE COMMONS PUBLIC LICENSE ( " CCPL " OR " LICENSE " ) . THE WORK IS
-nc-sa/3.0/us/
-module(bot).
-behaviour(gen_server).
-export([init/1, handle_call/3, handle_cast/2,
handle_info/2, terminate/2, code_change/3]).
-export([start/4, stop/1, send/2, watc... |
51c602ae577814c81c6c53c3f5ec177ab28433d1e019ef9d08105bd38ace6e4e | LesleyLai/ocamlpt | aabb.ml | type t = { min: Vec3.t; max: Vec3.t }
let create min max = { min; max }
let hit (r: Ray.t) (tmin: float) (tmax: float) (aabb: t) =
let helper get_axis old_tmin old_tmax =
let invD = 1.0 /. (get_axis r.direction) in
let (t0, t1) =
let (t0', t1') =
(((get_axis aabb.min) -. (get_axis r.origin)) *... | null | https://raw.githubusercontent.com/LesleyLai/ocamlpt/65c72fc473e98e1fe802b25807dc74a19a6a3d3e/lib/aabb.ml | ocaml | type t = { min: Vec3.t; max: Vec3.t }
let create min max = { min; max }
let hit (r: Ray.t) (tmin: float) (tmax: float) (aabb: t) =
let helper get_axis old_tmin old_tmax =
let invD = 1.0 /. (get_axis r.direction) in
let (t0, t1) =
let (t0', t1') =
(((get_axis aabb.min) -. (get_axis r.origin)) *... | |
3454f793a32e2c92562277ab2441b3901fd3c63f0bdb53cc27d373f0324abeb1 | mbj/stratosphere | SamlConfigOptionsProperty.hs | module Stratosphere.OpenSearchServerless.SecurityConfig.SamlConfigOptionsProperty (
SamlConfigOptionsProperty(..), mkSamlConfigOptionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
impo... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/opensearchserverless/gen/Stratosphere/OpenSearchServerless/SecurityConfig/SamlConfigOptionsProperty.hs | haskell | module Stratosphere.OpenSearchServerless.SecurityConfig.SamlConfigOptionsProperty (
SamlConfigOptionsProperty(..), mkSamlConfigOptionsProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
impo... | |
52024361c1f16e3182d2351cc5684f4dcca1f5e293d2ee0bf887e7bcb1bbe2f9 | OCamlPro/ocamlexc | printbasic.ml | (***********************************************************************)
(* *)
(* Ocamlexc *)
(* *)
, projet Cris... | null | https://raw.githubusercontent.com/OCamlPro/ocamlexc/a9ddcfff6f376f5dd6c5fcc3211b8f89e36f79fe/typing/printbasic.ml | ocaml | *********************************************************************
Ocamlexc
... | , projet Cristal , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Format ;;
let rec pp_longident ppf = function
| Longident.Lident name -> fprintf ppf "%s" name
| Long... |
303c7a526c6fc986c761103f0c89ff7c016f3c494b0d04a3b847d3fbeb0c39ff | runeksvendsen/bitcoin-payment-channel | Orphans.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeSynonymInstances #-}
module PaymentChannel.Internal.Serialization.Orphans where
import PaymentChannel.Internal.Error
import PaymentChannel.Internal.Util
import qualified Data.Time.Clock as Clock... | null | https://raw.githubusercontent.com/runeksvendsen/bitcoin-payment-channel/3d2ee56c027571d1a86092c317640e5eae7adde3/src/PaymentChannel/Internal/Serialization/Orphans.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances # | # LANGUAGE FlexibleInstances #
module PaymentChannel.Internal.Serialization.Orphans where
import PaymentChannel.Internal.Error
import PaymentChannel.Internal.Util
import qualified Data.Time.Clock as Clock
import qualified Data.Time.Clock.POSIX as Clock
instance Serializ... |
254aa8d4fa9a8dc71afc065b45392280ef46fd550a292492a5f8b3a8e5d94629 | amnh/PCG | Primitive.hs | -----------------------------------------------------------------------------
-- |
-- Module : PCG.Syntax.Primitive
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
Provides the Primitive values of the... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/language/src/PCG/Syntax/Primitive.hs | haskell | ---------------------------------------------------------------------------
|
Module : PCG.Syntax.Primitive
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
that reports type errors.
Contexts of this module are intended to be consumed by a syntactic parser
in... | Copyright : ( c ) 2015 - 2021 Ward Wheeler
Provides the Primitive values of the PCG scripting language that are
embedded in the PCG scripting language syntax . Provides a contextual parser
# LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE T... |
7456ed854b04eae14df5f27b415eca0c9c0b5798b98fe42d485f711d47e408bc | rbkmoney/hellgate | hg_access_control.erl | -module(hg_access_control).
HG access controll
-export([check_user/2]).
-spec check_user(woody_user_identity:user_identity(), dmsl_domain_thrift:'PartyID'()) -> ok | invalid_user.
check_user(#{id := PartyID, realm := <<"external">>}, PartyID) ->
ok;
check_user(#{id := _AnyID, realm := <<"internal">>}, _PartyID... | null | https://raw.githubusercontent.com/rbkmoney/hellgate/c3e7413db06296a72fb64268eca98e63379d2ef5/apps/hellgate/src/hg_access_control.erl | erlang | -module(hg_access_control).
HG access controll
-export([check_user/2]).
-spec check_user(woody_user_identity:user_identity(), dmsl_domain_thrift:'PartyID'()) -> ok | invalid_user.
check_user(#{id := PartyID, realm := <<"external">>}, PartyID) ->
ok;
check_user(#{id := _AnyID, realm := <<"internal">>}, _PartyID... | |
21057c63b7c5450dc1b7a4ef7df2ff36473da8813438539a2fc1993a45f2fb13 | malcolmreynolds/GSLL | hypergeometric.lisp | ;; Hypergeometric function
, Fri Apr 28 2006 - 23:00
Time - stamp : < 2008 - 11 - 16 14:27:48EST hypergeometric.lisp >
$ Id$
(in-package :gsl)
(defmfun hypergeometric-0F1 (c x)
"gsl_sf_hyperg_0F1_e" ((c :double) (x :double) (ret sf-result))
"The hypergeometric function 0F1(c,x).")
(defgeneric hypergeo... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/special-functions/hypergeometric.lisp | lisp | Hypergeometric function
****************************************************************************
Examples and unit test
**************************************************************************** | , Fri Apr 28 2006 - 23:00
Time - stamp : < 2008 - 11 - 16 14:27:48EST hypergeometric.lisp >
$ Id$
(in-package :gsl)
(defmfun hypergeometric-0F1 (c x)
"gsl_sf_hyperg_0F1_e" ((c :double) (x :double) (ret sf-result))
"The hypergeometric function 0F1(c,x).")
(defgeneric hypergeometric-1F1 (m n x)
"T... |
ed50c6c379925f79de5c8628a6aeda07af199ff4958f268401f30e5db5e218e2 | kadena-io/chainweb-node | RestAPI.hs | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
#ifndef CURRENT_PACKAGE_VERSION
#define CURRENT_PACKAGE_VERSION "UNKNOWN"
#endif
-- |
Module : . RestAPI
Copyright : Copyright © 2018 Kadena LLC .
License ... | null | https://raw.githubusercontent.com/kadena-io/chainweb-node/aff594a05096341d01ae50a9f37056b2519025d2/src/Chainweb/RestAPI.hs | haskell | |
Stability: experimental
Every component that defines an API should add it to 'someChainwebApi' and
'someChainwebServer' and also re-export the module with API client functions.
* Utils
* Component Triggers
* Service API Server
** BlockHeaderDb API Client
** P2P API Client
internal modules
--------------... | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
#ifndef CURRENT_PACKAGE_VERSION
#define CURRENT_PACKAGE_VERSION "UNKNOWN"
#endif
Module : . RestAPI
Copyright : Copyright © 2018 Kadena LLC .
License : MIT... |
11c02ed76e726ac0e055d1093e624c710905e894e231d6c0d1dac35231f0fd0b | lambdamikel/VISCO | reldef3.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : GEOMETRY ; Base : 10 -*-
(in-package geometry)
(defgeneric calculate-relation (obj1 obj2 &rest rest)
(:documentation "Recognizes various spatial relationships between obj1 and obj2."))
;;;
Punkt - Relationen ( Punkt ist erstes Argument )
;;;
(defun i... | null | https://raw.githubusercontent.com/lambdamikel/VISCO/836d325b5c6037517470835c635b3063446d3d8a/src/GEOMETRY/reldef3.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : GEOMETRY ; Base : 10 -*-
"X"
"T"
"covers", "covered-by"
"contains", "inside", "overlaps" |
(in-package geometry)
(defgeneric calculate-relation (obj1 obj2 &rest rest)
(:documentation "Recognizes various spatial relationships between obj1 and obj2."))
Punkt - Relationen ( Punkt ist erstes Argument )
(defun inverse (rel)
(case rel
(contains 'inside)
(inside 'contains)
(covered-by 'covers)... |
c9a5213448bced2c2e1556c02e34d1937d76cb222d90e89f68706d2d3abf7164 | clingen-data-model/genegraph | curation.clj | (ns genegraph.source.graphql.common.curation
(:require [genegraph.database.query :as q :refer [create-query]]
[clojure.string :as s]))
(def gene-validity-bgp
'[[validity_proposition :sepio/has-subject gene]
[validity_proposition :sepio/has-object disease]
[validity_proposition :rdf/type :sepio/... | null | https://raw.githubusercontent.com/clingen-data-model/genegraph/cdd17ca9b59822ebbbd927f0a468d668f2ba2d52/src/genegraph/source/graphql/common/curation.clj | clojure | Adding the reference to the assertion, plus any fields likely
to be used as sort values
predicates are supported in the algebra, is messy as written. | (ns genegraph.source.graphql.common.curation
(:require [genegraph.database.query :as q :refer [create-query]]
[clojure.string :as s]))
(def gene-validity-bgp
'[[validity_proposition :sepio/has-subject gene]
[validity_proposition :sepio/has-object disease]
[validity_proposition :rdf/type :sepio/... |
468a5a79dc766e5fb1faecea897da3698f715420076c7025d975722750ff366b | tsoding/kgbotka | Client.hs | module Main where
import Control.Concurrent
import Control.Concurrent.STM
import qualified Control.Exception as E
import qualified Data.ByteString.Char8 as C
import Data.Functor
import Network.Socket hiding (recv, send)
import Network.Socket.ByteString (recv, send)
import System.IO
bufferSize :: Int
bufferSize = 1024... | null | https://raw.githubusercontent.com/tsoding/kgbotka/67278a93611b0abe4e07df7967559884263147aa/src/Client.hs | haskell | module Main where
import Control.Concurrent
import Control.Concurrent.STM
import qualified Control.Exception as E
import qualified Data.ByteString.Char8 as C
import Data.Functor
import Network.Socket hiding (recv, send)
import Network.Socket.ByteString (recv, send)
import System.IO
bufferSize :: Int
bufferSize = 1024... | |
7851035be37784839a1adcd398712bc4b5b7395a4cd292c6a351495d4d7f16b1 | ertugrulcetin/ClojureNews | submit.cljs | (ns route.submit
(:require-macros [secretary.core :refer [defroute]])
(:require [controller.submit :as controller]
[secretary.core]))
(defroute submit "/submit" []
(controller/submit-page)) | null | https://raw.githubusercontent.com/ertugrulcetin/ClojureNews/28002f6b620fa4977d561b0cfca0c7f6a635057b/src/cljs/route/submit.cljs | clojure | (ns route.submit
(:require-macros [secretary.core :refer [defroute]])
(:require [controller.submit :as controller]
[secretary.core]))
(defroute submit "/submit" []
(controller/submit-page)) | |
c94ddaa89385299b77b87585c0528004cbd092443d3763e29b1b4cec03f70cd4 | incoherentsoftware/defect-process | SoundIndices.hs | module Menu.SoundIndices
( module Menu.SoundIndices.Types
, mkMenuSoundIndices
) where
import Control.Monad.IO.Class (MonadIO)
import Audio.Fmod
import Menu.SoundIndices.Types
confirmSoundPath = "event:/SFX Events/UI/confirm" :: FilePath
confirmSmallSoundPath = "event:/SFX Events/UI/... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Menu/SoundIndices.hs | haskell | module Menu.SoundIndices
( module Menu.SoundIndices.Types
, mkMenuSoundIndices
) where
import Control.Monad.IO.Class (MonadIO)
import Audio.Fmod
import Menu.SoundIndices.Types
confirmSoundPath = "event:/SFX Events/UI/confirm" :: FilePath
confirmSmallSoundPath = "event:/SFX Events/UI/... | |
3c0ec76b1ef724bd9168fcd9d92ed87d82f7f8443380eb36b2ddb34158b0813d | DSCRV/lisk | Properties.hs | # LANGUAGE TemplateHaskell #
module Properties (runTests) where
import Data.Maybe (fromJust)
import Error.Base (unwrap)
import Evaluator (eval)
import Operators (primitives)
import Parser (Expr (..), parseLispValue, parseQuote)
import ... | null | https://raw.githubusercontent.com/DSCRV/lisk/841e23f1f5036748e3d179e3f96eedd5bcfdb555/tests/Properties.hs | haskell | # LANGUAGE TemplateHaskell #
module Properties (runTests) where
import Data.Maybe (fromJust)
import Error.Base (unwrap)
import Evaluator (eval)
import Operators (primitives)
import Parser (Expr (..), parseLispValue, parseQuote)
import ... | |
276b0baa0d505275ebb902962baed3afd60b0f7f0da8dab75a4caef22677def4 | cac-t-u-s/om-sharp | n-cercle-editor.lisp | ;============================================================================
; om#: visual programming language for computer-assisted music composition
;============================================================================
;
; This program is free software. For information on usage
; and redistribution... | null | https://raw.githubusercontent.com/cac-t-u-s/om-sharp/80f9537368471d0e6e4accdc9fff01ed277b879e/src/packages/score/math/n-cercle-editor.lisp | lisp | ============================================================================
om#: visual programming language for computer-assisted music composition
============================================================================
This program is free software. For information on usage
and redistribution, see ... |
(in-package :om)
(defclass CercleEditor (OMEditor)
((front :accessor front :initform 0)
(bg-mode :accessor bg-mode :initform :draw-all)))
(defmethod object-has-editor ((self n-cercle)) t)
(defmethod get-editor-class ((self n-cercle)) 'CercleEditor)
(defclass CercleView (omeditorview) ())
UPD... |
6344f4ae2a9a3b15a1af272e676aa3073ac73a26c7daacc7c29aa748c09f72b7 | bytekid/mkbtt | sTheory.ml |
let theta_general u v =
;;
let psi_general u v = Trs.add (Rule.of_terms u v) Trs.empty
| null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mascott/src/sTheory.ml | ocaml |
let theta_general u v =
;;
let psi_general u v = Trs.add (Rule.of_terms u v) Trs.empty
| |
7530c2c49418a3b9a3c15822512336ac827a796c0e2f1a689d6560f66dcd2a66 | bufferswap/ViralityEngine | textures.lisp | (in-package #:virality.extension)
(tex:define-texture debug-texture (:texture-2d clamp-all-edges)
;; I can put overrides in here too specific to this texture.
(:data #((v::textures v::debug-0)
(v::textures v::debug-1)
(v::textures v::debug-2)
(v::textures v::debug-3)
(v:... | null | https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/definition/textures.lisp | lisp | I can put overrides in here too specific to this texture. | (in-package #:virality.extension)
(tex:define-texture debug-texture (:texture-2d clamp-all-edges)
(:data #((v::textures v::debug-0)
(v::textures v::debug-1)
(v::textures v::debug-2)
(v::textures v::debug-3)
(v::textures v::debug-4)
(v::textures v::debug-5)
... |
771e4d2b1bf6b9f7b7af42623113981c66300edf651ff5f7e2cb7d5b34569c46 | qfpl/reflex-workshop | Attributes.hs | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... | null | https://raw.githubusercontent.com/qfpl/reflex-workshop/244ef13fb4b2e884f455eccc50072e98d1668c9e/src/Solutions/DOM/Elements/Attributes.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE GADTs #
let
elAttr "div" attrs $
w
let
elDynAttr "div" dAttrs $
w | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... |
49ad943f7a47350aeca13e5c752819cbbdfa0291b49271365c924a8fd735a13a | nasa/ogma | CommandFretComponentSpec2Copilot.hs | Copyright 2020 United States Government as represented by the Administrator
of the National Aeronautics and Space Administration . All Rights Reserved .
--
-- Disclaimers
--
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY
OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , IN... | null | https://raw.githubusercontent.com/nasa/ogma/b6fbac56154fd7190896ac2d7af188fc03113106/ogma-cli/src/CLI/CommandFretComponentSpec2Copilot.hs | haskell |
Disclaimers
SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, OR FREEDOM FROM INFRINGEMENT, ANY WARRANTY THAT THE
SUBJECT SOFTWARE WILL BE ERROR FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF
ANY MANNER, CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR
GOVERNM... | Copyright 2020 United States Government as represented by the Administrator
of the National Aeronautics and Space Administration . All Rights Reserved .
No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY
OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , INCLUDING , BUT NOT
L... |
048fdba3f53cffc7a46b95cb639edd9030ee2d14a8bc44dc552adca177bc6961 | huangz1990/SICP-answers | p202-multiplier.scm | ;;; p202-multiplier.scm
(define (multiplier m1 m2 product)
(define (process-new-value)
(cond
((or (and (has-value? m1) (= 0 (get-value m1)))
(and (has-value? m2) (= 0 (get-value m2))))
(set-value! product 0 me))
((and (has-value? m1) (has-value? m2))... | null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp3/code/p202-multiplier.scm | scheme | p202-multiplier.scm |
(define (multiplier m1 m2 product)
(define (process-new-value)
(cond
((or (and (has-value? m1) (= 0 (get-value m1)))
(and (has-value? m2) (= 0 (get-value m2))))
(set-value! product 0 me))
((and (has-value? m1) (has-value? m2))
(set-va... |
5ba1f7b954eb822767f2ccb5a9488da9a72ee69452c3ed86389bbab18d16ad23 | rcook/aws-via-haskell | Main.hs | |
Module : Main
Description : Lambda demo
Copyright : ( C ) , 2017
License : MIT
Maintainer :
Stability : experimental
Portability : portable
Module : Main
Description : Lambda demo
Copyright : (C) Richard Cook, 2017
License : MIT
Maintainer :
Stability : experimenta... | null | https://raw.githubusercontent.com/rcook/aws-via-haskell/3ca6167307abb0628cfe4c9ca4545657b0f41494/lambda/Main.hs | haskell | # LANGUAGE OverloadedStrings # | |
Module : Main
Description : Lambda demo
Copyright : ( C ) , 2017
License : MIT
Maintainer :
Stability : experimental
Portability : portable
Module : Main
Description : Lambda demo
Copyright : (C) Richard Cook, 2017
License : MIT
Maintainer :
Stability : experimenta... |
34f2935acfb7a3ce60139d09e886e6f3677caa1c91ac702bc598fb3f3fe73449 | nrdufour/urdf | test_util.erl | This file is part of Emonk released under the MIT license .
% See the LICENSE file for more information.
-module(test_util).
-export([run/2]).
run(Plan, Fun) ->
etap:plan(Plan),
try
Fun(),
etap:end_tests()
catch
Type:Error ->
etap:diag("Test died abnormally: ~p:~p", [... | null | https://raw.githubusercontent.com/nrdufour/urdf/e4a4b033ac9154e038bec3d06077cda2ea3ca4e0/test/test_util.erl | erlang | See the LICENSE file for more information. | This file is part of Emonk released under the MIT license .
-module(test_util).
-export([run/2]).
run(Plan, Fun) ->
etap:plan(Plan),
try
Fun(),
etap:end_tests()
catch
Type:Error ->
etap:diag("Test died abnormally: ~p:~p", [Type, Error]),
etap:diag("~p", [e... |
12f5656a32a45705c355a87deb35c43a28bcf8fea78dfcf67f85c2b6885997f7 | Yume-Labs/prism | render.clj | (ns prism.render
(:gen-class)
(:require [clojure.core.async :refer [>! go <! chan]]
[clojure.java.io :refer [file]]
[prism.db :refer :all]
[clojure2d.pixels :as px]
[clojure2d.color.blend :as blend]
[clojure2d.core :as c2d]
[clojure2d.color :as... | null | https://raw.githubusercontent.com/Yume-Labs/prism/1dd2c0f4eac8bbd32877a40617b36c1319d8f114/src/prism/render.clj | clojure | (ns prism.render
(:gen-class)
(:require [clojure.core.async :refer [>! go <! chan]]
[clojure.java.io :refer [file]]
[prism.db :refer :all]
[clojure2d.pixels :as px]
[clojure2d.color.blend :as blend]
[clojure2d.core :as c2d]
[clojure2d.color :as... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.