code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Cortex.Saffron.Apps.RailsDev
( prepare
, run
) where
-----
import Control.Concurrent.Lifted
import Control.Monad.Trans (liftIO)
import System.Environment (getEnvironment)
import Cortex.Saffron.GrandMonadStack
import qualified Cortex.Saffron.Apps.Common as Common
-----
makeEnv :: AppManagerMonadS... | maarons/Cortex | Saffron/Apps/RailsDev.hs | agpl-3.0 | 773 | 0 | 11 | 163 | 238 | 133 | 105 | 22 | 1 |
{- Copyright (C) 2015 Yuval Langer
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distr... | yuvallanger/yasamsim | Setup.hs | agpl-3.0 | 750 | 0 | 4 | 151 | 12 | 7 | 5 | 2 | 1 |
module HLol.API.LolStatus (
getShards,
getShardByRegion
) where
import HLol.Data.LolStatus (Shard, ShardStatus)
import HLol.Network.Rest
import HLol.Utils
import Control.Monad
import Data.Aeson
getShards :: IO (Either LolError [Shard])
getShards =
fmap (join . mapR (liftError. eitherDecode)) $ sendAP... | tetigi/hlol | src/HLol/API/LolStatus.hs | agpl-3.0 | 592 | 0 | 13 | 85 | 164 | 89 | 75 | 14 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TemplateHaskell #-}
module Relational.Types where
import Control.Monad.State
import Data.Aeson
import Data.Dynamic
import qualified Data.HashTable.IO as H
import Data.Label (mkLabel)
-- Related a :: Contraint
type ... | nitrix/lspace | relational/Relational/Types.hs | unlicense | 845 | 0 | 12 | 165 | 196 | 117 | 79 | 18 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
module Types where
import RIO
import RIO.Process
data App = App
{ appLogFunc :: !LogFunc
, appProcessContext :: !ProcessContext
}
instance HasLogFunc App where
logFuncL = lens appLogFunc (\x y -> x { appLogFunc = y })
instance HasProcessContext App where
processContextL =... | haroldcarr/learn-haskell-coq-ml-etc | haskell/course/2018-06-snoyman-applied-haskell-at-lambdaconf/use-rio-example/src/Types.hs | unlicense | 382 | 0 | 10 | 71 | 108 | 62 | 46 | 15 | 0 |
{- package.yaml
name: more-math
version: 0.1.0.0
synopsis: More Math for Haskell (Big integers, fractions, etc).
category: Math
author: dmitmel
maintainer: dmytro.meleshko@gmail.com
license: Apache-2.0
github: dmitmel/more-m... | dmitmel/goiteens-hw-in-haskell | Utils/Math/MoreMath.hs | apache-2.0 | 2,431 | 0 | 5 | 596 | 37 | 26 | 11 | 5 | 0 |
-- voting algorithms
-- sample data
votes1 :: [String]
votes1 = ["Red","Blue","Green","Blue","Blue","Red","Yellow","Blue","Blue"]
ballots :: [[String]]
ballots = [["Red", "Green", "Blue"],
["Blue"],
["Green","Yellow","Red","Blue"],
["Blue","Green","Red"],
["Green"]]
-- he... | Crossroadsman/ProgrammingInHaskell | 07/voting.hs | apache-2.0 | 1,611 | 0 | 10 | 379 | 534 | 302 | 232 | 27 | 2 |
module StatNLP.Corpus
( initCorpus
, makeCorpus
, addDocument
, updateDocumentFilters
, loadCorpusDirectory
, indexCorpus
, indexCorpus'
, inverseIndexCorpus
, readCorpusVectors
, transformer
) where
import Control.Arrow ((&&&))
import Control.Le... | erochest/stat-nlp | src/StatNLP/Corpus.hs | apache-2.0 | 3,408 | 0 | 18 | 1,024 | 1,014 | 511 | 503 | 79 | 2 |
-----------------------------------------------------------------------------
-- Copyright 2019, Ideas project team. This file is distributed under the
-- terms of the Apache License 2.0. For more information, see the files
-- "LICENSE.txt" and "NOTICE.txt", which are included in the distribution.
-----------------... | ideas-edu/ideas | src/Ideas/Text/UTF8.hs | apache-2.0 | 4,117 | 0 | 21 | 1,073 | 1,310 | 694 | 616 | 75 | 5 |
{- |
Module : Bio.Motions.Callback.Parser.Parser
Description : Contains the definitions of various 'Callback' parsing-related types.
License : Apache
Stability : experimental
Portability : unportable
-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds... | Motions/motions | src/Bio/Motions/Callback/Parser/Parser.hs | apache-2.0 | 16,231 | 0 | 18 | 4,523 | 4,905 | 2,589 | 2,316 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : FFICXX.Generate.QQ.Verbatim
-- Copyright : (c) 2011-2013 Ian-Woo Kim
--
-- License : BSD3
-- Maintainer : Ian-Woo Kim <ianwookim@gmail.com>
-- Stability : experimental
-- Portability : GHC
--
-------------------... | Gabriel439/fficxx | lib/FFICXX/Generate/QQ/Verbatim.hs | bsd-2-clause | 632 | 0 | 7 | 116 | 56 | 41 | 15 | 6 | 1 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QHttp.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:31
Warning : this file is machine generated - do not mod... | keera-studios/hsQt | Qtc/Network/QHttp.hs | bsd-2-clause | 23,294 | 0 | 16 | 4,262 | 8,143 | 4,157 | 3,986 | -1 | -1 |
{-# LANGUAGE KindSignatures, TypeFamilies, ConstraintKinds, PolyKinds, MultiParamTypeClasses #-}
module Control.Effect where
import Prelude hiding (Monad(..))
import GHC.Exts ( Constraint )
{-| Specifies "parametric effect monads" which are essentially monads but
annotated by a type-level monoid formed by ... | dorchard/effect-monad | src/Control/Effect.hs | bsd-2-clause | 1,298 | 0 | 12 | 318 | 331 | 188 | 143 | 16 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Application
( makeApplication
, getApplicationDev
, makeFoundation
) where
import Import
import Settings
import Yesod.Auth
import Yesod.Fay
import Yesod.Default.Config
import Yesod.Default.Main
import Yesod.Default.Handlers
import Network.Wai.Middleware.Requ... | snoyberg/photosorter | Application.hs | bsd-2-clause | 2,306 | 0 | 11 | 409 | 414 | 230 | 184 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Prelude ()
import MyLittlePrelude
import Control.Monad (forM_, when)
import Control.Monad.Except (runExceptT)
import Data.Monoid ... | zudov/purescript-inspection | worker/Main.hs | bsd-3-clause | 4,187 | 0 | 26 | 1,495 | 841 | 447 | 394 | 85 | 2 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Test.Util where
import Control.Applicative
import Data.Vector (Vector)
import qualified Data.Vector as Vector
import Test.QuickCheck
import Data.Patch
nonEmpty :: Vector a -> Bool
nonEmpty = (>0) . Vector.length
editsTo :: Arbitra... | liamoc/patches-vector | test/Test/Util.hs | bsd-3-clause | 1,224 | 0 | 12 | 274 | 514 | 253 | 261 | 30 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Instrument.Worker
( initWorkerCSV,
initWorkerCSV',
initWorkerGraphite,
initWorkerGraphite',
work,
initWorker,
AggProc... | Soostone/instrument | instrument/src/Instrument/Worker.hs | bsd-3-clause | 15,064 | 0 | 22 | 3,310 | 3,486 | 1,850 | 1,636 | 296 | 3 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module ArbitraryInstances
( MediumWord(..)
) where
import Test.QuickCheck
import Test.QuickCheck.Instances ()
import qualified Crypto.PubKey.ECC.ECDSA as Crypto
import qualified Crypto.PubKey.ECC.Types as Crypto
import qualified Data.ByteString.Ch... | TGOlson/blockchain | test/ArbitraryInstances.hs | bsd-3-clause | 2,691 | 0 | 12 | 678 | 583 | 324 | 259 | 67 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DataKinds #-}
module BSP.Tests.UART.DebugApp (app) where
import Ivory.Language
import Ivory.Stdlib
import Ivory.Tower
import BSP.Tests.Platforms
import Ivory.BSP.STM32.Pla... | GaloisInc/ivory-tower-stm32 | ivory-bsp-tests/BSP/Tests/UART/DebugApp.hs | bsd-3-clause | 3,946 | 0 | 27 | 1,424 | 1,163 | 565 | 598 | 121 | 1 |
module Experiments.Concurrency.Simple where
import Control.Concurrent
import Control.Monad
import Data.Monoid
data PingPong
= Ping
| Pong
deriving (Eq, Show)
threadHandler :: MVar PingPong -> IO ()
threadHandler ppMVar = do
val <- takeMVar ppMVar
myId <- myThreadId
putStrLn... | rumblesan/haskell-experiments | src/Experiments/Concurrency/Simple.hs | bsd-3-clause | 816 | 0 | 11 | 194 | 265 | 126 | 139 | 28 | 2 |
fib :: Int -> Int
fib n | n == 0 = 0
| n == 1 = 1
| True = fib (n-1) + fib (n-2)
main = fib 33
| atzedijkstra/uhc-doc | text/llvm/code/Fib.hs | bsd-3-clause | 119 | 0 | 9 | 55 | 85 | 40 | 45 | 5 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Stack.Types.PackageIndex
( PackageDownload (..)
, HSPackageDownload (..)
, PackageCache (..... | martin-kolinek/stack | src/Stack/Types/PackageIndex.hs | bsd-3-clause | 5,676 | 0 | 14 | 1,505 | 1,291 | 707 | 584 | 160 | 1 |
module PSBT.SemVer.Util (
positiveDigit
) where
import Text.Megaparsec ((<|>))
import Text.Megaparsec.Char (char)
import Text.Megaparsec.String (Parser)
positiveDigit :: Parser Char
positiveDigit = char '1'
<|> char '2'
<|> char '3'
<|> char '4'
<|> c... | LightAndLight/psbt | src/PSBT/SemVer/Util.hs | bsd-3-clause | 440 | 0 | 13 | 176 | 118 | 62 | 56 | 15 | 1 |
{-# LANGUAGE FlexibleInstances #-}
module AI.DataLoader
where
import Control.Monad
import Debug.Trace
import System.IO
import Text.ParserCombinators.Parsec
import AI.Classification
-------------------------------------------------------------------------------
data DatafileDesc = DatafileDesc
{ datafileNam... | mikeizbicki/Classification | src/AI/DataLoader.hs | bsd-3-clause | 3,573 | 0 | 12 | 908 | 1,063 | 544 | 519 | 81 | 3 |
{-# OPTIONS_HADDOCK show-extensions #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-|
Module : Control.THEff
Description : Main module of TH Eff package.
Copyright : (c) Kolodezny Diver, 2015
Li... | KolodeznyDiver/THEff | src/Control/THEff.hs | bsd-3-clause | 5,165 | 0 | 13 | 1,598 | 848 | 484 | 364 | -1 | -1 |
{-# LANGUAGE LambdaCase #-}
module Data.StructuralTraversal.Indexing where
import Data.StructuralTraversal.Class
import Control.Monad.State
import Control.Applicative
indexedTraverse :: StructuralTraversable t => (a -> [Int] -> b) -> t a -> t b
indexedTraverse f
= flip evalState []
. traverseUp ( modify (0:) ... | nboldi/structural-traversal | src/Data/StructuralTraversal/Indexing.hs | bsd-3-clause | 530 | 0 | 17 | 198 | 165 | 88 | 77 | 12 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
module Main (main) where
import Prelude ()
import Prelude.Compat
import Criterion.Main
import qualified Data.Aeson.Parser.UnescapeFFI as FFI
import qualified Data.Aeson.Parser.UnescapePure as Pure
import qualified Data.ByteString.Char... | sol/aeson | benchmarks/Escape.hs | bsd-3-clause | 855 | 0 | 14 | 212 | 269 | 148 | 121 | 25 | 3 |
-----------------------------------------------------------------------------
-- |
-- Module : RefacAddField
-- Copyright : (c) Christopher Brown 2007
--
-- Maintainer : cmb21@kent.ac.uk
-- Stability : provisional
-- Portability : portable
--
-- This module contains a transformation for HaRe.
-- Add a fi... | forste/haReFork | refactorer/RefacAddField.hs | bsd-3-clause | 10,744 | 6 | 27 | 3,985 | 3,356 | 1,724 | 1,632 | -1 | -1 |
module CommandLine.ResolveFiles (resolveElmFiles, Error(..)) where
-- This module provides reusable functions to resolve command line arguments into a list of Elm files
import Prelude ()
import Relude
import CommandLine.InfoFormatter (ToConsole(..))
import qualified CommandLine.Filesystem as Filesystem
import Comman... | avh4/elm-format | elm-format-lib/src/CommandLine/ResolveFiles.hs | bsd-3-clause | 1,664 | 0 | 16 | 505 | 409 | 214 | 195 | -1 | -1 |
module RSS
( checkFeeds
) where
import Control.Lens ((^.))
import Control.Monad (when)
import Control.Monad.IO.Class (liftIO)
import Data.Maybe (fromMaybe)
import Data.Monoid ((<>))
import Data.Text.Lazy a... | jamesdabbs/zorya | src/RSS.hs | bsd-3-clause | 2,897 | 0 | 22 | 845 | 987 | 504 | 483 | 79 | 3 |
-- |Authentication related functions.
module MSF.Auth
( module Types.Auth
, auth_login
, auth_logout
, auth_token_add
, auth_token_remove
, auth_token_generate
, auth_token_list
) where
import MSF.Monad
import Types.Auth
import qualified RPC.Auth as RPC
-- | Login to a given host with user and pass, r... | GaloisInc/msf-haskell | src/MSF/Auth.hs | bsd-3-clause | 1,428 | 0 | 10 | 252 | 344 | 188 | 156 | 27 | 1 |
module Data.Povray.Camera where
import Data.Povray.Types
import Data.Povray.Base
import Data.Maybe
data Camera = Camera {
_location :: Vect,
_lookAt :: Vect,
_angle :: Maybe Double,
_sky :: Maybe Vect
}
instance Povray Camera where
toPov (Camera loc at ang sky) = join [
"camera {",
... | lesguillemets/hspov_proto | src/Data/Povray/Camera.hs | bsd-3-clause | 495 | 0 | 9 | 142 | 140 | 80 | 60 | 17 | 0 |
--------------------------------------------------------------------------------
module Copilot.Kind.Kind2.PrettyPrint ( prettyPrint ) where
import Copilot.Kind.Misc.SExpr
import qualified Copilot.Kind.Misc.SExpr as SExpr
import Copilot.Kind.Kind2.AST
import Data.List (intercalate)
---------------------------------... | jonathan-laurent/copilot-kind | src/Copilot/Kind/Kind2/PrettyPrint.hs | bsd-3-clause | 2,128 | 0 | 11 | 437 | 643 | 335 | 308 | 46 | 2 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- | <http://www.libtorrent.org/reference-Create_Torrents.ht... | eryx67/haskell-libtorrent | src/Network/Libtorrent/CreateTorrent.hs | bsd-3-clause | 9,765 | 0 | 20 | 2,700 | 2,085 | 1,109 | 976 | 185 | 1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-|
Module : Numeric.AERN.Basics.SizeLimits
Description : intrinsic size limit such as precision
Copyright : (c) Michal Konecny
License : BSD3
Maintainer : mikkonecny@gmail.com
Stability : experimental
Porta... | michalkonecny/aern | aern-order/src/Numeric/AERN/Basics/SizeLimits.hs | bsd-3-clause | 2,307 | 0 | 9 | 489 | 373 | 188 | 185 | 37 | 1 |
{-# LANGUAGE MultiParamTypeClasses
, FunctionalDependencies
, FlexibleInstances
, UndecidableInstances #-}
---------------------------------------------------------------------------
-- TypeCast from HList.
---------------------------------------------------------------------------
modu... | jkarni/polycephalous-instances | src/Language/Haskell/Polycephaly/Typecast.hs | bsd-3-clause | 783 | 0 | 8 | 157 | 211 | 118 | 93 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
-- | Define the types used to describes CSS elements
module Graphics.Svg.CssTypes
( CssSelector( .. )
, CssSelectorRule
, CssRule( .. )
, CssDescriptor( .. )
, CssDeclaration( .. )
, CssElement( .. )
, CssMatcheable( .. )
, CssCont... | jhegedus42/svg-tree | src/Graphics/Svg/CssTypes.hs | bsd-3-clause | 8,633 | 0 | 13 | 2,391 | 2,334 | 1,208 | 1,126 | 207 | 9 |
-- In extensible effects, the operators are dumb data types.
-- We need to enable a few language extensions...
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
... | AaronFriel/eff-experiments | examples/eff.hs | bsd-3-clause | 6,762 | 1 | 15 | 1,685 | 2,428 | 1,262 | 1,166 | -1 | -1 |
-- | Support for command-line completion at the REPL and in the prover
module Idris.Completion (replCompletion, proverCompletion) where
import Core.Evaluate (ctxtAlist)
import Core.TT
import Core.CoreParser (opChars)
import Idris.AbsSyntaxTree
import Idris.Help
import Control.Monad.State.Strict
import Data.List
imp... | christiaanb/Idris-dev | src/Idris/Completion.hs | bsd-3-clause | 5,911 | 0 | 12 | 1,553 | 1,593 | 859 | 734 | 103 | 7 |
{-# LANGUAGE TypeFamilies #-}
{-|
Module : Numeric.AERN.RmToRn.Plot.CairoDrawable
Description : abstraction for drawing on a Cairo canvas
Copyright : (c) Michal Konecny
License : BSD3
Maintainer : mikkonecny@gmail.com
Stability : experimental
Portability : portable
... | michalkonecny/aern | aern-realfn-plot-gtk/src/Numeric/AERN/RmToRn/Plot/CairoDrawable.hs | bsd-3-clause | 2,493 | 0 | 15 | 626 | 262 | 150 | 112 | 29 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
module EncodeDecode ( tests ) where
import Control.Exception (catch,evaluate)
import Data.Binary (Binary)
import Data.ByteString (ByteString)
import qualified Data.ByteStri... | jonpetterbergman/binary-streams | test/EncodeDecode.hs | bsd-3-clause | 4,084 | 0 | 13 | 1,461 | 887 | 488 | 399 | 73 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}
module Language.Haskell.Liquid.Spec.Extract (
-- * Extract Specifications from Annotations
extractGhcSpec
) where
import GHC hiding (Located)
import Annotations
import Class
import CoreSyn
import DataCon
import Id
import IdInfo
import Name
i... | spinda/liquidhaskell | src/Language/Haskell/Liquid/Spec/Extract.hs | bsd-3-clause | 8,083 | 0 | 18 | 2,053 | 2,539 | 1,312 | 1,227 | 171 | 6 |
{-# LANGUAGE CPP #-}
module Main where
import Test.Tasty (defaultMain, testGroup)
import qualified ParensParsec
main =
defaultMain $ testGroup "All tests" $
[
ParensParsec.allTests
]
| lambdageek/indentation | indentation-parsec/tests/all-tests.hs | bsd-3-clause | 196 | 0 | 7 | 38 | 43 | 26 | 17 | 8 | 1 |
module Air.Extra where
import Control.Parallel
import Data.Char
import Data.List ((\\))
import Data.Maybe
import Data.Time
import Data.Time.Clock.POSIX
import Air.Light hiding (reduce, reduce')
import Numeric
import Prelude hiding ((.), (^), (>), (<), (/), elem, foldl, (-))
import System.Directory
import System.IO
-- ... | nfjinjing/air-extra | src/Air/Extra.hs | bsd-3-clause | 4,797 | 11 | 11 | 955 | 1,731 | 952 | 779 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Report where
import FattyAcid
import Spectra
import Results
import Numeric (showFFloat)
import Data.List (sortBy, maximumBy, intersperse)
import Data.Ord (comparing, Down(..))
import Data.Monoid ((<>))
import Data.ByteString (ByteString)
import Data.ByteString.Char8 (pack)
nM... | Michaelt293/lipase | src/Report.hs | bsd-3-clause | 7,869 | 0 | 21 | 1,890 | 1,796 | 929 | 867 | 175 | 10 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UnicodeSyntax #-}
{-|
[@ISO639-1@] af
[@ISO639-2@] afr
[@ISO639-3@] afr
[@Native name@] Afrikaans
[@English name@] Afrik... | telser/numerals | src/Text/Numeral/Language/AFR.hs | bsd-3-clause | 7,193 | 74 | 12 | 3,272 | 1,572 | 994 | 578 | 147 | 18 |
module ProjectEuler.Problem034 (solution034) where
import Control.Monad
import Data.Digits
import Data.Function.Memoize
import Util
mFact :: Integer -> Integer
mFact = memoize fact
equalToSumOfDigitsFactorials :: Integer -> Bool
equalToSumOfDigitsFactorials = ap (==) (sum . map mFact . digits 10)
genericSolution ::... | guillaume-nargeot/project-euler-haskell | src/ProjectEuler/Problem034.hs | bsd-3-clause | 474 | 0 | 9 | 63 | 126 | 69 | 57 | 13 | 1 |
module Main where
import System.Cmd
import System.Directory
import Paths_const_math_ghc_plugin
main = do
testdir <- getDataFileName "tests"
setCurrentDirectory testdir
system "make && make clean"
| kfish/const-math-ghc-plugin | tests/Make.hs | bsd-3-clause | 211 | 0 | 8 | 38 | 44 | 22 | 22 | 8 | 1 |
{-# LANGUAGE RebindableSyntax #-}
-- Copyright : (C) 2009 Corey O'Connor
-- License : BSD-style (see the file LICENSE)
import Bind.Marshal.Prelude
import Bind.Marshal.Verify
import Bind.Marshal.StdLib
main = run_test $ do
returnM () :: Test ()
| coreyoconnor/bind-marshal | test/verify_stdlib.hs | bsd-3-clause | 260 | 1 | 9 | 51 | 50 | 27 | 23 | 6 | 1 |
module NameGenerator where
import Network
import System.IO
import Data.List
getName :: IO String
getName = do
h <- connectTo "www.urbandictionary.com" (PortNumber 80)
hSetBuffering h LineBuffering
hPutStr h "GET /random.php HTTP/1.1\r\nHost: www.urbandictionary.com\r\n\r\n"
contents <- searchLines h
let t... | thomasathorne/h-chu | src/NameGenerator.hs | bsd-3-clause | 1,001 | 2 | 12 | 206 | 442 | 240 | 202 | 29 | 2 |
{-# LANGUAGE OverloadedStrings, OverloadedLists #-}
-- | Tests the @toLess@ function in "Penny.Stream".
--
-- Expected output:
--
-- @less@ appears with numbers from 0 to 1000 appearing, one number on
-- each line.
module Main where
import Penny.Stream (toLess, streamToStdin)
import Data.Sequence (fromList)
import q... | massysett/penny | penny/testExe/testLess.hs | bsd-3-clause | 612 | 0 | 18 | 111 | 140 | 79 | 61 | 13 | 1 |
{-# LANGUAGE RecordWildCards, ScopedTypeVariables, TupleSections #-}
module Development.Shake.Internal.History.Shared(
Shared, newShared,
addShared, lookupShared,
removeShared, listShared,
sanityShared
) where
import Control.Exception
import Development.Shake.Internal.Value
import Development.Shak... | ndmitchell/shake | src/Development/Shake/Internal/History/Shared.hs | bsd-3-clause | 8,124 | 4 | 34 | 2,171 | 2,552 | 1,291 | 1,261 | 170 | 4 |
module BookExactly
( T(..)
, V(..)
, eval
, simplify
, eval2
) where
data T = TRUE |
FALSE |
If T T T
data V = TRUEv |
FALSEv deriving Show
eval :: T->V
eval TRUE = TRUEv
eval FALSE = FALSEv
eval (If TRUE y z) = eval y
eval (If FALSE y z) = eval z
eval (If x y z) = ... | armoredsoftware/protocol | demos/PaulPractice/BookExactly.hs | bsd-3-clause | 733 | 0 | 9 | 221 | 348 | 181 | 167 | 28 | 1 |
{-# LANGUAGE FlexibleContexts, CPP #-}
module AWS.RDS.DBSubnetGroup
( describeDBSubnetGroups
, createDBSubnetGroup
, deleteDBSubnetGroup
) where
import Control.Applicative ((<$>))
#if MIN_VERSION_conduit(1,1,0)
import Control.Monad.Trans.Resource (MonadResource, MonadBaseControl)
#else
import Data.Con... | IanConnolly/aws-sdk-fork | AWS/RDS/DBSubnetGroup.hs | bsd-3-clause | 1,734 | 0 | 10 | 370 | 385 | 220 | 165 | 46 | 1 |
module Manifesto.FileList
( FileList(..)
, mkFileList
, mkPathProducer
) where
import Control.Monad
import Control.Monad.Catch (MonadThrow)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Data.Time
import qualified Data.Vector as V
import Path
import Pipes hiding (for, each)
... | asayers/mkmanifests | src/Manifesto/FileList.hs | bsd-2-clause | 3,908 | 0 | 15 | 1,104 | 754 | 389 | 365 | 58 | 2 |
module Haddock.Backends.Hyperlinker.ParserSpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
import qualified GHC
import Control.Monad.IO.Class
import Haddock (getGhcDirs)
import Haddock.Backends.Hyperlinker.Parser
import Haddock.Backends.Hyperlinker.Types
withDynFlags :: (GHC.DynFlags -> IO ()) -> I... | Fuuzetsu/haddock | haddock-api/test/Haddock/Backends/Hyperlinker/ParserSpec.hs | bsd-2-clause | 5,060 | 0 | 15 | 1,687 | 1,070 | 586 | 484 | 110 | 1 |
{-# LANGUAGE TemplateHaskellQuotes #-}
{-# LANGUAGE PatternSynonyms #-}
module T8759a where
foo = [d| pattern Q = False |]
| mpickering/ghc-exactprint | tests/examples/ghc8/T8759a.hs | bsd-3-clause | 125 | 0 | 4 | 21 | 15 | 12 | 3 | -1 | -1 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE CPP #-}
-- | Module implementing TIFF decoding.
--
-- Supported compression schemes:
--
-- * Uncomp... | Chobbes/Juicy.Pixels | src/Codec/Picture/Tiff.hs | bsd-3-clause | 36,073 | 0 | 24 | 11,440 | 10,293 | 5,343 | 4,950 | 678 | 6 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TupleSections #-}
module Control.Concurrent.STM.Notify (
STMEnvelope
, Address
, spawnIO
, spawn
, spawnEnvelope
, recvIO
, recv
, sendIO
, send
, forkOnChange
, onChange
, foldOnChange
, STMMailbox
, notify
, waitForChanges
, watchOn... | plow-technologies/stm-notify | src/Control/Concurrent/STM/Notify.hs | bsd-3-clause | 8,392 | 0 | 16 | 2,336 | 2,197 | 1,121 | 1,076 | 158 | 1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Futhark.Representation.AST.AttributesTests
( tests
)
where
import Test.Framework
import Futhark.Representation.AST.SyntaxTests ()
import qualified Futhark.Representation.AST.Attributes.ValuesTests
import qualifie... | ihc/futhark | unittests/Futhark/Representation/AST/AttributesTests.hs | isc | 662 | 0 | 7 | 62 | 96 | 69 | 27 | 13 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Main where
import Import
import Settings
import Yesod.Logger (defaultDevelopmentLogger)
import Yesod.Default.Config
import Yesod.Test
import Application (makeFoundation)
main :: IO a
main = do
... | JerrySun/league-famous | tests/main.hs | bsd-2-clause | 568 | 0 | 11 | 87 | 125 | 67 | 58 | 17 | 1 |
module HERMIT.Dictionary.Local.Bind
( -- * Rewrites on Binding Groups
externals
, nonrecToRecR
, recToNonrecR
) where
import HERMIT.Core
import HERMIT.External
import HERMIT.GHC
import HERMIT.Kure
import HERMIT.Dictionary.Common
------------------------------------------------------------------... | conal/hermit | src/HERMIT/Dictionary/Local/Bind.hs | bsd-2-clause | 1,857 | 0 | 12 | 379 | 325 | 172 | 153 | 30 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ScopedTypeVariable... | artuuge/IHaskell | ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs | mit | 34,151 | 1 | 26 | 8,882 | 8,920 | 4,683 | 4,237 | -1 | -1 |
{-# LANGUAGE CPP, MagicHash, NondecreasingIndentation, UnboxedTuples,
RecordWildCards, BangPatterns #-}
-- -----------------------------------------------------------------------------
--
-- (c) The University of Glasgow, 2005-2007
--
-- Running statements interactively
--
-- --------------------------------------... | mettekou/ghc | compiler/main/InteractiveEval.hs | bsd-3-clause | 38,445 | 13 | 30 | 10,063 | 8,709 | 4,442 | 4,267 | 3 | 0 |
module Case2 where
data T = C2 Int
caseIt x
= case x of
42 -> error
"f (C1 1 2) no longer defined for T at line: 3"
| kmate/HaRe | old/testing/removeCon/Case2AST.hs | bsd-3-clause | 163 | 0 | 8 | 76 | 34 | 18 | 16 | 6 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.BuildPaths
-- Copyright : Isaac Jones 2003-2004,
-- Duncan Coutts 2008
-- License : BSD3
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- A bunch o... | rimmington/cabal | Cabal/Distribution/Simple/BuildPaths.hs | bsd-3-clause | 3,907 | 0 | 10 | 706 | 615 | 356 | 259 | 65 | 3 |
module D (b) where
import B
import C
| ezyang/ghc | testsuite/tests/driver/recomp017/D.hs | bsd-3-clause | 37 | 0 | 4 | 8 | 15 | 10 | 5 | 3 | 0 |
module IntroductionToHaskellSpec where
import SpecHelper
-- import Test.Hspec
-- import Test.QuickCheck
-- import Control.Exception (evaluate)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "simple test" $ do
it "trus is true" $ do
True `shouldBe` True
-- double :: Int -> Int
-- ... | akimichi/haskell-labo | test/IntroductionToHaskellSpec.hs | mit | 1,045 | 0 | 13 | 275 | 85 | 54 | 31 | 9 | 1 |
module Main (main) where
import DecisionTrees
import RunID3Weka
import System.Environment
import System.Exit
import Data.Maybe (listToMaybe, fromMaybe)
main :: IO()
main = getArgs >>= parse
maybeRead = fmap fst . listToMaybe . reads
maybeReadInUnit :: String -> Maybe Float
maybeReadInUnit s = (maybeRead s :: May... | fehu/min-dat--decision-trees | src/RunID3Weka/Main.hs | mit | 1,599 | 0 | 12 | 398 | 419 | 203 | 216 | 35 | 1 |
{-|
Module : Network.CircleCI.Common.Run
Copyright : (c) Denis Shevchenko, 2016
License : MIT
Maintainer : me@dshevchenko.biz
Stability : alpha
Run 'CircleCIResponse' monad.
-}
module Network.CircleCI.Common.Run (
runCircleCI
) where
import Control.Monad.Reader
-- | All API calls require... | denisshevchenko/circlehs | src/Network/CircleCI/Common/Run.hs | mit | 491 | 0 | 7 | 102 | 50 | 30 | 20 | 5 | 1 |
module Ptt.Time.ClockSpec where
import Test.Hspec
import Test.QuickCheck
import Ptt.Time.Clock
spec :: Spec
spec =
describe "time parsing and formatting" $
it "can be repeated to produce the original value" $ property $
\(Positive seconds) -> secondsFromText (secondsToText seconds) == Just seconds
| jkpl/ptt | test/Ptt/Time/ClockSpec.hs | mit | 314 | 0 | 10 | 56 | 78 | 42 | 36 | 9 | 1 |
{-# LANGUAGE LambdaCase, OverloadedStrings #-}
module Chapter7.Exception where
import qualified Data.Text.Lazy.Builder as LB
import Data.Monoid
import Data.Display
import Chapter7.Identifier
data RuntimeException
= WrongContextDepth Int Int Int
| OutOfContextIndex Int
| UnboundIdentifier Name
deriving (Eq, S... | VoQn/tapl-hs | src/Chapter7/Exception.hs | mit | 954 | 0 | 18 | 204 | 246 | 131 | 115 | 25 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module AuthTest where
import TestImport
authSpecs :: Spec
authSpecs =
ydescribe "VK authentication" $ do
yit "Should accept random token and IP. Validation should failed." $ do
--postBody (AuthR LoginR) "{\"ip\" : \"12.3.13.167\", \"token\": \"as234... | TimeAttack/time-attack-server | tests/AuthTest.hs | mit | 379 | 0 | 11 | 105 | 45 | 23 | 22 | 9 | 1 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.HTMLInputElement
(stepUp, stepDown, checkValidity, checkValidity_, reportValidity,
reportValidity_, setCu... | ghcjs/jsaddle-dom | src/JSDOM/Generated/HTMLInputElement.hs | mit | 33,342 | 0 | 12 | 4,649 | 6,841 | 3,603 | 3,238 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
module Pos.Util.UnitsOfMeasure
( UnitOfMeasure (..)
, MeasuredIn(..)
) where
import Control.Lens (at, (?~))
import Data.Aeson (FromJSON (..), ToJSON (..), Value (..), object,
withObject, (.:), (.=))
im... | input-output-hk/pos-haskell-prototype | lib/src/Pos/Util/UnitsOfMeasure.hs | mit | 4,399 | 0 | 19 | 1,341 | 1,139 | 624 | 515 | -1 | -1 |
module Urbit.Vere.Serf.Types where
import Urbit.Prelude
import Urbit.Arvo (Desk, Ev, FX)
import Urbit.Noun.Time (Wen)
-- Types -----------------------------------------------------------------------
type EventId = Word64
type PlayBail = (EventId, Mug, Goof)
type Slog = (Atom, Tank)
data SerfState = SerfSta... | urbit/urbit | pkg/hs/urbit-king/lib/Urbit/Vere/Serf/Types.hs | mit | 3,052 | 0 | 11 | 662 | 688 | 403 | 285 | -1 | -1 |
module GitHub.PullRequests.ReviewComments where
import GitHub.Internal
--| GET /repos/:owner/:repo/pulls/:number/comments
listPullRequestComments ::
OwnerName ->
RepoName ->
Int ->
GitHub ReviewComments
listRepoPullRequestComments ::
OwnerName ->
RepoName ->
ReviewCommentSortBy ->
SortOrder ->
UTCTime ->
Gi... | SaneApp/github-api | src/GitHub/PullRequests/ReviewComments.hs | mit | 709 | 56 | 12 | 110 | 239 | 121 | 118 | -1 | -1 |
{-# LANGUAGE NumericUnderscores #-}
{-# LANGUAGE QuasiQuotes #-}
module B9.B9ConfigSpec
( spec,
)
where
import Data.Maybe (fromMaybe)
import Control.Lens ((^.))
import B9.B9Config
import B9.B9Monad
import Control.Exception
import Control.Monad
import System.Directory
import System.Environment
import System.FilePa... | sheyll/b9-vm-image-builder | src/tests/B9/B9ConfigSpec.hs | mit | 4,757 | 0 | 17 | 1,263 | 939 | 475 | 464 | -1 | -1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.HTMLTableCaptionElement
(js_setAlign, setAlign, js_getAlign, getAlign,
HTMLTableCaptionElement, castToHTMLTableCaptionElement,
gTypeHTMLTableCaptionElement)
where
import Prelude ((.),... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLTableCaptionElement.hs | mit | 1,899 | 14 | 10 | 256 | 463 | 284 | 179 | 31 | 1 |
{-| This module provides @pipes@ utilities for \"byte streams\", which are
streams of strict 'BS.ByteString's chunks. Use byte streams to interact
with both 'Handle's and lazy 'ByteString's.
To stream from 'Handle's, use 'fromHandleS' or 'toHandleD' to convert them
into the equivalent proxies. For ex... | fhaust/pipes-eep | src/Pipes/ByteString.hs | mit | 24,010 | 0 | 15 | 7,362 | 1,201 | 915 | 286 | 46 | 1 |
{-# LANGUAGE TupleSections, OverloadedStrings #-}
module Handler.Home where
import qualified Data.Map as M
import qualified Data.Text as T
import Import
import Barch.Adaptors
import Barch.Widgets (shortReferenceView)
pageLimit::Int
pageLimit = 30
getHomeR::Handler Html
getHomeR = do
citations <- runDB $ selectLi... | klarh/barch | Handler/Home.hs | mit | 728 | 0 | 13 | 167 | 194 | 106 | 88 | 22 | 1 |
module LabeledAst where
import qualified Ast as Ast
import qualified Data.Map as Map
import qualified Data.Set as Set
import Data.Set (Set, union, delete, singleton, (\\))
import Control.Monad.State
import Control.Applicative ((<*>))
type Label = Integer
data LAst = Var String Label
| Function String LAst ... | fiigii/AbstractInterpretation | LabeledAst.hs | mit | 6,730 | 0 | 17 | 2,698 | 2,514 | 1,229 | 1,285 | 154 | 1 |
module TestPrograms where
import Expr
-- Natural numbers
natBody :: Type
natBody = TVari [
("Z", []),
("S", [TRecTypeVar "nat"])
]
natRec :: Type
natRec = TRecInd "nat" natBody
nat :: Defi
nat = DData "nat" natRec
zero = (EVar "Z")
one = EApp (EVar "S") [zero]
-- Nat Stream
nat... | tdidriksen/copatterns | src/findus/test/TestPrograms.hs | mit | 9,623 | 0 | 20 | 2,215 | 3,541 | 1,980 | 1,561 | 124 | 1 |
module PiEstimator where
import Control.Parallel (par, pseq)
radius = 10^9
batchSize = radius `div` 2
sqRadius = radius^2
estimateSectionArea :: Integer -> Integer -> Integer
estimateSectionArea yi yf = batchOne `par` (batchTwo + batchOne)
where batchOne = estimateSectionArea' yi batchSize (findX radius (yi^2)) 0
... | danielqo/PiAlgorithms | haskell/PiEstimator.hs | mit | 1,055 | 0 | 12 | 251 | 391 | 207 | 184 | 24 | 1 |
{-# htermination plusFM :: Ord a => FiniteMap [a] b -> FiniteMap [a] b -> FiniteMap [a] b #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_plusFM_4.hs | mit | 111 | 0 | 3 | 21 | 5 | 3 | 2 | 1 | 0 |
module GHCJS.DOM.SVGAngle (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/SVGAngle.hs | mit | 38 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module ZMachine.ZTypes where
import Control.Applicative
import qualified Data.Map as M
import Data.Word
type Number = Word16
data BitNumber = BitNumber Int
bit0 = BitNumber 0
bit1 = BitNumber 1
bit2 = BitNumber 2
bit3 = BitNumber 3
bit4 = BitNumber 4
bit5 = BitNumber... | RaphMad/ZMachine | src/lib/ZMachine/ZTypes.hs | mit | 1,804 | 0 | 11 | 322 | 610 | 317 | 293 | 55 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS -fno-warn-unused-top-binds #-} -- for lenses
-- | Parameters for launching everything.
module Pos.Launcher.Param
( LoggingParams (..)
, BaseParams (..)
, NodeParams (..)
) where
import Universum
import Control.Lens (makeLen... | input-output-hk/pos-haskell-prototype | lib/src/Pos/Launcher/Param.hs | mit | 3,881 | 0 | 11 | 957 | 646 | 385 | 261 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
module Main where
import Pipes.MongoDB as MP
import Pipes
import Data.Text
import Database.MongoDB
import Control.Monad.Trans.Control (MonadBaseControl)
import Control.Monad ((>=>))
import qualified Pipes.Prelude as P
runAction :: Action IO a -> I... | jb55/pipes-mongodb | test/Test.hs | mit | 1,346 | 0 | 11 | 256 | 531 | 276 | 255 | 34 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-
Copyright (C) 2015-2016 Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
This file is part of FuncTorrent.
FuncTorrent is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either v... | vu3rdd/functorrent | src/main/Main.hs | gpl-3.0 | 4,810 | 0 | 22 | 1,297 | 959 | 495 | 464 | 80 | 3 |
module Updater.DownloadWithMD5 where
import Import
import Updater.Manifest(MD5Sum, renderMD5)
import Network.HTTP.Conduit
import Crypto.Classes
-- | Download file from URL and compare it's md5sum with supplied.
-- returns Just file if sums match.
downloadWithMD5 :: String -> MD5Sum -> IO (Maybe LByteString)
downloadWi... | exbb2/BlastItWithPiss | src/Updater/DownloadWithMD5.hs | gpl-3.0 | 507 | 0 | 11 | 99 | 131 | 68 | 63 | 12 | 2 |
-- | XHtml form handling
module Dragonfly.Forms where
import Control.Applicative.Error
import Control.Applicative.State
import Control.Arrow (second)
import Data.List as List
import Happstack.Server
import Text.Formlets
import qualified Text.XHtml.Strict as X
import Text.XHtml.Strict ((+++), (<<))
import qualified ... | colin-adams/dragonfly-website | Dragonfly/Forms.hs | gpl-3.0 | 2,788 | 0 | 16 | 562 | 858 | 441 | 417 | 45 | 2 |
import System.IO
import System.Environment
import System.Exit
import Sync
main :: IO [[String]]
main = getArgs >>= parse
parse::[[Char]]-> IO [[String]]
parse [] = usage >> exit
parse ["-h"] = usage >> exit
parse ["-v"] = version >> exit
parse ["brayfordlets"] = brayfordlets
parse ["bookclub... | b1g3ar5/Sync | app/Main.hs | gpl-3.0 | 595 | 5 | 8 | 146 | 239 | 115 | 124 | 21 | 1 |
module SIR
(
AgentId
, AgentMessage
, AgentIn
, AgentOut
, SIRState (..)
, SIRMsg (..)
, SIRAgentIn
, SIRAgentOut
, agentId
, agentObservable
, agentIn
, agentOut
, agentOutObs
, initAgents
, sendMessage
, sendMessageM
, onMessageM
, onMessage
, distributeMessages
... | thalerjonathan/phd | coding/papers/FrABS/Haskell/prototyping/Utils/SIR.hs | gpl-3.0 | 7,710 | 1 | 18 | 1,879 | 2,238 | 1,154 | 1,084 | 172 | 2 |
{-# LANGUAGE Rank2Types #-}
module Heqet.List where
import Heqet.Types
import Control.Lens
-- like groupBy but doesn't preserve list order,
-- instead grouping as much as possible.
-- makeBucketsBy (==) [1,2,3,1,3,4] ->
makeBucketsBy :: (a -> a -> Bool) -> [a] -> [[a]]
makeBucketsBy comp xs = foldr f [] xs where
... | Super-Fluid/heqet | Heqet/List.hs | gpl-3.0 | 1,081 | 0 | 12 | 244 | 421 | 234 | 187 | 21 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-adsense/gen/Network/Google/Resource/AdSense/Accounts/Alerts/List.hs | mpl-2.0 | 3,414 | 0 | 14 | 775 | 392 | 236 | 156 | 62 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-games-management/gen/Network/Google/Resource/GamesManagement/Scores/ResetMultipleForAllPlayers.hs | mpl-2.0 | 5,709 | 0 | 18 | 1,251 | 719 | 420 | 299 | 111 | 1 |
{-|
Module : $Header$
Description : Operations on the AST of a mathematical equation.
Copyright : (c) Joshua Gutow, 2016
License : GNU AGPL-3
Maintainer : jbgutow@gmail.com
Stability : experimental
Portability : portable
This module provides a data structure to represent that AST of an equation and
it p... | trianglesphere/hcas | src/Expression.hs | agpl-3.0 | 3,846 | 0 | 14 | 1,055 | 1,326 | 685 | 641 | 69 | 1 |
module ProjectM36.AtomFunctions.Primitive where
import ProjectM36.Base
import ProjectM36.Relation (relFold, oneTuple)
import ProjectM36.Tuple
import ProjectM36.AtomFunctionError
import ProjectM36.AtomFunction
import qualified Data.HashSet as HS
import qualified Data.Vector as V
import Control.Monad
import qualified Dat... | agentm/project-m36 | src/lib/ProjectM36/AtomFunctions/Primitive.hs | unlicense | 7,067 | 0 | 19 | 1,978 | 1,982 | 1,100 | 882 | 124 | 3 |
module Chemicals where
data Legend = OTC | Rx | CI | CII | CIII | CIV | CV | Dual
data TherapeuticClass = SABA
| LABA
| Glucocorticoid
| Anticholinergic
| Salicylate
| NonaspirinNonNSAID
... | kohabi/rxquiz | src/Chemicals.hs | unlicense | 9,429 | 3 | 9 | 4,563 | 1,406 | 916 | 490 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.