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 Bob (responseFor) where
import Data.Char (isAlpha, isSpace, toUpper)
import Data.List (dropWhileEnd)
responseFor :: String -> String
responseFor = reply . trim
where
reply s | null s || all isSpace s = "Fine. Be that way!"
| any isAlpha s && s == fmap toUpper s = "Whoa, chill out... | genos/online_problems | exercism/haskell/bob/src/Bob.hs | mit | 501 | 0 | 12 | 180 | 148 | 74 | 74 | 10 | 1 |
module Builder where
data Foo = Foo deriving (Show)
data Bar = Bar deriving (Show)
data Quux = Quux deriving (Show)
data Gorp = Gorp deriving (Show)
data Config = Config
{ a :: Foo
, b :: Bar
, c :: Quux
, d :: Maybe Gorp
} deriving (... | j-rock/builder | src/Data/Builder.hs | mit | 2,099 | 0 | 12 | 681 | 553 | 306 | 247 | 38 | 1 |
-- Copyright (c) 2016-present, SoundCloud Ltd.
-- All rights reserved.
--
-- This source code is distributed under the terms of a MIT license,
-- found in the LICENSE file.
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
module Kubern... | soundcloud/haskell-kubernetes | lib/Kubernetes/Model/V1/LimitRangeList.hs | mit | 2,071 | 0 | 14 | 745 | 351 | 210 | 141 | 43 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-|
Module : KeyWordOccurrence
Description : Returns the number of occurrence of a keyword in a text where each word is on a new line
Copyright : (c) Thomas Lecointre, 2017
Thomas Perles, 2017
License : MIT
Maintainer : thomas.lecointre@uha.fr
... | thomaslecointre/Distributed-Haskell | slave/KeyWordOccurrence.hs | mit | 1,343 | 0 | 8 | 388 | 137 | 77 | 60 | 15 | 2 |
module Filter.Macros (processMacros) where
import Reader (toPandoc)
import Control.Applicative ((<|>))
import Control.Monad (guard, when)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.State
import qualified Data.Map.Lazy as M
import Data.Char (toLower, isSpace)
import Data.Maybe (catMaybes, fromMa... | Thhethssmuz/ppp | src/Filter/Macros.hs | mit | 20,181 | 0 | 25 | 8,580 | 6,722 | 3,377 | 3,345 | 358 | 93 |
module Hierarchy where
import Control.Monad
import Data.Maybe
import Data.List
import AST
import Environment
import TypeDatabase
import Util
type HierarchyError = Maybe String
checkHierarchies :: [CompilationUnit] -> TypeNode -> HierarchyError
checkHierarchies units typeDB = msum $ map (\unit -> checkHierarchy unit... | yangsiwei880813/CS644 | src/Hierarchy.hs | gpl-2.0 | 15,583 | 0 | 23 | 3,130 | 4,665 | 2,355 | 2,310 | 210 | 4 |
{-# LANGUAGE CPP, TupleSections #-}
{-
Copyright (C) 2006-2014 John MacFarlane <jgm@berkeley.edu>
Copyright (C) 2014 Tim T.Y. Lin <timtylin@gmail.com>
This program 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; ... | timtylin/scholdoc | scholdoc.hs | gpl-2.0 | 65,098 | 0 | 25 | 29,218 | 12,251 | 6,639 | 5,612 | -1 | -1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Keymap.Vim.NormalMap
-- License : GPL-2
-- Maintainer : yi-devel@googlegroups.com
-- Stability : experimental
-- Portability : portable
module Yi.Keymap.Vim.NormalMap (def... | leksah/yi | src/library/Yi/Keymap/Vim/NormalMap.hs | gpl-2.0 | 21,191 | 0 | 21 | 6,236 | 5,693 | 3,029 | 2,664 | 406 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANG... | ricardopenyamari/ir2haskell | clir-parser-haskell-master/lib/sexp-grammar/src/Data/InvertibleGrammar.hs | gpl-2.0 | 4,260 | 0 | 13 | 1,184 | 1,503 | 800 | 703 | 93 | 1 |
{- |
Module : $EmptyHeader$
Description : <optional short description entry>
Copyright : (c) <Authors or Affiliations>
License : GPLv2 or higher, see LICENSE.txt
Maintainer : <email>
Stability : unstable | experimental | provisional | stable | frozen
Portability : portable | non-portable (<reason>... | nevrenato/Hets_Fork | Search/DB/FormulaDB.hs | gpl-2.0 | 5,532 | 0 | 13 | 3,215 | 860 | 562 | 298 | 75 | 1 |
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
module Tasknight.Dashboard (mainWith, showDashboard) where
import Control.Error (runScript)
import Control.Monad.Trans.Class (lift)
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteSt... | cblp/tasknight-dashboard | dashboard/src/Tasknight/Dashboard.hs | gpl-3.0 | 1,713 | 0 | 19 | 541 | 465 | 264 | 201 | 32 | 1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveDataTypeable #-}
-- | TaxIds2Tree
-- dist/build/TaxIds2Tree/TaxIds2Tree -i /scratch/egg/data/taxdump/ -o /home/mescalin/egg/current/Projects/Haskell/TaxonomyTools/ -t /home/mescalin/egg/current/Projects/Haskell/TaxonomyTools/RF00169_accessionnumbers.tax -f json -l 4
-... | eggzilla/TaxonomyTools | Biobase/TaxIds2Tree.hs | gpl-3.0 | 5,131 | 9 | 16 | 1,086 | 1,071 | 562 | 509 | 82 | 5 |
module Problem17 where
main =
print $ split "abcdefghik" 3
split [] _ = error "Empty list"
split as 0 = ([], as)
split (a:as) n = (a:xs, ys)
where (xs, ys) = split as (n - 1)
| vasily-kartashov/playground | 99-problems/problem-17.hs | apache-2.0 | 183 | 0 | 9 | 46 | 104 | 56 | 48 | 7 | 1 |
module HelperSequences.A000188 (a000188) where
import Helpers.Primes (primePowers)
-- (1) Number of solutions to x^2 = 0 (mod n). (2) Also square root of largest
-- square dividing n. (3) Also Max_{ d divides n } GCD(d, n/d).
a000188 :: Integer -> Integer
a000188 n = product $ map (\t -> fst t ^ (snd t `div` 2)) $ pr... | peterokagey/haskellOEIS | src/HelperSequences/A000188.hs | apache-2.0 | 332 | 0 | 13 | 62 | 81 | 45 | 36 | 4 | 1 |
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
----------------------------------------------------------------------------
-- |
-- Module : Web.Skroutz.Model.Base.Autocomplete
-- Copyright : (c) 2016 Remous-Aris K... | ariskou/skroutz-haskell-api | src/Web/Skroutz/Model/Base/Autocomplete.hs | apache-2.0 | 1,329 | 0 | 9 | 248 | 200 | 119 | 81 | 20 | 0 |
module KthDifferences.A999997 () where
import External.A174344 (a174344)
import Miscellaneous.A268038 (a268038)
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Maybe (Maybe, mapMaybe)
import Data.Ratio (Ratio, (%))
import Sandbox.SegmentIntersection (intersects, pointIsOnLine)
-- type KthDifferences... | peterokagey/haskellOEIS | src/Sandbox/GreedySpiralSequences/SlopesNonIntersecting.hs | apache-2.0 | 2,172 | 1 | 12 | 420 | 643 | 367 | 276 | 34 | 1 |
-- | Transformation process for normalization
module CLaSH.Normalize.Strategy where
import CLaSH.Normalize.Transformations
import CLaSH.Normalize.Types
import CLaSH.Rewrite.Combinators
import CLaSH.Rewrite.Types
import CLaSH.Rewrite.Util
-- | Normalisation transformation
normalization :: NormRewrite
normalization = e... | christiaanb/clash-compiler | clash-lib/src/CLaSH/Normalize/Strategy.hs | bsd-2-clause | 2,539 | 0 | 12 | 672 | 650 | 362 | 288 | 45 | 1 |
import Test.Framework (defaultMain)
import qualified Network.WebSockets.Tests
import qualified Network.WebSockets.Handshake.Tests
import qualified Network.WebSockets.Socket.Tests
main :: IO ()
main = defaultMain
[ Network.WebSockets.Tests.tests
, Network.WebSockets.Handshake.Tests.tests
, Network.WebSocke... | 0xfaded/websockets | tests/haskell/TestSuite.hs | bsd-3-clause | 348 | 0 | 7 | 44 | 75 | 49 | 26 | 9 | 1 |
{-|
This module exports an unsafe-subset of "DCLabel.Core",
implementing Disjunction Category Labels.
A subset of the exported functions and constructors
shoul not be exposed to untrusted code; instead,
untursted code should import the "DCLabel.Safe"
module.
-}
module DCLabel.TCB ( module DCLabel.Core
... | scslab/dclabel | DCLabel/TCB.hs | bsd-3-clause | 424 | 0 | 5 | 93 | 31 | 20 | 11 | 4 | 0 |
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : Beanstalk Tests
-- Copyright : (c) Greg Heartsfield 2010
-- License : BSD3
--
-- Test hbeanstalkh library against a real beanstalkd server.
-- This script assumes the server is... | scsibug/hbeanstalk | Tests.hs | bsd-3-clause | 20,508 | 1 | 20 | 7,227 | 4,341 | 2,109 | 2,232 | 353 | 9 |
module MarkdownParser where
import Data.List
import Data.Int
import Html
import Data.Char (isSpace)
import ParseUtil
import Control.Monad.Trans.Class
parseHeader :: Parse Html
parseHeader = ((length) <$> (parseWhile (\c -> c == '#'))) >>=
\ordinal -> skipSpaces >>
parseInline >>=
... | clample/md-haskell | src/MarkdownParser.hs | bsd-3-clause | 6,180 | 0 | 31 | 3,149 | 1,362 | 711 | 651 | 102 | 5 |
module Main where
import Prelude ()
import Prelude.MH
import System.Exit ( exitFailure )
import Config
import Options
import App
import Events ( ensureKeybindingConsistency )
main :: IO ()
main = do
opts <- grabOptions
configResult <- findConfig (optConfLocation opts)
config <- case configResult of
... | aisamanra/matterhorn | src/Main.hs | bsd-3-clause | 713 | 0 | 14 | 202 | 199 | 96 | 103 | 24 | 3 |
{-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.Extensions
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Por... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Extensions.hs | bsd-3-clause | 1,651 | 0 | 10 | 248 | 276 | 171 | 105 | 21 | 1 |
{-# LANGUAGE Safe #-}
-- | Desugar into SMTLIB Terminology
module Cryptol.TypeCheck.Solver.Numeric.SMT
( desugarProp
, smtName
, smtFinName
, ifPropToSmtLib
, cryImproveModel
, getVal
, getVals
) where
import Cryptol.TypeCheck.AST (TVar(TVFree,TVBound))
import Cryptol.TypeCheck.Solv... | ntc2/cryptol | src/Cryptol/TypeCheck/Solver/Numeric/SMT.hs | bsd-3-clause | 16,870 | 0 | 24 | 6,018 | 4,959 | 2,500 | 2,459 | 299 | 14 |
module Test where
import Control.Monad.Trans
import System.Heap.Heap
import Prelude hiding (read)
main :: IO ()
main =
do e <- run "../test.db" $
do p0 <- write "this is the first block"
p1 <- write "and the second one"
p2 <- write ((), False)
p3 <- write (1234 :: Integer)
... | sebastiaanvisser/diskheap | src/Test.hs | bsd-3-clause | 765 | 0 | 17 | 300 | 301 | 151 | 150 | 27 | 1 |
{-# LANGUAGE StandaloneDeriving #-}
module Transform (mrp) where
import qualified Data.Generics as SYB
-- import qualified GHC.SYB.Utils as SYB
-- import qualified BasicTypes as GHC
import qualified GHC as GHC
import qualified Language.Haskell.GhcMod as GM (Options(..))
import Language.H... | alanz/Hs2010To201x | src/Transform.hs | bsd-3-clause | 6,737 | 0 | 20 | 1,455 | 1,830 | 937 | 893 | 107 | 3 |
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
-- |
-- Module: Trace.Hpc.Coveralls.Paths
-- Copyright: (c) 2014-2015 Guillaume Nargeot
-- License: BSD3
-- Maintainer: Guillaume Nargeot <guillaume+hackage@nargeot.com>
-- Stability: experimental
--
-- Paths constants and functions for hpc coverage report out... | jdnavarro/hpc-coveralls | src/Trace/Hpc/Coveralls/Paths.hs | bsd-3-clause | 2,336 | 0 | 11 | 516 | 553 | 292 | 261 | 49 | 2 |
{-# LANGUAGE ConstraintKinds, DataKinds, FlexibleInstances, GADTs #-}
{-# LANGUAGE OverloadedStrings, PolyKinds, ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving, TypeFamilies, TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
module Text.Printf.Safe (module Text.Pri... | konn/safe-printf | src/Text/Printf/Safe.hs | bsd-3-clause | 568 | 0 | 5 | 132 | 75 | 56 | 19 | 10 | 0 |
module DummyModule where
import Data.Dynamic
func :: Int -> Int
func = (+3)
resource_dyn :: Dynamic
resource_dyn = toDyn func
| michaxm/dynamic-linking-exploration | app/DummyModule.hs | bsd-3-clause | 129 | 0 | 5 | 23 | 40 | 24 | 16 | 6 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Trombone.Server
( DbConf(..)
, ServerConf(..)
, runConf
, initConf
) where
import Control.Exception.Lifted
import Control.Monad ( when )
import Control.Monad.IO.Cl... | johanneshilden/trombone | Trombone/Server.hs | bsd-3-clause | 7,436 | 0 | 17 | 2,127 | 1,642 | 894 | 748 | 140 | 5 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
-- | Templates.
module HL.View.Template where
import HL.Types
import HL.View
import Data.Monoid
import Yesod.Static (Static)
-- | Render a template.
template
:: [Route App]
-> Text
-> ((Route App -> Text) -> Html ())
-> FromLucid App
tem... | gbaz/hl | src/HL/View/Template.hs | bsd-3-clause | 7,165 | 0 | 28 | 2,675 | 1,760 | 855 | 905 | 137 | 1 |
module Blog.Widgets.StreamOfConsciousness.Thought where
import Text.XHtml.Strict
import Data.List
import Blog.FrontEnd.ContentAtoms
import qualified Blog.Constants as C
data Channel = Delicious | TwitterTweet | TwitterReply | GoogleReader | Identica
deriving ( Show, Read, Eq, Ord, Enum )
icon :: Channe... | prb/perpubplat | src/Blog/Widgets/StreamOfConsciousness/Thought.hs | bsd-3-clause | 3,161 | 0 | 15 | 1,383 | 1,061 | 559 | 502 | 60 | 2 |
module Test.Data2.Flat
( module Test.Data2
)
where
import Flat
import Test.Data2
instance Flat a => Flat (List a)
| tittoassini/typed | test/Test/Data2/Flat.hs | bsd-3-clause | 139 | 0 | 7 | 43 | 43 | 24 | 19 | 5 | 0 |
{- |
Module : Control.Graphted
Description : Graph indexed types
Copyright : (c) Aaron Friel
License : BSD-3
Maintainer : Aaron Friel <mayreply@aaronfriel.com>
Stability : unstable | experimental | provisional | stable | frozen
Portability : portable | non-portable (<reason>)
-}
module Control.G... | AaronFriel/graphted | src/Control/Graphted.hs | bsd-3-clause | 934 | 0 | 5 | 159 | 126 | 87 | 39 | 19 | 0 |
{-# LANGUAGE TemplateHaskell #-}
-- | This module defines helpers to preprocess bitcode into an
-- acceptable form. This mostly means deciding which optimizations to
-- run to make analysis easier.
module Foreign.Inference.Preprocessing (
requiredOptimizations
) where
-- | These are the options that the analysis ... | travitch/foreign-inference | src/Foreign/Inference/Preprocessing.hs | bsd-3-clause | 1,133 | 0 | 5 | 265 | 56 | 43 | 13 | 8 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.Pass.Util
-- Copyright : (C) 2012-2013 Edward Kmett
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Stability : experimental
-- Portability : non-po... | ekmett/multipass | Data/Pass/Util.hs | bsd-3-clause | 586 | 0 | 8 | 116 | 83 | 48 | 35 | 8 | 1 |
{-|
Module : Idris.Package
Description : Functionality for working with Idris packages.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE CPP #-}
module Idris.Package where
import System.Directory
import System.Directory (copyFile, createDirectoryIfMissing)
import System.Exit
imp... | uuhan/Idris-dev | src/Idris/Package.hs | bsd-3-clause | 17,883 | 0 | 26 | 5,290 | 4,925 | 2,396 | 2,529 | 379 | 22 |
{-# LANGUAGE CPP, RecordWildCards, NamedFieldPuns, DeriveDataTypeable #-}
-- | Handling project configuration.
--
module Distribution.Client.ProjectConfig (
-- * Types for project config
ProjectConfig(..),
ProjectConfigBuildOnly(..),
ProjectConfigShared(..),
ProjectConfigProvenance(..),
Packag... | themoritz/cabal | cabal-install/Distribution/Client/ProjectConfig.hs | bsd-3-clause | 38,928 | 0 | 27 | 9,665 | 6,127 | 3,215 | 2,912 | 617 | 14 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS -fno-warn-unused-top-binds #-} -- for lenses
{- |
The initialization mode is used to build the node context (node resources).
We need a separate mode for this because our initialization procedures require
database access, slotting, logging, etc... | input-output-hk/pos-haskell-prototype | lib/src/Pos/Launcher/Mode.hs | mit | 3,595 | 0 | 10 | 776 | 522 | 316 | 206 | -1 | -1 |
{- |
Module : ./CSL/BoolBasic.hs
Description : Some basic types for simple boolean representations
Copyright : (c) Ewaryst Schulz, DFKI Bremen 2010
License : GPLv2 or higher, see LICENSE.txt
Maintainer : ewaryst.schulz@dfki.de
Stability : experimental
Portability : portable
This module defines so... | spechub/Hets | CSL/BoolBasic.hs | gpl-2.0 | 1,835 | 0 | 12 | 506 | 420 | 210 | 210 | 26 | 6 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="sr-SP">
<title>Ruby Scripting</title>
<maps>
<homeID>top</homeID>
<mapref location="ma... | veggiespam/zap-extensions | addOns/jruby/src/main/javahelp/org/zaproxy/zap/extension/jruby/resources/help_sr_SP/helpset_sr_SP.hs | apache-2.0 | 960 | 79 | 66 | 157 | 409 | 207 | 202 | -1 | -1 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="sl-SI">
<title>Replacer | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref lo... | veggiespam/zap-extensions | addOns/replacer/src/main/javahelp/org/zaproxy/zap/extension/replacer/resources/help_sl_SI/helpset_sl_SI.hs | apache-2.0 | 970 | 80 | 66 | 159 | 413 | 209 | 204 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
module Graphics.GL.Pal.Reshader where
import System.FSNotify
import Control.Concurrent
import Control.Concurrent.STM
import Control.Monad
import System.FilePath
fileNameModified :: [FilePath] -> Event -> Bool
fileNameModified fileNames event = case event o... | lukexi/gl-pal | src/Graphics/GL/Pal/Reshader.hs | bsd-3-clause | 913 | 0 | 16 | 204 | 234 | 120 | 114 | 22 | 2 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
Typecheck arrow notation
-}
{-# LANGUAGE RankNTypes, TupleSections #-}
{-# LANGUAGE TypeFamilies #-}
module TcArrows ( tcProc ) where
import GhcPrelude
import {-# SOURCE #-} TcExpr( tcMonoExpr, tcInferRho, tcSyntaxOp,... | ezyang/ghc | compiler/typecheck/TcArrows.hs | bsd-3-clause | 16,570 | 0 | 20 | 5,395 | 3,554 | 1,885 | 1,669 | 219 | 2 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[TcMonoType]{Typechecking user-specified @MonoTypes@}
-}
{-# LANGUAGE CPP #-}
module TcHsType (
tcHsSigType, tcHsSigTypeNC, tcHsDeriv, tcHsVectInst,
tcHsInstHead,
UserTypeCtxt(..),
... | forked-upstream-packages-for-ghcjs/ghc | compiler/typecheck/TcHsType.hs | bsd-3-clause | 68,570 | 106 | 26 | 20,340 | 12,013 | 6,158 | 5,855 | 794 | 8 |
module SDL.Raw.Audio (
-- * Audio Device Management, Playing and Recording
audioInit,
audioQuit,
buildAudioCVT,
closeAudio,
closeAudioDevice,
convertAudio,
freeWAV,
getAudioDeviceName,
getAudioDeviceStatus,
getAudioDriver,
getAudioStatus,
getCurrentAudioDriver,
getNumAudioDevices,
getNumAu... | bj4rtmar/sdl2 | src/SDL/Raw/Audio.hs | bsd-3-clause | 6,843 | 0 | 13 | 1,091 | 1,932 | 973 | 959 | 140 | 1 |
-- (c) The University of Glasgow 2006
{-# LANGUAGE CPP, DeriveDataTypeable #-}
module TcEvidence (
-- HsWrapper
HsWrapper(..),
(<.>), mkWpTyApps, mkWpEvApps, mkWpEvVarApps, mkWpTyLams, mkWpLams, mkWpLet, mkWpCast,
mkWpFun, idHsWrapper, isIdHsWrapper, pprHsWrapper,
-- Evidence bindings
TcEvBinds(..), EvB... | wxwxwwxxx/ghc | compiler/typecheck/TcEvidence.hs | bsd-3-clause | 43,666 | 0 | 17 | 11,676 | 9,096 | 4,693 | 4,403 | 583 | 17 |
module IdIn4 where
{-To rename an identifier name, stop the cursor at any occurrence of the name,
then input the new name in the mini-buffer, after that, select the 'rename'
command from the 'Refactor' menu.-}
--Any value variable name declared in this module can be renamed.
--Rename 'foo' to 'Foo' will fail.
x... | kmate/HaRe | test/testdata/Renaming/IdIn4_TokOut.hs | bsd-3-clause | 396 | 0 | 6 | 87 | 66 | 39 | 27 | 7 | 1 |
-- Checks that the types of the old binder and the binder implicitly introduced by grouping are linked
{-# OPTIONS_GHC -XTransformListComp #-}
module ShouldCompile where
import Data.List(inits)
foo :: [[[Int]]]
foo = [ x
| x <- [1..10]
, then group using inits
, then group using inits
... | hferreiro/replay | testsuite/tests/typecheck/should_compile/tc240.hs | bsd-3-clause | 328 | 0 | 8 | 89 | 63 | 38 | 25 | 8 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Devel
( devel
, develSignal
, DevelOpts(..)
) where
import Control.Applicative ((<|>))
import UnliftIO ... | psibi/yesod | yesod-bin/Devel.hs | mit | 21,553 | 0 | 31 | 8,155 | 3,413 | 1,792 | 1,621 | 305 | 5 |
module E01.A2 where
-- Explicit and ugly:
f :: [Int] -> [Int]
f [] = []
f (x:xs) = if x > 0 then f xs ++ [x]
else f xs
-- Let's compose it out of two functions:
-- * reverse: reverses a list and is already included in standard Haskell
-- * nonzero: filters all elements of a list greater than 0
f1 :... | sebschrader/programmierung-ss2015 | E01/A2.hs | mit | 1,119 | 0 | 8 | 292 | 310 | 172 | 138 | 19 | 2 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{- |
Just pretend this module is part of Physics.Constraint.
Last time I checked, GeneralizedNewtypeDeriving didn't work on Lagrangian in Physics.Constraint.
-}
module Physi... | ublubu/shapes | shapes/src/Physics/Constraint/Types.hs | mit | 846 | 0 | 6 | 119 | 98 | 63 | 35 | 15 | 0 |
module SEP.Data where
import Data.DateTime
import Text.Printf
import Control.Concurrent
data Direction = Buy | Sell deriving (Show, Eq, Ord)
type Price = Int -- Price is represented as integer (allowed range [-2^29, 2^29 - 1]) the exchange deals with the
-- smallest unit, e.g. you may want to allow... | mcapodici/haskelllearn | stockexchangeprototype/src/SEP/Data.hs | mit | 1,439 | 0 | 9 | 284 | 363 | 201 | 162 | 32 | 1 |
{-# LANGUAGE PackageImports #-}
import "Monaba" Application (develMain)
import Prelude (IO)
main :: IO ()
main = develMain
| ahushh/Monaba | monaba/app/devel.hs | mit | 124 | 0 | 6 | 19 | 34 | 20 | 14 | 5 | 1 |
import Data.List
import Site (realMain)
import System.Environment
-- Parses and modifies incoming args so as to selectively build site
main = do
args <- getArgs
let (hakyllArgs, only) = break (== "only") args
withArgs hakyllArgs $ realMain . makeRegex $ only
makeRegex :: [String] -> String
makeRegex [] ... | mreid/papersite | src/exec/Main.hs | mit | 448 | 0 | 11 | 88 | 150 | 78 | 72 | 11 | 1 |
slice :: [a] -> Int -> Int -> [a]
slice (x:xs) 1 n = case n `compare` 1 of
GT -> [x] ++ slice xs 1 (n-1)
EQ -> [x]
slice (_:xs) n m = slice xs (n-1) (m-1)
| cjhveal/H-99 | 18.hs | mit | 159 | 0 | 11 | 43 | 129 | 69 | 60 | 5 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Views.Layout
( layout
) where
import Text.Blaze.Html5
import Text.Blaze.Html5.Attributes
import qualified Text.Blaze.Html5 as H
import qualified Text.Blaze.Html5.Attributes as A
layout :: Html -> Html -> Html
layout ttl bdy = docTypeHtml $ do
H.hea... | rjregenold/icanhazrandomnumber | src/Views/Layout.hs | mit | 640 | 0 | 14 | 137 | 179 | 90 | 89 | 17 | 1 |
-- |
-- Module : Configuration.Dotenv.Types
-- Copyright : © 2015–2020 Stack Builders Inc.
-- License : MIT
--
-- Maintainer : Stack Builders <hackage@stackbuilders.com>
-- Stability : experimental
-- Portability : portable
--
-- This module contains common functions to load and read dotenv files.
... | stackbuilders/dotenv-hs | src/Configuration/Dotenv.hs | mit | 4,106 | 0 | 16 | 1,158 | 772 | 426 | 346 | 69 | 3 |
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
-- A last-leg intermediate form, before emitting actually Haskell source code.
--
-- This module contains a *simplified* Haskell AST; it only includes the
-- features we actually need. We roll our own fo... | zenhack/haskell-capnp | cmd/capnpc-haskell/IR/Haskell.hs | mit | 5,660 | 0 | 11 | 1,619 | 1,296 | 797 | 499 | 150 | 1 |
{-
TODO
----
- what about line endings? /r/n?
- Really got to switch to PCRE...
-}
module JSHOP where -- JavaScript Haskell OPtimiser
import Char
import Text.Regex
import Text.Regex.PCRE
import Text.Regex.Base.RegexLike
import System
import ModRegex
type Code = [Char... | nbrunt/JSHOP | src/old/ver1/prototype.hs | mit | 9,143 | 0 | 18 | 4,289 | 1,357 | 700 | 657 | 113 | 2 |
{-# LANGUAGE CPP #-}
module Main (main) where
import Control.Monad (unless)
import Data.List ((\\))
import System.Directory
import System.Exit
import System.FilePath (dropExtension)
import System.IO
import System.IO.Temp (withTempFile)
import ... | haskell-compat/base-compat | check/test/TypeCheck.hs | mit | 1,645 | 0 | 16 | 514 | 422 | 223 | 199 | 44 | 2 |
import qualified Spec.Client as Client
import qualified Spec.Client.Discovery as Discovery
import qualified Spec.Client.Internal as Internal
import Test.Hspec (hspec)
main :: IO ()
main = hspec $ do
Client.tests
Discovery.tests
Internal.tests
| krdlab/haskell-oidc-client | test/Spec.hs | mit | 288 | 0 | 8 | 75 | 71 | 42 | 29 | 9 | 1 |
f = sum . filter odd
-- This part handles the Input/Output and can be used as it is. Do not change or modify it.
main = do
inputdata <- getContents
putStrLn $ show $ f $ map (read :: String -> Int) $ lines inputdata
| tsurai/hackerrank | functional-programming/introduction/sum-of-odd-elements.hs | mit | 223 | 0 | 11 | 53 | 61 | 30 | 31 | 4 | 1 |
-- | This is a pretty-printer for turning the internal representation
-- of generic structured XML documents into the Doc type (which can
-- later be rendered using Text.ParserCombinators.HughesPJ.render).
-- Essentially there is one pp function for each type in
-- Text.Xml.HaXml.Types, so you can pretty-print ... | jgoerzen/dtmconv | HaXml-1.12/src/Text/XML/HaXml/Pretty.hs | gpl-2.0 | 11,199 | 0 | 16 | 4,131 | 3,455 | 1,675 | 1,780 | 193 | 2 |
import Application.Caffe.ArgsParser as AP
import Application.Caffe.LMDB
import Control.Monad as M
import Control.Monad.Trans.Resource
import Data.Array.Repa as R
import Data.Conduit
import Data.Conduit.List as C... | XinhuaZhang/PetaVisionHaskell | Application/Caffe/Image2LMDBFull.hs | gpl-3.0 | 1,643 | 0 | 17 | 547 | 495 | 253 | 242 | 47 | 3 |
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE CPP #-}
module Main where
-- import Data.Monoid as M
-- import Debug.Trace
import Control.Category
import Control.Monad as M hiding (sequence)
import Control.Monad.Fix
import Control.Monad.Random
import Control.Wire as W
import Control.Wire.Unsafe.Ev... | mstksg/netwire-experiments | src/Experiment/Archers.hs | gpl-3.0 | 9,714 | 8 | 20 | 3,079 | 3,506 | 1,843 | 1,663 | -1 | -1 |
-- Lets try something a little less ambitious, like yes.
module Main where
import System.Environment
import System.Console.Terminfo.Base
import Data.List
main :: IO ()
main = do
term <- setupTermFromEnv
args <- getArgs
let options = processArgs args defaultYes
-- runTermOutput term (termText ("Options: "++(show... | PuZZleDucK/Hls | old-Hyes.hs | gpl-3.0 | 3,019 | 0 | 13 | 713 | 678 | 359 | 319 | 55 | 5 |
{-# LANGUAGE TemplateHaskell, FlexibleInstances#-}
module Gzip where
import qualified Data.ByteString.Lazy as L
import Data.Bits.Bitwise
import Data.Bits as B
import Data.ByteString
import Data.ByteString.Char8 as C
import Data.Binary.Put
import Data.Binary
import Data.Tuple.Select
import Data.Time.Clock as T
impo... | fcostantini/QuickFuzz | src/Gzip.hs | gpl-3.0 | 4,116 | 0 | 17 | 1,898 | 1,044 | 556 | 488 | 100 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/NodeTemplates/SetIAMPolicy.hs | mpl-2.0 | 4,513 | 0 | 18 | 1,048 | 549 | 326 | 223 | 90 | 1 |
-- | This is the main module to import into your project when you want to make use of the Dao
-- database kernel. It exports all of "Language.Interpreter.Dao.Kernel" along with serveral
-- functions for defining databases.
--
-- The database parser is defined in this module, although it mostly just parses the header be... | RaminHAL9001/Dao | src/Language/Interpreter/Dao/Database.hs | agpl-3.0 | 29,391 | 35 | 50 | 6,925 | 5,944 | 3,039 | 2,905 | -1 | -1 |
module ProjectM36.GraphRefRelationalExpr where
--evaluate relational expressions across the entire transaction graph to support cross-transaction referencing
import ProjectM36.Base
import qualified Data.Set as S
--import Debug.Trace
data SingularTransactionRef = SingularTransactionRef GraphRefTransactionMarker |
... | agentm/project-m36 | src/lib/ProjectM36/GraphRefRelationalExpr.hs | unlicense | 2,035 | 0 | 11 | 374 | 388 | 197 | 191 | 32 | 2 |
module RL_Glue.Environment (
Environment(Environment), loadEnvironment
) where
import Control.Monad (unless)
import Control.Monad.Trans.Class
import Control.Monad.Trans.Maybe
import Control.Monad.Trans.State.Lazy
import Data.Binary.Get
import Data.Binary.Put
import qualified Data.ByteString as BS
import qualified ... | rhofour/rlglue-haskell-codec | src/RL_Glue/Environment.hs | apache-2.0 | 3,922 | 0 | 25 | 1,086 | 1,226 | 591 | 635 | 109 | 4 |
main = do
_ <- getLine
c <- getContents
let i = map (map read) $ map words $ lines c
o = maximum $ map sum i
print o
| a143753/AOJ | 2259.hs | apache-2.0 | 142 | 0 | 14 | 55 | 72 | 32 | 40 | 6 | 1 |
-- http://www.codewars.com/kata/54c2fc0552791928c9000517
module Codewars.Kata.Summing where
f :: Integer -> Integer -> Integer
f n m = (q * m * (m-1) + r * (r+1)) `div` 2 where
(q, r) = divMod n m | Bodigrim/katas | src/haskell/6-Sum-of-large-ints.hs | bsd-2-clause | 199 | 0 | 11 | 36 | 89 | 50 | 39 | 4 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
-----------------------------------------------------------------------------
-- |
-- Module : System.Taffybar.TaffyPager
-- Copyright : (c) José A. Romero L.
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : José A. Romero L. <escherdragon@gmail.com>
-- Stability... | Undeterminant/taffybar | src/System/Taffybar/TaffyPager.hs | bsd-3-clause | 3,057 | 0 | 10 | 513 | 338 | 190 | 148 | 31 | 1 |
#define IncludedcastConcat
{-@ automatic-instances castConcat @-}
castConcat :: RString -> RString -> RString -> RString -> List Integer -> Proof
{-@ castConcat :: tg:RString -> xi:RString -> yi:RString -> zi:RString
-> xis:List (GoodIndex xi tg)
-> { map (castGoodIndexRight tg xi (yi <+> zi))... | nikivazou/verified_string_matching | src/AutoProofs/castConcat.hs | bsd-3-clause | 590 | 0 | 10 | 133 | 115 | 58 | 57 | 5 | 1 |
-- Copyright : Daan Leijen (c) 1999, daan@cs.uu.nl
-- HWT Group (c) 2003, haskelldb-users@lists.sourceforge.net
-- License : BSD-style
module Opaleye.Internal.HaskellDB.PrimQuery where
import qualified Opaleye.Internal.Tag as T
import Data.ByteString (ByteString)
import qualified Data.List.NonE... | WraithM/haskell-opaleye | src/Opaleye/Internal/HaskellDB/PrimQuery.hs | bsd-3-clause | 3,817 | 75 | 9 | 1,497 | 852 | 509 | 343 | 78 | 0 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Synchronise.Store.Base
( -- * Database
Store(..)
-- * Work
, WorkItem(..)
, WorkItemID
-- * Operati... | anchor/synchronise | lib/Synchronise/Store/Base.hs | bsd-3-clause | 5,933 | 0 | 12 | 1,332 | 1,025 | 590 | 435 | 92 | 0 |
module Sgf.Data.List
( insertUniq
, mapWhen
, mapWhenM
, findM
, ReadM
, liftRead
, readsPrecM
, readLexs
, readLexsM
, anyP
, when'
, unless'
, riseElems
)
where
import Control.Applicative
import Control.Monad.State
insertUniq :: Eq a => a -> [a] -> [a]
inse... | sgf-dma/sgf-haskell-common | src/Sgf/Data/List.hs | bsd-3-clause | 2,269 | 0 | 11 | 721 | 871 | 453 | 418 | -1 | -1 |
{-# LANGUAGE FunctionalDependencies #-}
module HaskellCI.Config.Empty where
import HaskellCI.Prelude
import qualified Distribution.FieldGrammar as C
import qualified Distribution.Fields as C
import HaskellCI.OptionsGrammar
newtype EmptyGrammar s a = EG { runEG :: Either (NonEmpty C.FieldName) a }
derivi... | hvr/multi-ghc-travis | src/HaskellCI/Config/Empty.hs | bsd-3-clause | 1,366 | 0 | 10 | 390 | 507 | 255 | 252 | -1 | -1 |
module League.Types.Summoner where
import League.Internal.TH.Shared
import Control.Applicative
import Control.Lens
import Data.Aeson
import Data.Function (on)
import Data.Monoid
import Data.Text (Text)
newtype SummonerID = SummonerID Integer
deriving (Show, Read, Eq, Ord)
instance FromJSON SummonerID where
pars... | intolerable/league-of-legends | src/League/Types/Summoner.hs | bsd-3-clause | 1,079 | 0 | 13 | 269 | 287 | 158 | 129 | -1 | -1 |
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-}
module Main (main) where
import Test.Hspec
import Test.Hspec.Wai
import Test.Hspec.Wai.JSON
import Control.Exception (bracket)
import Data.Aeson (Value(..), object, (.=), (.:), Object(..), decode, FromJSON(..))
import ... | alexlegg/couchgames | test/Spec.hs | bsd-3-clause | 3,886 | 0 | 30 | 1,209 | 1,000 | 542 | 458 | 75 | 3 |
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies #-}
module Codec.JVM.Pretty.GenericOut where
import Text.PrettyPrint.GenericPretty
import qualified Data.Map as M
import qualified Data.Set as S
import GHC.Generics
import GHC.Int
import GHC.Word
import Text.PrettyPrint
import Data.ByteString
import Data... | HaskellZhangSong/codec-jvm-pretty | src/Codec/JVM/Pretty/GenericOut.hs | bsd-3-clause | 2,131 | 0 | 11 | 560 | 990 | 492 | 498 | 80 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Parser.ProductRule
-- Copyright : See LICENSE
--
-- Maintainer : ylilarry@gmail.com
-- Stability : Experimental
-- Portability : Non-portable (GHC extensions)
--
-- = Introduction
--
-- __This module contains e... | YLiLarry/parser241 | src/Parser/ProductRule.hs | bsd-3-clause | 2,423 | 0 | 6 | 657 | 205 | 170 | 35 | 25 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Trello.Data.List where
import Control.Applicative
import Control.Monad
import Data.Aeson (decode)
import Data.Aeson.Parser
import Data.Aeson.Types hiding (Error)
import Data.ByteString.Lazy (ByteString)
import Trello.ApiData
import Trello.Data
import Trello.Reque... | vamega/haskell-trello | src/Trello/Data/List.hs | bsd-3-clause | 744 | 0 | 14 | 155 | 214 | 116 | 98 | 22 | 1 |
--
-- Main.hs
--
module Main where
import System.Directory
import System.Environment
import Data.List
import Data.List.Split
import Data.Char
import Finder
picext = "JPG"
delimiter = "/"
main :: IO ()
main = do
ds <- getArgs
let (r, t, s, ds') = parseOpt ds
fs <- mapM getFileLists ds'
ss <- findSame r t s $... | eijian/picfinder | src/Main.hs | bsd-3-clause | 1,163 | 0 | 12 | 273 | 551 | 287 | 264 | 40 | 1 |
module EA where
data State = S0 | S1 | S2 | S3 | S4 | S5 | S6 | S7 | S8 | S9 | S10 | Serror
deriving (Eq, Show)
-- Sigma = e, h, i, l, n, o, t, w
sigma :: State -> Char -> State
-- verschiedene Lösungsmöglichkeiten für jeden Zustand
-- Pattern Matching
sigma S0 'n' = S1
sigma S0 'w' = S6
-- Verwendung von Guards... | ob-cs-hm-edu/compiler_ea1 | src/EA.hs | bsd-3-clause | 858 | 0 | 8 | 288 | 263 | 148 | 115 | 22 | 1 |
module Hack2.Handler.Mongrel2.Utils where
import Control.Concurrent
import System.IO.Unsafe (unsafePerformIO)
import Prelude ()
import Air.Env hiding (log)
import System.IO
sync_lock :: MVar ()
sync_lock = unsafePerformIO - newMVar ()
jailed :: IO a -> IO a
jailed io = do
withMVar sync_lock (const io)
log :: Stri... | nfjinjing/hack2-handler-mongrel2-http | src/Hack2/Handler/Mongrel2/Utils.hs | bsd-3-clause | 452 | 0 | 9 | 83 | 166 | 88 | 78 | 15 | 1 |
-- | A few important number sequences.
--
-- See the \"On-Line Encyclopedia of Integer Sequences\",
-- <https://oeis.org> .
module Math.Combinat.Numbers where
--------------------------------------------------------------------------------
import Data.Array
import Math.Combinat.Helper ( sum' )
----------------... | chadbrewbaker/combinat | Math/Combinat/Numbers.hs | bsd-3-clause | 5,816 | 0 | 17 | 1,265 | 1,705 | 870 | 835 | 88 | 2 |
{-# LANGUAGE CPP, FlexibleContexts, FlexibleInstances, TypeSynonymInstances, ScopedTypeVariables #-}
-- | Functions and classes related to generating a 'Response' and setting the response code. For detailed instruction see the Happstack Crash Course: <http://www.happstack.com/docs/crashcourse/index.html#creating-a-resp... | Happstack/happstack-server | src/Happstack/Server/Response.hs | bsd-3-clause | 13,209 | 0 | 20 | 3,037 | 2,124 | 1,172 | 952 | 163 | 2 |
{-# LANGUAGE FlexibleInstances #-}
module Numeric.Approximate where
import Data.Wright
import Data.Vector
import Numeric.Matrix (Matrix, MatrixElement, toList)
import Data.Function (on)
class Approximate a where
approx :: a -> a -> Bool
(=~) :: a -> a -> Bool
(=~) = approx
instance Approximate Double where
... | fmap-archive/wright | test/Numeric/Approximate.hs | mit | 547 | 0 | 10 | 101 | 242 | 137 | 105 | 15 | 0 |
--
--
--
----------------
-- Exercise 9.6.
----------------
--
--
--
module E'9''6 where
-- Notes:
--
-- - Use/See templates for structural induction.
-- - Re/-member/-think/-view the definition of "++".
-- ------------
-- Proposition:
-- ------------
--
-- leftList ++ [] = leftList
--
--
-- Proof By Structu... | pascal-knodel/haskell-craft | _/links/E'9''6.hs | mit | 3,883 | 0 | 2 | 1,661 | 145 | 144 | 1 | 1 | 0 |
{-# LANGUAGE MultiParamTypeClasses, DeriveDataTypeable #-}
{- |
Module : ./THF/Sublogic.hs
Description : Sublogics for THF
Copyright : (c) Jonathan von Schroeder, DFKI Bremen 2012
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Jonathan von Schroeder <jonathan.von_schroeder@dfki.de>
Stability ... | spechub/Hets | THF/Sublogic.hs | gpl-2.0 | 7,862 | 0 | 15 | 1,888 | 2,180 | 1,062 | 1,118 | 167 | 1 |
-- This file is part of HamSql
--
-- Copyright 2014-2016 by it's authors.
-- Some rights reserved. See COPYING, AUTHORS.
module Database.YamSql.Internal.Obj.Check where
import Database.YamSql.Internal.Basic
data Check =
Check
{ checkName :: SqlName
, checkDescription :: Text
, checkCheck :: Text
}
... | hemio-ev/hamsql | src/Database/YamSql/Internal/Obj/Check.hs | gpl-3.0 | 462 | 0 | 8 | 89 | 88 | 55 | 33 | 12 | 0 |
{-# LANGUAGE Trustworthy, DeriveDataTypeable, DeriveGeneric #-}
-- | An approximate vector clock implementation in terms of
-- "Data.VectorClock.Simple".
module Data.VectorClock.Approximate (
-- * Usage example
-- $example
-- * Vector clock type
VectorClock,
-- * Construction
... | tkonolige/vector-clock | src/Data/VectorClock/Approximate.hs | gpl-3.0 | 9,426 | 0 | 11 | 2,570 | 2,116 | 1,173 | 943 | 122 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | romanb/amazonka | amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/CreateApplicationVersion.hs | mpl-2.0 | 7,448 | 0 | 9 | 1,446 | 731 | 453 | 278 | 82 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-ec2/gen/Network/AWS/EC2/DescribeCustomerGateways.hs | mpl-2.0 | 5,981 | 0 | 10 | 1,168 | 604 | 378 | 226 | 68 | 1 |
module Data.Time.Moment.UTC
(
)
where
import Data.Time
import Data.Time.Moment.Moment
instance Moment UTCTime where
epoch = UTCTime (toEnum 0) 0
addSeconds utc i = addUTCTime (fromIntegral i) utc
addMonths (UTCTime d t) i = UTCTime (addGregorianMonthsRollOver i d) t
addYears (UTCTime d t) i = UTCTim... | hellertime/time-recurrence | src/Data/Time/Moment/UTC.hs | lgpl-3.0 | 356 | 0 | 8 | 69 | 130 | 68 | 62 | 9 | 0 |
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
-- In addition, you can configure a number of different aspects of Yesod
-- by overriding methods in the Yesod typeclass. That instance is
-- declared in the Foundation.hs file.... | ChrisSwires/One | Settings.hs | bsd-2-clause | 2,424 | 0 | 9 | 435 | 267 | 171 | 96 | -1 | -1 |
module Program.Mighty.Signal (
-- * Signals
sigStop
, sigReload
, sigRetire
, sigInfo
-- * Signal handling
, setHandler
) where
import Control.Monad
import System.Posix
----------------------------------------------------------------
-- | The signal to stop Mighty.
sigStop :: Signal
sigStop = sig... | kazu-yamamoto/mighttpd2 | Program/Mighty/Signal.hs | bsd-3-clause | 830 | 0 | 8 | 144 | 122 | 74 | 48 | 18 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.