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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
-- Problem 23
--
-- A perfect number is a number for which the sum of its proper divisors is
-- exactly equal to the number. For example, the sum of the proper divisors
-- of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means that 28 is a perfect
-- number.
--
-- A number n is called deficient if the sum of its proper di... | RossMeikleham/Project-Euler-Haskell | 23.hs | mit | 1,889 | 0 | 20 | 422 | 433 | 239 | 194 | 21 | 2 |
-- |
-- Module : Jeopardy.Controller
-- Description : MVC for our game
-- Copyright : (c) Jonatan H Sundqvist, year
-- License : MIT
-- Maintainer : Jonatan H Sundqvist
-- Stability : experimental|stable
-- Portability : POSIX (not sure)
--
-- Created date year
-- TODO | -
-- -
-- SPEC | -
--... | SwiftsNamesake/Leopardy | src/Jeopardy/Controller.hs | mit | 4,429 | 4 | 15 | 825 | 884 | 485 | 399 | 59 | 2 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
module Nix.Common (
module ClassyPrelude,
module Data.Text,
module Data.HashMap.Strict,
module Data.Fix,
module Filesystem.Path.CurrentOS,
module Data.Sequence,
module GHC.Generics,
module Control.Dee... | adnelson/nix-eval | src/Nix/Common.hs | mit | 2,866 | 0 | 11 | 905 | 782 | 447 | 335 | 65 | 2 |
module Main where
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit
import System.IO (stdout)
import System.Log.Logger
import System.Log.Handler (setFormatter)
import System.Log.Handler.Simple (fileHandler)
import System.Log.Formatter (simpleLogFormatter)
import EDDA.Schema.ParserTest (pa... | troydm/edda | test/Spec.hs | mit | 1,268 | 0 | 13 | 221 | 280 | 158 | 122 | 25 | 1 |
{-# LANGUAGE OverloadedStrings, ExistentialQuantification, BangPatterns #-}
-- | CouchDB View Query options.
--
-- For details see
-- <http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options>. Note,
-- because all options must be a proper URL encoded JSON, construction of
-- complex parameters can be... | nikita-volkov/ez-couch | src/Database/CouchDB/Conduit/View/Query.hs | mit | 6,313 | 0 | 11 | 1,980 | 1,064 | 613 | 451 | 75 | 26 |
data Price =
Price Integer deriving (Eq, Show)
data Size =
Size Integer deriving (Eq, Show)
data Manufacturer =
Mini
| Mazda
| Tata
deriving (Eq, Show)
data Airline =
PapuAir
| CatapultsR'Us
| TakeYourChancesUnited
deriving (Eq, Show)
data Vehicle = Car Manufacturer Price
... | ashnikel/haskellbook | ch11/ch11.6_ex.hs | mit | 849 | 0 | 7 | 236 | 300 | 162 | 138 | 31 | 1 |
module Resource where
--
type Money = Int
type Food = Int
type Energy = Int
--
data Good = Cattle
| Fish
| Grain
--
| Wood
| Coal
| Clay
| Iron
| Hides
--
| Loan
| Coin
deriving (Show, Eq)
--
-- ##... | jaiyalas/creepy-waffle | LeHavre/src/LeHavre/Resource.hs | mit | 2,033 | 0 | 7 | 827 | 578 | 312 | 266 | 80 | 0 |
module Sllar.Server ( start
, stop ) where
import Sllar.Config
import qualified Sllar.Package.Import (publish)
import qualified Sllar.Package.Export
import Paths_sllar_server
-- System
import Control.Concurrent
import Control.Monad (forever)
import Data.Maybe
import Network
import System.Directory (remo... | grsmv/sllar | src/Sllar/Server.hs | mit | 3,553 | 0 | 17 | 871 | 1,004 | 546 | 458 | 79 | 3 |
{-# LANGUAGE DeriveDataTypeable,
ScopedTypeVariables,
OverloadedStrings #-}
module Main (main) where
import Data.Typeable
import Data.Text ()
import Control.Monad
import LIO
import LIO.DCLabel
import Hails.Data.Hson
import Hails.Database
import Hails.PolicyModule
import Hails.PolicyModule.... | scslab/hails | examples/simpleDBExample.hs | mit | 3,217 | 0 | 25 | 909 | 1,046 | 510 | 536 | 93 | 2 |
main = print "hello world"
| patbeagan1/AcerArchDev | haskell/helloworld.hs | gpl-2.0 | 27 | 0 | 5 | 5 | 9 | 4 | 5 | 1 | 1 |
{- Module to parse the output from k
Such output is constructed into named Cells and their contents, or Strings. See KOutput
All formatting info (spaces, newlines, etc) with respect to the contents of cells is preserved,
but the cells themselves do not preserve formatting. E.g.:
<mycell> </mycell> === < m... | bakineggs/k-framework | tools/OutputFilter/ParseKOutput.hs | gpl-2.0 | 3,726 | 0 | 18 | 1,029 | 904 | 459 | 445 | 59 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Carbon.Data.User where
import Data.Aeson ((.=), ToJSON(..), object)
import Data.Function (on)
import Carbon.Data.Alias
import Carbon.Data.Id
import Carbon.Data.Hash
import Carbon.Data.Salt
data User = User {
userId :: Id
, username :: String
, userhash :: Has... | runjak/carbon-adf | Carbon/Data/User.hs | gpl-3.0 | 899 | 0 | 9 | 253 | 261 | 155 | 106 | 31 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- Derived from AWS service descriptions, licensed under Apache 2.0.
-- |
-- Module : Network.AWS.Kinesis.Types.Product
-- ... | olorin/amazonka | amazonka-kinesis/gen/Network/AWS/Kinesis/Types/Product.hs | mpl-2.0 | 18,664 | 0 | 15 | 4,004 | 2,801 | 1,656 | 1,145 | 294 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | olorin/amazonka | amazonka-iam/gen/Network/AWS/IAM/UpdateGroup.hs | mpl-2.0 | 4,270 | 0 | 11 | 855 | 533 | 325 | 208 | 68 | 1 |
{-
Author: Rohit Jha
File: PE005.hs
July 7, 2013
Problem 5:
2520 is the smallest number that can be divided by each of the numbers from
1 to 10 without any remainder.
What is the smallest positive number that is evenly divisible by all of the
numbers from 1 to 20?
-}
main = putStrLn $ show $ foldr1 lcm [3,5,7,11,1... | rohitjha/ProjectEuler | Haskell/PE005.hs | unlicense | 394 | 0 | 7 | 77 | 48 | 29 | 19 | 1 | 1 |
module TicTacToe where
{-# LANGUAGE FlexibleInstances #-}
import Data.Either
import Safe
import Data.Maybe
import Data.List
-- |Slots in the board can either be filled with Naughts or Crosses
data Symbol = X | O
deriving (Show, Eq)
-- |Empty slots are referred to by their location on the board
type Piece = Either... | 2016rshah/Tic-Hack-Toe | src/TicTacToe.hs | apache-2.0 | 5,056 | 22 | 13 | 1,042 | 1,829 | 974 | 855 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE Rank2Types #-}
-- Copyright 2014 (c) Diego Souza <dsouza@c0d3.xxx>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obta... | locaweb/leela | src/warpdrive/src/Leela/Data/LQL/Read.hs | apache-2.0 | 20,363 | 0 | 31 | 5,543 | 7,727 | 3,925 | 3,802 | 477 | 8 |
{-# LANGUAGE FlexibleContexts #-}
module CLSParser(
module Parser
, pCLSSts
) where
import Control.Applicative hiding ((<|>))
import Types
import Parser
import Data.Int
import Text.Parsec.Prim((<|>),(<?>))
import qualified Text.Parsec.Prim as P
import qualified Text.Parsec.Combinator as P
import qualifi... | trbauer/clr | src/CLSParser.hs | bsd-2-clause | 7,005 | 0 | 21 | 2,604 | 2,332 | 1,144 | 1,188 | 188 | 1 |
{-# LANGUAGE BangPatterns #-}
module Main where
import Criterion.Main
import PregenKeys
import qualified Crypto.Hash.SHA1 as SHA1
import Crypto.PubKey.RSA as RSA
import Crypto.PubKey.RSA.PKCS15 as PKCS15
import Crypto.PubKey.RSA.OAEP as OAEP
import Crypto.PubKey.RSA.PSS as PSS
import Crypto.PubKey.HashDescr
import Cr... | vincenthz/hs-crypto-pubkey | Benchs/Bench.hs | bsd-2-clause | 4,585 | 0 | 21 | 1,407 | 1,325 | 667 | 658 | 67 | 1 |
import Shelly
import Prelude hiding (FilePath)
import Text.Shakespeare.Text (lt)
import qualified Data.Text.Lazy as LT
import Data.Text.Lazy (Text)
import Control.Monad (forM_)
import System.Console.CmdArgs
import Data.Maybe (fromMaybe)
#if __GLASGOW_HASKELL__ < 704
import Data.Monoid (Monoid, mappend)
infixr 5 <>
(<... | yesodweb/scripts | install.hs | bsd-2-clause | 6,211 | 1 | 19 | 1,408 | 1,206 | 609 | 597 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ConstraintKinds #-}
module Web.Auth0.Management(
module Web.Auth0.Types,
searchUsers,
getUser,
deleteUser,
blockUser,
createEmailUser,
createPhoneUser,
updateUserFrom,
setEmail,
setPhone,
setAppMetadata,
linkProfile
) where... | collegevine/auth0 | src/Web/Auth0/Management.hs | bsd-3-clause | 4,771 | 0 | 22 | 1,137 | 1,542 | 794 | 748 | 89 | 2 |
-- | Support for command-line completion at the REPL and in the prover
module Idris.Completion (replCompletion, proverCompletion) where
import Idris.Core.Evaluate (ctxtAlist)
import Idris.Core.TT
import Idris.AbsSyntaxTree
import Idris.Help
import Idris.Colours
import Idris.ParseHelpers(opChars)
import Control.Monad... | DanielWaterworth/Idris-dev | src/Idris/Completion.hs | bsd-3-clause | 8,932 | 0 | 16 | 2,871 | 2,399 | 1,288 | 1,111 | 149 | 10 |
module Spire.Canonical.InitialEnv ( _Branches , initEnv ) where
import Control.Applicative
import Data.Monoid (mempty)
import Unbound.LocallyNameless hiding ( Spine )
import Spire.Canonical.Types
import Spire.Surface.PrettyPrinter
import qualified Spire.Canonical.Builtins as B
-----------------------------------------... | spire/spire | src/Spire/Canonical/InitialEnv.hs | bsd-3-clause | 7,077 | 0 | 20 | 1,738 | 3,612 | 1,790 | 1,822 | 229 | 1 |
-- | Typing Module
module SSTG.Core.Language.Typing
( module SSTG.Core.Language.Typing
) where
import SSTG.Core.Language.Syntax
-- | Typeable typeclass.
class Typeable a where
typeOf :: a -> Type
-- | `Var` instance of `Typeable`.
instance Typeable Var where
typeOf (Var _ ty) = ty
-- | `Lit` instanc... | AntonXue/SSTG | src/SSTG/Core/Language/Typing.hs | bsd-3-clause | 1,672 | 0 | 10 | 385 | 591 | 301 | 290 | 36 | 0 |
module Main (main) where
import Paths_eclogues_mock (getDataFileName)
import Language.Haskell.HLint (hlint)
import System.Exit (exitFailure, exitSuccess)
paths :: [String]
paths =
[ "app"
, "src"
, "test"
]
arguments :: IO [String]
arguments = go <$> getDataFileName "HLint.hints"
where
go p = (... | futufeld/eclogues | eclogues-mock/test/HLint.hs | bsd-3-clause | 454 | 0 | 9 | 98 | 147 | 83 | 64 | 16 | 2 |
{- -*- coding:utf-8 -*- -}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TupleSections #-}
module Main where
import Lib
import Dfm
import Checks.DfmLocalizationProblemsInSql as E
import System.IO (stdout, stderr, hPutStrLn)
import System.Console.CmdArgs
import System.Environment (getProgName)
import ... | ki11men0w/delphi-lint | app/Main.hs | bsd-3-clause | 5,822 | 0 | 16 | 1,812 | 1,158 | 609 | 549 | 110 | 3 |
module LeapYearKata.Day1Spec (spec) where
import Test.Hspec
import LeapYearKata.Day1 (isLeapYear)
spec :: Spec
spec = do
it "is a leap year when divisible by 4" $ do
isLeapYear 2016
it "is not a leap year when not divisible by 4" $ do
not $ isLeapYear 2015
... | Alex-Diez/haskell-tdd-kata | old-katas/test/LeapYearKata/Day1Spec.hs | bsd-3-clause | 500 | 0 | 11 | 177 | 108 | 50 | 58 | 13 | 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.Sql where
-----------------------------------------------------------
-- * SQL data type
------------------------------------... | silkapp/haskell-opaleye | src/Opaleye/Internal/HaskellDB/Sql.hs | bsd-3-clause | 1,806 | 0 | 8 | 482 | 274 | 171 | 103 | 28 | 0 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP #-}
module BuildTyCl (
buildDataCon, mkDataConUnivTyVarBinders,
buildPatSyn,
TcMethInfo, buildClass,
mkNewTyConRhs, mkDataTyConRhs,
newImplicitBinder, newTyConRep... | mettekou/ghc | compiler/iface/BuildTyCl.hs | bsd-3-clause | 20,512 | 0 | 19 | 7,057 | 2,985 | 1,627 | 1,358 | 251 | 5 |
-- | Utility functions
{-# LANGUAGE OverloadedStrings #-}
module NumberSix.Util
( sleep
, forkIrc
, (<>)
, (==?)
, toLower
, breakWord
, prettyList
, removeNewlines
, randomElement
, parseJsonEither
, readText
, maxLineLength
) where
--------------------------------... | itkovian/number-six | src/NumberSix/Util.hs | bsd-3-clause | 3,279 | 0 | 10 | 697 | 672 | 380 | 292 | 55 | 2 |
{-|
Description: SDL events subsystem.
-}
module Graphics.UI.SDL.Events
( module Queue
, module Types
) where
import Graphics.UI.SDL.Events.Queue as Queue
import Graphics.UI.SDL.Events.Types as Types
| abbradar/MySDL | src/Graphics/UI/SDL/Events.hs | bsd-3-clause | 223 | 0 | 4 | 47 | 39 | 30 | 9 | 5 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Configuration.Screen where
import Lens.Simple ( (^.)
, makeLenses
)
import Data.Yaml ... | rumblesan/improviz | src/Configuration/Screen.hs | bsd-3-clause | 1,069 | 0 | 11 | 476 | 179 | 106 | 73 | 25 | 1 |
{-# language CPP #-}
-- | = Name
--
-- VK_EXT_display_surface_counter - instance extension
--
-- == VK_EXT_display_surface_counter
--
-- [__Name String__]
-- @VK_EXT_display_surface_counter@
--
-- [__Extension Type__]
-- Instance extension
--
-- [__Registered Extension Number__]
-- 91
--
-- [__Revision__]
-... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_EXT_display_surface_counter.hs | bsd-3-clause | 23,142 | 1 | 17 | 4,512 | 3,119 | 1,878 | 1,241 | -1 | -1 |
--
-- Module : TimeScheme
-- Copyright : (c) Conrad Parker 2006
-- License : BSD-style
-- Maintainer : conradp@cse.unsw.edu.au
-- Stability : experimental
-- Portability : portable
module Codec.Container.Ogg.TimeScheme (
TimeScheme (..),
guessTimeScheme,
-- | Some standard time schemes
npt,
sm... | kfish/hogg | Codec/Container/Ogg/TimeScheme.hs | bsd-3-clause | 2,475 | 0 | 12 | 427 | 615 | 351 | 264 | 59 | 1 |
module ScrabbleScoreKata.Day10Spec (spec) where
import Test.Hspec
import ScrabbleScoreKata.Day10 (score)
spec :: Spec
spec = do
it "is zero when given an empty input" $ do
score "" `shouldBe` 0
it "is 1 when given lowercase 'a'" $ do
score "a" `shouldBe` 1
... | Alex-Diez/haskell-tdd-kata | old-katas/test/ScrabbleScoreKata/Day10Spec.hs | bsd-3-clause | 1,082 | 0 | 11 | 391 | 268 | 128 | 140 | 26 | 1 |
-- !!! Testing error checking in qualified names (type variables)
-- No qualified type variables
module TestQual2 where
x :: A.a
x = x
| FranklinChen/Hugs | tests/static/qual2.hs | bsd-3-clause | 138 | 1 | 4 | 27 | 18 | 12 | 6 | -1 | -1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
module Watch where
import Control.Concurrent
import Control.Monad
import Control.Monad.IO.Class
import Data.Bits
import Data.List
import qualified Data.Map as M
import System.Console.ANSI
import System.Directory
import System.FilePath
import System.FilePath.Glob
import Syste... | pikajude/src-watch | src/Watch.hs | bsd-3-clause | 3,331 | 0 | 22 | 987 | 1,022 | 488 | 534 | 80 | 4 |
-------------------------------------------------------------------------------
-- PARSING FUNCTIONS
-------------------------------------------------------------------------------
module Parsing where
import Instances
import Haskell
import Language.Haskell.Syntax
import Language.Haskell.Parser
import Data.List
impo... | abdulrahimnizamani/OccamStar | Parsing.hs | gpl-2.0 | 14,670 | 61 | 38 | 4,732 | 5,636 | 2,915 | 2,721 | -1 | -1 |
{-
This source file is a part of the noisefunge programming environment.
Copyright (C) 2015 Rev. Johnny Healey <rev.null@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... | wolfspyre/noisefunge | src/Language/NoiseFunge/Befunge.hs | gpl-3.0 | 5,049 | 3 | 25 | 1,523 | 1,426 | 755 | 671 | 108 | 5 |
module Network.Haskoin.Crypto.Base58.Tests (tests) where
import Data.String (fromString)
import Data.String.Conversions (cs)
import Network.Haskoin.Crypto
import Network.Haskoin.Test
import Test.Framework
import Test.Fram... | xenog/haskoin | test/bitcoin/Network/Haskoin/Crypto/Base58/Tests.hs | unlicense | 1,214 | 0 | 14 | 435 | 273 | 144 | 129 | 26 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.CCompiler
-- Copyright : 2011, Dan Knapp
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- This simple package provides types and functions for interacting with
-- C co... | plumlife/cabal | Cabal/Distribution/Simple/CCompiler.hs | bsd-3-clause | 4,922 | 0 | 11 | 1,130 | 630 | 353 | 277 | 57 | 17 |
{-# LANGUAGE TypeOperators, BangPatterns, ScopedTypeVariables #-}
-- ---------------------------------------------------------------------------
-- |
-- Module : Data.Vector.Algorithms.Intro
-- Copyright : (c) 2008-2011 Dan Doel
-- Maintainer : Dan Doel <dan.doel@gmail.com>
-- Stability : Experimental
-- Por... | abakst/liquidhaskell | benchmarks/vector-algorithms-0.5.4.2/Data/Vector/Algorithms/Intro.hs | bsd-3-clause | 10,160 | 0 | 17 | 3,142 | 2,401 | 1,247 | 1,154 | 134 | 4 |
{-# OPTIONS_GHC -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Bool
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- S... | alekar/hugs | packages/base/Data/Bool.hs | bsd-3-clause | 867 | 0 | 6 | 173 | 92 | 72 | 20 | 7 | 0 |
module GuardsIn3 where
format :: [a] -> [[a]] -> [[a]]
format sep xs
= if len xs < 2
then xs
else (head xs ++ sep) : format sep (tail xs)
{- fmt = format "\n" -}
fmt
| len "blll" < 2 = (\xs -> xs)
| otherwise = (\xs -> ((head xs) ++ "\n") : (format "\n" (tail xs)))
len x = length x
{- map2 xs ... | kmate/HaRe | old/testing/generativeFold/GuardsIn3.hs | bsd-3-clause | 499 | 0 | 12 | 173 | 281 | 150 | 131 | 16 | 2 |
{-# OPTIONS_GHC -cpp #-}
{-# OPTIONS -fglasgow-exts #-}
{-# LANGUAGE MultiParamTypeClasses, OverlappingInstances, UndecidableInstances, FunctionalDependencies, NoMonomorphismRestriction #-}
module ExceptM (module ExceptM, HasExcept(..)) where
import MT
import Control_Monad_Fix
import Control.Monad (liftM)
{- use new... | kmate/HaRe | old/tools/base/lib/Monads/ExceptM.hs | bsd-3-clause | 1,488 | 0 | 12 | 431 | 382 | 196 | 186 | 26 | 1 |
{-# LANGUAGE TypeFamilies, ConstraintKinds, PatternSynonyms, RankNTypes #-}
module T13752 where
newtype Arrange = Arrange {getArrange :: [Int] -> [Int]}
pattern Heh :: (c ~ ((~) Int)) => (forall a. c a => [a] -> [a]) -> Arrange
-- pattern Heh :: (forall a. (Int ~ a) => [a] -> [a]) -> Arrange
pattern Heh f <- Arrange... | shlevy/ghc | testsuite/tests/patsyn/should_compile/T13752.hs | bsd-3-clause | 323 | 0 | 12 | 61 | 98 | 57 | 41 | -1 | -1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving, NoImplicitPrelude #-}
module GHC.Event.Unique
(
UniqueSource
, Unique(..)
, newSource
, newUnique
) where
import Data.Int (Int64)
import GHC.Base
import GHC.Conc.Sync (TVar, atomically, newTVarIO, readTVar, wr... | beni55/haste-compiler | libraries/ghc-7.8/base/GHC/Event/Unique.hs | bsd-3-clause | 1,124 | 0 | 11 | 216 | 254 | 146 | 108 | 27 | 1 |
----------------------------------------------------------------
--
-- | aartifact
-- http://www.aartifact.org/
--
-- Contributors to this module:
-- David House
-- Andrei Lapets
--
-- @src\/MapUsingRBTree.hs@
--
-- Red-black tree implementation of data structure for
-- no-removal finite maps.
--
---------... | aartifact/aartifact-verifier | src/MapUsingRBTree.hs | mit | 3,249 | 0 | 11 | 944 | 1,840 | 941 | 899 | 67 | 6 |
{-# LANGUAGE OverloadedStrings, TypeFamilies, RankNTypes, DataKinds, TypeOperators, FlexibleContexts #-}
module Session where
import Web.Spock
import Control.Monad.Trans
import Config
import Data.HVect (HVect(..), ListContains(..))
import Data.IORef
import Data.Monoid
import Data.Text (Text)
import qualified Data.Te... | CarstenKoenig/MyWebSite | src/Session.hs | mit | 1,977 | 0 | 13 | 386 | 594 | 327 | 267 | 56 | 3 |
-----------------------------------------------------------------------------
-- Copyright : (c) Hanzhong Xu, Meng Meng 2016,
-- License : MIT License
--
-- Maintainer : hanzh.xu@gmail.com
-- Stability : experimental
-- Portability : portable
---------------------------------------------------------------... | PseudoPower/AFSM | examples/SFM/Elevator.hs | mit | 3,125 | 0 | 23 | 917 | 1,430 | 785 | 645 | 67 | 8 |
{-# LANGUAGE ExistentialQuantification #-}
module SiteArchiver.DataStore(DataStore, createDataStore, disconnectDataStore, saveResponse, createJob, loadResponse, getStartUrlForJob, getSite, allSites, insertSite, jobsForSite) where
import Control.Monad
import Database.HDBC
import Database.HDBC.Sqlite3
import SiteArchiv... | iansullivan88/site-archiver | src/SiteArchiver/DataStore.hs | mit | 5,958 | 0 | 14 | 1,093 | 1,656 | 838 | 818 | 96 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Y2018.M07.D09.Solution where
import Data.Aeson
import Data.Aeson.Encode.Pretty (encodePretty)
import Data.ByteString.Lazy.Char8 (ByteString)
import qualified Data.ByteString.Lazy.Char8 as BL
import Data.Map (Map)
import Data.Maybe (fromJust)
-- Today we look at some JSON:
e... | geophf/1HaskellADay | exercises/HAD/Y2018/M07/D09/Solution.hs | mit | 2,880 | 0 | 11 | 592 | 188 | 111 | 77 | 18 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Concurrent
import Control.Exception (try)
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.Lazy as BL
import qualified Data.Text ... | bitemyapp/hterm | Main.hs | mit | 4,512 | 0 | 16 | 1,499 | 1,348 | 699 | 649 | 104 | 7 |
import qualified Data.Matrix as Matrix
import qualified Data.Map as Map
import Data.Maybe
relation_mat = Matrix.fromList 2 2 [4,1,1,0]
init_mat = Matrix.fromList 2 1 [8,2]
-------------------------------------------------------
-- compute_vector calculates the calculates a vector,
-- given a relation matrix 'x' by m... | LuqmanSahaf/Solve-Project-Euler | Problem2/haskell/problem2.hs | mit | 4,147 | 41 | 18 | 745 | 838 | 446 | 392 | 43 | 1 |
{-# LANGUAGE CPP, TypeFamilies, DeriveDataTypeable #-}
module PGIP.GraphQL.Result.OMSSimple where
import Data.Data
data OMSSimple = OMSSimple { description :: Maybe String
, displayName :: String
, labelHasFree :: Bool
, labelHasHiding ... | spechub/Hets | PGIP/GraphQL/Result/OMSSimple.hs | gpl-2.0 | 632 | 0 | 9 | 303 | 95 | 60 | 35 | 13 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module Test.QuickFuzz.Derive.NFData where
import Control.DeepSeq
import Data.Derive.NFData
import Data.DeriveTH
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
import Megadeth.Prim
isArbInsName = isinsName ''NFData
devNFData :: Name -> Q [Dec]
devNFData = megaderive (... | CIFASIS/QuickFuzz | src/Test/QuickFuzz/Derive/NFData.hs | gpl-3.0 | 352 | 0 | 7 | 41 | 84 | 50 | 34 | 11 | 1 |
module Connection (getConnection) where
import Network.Connection
import Network.IMAP
import Network.IMAP.Types
import Config (readConfig)
import Types
import Data.Yaml
import Control.Monad.IO.Class (liftIO)
import Data.Maybe
import qualified Data.Text as T
getConnection :: AccountConfig -> IO IMAPConnection
getConne... | mkawalec/email | src/Connection.hs | gpl-3.0 | 635 | 0 | 13 | 115 | 188 | 99 | 89 | 19 | 1 |
module Dmp.SourceUpdate
(updateSource) where
import Text.ParserCombinators.Parsec
qqString :: String
qqString = "\n{-# LANGUAGE QuasiQuotes #-}\n"
lhString :: String
lhString = "\n\nimport LiquidHaskell\n"
updateSource :: String -> Either ParseError String
updateSource = parse pSourceTop ""
pSourceTop :: CharParse... | christetreault/liquid-haskell-converter | lhconverter/Dmp/SourceUpdate.hs | gpl-3.0 | 843 | 0 | 11 | 170 | 203 | 106 | 97 | 24 | 1 |
{- Merch.Race.MapGen.Substep - Substep implementation for map generation code.
Copyright 2013 Alan Manuel K. Gloria
This file is part of Merchant's Race.
Merchant's Race 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 Foun... | AmkG/merchants-race | Merch/Race/MapGen/Substep.hs | gpl-3.0 | 1,908 | 0 | 12 | 399 | 438 | 226 | 212 | 31 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module NetEngine
( NetEngineOutput(..), NetEngineInput(..)
, netEngine
, gNEOMove, gNEOPacket, gNEOSetIterTimer
, gNEOPeerConnected, gNEOGameIteration
) where
import Control.Applicative
import Control.Category
import Control.FilterCategory
import Codec.Compression.Zlib (deco... | yairchu/defend | src/NetEngine.hs | gpl-3.0 | 6,122 | 0 | 18 | 1,400 | 1,971 | 1,069 | 902 | 180 | 2 |
module Utils
( module Utils.Generation
, module Utils.Patch
, module Utils.Console
, module Utils.Shrink
, module Utils.Unique
) where
import Utils.Generation
import Utils.Patch
import Utils.Console
import Utils.Shrink
import Utils.Unique
| elopez/QuickFuzz | app/Utils.hs | gpl-3.0 | 241 | 0 | 5 | 31 | 61 | 39 | 22 | 11 | 0 |
{-# LANGUAGE ScopedTypeVariables #-}
import Control.Applicative
import Control.Monad.Trans
import Control.Monad
import Control.Concurrent
import Data.IORef
import Data.String
import Network.HTTP.Client
import System.Posix.Directory
import System.Glib.GType
import Graphics.UI.Gtk
import Graphics.UI.Gtk.WebKit.WebView
i... | DanielG/ohs | client-old/GTK.hs | gpl-3.0 | 4,577 | 0 | 15 | 1,116 | 1,249 | 622 | 627 | 112 | 2 |
module HEP.Automation.MadGraph.Dataset.Set20110710set4 where
import HEP.Storage.WebDAV.Type
import HEP.Automation.MadGraph.Model
import HEP.Automation.MadGraph.Machine
import HEP.Automation.MadGraph.UserCut
import HEP.Automation.MadGraph.SetupType
import HEP.Automation.MadGraph.Model.C8V
import HEP.Automation.MadGr... | wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110710set4.hs | gpl-3.0 | 1,623 | 0 | 10 | 563 | 368 | 232 | 136 | 47 | 1 |
module LocatorSpec where
import OHS.Types
import OHS.FormSubmission
import Data.List
import Text.XML.HXT.Core
import qualified Text.XML.HXT.DOM.ShowXml as XS
import Test.Hspec
spec = describe "Locator" $ do
return ()
referenceSitesHaventChanged = undefined
runLArrow arrow = runLA (xshow (hread >>> arrow >>> inde... | DanielG/ohs | tests/LocatorSpec.hs | gpl-3.0 | 1,211 | 0 | 10 | 241 | 214 | 122 | 92 | 18 | 1 |
module Syntax ( Name
, Operation(..)
, BindingKind(..)
, BitCount
, TupleFiled(Field)
, Type(..)
, isArray, isPointer, isTuple, isEmptyTuple, isArrayPointer, isFunction
, ValueBinding(..), bindingName, bindingType, Functio... | mbelicki/valdemar | src/Syntax.hs | gpl-3.0 | 8,396 | 0 | 15 | 2,190 | 2,968 | 1,530 | 1,438 | 218 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Get.hs | mpl-2.0 | 4,573 | 0 | 18 | 1,189 | 720 | 420 | 300 | 104 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.DoubleClick... | brendanhay/gogol | gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Product.hs | mpl-2.0 | 61,551 | 0 | 43 | 15,047 | 11,751 | 6,767 | 4,984 | 1,286 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-admin-directory/gen/Network/Google/Resource/Directory/Resources/Features/Get.hs | mpl-2.0 | 5,392 | 0 | 21 | 1,314 | 795 | 463 | 332 | 119 | 1 |
module Notation.DiracNotation
((*|)
,(>|)
, (|.|)
, (><)
, Scalar
, Tuple(..)
, Ket(..)
, Bra(toKet)
, toBra
, applyOp,
QuantumState(normalize, dim)
) where
import Data.Complex
import Data.List (nub)
import Notation.QuantumState
--------------------------------------------------------... | johanjoensson/QuantumHaskell | QuantumHaskell-notation/src/Notation/DiracNotation.hs | agpl-3.0 | 15,303 | 0 | 14 | 3,711 | 2,781 | 1,467 | 1,314 | 146 | 1 |
module RPM.Version.Tests(vercmpTests)
where
import Test.Tasty(TestTree, testGroup)
import Test.Tasty.HUnit(assertEqual, testCase)
import RPM.Version(vercmp)
vercmpTests :: TestTree
vercmpTests = testGroup "vercmp tests" $ map verTestCase versionCases
where
verTestCase :: (String, String, Ordering) -> TestTree
... | dashea/bdcs | haskell-rpm/tests/RPM/Version/Tests.hs | lgpl-2.1 | 3,618 | 0 | 13 | 1,766 | 1,002 | 651 | 351 | 79 | 1 |
-- Copyright 2019-2021 Google LLC
--
-- 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
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed t... | google/hs-niche-containers | rle/test/RLETest.hs | apache-2.0 | 2,953 | 0 | 14 | 559 | 968 | 510 | 458 | 54 | 1 |
module Coins
where
data Coin = Good | Fake Bool deriving (Show)
generateSequence :: Int -> Int -> [Coin]
generateSequence coinsNumber fakePosition
| coinsNumber <= 0 = []
| coinsNumber == fakePosition = nextIteration ++ [Fake True]
| otherwise = nextIteration ++ [Good]
where nextIteration = generateSequence (coi... | vmatelsky/haskell | coins.hs | apache-2.0 | 1,016 | 0 | 9 | 174 | 238 | 131 | 107 | 15 | 2 |
-- http://www.codewars.com/kata/544aed4c4a30184e960010f4
module Divisors where
divisors :: (Show a, Integral a) => a -> Either String [a]
divisors a = if divs==[] then Left (show a ++ " is prime") else Right divs where
divs = filter (\n -> a`mod`n==0) [2..a-1] | Bodigrim/katas | src/haskell/6-Find-the-divisors.hs | bsd-2-clause | 263 | 0 | 11 | 43 | 114 | 62 | 52 | 4 | 2 |
-- | This module defines the functions that can be used run the classical subset
-- of QIO. That is, QIO computations that only use classical unitary operations.
module QIO.QioClass where
import Data.Maybe as Maybe
import Data.Monoid as Monoid
import Control.Monad.State
import QIO.QioSyn
import QIO.Heap
-- | A class... | alexandersgreen/qio-haskell | QIO/QioClass.hs | bsd-2-clause | 3,085 | 0 | 16 | 783 | 940 | 489 | 451 | 41 | 1 |
module Env where
import Prelude hiding (FilePath)
data Env a = Env { setup :: IO a, teardown :: IO () }
runEnv :: Env a -> (a -> IO r) -> IO r
runEnv env operation = do
identity <- setup env
result <- operation identity
teardown env
return result
| jfeltz/tasty-integrate | tests/Env.hs | bsd-2-clause | 257 | 0 | 10 | 61 | 114 | 57 | 57 | 9 | 1 |
{-# LANGUAGE CPP #-}
----------------------------------------------------------------------------
--
-- Stg to C--: primitive operations
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
module StgCmmPrim (
cgOpApp,
cgPrimOp, -- intern... | urbanslug/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | 96,243 | 0 | 19 | 25,659 | 24,834 | 12,417 | 12,417 | -1 | -1 |
import Test.Framework (defaultMain, testGroup)
import Test.Framework.Providers.HUnit
import Test.HUnit
import TestArithmetic
import TestOperators
import TestExpectations
import TestTransformations
import TestTrace
import TestPositiveP
tests = [
TestArithmetic.test_group,
TestOperators.test_group,
TestExpe... | fjarri/wigner | test/test.hs | bsd-3-clause | 464 | 0 | 6 | 65 | 87 | 53 | 34 | 17 | 1 |
module Main where
import Control.Concurrent
import Control.Monad
import Network
import qualified Network.Socket as S
import Network.IRC
import System.IO
import Text.Printf
server :: String
server = "irc.freenode.net"
port :: Int
port = 6667
nickname :: String
nickname = "HaskNag"
channels :: [String]
channels = ["... | haskell-infra/HaskNag | hasknag.hs | bsd-3-clause | 2,005 | 0 | 13 | 509 | 782 | 378 | 404 | 65 | 5 |
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Prompt.Window
-- Description : A prompt for bringing windows to you, and bring you to windows.
-- Copyright : Devin Mullins <me@twifkak.com>
-- Andrea Rossato <andrea.rossato@unibz.it>
-- Licen... | xmonad/xmonad-contrib | XMonad/Prompt/Window.hs | bsd-3-clause | 6,626 | 0 | 15 | 1,530 | 1,019 | 563 | 456 | 84 | 1 |
module MediaFileSpec
(spec)
where
import Test.Hspec
import Data.ByteString.IsoBaseFileFormat.Box
import Data.ByteString.IsoBaseFileFormat.MediaFile
import Data.ByteString.IsoBaseFileFormat.ReExports
import Data.ByteString.Lazy (unpack)
spec :: Spec
spec =
describe "mediaBuilder" $
do describe "Empty BoxLayout... | sheyll/isobmff-builder | spec/MediaFileSpec.hs | bsd-3-clause | 2,012 | 0 | 17 | 465 | 490 | 252 | 238 | -1 | -1 |
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE FlexibleContexts #-}
module Matrix.Traversable
(
matrixTraverse
) where
import Numeric.LinearAlgebra.HMatrix hiding (corr)
import Data.Traversable
import Util.Tuples
-- Matrix cannot be an instance of Functor, so it cannot be an instance of traversable
-- instead,... | eklinkhammer/neural-algorithms | src/Matrix/Traversable.hs | bsd-3-clause | 543 | 0 | 10 | 96 | 139 | 78 | 61 | 10 | 1 |
module Glazier.React.Obj
( -- | constructor not exported
-- Ref
-- , strongRef
-- , _strongRef
-- , weakRef
-- , _weakRef
-- -- | constructor not exported
-- , PlanRef
-- , ModelVar
-- | constructor not exported
Obj
-- , objPlan
-- , modelVar
-- , _modelV... | louispan/glazier-react | src/Glazier/React/Obj.hs | bsd-3-clause | 503 | 0 | 4 | 173 | 47 | 37 | 10 | 8 | 0 |
{-# LANGUAGE ImplicitParams #-}
module Tct.Its.Strategies
(
itsDeclarations
, runtime
, runtime'
, runtimeDeclaration
, module Tct.Its.Processors
) where
import Tct.Core
import qualified Tct.Core.Data as T
import Tct.Its.Data.Selector
import Tct.Its.Data.Problem
impor... | ComputationWithBoundedResources/tct-its | src/Tct/Its/Strategies.hs | bsd-3-clause | 3,551 | 0 | 18 | 674 | 855 | 452 | 403 | -1 | -1 |
module Saves
( saveName
, saveGame
, loadGame
) where
import Text.Read
import Game
saveName :: FilePath
saveName = "7drl2017.sav"
saveGame :: FilePath -> GameState -> IO ()
saveGame fp gs = writeFile fp (show gs)
loadGame :: FilePath -> IO (Maybe GameState)
loadGame fp = readMaybe <$> readFile fp
| dagit/7drl2017 | src/Saves.hs | bsd-3-clause | 303 | 0 | 8 | 55 | 105 | 56 | 49 | 12 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module :
-- Copyright : (c) 2012 Boyun Tang
-- License : BSD-style
-- Maintainer : tangboyun@hotmail.com
-- Stability : experimental
-- Portability : ghc
--
--
--
----------------------------------... | tangboyun/bio-seq-embl | src/Bio/Seq/EMBL.hs | bsd-3-clause | 2,551 | 0 | 17 | 655 | 525 | 305 | 220 | 50 | 7 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE F... | ekmett/categories | src/Math/Multicategory.hs | bsd-3-clause | 5,304 | 0 | 16 | 1,272 | 2,321 | 1,215 | 1,106 | 121 | 1 |
module Main where
import Control.Applicative
import Control.Monad
import Data.Attoparsec.Text.Lazy
import Data.Counter (Counter)
import Data.Csv (ToRecord, Record)
import Data.Monoid
import Data.Text (Text)
import Data.Vector (Vector)
import System.Environment (getArgs)
import System.Exit (exitFailure)
import Text.Rea... | intolerable/project-utilities | parse-output/Main.hs | bsd-3-clause | 4,082 | 0 | 12 | 848 | 1,543 | 807 | 736 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.Array.Base
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- Stability : experimental
-- Portab... | OS2World/DEV-UTIL-HUGS | libraries/Data/Array/Base.hs | bsd-3-clause | 44,964 | 30 | 18 | 10,907 | 11,180 | 5,842 | 5,338 | -1 | -1 |
{-# LANGUAGE NPlusKPatterns, TypeOperators #-}
module Chap03 where
import Prelude hiding (foldr, sum, product, length, round, reverse)
import GHC.Int
-- | Ex 3.1
--
-- FX = 1 + N * X
--
-- <[zero, plus] . Foutl, [zero, succ . outr] . Foutr> = [zeross, pluss] を示す.
--
foldr (c, f) = u
where u [] = c
u (x:xs) ... | cutsea110/aop | src/Chap03.hs | bsd-3-clause | 58,201 | 1 | 14 | 18,894 | 5,946 | 3,902 | 2,044 | 223 | 2 |
-- | This module provides fast, validated encoding and decoding functions
-- between 'ByteString's and 'String's. It does not exactly match the
-- output of the Codec.Binary.UTF8.String output for invalid encodings
-- as the number of replacement characters is sometimes longer.
module Data.ByteString.UTF8
( B.B... | abuiles/turbinado-blog | tmp/dependencies/utf8-string-0.3.3/Data/ByteString/UTF8.hs | bsd-3-clause | 7,253 | 0 | 20 | 2,111 | 2,098 | 1,103 | 995 | 124 | 8 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ViewPatterns #-}
-- | Main stack tool entry point.
module Main where
import Control.Exception
import Control.Mon... | cocreature/stack | src/main/Main.hs | bsd-3-clause | 36,685 | 0 | 30 | 13,998 | 7,161 | 3,624 | 3,537 | 814 | 9 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Ivory.Tower.AST.Monitor where
#if MIN_VERSION_mainland_pretty(0,6,0)
import Text.PrettyPrint.Mainland.Class
#endif
import Text.PrettyPrint.Mainland
import Ivory.Tower.Types.Unique
import Ivory.Tower.AST.Handler
... | GaloisInc/tower | tower/src/Ivory/Tower/AST/Monitor.hs | bsd-3-clause | 957 | 0 | 12 | 164 | 244 | 138 | 106 | 25 | 1 |
-- (c) The University of Glasgow, 1992-2006
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-omit-interface-pragmas #-}
-- Workaround for Trac ... | green-haskell/ghc | compiler/basicTypes/SrcLoc.hs | bsd-3-clause | 23,216 | 0 | 15 | 6,462 | 4,171 | 2,227 | 1,944 | 325 | 3 |
module Network.API.Codeship.Types where
newtype CodeshipKey = CodeshipKey {
mkApiKey :: String
} deriving Show
newtype Endpoint = Endpoint {
mkEndpoint :: String
} deriving Show
newtype Resource = Resource {
mkResource :: String
} deriving Show
| filib/codeship | src/Network/API/Codeship/Types.hs | mit | 254 | 0 | 6 | 45 | 56 | 39 | 17 | 10 | 0 |
-- | encoding for the "1:n" picture hanging problem
-- Section 3 of http://arxiv.org/abs/1203.3602
module CO4.Example.HangStandalone where
import CO4.Prelude
import Data.List (inits,tails)
type Pin = Nat
data Dir = L | R deriving (Show, Eq)
data Turn = Turn Dir Pin deriving (Show, Eq)
type Hang = [ Turn ]
constrain... | apunktbau/co4 | test/CO4/Example/HangStandalone.hs | gpl-3.0 | 1,434 | 0 | 21 | 372 | 573 | 298 | 275 | 32 | 4 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ForeignFunctionInterface #-}
module Foreign.CUDA.Cublas.FFI where
import Foreign.CUDA.Cublas.Types
import Foreign.CUDA.Cublas.TH
import Foreign.C.Types
$(doIO $ makeFFIDecs "cublas" cublasFile)
$(doIO $ makeAllFuncs "cublas" cublasFile)
| kathawala/symdiff | cublas/Foreign/CUDA/Cublas/FFI.hs | gpl-3.0 | 287 | 0 | 8 | 31 | 62 | 36 | 26 | 8 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | olorin/amazonka | amazonka-swf/gen/Network/AWS/SWF/DeprecateDomain.hs | mpl-2.0 | 4,436 | 0 | 12 | 918 | 423 | 265 | 158 | 57 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-glacier/gen/Network/AWS/Glacier/RemoveTagsFromVault.hs | mpl-2.0 | 4,562 | 0 | 12 | 870 | 558 | 336 | 222 | 72 | 1 |
{-
Copyright 2012 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in ... | kustomzone/plush | src-main/Main.hs | apache-2.0 | 1,133 | 0 | 6 | 196 | 38 | 26 | 12 | 4 | 1 |
{-# LANGUAGE RecordWildCards #-}
-- |
-- Module : Criterion
-- Copyright : (c) 2009-2014 Bryan O'Sullivan
--
-- License : BSD-style
-- Maintainer : bos@serpentine.com
-- Stability : experimental
-- Portability : GHC
--
-- Core benchmarking code.
module Criterion
(
-- * Benchmarkable code
Be... | rrnewton/criterion | Criterion.hs | bsd-2-clause | 1,659 | 0 | 11 | 342 | 291 | 165 | 126 | 36 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.