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
{-# 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/ScheduleRuns.hs
mpl-2.0
6,915
0
16
1,399
789
464
325
123
1
#!/usr/bin/env stack {- stack --install-ghc runghc --package amqp --package bytestring --package text -} {-# LANGUAGE OverloadedStrings #-} import Network.AMQP import Control.Monad (forM_) import qualified Data.ByteString.Lazy.Char8 as BL import Data.Monoid ((<>)) import qualified ...
rabbitmq/rabbitmq-tutorials
haskell/receiveLogsDirect.hs
apache-2.0
1,522
0
11
484
343
184
159
32
1
-- Copyright 2014 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 ...
rjwright/js-typeomatic
Main.hs
apache-2.0
6,429
8
12
991
707
387
320
53
1
-- Language extensions {{{ {-# LANGUAGE UnicodeSyntax #-} -- }}} Language extensions module Data.Quantum.Small.Operator.Qubit where -- Imports {{{ import Data.Bits (Bits()) import Data.Monoid (mappend) import Data.Word import Data.Quantum.Small.Operator -- }}} -- Types {{{ data Qubit = Qubit -- {{{ { qubitX ...
gcross/PauliQSC
Data/Quantum/Small/Operator/Qubit.hs
bsd-2-clause
1,127
0
9
212
251
145
106
26
1
{-# LANGUAGE DataKinds, EmptyDataDecls, TypeOperators, UndecidableInstances #-} module HaskHOL.Lib.IndDefs.Context ( IndDefsType , IndDefsThry , IndDefsCtxt , ctxtIndDefs ) where import HaskHOL.Core import HaskHOL.Lib.Theorems import HaskHOL.Lib.Theorems.Context import HaskHOL.Lib.IndDefs.Base --...
ecaustin/haskhol-deductive
src/HaskHOL/Lib/IndDefs/Context.hs
bsd-2-clause
1,162
1
8
207
260
150
110
-1
-1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE GADTs #-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} {-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 702 && __GLASGOW_HASKELL__ <= 708...
ekmett/semigroupoid-extras
src/Data/Profunctor/Collage.hs
bsd-2-clause
1,431
0
9
272
378
204
174
26
0
{-# LANGUAGE DataKinds, EmptyDataDecls, TypeOperators, UndecidableInstances #-} module HaskHOL.Lib.IndTypesPre.Context ( IndTypesPreType , IndTypesPreThry , IndTypesPreCtxt , ctxtIndTypesPre ) where import HaskHOL.Core import HaskHOL.Deductive hiding (newDefinition, newSpecification) import HaskHO...
ecaustin/haskhol-math
src/HaskHOL/Lib/IndTypesPre/Context.hs
bsd-2-clause
2,938
1
11
878
512
308
204
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} module WASH.Utility.Auxiliary where import Control.Exception import System.Directory import System.Environment import System.IO import System.IO.Error import System.Process (system) import WASH.Utility.FileNames import qualified WASH.Utility.Shell as Shell protectedGetEnv :: Stri...
nh2/WashNGo
WASH/Utility/Auxiliary.hs
bsd-3-clause
1,675
8
16
317
537
266
271
45
3
-- | This module exports the memory model and its instances. module Jat.PState.MemoryModel (module M) where import Jat.PState.MemoryModel.Data as M import Jat.PState.MemoryModel.Primitive as M import Jat.PState.MemoryModel.UnSharing as M {-import Jat.PState.MemoryModel.Sharing-} import Jat.PState.MemoryModel.PairShari...
ComputationWithBoundedResources/jat
src/Jat/PState/MemoryModel.hs
bsd-3-clause
329
0
4
36
51
39
12
5
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Lib ( mainEntry ) where import System.Environment import System.Exit import Text.Hamlet import Text.Blaze.Html.Renderer.String (renderHtml) import Text.Blaze.Html import Control.Monad.Reader (runReaderT) import Database (load, addMetric...
steveshogren/project-metrics
src/Lib.hs
bsd-3-clause
1,631
0
10
264
384
215
169
38
1
{-# LANGUAGE OverloadedStrings, TemplateHaskell, QuasiQuotes, RecordWildCards #-} module Myo ( module Myo.Foreign.Types , module Myo.Foreign.Hub , module Myo.Foreign.String , errorKind , errorCString , getMacAddress , setLockingPolicy , vibrate , run ) where import qualified Language.C.Inline as C ...
adinapoli/myo
src/Myo.hs
bsd-3-clause
5,174
0
23
1,565
655
357
298
68
1
{-# LANGUAGE OverloadedStrings #-} module Court.Result ( Results(..) , Result(..) , modifyGlobalResults , modifyLocalResults ) where import Control.Applicative import Data.Aeson hiding (Result) import qualified Data.ByteString.Lazy.Char8 as BSL import System.Directory import ...
thoferon/court
src/Court/Result.hs
bsd-3-clause
2,103
1
18
548
630
326
304
55
2
module Main(main) where import System.Environment import Proper.Lexer import Proper.Parser import Proper.Formula import System.IO import Proper.Utils main :: IO () main = do (fileName:rest) <- getArgs fHandle <- openFile fileName ReadMode thmString <- hGetContents fHandle let thm = processTheoremFile thmStrin...
dillonhuff/Proper
src/Main.hs
bsd-3-clause
561
0
15
108
179
88
91
20
2
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.NV -- Copyright : (c) Sven Panne 2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- -- A convenie...
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/NV.hs
bsd-3-clause
9,275
0
5
518
1,430
1,131
299
149
0
{-# LANGUAGE FlexibleInstances, CPP #-} -- | Lua pretty-printer. module Language.Lua.PrettyPrinter ( pprint , renderPretty , displayS , displayIO , LPretty ) where #if __GLASGOW_HASKELL__ >= 710 import Prelude hiding (EQ, GT, LT, (<$>)) #else import Prelude ...
osa1/language-lua
src/Language/Lua/PrettyPrinter.hs
bsd-3-clause
8,603
0
18
2,912
3,109
1,544
1,565
197
21
module LexPassUtil where import Common import Control.Applicative import Control.Arrow import Control.Monad.State import Data.Binary import qualified Data.ByteString.Char8 as BSC import Data.Data import Data.Generics import HSH import Options import System.Directory import System.FilePath import System.IO import Syste...
facebookarchive/lex-pass
src/LexPassUtil.hs
bsd-3-clause
7,571
0
18
1,651
2,352
1,270
1,082
145
6
module Main where import Control.Applicative import Control.Monad import Test.DocTest import System.Directory import System.FilePath findHs :: FilePath -> IO [FilePath] findHs dir = do fs <- map (dir </>) <$> filter (`notElem` ["..","."]) <$> getDirectoryContents dir subDirs <- filterM doesDirectoryExist ...
nushio3/binary-search
test/doctests.hs
bsd-3-clause
600
0
13
115
214
110
104
21
1
{- If we are presented with the first k terms of a sequence it is impossible to say with certainty the value of the next term, as there are infinitely many polynomial functions that can model the sequence. As an example, let us consider the sequence of cube numbers. This is defined by the generating function, un = n3...
bgwines/project-euler
src/solved/problem101.hs
bsd-3-clause
4,351
22
24
1,016
798
463
335
57
1
{-# LANGUAGE FlexibleContexts #-} import Plots import Plots.Axis import Plots.Types hiding (B) import Plots.Themes import Plots.Utils import Data.List import Diagrams.Prelude import Diagrams.Backend.Rasterific import Diagrams.Backend.CmdLine import Diagrams.Coordinates.Polar import Data.Array import Data...
bergey/plots
examples/rings.hs
bsd-3-clause
1,362
0
12
344
461
233
228
44
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleInstances #-} module MVC.Event where import Control.Arrow ((+++)) import Data.Maybe (fromJust) import Data.Typeable ----------------------------------------------------------------------------- class (Ty...
cmahon/mvc-service
library/MVC/Event.hs
bsd-3-clause
1,383
0
10
256
484
251
233
-1
-1
{-# OPTIONS -fglasgow-exts -cpp #-} -- parser produced by Happy Version 1.13 {- % % (c) The GRASP/AQUA Project, Glasgow University, 1998 % % @(#) $Docid: Jun. 6th 2003 16:54 Sigbjorn Finne $ % @(#) $Contactid: sof@galois.com $ % A grammar for IDL, DCE / MS (IDL/ODL) style. Conflicts: - 1 reduce/reduce conflict ...
HJvT/hdirect
src/Parser.hs
bsd-3-clause
246,856
0
20
46,870
68,537
35,330
33,207
-1
-1
module Main where import Control.Applicative ((*>)) import Data.Char import Data.Functor.Identity import Numeric import System.Environment import Text.Parsec import Text.Parsec.String import qualified Data.Map as Map startState :: (Integer, Map.Map String Integer) startState = (0, Map.empty) type ParserState = (In...
terjr/hassembler
hassembler.hs
bsd-3-clause
5,839
2
17
1,576
2,008
1,009
999
188
5
module CalculatorKata.Day6 (calculate) where calculate :: String -> Double calculate src = calculate' src "" where calculate' :: String -> String -> Double calculate' "" num = read num calculate' (c:src) num | c == '+' = read num + calculate' src "" ...
Alex-Diez/haskell-tdd-kata
old-katas/src/CalculatorKata/Day6.hs
bsd-3-clause
555
0
11
221
199
95
104
11
2
----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.WindowNames -- Copyright : (c) 2015 Phil Lindberg <plindbe2@gmail.com> -- License : BSD3-style (see LICENSE) -- -- Maintainer : Phil Lindberg <plindbe2@gmail.com> -- Stability : experimental ...
plindbe2/xmonad-windownames
src/XMonad/Actions/WindowNames.hs
bsd-3-clause
8,274
0
18
2,484
1,634
875
759
85
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeSynonymInstances #-} -- | Models for <http://vk.com/dev/audio.get Audio API> module VK.API.Models.Audio where import Data.Aeson import Data.Aeson.Casing import qualified Data.Text as T import...
eryx67/vk-api
src/VK/API/Models/Audio.hs
bsd-3-clause
5,973
0
12
1,638
1,162
655
507
197
0
module User where import Data.Aeson import Test.QuickCheck data User = User { name :: String , email :: String , password :: String , status :: Status } data Status = Enabled | Disabled -- Exercise 1 - Implement instance of Show for User -- clas...
whitehead1415/typeclasses-mob
app/User.hs
bsd-3-clause
723
0
8
208
69
48
21
8
0
module Main where import FJ import Reduction import Control.Applicative import System.Environment main :: IO () main = do args <- getArgs let originalFile = args !! 0 modifiedFile = args !! 1 fromClass = args !! 2 fromMethod = args !! 3 toClass = args !! 4 toMethod = a...
ademinn/RefactoringVerification
src/verifier/Main.hs
bsd-3-clause
897
0
16
277
242
121
121
24
3
module RunLength (decode, encode) where import Data.List.Split (keepDelimsR, split, whenElt, dropFinalBlank) import Data.List (group) import Data.Char (isDigit) encode :: String -> String encode = concatMap compact . group where compact l = lengthString (length l) ++ [head l] lengthString n = ...
Bugfry/exercises
exercism/haskell/run-length-encoding/src/RunLength.hs
mit
627
0
11
157
225
120
105
20
2
module PityTheBool where import Data.Int -- 1. Given the datatype -- data BigSmall = -- Big Bool -- | Small Bool -- deriving (Eq, Show) -- What is the cardinality of the datatype? -- True + False | True + False -- 2 + 2 = 4 -- 2. Given the datatype data NumberOrBool = Numba Int8 | BoolyBool Bool ...
brodyberg/Notes
ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/PityTheBoolChapter11.hs
mit
822
0
7
185
68
48
20
7
1
{- | Module : ./Common/RunParsers.hs Description : test some parsers (and printers) Copyright : (c) Christian Maeder and Uni Bremen 2002-2003 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable test some parsers (and prin...
spechub/Hets
Common/RunParsers.hs
gpl-2.0
2,973
0
23
720
993
503
490
67
5
-- | String formatting helpers, starting to get a bit out of control. module Hledger.Utils.String ( -- * misc lowercase, uppercase, underline, stripbrackets, unbracket, -- quoting quoteIfNeeded, singleQuoteIfNeeded, -- quotechars, -- whitespacechars, escapeQuotes, words', unwords', stripAnsi, -- * sing...
mstksg/hledger
hledger-lib/Hledger/Utils/String.hs
gpl-3.0
14,268
0
21
3,642
3,927
2,001
1,926
250
6
{-# 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-autoscaling/gen/Network/AWS/AutoScaling/DescribeTerminationPolicyTypes.hs
mpl-2.0
4,471
0
15
857
494
295
199
69
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-elb/gen/Network/AWS/ELB/SetLoadBalancerListenerSSLCertificate.hs
mpl-2.0
5,427
0
9
980
469
288
181
65
1
{-# LANGUAGE TupleSections, OverloadedStrings, QuasiQuotes, TemplateHaskell, TypeFamilies, RecordWildCards, DeriveGeneric ,MultiParamTypeClasses ,FlexibleInstances #-} module Model where import Prelude import Yesod import Data.Time import Data.Text (Text) import Database.Persist.Quasi import Data.Typeabl...
smurphy8/backoffice
Model.hs
bsd-3-clause
647
0
8
89
75
44
31
11
0
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} module VarEnv ( -- * Var, Id and TyVar environments (maps) VarEnv, IdEnv, TyVarEnv, CoVarEnv, TyCoVarEnv, -- ** Manipulating these environments emptyVarEnv, unitVarEnv, mkVarEnv, mkVarEnv...
snoyberg/ghc
compiler/basicTypes/VarEnv.hs
bsd-3-clause
21,678
0
14
5,660
4,755
2,630
2,125
322
2
module Main where import Control.Conditional (unlessM) import Data.Time.Clock import Prelude hiding (readFile, writeFile) import ALife.Creatur import ALife.Creatur.Wain hiding (size) import ALife.Creatur.Wain.Brain import ALife.Realtra.Wain import ALife.Realtra.Image import Control.Monad (replicateM) import Control.M...
mhwombat/creatur-realtra.OLD
test/Benchmark2.hs
bsd-3-clause
1,523
0
10
224
433
226
207
42
1
{-# OPTIONS_GHC -Wall #-} module Validate (Result, module') where import Control.Monad (foldM_, when) import qualified Data.Map as Map import qualified Data.Maybe as Maybe import qualified Data.Set as Set import qualified Data.Foldable as F import qualified Data.Traversable as T import AST.Expression.General as Expr ...
mgold/Elm
src/Validate.hs
bsd-3-clause
17,604
0
21
4,818
5,745
2,851
2,894
479
22
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-autoscaling/gen/Network/AWS/AutoScaling/SetDesiredCapacity.hs
mpl-2.0
4,246
0
9
885
469
286
183
60
1
<?xml version='1.0' encoding='ISO-8859-1' ?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "../dtd/helpset_2_0.dtd"> <helpset version="1.0"> <!-- title --> <title>jAudio Help</title> <!-- maps --> <maps> <homeID>top</homeID> <mapre...
dmcennis/jAudioGIT
extras/Sample.hs
lgpl-2.1
1,793
142
48
358
675
373
302
-1
-1
{-# LANGUAGE PatternGuards #-} module Language.Nix.Path ( Path, mkPath, path ) where import Control.Lens import Distribution.Nixpkgs.Util.PrettyPrinting ( Pretty(..), punctuate, hcat, char ) import Language.Nix.Identifier -- | Paths are non-empty lists of identifiers in Nix. newtype Path = Path { _segments :: [Ident...
spencerjanssen/cabal2nix
src/Language/Nix/Path.hs
bsd-3-clause
736
0
12
154
247
135
112
16
1
------------------------------------------------------------------------------- -- | -- Module : CCO.Tree.ATerm -- Copyright : (c) 2008 Utrecht University -- License : All rights reserved -- -- Maintainer : stefan@cs.uu.nl -- Stability : provisional -- Portability : portable -- -- A straightforward ...
UU-ComputerScience/uu-cco
uu-cco/src/CCO/Tree/ATerm.hs
bsd-3-clause
3,714
0
17
888
659
367
292
44
3
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs ...
anton-dessiatov/stack
src/Stack/PackageIndex.hs
bsd-3-clause
20,647
0
26
5,915
4,461
2,287
2,174
378
14
<?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>GraphQL Support Add-on</title> <maps> <homeID>graphql</homeID> <mapref l...
thc202/zap-extensions
addOns/graphql/src/main/javahelp/org/zaproxy/addon/graphql/resources/help_sl_SI/helpset_sl_SI.hs
apache-2.0
971
82
53
157
396
209
187
-1
-1
-- $Id: LexUtil.hs,v 1.4 2001/11/08 22:09:28 hallgren Exp $ module LexUtil (isIdent,isLower_, -- Char -> Bool isSymbol, -- Char -> Bool readInteger, -- String -> Integer readNumber, -- Integer -> String -> Integer readRational) -- String -> Rational where import HsName(isSymbol) import Char(isDig...
forste/haReFork
tools/base/parse/LexUtil.hs
bsd-3-clause
1,428
14
14
344
524
278
246
31
3
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, MagicHash #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Err -- Copyright : (c) The University of Glasgow, 1994-2002 -- License : see libraries/base/LICENSE --...
beni55/haste-compiler
libraries/ghc-7.10/base/GHC/Err.hs
bsd-3-clause
1,773
0
7
324
140
94
46
15
1
{-# LANGUAGE PartialTypeSignatures #-} module PatBind where foo :: _ Just foo = Just id
siddhanathan/ghc
testsuite/tests/partial-sigs/should_compile/PatBind.hs
bsd-3-clause
89
0
5
16
22
12
10
4
1
module Crypto.Enigma where import Crypto.Enigma.Helper type State = [Char] -- state of the enigma machine data Direction = Fwd | Bwd deriving (Show, Eq) data RotorSignalDir = SignalIn | SignalOut deriving (Show, Eq) data Conf = Conf { getPlugboard :: String , getRefl :: String , getType :: [(String, Char...
kc1212/enigma-hs
Crypto/Enigma.hs
mit
5,159
2
17
1,117
1,599
872
727
94
1
import Data.Attoparsec.Char8 import qualified Data.HashMap.Strict as M import Test.Hspec import Mockups.Elements.Element import Mockups.Parsers.Element main :: IO () main = hspec $ do describe "simple element parser" $ do it "parses image elements with attrs" $ do let exp = SimpleElement $ Img...
ostapneko/tiny-mockups
src/tests/Suite.hs
mit
618
0
21
153
186
94
92
14
1
module Wyas where import System.Environment import Wyas.Eval import Wyas.Parser import Wyas.Types (extractValue, trapError) main :: IO () main = do args <- getArgs let evaled = fmap show $ readExpr (head args) >>= eval putStrLn $ extractValue $ trapError evaled
saclark/wyas
src/Wyas.hs
mit
318
0
14
96
97
50
47
10
1
module Settings.Builders.Ar (arBuilderArgs, arCmd, chunksOfSize) where import Settings.Builders.Common arBuilderArgs :: Args arBuilderArgs = builder Ar ? mconcat [ arg "q" , arg =<< getOutput , getInputs ] -- This count includes arg "q" and ar...
izgzhen/hadrian
src/Settings/Builders/Ar.hs
mit
2,237
0
13
473
430
227
203
28
2
-- Copyright (C) 2014 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...
MostAwesomeDude/gemstone
Gemstone/Util.hs
mit
1,709
0
15
339
392
204
188
26
1
module Takeaway.Data.Permissions where import Data.Bits data Rights = Read | Add | Change | Delete | (:&) Rights Rights deriving (Show) allRights :: Rights allRights = Read :& Add :& Change :& Delete newtype Bitflag a = Bitflag { bitflag :: Word } deriving (Eq, Show) rightsToWord :: Rights -> Word ri...
mcmaniac/takeaway
src/Takeaway/Data/Permissions.hs
mit
1,373
12
9
300
431
227
204
39
5
module Data.YahooPortfolioManager.Types where -- | Provide a Symbol type for clarity. -- These should be the stock symbols used by Yahoo type Symbol = String {- | Haskell structure that represents the command line output table including yahoo quotes and portfolio position info -} data Portfolio = Portfolio { ...
lhoghu/yahoo-portfolio-manager
src/Data/YahooPortfolioManager/Types.hs
mit
1,578
0
9
429
301
182
119
36
0
module CLaSH.DepCore.Environment where import Bound (Scope (..)) import Bound.Var (Var (..)) import Data.Functor ((<$>)) import CLaSH.DepCore.Term (Term (..), Type) data Env n a = Env { lookupTy :: a -> Type n a , lookupDef :: a -> Maybe (Term n a) ...
christiaanb/NewCore
src/CLaSH/DepCore/Environment.hs
mit
1,044
0
16
411
390
206
184
-1
-1
module Main where import Criterion.Main import Math.NumberTheory.ArithmeticFunctionsBench as ArithmeticFunctions import Math.NumberTheory.PowersBench as Powers import Math.NumberTheory.PrimesBench as Primes import Math.NumberTheory.RecurrenciesBench as Recurrencies main = defaultMain [ ArithmeticFunctions.benchSui...
cfredric/arithmoi
benchmark/Bench.hs
mit
399
0
7
46
69
46
23
11
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} import Yage.Prelude import Yage.Core.Application import Yage.Rendering.Shader as Shader import qualified Data.Map.Strict as M import Filesystem.Path import qualified Yage.Core.OpenGL as GL config :: ApplicationConfig config = defaultAppConfi...
MaxDaten/yage
shader-tool/ShaderTool.hs
mit
2,130
0
19
689
500
252
248
44
4
import qualified System.Environment as SE import qualified Data.ByteString.Lazy.Char8 as LC import qualified Data.ByteString.Char8 as BC import qualified Data.List as DL import qualified Data.Map as DM import qualified Data.Vector as DV import qualified Statistics.Sample as SS import qualified Statistics.Quantile as SQ...
drbunsen/describe
describe.hs
mit
2,741
3
13
804
1,034
557
477
51
3
-- | -- Pure computations on a reified data. module GraphDB.Macros.Analysis where import GraphDB.Util.Prelude import GraphDB.Util.Prelude.TH import qualified GraphDB.Util.TH.Type as TH import qualified GraphDB.Model as M import qualified GraphDB.Graph as G import qualified GraphDB.Macros.Templates as T type Root = ...
nikita-volkov/graph-db
library/GraphDB/Macros/Analysis.hs
mit
2,958
0
19
783
906
494
412
-1
-1
----------------------------------------------------------------------------- -- -- Module : Transient.Move -- Copyright : -- License : GPL-3 -- -- Maintainer : agocorona@gmail.com -- Stability : -- Portability : -- -- | see <https://www.fpcomplete.com/user/agocorona/moving-haskell-processes-...
geraldus/transient-universe
src/Transient/Move.hs
mit
46,457
15
30
14,884
9,369
4,826
4,543
591
7
-- | -- Module: Hakyll.Web.PureScript -- Copyright: (C) 2015 Braden Walters -- License: MIT (see LICENSE file) -- Maintainer: Braden Walters <vc@braden-walters.info> -- Stability: experimental -- Portability: ghc module Hakyll.Web.PureScript ( Options(..) , pureScriptCompiler , pureScriptCompilerWith , renderPureScrip...
meoblast001/hakyll-purescript
src/Hakyll/Web/PureScript.hs
mit
3,903
0
21
720
652
351
301
58
3
----------------------------------------------------------- -- | -- Module: Bob -- Description: A lackadaisical teenager implemntation -- Copyright: (c) 2015 Alex Dzyoba <alex.dzyoba@gmail.com> -- License: MIT ----------------------------------------------------------- module Bob (responseFor) where import Data.Char ...
dzeban/haskell-exercism
bob/Bob.hs
mit
1,338
0
9
282
281
149
132
24
4
module ParserTypes ( Type(..) , Global(..) , Expr(..) , VKind(..) , Instruction(..) , Initialization(..) , ListOfDef(..) , Ident(..) , getPos ) where...
scast/bigbrother
src/ParserTypes.hs
gpl-2.0
2,613
0
9
1,040
895
519
376
70
1
module SpecifyTree where import Control.Applicative import Data.Map (Map, fromList, fromListWith, findWithDefault, (!)) import Data.Tree import Text.JSON import Squarify (TreeMapTree(..)) type NodeID = Int type RankID = Int type ParentID = Maybe NodeID data SpecifyTreeNode = SpecifyTreeNode { nodeId :: NodeID, ...
specify/TreeMap
SpecifyTree.hs
gpl-2.0
2,433
0
14
562
823
432
391
62
4
{-# LANGUAGE CPP, TypeFamilies, DeriveDataTypeable #-} module PGIP.Output.Proof ( ProofFormatterOptions , proofFormatterOptions , pfoIncludeProof , pfoIncludeDetails , ProofResult , formatProofs ) where import PGIP.Output.Formatting import PGIP.Output.Mime import PGIP.Output.Provers (Prover, prepareFor...
gnn/Hets
PGIP/Output/Proof.hs
gpl-2.0
4,668
0
15
1,079
1,179
676
503
117
7
{-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Config.Ghc90x ( ghc90x ) where import Config.ForcedExecutables import Oracle.Hackage ( ) import Types import MyCabal import Control.Monad import qualified Data.List as List import qualified Data.Map as Map imp...
opensuse-haskell/configuration
src/cabal2obs/Config/Ghc90x.hs
gpl-3.0
27,178
0
15
13,847
2,651
1,710
941
690
3
module Language.Arith.Eval ( small , multi , big ) where import Language.Arith.Syntax import Control.Monad ((<=<)) -- | small documentation small :: Term -> Maybe Term small t | isVal t = Just t -- E-IfTrue small (TmIf TmTrue t2 _) = Just t2 -- E-IfFalse small (TmIf TmFalse _ t3) = Just t3 -- E-If small ...
juanbono/tapl-haskell
arith/src/Language/Arith/Eval.hs
gpl-3.0
1,887
0
10
558
724
349
375
52
8
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/TargetVPNGateways/Insert.hs
mpl-2.0
3,977
0
16
916
470
281
189
76
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Reports/Search.hs
mpl-2.0
5,114
0
19
1,251
809
470
339
115
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} module Marvin.API.Algorithms.LinearRegression ( LinearRegression (..) , defaultLinearRegression , LinearRegressionModel , coefficients , intercept ) where import qualified Numeric.LinearAlgebra as LA impo...
gaborhermann/marvin
src/Marvin/API/Algorithms/LinearRegression.hs
apache-2.0
3,192
0
13
482
600
343
257
66
1
{-| Module : Marvin.API.Meta.Pipeline Description : Chained transformations of training and test data. -} module Marvin.API.Meta.Pipeline ( Pipeline , transform , inject , fitThenRun ) where import Prelude hiding (id, (.)) import Control.Arrow import Control.Monad import Control.Category import Marvin.AP...
gaborhermann/marvin
src/Marvin/API/Meta/Pipeline.hs
apache-2.0
2,449
0
13
582
667
349
318
47
1
module BackwardChaining ( resolve ) where import Control.Monad.Trans.State.Lazy as S ( get, modify, runState ) import Control.Monad.Trans.Reader ( ask, runReaderT ) import Control.Monad.Except ( throwError, runExceptT ) import Control.Monad.Trans.Class (lift) import Types as T import Infer...
tmielcza/demiurge
src/BackwardChaining.hs
apache-2.0
1,917
0
15
381
728
381
347
52
1
data Color = Black | Red deriving (Show, Read, Eq, Enum) data Value = A | Two | Three | Four | Five | Six | Seven | Eight | Nine | Ten | J | Q | K deriving (Show, Read, Eq, Enum) data Suit = Spades | Clubs | Diamonds | Hearts deriving (Show, Read, Eq, Enum) data Card = Card { val :: Value ...
CarloMicieli/fun-with-haskell
src/prog-lang/HsCard.hs
apache-2.0
5,618
129
9
1,987
1,577
839
738
97
4
module Model where import Prelude import Yesod import Data.Text (Text) import Database.Persist.Quasi import Data.Typeable (Typeable) import Data.Time (UTCTime) import Yesod.Markdown (Markdown) -- You can define all of your database entities in the entities file. -- You can find more information on persistent an...
pbrisbin/devsite
Model.hs
bsd-2-clause
512
0
8
71
89
52
37
-1
-1
{-# language OverloadedStrings #-} {-# language TemplateHaskell #-} -- | Snaplet that serves javascript files compiled with ghcjs -- (<https://github.com/valderman/ghcjs-compiler>). This Snaplet is meant to be -- used for development. You can work on client side Haskell code and -- immedietely test the code wit...
johncant/snaplet-ghcjs
Snap/Snaplet/GHCJS.hs
bsd-3-clause
6,958
0
16
1,764
1,419
741
678
121
4
{-# LANGUAGE BangPatterns, CPP, OverloadedStrings #-} -- | -- Module: Data.Aeson.Parser.Internal -- Copyright: (c) 2011-2015 Bryan O'Sullivan -- (c) 2011 MailRank, Inc. -- License: Apache -- Maintainer: Bryan O'Sullivan <bos@serpentine.com> -- Stability: experimental -- Portability: portable...
nurpax/aeson
Data/Aeson/Parser/Internal.hs
bsd-3-clause
13,153
0
31
4,044
3,511
1,825
1,686
261
9
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[PatSyntax]{Abstract Haskell syntax---patterns} -} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE StandaloneDerivi...
vikraman/ghc
compiler/hsSyn/HsPat.hs
bsd-3-clause
27,766
0
18
8,384
4,770
2,585
2,185
310
20
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, Rank2Types, FlexibleContexts, FlexibleInstances #-} module Control.Walkable.THExp where import Control.Walkable.TH import Control.Walkable.Class import Language.Haskell.TH import Language.Haskell.TH.Syntax(NameFlavour, OccName) import Data.Word (Word8) data ExpHa...
max630/walkable
Control/Walkable/THExp.hs
bsd-3-clause
1,538
0
21
438
338
192
146
26
0
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE FlexibleContexts , ScopedTypeVariables , OverloadedStrings , DataKinds #-} module Sigym4.Geometry.BinarySpec (main, spec) where import System.IO hiding (hGetContents) import Data.ByteString.Lazy (hGetContents) import Data.Either (isRi...
krisajenkins/sigym4-geometry
tests/Sigym4/Geometry/BinarySpec.hs
bsd-3-clause
1,337
0
21
314
366
193
173
33
1
module System.SGE.ShellCmd where import HSH import System.Exit newtype ShellCmd = Cmd { fromCmd :: String } deriving Show class Shell a where shellCmd :: a -> ShellCmd runShell :: Shell a => a -> IO ExitCode runShell = run . fromCmd . shellCmd
badi/hsge
System/SGE/ShellCmd.hs
bsd-3-clause
254
0
7
53
81
46
35
8
1
-- | -- Module : Main -- Copyright : (c) 2018 Harendra Kumar -- -- License : BSD3 -- Maintainer : streamly@composewell.com import Control.Concurrent (threadDelay) import Control.Monad (when) import Control.Monad.IO.Class (liftIO) import Gauge import Streamly import Streamly.Prelude as S import System.Rando...
harendra-kumar/asyncly
benchmark/Adaptive.hs
bsd-3-clause
4,738
3
12
1,126
1,450
730
720
94
1
module Main where import Control.Monad (unless) import Data.Text (unpack) import Data.Void (Void) import Dhall.DhallToToml (dhallToToml) import Dhall.Parser (Src) import Dhall.Toml.Utils (fileToDhall) import Dhall.TomlToDhall (tomlToDhall) import Test.Tasty (TestTree) import Test.Tasty...
Gabriel439/Haskell-Dhall-Library
dhall-toml/tasty/Main.hs
bsd-3-clause
4,345
0
18
1,061
992
515
477
-1
-1
{-# Language BangPatterns #-} module InitialConditions {- ( initialConditions ,initializeMolcasOntheFly ,initializeMolcasTinker ,initializeRC ,initializeSystemOnTheFly ...
felipeZ/Dynamics
src/InitialConditions.hs
bsd-3-clause
11,127
1
21
3,413
3,104
1,547
1,557
229
2
newtype Diag a = MkDiag { unDiag :: [a] } deriving Show instance Monad Diag where return x = MkDiag [x] MkDiag xs >>= f = MkDiag (concat (diag (map (unDiag . f) xs))) diag [] = [] diag (xs:xss) = zipWith (++) [ [x] | x <- xs ] ([] : diag xss)
jystic/QuickSpec
experiment/Diag.hs
bsd-3-clause
247
0
14
58
149
79
70
6
1
{-# LANGUAGE OverloadedStrings #-} module RealWorld.Api.Articles where import RealWorld.Api.Prelude import Control.Monad.Time (currentTime) import qualified RealWorld.DB as DB import RealWorld.Model.Article (Article(..), ArticleBody(..), ArticlesBody(..), Slug) import qualified RealWorld.Model...
zudov/servant-realworld-example-app
src/RealWorld/Api/Articles.hs
bsd-3-clause
3,060
0
14
806
822
427
395
-1
-1
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Distance.DE...
facebookincubator/duckling
Duckling/Distance/DE/Rules.hs
bsd-3-clause
4,972
0
19
1,162
1,399
771
628
134
2
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} ------------------------------------------------------------------------------- -- | -- Module : Control.Lens.Zipper -- Copyright : (C) 2012 B...
ekmett/zippo
Control/Lens/Zipper.hs
bsd-3-clause
6,622
0
13
1,513
1,657
884
773
86
2
----------------------------------------------------------------------------- -- | -- Module : Distribution.GetOpt -- Copyright : (c) Sven Panne 2002-2005 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Portability : portable -- -- This library p...
dcreager/cabal
Distribution/GetOpt.hs
bsd-3-clause
13,949
0
14
4,147
3,089
1,671
1,418
141
10
-- | @FilteredComplex a b@ represents a complex of simplices (with -- vertex type @b@) filtered over @a@s. A filtered (simplicial) -- complex is stored as a vector of filtration values and a vector of -- lists of simplices. The @n@'th filtration of the complex is the -- collection of simplices from the lists in positio...
michiexile/hplex
pershom/src/Math/Simplicial/FilteredComplex.hs
bsd-3-clause
2,712
0
14
675
1,030
551
479
47
2
module Part2.Problem49 where import qualified Data.Map as Map import Data.List (find, permutations, sort) import Part1.Problem12 (combinations) import Part1.Problem27 (isPrime, primes) import Part1.Problem32 (digits) -- -- Problem 49: Prime permutations -- -- The ...
c0deaddict/project-euler
src/Part2/Problem49.hs
bsd-3-clause
1,536
0
12
298
348
197
151
18
1
{-| Tick (Time, KeyPresses, KeyReleases, KeyState, ) -> -}
binarin/learnopengl
src/Host.hs
bsd-3-clause
64
0
2
14
3
2
1
1
0
{-# OPTIONS_GHC -fno-warn-orphans #-} module Text.RSS.Equals where import Text.XML.Light (Element(..), Content(..), CData(..)) import Text.RSS.Syntax (RSSCloud(..)) instance Eq Element where (Element name1 attribs1 content1 line1) == (Element name2 attribs2 content2 line2) = (name1 == name2) && (attribs1 ...
danfran/feed
tests/Text/RSS/Equals.hs
bsd-3-clause
1,328
0
12
255
431
231
200
24
0
-- some tests for behaviors. {-# LANGUAGE TypeOperators #-} module Main ( main ) where import Sirea.Prelude import Sirea.UnsafeLink import Sirea.UnsafeIO import Sirea.Clock import Sirea.Time import Sirea.DemandMonitor import Control.Monad (unless) import qualified Data.Set as S import Debug.Trace main :: IO...
dmbarbour/Sirea
tst/Cyc.hs
bsd-3-clause
686
0
10
134
222
122
100
21
1
module P15 ( p15 ) where longList :: [[Int]] longList = [ [a,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20 ,b,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12,b13,b14,b15,b16,b17,b18,b19,b20] | a <- [0,1], a2 <- [0,1], a3 <- [0,1], a4 <- [0,1], a5 <- [0,1], a6 <- [0,1], a17 <- [0,1], a7 <- [0,1], a8...
pyuk/euler2
src/P15.hs
bsd-3-clause
919
0
9
191
825
487
338
18
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE NoImplicitPrelude #-} module System.Command ( -- * Running sub-processes P.createProcess , P.shell , P.proc , P.CreateProcess(..) , P.CmdSpec(..) , P.StdStream(..) , P.ProcessHandle -- * Specific variants of createProcess , readProcessWithExitCode , P.runCommand ,...
tonymorris/system-command
src/System/Command.hs
bsd-3-clause
6,955
0
9
1,174
1,065
651
414
134
2
{-# LANGUAGE RecordWildCards #-} -- | Specification for submodules of Pos.Chain.Update module Test.Pos.Update.PollSpec ( spec ) where import Universum import Control.Lens (at) import qualified Data.HashSet as HS import Test.Hspec (Spec, describe) import Test.Hsp...
input-output-hk/pos-haskell-prototype
lib/test/Test/Pos/Update/PollSpec.hs
mit
11,333
0
18
2,817
2,380
1,235
1,145
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Database.Muesli.Indexes -- Copyright : (c) 2015-16 Călin Ardelean -- License : MIT -- -- Maintainer : Călin Ardelean <mmn80cpu@gmail.com> -- Stability : experimental -- Portability : portable -- -- Incremental d...
clnx/muesli
src/Database/Muesli/Indexes.hs
mit
4,763
0
27
1,684
1,208
614
594
74
7
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} ----------------------------------------------------------------------------- -- | -- ...
cchalmers/dense
src/Data/Dense.hs
bsd-3-clause
3,400
0
5
914
410
302
108
93
0
------------------------------------------------------------------------ -- | -- Module : ALife.Realtra.ImageQC -- Copyright : (c) Amy de Buitléir 2013-2014 -- License : BSD-style -- Maintainer : amy@nualeargais.ie -- Stability : experimental -- Portability : portable -- -- QuickCheck tests. -- ----...
mhwombat/creatur-realtra.OLD
test/ALife/Realtra/ImageQC.hs
bsd-3-clause
3,106
0
10
602
293
184
109
26
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 -} {-# LANGUAGE CPP #-} module IfaceSyn ( module IfaceType, IfaceDecl(..), IfaceFamTyConFlav(..), IfaceClassOp(..), IfaceAT(..), IfaceConDecl(..), IfaceConDecls(..), IfaceEqSpec, IfaceExpr(...
TomMD/ghc
compiler/iface/IfaceSyn.hs
bsd-3-clause
71,006
78
27
23,569
17,523
8,725
8,798
1,359
10
-- Common wrapper for HTML pages module Distribution.Server.Pages.Template ( hackagePage , hackagePageWith , hackagePageWithHead ) where import Text.XHtml.Strict --TODO: replace all this with external templates -- | Create top-level HTML document by wrapping the Html with boilerplate. hackagePage :: ...
mpickering/hackage-server
Distribution/Server/Pages/Template.hs
bsd-3-clause
2,833
0
13
776
627
348
279
53
1