_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 |
|---|---|---|---|---|---|---|---|---|
e90854751a17ebaf9e90b4b361737370b7732fd71abeecd6bae673f04f72012a | braidchat/braid | thread.cljs | (ns braid.core.client.ui.styles.thread
(:require
[braid.core.client.ui.styles.header :as headers]
[braid.core.client.ui.styles.misc :refer [drag-and-drop]]
[braid.core.client.ui.styles.mixins :as mixins]
[braid.core.client.ui.styles.vars :as vars]
[garden.arithmetic :as m]
[garden.units :refer [px e... | null | https://raw.githubusercontent.com/braidchat/braid/d94d94cd82b573809e0a6a93527ac3d66ef35202/src/braid/core/client/ui/styles/thread.cljs | clojure | needs to accomodate widest icon
otherwise, x button moves
so that it gets a z-index
switch to ::after to align at top
XXX: does this class actually apply to anything?
needs to be a better way
which is based on the height of the notice
will be an issue when text area expands: | (ns braid.core.client.ui.styles.thread
(:require
[braid.core.client.ui.styles.header :as headers]
[braid.core.client.ui.styles.misc :refer [drag-and-drop]]
[braid.core.client.ui.styles.mixins :as mixins]
[braid.core.client.ui.styles.vars :as vars]
[garden.arithmetic :as m]
[garden.units :refer [px e... |
a4c544157bf90d8b6927bf68cda0f0f2d3ab9a001339b9111af55fe3a8d2645f | alanz/ghc-exactprint | Rules.hs | module Rules where
import Data.Char
{-# RULES "map-loop" [ ~ ] forall f . map' f = map' (id . f) #-}
# NOINLINE map ' #
map' f [] = []
map' f (x:xs) = f x : map' f xs
main = print (map' toUpper "Hello, World")
-- Should warn
foo1 x = x
# RULES " foo1 " [ 1 ] forall x. foo1 x = x #
-- Should warn
foo2 x = x
# IN... | null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/Rules.hs | haskell | # RULES "map-loop" [ ~ ] forall f . map' f = map' (id . f) #
Should warn
Should warn
Should not warn
# NOINLINE foo3 #
# RULES "foo3" forall x. foo3 x = x # | module Rules where
import Data.Char
# NOINLINE map ' #
map' f [] = []
map' f (x:xs) = f x : map' f xs
main = print (map' toUpper "Hello, World")
foo1 x = x
# RULES " foo1 " [ 1 ] forall x. foo1 x = x #
foo2 x = x
# INLINE foo2 #
# RULES " foo2 " [ ~ 1 ] forall x. foo2 x = x #
foo3 x = x
# NOINLINE f #
f :: Int ... |
e42652cf35e9dd730e009b13c68d7b9b8d927cb0520037b450a9c49270fb0ad0 | emilypi/group-theory | Additive.hs | {-# language CPP #-}
# language FlexibleInstances #
# language Safe #
-- |
-- Module : Data.Group.Additive
Copyright : ( c ) 2020 - 2021
-- License : BSD-style
--
Maintainer : < > ,
< >
--
-- Stability : stable
-- Portability : non-portable
--
-- This module contains d... | null | https://raw.githubusercontent.com/emilypi/group-theory/9f49d8f6277cc2cda1c5c7f5142cacbd0bc07762/src/Data/Group/Additive.hs | haskell | # language CPP #
|
Module : Data.Group.Additive
License : BSD-style
Stability : stable
Portability : non-portable
This module contains definitions for 'AdditiveGroup' and 'AdditiveAbelianGroup',
along with the relevant combinators.
* Additive groups
** Combinators
* Additive abelian groups
... | # language FlexibleInstances #
# language Safe #
Copyright : ( c ) 2020 - 2021
Maintainer : < > ,
< >
module Data.Group.Additive
AdditiveGroup
, (-)
, (+)
, (×)
, copower
, AdditiveAbelianGroup
) where
#if __GLASGOW_HASKELL__ > 804
import Data.Functor.Contravariant
#endif
import ... |
06dfd416b2e117ce48c122dc41bb6ccd4e2699e0ea9e659430e2add461ac1a40 | bjorng/wings | wings_draw.erl | %%
%% wings_draw.erl --
%%
%% This module draws objects using OpenGL.
%%
Copyright ( c ) 2001 - 2011
%%
%% See the file "license.terms" for information on usage and redistribution
%% of this file, and for a DISCLAIMER OF ALL WARRANTIES.
%%
%% $Id$
%%
-module(wings_draw).
-export([refresh_dlists/1,
up... | null | https://raw.githubusercontent.com/bjorng/wings/1e2c2d62e93a98c263b167c7a41f8611e0ff08cd/src/wings_draw.erl | erlang |
wings_draw.erl --
This module draws objects using OpenGL.
See the file "license.terms" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
$Id$
Export for plugins (and wings_proxy) that need to draw stuff
Plan for drawing dynamic faces.
For materials
... | Copyright ( c ) 2001 - 2011
-module(wings_draw).
-export([refresh_dlists/1,
update_sel_dlist/0,
changed_we/2, update_normals/1,
split/3,original_we/1,update_dynamic/2,join/1,abort_split/1]).
-export([draw_flat_faces/2,draw_smooth_faces/2]).
-export_type([normals/0,split/0]).
-define(NEED_OPENGL, 1).
-def... |
e4cc4c1d8467783270d7ee7e356df2c2e7167d1ddf0690038242ef9996bbb1a0 | ghc/testsuite | tcfail001.hs | -- !!! This should fail with a type error: the instance method
-- !!! has a function type when it should have the type [a].
module ShouldFail where
class A a where
op :: a
instance (A a, A a) => A [a] where
op [] = []
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail001.hs | haskell | !!! This should fail with a type error: the instance method
!!! has a function type when it should have the type [a]. | module ShouldFail where
class A a where
op :: a
instance (A a, A a) => A [a] where
op [] = []
|
b2ca9a95bc11a27031a2f597f57713904e692d8a742d18b0c1cead1ecc1c3404 | obsidiansystems/obelisk | TerminalString.hs | # LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
-- | Types and functions dealing with strings to be printed on terminal.
module Obelisk.CliApp.TerminalString
( TerminalString(..)
, render
, putStrWithSGR
, getTerminalWidth
, enquiryCode
) where
import Control.M... | null | https://raw.githubusercontent.com/obsidiansystems/obelisk/d779d5ab007d8ee5c3cd3400473453e1d106f5f1/lib/cliapp/src/Obelisk/CliApp/TerminalString.hs | haskell | # LANGUAGE OverloadedStrings #
| Types and functions dealing with strings to be printed on terminal.
| Printable text on terminals
Represents text with an optional color code.
^ with color
^ optionally, trim to maximum width
| Convert to Text, controlling whether colorization should happen.
| Safely print the s... | # LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
module Obelisk.CliApp.TerminalString
( TerminalString(..)
, render
, putStrWithSGR
, getTerminalWidth
, enquiryCode
) where
import Control.Monad (when)
import Control.Monad.Catch (bracket_)
import Control.Monad.IO.Class (liftIO)
import Control.Mona... |
e526d8b2c3c6a8b74c10a4b7e3633855bd7706262b3754beebbb1b3b04724fba | TrustInSoft/tis-interpreter | type.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/libraries/datatype/type.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
d1b377679286b11cf74141d59e0bf21eebcb424916210f79ff1f5083e2f66d8a | jordanthayer/ocaml-search | plot_size_estimates.ml | * Plots some size estimations .
@author eaburns
@since 2010 - 05 - 20
@author eaburns
@since 2010-05-20
*)
open Printf
let cfpartial_astar_0_9 =
"Continuing Partial A* with f", [ "alg", "continuingf_par_astar";
"initial p", "0.9";
"p decrease rate", "0.99"; ]
let cbestfparti... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/spt_plot/scripts/eaburns/plot_size_estimates.ml | ocaml |
kilby_counting;
knuth_counting;
log10 of the final estimation
log10 of the total nodes
astar nodes
log10 of the astar nodes
absolute estimation difference
log10 of the absolute estimation difference
estimation to truth ratio estimated nodes / A* nodes
log10 estimation to truth ratio estimated nodes... | * Plots some size estimations .
@author eaburns
@since 2010 - 05 - 20
@author eaburns
@since 2010-05-20
*)
open Printf
let cfpartial_astar_0_9 =
"Continuing Partial A* with f", [ "alg", "continuingf_par_astar";
"initial p", "0.9";
"p decrease rate", "0.99"; ]
let cbestfparti... |
1ac60b6cce676fea7419fc7311654ff34af54406f304cdadf5984fd7713d3875 | lambdacube3d/lambdacube-compiler | FreeVars.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE PatternGuards #
# LANGUAGE ViewPatterns #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeD... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-compiler/ca8d65a210a8801c8358fc29a9ead427afc9fce4/prototypes/FreeVars.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE BangPatterns #
# LANGUAGE DeriveTraversable #
import Debug.Trace
--------------------------------------------------------------------------------
error "negate @Nat"
-----------------------------------------------------------------------------... | # LANGUAGE CPP #
# LANGUAGE PatternSynonyms #
# LANGUAGE PatternGuards #
# LANGUAGE ViewPatterns #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE DeriveFoldable #
# LANGUAG... |
937174d72413dde64289f253c54f8f57f9cdc6e0b2089f513b6d963abf61424a | xapi-project/xen-api | xapi_pool_helpers.mli |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/fa6f118fb512a2c90159368a1a0bc1cc730c895b/ocaml/xapi/xapi_pool_helpers.mli | ocaml | checks that no other pool ops are running
before starting a new pool operation
useful when a non-pool operation requires
that no pool operations are running.
* Call the function on the master, then on each of the slaves in turn. Useful
when attaching an SR to all hosts in the pool. |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
a8520777082e2ac111ed87c2680d5f56dc91956f82208275a3e300063d4cf15f | input-output-hk/cardano-wallet | PolicySpec.hs | # LANGUAGE DataKinds #
module Cardano.Wallet.Checkpoints.PolicySpec
( spec
) where
import Prelude
import Cardano.Wallet.Checkpoints.Policy
( BlockHeight, CheckpointPolicy, nextCheckpoint, toListAtTip )
import Test.Hspec
( Spec, describe, it )
import Test.QuickCheck
( Arbitrary (..)
, Gen
,... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/80756f919d7811219e23632bbe59214e0f5e25f5/lib/wallet/test/unit/Cardano/Wallet/Checkpoints/PolicySpec.hs | haskell | ------------------------------------------------------------------------------
Properties, general
------------------------------------------------------------------------------
| Internal invariant.
| Internal invariant.
------------------------------------------------------------------------------
Propertie... | # LANGUAGE DataKinds #
module Cardano.Wallet.Checkpoints.PolicySpec
( spec
) where
import Prelude
import Cardano.Wallet.Checkpoints.Policy
( BlockHeight, CheckpointPolicy, nextCheckpoint, toListAtTip )
import Test.Hspec
( Spec, describe, it )
import Test.QuickCheck
( Arbitrary (..)
, Gen
,... |
d9a3e94b36ecb89a4462dbee6174a82e5d2d2b26eaba85eaf4853dc4d49e6145 | bhaskara/programmable-reinforcement-learning | rl-user.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; rl/rl-user.lisp
;; contains functions to make it easier for users to call the reinforcement
;; learning code
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package rl)
(defun learn (env ... | null | https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/rl/rl-user.lisp | lisp |
rl/rl-user.lisp
contains functions to make it easier for users to call the reinforcement
learning code
|
(in-package rl)
(defun learn (env policy obs num-steps &key (hist-length nil) (step-print-inc 100) (ep-print-inc 10))
"learn ENV POLICY OBSERVERS NUM-STEPS &key (HIST-LENGTH nil) (STEP-PRINT-INC 100) (EP-PRINT-INC 10)
A frontend for running trajectory-based rl as defined in the <rl-control> class.
ENV -... |
08d260bc758b189b51d2e654c0f7704d7f0cf54292401af926ced0008764afeb | planetfederal/signal | user.clj | Copyright 2016 - 2017 Boundless ,
;;
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, software
distribute... | null | https://raw.githubusercontent.com/planetfederal/signal/e3eae56c753f0a56614ba8522278057ab2358c96/src/signal/components/http/user.clj | clojure |
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 governing permiss... | Copyright 2016 - 2017 Boundless ,
distributed under the License is distributed on an " AS IS " BASIS ,
(ns signal.components.http.user
(:require [signal.components.http.intercept :as intercept]
[clojure.tools.logging :as log]
[clojure.spec.alpha :as s]
[signal.specs.user]
... |
3a82d9e8e2b4965f3c8f76bbd5b08f6d1bf71c6a5aeda436096eee85378ecc7a | racketscript/racketscript | import-struct.rkt | #lang racket
(require "make.rkt")
(define pa (posn 0 1))
(displayln (posn-x pa))
(displayln (posn-y pa))
(define pb (posn0 1 2))
(equal? (posn0 1 2) pb)
(displayln pb)
| null | https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/tests/struct/import-struct.rkt | racket | #lang racket
(require "make.rkt")
(define pa (posn 0 1))
(displayln (posn-x pa))
(displayln (posn-y pa))
(define pb (posn0 1 2))
(equal? (posn0 1 2) pb)
(displayln pb)
| |
fabac02a2d766e8c2bdb25cd35ec940ebe80e39b119e7ba93bd316466fc98031 | alang9/dynamic-graphs | Tests.hs | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Data.Graph.Dynamic.Internal.Tree.Tests
( BuildTree
, prop_build
, prop_split
) where
import Control.Monad.Primitive (PrimMonad (..))
import Control.Monad.ST ... | null | https://raw.githubusercontent.com/alang9/dynamic-graphs/b88f001850c7bee8faa62099e93172a0bb0df613/tests/Data/Graph/Dynamic/Internal/Tree/Tests.hs | haskell | | Returns pointers to all nodes. | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Data.Graph.Dynamic.Internal.Tree.Tests
( BuildTree
, prop_build
, prop_split
) where
import Control.Monad.Primitive (PrimMonad (..))
import Control.Monad.ST ... |
73a62e7a28f4f418ac66d8451c4f4ac78e64c5f99f1ca6e42166d1d3624d563b | open-telemetry/opentelemetry-erlang-api | ot_observer.erl | %%%------------------------------------------------------------------------
Copyright 2020 , OpenTelemetry Authors
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
%%
%% Unl... | null | https://raw.githubusercontent.com/open-telemetry/opentelemetry-erlang-api/41cb700d60a7dcfdb4165aca73634bbe1c07a33f/src/ot_observer.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 o... | Copyright 2020 , OpenTelemetry Authors
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@doc An ` Observer ' is a callback based instrument with a ` LastValue ' aggregator .
On each collection cycle each Observer callbac... |
5d2e33a8e9116669c32a3e0033b9436071885fa72b9bd7dcb7ad6814c146b8af | JordanMartinez/purescript-to-haskell | DataType.hs | # LANGUAGE TemplateHaskell #
module Model.DataType where
import ClassyPrelude.Yesod
import Database.Persist.TH ()
data DataType = DataType
deriving (Show, Read, Eq, Ord)
derivePersistField "DataType"
| null | https://raw.githubusercontent.com/JordanMartinez/purescript-to-haskell/148632fef18c5ae9a4262a8934343a7966e89e01/20-yesod/src/Model/DataType.hs | haskell | # LANGUAGE TemplateHaskell #
module Model.DataType where
import ClassyPrelude.Yesod
import Database.Persist.TH ()
data DataType = DataType
deriving (Show, Read, Eq, Ord)
derivePersistField "DataType"
| |
81d032291657e58f55086d66c13303d2e0c93067fbf7b4b1b4a17ca99db5831c | oxij/haskell-course-ru | MonadJoin.hs | # LANGUAGE NoImplicitPrelude #
module ITMOPrelude.Categories.MonadJoin where
import ITMOPrelude.Categories
class Functor m => MonadJoin m where
returnJoin :: a -> m a
join :: m (m a) -> m a
| null | https://raw.githubusercontent.com/oxij/haskell-course-ru/fcc3ce1f11e96be8a82bd2abb87df7868f1125c6/ITMOPrelude/Categories/MonadJoin.hs | haskell | # LANGUAGE NoImplicitPrelude #
module ITMOPrelude.Categories.MonadJoin where
import ITMOPrelude.Categories
class Functor m => MonadJoin m where
returnJoin :: a -> m a
join :: m (m a) -> m a
| |
d5c8cf5aa8b8e3e9c03699d89013c5a563f5e77ef31435b5ccb666446723a660 | wavejumper/rehook | project.clj | (defproject rehook/events "2.1.11"
:description "React Hooks for Clojurescript"
:url ""
:dependencies
[[org.clojure/clojurescript "1.10.520" :scope "provided"]
[rehook/core "2.1.11" :scope "provided"]
[integrant "0.7.0" :scope "provided"]]
:source-paths
["src"])
| null | https://raw.githubusercontent.com/wavejumper/rehook/c1a4207918827f4b738cdad9a9645385e5e10ff4/rehook-events/project.clj | clojure | (defproject rehook/events "2.1.11"
:description "React Hooks for Clojurescript"
:url ""
:dependencies
[[org.clojure/clojurescript "1.10.520" :scope "provided"]
[rehook/core "2.1.11" :scope "provided"]
[integrant "0.7.0" :scope "provided"]]
:source-paths
["src"])
| |
2bc721c2e0a6ff440702e174820f1e1d0dd21275cab367c60a54f23aaaaa2185 | RedPRL/yuujinchou | ModifierSigs.ml | (** The parameters of an engine. *)
module type Param =
sig
* The type of data held by the bindings . The difference between data and tags is that the data will survive the efficient retagging . See { ! : Trie.retag } .
type data
* The type of tags attached to the bindings . The difference between data and tags is ... | null | https://raw.githubusercontent.com/RedPRL/yuujinchou/e46b1b3dbce2852ad2b0b18f6c1c873ffb40cfd0/src/ModifierSigs.ml | ocaml | * The parameters of an engine.
* The type of modifier hook labels. This is for extending the modifier language.
* Manually trigger the [not_found] effect.
* Manually trigger the [shadow] effect.
* Manually trigger the [hook] effect.
* [modify modifier trie] runs the [modifier] on the [trie] and return the transfor... | module type Param =
sig
* The type of data held by the bindings . The difference between data and tags is that the data will survive the efficient retagging . See { ! : Trie.retag } .
type data
* The type of tags attached to the bindings . The difference between data and tags is that tags can be efficiently reset .... |
480c77596fff47c6576a653b5f6df066524c06da8a5bc6533b3e62bc51b49e5c | elben/neblen | Neblen.hs | {-# LANGUAGE OverloadedStrings #-}
module Neblen (module X) where
import Neblen.Data as X
import Neblen.Compiler as X
import Neblen.Parser as X
import Neblen.TypeChecker as X
import Neblen.Eval as X
import Neblen.DataTypes as X
| null | https://raw.githubusercontent.com/elben/neblen/3a586c212613cd5e731788605b4f8ae1e86ed9f5/src/Neblen.hs | haskell | # LANGUAGE OverloadedStrings # |
module Neblen (module X) where
import Neblen.Data as X
import Neblen.Compiler as X
import Neblen.Parser as X
import Neblen.TypeChecker as X
import Neblen.Eval as X
import Neblen.DataTypes as X
|
1a55a1f565d6beb9ec8b5fde7fba95e35d24934554870b95da84ebf14811735b | janestreet/base | variant.mli | * First - class representative of an individual variant in a variant type , used in
[ [ @@deriving variants ] ] .
[[@@deriving variants]]. *)
type 'constructor t =
{ name : string
* The position of the constructor in the type definition , starting from 0
; rank : int
; constructor : 'constructor
}
| null | https://raw.githubusercontent.com/janestreet/base/221b085f3fcd77597f8245b4d73de3970b238e71/src/variant.mli | ocaml | * First - class representative of an individual variant in a variant type , used in
[ [ @@deriving variants ] ] .
[[@@deriving variants]]. *)
type 'constructor t =
{ name : string
* The position of the constructor in the type definition , starting from 0
; rank : int
; constructor : 'constructor
}
| |
858690e4c015fc6be32a2cdb57b0c408774c06646012f9e5afc43687900e1a80 | brendanhay/terrafomo | PagerDuty.hs | -- This module is auto-generated.
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - dodgy - exports #
-- |
Module : . PagerDuty
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
-- Stability : auto-genera... | null | https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-pagerduty/gen/Terrafomo/PagerDuty.hs | haskell | This module is auto-generated.
|
Stability : auto-generated
* Provider
* Types
* Resources
* DataSources
* Settings |
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - dodgy - exports #
Module : . PagerDuty
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
Portability : non - portable ( GHC extensions )
module Terrafomo.... |
93a755c08b5f765cd905b81ec53cd08f9fb1ae87612d3f0aa71b0edfe1e516a9 | jordanthayer/ocaml-search | plot_tiles.ml | (** Compare the various tiles domains. *)
open Fn
let load_korf cost alg_attrs name =
Load_dataset.korf_100_tiles ~cost alg_attrs name
let plot_time () =
let tiles =
let ds = load_korf "unit" ["alg", "idastar"] "tiles" in
Dataset.numeric_transform "log10 nodes expanded" log10
(Dataset.copy_key "total... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/spt_plot/scripts/eaburns/plot_tiles.ml | ocaml | * Compare the various tiles domains. |
open Fn
let load_korf cost alg_attrs name =
Load_dataset.korf_100_tiles ~cost alg_attrs name
let plot_time () =
let tiles =
let ds = load_korf "unit" ["alg", "idastar"] "tiles" in
Dataset.numeric_transform "log10 nodes expanded" log10
(Dataset.copy_key "total nodes expanded" "log10 nodes expanded" ds... |
9c3762d2baef6f85a51d6ecebb50280d43f0cd3c624c2dcf9aef0a3fcace2431 | zotonic/zotonic | filter_mailinglist_recipient_key_decode.erl | @author < >
2023 < >
%% @doc Decode a recipient key to the recipient rsc id or email address.
%% @end
Copyright 2023
%%
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
%... | null | https://raw.githubusercontent.com/zotonic/zotonic/7555d4734a3658c0c1231b45290fd99f5c21d0c0/apps/zotonic_mod_mailinglist/src/filters/filter_mailinglist_recipient_key_decode.erl | erlang | @doc Decode a recipient key to the recipient rsc id or email address.
@end
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 ... | @author < >
2023 < >
Copyright 2023
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(filter_mailinglist_recipient_key_decode).
-export([
mailinglist_recipient_key_decode/2
]).
-spec mailinglist_r... |
da808ad828068ed0b48f24fa8d8aaacaeb9df797a8859519222a2c3da5512659 | rjohnsondev/haskellshop | Payment.hs | {-# LANGUAGE OverloadedStrings #-}
module Render.Payment where
import Application
import Heist
import HeistUtil
import Snap.Snaplet
import Snap.Snaplet.Session
import Control.Monad.Trans
import Render.Countries
import qualified Heist.Compiled as C
import qualified Data.Text as DT
import qualified Data.Map as M
payme... | null | https://raw.githubusercontent.com/rjohnsondev/haskellshop/645f9e40b9843fc987d37a0ee58460929ef50aae/src/Render/Payment.hs | haskell | # LANGUAGE OverloadedStrings # |
module Render.Payment where
import Application
import Heist
import HeistUtil
import Snap.Snaplet
import Snap.Snaplet.Session
import Control.Monad.Trans
import Render.Countries
import qualified Heist.Compiled as C
import qualified Data.Text as DT
import qualified Data.Map as M
paymentRuntime :: RuntimeSplice AppHandl... |
e743c891dd396af5cf2453d20dd521de41f9356292ea0451ad2efcc1a4e1c863 | pflanze/chj-schemelib | alist.scm | Copyright 2016 - 2020 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
;; Unlike cj... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/alist.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
Unlike cj-alist.scm doen't hard-code the pairings using pairs,
instead use parametrized accessors
Perhaps call it associative-list instead?
for compat with typed-alist.scm
should write that one in terms of... | Copyright 2016 - 2020 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require easy-2
Maybe)
(def alist:nothing (gensym))
(defmodule (<alist> key? .key .equal?)
(export alist
Maybe-ref
... |
fe060b7c75d76ed16bd1056916f28bb341f5ec07bcb20cc2f40a4e8813490ada | triffon/fp-2022-23 | ex02-20221019-solutions.rkt | ; Синтактична захар
(define (++ x) (+ x 1))
; (define ++
( lambda ( x ) ( + x 1 ) ) )
; Зад.0
(define (const c)
(lambda (x) c))
Аргументът f е функция - познава се само
по това , че го в ( f y x )
(define (flip f)
(lambda (x y) (f y x)))
(define (complement p)
(lambda (x) (not (p x))))
(define (co... | null | https://raw.githubusercontent.com/triffon/fp-2022-23/d454a2748883eeb068fbe528d33131238aff3153/exercises/cs1/ex02-20221019-solutions.rkt | racket | Синтактична захар
(define ++
Зад.0
Често използвани функции
Зад.1
или (lambda (x) x)
Зад.2
функция->функция
Зад.3
операция "n-кратно диференциране"
число->функция
функция (число->число)
Зад.4 | (define (++ x) (+ x 1))
( lambda ( x ) ( + x 1 ) ) )
(define (const c)
(lambda (x) c))
Аргументът f е функция - познава се само
по това , че го в ( f y x )
(define (flip f)
(lambda (x y) (f y x)))
(define (complement p)
(lambda (x) (not (p x))))
(define (compose f g)
(lambda (x) (f (g x))))
(de... |
13e120a1ff622c22007e78fa42ab7e5983b0178cdd097fb684391f7607801e8a | Helium4Haskell/helium | TypeSynonymInContext.hs | type Synonym = Int
class SomeClass a
instance SomeClass Synonym => SomeClass Int
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeClassesParse/TypeSynonymInContext.hs | haskell | type Synonym = Int
class SomeClass a
instance SomeClass Synonym => SomeClass Int
| |
9c126fbe8e46085940a4bea986e6b6fd803e1d7ed7106e01713e9402fece8776 | nojb/ocaml-gccjit | tut03_sum_of_squares.ml | (* Usage example for libgccjit *)
open Gccjit
let create_code ctx =
Simple sum - of - squares , to test conditionals and looping
int loop_test ( int n )
{
int i ;
int sum = 0 ;
for ( i = 0 ; i < n ; i + + )
{
sum + = i * i ;
}
return sum ;
... | null | https://raw.githubusercontent.com/nojb/ocaml-gccjit/d201f40b89595115b7735eab003ecef9e01b359e/examples/tut03_sum_of_squares.ml | ocaml | Usage example for libgccjit
Build locals:
if (i >= n)
sum += i * i
i++
return sum
Set some options on the context. Let's see the code being generated, in
assembler form.
Populate the context.
Compile the code.
Extract the generated code from "result".
Run the generated code. |
open Gccjit
let create_code ctx =
Simple sum - of - squares , to test conditionals and looping
int loop_test ( int n )
{
int i ;
int sum = 0 ;
for ( i = 0 ; i < n ; i + + )
{
sum + = i * i ;
}
return sum ;
Simple sum-of-squares, to test co... |
7ecbded4c031d42595ad664686b6b680b23f93fa4c704bc53c4b1db23028b9e5 | Naproche-SAD/Naproche-SAD | Encode.hs | {- generated by Isabelle -}
Title : Isabelle / XML / Encode.hs
Author : Makarius
LICENSE : BSD 3 - clause ( Isabelle )
XML as data representation language .
See also " $ ISABELLE_HOME / src / Pure / PIDE / xml . ML " .
Author: Makarius
LICENSE: BSD 3-clause (Isabell... | null | https://raw.githubusercontent.com/Naproche-SAD/Naproche-SAD/da131a6eaf65d4e02e82082a50a4febb6d42db3d/Isabelle/src/Isabelle/XML/Encode.hs | haskell | generated by Isabelle
atomic values
structural nodes
representation of standard types |
Title : Isabelle / XML / Encode.hs
Author : Makarius
LICENSE : BSD 3 - clause ( Isabelle )
XML as data representation language .
See also " $ ISABELLE_HOME / src / Pure / PIDE / xml . ML " .
Author: Makarius
LICENSE: BSD 3-clause (Isabelle)
XML as data representati... |
40c40f3faf0cfad53c2b595d6b42afd9bdd555392e65127b3585ea9460c3d531 | shayan-najd/NativeMetaprogramming | T6056.hs | module T6056 where
import T6056a
foo :: Int -> (Maybe Int, [Int])
foo x = smallerAndRest x [x]
| null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/simplCore/should_compile/T6056.hs | haskell | module T6056 where
import T6056a
foo :: Int -> (Maybe Int, [Int])
foo x = smallerAndRest x [x]
| |
6faa9822befc8ccfeeb952ea52a6b9a74419dd466bd304bafff42bbed0f3ccdd | elbrujohalcon/hPage | TypeSynonymInstances.hs | class ExtTest a where
extes :: a -> String
instance ExtTest String where
extes = show . map show | null | https://raw.githubusercontent.com/elbrujohalcon/hPage/401a039332c7b120f76cbcbd5b33f5dca3d8c369/res/test/TypeSynonymInstances.hs | haskell | class ExtTest a where
extes :: a -> String
instance ExtTest String where
extes = show . map show | |
1c076c09a7b17e95ae819688aecd348da37e9a9aadb561ce54195feb4651f8d6 | ssor/erlangDemos | sc_element.erl | -module(sc_element).
-behaviour(gen_server).
-export([start_link/2,create/2,create/1,fetch/1,replace/2,delete/1]).
-export([init/1,handle_call/3,handle_cast/2,handle_info/2,terminate/2,
code_change/3]).
-define(SERVER,?MODULE).
-define (DEFAULT_LEASE_TIME,(60 * 60 * 24)).
-record(state,{value,lease_time,start_time... | null | https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/demos/simple_cache/src/sc_element.erl | erlang | -module(sc_element).
-behaviour(gen_server).
-export([start_link/2,create/2,create/1,fetch/1,replace/2,delete/1]).
-export([init/1,handle_call/3,handle_cast/2,handle_info/2,terminate/2,
code_change/3]).
-define(SERVER,?MODULE).
-define (DEFAULT_LEASE_TIME,(60 * 60 * 24)).
-record(state,{value,lease_time,start_time... | |
6fa4480d4cc9360188bce1a8385944bdf7e579f3d4cae8b86a9dcbfe67211bfa | egison/egison | Benchmark.hs | module Main where
import Control.Monad.Trans.Class (lift)
import Criterion
import Criterion.Main
import Language.Egison
runEgisonFile :: FilePath -> IO Env
runEgisonFile path = do
res <- fromEvalM defaultOption $ do
env <- lift (lift initialEnv)
topExprs <- loadFile ... | null | https://raw.githubusercontent.com/egison/egison/df4e47f7c8adfe90d9bf408459772a6cb4e71b70/benchmark/Benchmark.hs | haskell | module Main where
import Control.Monad.Trans.Class (lift)
import Criterion
import Criterion.Main
import Language.Egison
runEgisonFile :: FilePath -> IO Env
runEgisonFile path = do
res <- fromEvalM defaultOption $ do
env <- lift (lift initialEnv)
topExprs <- loadFile ... | |
79e398589aa0be7bff4dc1e2b594055d8531aa7709c4024dff66351ad09ef4f0 | discus-lang/ddc | Match.hs | -- | Create substitution to make (subst template) == target
module DDC.Core.Transform.Rewrite.Match
( -- * Substitutions
SubstInfo
, emptySubstInfo
-- * Matching
, match
, matchArg)
where
import DDC.Core.Exp
import Data.Set (Set)
impor... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Transform/Rewrite/Match.hs | haskell | | Create substitution to make (subst template) == target
* Substitutions
* Matching
-----------------------------------------------------------------------------
| Value and type substition.
| An empty substition info.
----------------------------------------------------------------
| Create substitution to make ... | module DDC.Core.Transform.Rewrite.Match
SubstInfo
, emptySubstInfo
, match
, matchArg)
where
import DDC.Core.Exp
import Data.Set (Set)
import Data.Map (Map)
import qualified DDC.Type.Sum as Sum
import qu... |
c321d4acae3d852e5f4884305b97168e6adbe2a6155805052e84af20a5c05782 | jwhitbeck/hyperloglog | core.clj | (ns hyperloglog.core
(:require [hyperloglog.algorithm :refer [item->index-num-leading-zeros-pair estimate-cardinality]]
[hyperloglog.hashing :as h]
[hyperloglog.redis :as redis]
[taoensso.carmine :as car]))
(set! *warn-on-reflection* true)
(def default-opts
{:num-observables 10... | null | https://raw.githubusercontent.com/jwhitbeck/hyperloglog/d2dbed23d87b79d6c2dd093cb1fe328417eba8ba/src/hyperloglog/core.clj | clojure | (ns hyperloglog.core
(:require [hyperloglog.algorithm :refer [item->index-num-leading-zeros-pair estimate-cardinality]]
[hyperloglog.hashing :as h]
[hyperloglog.redis :as redis]
[taoensso.carmine :as car]))
(set! *warn-on-reflection* true)
(def default-opts
{:num-observables 10... | |
29f92ea50110bf0634c7da6e012eee3191a8cd22527f0b61a7763e60e13883fa | discus-lang/salt | Prim.hs |
module Salt.Core.Prim
( module Salt.Core.Prim.Ops
, module Salt.Core.Prim.Ctor
, module Salt.Core.Prim.Values)
where
import Salt.Core.Prim.Ops
import Salt.Core.Prim.Ctor
import Salt.Core.Prim.Values
| null | https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/salt/Salt/Core/Prim.hs | haskell |
module Salt.Core.Prim
( module Salt.Core.Prim.Ops
, module Salt.Core.Prim.Ctor
, module Salt.Core.Prim.Values)
where
import Salt.Core.Prim.Ops
import Salt.Core.Prim.Ctor
import Salt.Core.Prim.Values
| |
3a7182718b9f318378eea96e89a224b25c96aee11b011dc977bca559551d0b3d | kitlang/kit | TypeSpec.hs | module Kit.Ast.TypeSpec (
module Kit.Ast.TypeSpecBase,
TypeSpec,
) where
import Kit.Ast.TypeSpecBase
import Kit.Ast.ConcreteType
type TypeSpec = TypeSpecBase ConcreteType
| null | https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/src/Kit/Ast/TypeSpec.hs | haskell | module Kit.Ast.TypeSpec (
module Kit.Ast.TypeSpecBase,
TypeSpec,
) where
import Kit.Ast.TypeSpecBase
import Kit.Ast.ConcreteType
type TypeSpec = TypeSpecBase ConcreteType
| |
6baaf97218f85a735285a8adaa9e3f6f2a5afe6595a7f02f1e2250fcc618fcd3 | quchen/stackage-everything | Generate.hs | #!/usr/bin/env stack
stack --resolver lts-10.7 --install - ghc --package base
--package bytestring
--package lens
--package megaparsec
--package prettyprinter
--package text
--package wreq
--
-hide - all - packages
--package base
--package bytestring
--p... | null | https://raw.githubusercontent.com/quchen/stackage-everything/90228b82233006478811bfd5e830685f91979f90/Generate.hs | haskell | resolver lts-10.7 --install - ghc --package base
package bytestring
package lens
package megaparsec
package prettyprinter
package text
package wreq
package base
package bytestring
package lens
package megaparsec
package prettyprinter
package text
package wreq
# LANGUAGE OverloadedStrings #
Tends to misbeha... | #!/usr/bin/env stack
-hide - all - packages
-hide-all-packages
-}
# LANGUAGE DeriveGeneric #
# OPTIONS_GHC -Wall #
module Main (main) where
import Control.Applicative
import Control.Lens
import qualified Data.ByteString.Lazy as BSL
import Data.Semigrou... |
0f465214e0b715abd5e672c2d195382de2faeed16152f643d1b94d646798fc36 | OlafChitil/hat | Char.hs | module Hat.Char
(gisAscii, aisAscii, hisAscii, gisLatin1, aisLatin1,
hisLatin1, gisControl, aisControl, hisControl,
gisPrint, aisPrint, hisPrint, gisSpace, aisSpace,
hisSpace, gisUpper, aisUpper, hisUpper, gisLower,
aisLower, hisLower, gisAlpha, aisAlpha, hisAlpha,
gisDigi... | null | https://raw.githubusercontent.com/OlafChitil/hat/8840a480c076f9f01e58ce24b346850169498be2/Hat/Char.hs | haskell | module Hat.Char
(gisAscii, aisAscii, hisAscii, gisLatin1, aisLatin1,
hisLatin1, gisControl, aisControl, hisControl,
gisPrint, aisPrint, hisPrint, gisSpace, aisSpace,
hisSpace, gisUpper, aisUpper, hisUpper, gisLower,
aisLower, hisLower, gisAlpha, aisAlpha, hisAlpha,
gisDigi... | |
7906d0a6d664c32480084f76ac24f14eb9e0bc26dbba695d0c424df269c683a1 | informatimago/commands | pseudo-pop.lisp | -*- mode : lisp ; coding : utf-8 -*-
;;;;**************************************************************************
FILE : pseudo-pop.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
This is a POP-3 server that allows any us... | null | https://raw.githubusercontent.com/informatimago/commands/65d0d6385269f3e210aed4943aefdbb5372706b9/sources/commands/pseudo-pop.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
and reports always an empty mailbox.
Can be installed in inetd.conf in place of pop-3 to
temporarily disable the POP server without bot... | FILE : pseudo-pop.lisp
USER - INTERFACE :
This is a POP-3 server that allows any user and password ,
< PJB > < >
MODIFICATIONS
2006 - 04 - 05 < PJB > Added this header .
Copyright 2006 - 2006
modify it under the terms of the GNU General Public License
2 of the L... |
d87ab3275d2efe658ff5e774007fc56dde09e9b066deab5c164df3bd9117d6f8 | bgamari/the-thoralf-plugin | DisEq.hs | {-# LANGUAGE TypeInType #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses #
module ThoralfPlugin.Theory.DisEq ( DisEquality, (:~?~:)(..) ) where
--import Data.Kind ( Constraint )
class DisEquality (x :: k) (y :: k) where {}
data a :~?~: b where
Refl... | null | https://raw.githubusercontent.com/bgamari/the-thoralf-plugin/fa4e403b25bfcaf9e8d5142ab40d3c54b33a3630/src/ThoralfPlugin/Theory/DisEq.hs | haskell | # LANGUAGE TypeInType #
# LANGUAGE GADTs #
import Data.Kind ( Constraint ) | # LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses #
module ThoralfPlugin.Theory.DisEq ( DisEquality, (:~?~:)(..) ) where
class DisEquality (x :: k) (y :: k) where {}
data a :~?~: b where
Refl :: a :~?~: a
DisRefl :: DisEquality a b => a :~?~: b
|
3771199d2f32c943158eb6349d01b5ebf80ace4f7f1fb5f6ec5254de365da40e | bitemyapp/bloodhound | Common.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Test.Common where
import qualified Data.Map as M
import qualified Data.SemVer as SemVer
import qualified Network.HTTP.Types.Status as NHTS
import Test.Import
testServer :: Server
testServer = Server ":9200"
testIndex :: IndexName
testIndex = Ind... | null | https://raw.githubusercontent.com/bitemyapp/bloodhound/c5a10dd2922e0a2debaeb8985e53112700a1998b/tests/Test/Common.hs | haskell | # LANGUAGE OverloadedStrings #
Serializing the date as a date is breaking other tests, mysteriously.
, "postDate" .= object [ "type" .= ("date" :: Text)
Serializing the date as a date is breaking other tests, mysteriously.
, "postDate" .= object [ "type" .= ("date" :: Text) | # LANGUAGE TemplateHaskell #
module Test.Common where
import qualified Data.Map as M
import qualified Data.SemVer as SemVer
import qualified Network.HTTP.Types.Status as NHTS
import Test.Import
testServer :: Server
testServer = Server ":9200"
testIndex :: IndexName
testIndex = IndexName "bloodhound-tests-twitter-1"... |
5fcf69a1ce65b123bb6a15345664dd932a2ecb4f10233f19a8b49694e4512c92 | reactive-systems/syfco | Bindings.hs | -----------------------------------------------------------------------------
-- |
-- Module : Reader.Bindings
License : MIT ( see the LICENSE file )
Maintainer : ( )
--
-- Extracts the static expression bindings from the specification.
--
--------------------------------------------------------... | null | https://raw.githubusercontent.com/reactive-systems/syfco/0f0f6a6fff7960d8a0cbb120587984183fa7fc0e/src/lib/Reader/Bindings.hs | haskell | ---------------------------------------------------------------------------
|
Module : Reader.Bindings
Extracts the static expression bindings from the specification.
---------------------------------------------------------------------------
------------------------------------------------------------------... | License : MIT ( see the LICENSE file )
Maintainer : ( )
module Reader.Bindings
( specBindings
) where
import Utils
( strictSort
, imLookup
)
import Data.Types
( SignalDecType(..)
)
import Data.Binding
( Binding
, BindExpr(..)
)
import Data.Expression
( Expr(..)
, Expr'(..... |
c42d28c3e129ef673c7bbd946e11f8fec00b45e5c76cdd932c6a28568b65f004 | SonyCSLParis/fcg-server | examples.lisp | (in-package :fcg-server)
;; This file contains prototype code that was developed for research purposes and should not be used in production environments.
;; No warranties are provided.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
Loading examples for FCG interactive ; ;
;; ... | null | https://raw.githubusercontent.com/SonyCSLParis/fcg-server/8c5f1824454477ee2c489013e021a8d2c0ae150c/fcg-interactive/examples.lisp | lisp | This file contains prototype code that was developed for research purposes and should not be used in production environments.
No warranties are provided.
;;
;
;;
Add example utterances for your grammars here below:
e.g. (package::*gramma... | (in-package :fcg-server)
(defparameter *example-utterances* '((fcg:*fcg-constructions* . ("the linguist likes the mouse"
"the mouse likes the linguist"
"the mouse"
... |
7652af9c87602881cf98935f45231b1ded91921b8d845da8327f8308972d97d1 | graninas/Functional-Design-and-Architecture | SimulationCompiler.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
module Andromeda.Simulator.SimulationCompiler where
import Andromeda.Hardware
import Andromeda.Simulator.SimulationModel
import qualified Data.Map as M
import qualified Control.Monad.Trans.... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/1736abc16d3e4917fc466010dcc182746af2fd0e/First-Edition/BookSamples/CH05/5.3.1%20Impure%20State%20with%20IORef/Andromeda/Simulator/SimulationCompiler.hs | haskell | # LANGUAGE TypeSynonymInstances #
Compilation with lenses example
not implemented
Compilation with lenses example
not implemented
let newSensors = M.insert (addr, compIdx) node ss
not implemented
not implemented
not implemented
-- public interface: | # LANGUAGE TemplateHaskell #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
module Andromeda.Simulator.SimulationCompiler where
import Andromeda.Hardware
import Andromeda.Simulator.SimulationModel
import qualified Data.Map as M
import qualified Control.Monad.Trans.State as S
import Control.Monad.IO.Cla... |
2ff8b6a622e26616029da4be89d61340ce3d287ed1c639616ecf6190fc0fa81b | manifest/jose-erlang | jose_claim.erl | %% ----------------------------------------------------------------------------
%% The MIT License
%%
Copyright ( c ) 2016 - 2017 < >
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to
deal in the Software... | null | https://raw.githubusercontent.com/manifest/jose-erlang/9541a477eea6c4312ff0734b426e7ac7e3f658de/src/jose_claim.erl | erlang | ----------------------------------------------------------------------------
The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
rights to use, copy, modify, merge, publish, distribute, sublicense, a... | Copyright ( c ) 2016 - 2017 < >
deal in the Software without restriction , including without limitation the
sell copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EX... |
f0ff7359763200b0cef79bf559580cfe8667b5f88ac6235ede2cc542384fa524 | CodyReichert/qi | parser.lisp | (in-package :cl-user)
(defpackage libyaml.parser
(:use :cl :cffi)
(:import-from :libyaml.util
:size-t)
(:import-from :libyaml.basic
:mark-t
:error-type-t
:encoding-t
:tag-directive-t
:mark-line
:mark-co... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cl-libyaml-latest/src/parser.lisp | lisp | Functions
Error handling
Reader
Dumper | (in-package :cl-user)
(defpackage libyaml.parser
(:use :cl :cffi)
(:import-from :libyaml.util
:size-t)
(:import-from :libyaml.basic
:mark-t
:error-type-t
:encoding-t
:tag-directive-t
:mark-line
:mark-co... |
e4ff70dfb3395e8585c8753665255c69f9eee4b754389903bd6f1b9f6216e67d | clojure-interop/google-cloud-clients | SessionNotFoundException.clj | (ns com.google.cloud.spanner.SessionNotFoundException
"Exception thrown by Cloud Spanner when an operation detects that the session that is being used
is no longer valid. This type of error has its own subclass as it is a condition that should
normally be hidden from the user, and the client library should try to... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/SessionNotFoundException.clj | clojure | (ns com.google.cloud.spanner.SessionNotFoundException
"Exception thrown by Cloud Spanner when an operation detects that the session that is being used
is no longer valid. This type of error has its own subclass as it is a condition that should
normally be hidden from the user, and the client library should try to... | |
eb41f7ba7505bb5accaf6b70d74cd1313ebe8906d2f23ae4ac61efa323b4b223 | NorfairKing/the-notes | SetFunctions.hs | module Functions.SetFunctions where
import Notes
import Logic.FirstOrderLogic.Macro
import Logic.PropositionalLogic.Macro
import Probability.ProbabilityMeasure.Macro
import Probability.ProbabilityMeasure.Terms
import Sets.Basics.Terms
import Funct... | null | https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Functions/SetFunctions.hs | haskell | module Functions.SetFunctions where
import Notes
import Logic.FirstOrderLogic.Macro
import Logic.PropositionalLogic.Macro
import Probability.ProbabilityMeasure.Macro
import Probability.ProbabilityMeasure.Terms
import Sets.Basics.Terms
import Funct... | |
38be13ce9f357023b78a322c2906234a2be345a6c2ced7c54cc24d9fd92c8c68 | rmloveland/scheme48-0.53 | reroot.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
; A state space is a tree with the state at the root. Each node other
; than the root is a triple <before, after, parent>, represented in
; this implementation as a structure ((before . after) . parent).
Moving from one state to another means re - rooti... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/alt/reroot.scm | scheme | A state space is a tree with the state at the root. Each node other
than the root is a triple <before, after, parent>, represented in
this implementation as a structure ((before . after) . parent).
reversal.
-----
(define r #f) (define s #f) (define (p x) (write x) (newline))
(define (tst)
(set! r *here*)
(... | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
Moving from one state to another means re - rooting the tree by pointer
(define *here* (list #f))
(define original-cwcc call-with-current-continuation)
(define (call-with-current-continuation proc)
(let ((here *here*))
(original-cwcc (lambda (co... |
ed9f53f516e9748d00ac6167ee3094be106abf0126622699d80c15a4c29152e6 | emqx/emqx-coap | emqx_coap_server.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. 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 L... | null | https://raw.githubusercontent.com/emqx/emqx-coap/223d624cc1432edfa1a55bd31f4121e1552f83c5/src/emqx_coap_server.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 ... | Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. 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(emqx_coap_server).
-include("emqx_coap.hrl").
-export([ start/1
, stop/1
]).
... |
05da8efcdeb1363c6cd3e3d4f5e39b00a7bd7488ba2e5102d69f7ac372f2c98c | lispnik/cl-http | patched.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Package : WWW - UTILS ; Base : 10 -*-
(in-package :www-utils)
Until we have chunk encoding decoding for 1.1
(setq *http-version* "HTTP/1.0")
(setq http::*persistent-connection-maximum-requests* 1)
(setq http::*number-of-listening-processes* 1)
(setq http::*persist... | null | https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/acl/acl5/patched.lisp | lisp | Syntax : ansi - common - lisp ; Package : WWW - UTILS ; Base : 10 -*-
aclpc;patched.lisp
do something meaningful for the stream type on acl5
have the log entry do nothing but print to the sceen for debugging |
(in-package :www-utils)
Until we have chunk encoding decoding for 1.1
(setq *http-version* "HTTP/1.0")
(setq http::*persistent-connection-maximum-requests* 1)
(setq http::*number-of-listening-processes* 1)
(setq http::*persistent-connection-timeout* 0)
(setq http1:log-file-stream-stays-open t)
(defvar *buffer-chun... |
2968e079536e24b553e1715020566460505b953ade91be0ce4eef0bcdc6ee396 | draperlaboratory/VIBES | patch_info.ml | (***************************************************************************)
(* *)
Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
(* *)
(* This... | null | https://raw.githubusercontent.com/draperlaboratory/VIBES/7f978d66d0b022d1a9262fdfc608b7a2b7c95dff/tools/vibes-common-cli-options/lib/patch_info.ml | ocaml | *************************************************************************
This file is provided under the license found in the LICENSE file in
the top-level director... | Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
This research was developed with funding from the Defense Advanced
Research Projects Agency ( DARPA ) .
module C = Cmdliner
let filepath : string C.Term.t =
let info = C.Arg.info ["p"; "pat... |
0a0c1da085c990400143412e23a6f8dba9831d607cbca2ee58e7ea249938c0e7 | racket/racket7 | absify.rkt | #lang racket/base
(require racket/cmdline
racket/path)
(define same-up? #f)
(define exec? #f)
(define-values (orig-p extras)
(command-line
#:once-each
[("--same-up") "Leave path alone if it starts \"..\""
(set! same-up? #t)]
[("--exec") "Find executable path"
(set! exec? #t)]
#:args
(path .... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/cs/absify.rkt | racket | In case there are extra arguments to an executable, preserve them | #lang racket/base
(require racket/cmdline
racket/path)
(define same-up? #f)
(define exec? #f)
(define-values (orig-p extras)
(command-line
#:once-each
[("--same-up") "Leave path alone if it starts \"..\""
(set! same-up? #t)]
[("--exec") "Find executable path"
(set! exec? #t)]
#:args
(path .... |
162334a8fce0fc112211a4bd8ae6976b229c34f7234aa392c7f54dbd3e33ae91 | pjones/xmonadrc | xmonadrc.hs | {-# OPTIONS -fno-warn-missing-signatures #-}
-- |
--
-- Copyright:
-- This file is part of the package xmonadrc. It is subject to the
-- license terms in the LICENSE file found in the top-level
-- directory of this distribution and at:
--
--
-- No part of this package, including this file, may be copied... | null | https://raw.githubusercontent.com/pjones/xmonadrc/c19f77f3a2625a24d1b7fb623bcdde3a241bc508/xmonadrc.hs | haskell | # OPTIONS -fno-warn-missing-signatures #
|
Copyright:
This file is part of the package xmonadrc. It is subject to the
license terms in the LICENSE file found in the top-level
directory of this distribution and at:
No part of this package, including this file, may be copied,
modified, propagated, or ... |
module Main
( main,
)
where
import XMonad hiding (config)
import XMonad.Actions.DynamicProjects (dynamicProjects)
import XMonad.Actions.Navigation2D
import XMonad.Config.Desktop (desktopConfig)
import XMonad.Hooks.FadeWindows (fadeWindowsEventHook)
import XMonad.Hooks.ManageDocks (avoidStruts)
import XMona... |
0992a9f84c9099e90df5bc86a8538bc54cde0419b7834e042c71b41bfae60aa2 | skanev/playground | 03.scm | EOPL exercise 4.03
; Write down the specification for a call-exp
( value - of exp₁ ρ σ₀ ) = ( val₁ , σ₁ )
( value - of exp₂ ρ σ₁ ) = ( val₂ , σ₂ )
( apply val₁ val₂ σ₂ ) = ( val₃ , σ₃ )
; -------------------------------------------------
; (value-of (call-exp exp₁ exp₂) ρ σ₀)... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/04/03.scm | scheme | Write down the specification for a call-exp
-------------------------------------------------
(value-of (call-exp exp₁ exp₂) ρ σ₀) = (val₃, σ₃) | EOPL exercise 4.03
( value - of exp₁ ρ σ₀ ) = ( val₁ , σ₁ )
( value - of exp₂ ρ σ₁ ) = ( val₂ , σ₂ )
( apply val₁ val₂ σ₂ ) = ( val₃ , σ₃ )
|
c57b6f4b863bbad10af729988c36c0c235be5202c902583edbc8f7284cd4a335 | digitallyinduced/ihp | Controller.hs | |
Module : IHP.IDE.ToolServer . Helper . Controller
Description : Provides helpers for controllers of the ToolServer
Copyright : ( c ) digitally induced GmbH , 2020
Module: IHP.IDE.ToolServer.Helper.Controller
Description: Provides helpers for controllers of the ToolServer
Copyright: (c) digitally induced GmbH,... | null | https://raw.githubusercontent.com/digitallyinduced/ihp/cb7e4a2fddbb209f63f14ded75b7a5a7b3b87d49/IHP/IDE/ToolServer/Helper/Controller.hs | haskell | | Returns the port used by the running app. Usually returns @8000@.
| Returns the editor command for the user and also whether the command supports line and col notation
Looks for a the env vars IHP_EDITOR or EDITOR. As fallback it uses @open@ or @xdg-open@ (depends on OS).
| |
Module : IHP.IDE.ToolServer . Helper . Controller
Description : Provides helpers for controllers of the ToolServer
Copyright : ( c ) digitally induced GmbH , 2020
Module: IHP.IDE.ToolServer.Helper.Controller
Description: Provides helpers for controllers of the ToolServer
Copyright: (c) digitally induced GmbH,... |
8de57bcc1c2d1436c8ebe85a2e648adc74e370597133e3bb20b9e5e20f0694d0 | vbedegi/re-alm | websocket.cljs | (ns re-alm.io.websocket
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [cljs.core.async :as async :refer [chan <! >!]]
[chord.client :refer [ws-ch]]
[re-alm.core :as ra]))
(defn- make-ws-uri [path]
(str "ws://" (.-host js/location) path))
(defn make-websocket! [url]
(... | null | https://raw.githubusercontent.com/vbedegi/re-alm/73fdb86b2cb92bec16865be44b101361e7e84115/src/re_alm/io/websocket.cljs | clojure | (ns re-alm.io.websocket
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [cljs.core.async :as async :refer [chan <! >!]]
[chord.client :refer [ws-ch]]
[re-alm.core :as ra]))
(defn- make-ws-uri [path]
(str "ws://" (.-host js/location) path))
(defn make-websocket! [url]
(... | |
8a1f4fbbaef0071f16fd3fbcafb2b8ee190ab0d0b661027323077584f5431fb3 | michiakig/sicp | gcd-machine.scm | ;;;; Structure and Interpretation of Computer Programs
Chapter 5 Section 1 Designing Register Machines
(define gcd-machine
(make-machine
'(a b t)
(list (list 'rem remainder) (list '= =))
'(test-b
(test (op =) (reg b) (const 0))
(branch (label gcd-done))
(assign t (op rem) (reg a) (reg b))
... | null | https://raw.githubusercontent.com/michiakig/sicp/1aa445f00b7895dbfaa29cf6984b825b4e5af492/ch5/gcd-machine.scm | scheme | Structure and Interpretation of Computer Programs | Chapter 5 Section 1 Designing Register Machines
(define gcd-machine
(make-machine
'(a b t)
(list (list 'rem remainder) (list '= =))
'(test-b
(test (op =) (reg b) (const 0))
(branch (label gcd-done))
(assign t (op rem) (reg a) (reg b))
(assign a (reg b))
(assign b (reg t))
(go... |
993f40c3ea8e2f0a30d1df3bf36f7dfccff4c70dd59a111c9fea7f5c05d05209 | ranjitjhala/haddock-annot | InlineCSS.hs | -- | Formats Haskell source code as HTML with inline CSS.
module Language.Haskell.HsColour.InlineCSS (hscolour,top'n'tail) where
import Language.Haskell.HsColour.Anchors
import Language.Haskell.HsColour.Classify as Classify
import Language.Haskell.HsColour.Colourise
import Language.Haskell.HsColour.HTML (renderAnchors... | null | https://raw.githubusercontent.com/ranjitjhala/haddock-annot/ffaa182b17c3047887ff43dbe358c246011903f6/hscolour-1.18/Language/Haskell/HsColour/InlineCSS.hs | haskell | | Formats Haskell source code as HTML with inline CSS.
| Formats Haskell source code as a complete HTML document with inline styling
^ Preferences for styling.
^ Whether to include anchors.
^ Haskell source code.
^ An HTML document containing the coloured | module Language.Haskell.HsColour.InlineCSS (hscolour,top'n'tail) where
import Language.Haskell.HsColour.Anchors
import Language.Haskell.HsColour.Classify as Classify
import Language.Haskell.HsColour.Colourise
import Language.Haskell.HsColour.HTML (renderAnchors, renderComment,
re... |
44c3aaf59767f2c0d5e324e252403a559a1369c009d7a6509e72a7fd233a5ca7 | amnh/poy5 | tdrl.ml | let compiler = Compiler.compile (OCAMLSK (** Boolean operations *)
(* [m_true] is defined as follows K x y -> x *)
let m_true = [SK K]
(* [m_false] is the opposite to true S K x y -> K y (x y) -> y *)
let m_false = [SK (S K)]
(** [m_not x] is the negation of [x]. *)
let m_not x = if x then m_false else m_true
(** [... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/kolmo/tdrl.ml | ocaml | * Boolean operations
[m_true] is defined as follows K x y -> x
[m_false] is the opposite to true S K x y -> K y (x y) -> y
* [m_not x] is the negation of [x].
* [pair a b c] is used to represent pairs of elements [a] and [b] by holding
* their computation. The idea is as follows, [z <- pair a b], then we can use
... |
let m_true = [SK K]
let m_false = [SK (S K)]
let m_not x = if x then m_false else m_true
val pair a b c = c a b
From the description of [ pair ] , it is easy to see that [ first ] and [ second ]
* are [ m_true ] and [ m_false ] respectively .
* are [m_true] and [m_false] respectively. *)
let first = m_true
l... |
5fd158007d7aaab6fb2d329feb797dc0ce932977bfefb1d60e6f3dfa933bf9bf | josefs/Gradualizer | remote_types_pass.erl | -module(remote_types_pass).
-type options() :: proplists:proplist().
-spec f(options()) -> ok.
f(Opts) ->
OptsForModule = h() ++ Opts,
g(OptsForModule).
-spec g(proplists:proplist()) -> ok.
g(_Opts) -> ok.
-spec h() -> options().
h() -> [].
| null | https://raw.githubusercontent.com/josefs/Gradualizer/9493c66e724ff6b322f0a437de84fe0869c2f872/test/should_pass/remote_types_pass.erl | erlang | -module(remote_types_pass).
-type options() :: proplists:proplist().
-spec f(options()) -> ok.
f(Opts) ->
OptsForModule = h() ++ Opts,
g(OptsForModule).
-spec g(proplists:proplist()) -> ok.
g(_Opts) -> ok.
-spec h() -> options().
h() -> [].
| |
ab93d603f5f8f4f78ce286a8453f4406db41018b20272905beef61ac036619b6 | 1HaskellADay/1HAD | Solution.hs | module HAD.Y2014.M04.D02.Solution where
import Control.Monad (mfilter)
-- | update update the nth element of a list
-- if the index is not a valid index, it leaves the list unchanged
--
-- Examples
--
> > > update ( -2 ) 10 [ 0 .. 4 ]
-- [0,1,2,3,4]
--
> > > update 6 10 [ 0 .. 4 ]
-- [0,1,2,3,4]
--
> > > update... | null | https://raw.githubusercontent.com/1HaskellADay/1HAD/3b3f9b7448744f9b788034f3aca2d5050d1a5c73/exercises/HAD/Y2014/M04/D02/Solution.hs | haskell | | update update the nth element of a list
if the index is not a valid index, it leaves the list unchanged
Examples
[0,1,2,3,4]
[0,1,2,3,4]
| module HAD.Y2014.M04.D02.Solution where
import Control.Monad (mfilter)
> > > update ( -2 ) 10 [ 0 .. 4 ]
> > > update 6 10 [ 0 .. 4 ]
> > > update 2 10 [ 0 .. 4 ]
[ 0,1,10,3,4 ]
update :: Int -> a -> [a] -> [a]
update i v = zipWith (maybe (const v) (const id) . mfilter (/= i) . Just) [0..]
|
37cf0caebfd500007715bced4fb1c9344ee70e7ea7adabf713e1b14afc2b5b63 | saikyun/clobits | create_ncurses_lib.clj | (ns clobits.examples.ncurses.create-ncurses-lib
(:require [clojure.string :as str]
[clobits.core :as cc]
[clobits.parse-c :as pc]
[clojure.pprint :refer [pp pprint]]))
(def lib-name 'clobits.ncurses)
(def functions [])
(def prototypes
["void free(voi... | null | https://raw.githubusercontent.com/saikyun/clobits/67bc60cbf6bed8a5178d552d3485e4117fb4df10/src/clj/clobits/examples/ncurses/create_ncurses_lib.clj | clojure | see -124 | (ns clobits.examples.ncurses.create-ncurses-lib
(:require [clojure.string :as str]
[clobits.core :as cc]
[clobits.parse-c :as pc]
[clojure.pprint :refer [pp pprint]]))
(def lib-name 'clobits.ncurses)
(def functions [])
(def prototypes
["void free(voi... |
5c264c9457ea599e4118fc1efe212a0ba6a4f5b01b72ad604f2e8f1eb9922fa6 | mcorbin/tour-of-clojure | ide.clj | ;; todo
| null | https://raw.githubusercontent.com/mcorbin/tour-of-clojure/57f97b68ca1a8c96904bfb960f515217eeda24a6/resources/public/pages/code/ide.clj | clojure | todo | |
d1b5bbd57100f2b07590c523b07f47c4953fa3baeeed87a56605d64820b784bf | spechub/Hets | ShipSyntax.hs | |
Module : ./OWL2 / ShipSyntax.hs
Copyright : ( c ) C. Maeder DFKI GmbH
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
different pretty printing for the SHIP tool
Module : ./OWL2/ShipSyntax.hs
Copyright ... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/OWL2/ShipSyntax.hs | haskell | Nothing denotes disjoint union
Nothing denotes composition!
allow more nominals
a missing rhs may be modelled as "< T" or by no constructors
| assertions
added try to recognize abox | |
Module : ./OWL2 / ShipSyntax.hs
Copyright : ( c ) C. Maeder DFKI GmbH
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
different pretty printing for the SHIP tool
Module : ./OWL2/ShipSyntax.hs
Copyright ... |
b44f81117f3085f6a1cc35739b730da4cab24a1dc1d4b79ad6beb18f05afe711 | avh4/elm-format | Stdio.hs | module TestWorld.Stdio (State, empty, fullStdout,fullStderr,getStdin,putStr,putStrLn,putStrStderr,putStrLnStderr,queueStdin) where
import Prelude hiding (putStr, putStrLn)
import Data.Text (Text)
data State =
State
{ _queuedStdin :: Text
, _stdout :: [Text]
, _stderr :: [Text]
}
... | null | https://raw.githubusercontent.com/avh4/elm-format/57f77ee0a667869ceed3a61a0f4eeaca56a3964f/elm-format-test-lib/src/TestWorld/Stdio.hs | haskell | module TestWorld.Stdio (State, empty, fullStdout,fullStderr,getStdin,putStr,putStrLn,putStrStderr,putStrLnStderr,queueStdin) where
import Prelude hiding (putStr, putStrLn)
import Data.Text (Text)
data State =
State
{ _queuedStdin :: Text
, _stdout :: [Text]
, _stderr :: [Text]
}
... | |
225e391374744cd1e0371df4045245c8de3daa4549b68fda6ef226926a7ed01e | craigfe/sink | ord.ml | include Ord_intf
let to_int_compare ord a b =
match ord.compare a b with
| Ordering.Lt -> -1
| Ordering.Eq -> 0
| Ordering.Gt -> 1
let of_int_compare compare a b =
match compare a b with
| n when n < 0 -> Ordering.Lt
| n when n > 0 -> Ordering.Gt
| _ -> Ordering.Eq
let poly (type a) (Proxy.T : a Prox... | null | https://raw.githubusercontent.com/craigfe/sink/c5431edfa1b06f1a09845a481c4afcb3e92f0667/src/sink/ord.ml | ocaml | include Ord_intf
let to_int_compare ord a b =
match ord.compare a b with
| Ordering.Lt -> -1
| Ordering.Eq -> 0
| Ordering.Gt -> 1
let of_int_compare compare a b =
match compare a b with
| n when n < 0 -> Ordering.Lt
| n when n > 0 -> Ordering.Gt
| _ -> Ordering.Eq
let poly (type a) (Proxy.T : a Prox... | |
6bb7d468a5d2a1d23a05b456f9b63b044be8ed85c9da1cc91a9d572f5a720a5b | screenshotbot/screenshotbot-oss | task-integration-api.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(uiop:define-package :screenshotbot/task-integration-api
(:use #:cl #:alexandria)... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/ceb79c9fb5da3cfb76708a518ab436af4dd99690/src/screenshotbot/task-integration-api.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
| This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(uiop:define-package :screenshotbot/task-integration-api
(:use #:cl #:alexandria)
(:export
#:task-integration
#:send-task
#:enab... |
fed1e26a236fb1a321daf7e8d178af9f4b3da63901ef9c3de3cff6190dcf6739 | paulrzcz/hquantlib | Pricer.hs | {-# LANGUAGE BangPatterns #-}
module QuantLib.Methods.Pricer
( MaxMinClosePricer (..)
, LastPointPricer (..)
, LogLastPointPricer (..)
) where
import QuantLib.Methods.MonteCarlo (PathPricer (..))
import QuantLib.Stochastic.Process (Dot (..))
data MaxMinClosePricer = MMCP {
... | null | https://raw.githubusercontent.com/paulrzcz/hquantlib/7689b93fa9724b44755148b104ec6c6916d241c3/src/QuantLib/Methods/Pricer.hs | haskell | # LANGUAGE BangPatterns #
| This pricer gets the last point of path
| This pricer estimates the log of difference between start and end of process | module QuantLib.Methods.Pricer
( MaxMinClosePricer (..)
, LastPointPricer (..)
, LogLastPointPricer (..)
) where
import QuantLib.Methods.MonteCarlo (PathPricer (..))
import QuantLib.Stochastic.Process (Dot (..))
data MaxMinClosePricer = MMCP {
mmcpHigh :: Double,
... |
40fe5820012ded936790f0ac0891623a27855ec46b311b10a8988ae6377cd1c4 | mathematical-systems/clml | dlasq5.lisp | ;;; Compiled by f2cl version:
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:0... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/lapack/dlasq5.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t)
(:relaxed-array-decls t) (:coerce-assigns :as-needed)
(:array-type ':array) (:array-slicing t)
(:declare-common nil) (:float-format double-float)) | ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ "
" $ I d :... |
b86251e6e613f49ae804de838194b105663cf4eb686cabd5237767b90e35dc08 | RoccoMathijn/programming-in-haskell | chapter07.hs | module Chapter7 where
import Prelude hiding (all, any, takeWhile, dropWhile, map, filter, curry, uncurry)
import Data.Char
1 .
exercise1 f p xs = map f (filter p xs)
2 .
-- a.
all :: (a -> Bool) -> [a] -> Bool
all p xs = foldr (\x acc -> p x && acc) True xs
all' :: (a -> Bool) -> [a] -> Bool
all' p = and . map p... | null | https://raw.githubusercontent.com/RoccoMathijn/programming-in-haskell/ef2e3a5fa8c8a82154fdd5cd067d83b1fef1f220/chapter07.hs | haskell | a.
b.
c.
d. | module Chapter7 where
import Prelude hiding (all, any, takeWhile, dropWhile, map, filter, curry, uncurry)
import Data.Char
1 .
exercise1 f p xs = map f (filter p xs)
2 .
all :: (a -> Bool) -> [a] -> Bool
all p xs = foldr (\x acc -> p x && acc) True xs
all' :: (a -> Bool) -> [a] -> Bool
all' p = and . map p
any... |
13722a83221e187726e3961f26ba73f0e2c25bc8fe8eefaf7aa993e8833880bf | mfikes/fifth-postulate | ns86.cljs | (ns fifth-postulate.ns86)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (xs... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns86.cljs | clojure | (ns fifth-postulate.ns86)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (xs... | |
de17f0b6e469c11b8701fe3a63f9e166d8e363503b80108270700c4b96353dbb | alexandergunnarson/quantum | reducers.cljc | (ns quantum.test.core.reducers
(:refer-clojure :exclude
[transduce])
(:require
[quantum.core.test
:refer [deftest is testing]]
[quantum.core.reducers :as ns]
[quantum.core.fn
:refer [aritoid fn' firsta rcomp]]
... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/test/quantum/test/core/reducers.cljc | clojure | ___________________________________________________________________________________________________________________________________
=================================================={ FUNCTIONEERING }=====================================================
=================================================={ ... | (ns quantum.test.core.reducers
(:refer-clojure :exclude
[transduce])
(:require
[quantum.core.test
:refer [deftest is testing]]
[quantum.core.reducers :as ns]
[quantum.core.fn
:refer [aritoid fn' firsta rcomp]]
... |
414a9fbfa7ac2739cfc40e7c348b4a25f9e21ec6f5ee51c5bc6518145856179c | bobbae/gosling-emacs | mh-util.ml | ; Utilities for mhe.
;
; Save and restore contents of kill buffer.
;
(defun
(&mh-save-killbuffer
(save-excursion
(temp-use-buffer "Kill buffer")
(temp-use-buffer "Kill save")
(setq backup-before-writing 0)
(erase-buffer)
(yank-buffer "Kill buffer")
(setq buffer-is-modified 0... | null | https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/lib/maclib/purdue/mh-util.ml | ocaml | ; Utilities for mhe.
;
; Save and restore contents of kill buffer.
;
(defun
(&mh-save-killbuffer
(save-excursion
(temp-use-buffer "Kill buffer")
(temp-use-buffer "Kill save")
(setq backup-before-writing 0)
(erase-buffer)
(yank-buffer "Kill buffer")
(setq buffer-is-modified 0... | |
efc9fcdd2585a797452b5d59f437bf728272f3a11a71a654dcf81f9d9ccd5f56 | Z572/guile-wlroots | screencopy.scm | (define-module (wlroots types screencopy)
#:use-module (wayland display)
#:use-module (bytestructure-class)
#:use-module ((system foreign) #:prefix ffi:)
#:use-module (bytestructures guile)
#:use-module (wlroots types)
#:use-module (wlroots utils)
#:use-module (oop goops)
#:duplicates
(merge-accessors... | null | https://raw.githubusercontent.com/Z572/guile-wlroots/dc6cd05d5c46f811d75cbc30d1464820b19b1de8/wlroots/types/screencopy.scm | scheme | (define-module (wlroots types screencopy)
#:use-module (wayland display)
#:use-module (bytestructure-class)
#:use-module ((system foreign) #:prefix ffi:)
#:use-module (bytestructures guile)
#:use-module (wlroots types)
#:use-module (wlroots utils)
#:use-module (oop goops)
#:duplicates
(merge-accessors... | |
cb7033cbf8f455254ec4ef46b99b72ecfe40ecb0b7136767ceb19f13bbf79c6c | fulcrologic/fulcro-spec | check.cljc | (ns fulcro-spec.check
#?(:cljs (:require-macros [fulcro-spec.check :refer [checker assert-is!]]))
(:require
[clojure.set :as set]
[clojure.spec.alpha :as s]
[fulcro-spec.impl.check :as impl]))
(defmacro checker
"Creates a function that takes only one argument (usually named `actual`).
For use in =... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-spec/ef3fece4a2562590547fe12f27f135148fda65cf/src/main/fulcro_spec/check.cljc | clojure | PASSES
FAILS | (ns fulcro-spec.check
#?(:cljs (:require-macros [fulcro-spec.check :refer [checker assert-is!]]))
(:require
[clojure.set :as set]
[clojure.spec.alpha :as s]
[fulcro-spec.impl.check :as impl]))
(defmacro checker
"Creates a function that takes only one argument (usually named `actual`).
For use in =... |
cacb1bcddeb8f4de4a5c87c265c19e622bab961650d857559b9853e98b25d746 | ekmett/ekmett.github.com | Fix.hs | -------------------------------------------------------------------------------------------
-- |
-- Module : Control.Comonad.Fix
Copyright : 2008
-- License : BSD
--
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
-------------------------------------------------------------------... | null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/category-extras-backup/src/Control/Comonad/Fix.hs | haskell | -----------------------------------------------------------------------------------------
|
Module : Control.Comonad.Fix
License : BSD
Stability : experimental
Portability : portable
----------------------------------------------------------------------------------------- | Copyright : 2008
Maintainer : < >
module Control.Comonad.Fix
( ComonadFix(..)
) where
import Control.Comonad
import Control.Monad.Identity
class Comonad w => ComonadFix w where
cofix :: w (w a -> a) -> a
instance ComonadFix Identity where
cofix (Identity f) = fix (f . Identity)
instance ComonadFix... |
adafc7920e0f3e812c0ff60f65beb2272bd8378aba9be4a1dd4f7bd1cdbdac1d | clojurewerkz/statistiker | naive_bayes.clj | (ns clojurewerkz.statistiker.classification.naive-bayes
(:require [clojure.core.matrix :refer [transpose]]
[clojurewerkz.statistiker.fast-math :refer [sqrt pow exp]]
[clojurewerkz.statistiker.utils :refer [map-groups select-keys-order-dependent]]
[clojurewerkz... | null | https://raw.githubusercontent.com/clojurewerkz/statistiker/f056f68c975cf3d6e0f1c8212aef9114d4eb657c/src/clj/clojurewerkz/statistiker/classification/naive_bayes.clj | clojure | ? Evidence
TODO: add probability and confidence | (ns clojurewerkz.statistiker.classification.naive-bayes
(:require [clojure.core.matrix :refer [transpose]]
[clojurewerkz.statistiker.fast-math :refer [sqrt pow exp]]
[clojurewerkz.statistiker.utils :refer [map-groups select-keys-order-dependent]]
[clojurewerkz... |
c2d5fc69ce7e848bc823b24d66150f74d750ccfa9ea3bcac84678a8ed09bc3a1 | sdiehl/llvm-pp | General.hs | module LLVM.General (
module LLVM.General,
module LLVM.General.Pretty,
module LLVM.General.Typed
) where
import LLVM.General
import LLVM.General.Pretty
import LLVM.General.Typed
| null | https://raw.githubusercontent.com/sdiehl/llvm-pp/056dd82ddcdf775f03a6baea6c9fb68bb98f1337/src/LLVM/General.hs | haskell | module LLVM.General (
module LLVM.General,
module LLVM.General.Pretty,
module LLVM.General.Typed
) where
import LLVM.General
import LLVM.General.Pretty
import LLVM.General.Typed
| |
08570dde1c79cb73f864edd385f2192308a16ab6364e482de13915705b03a3c2 | facebook/flow | context.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/43a06a5f47406759e82bdab8a0771e81892c5522/src/typing/context.ml | ocaml | local
global
save_implicit_instantiation_results is used for the implicit instantiation
* annotation codemod
mapping from keyed alocs to concrete locations
map from goal ids to types
graph tracking full resolution of types
map from exists proposition locations to the types of values running through them... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
6b34dcce1c52e31620025582731fa345ad048a76de4d4caae830429b288ce082 | rizo/snowflake-os | asmlink.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/ocamlopt.opt/asmcomp/asmlink.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Format
val link: format... |
94eb3aa88b18a528b610ed117a231b3dcc0697a2d80edecb40509b81f19243f3 | ropas/sparrow | accessSem.mli | (***********************************************************************)
(* *)
Copyright ( c ) 2007 - present .
Programming Research Laboratory ( ROPAS ) , Seoul National University .
(* All rights reserved... | null | https://raw.githubusercontent.com/ropas/sparrow/3ec055b8c87b5c8340ef3ed6cde34f5835865b31/src/sparse/accessSem.mli | ocaml | *********************************************************************
All rights reserved.
See the LICENSE file for details. ... | Copyright ( c ) 2007 - present .
Programming Research Laboratory ( ROPAS ) , Seoul National University .
This software is distributed under the term of the BSD license .
module type S =
sig
include AbsSem.S
module Access : Access.S with type t = Dom.Access.t
a... |
db71f1eb11b331c9ded23ea215348a644695de495f9940574e278eb95ba5d2ff | deg/re-frame-storage-fx | storage.cljs | (ns com.degel.re-frame.storage
[ : as repl ]
[re-frame.core :refer [console dispatch reg-cofx reg-fx]]))
( defonce conn
;; (repl/connect ":9000/repl"))
(enable-console-print!)
The Web Storage API offers the ability to store data on the client ,
;; per-session or persistently, and is supported b... | null | https://raw.githubusercontent.com/deg/re-frame-storage-fx/a00606f99bb4542b68269e223603b3cfb4dc744e/src/com/degel/re_frame/storage.cljs | clojure | (repl/connect ":9000/repl"))
per-session or persistently, and is supported by nearly all modern browsers.
Unlike cookies, web storage is used purely on the client.
A coeffect handler that injects whether there are any stored values for this
document or session.
A coeffect handler that injects the stored value(s... | (ns com.degel.re-frame.storage
[ : as repl ]
[re-frame.core :refer [console dispatch reg-cofx reg-fx]]))
( defonce conn
(enable-console-print!)
The Web Storage API offers the ability to store data on the client ,
(defn storage-area [session?]
(aget js/window
(if session? "sessionStorag... |
7249d8588156ae5a17783cc7076a4e715d194bad12b09f1ab414648936ad671d | jaredly/reepl | parinferize.cljs | (ns reepl.parinferize
(:require [clojure.string :refer [join]]
[parinfer-codemirror.state :refer [state
empty-editor-state]]
[parinfer-codemirror.editor-support :refer [update-cursor!
fix-tex... | null | https://raw.githubusercontent.com/jaredly/reepl/96a8979c574b3979a7aeeed27e57a2ec4d357350/src/reepl/parinferize.cljs | clojure | ----------------------------------------------------------------------
Life Cycle events
----------------------------------------------------------------------
NOTE:
Text is either updated after a change in text or
a cursor movement, but not both.
When typing, on-change is called, then on-cursor-activity.
So we ... | (ns reepl.parinferize
(:require [clojure.string :refer [join]]
[parinfer-codemirror.state :refer [state
empty-editor-state]]
[parinfer-codemirror.editor-support :refer [update-cursor!
fix-tex... |
934446409be4924feefe1eba67a8036b2bcfa0c1cfafe2bc97877c98e41e0543 | franklindyer/cs357-ta-materials | parallel_and.rkt | #lang racket
(define-syntax and1
(syntax-rules ()
((and1 x y)
(let ((tmp x))
(if tmp y #f)))))
(define-syntax and2
(syntax-rules ()
((and2 x y)
(let ((tmp y))
(if tmp x #f)))))
(define-syntax andp
(syntax-rules ()
((andp x y)
(let* ((ch (make-channel))
(th1 (thread ... | null | https://raw.githubusercontent.com/franklindyer/cs357-ta-materials/087cdc29e13d7f0796d70f2bc9e08a20f626ac92/scheme/misc/parallel_and.rkt | racket | #lang racket
(define-syntax and1
(syntax-rules ()
((and1 x y)
(let ((tmp x))
(if tmp y #f)))))
(define-syntax and2
(syntax-rules ()
((and2 x y)
(let ((tmp y))
(if tmp x #f)))))
(define-syntax andp
(syntax-rules ()
((andp x y)
(let* ((ch (make-channel))
(th1 (thread ... | |
9182bc15a9557f72cb253cb84a267174f64d17456c4d26f7c60c1f520aad25a9 | clojure-emacs/clj-suitable | project.clj | (require '[clojure.string :as string])
(defn deep-merge
{:license "Copyright © 2019 James Reeves
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version."}
([])
([a] a)
([a b]
(when (or a b)
(letfn [(merge-entry [m e]
(let [k (key e)
... | null | https://raw.githubusercontent.com/clojure-emacs/clj-suitable/8ec4258709d3a41f3cdd51c646674e0dba80219d/project.clj | clojure | (require '[clojure.string :as string])
(defn deep-merge
{:license "Copyright © 2019 James Reeves
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version."}
([])
([a] a)
([a b]
(when (or a b)
(letfn [(merge-entry [m e]
(let [k (key e)
... | |
e81e2bb628c4c3411e6817b53dbcfbfb7e9f78043c573de3e2ba5ab5431631fc | mhkoji/Senn | ibus.lisp | (defpackage :senn.t.ibus
(:use :cl)
(:export :add-tests))
(in-package :senn.t.ibus)
(fiveam:def-suite :senn.t.ibus :in :senn.t)
(defmacro add-tests (name &rest syms)
(let ((full-name (intern (concatenate 'string
"SENN.T.IBUS." (string-upcase name))
:keyword... | null | https://raw.githubusercontent.com/mhkoji/Senn/74f909bfe10ba360523be5b3b162688f21f5b333/senn/t/ibus/ibus.lisp | lisp | (defpackage :senn.t.ibus
(:use :cl)
(:export :add-tests))
(in-package :senn.t.ibus)
(fiveam:def-suite :senn.t.ibus :in :senn.t)
(defmacro add-tests (name &rest syms)
(let ((full-name (intern (concatenate 'string
"SENN.T.IBUS." (string-upcase name))
:keyword... | |
a39828aca23b7c7f37b659fc825e082917602056c80818cafbe970dc4548fcc9 | wangzhe3224/cs3110 | loop.ml | open Async
let stdin : Reader.t = Lazy.force Reader.stdin
let shout () : unit Deferred.t =
(* prompt the user using [printf] *)
printf "> ";
(* read the input using [Reader.read_line stdin] *)
Reader.read_line stdin >>= fun r ->
wait 3 seconds using [ after ]
after (Core.sec 3.0) >>= fun _ ->
print o... | null | https://raw.githubusercontent.com/wangzhe3224/cs3110/33c1b9662ee5ba4bd13d7ec5a116b539bf086605/labs/lab24/_build/loop.ml | ocaml | prompt the user using [printf]
read the input using [Reader.read_line stdin]
exit the program using [exit] | open Async
let stdin : Reader.t = Lazy.force Reader.stdin
let shout () : unit Deferred.t =
printf "> ";
Reader.read_line stdin >>= fun r ->
wait 3 seconds using [ after ]
after (Core.sec 3.0) >>= fun _ ->
print out whatever the user entered , but converted to all caps , using [ printf ] ;
or if EO... |
b5e6046649d33c6c92a1439c81a976a2d2023aa319e6f4b91a129ceb9ec4523f | Rober-t/apxr_run | flatland.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright ( C ) 2009 by , DXNN Research Group ,
%%%
%%%
%%% The original release of this source code was introduced and explained
in a book ( available for purchase on Amazon ) by :
%%%
Handbook of Neuroevolution... | null | https://raw.githubusercontent.com/Rober-t/apxr_run/9c62ab028af7ff3768ffe3f27b8eef1799540f05/src/examples/applications/flatland/flatland.erl | erlang |
The original release of this source code was introduced and explained
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 ... | Copyright ( C ) 2009 by , DXNN Research Group ,
in a book ( available for purchase on Amazon ) by :
Handbook of Neuroevolution Through Erlang . Springer 2012 ,
print ISBN : 978 - 1 - 4614 - 4462 - 6 ebook ISBN : 978 - 1 - 4614 - 4463 - 6 .
Licensed under the Apache License , Version 2.0 ( th... |
8c5dd9089e93ce423026aa1d7131161930e86980e015546ce9b42bfc3764ef04 | ghc/packages-Cabal | setup.test.hs | import Test.Cabal.Prelude
-- Test that we don't accidentally add the inplace directory to
an executable RPATH . Do n't test on Windows , which does n't
-- support RPATH.
main = setupAndCabalTest $ do
skipIf =<< isWindows
setup "configure" ["--enable-executable-dynamic"]
setup "build" []
-- This shou... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-testsuite/PackageTests/Regression/T4025/setup.test.hs | haskell | Test that we don't accidentally add the inplace directory to
support RPATH.
This should fail as it we should NOT be able to find the
dynamic library for the internal library (since we didn't
install it). If we incorrectly encoded our local dist
dir in the RPATH, this will succeed. | import Test.Cabal.Prelude
an executable RPATH . Do n't test on Windows , which does n't
main = setupAndCabalTest $ do
skipIf =<< isWindows
setup "configure" ["--enable-executable-dynamic"]
setup "build" []
recordMode DoNotRecord . fails $ runExe "exe" []
|
c306726e8e06922f744e0591df507c059003e03211d9cb3c6af48c3f38c4c1cc | jeapostrophe/exp | opt-arrow.rkt | #lang typed/racket/base
(require (for-syntax racket/base))
(: foo
(case-> [Integer Integer -> Integer]
[Integer Integer Integer -> Integer]
[Integer Integer Integer Integer -> Integer]))
(define foo
(opt-lambda: ([w : Integer] [x : Integer] [y : Integer 3] [z : Integer 4])
(+ w x y z)))
... | null | https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/opt-arrow.rkt | racket | #lang typed/racket/base
(require (for-syntax racket/base))
(: foo
(case-> [Integer Integer -> Integer]
[Integer Integer Integer -> Integer]
[Integer Integer Integer Integer -> Integer]))
(define foo
(opt-lambda: ([w : Integer] [x : Integer] [y : Integer 3] [z : Integer 4])
(+ w x y z)))
... | |
b27789311ccb92c9bb20d5879ee0133f843c9df79af7b8f7c8a5aaef7830849e | inria-parkas/sundialsml | idasBruss_FSA_kry_bbd_p.ml | * -----------------------------------------------------------------
* $ Revision :
* $ Date :
* -----------------------------------------------------------------
* Programmer(s ): and @ LLNL
* -----------------------------------------------------------------
* OCaml port : , , Aug 2014 .
*... | null | https://raw.githubusercontent.com/inria-parkas/sundialsml/a1848318cac2e340c32ddfd42671bef07b1390db/examples/idas/parallel/idasBruss_FSA_kry_bbd_p.ml | ocaml | Problem Constants
pi
Number of x mesh points per processor subgrid
Number of y mesh points per processor subgrid
Number of subgrids in the x direction
Number of subgrids in the y direction
MY = number of y mesh points
Number of equations in system
atol tolerance
Multiplier for tout values
Incremen... | * -----------------------------------------------------------------
* $ Revision :
* $ Date :
* -----------------------------------------------------------------
* Programmer(s ): and @ LLNL
* -----------------------------------------------------------------
* OCaml port : , , Aug 2014 .
*... |
0da2d1fe51cdb36bbba05039b53d91e85bbe6338526d2eb60c39b315c28b0573 | GaloisInc/LIMA | Compile.hs | -- |
-- Module: Language.LIMA.C.Compile
-- Description: Compilation functions
Copyright : ( c ) 2013 Lee Pike
Copyright : ( c ) 2017
--
LIMA compilation functions
module Language.LIMA.C.Compile
( compile
, CompileResult(..)
, reportSchedule
, Schedule
) where
import System.Exit
import Control.Mon... | null | https://raw.githubusercontent.com/GaloisInc/LIMA/8006bb52b2fb5d3264fe55ef8c9b7c89ab7f4630/lima-c/src/Language/LIMA/C/Compile.hs | haskell | |
Module: Language.LIMA.C.Compile
Description: Compilation functions
| Package of all the compilation results
^ schedule computed by the compiler
^ rule coverage
^ channels used in the system
^ assertion statement names
^ coverage statement names
^ declared probe names and types
| Compiles an atom descripti... | Copyright : ( c ) 2013 Lee Pike
Copyright : ( c ) 2017
LIMA compilation functions
module Language.LIMA.C.Compile
( compile
, CompileResult(..)
, reportSchedule
, Schedule
) where
import System.Exit
import Control.Monad (when)
import Data.Maybe (isJust)
import Language.LIMA.Elaboration
import Lan... |
b343884d83d9a6bd1cc52b7942edf2db5a4bf05086b9c62ec85f6724aad9a6bb | wdebeaum/step | wellness.lisp | ;;;;
;;;; w::wellness
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(w::wellness
(SENSES
((LF-PARENT ONT::health-scale)
(meta-data :origin cardiac :entry-date 20090408 :change-date nil :wn ("health%1:26:01") :comments nil)
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/wellness.lisp | lisp |
w::wellness
|
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(w::wellness
(SENSES
((LF-PARENT ONT::health-scale)
(meta-data :origin cardiac :entry-date 20090408 :change-date nil :wn ("health%1:26:01") :comments nil)
)
)
)
))
|
b283f4399b059da1ed0c90a42ae5dd9deac6ebf0f2bbe59aabc203792bdcb046 | derekmcloughlin/pearls | chap05c.hs | import Data.List
import Data.List.Ordered
import Data.Array
import System.Random
xs = [7, 3, 1, 9, 5]
ys = [40, 20, 30, 60, 50]
sortsums :: Ord a => Num a => [a] -> [a] -> [a]
sortsums xs ys = map fst (sortsubs xs (map negate ys))
sortsubs :: Ord a => Num a => [a] -> [a] -> [(a, (Int, Int))]
sortsubs xs ys = sortBy ... | null | https://raw.githubusercontent.com/derekmcloughlin/pearls/42bc6ea0fecc105386a8b75789f563d44e05b772/chap05/chap05c.hs | haskell | import Data.List
import Data.List.Ordered
import Data.Array
import System.Random
xs = [7, 3, 1, 9, 5]
ys = [40, 20, 30, 60, 50]
sortsums :: Ord a => Num a => [a] -> [a] -> [a]
sortsums xs ys = map fst (sortsubs xs (map negate ys))
sortsubs :: Ord a => Num a => [a] -> [a] -> [(a, (Int, Int))]
sortsubs xs ys = sortBy ... | |
b0ef4742a20656ba1241528c9c52ec42453488f5a1c36dfa417f0a8e78ba53df | tolysz/ghcjs-stack | RebuildMonad.hs | # LANGUAGE CPP #
# LANGUAGE GeneralizedNewtypeDeriving #
-- | An abstraction for re-running actions if values or files have changed.
--
-- This is not a full-blown make-style incremental build system, it's a bit
-- more ad-hoc than that, but it's easier to integrate with existing code.
--
-- It's a convenient interfac... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/cabal-install/Distribution/Client/RebuildMonad.hs | haskell | | An abstraction for re-running actions if values or files have changed.
This is not a full-blown make-style incremental build system, it's a bit
more ad-hoc than that, but it's easier to integrate with existing code.
It's a convenient interface to the "Distribution.Client.FileMonitor"
functions.
* Rebuild mon... | # LANGUAGE CPP #
# LANGUAGE GeneralizedNewtypeDeriving #
module Distribution.Client.RebuildMonad (
Rebuild,
runRebuild,
askRoot,
monitorFiles,
MonitorFilePath,
monitorFile,
monitorFileHashed,
monitorNonExistentFile,
monitorDirectory,
monitorNonExistentDirectory,
monitorDire... |
a3f67e29c44b26ca1e4f1ec6d8a7bb11a0c59871b4ed59681dc2efcbaeb3be4c | metaocaml/ber-metaocaml | yallop_bugs.ml | (* TEST
* expect
*)
Injectivity
type (_, _) eq = Refl : ('a, 'a) eq
let magic : 'a 'b. 'a -> 'b =
fun (type a b) (x : a) ->
let module M =
(functor (T : sig type 'a t end) ->
struct
let f (Refl : (a T.t, b T.t) eq) = (x :> b)
end)
(struct type 'a t = unit end)
in M... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-gadts/yallop_bugs.ml | ocaml | TEST
* expect
Variance and subtyping
Record patterns |
Injectivity
type (_, _) eq = Refl : ('a, 'a) eq
let magic : 'a 'b. 'a -> 'b =
fun (type a b) (x : a) ->
let module M =
(functor (T : sig type 'a t end) ->
struct
let f (Refl : (a T.t, b T.t) eq) = (x :> b)
end)
(struct type 'a t = unit end)
in M.f Refl
;;
[%%expect{|
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.