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 : Idris.Elab.Data
Description : Code to elaborate data structures.
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE CPP, PatternGuards #-}
module Idris.Elab.Data(elabData) where
import Idris.AbsSyntax
import Idris.ASTUtils
import Idris.Core.Evaluate
import Idris.Core.TT
import Idr... | kojiromike/Idris-dev | src/Idris/Elab/Data.hs | bsd-3-clause | 13,166 | 0 | 21 | 4,660 | 4,072 | 2,022 | 2,050 | 223 | 20 |
{-# LINE 1 "Database/MySQL/Base/Types.hsc" #-}
{-# LANGUAGE DeriveDataTypeable, EmptyDataDecls, ForeignFunctionInterface #-}
{-# LINE 2 "Database/MySQL/Base/Types.hsc" #-}
-- |
-- Module: Database.MySQL.Base.C
-- Copyright: (c) 2011 MailRank, Inc.
-- License: BSD3
-- Maintainer: Bryan O'Sullivan <bos@serpe... | lhuang7/mysql | dist/dist-sandbox-bd9d9ce/build/Database/MySQL/Base/Types.hs | bsd-3-clause | 12,188 | 56 | 13 | 3,229 | 2,310 | 1,403 | 907 | -1 | -1 |
{-# LANGUAGE CPP, NondecreasingIndentation #-}
{-# OPTIONS -fno-warn-incomplete-patterns -optc-DNON_POSIX_SOURCE #-}
-----------------------------------------------------------------------------
--
-- GHC Driver program
--
-- (c) The University of Glasgow 2005
--
-------------------------------------------------------... | frantisekfarka/ghc-dsi | ghc/Main.hs | bsd-3-clause | 33,164 | 0 | 27 | 9,300 | 6,810 | 3,512 | 3,298 | 522 | 14 |
{-@ LIQUID "--totality" @-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__
-- LIQUID {- LANGUAGE DeriveDataTypeable, StandaloneDeriving -}
#endif
#if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703
{-# LANGUAGE Trustworthy #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Mo... | ssaavedra/liquidhaskell | benchmarks/esop2013-submission/Base.hs | bsd-3-clause | 129,187 | 0 | 21 | 34,739 | 22,181 | 11,801 | 10,380 | -1 | -1 |
module Qualifier where
{-Rename 'sumSquares' to 'sum' will fail. The user
need to qualify the use of 'sum' first. Another
implemenation option is to let the refactorer qualify
the use of 'sum' automatically, but the user might overlook
notice this change.
-}
sumSquares (x:xs) = sq x + sumSquares xs
where ... | kmate/HaRe | test/testdata/Renaming/Qualifier_TokOut.hs | bsd-3-clause | 411 | 0 | 7 | 97 | 84 | 44 | 40 | 6 | 1 |
{-# LANGUAGE TemplateHaskell #-}
module Lib where
import TH
val = $(splice)
| tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/tests/PackageTests/TemplateHaskell/vanilla/Lib.hs | bsd-3-clause | 78 | 0 | 6 | 14 | 17 | 11 | 6 | 4 | 1 |
-- Load in ghci with: stack ghci --package QuickCheck
module Reverse.Test where
import Reverse
import Test.QuickCheck
rvrs' :: String -> String
rvrs' s = unwords (reverse $ words cleanS)
where cleanS = map replaceWithSpace s
prop_bookReverse s = (rvrs' s) == (rvrs s)
test = quickCheck prop_bookReverse
| JeremyLWright/haskellbook | src-test/Reverse.Test.hs | isc | 310 | 0 | 8 | 54 | 89 | 47 | 42 | 8 | 1 |
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Hadoop.Protos.ClientDatanodeProtocolProtos.StartReconfigurationRequestProto (StartReconfigurationRequestProto(..)) where
import Prelude ((+), (/))
import qualified P... | alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/ClientDatanodeProtocolProtos/StartReconfigurationRequestProto.hs | mit | 3,114 | 1 | 16 | 542 | 554 | 291 | 263 | 53 | 0 |
{-# LANGUAGE PackageImports #-}
import "Chupacabra" Application (getApplicationDev)
import Network.Wai.Handler.Warp
(runSettings, defaultSettings, setPort)
import Control.Concurrent (forkIO)
import System.Directory (doesFileExist, removeFile)
import System.Exit (exitSuccess)
import Control.Concurrent (threadDelay)
... | athanclark/Chupacabra | devel.hs | mit | 681 | 0 | 10 | 104 | 186 | 100 | 86 | 21 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE CPP #-}
module Shapes.Linear.Template where
import Test.QuickCheck.Arbitrary
import Control.Monad
import Language.Haskell.TH
-- TODO: Use a wrapper type to hold multiple sizes of vector?
data ValueInfo = Value... | ublubu/shapes | shapes-math/src/Shapes/Linear/Template.hs | mit | 8,172 | 0 | 15 | 2,157 | 2,867 | 1,490 | 1,377 | 178 | 2 |
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Hadoop.Protos.ClientDatanodeProtocolProtos.ShutdownDatanodeResponseProto (ShutdownDatanodeResponseProto(..)) where
import Prelude ((+), (/))
import qualified Prelude... | alexbiehl/hoop | hadoop-protos/src/Hadoop/Protos/ClientDatanodeProtocolProtos/ShutdownDatanodeResponseProto.hs | mit | 3,045 | 1 | 16 | 539 | 554 | 291 | 263 | 53 | 0 |
import Data.Char (digitToInt)
solve :: Int
solve = sum $ map digitToInt $ show $ (2 :: Integer)^1000
main = putStrLn $ show solve
| pshendry/project-euler-solutions | 0016/solution.hs | mit | 132 | 0 | 9 | 26 | 58 | 31 | 27 | 4 | 1 |
{-# LANGUAGE RecordWildCards, ScopedTypeVariables #-}
module Main where
import Data.List
import Data.Monoid
import Text.Printf
import Options.Applicative
import Data.List.Split (splitOn)
import Control.Applicative
import Data.Char (isDigit, isSpace)
import Control.Monad (when)
import System.Process (readProcess)
impo... | danchoi/table | Main.hs | mit | 6,346 | 0 | 21 | 1,632 | 1,929 | 992 | 937 | 132 | 4 |
{-# LANGUAGE NamedFieldPuns #-}
module Tracks.Train where
import Tracks.Network
import Tracks.Service
import Tracks.Signals
import Control.Monad.STM
import Data.Maybe (fromMaybe)
data Train = Train { trainName :: String
, block :: Block
, service :: [Station]
... | derkyjadex/tracks | Tracks/Train.hs | mit | 2,367 | 0 | 15 | 909 | 681 | 345 | 336 | 55 | 3 |
module GHCJS.DOM.TouchList (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/TouchList.hs | mit | 39 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
main :: IO ()
main = do
a <- fmap read getLine
s <- getLine
putStrLn $ f s a
main
f :: String -> Int -> String
f [] x | x > 5 = "no string, big int"
f [] x | x < -5 = "no string, small int"
f [c] _ = "single char"
f _ _ = "other"
| nushio3/formura | attic/test-patternmatch.hs | mit | 239 | 0 | 9 | 72 | 132 | 62 | 70 | 11 | 1 |
module Expression.Tokens where
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Language
import qualified Text.ParserCombinators.Parsec.Token as P
me = P.makeTokenParser meDef
lexeme = P.lexeme me
parens = P.parens me
braces = P.braces me
bracket... | marcellussiegburg/autotool | collection/src/Expression/Tokens.hs | gpl-2.0 | 1,085 | 0 | 8 | 382 | 261 | 140 | 121 | 28 | 1 |
module GRPTests
( test
) where
import GRPSeed
import GRPFitness
import System.Random
import GRPCommon
import PartitioningProblem
import GRPMath
--There should really be some unit-tests or so here.
--Currently, all this file does is monitor the means and variances of the fitness values of various act functions.
--This... | vektordev/GP | src/GRPTests.hs | gpl-2.0 | 1,959 | 0 | 16 | 430 | 852 | 454 | 398 | 35 | 4 |
{-# LANGUAGE FlexibleInstances, UndecidableInstances, OverloadedStrings, CPP #-}
module Gateway.Help (
Help (..),
Source (..),
drift
) where
import Autolib.Output
#if ( __GLASGOW_HASKELL__ >= 710 )
-- must be created with: autotool-package-translator > ./src/Package_Translator.hs
import Package_Translat... | marcellussiegburg/autotool | interface/src/Gateway/Help.hs | gpl-2.0 | 3,053 | 8 | 18 | 834 | 908 | 463 | 445 | 73 | 10 |
module AST(AST(..), printCode) where
import RegFile
data AST =
Symbol Char
| Definition
| Index
| Lookup
| Duplicate
| Execute
| Self
| Parents
| Quine
| Conditional
| Swap
| Register RegisterIndex
| Code [AST]
| LString String
| LNumber Integer
| NewF... | kavigupta/N-programming-language | src/AST.hs | gpl-3.0 | 402 | 0 | 7 | 134 | 111 | 69 | 42 | 22 | 1 |
{-# LANGUAGE ImplicitParams #-}
------------------------------------------------------------------------------------------------
-- |
-- Module : Pearl.GaDtTLHT.Internal.Hom
-- Description : Homs
-- Copyright : (c) Drew Day 2012
-- (c) Shin-Cheng Mu 2011
-- ... | technogeeky/centered | src/Pearl/GaDtTLHT/Internal/Hom.hs | gpl-3.0 | 3,825 | 0 | 9 | 1,695 | 889 | 523 | 366 | 60 | 1 |
module HEP.Automation.MadGraph.Dataset.Set20110712set5 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.C1V
import HEP.Automation.MadGr... | wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110716set2.hs | gpl-3.0 | 2,640 | 0 | 16 | 902 | 536 | 336 | 200 | 50 | 1 |
-----------------------------------------------------------------------------
--
-- Module : Genimplicit_types
-- Copyright : (c) hokum
-- License : GPL3
--
-- Maintainer :
-- Stability : experimental
-- Portability :
--
-- |
--
-------------------------------------------------------------------------... | Collocalini/GenImplicit | genimplicit/src/Genimplicit_types.hs | gpl-3.0 | 1,690 | 0 | 11 | 594 | 279 | 176 | 103 | 45 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-chat/gen/Network/Google/Resource/Chat/Spaces/Get.hs | mpl-2.0 | 4,029 | 0 | 15 | 984 | 694 | 405 | 289 | 97 | 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.Drive.Types... | rueshyna/gogol | gogol-drive/gen/Network/Google/Drive/Types/Product.hs | mpl-2.0 | 100,969 | 0 | 57 | 27,144 | 20,765 | 11,941 | 8,824 | 2,233 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-bigquerydatatransfer/gen/Network/Google/Resource/BigQueryDataTransfer/Projects/Locations/TransferConfigs/Delete.hs | mpl-2.0 | 5,634 | 0 | 15 | 1,144 | 703 | 413 | 290 | 108 | 1 |
module Tables.A274079Spec (main, spec) where
import Test.Hspec
import Tables.A274079 (a274079)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A274079" $
it "correctly computes the first 20 elements" $
take 20 (map a274079 [1..]) `shouldBe` expectedValue where
expectedValue = [2,4,5,4,7,8,7,... | peterokagey/haskellOEIS | test/Tables/A274079Spec.hs | apache-2.0 | 357 | 0 | 10 | 59 | 160 | 95 | 65 | 10 | 1 |
-- http://www.codewars.com/kata/53d16bd82578b1fb5b00128c
module Codewars.Kata.Grade where
grader :: Double -> Char
grader n = snd . head . filter (\(f, _) -> f n) $ grades where
grades =
[ ((>= 1.0), 'F')
, ((>= 0.9), 'A')
, ((>= 0.8), 'B')
, ((>= 0.7), 'C')
, ((>= 0.6), 'D')
, (const True, '... | Bodigrim/katas | src/haskell/8-Grader.hs | bsd-2-clause | 329 | 0 | 10 | 83 | 141 | 88 | 53 | 10 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TemplateHaskell #-}
-- | 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. T... | tanakh/yesod-bbs | Settings.hs | bsd-2-clause | 5,463 | 0 | 11 | 944 | 556 | 340 | 216 | 55 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : Lang.Cortho.Parser
Description : Cortho parser
Copyright : (c) Benjamin F Jones, 2016
License : BSD-3
Maintainer : benjaminfjones@gmail.com
Stability : experimental
Portability : POSIX
This module implements the parser for Cortho using parsec ("Text.Parsec... | benjaminfjones/cortho | src/Lang/Cortho/Parser.hs | bsd-2-clause | 9,117 | 0 | 14 | 2,542 | 2,107 | 1,081 | 1,026 | 219 | 4 |
-----------------------------------------------------------------------------
-- |
-- Module : Haddock.Backends.Html.Names
-- Copyright : (c) Simon Marlow 2003-2006,
-- David Waern 2006-2009,
-- Mark Lentczner 2010
-- License : BSD-like
--
-- Maintainer : haddo... | nominolo/haddock2 | src/Haddock/Backends/Xhtml/Names.hs | bsd-2-clause | 2,518 | 0 | 11 | 546 | 613 | 324 | 289 | 47 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import qualified Bench.Zodiac.TSRP.MAC
import qualified Bench.Zodiac.TSRP.Symmetric
import Criterion.Main
import Criterion.Types
im... | ambiata/zodiac | zodiac-tsrp/bench/bench.hs | bsd-3-clause | 775 | 0 | 9 | 186 | 142 | 88 | 54 | 21 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE ViewPatterns #-}
import qualified Data.ByteString.Char8 as C
import System.IO
import System.Environment
dict = [ ("million", 10^6)
, ("thousand", 10^3)
, ("hundred", 10^2)
, ("ninety", 90)
, ("eighty", 80... | wangbj/excises | string2Number.hs | bsd-3-clause | 1,841 | 0 | 15 | 624 | 828 | 469 | 359 | 60 | 3 |
{-# OPTIONS -Wall #-}
module Lambda where
-- compiled program
data Term val
= TermVar Int
| TermLam (Term val)
| TermApp (Term val) (Term val)
| TermLit val
| TermPrm (val -> val -> val) (Term val) (Term val)
isClosed :: Term val -> Int -> Bool
isClosed (TermVar idx) lev = idx < lev
isClosed (TermLam sub) lev ... | mmaroti/tensor.hs | src/Lambda.hs | bsd-3-clause | 1,167 | 20 | 12 | 259 | 543 | 272 | 271 | 38 | 4 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
... | mjhopkins/hipchat | src/HipChat/Auth/Types.hs | bsd-3-clause | 9,956 | 0 | 20 | 2,532 | 1,660 | 934 | 726 | 172 | 1 |
module ImplicitRefsCont.Parser
( expression
, program
, parseProgram
) where
import Control.Monad (void)
import Data.Maybe (fromMaybe)
import ImplicitRefsCont.Data
import Text.Megaparsec hiding (ParseError)
import Text.Megaparsec.Expr
import... | li-zhirui/EoplLangs | src/ImplicitRefsCont/Parser.hs | bsd-3-clause | 6,396 | 0 | 13 | 1,534 | 1,721 | 899 | 822 | 172 | 2 |
module FormulaTest where
import Test.QuickCheck
import Formula
-- QuickCheck Stuff
instance Arbitrary Fmla where
arbitrary = scale (\x -> if x < 4 then x else 4) $ sized fmlaGen'
fmlaGen :: Gen (Fmla)
fmlaGen = fmlaGen' 4
fmlaGen' :: Int -> Gen (Fmla)
fmlaGen' 0 = propGen
fmlaGen' n = oneof $ fmlaGenerators (n ... | jpotecki/LogicTableauChecker | test/FormulaTest.hs | bsd-3-clause | 843 | 0 | 11 | 180 | 361 | 188 | 173 | 22 | 1 |
module Phenotype
( Phenotype (Phenotype)
, phenotypeToVector
, randomPhenotypeFraction
, randomPhenotypeChange
, randomPhenotypeChangeWithOneNonzero
, zeroPhenotype
, fitness) where
import Phenotype.Internal | satai/FrozenBeagle | Simulation/Lib/src/Phenotype.hs | bsd-3-clause | 236 | 0 | 5 | 48 | 36 | 24 | 12 | 11 | 0 |
module CC.Object where
import CC.Language
--
-- * Some Simple Object Languages
--
-- ** Empty/unit values
data None e = None
deriving Eq
instance Obj None where
mapCC _ _ = None
foldCC _ b = const b
showObj _ = "_"
-- ** Atomic values
data One a e = One a
deriving Eq
instance Show a => Obj (One... | walkie/CC-Minimal | src/CC/Object.hs | bsd-3-clause | 1,676 | 0 | 9 | 548 | 832 | 427 | 405 | 57 | 1 |
module Main where
import Control.Concurrent
import Control.Concurrent.MVar
import Control.Concurrent.STM.TChan (tryPeekTChan)
import Control.Exception
import Control.Monad
import Control.Monad.Fix (fix)
import Control.Monad.STM (atomically)
import Data.Maybe
import GHC.Int (Int64)
import Network.Socket hiding (shutdow... | benekastah/ebitor | app/Main.hs | bsd-3-clause | 5,399 | 0 | 15 | 1,405 | 1,705 | 847 | 858 | 147 | 6 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE PackageImports #-}
-- |
-- Module : Crypto.Hash.Internal
-- License : BSD-style
-- Maintainer : Vincent Hanquez <vincent@snarc.org>
-- Stability : experimental
-- Portability : unknown
module Crypto.Hash.Internal
( unsafeDoIO
, digestToByteString
, digestToByte... | vincenthz/hs-cryptohash | Crypto/Hash/Internal.hs | bsd-3-clause | 1,072 | 0 | 8 | 180 | 138 | 84 | 54 | 16 | 1 |
-- | PowerPC branch analysis.
module Language.PowerPC.Branching
( branching
) where
import Control.Monad
import Data.Bits
import Data.List
import Data.Word
import System.IO
import Language.PowerPC.Opcode
branching :: [Word32] -> Word64 -> [Word64] -> IO ()
branching program base starts = do
next :: (Word64, Wor... | tomahawkins/powerpc | Language/PowerPC/Branching.hs | bsd-3-clause | 1,084 | 1 | 14 | 256 | 507 | 280 | 227 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Configuration.OSC where
import Lens.Simple ( (^.)
, makeLenses
)
import Data.Yaml ( ... | rumblesan/improviz | src/Configuration/OSC.hs | bsd-3-clause | 1,046 | 0 | 11 | 478 | 179 | 106 | 73 | 25 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Client.CLFX where
-- Client Graphics Effects
import Control.Lens ((.=), ix, use, (^.), preuse, zoom, (&), (.~), (+~), (-~), (%=))
import Control.Monad (unless, when, liftM)
import Data.Bits ((.&.), complement)
i... | ksaveljev/hake-2 | src/Client/CLFX.hs | bsd-3-clause | 86,658 | 0 | 29 | 36,032 | 23,631 | 11,877 | 11,754 | -1 | -1 |
module Data.Povray.Colour where
import Data.Povray.Base
import Data.Povray.Types
data Colour = RGB Vect
| RGBF Vect4
| RGBT Vect4
| RGBFT Vect5
-- TODO : better polymorphism?
cmul :: Double -> Colour -> Colour
cmul x (RGB v) = RGB (fmap (*x) v)
cmul x (RGBF v) = RGBF (fmap (*x... | lesguillemets/hspov_proto | src/Data/Povray/Colour.hs | bsd-3-clause | 714 | 0 | 8 | 190 | 284 | 154 | 130 | 17 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
{-# LANG... | schernichkin/frames-accelerate | src/Frames/Accelerate/Rec.hs | bsd-3-clause | 3,987 | 0 | 15 | 1,229 | 1,379 | 734 | 645 | 99 | 1 |
module Data.ByteString.SuperBuffer.Pure
( SuperBuffer, withBuffer, appendBuffer, appendBufferT, size )
where
import Control.Concurrent.MVar
import Control.Exception
import Data.Bits
import Data.IORef
import Data.Word
import Foreign.Marshal.Alloc
import Foreign.Marshal.Utils
import Foreign.Ptr
import qualified Data... | agrafix/superbuffer | src/Data/ByteString/SuperBuffer/Pure.hs | bsd-3-clause | 3,910 | 0 | 18 | 1,084 | 842 | 426 | 416 | 76 | 2 |
{-# LANGUAGE MultiWayIf #-}
module Lang.LF.Internal.Print where
import Control.Monad.Identity
import qualified Data.Set as Set
import qualified Data.Map.Strict as Map
import Text.PrettyPrint.ANSI.Leijen hiding ((<$>))
import Lang.LF.Internal.Model
import Lang.LF.Internal.Weak
displayLF :: (LFMode... | robdockins/canonical-lf | src/Lang/LF/Internal/Print.hs | bsd-3-clause | 9,013 | 0 | 19 | 3,363 | 3,599 | 1,726 | 1,873 | -1 | -1 |
{-# LANGUAGE CPP #-}
-- | Utility methods to automatically generate and keep track of a mapping
-- between node labels and 'Node's.
module Data.Graph.Inductive.NodeMap(
-- * Functional Construction
NodeMap,
-- ** Map Construction
new, fromGraph, mkNode, mkNode_, mkNodes, mkNodes_, mkEdge, mkEdges,
... | antalsz/hs-to-coq | examples/graph/graph/Data/Graph/Inductive/NodeMap.hs | mit | 8,417 | 0 | 15 | 2,308 | 3,437 | 1,818 | 1,619 | 150 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
module Main where
import Control.Applicative ((<$>), (<*>))
import Control.Monad
import Shelly hiding (FilePath)
import Data.Char
import Data.List (nub)
import Data.Text (Text)
import Data.Monoid
import... | ian-ross/c2hs-macos-test | c2hs-0.26.1/tests/regression-suite.hs | mit | 7,056 | 0 | 43 | 2,548 | 2,271 | 1,138 | 1,133 | 177 | 6 |
-- -*- mode: haskell -*-
{-# LANGUAGE TemplateHaskell #-}
-- $Id$
module Graph.Bi.Config where
import Autolib.ToDoc
import Autolib.Reader
import Data.Typeable
data Config = Config
{ nodes :: Int -- ^ number of nodes
, edges :: Int -- ^ number of edges
, teil :: Int -- ^ größe des beweises im verh... | florianpilz/autotool | src/Graph/Bi/Config.hs | gpl-2.0 | 507 | 6 | 9 | 134 | 121 | 75 | 46 | 15 | 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-redshift/gen/Network/AWS/Redshift/DescribeClusters.hs | mpl-2.0 | 9,145 | 0 | 15 | 1,919 | 1,148 | 688 | 460 | 121 | 1 |
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Main
-- Copyright : (c) 2013-2015 Brendan Hay
-- License : Mozilla Public License, v. 2.0.
-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability : auto-generated
-- Portability : non-portable (GHC extensions)
--
module Main (main)... | fmapfmapfmap/amazonka | amazonka-cognito-sync/test/Main.hs | mpl-2.0 | 546 | 0 | 8 | 103 | 76 | 47 | 29 | 9 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : HplAssets.Cloud.PrettyPrinter.DeploymentFile
-- Copyright : (c) authors and contributors 2015
-- License : LGPL
--
-- Stability : provisional
-- Portability : portable
--
-- A bash script pretty printer for ... | alessandroleite/hephaestus-pl | src/meta-hephaestus/HplAssets/Cloud/PrettyPrinter/DeploymentFile.hs | lgpl-3.0 | 1,778 | 0 | 16 | 358 | 383 | 197 | 186 | 34 | 1 |
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-}
-----------------------------------------------------------------------------
-- |
-- Module : Cloud.Parsers.Yaml
-- Copyright : (c) authors and contributors, 2015
-- License : LGPL
--
-- Stability : provisional
-- Portability : portable
--
-- A YAML p... | alessandroleite/hephaestus-pl | src/meta-hephaestus/HplAssets/Cloud/Parsers/Yaml.hs | lgpl-3.0 | 2,162 | 0 | 17 | 508 | 334 | 185 | 149 | 37 | 2 |
{- |
Module : Camfort.Specification.Stencils.Parser.Types
Description : Defines the representation of stencil specifications resulting from parsing.
Copyright : (c) 2017, Dominic Orchard, Andrew Rice, Mistral Contrastin, Matthew Danish
License : Apache-2.0
Maintainer : dom.orchard@gmail.com
Stability ... | dorchard/camfort | src/Camfort/Specification/Stencils/Parser/Types.hs | apache-2.0 | 1,948 | 0 | 12 | 438 | 491 | 266 | 225 | 42 | 7 |
{-| Implementation of the LUXI loader.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the a... | onponomarev/ganeti | src/Ganeti/HTools/Backend/Luxi.hs | bsd-2-clause | 12,436 | 0 | 14 | 2,717 | 2,786 | 1,439 | 1,347 | 205 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-cloudsearch/gen/Network/AWS/CloudSearch/CreateDomain.hs | mpl-2.0 | 3,574 | 0 | 9 | 768 | 424 | 260 | 164 | 53 | 1 |
{-# LANGUAGE ViewPatterns #-}
{-# OPTIONS -fno-warn-name-shadowing #-}
-- | Freenect example with GLUT.
-- Video demo here: http://www.youtube.com/watch?v=as2syH8Y8yc
module Main
where
import Control.Concurrent
import Control.Monad
import Data.Bits
import Data.IORef
import... | chrisdone/freenect | examples/src/Glut.hs | bsd-3-clause | 2,381 | 0 | 23 | 593 | 800 | 412 | 388 | 65 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Version
-- Copyright : Isaac Jones, Simon Marlow 2003-2004
--
-- Maintainer : Isaac Jones <ijones@syntaxpolice.org>
-- Stability : alpha
-- Portability : portable
--
-- Versions for packages, base... | dcreager/cabal | tests/UnitTest/Distribution/Version.hs | bsd-3-clause | 4,361 | 6 | 9 | 954 | 577 | 340 | 237 | 58 | 1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP #-}
module BuildTyCl (
buildDataCon, mkDataConUnivTyVarBinders,
buildPatSyn,
TcMethInfo, buildClass,
distinctAbstractTyConRhs, totallyAbstractTyConRhs,
mkNewTyCon... | snoyberg/ghc | compiler/iface/BuildTyCl.hs | bsd-3-clause | 20,357 | 0 | 19 | 7,001 | 2,942 | 1,602 | 1,340 | 251 | 5 |
{-# LANGUAGE NoImplicitPrelude #-}
module Main where
import Criterion.Main
import Numeric.Units.Dimensional.Prelude
import qualified Prelude as P
main :: IO ()
main = defaultMain [
bench "RawArithmetic" $ nf rawArithmetic 1000
, bench "Arithmetic" $ nf arithmetic 1000
]
rawArithmetic :: Int -... | bjornbm/dimensional-dk | benchmarks/Main.hs | bsd-3-clause | 514 | 0 | 11 | 105 | 173 | 94 | 79 | 13 | 1 |
module Network.XmlRpc.Introspect where
import Network.XmlRpc.Internals
import Network.XmlRpc.Client
type Signature = ([Type],Type)
type Help = String
type MethodInfo = (String,[Signature],Help)
-- Primitive introspection functions
listMethods :: String -> IO [String]
listMethods url = remote url "system.listMethods... | laurencer/confluence-sync | vendor/haxr/Network/XmlRpc/Introspect.hs | bsd-3-clause | 881 | 0 | 12 | 168 | 295 | 156 | 139 | 21 | 1 |
module A (mainA) where
import B
mainA :: IO ()
mainA = do
putStrLn "Hello"
putStrLn name
| sdiehl/ghc | testsuite/tests/driver/T16511/A.hs | bsd-3-clause | 99 | 0 | 7 | 27 | 39 | 20 | 19 | 6 | 1 |
module Main where
import Common
import Text.Megaparsec
import Text.Megaparsec.Char
import Data.List
data Scramble
= RotateRight Int
| RotateLeft Int
| SwapPosition Int Int
| SwapLetter Char Char
| RotateChar Char
| ReversePositions Int Int
| MovePosition Int Int
deriving Show
parseScramble :: Parser ... | glguy/advent2016 | Day21.hs | isc | 3,169 | 0 | 39 | 1,050 | 1,158 | 583 | 575 | 76 | 9 |
module Y2017.M07.D03.Solution where
{--
It's a question of Ord.
From the Mensa Genius Quiz-a-Day Book by Dr. Abbie F. Salny, July 1 problem:
Tom is younger than Rose, but older than Will and Jack, in that order. Rose is
younger than Susie, but older than Jack. Jack is younger than Jim. Susie is
older than Rose, but ... | geophf/1HaskellADay | exercises/HAD/Y2017/M07/D03/Solution.hs | mit | 2,092 | 0 | 13 | 553 | 306 | 190 | 116 | 23 | 1 |
-- Count the Monkeys!
-- http://www.codewars.com/kata/56f69d9f9400f508fb000ba7
module Codewars.Kata.Monkeys where
monkeyCount :: Int -> [Int]
monkeyCount x = [1..x] | gafiatulin/codewars | src/8 kyu/Monkeys.hs | mit | 166 | 0 | 6 | 19 | 34 | 21 | 13 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{- |
Module : <File name or $Header$ to be replaced automatically>
Description : <optional short text displayed on contents page>
Copyright : (c) <Authors or Affiliations>
License : <license>
Maintainer : <email>
Stability : unstable | experimental | provisional |... | slogsdon/url | src/Client/CSS.hs | mit | 750 | 0 | 11 | 160 | 99 | 53 | 46 | 9 | 1 |
module DataStructuresUtil where
type Line = String
type Column = [Line]
type Document = [Column]
| axelGschaider/ttofu | src/DataStructuresUtil.hs | mit | 100 | 0 | 5 | 18 | 28 | 19 | 9 | 4 | 0 |
{-# Language BangPatterns #-}
{-# Language DeriveGeneric #-}
{-# Language GeneralizedNewtypeDeriving #-}
{-# Language TupleSections #-}
module Unison.Runtime.Multiplex where
import Control.Applicative
import Control.Concurrent.Async (Async)
import Control.Concurrent.MVar
import Control.Concurrent.STM (atomically, STM... | nightscape/platform | node/src/Unison/Runtime/Multiplex.hs | mit | 19,148 | 0 | 25 | 4,221 | 6,956 | 3,439 | 3,517 | 443 | 7 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.WebGLShaderPrecisionFormat
(js_getRangeMin, getRangeMin, js_getRangeMax, getRangeMax,
js_getPrecision, getPrecision, WebGLShaderPrecisionFormat,
castToWebGLShaderPrecisionFormat, gTypeWebGLS... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/WebGLShaderPrecisionFormat.hs | mit | 2,264 | 18 | 8 | 247 | 492 | 300 | 192 | 31 | 1 |
-- | Custom wrapper around @hslogger.Priority@.
module System.Wlog.Severity
( Severity (..)
, Severities
, LogRecord(..)
-- * Severity utilities
, allSeverities
, severityPlus
, debugPlus, infoPlus
, noticePlus
, warningPlus, errorPlus
, excludeEr... | serokell/log-warper | src/System/Wlog/Severity.hs | mit | 2,055 | 0 | 7 | 447 | 348 | 200 | 148 | 44 | 1 |
{-# LANGUAGE MonadComprehensions #-}
{-# LANGUAGE RebindableSyntax #-}
module Set3 where
import MCPrelude
-- 1. Generating combinations
allPairs :: [a] -> [b] -> [(a,b)]
allPairs [] _ = []
allPairs (x:xs) ys = map (\y -> (x, y)) ys ++ allPairs xs ys
-- 2. Poker hands
data Card = Card {rank :: Int, suite :: Strin... | gafiatulin/monad-challenges | src/Set3.hs | mit | 1,354 | 0 | 9 | 322 | 724 | 391 | 333 | 30 | 1 |
module BasicTypes where
import qualified Data.Map
data Bit = B0 | B1 deriving (Show, Eq)
data Hex = H0 | H1 | H2 | H3 | H4 | H5 | H6 | H7 | H8 | H9 | HA | HB | HC | HD | HE | HF deriving (Show, Eq)
type Octet = (Bit,Bit,Bit,Bit,Bit,Bit,Bit,Bit)
toBit :: Char -> Maybe Bit
toBit = (flip Data.Map.lookup) (Data.M... | paradigmsort/ASN1_Happy_LALR1 | BasicTypes.hs | mit | 1,658 | 0 | 16 | 592 | 880 | 532 | 348 | 23 | 16 |
module CodeGen.Metadata.CoLimit where
import Data.Maybe
import Data.List
import Data.Serialize
import GHC.Generics
import Data.Tuple.HT
import Control.Monad.Trans.Either
import Utils.Utils
import CodeGen.HaskellCode
import Server.NutleyInstance
import CodeGen.Metadata.Metadata
import Data.Name
import Data.Schema
im... | jvictor0/JoSQL | CodeGen/Metadata/CoLimit.hs | mit | 2,561 | 0 | 22 | 616 | 940 | 516 | 424 | 53 | 2 |
{-# LANGUAGE
NoImplicitPrelude,
MultiParamTypeClasses,
FlexibleInstances,
FunctionalDependencies
#-}
module OctoTactics.Util.Class where
import Data.Functor (Functor, fmap)
import Data.Either (Either(..))
import Data.Function ((.), id)
class Functor' f a b where
fmap' :: (a -> b) -> f a -> f ... | Solonarv/OctoTactics | OctoTactics/Util/Class.hs | mit | 1,433 | 0 | 10 | 583 | 600 | 321 | 279 | 30 | 0 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
module Text.InflectionsSpec (spec) where
import Data.Void
import Test.Hspec
import Test.QuickCheck
import Text.Inflections
import Text.Megaparsec
import Data.Text
import qualified Data.List.NonEmpty as NE
impo... | stackbuilders/inflections-hs | test/Text/InflectionsSpec.hs | mit | 3,737 | 0 | 15 | 777 | 827 | 423 | 404 | 77 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : SPI
-- License : MIT (see the LICENSE file)
-- Maintainer : Felix Klein (klein@react.uni-saarland.de)
--
-- Serial Peripheral Interface
--
-----------------------------------------------------------------------... | reactive-systems/icedude | src/SPI.hs | mit | 3,911 | 0 | 20 | 1,178 | 1,230 | 621 | 609 | 119 | 7 |
module CFDI.Types.ProductId where
import CFDI.Chainable
import CFDI.Types.Type
import Data.Text (Text, pack, unpack)
import Text.Regex (mkRegex)
import Text.Regex.Posix (matchTest)
newtype ProductId = ProductId Text deriving (Eq, Show)
instance Chainable ProductId where
chain (ProductId i) = i
instan... | yusent/cfdis | src/CFDI/Types/ProductId.hs | mit | 593 | 0 | 9 | 112 | 177 | 94 | 83 | 15 | 0 |
{-# htermination (maxBoundTup0 :: Tup0) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data Tup0 = Tup0 ;
maxBoundTup0 :: Tup0
maxBoundTup0 = Tup0;
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/maxBound_1.hs | mit | 203 | 0 | 8 | 42 | 56 | 34 | 22 | 6 | 1 |
{-# LANGUAGE TypeFamilies, UndecidableInstances #-}
module Arithmetic where
import Boolean
( False
, True
, And
, If
)
import Ordering
( LT
, EQ
, GT
, OEq
)
-- Natural numbers
data Z -- Zero
data S n -- Successor of n (n = Z or n = S n')
type N0 = Z
type N1 = S N0
type N2 ... | ahihi/type-computation | Arithmetic.hs | cc0-1.0 | 3,012 | 0 | 13 | 950 | 1,167 | 653 | 514 | -1 | -1 |
{-# LANGUAGE UnicodeSyntax #-}
-- Copyright (C) 2008 Diego Souza <paravinicius@yahoo.com.br>
--
-- 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; either version 2 of the License, or
-- (at yo... | dgvncsz0f/boats | src/main/haskell/Battleship/UI/Window.hs | gpl-2.0 | 5,530 | 0 | 18 | 1,235 | 1,766 | 894 | 872 | 101 | 6 |
module ArithPrettyPrint (render_term) where
import Arith
import Text.PrettyPrint
pretty_term :: Term -> Doc
pretty_term Tru = text "#t"
pretty_term Fls = text "#f"
pretty_term Zero = text "#z"
pretty_term (Succ x) = pr_func_app "succ" [x]
pretty_term (Pred x) = pr_func_app "pred" [x]
pretty_term (IsZero x) = pr_func_... | robertclancy/tapl | arith/ArithPrettyPrint.hs | gpl-2.0 | 563 | 0 | 9 | 94 | 225 | 117 | 108 | 15 | 1 |
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings #-}
{-# OPTIONS_GHC -w #-}
module GTFS.Realtime.Internal.Com.Google.Transit.Realtime.Alert.Effect (Effect(..)) where
import Prelude ((+), (/), (.))
import qualified Prelude as Prelude'
import quali... | romanofski/gtfsschedule | src/GTFS/Realtime/Internal/Com/Google/Transit/Realtime/Alert/Effect.hs | gpl-3.0 | 4,426 | 0 | 11 | 740 | 1,089 | 607 | 482 | 99 | 1 |
#!/usr/bin/runghc
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
import Shelly
import Prelude hiding (FilePath)
import Data.Text.Lazy as LT
import Data.Monoid
import Prelude
--default (LT.Text)
branches = [ "novacollider/cmake-defaults",
... | timblechmann/supercollider | novacollider_updater.hs | gpl-3.0 | 2,146 | 0 | 8 | 499 | 343 | 191 | 152 | 51 | 1 |
module Note (Note, show', fromPair, isCymbal, isTom, flams, pedals) where
import Control.Arrow (first)
---------------
-- Constants --
---------------
-- Threshold value for a note to be considered as ghost.
threshold :: Int
threshold = 50
----------------
-- Structures --
----------------
data Note = Note (Inst... | Shaac/chartleston | src/note.hs | gpl-3.0 | 4,569 | 0 | 12 | 1,446 | 1,240 | 686 | 554 | 99 | 3 |
{-# LANGUAGE UnicodeSyntax #-}
module Data.Vector.Unicode.SR (
(⊳), (⊲), (⋈), (∅)
) where
import Data.Vector (Vector)
import qualified Data.Vector as Vector
(⊳) ∷ α → Vector α → Vector α
(⊳) = Vector.cons
infixl 5 ⊳
(⊲) ∷ Vector α → α → Vector α
(⊲) = Vector.snoc
infixr 5 ⊲
(⋈) ∷ Vector α → Vector... | eigengrau/haskell-unicode-symbols | src/Data/Vector/Unicode/SR.hs | gpl-3.0 | 458 | 0 | 7 | 97 | 178 | 111 | 67 | 16 | 1 |
module KRPCHS.KerbalAlarmClock
( AlarmAction(..)
, AlarmType(..)
, Alarm
, alarmWithName
, alarmWithNameStream
, alarmWithNameStreamReq
, alarmRemove
, getAlarmAction
, getAlarmActionStream
, getAlarmActionStreamReq
, getAlarmID
, getAlarmIDStream
, getAlarmIDStreamReq
, getAlarmMargin
, getAlarmMarginStream
, getAlarm... | Cahu/krpc-hs | src/KRPCHS/KerbalAlarmClock.hs | gpl-3.0 | 20,347 | 0 | 12 | 2,943 | 4,409 | 2,239 | 2,170 | 368 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-youtube/gen/Network/Google/Resource/YouTube/LiveChatBans/Insert.hs | mpl-2.0 | 3,411 | 0 | 14 | 797 | 398 | 240 | 158 | 63 | 1 |
import qualified Dao.Test.Interval
-- import qualified Dao.Test.Grammar
import Control.Monad
import System.Exit
main :: IO ()
main = (>>= (flip unless exitFailure)) $ fmap and $ sequence $
[
-- , Dao.Test.Interval.runTests
-- , Dao.Test.Grammar.runTests
Dao.Test.Grammar.runTests
]
| printedheart/Dao | tests/dao-tests.hs | agpl-3.0 | 318 | 0 | 10 | 72 | 70 | 41 | 29 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module WordProblem (answer) where
import Data.Text (pack)
import Data.List (foldl')
import Control.Applicative (pure, (<|>), (<$>), (<*>), (<*), (*>))
import Data.Attoparsec.Text
answerParser :: Parser Int
answerParser = do
n <- "What is " .*> signed decimal
ops <- many' (space *... | mscoutermarsh/exercism_coveralls | assignments/haskell/wordy/example.hs | agpl-3.0 | 759 | 0 | 12 | 176 | 279 | 155 | 124 | 20 | 1 |
module Network.Haskoin.Cereal.Tests (tests) where
import Data.Serialize
import Network.Haskoin.Test
import Network.Haskoin.Util
import Test.Framework
import Test.Framework.Providers.QuickCheck2
import Test.QuickCheck
tests :: [Test]
tests =
[ testGroup "... | xenog/haskoin | test/bitcoin/Network/Haskoin/Cereal/Tests.hs | unlicense | 3,884 | 0 | 11 | 933 | 841 | 408 | 433 | 62 | 1 |
module Main where
import Factors
import Primes
sequenceLength = 4
countDistinctFactors = 4
isMatchingNumber :: Int -> Bool
isMatchingNumber = (countDistinctFactors <=) . length . primeFactors
findFirstSequence = findFirstSequenceNumber' 0 1
findFirstSequenceNumber' :: Int -> Int -> Int
findFirstSequenceNumber' curr... | kliuchnikau/project-euler | 047/Main.hs | apache-2.0 | 606 | 0 | 8 | 78 | 154 | 81 | 73 | 14 | 1 |
module Nanocoin (
initNode
) where
import Protolude hiding (get, put)
import Control.Concurrent.Chan
import Control.Distributed.Process.Lifted (NodeId(..))
import qualified Data.Set as Set
import Data.Maybe (catMaybes)
import Config
import Logger
import qualified Key
import qualified Nanocoin.Block as B
import q... | tdietert/nanocoin | src/Nanocoin.hs | apache-2.0 | 2,166 | 0 | 17 | 457 | 474 | 261 | 213 | 54 | 4 |
{- | Implements several tests to control the validy of the program
-}
module Test.Grammar where
import Test.QuickCheck
import Test.Framework
import PGF
import PGF.Internal
import Muste.Grammar.Internal
import Test.HUnit.Text
import Test.HUnit.Base
import Data.Maybe
import qualified Data.Map as M
import Control.Monad
im... | daherb/Haskell-Muste | muste-lib/Test/Grammar.hs | artistic-2.0 | 10,978 | 0 | 17 | 2,532 | 3,458 | 1,790 | 1,668 | 229 | 1 |
-- Testing entry file, Main.hs
module Main (main) where
import SimpleJSON
main = print (JObject [("foo", JNumber 1), ("bar", JBool False)])
| ploverlake/practice_of_haskell | test/Main.hs | bsd-2-clause | 142 | 0 | 10 | 23 | 51 | 30 | 21 | 3 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Language.Haskell.Exts.Pretty
-- Copyright : (c) Niklas Broberg 2004-2009,
-- (c) The GHC Team, Noel Winstanley 1997-2000
-- License : BSD-style (see the file LICENSE.txt)
--
-- Maintainer : Nikl... | djv/VisualProf | src/Pretty.hs | bsd-2-clause | 59,244 | 0 | 23 | 19,652 | 18,973 | 9,489 | 9,484 | 1,077 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
module Main where
import System.Console.CmdArgs
import qualified Database.SqlServer.Generator as D
import Database.SqlServer.Create.Database
import Data.List.Split
data Arguments = Arguments
{
seed :: Int
, complexity :: Int
, excludeTypes :: String
, approxi... | fffej/sql-server-gen | cli/Main.hs | bsd-2-clause | 2,607 | 0 | 14 | 564 | 737 | 396 | 341 | 62 | 14 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
module Network.GGS
( GGSControl
, startGGS
, stopGGS
) where
import Control.Applicative
import Control.Concurrent
import Control.Concurrent.STM
import ... | Ornedan/dom4statusbot | src/Network/GGS.hs | bsd-3-clause | 5,666 | 0 | 20 | 1,563 | 1,523 | 758 | 765 | 119 | 3 |
{-# LANGUAGE CPP, NamedFieldPuns, NondecreasingIndentation #-}
{-# OPTIONS_GHC -fno-cse #-}
-- -fno-cse is needed for GLOBAL_VAR's to behave properly
-----------------------------------------------------------------------------
--
-- GHC Driver
--
-- (c) The University of Glasgow 2005
--
------------------------------... | siddhanathan/ghc | compiler/main/DriverPipeline.hs | bsd-3-clause | 99,249 | 0 | 31 | 33,789 | 15,985 | 8,080 | 7,905 | 1,367 | 43 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.