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 OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} --------------------------------------------------------------- -- | -- Module : Data.Minecraft.Release17.Protocol -- Copyright : (c) 2016 Mi...
oldmanmike/hs-minecraft-protocol
src/Data/Minecraft/Release17/Protocol.hs
bsd-3-clause
41,010
25
17
11,442
10,707
4,748
5,959
-1
-1
module Queue ( Queue , queue , mqueue, push, pop, popWhile, runFold, size, ) where import Data.Foldable -- A double ended queue which keeps track of a front and a back, as well as -- an accumulation function. Inspired by https://people.cs.uct.ac.za/~ksmith/articles/sliding_window_minimum.html#sliding-...
charles-cooper/hroll
src/Queue.hs
bsd-3-clause
4,255
0
11
946
883
494
389
42
3
module GPipeFPSMaterial where import Graphics.GPipe import qualified Data.ByteString.Char8 as SB identityLight :: Float identityLight = 1 data Entity = Entity { eAmbientLight :: Vec4 (Vertex Float) , eDirectedLight :: Vec4 (Vertex Float) , eLightDir :: Vec3 (Vertex Float) , eShader...
csabahruska/GFXDemo
GPipeFPSMaterial.hs
bsd-3-clause
3,629
0
11
1,193
809
489
320
128
1
module UI.Geometry where import Control.Applicative (liftA, liftA2) import Data.Functor.Classes import Data.Functor.Listable import Data.Semigroup data Rect a = Rect { origin :: !(Point a), size :: !(Size a) } deriving (Eq, Foldable, Functor, Ord, Traversable) containsPoint :: Real a => Rect a -> Point a -> Bool c...
robrix/ui-effects
src/UI/Geometry.hs
bsd-3-clause
2,792
0
11
609
1,270
638
632
81
1
-- | Half-memory implementation of symmetric matrices with -- null-diagonal. module Math.VectorSpaces.DistanceMatrix ( DistanceMatrix, RealDistanceMatrix, BooleanDistanceMatrix, generate, (?), (!), Math.VectorSpaces.DistanceMatrix.map ...
michiexile/hplex
pershom/src/Math/VectorSpaces/DistanceMatrix.hs
bsd-3-clause
1,675
0
13
449
718
402
316
28
1
module Network.MtGoxAPI.DepthStore.Monitor ( monitorDepth ) where import Control.Applicative import Control.Concurrent import Control.Monad import Data.Maybe import Text.Printf import Network.MtGoxAPI.DepthStore monitorDepth :: DepthStoreHandle -> IO () monitorDepth handle = forever $ do putStrLn "" ...
javgh/mtgoxapi
Network/MtGoxAPI/DepthStore/Monitor.hs
bsd-3-clause
2,311
0
18
594
767
385
382
56
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeOperators #-} module Serv.Server.Core.Runtime ( runCore ) where import Control.Lens import Control.Monad.Except import Control.Monad.Reader ...
orangefiredragon/bear
src/Serv/Server/Core/Runtime.hs
bsd-3-clause
2,550
0
15
639
519
313
206
49
1
{-# LINE 1 "GHC.Conc.Signal.hs" #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} module GHC.Conc.Signal ( Signal , HandlerFun , setHandler , runHandlers , runHandlersPtr ) where import Control.Concurrent.MVar (MVar, newMVar, withMVar) import Data.Dyna...
phischu/fragnix
builtins/base/GHC.Conc.Signal.hs
bsd-3-clause
3,458
0
20
769
824
432
392
71
3
module Main where import System.Environment import Arion.Runner main :: IO () main = getArgs >>= run
saturday06/arion
src/Main.hs
mit
103
0
6
18
33
19
14
5
1
{-# OPTIONS_GHC -fno-warn-type-defaults #-} import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Triangle ( TriangleType ( Equilateral , Illegal , Isosceles ...
xTVaser/Exercism-Solutions
haskell/triangle/test/Tests.hs
mit
2,496
0
8
1,126
465
291
174
56
1
module Main where import HTrees import Control.Monad.IO.Class import Data.CSV.Conduit import Data.List import qualified Data.Map.Lazy as Map import Data.Maybe import Data.Vector (Vector, fromList, toList, (!)) import System.Environment (getArgs) ...
mreid/HTrees
src/run.hs
mit
2,545
0
16
576
749
399
350
48
2
{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2006-2014 John MacFarlane <[email protected]> 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 your option) a...
rgaiacs/pandoc
src/Text/Pandoc/Writers/RST.hs
gpl-2.0
18,955
0
21
5,217
5,842
2,933
2,909
364
28
-- Voting algorithm example from chapter 7 of Programming in Haskell, -- Graham Hutton, Cambridge University Press, 2016. import Data.List -- First past the post votes :: [String] votes = ["Red", "Blue", "Green", "Blue", "Blue", "Red"] count :: Eq a => a -> [a] -> Int count x = length . filter (== x) rmdups :: Eq ...
thalerjonathan/phd
coding/learning/haskell/grahambook/Code_Solutions/voting.hs
gpl-3.0
1,071
0
10
294
523
291
232
28
2
{-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE CPP #-} module Foundation.Collection.Copy ( Copy(..) ) where import GHC.ST (runST) import Basement.Compat.Base ((>>=)) import Basement.Nat import Basement.Types.OffsetSize import qualified Basement.Block as BLK import q...
vincenthz/hs-foundation
foundation/Foundation/Collection/Copy.hs
bsd-3-clause
1,146
0
10
237
359
204
155
24
0
{-# OPTIONS_GHC -Wall #-} module Optimize.Case (optimize) where import Control.Arrow (second) import qualified Data.Map as Map import Data.Map ((!)) import qualified Data.Maybe as Maybe import qualified AST.Expression.Optimized as Opt import qualified AST.Pattern as P import qualified Optimize.DecisionTree as DT -...
mgold/Elm
src/Optimize/Case.hs
bsd-3-clause
4,385
0
15
1,107
1,281
674
607
103
8
----------------------------------------------------------------------------- -- | -- Module : Data.Ratio -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : [email protected] -- Stability : stable -- Portability : po...
alekar/hugs
packages/base/Data/Ratio.hs
bsd-3-clause
3,206
0
6
835
122
94
28
30
1
{-# LANGUAGE BangPatterns, CPP, GADTs #-} module MkGraph ( CmmAGraph, CmmAGraphScoped, CgStmt(..) , (<*>), catAGraphs , mkLabel, mkMiddle, mkLast, outOfLine , lgraphOfAGraph, labelAGraph , stackStubExpr , mkNop, mkAssign, mkStore , mkUnsafeCall, mkFinalCall, mkCallReturnsTo , mkJumpReturnsTo , mkJum...
shlevy/ghc
compiler/cmm/MkGraph.hs
bsd-3-clause
14,778
0
18
3,643
3,326
1,790
1,536
243
9
-- | A CPS IR. module Ivory.Compile.ACL2.CPS ( Proc (..) , Value (..) , Literal (..) , Cont (..) , Var , variables , contFreeVars , explicitStack , replaceCont , commonSubExprElim , removeAsserts , removeNullEffect ) where import Data.List import Text.Printf impor...
GaloisInc/ivory-backend-acl2
src/Ivory/Compile/ACL2/CPS.hs
bsd-3-clause
10,661
0
19
4,010
4,057
1,982
2,075
244
26
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -- | A wrapper around hoogle. module Stack.Hoogle ( hoogleCmd ) where import Stack.Prelude import qualified Data.ByteString.Lazy.Char8 as BL8 import Data.Char (isSpace) import qualifi...
juhp/stack
src/Stack/Hoogle.hs
bsd-3-clause
8,978
0
27
3,279
1,856
918
938
-1
-1
{-# LANGUAGE DataKinds, TypeOperators, TypeFamilies #-} {-# OPTIONS_GHC -fwarn-redundant-constraints #-} module TcTypeNatSimple where import GHC.TypeLits import Data.Proxy type family SomeFun (n :: Nat) -- See the ticket; whether this succeeds or fails is distinctly random -- upon creation, commit f861fc6ad8e5504a4...
sdiehl/ghc
testsuite/tests/typecheck/should_compile/T9708.hs
bsd-3-clause
1,047
0
9
192
99
61
38
8
1
{-# LANGUAGE DeriveDataTypeable #-} module HsTypeStruct where import Data.Generics -------- Types ----------------------------------------------------------------- data TI i t = HsTyFun t t -- | HsTyTuple [t] | HsTyApp t t | HsTyVar i | HsTyCon i | HsTyForall [i] [t] t -- forall is . Ps => t ...
kmate/HaRe
old/tools/base/AST/HsTypeStruct.hs
bsd-3-clause
369
0
7
82
85
51
34
10
0
{-# OPTIONS_GHC -cpp #-} {-# OPTIONS -fglasgow-exts #-} {-# LANGUAGE MultiParamTypeClasses, OverlappingInstances, UndecidableInstances, FunctionalDependencies, NoMonomorphismRestriction #-} {-+ Type environments. For efficiency, a type environment is represented as a pair of an environment and the set of (nongeneric) ...
kmate/HaRe
old/tools/base/TI/TiTEnv.hs
bsd-3-clause
1,402
0
12
226
379
209
170
20
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- This is a non-exposed internal module. -- -- This code contains utility function and data structures that are used -- to improve the efficiency of several instances in the Da...
ezyang/ghc
libraries/base/Data/Functor/Utils.hs
bsd-3-clause
3,943
0
12
982
1,050
566
484
55
1
module D2 where y = 0 f z x = x + z f_gen = (y + 1) sumFun xs = sum $ (map (f (y + 1)) xs)
kmate/HaRe
old/testing/generaliseDef/D2_AstOut.hs
bsd-3-clause
98
0
11
36
68
37
31
5
1
{-# LANGUAGE RecordWildCards #-} module T9437 where data Foo = Foo { x :: Int } test :: Foo -> Foo test foo = foo { .. }
ezyang/ghc
testsuite/tests/rename/should_fail/T9437.hs
bsd-3-clause
124
0
8
31
42
25
17
5
1
-- Area of a Circle -- http://www.codewars.com/kata/537baa6f8f4b300b5900106c module Circle where circleArea :: Double -> Maybe Double circleArea r | r > 0 = Just( pi * r^2) | otherwise = Nothing
gafiatulin/codewars
src/7 kyu/Circle.hs
mit
210
0
9
46
59
30
29
4
1
module Main where import System.Environment(getArgs) import Scheme(eval) -- The driver function for the executable parser that simply runs the parser on -- the first command-line argument and prints the resulting error or Expr. main :: IO () main = do args <- getArgs case eval (head args) of Left err -> p...
mjdwitt/a-scheme
src/Main.hs
mit
356
0
10
76
86
44
42
9
2
module Main where addOne :: Num a => a -> a addOne a = a + 1 addTwo :: Num a => a -> a addTwo a = a + 2 result :: Num b => [b] -> [b] result xs = map addOne xs main :: IO () main = do let ans = result [10] print ans
calvinchengx/learnhaskell
functors/functors.hs
mit
233
0
11
76
131
66
65
11
1
import Control.Monad (replicateM, fmap, forM_) import Control.Parallel import Data.IORef import Data.List ((\\)) import Graphics.UI.GLUT import System.Random (getStdRandom, randomR, setStdGen, mkStdGen, getStdGen) import System.Random.Shuffle (shuffle') import qualified Data.Map as Map (findMax, f...
7lb/tsp-haskell
nn.hs
mit
5,837
0
14
1,738
2,726
1,371
1,355
182
2
----------------------------------------------------------------------------- -- -- Module : Parcial2.App -- Copyright : -- License : MIT -- -- Maintainer : - -- Stability : -- Portability : -- -- | -- module Parcial2.App where import Data.Maybe import Data.Typeable import GeneticAlgorithm import P...
fehu/itesm-ga
src/Parcial2/App.hs
mit
6,832
0
16
2,254
1,301
673
628
117
2
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, InstanceSigs #-} module CompilerUtility (compilerSettings) where import Control.Applicative import Data.List.Utils import System.FilePath.Posix import System.IO import Data.ConfigFile import CompilationUtility import qualifi...
Prinhotels/goog-closure
src/CompilerUtility.hs
mit
3,421
0
23
594
875
453
422
80
5
{- DOC: Paste all the following commented lines in the file importing this module (don’t forget to update constant ‘filename’). import qualified SRC.Log as Log -- write code here -- boilerplate for logging filename = "-.hs" fatal :: Show a => String -> a -> b fatal msg line = Log.reportFatal filename msg line fix...
Fornost461/drafts-and-stuff
Haskell/samples/Template/SRC/Log.hs
cc0-1.0
716
0
13
174
108
58
50
11
1
{- This is my xmonad configuration file. There are many like it, but this one is mine. -} import Prelude hiding (mod) import XMonad import XMonad.Config.Azerty import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.H...
NorfairKing/sus-depot
shared/shared/xmonad/xmonad.hs
gpl-2.0
3,361
0
10
1,141
551
315
236
64
1
-- Copyright (C) 2007 David Roundy -- -- 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, or (at your option) -- any later version. -- -- This program is distributed in th...
DavidAlphaFox/darcs
harness/Darcs/Test/Patch/Properties/Generic.hs
gpl-2.0
20,474
0
43
8,318
5,562
2,792
2,770
-1
-1
module Language.UHIM.Dictionary.Transform.Tcvime where import Control.Lens import Data.Maybe import qualified Data.Map as M import Language.UHIM.Japanese.Prim import qualified Language.UHIM.Dictionary.Keybind.Vim as Vim import Language.UHIM.Dictionary.Yaml data Config = Config { name :: String , ...
na4zagin3/uhim-dict
src/Language/UHIM/Dictionary/Transform/Tcvime.hs
gpl-3.0
1,493
6
11
472
405
229
176
29
1
{-# LANGUAGE PackageImports #-} {-# LANGUAGE CPP #-} {-| Module : Data.List.NonEmpty Description : Extra helper function for 'Data.List.NonEmpty' from "base". Copyright : (c) Evgenii Kotelnikov, 2019 License : GPL-3 Maintainer : [email protected] Stability : provisional -} module Data.Li...
aztek/voogie
src/Data/List/NonEmpty.hs
gpl-3.0
981
0
11
209
276
150
126
17
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-games-management/gen/Network/Google/Resource/GamesManagement/Achievements/ResetAllForAllPlayers.hs
mpl-2.0
3,023
0
12
601
231
144
87
44
1
{-# LANGUAGE OverloadedStrings #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.IAM.Types -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <[email protected]> -- Stability : auto-g...
fmapfmapfmap/amazonka
amazonka-iam/gen/Network/AWS/IAM/Types.hs
mpl-2.0
14,289
0
13
3,061
2,027
1,177
850
322
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/Regions/Get.hs
mpl-2.0
4,879
0
18
1,193
798
463
335
115
1
{-# LANGUAGE OverloadedStrings #-} module Main where import Web.Scotty import Data.Monoid (mconcat) import Data.Time.Clock -- monoid main = scotty 3000 $ do get "/:word" $ do beam <- param "word" html $ mconcat ["<h1>Scotty, ", beam, " me up!</h1>"] -- mconcat = foldr mappend mempty -- functor offsetCurre...
prt2121/haskell-practice
ch6-11-17-25/src/Main.hs
apache-2.0
445
0
13
81
124
66
58
12
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Openshift.V1.ImageStreamTag where import GHC.Generics import Data.Text import Kubernetes.V1.ObjectMeta import Openshift.V1.Image import qualifi...
minhdoboi/deprecated-openshift-haskell-api
openshift/lib/Openshift/V1/ImageStreamTag.hs
apache-2.0
1,216
0
9
177
122
75
47
19
0
{-# LANGUAGE OverloadedStrings #-} -- Copyright 2014 (c) Diego Souza <[email protected]> -- -- 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....
locaweb/leela
src/warpdrive/src/Leela/Data/EventTree.hs
apache-2.0
3,232
0
19
872
927
470
457
64
3
module External.A143481Spec (main, spec) where import Test.Hspec import External.A143481 (a143481) main :: IO () main = hspec spec spec :: Spec spec = describe "A143481" $ it "correctly computes the first 20 elements" $ take 20 (map a143481 [1..]) `shouldBe` expectedValue where expectedValue = [1,2,6,8,20...
peterokagey/haskellOEIS
test/External/A143481Spec.hs
apache-2.0
377
0
10
59
160
95
65
10
1
{-| Module describing an instance. The instance data type holds very few fields, the algorithm intelligence is in the "Node" and "Cluster" modules. -} {- 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 ...
ganeti-github-testing/ganeti-test-1
src/Ganeti/HTools/Instance.hs
bsd-2-clause
13,980
0
20
3,576
2,760
1,544
1,216
237
7
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} -- | Observation schema blocks for Nerf. module NLP.Nerf.Schema ( -- * Types Ox , Schema , void , sequenceS_ -- * Usage , schematize -- ** Configuration , Body (..) , Entry , entry , entryWith , SchemaConf (..) , nullConf , defaultConf , fromCon...
kawu/nerf
src/NLP/Nerf/Schema.hs
bsd-2-clause
11,056
0
17
3,122
3,048
1,614
1,434
235
2
module Utilities.Bits where import Emulator.Types import Data.Bits import Data.Int -- This is what the halfWordExtend function is doing but we've opted for -- the fromIntegral approach which has a chance to be faster (untested) --halfWordExtend :: HalfWord -> MWord --halfWordExtend h = val .|. orVal -- where -- ...
intolerable/GroupProject
src/Utilities/Bits.hs
bsd-2-clause
1,095
0
12
233
276
156
120
17
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE ForeignFunctionInterface #-} module Main where -- External dependencies imports -- import CATerms -- import Filesystem hiding (writeFile, readFile, withFile, openFile) -- import Language.Java.Pretty -- import Language.Jav...
dagit/edit-patterns
Main.hs
bsd-3-clause
37,050
0
49
10,782
10,527
5,371
5,156
639
8
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} ----------------------------------------------------------------------------- -- | -- Module : Text.CSL.Input.Bibtex -- Copyright : (c) John MacFarlane -- Licen...
adunning/pandoc-citeproc
src/Text/CSL/Input/Bibtex.hs
bsd-3-clause
66,320
185
35
22,742
15,550
7,970
7,580
1,410
406
module Noobing.Experimenting.IO ( hello ) where hello :: IO () hello = do putStrLn "hello!"
markmq/Noobing
src/Noobing/Experimenting/IO.hs
bsd-3-clause
95
0
7
18
33
18
15
5
1
{-# LANGUAGE TupleSections #-} module Day17 where -- Improvements to Day12 import Control.Monad.Reader import Control.Monad.Trans.Either import qualified Data.Map as Map data Type = Function Type Type | RecordT [(String, Type)] | VariantT [(String, Type)] deriving (Eq, Show) data CheckTerm -- neither a ...
joelburget/daily-typecheckers
src/Day17.hs
bsd-3-clause
7,281
0
23
2,184
2,212
1,094
1,118
175
10
{-# LANGUAGE GADTs #-} module Term where data Term t where Zero :: Term Int Succ :: Term Int -> Term Int Pred :: Term Int -> Term Int IsZero :: Term Int -> Term Bool If :: Term Bool -> Term a -> Term a -> Term a eval :: Term t -> t eval Zero = 0 eval (Succ e) = succ (eval e) eval (Pred e) ...
maoe/fop
12-Fun-with-Phantom-Types/Term.hs
bsd-3-clause
478
0
9
144
238
117
121
17
2
{-# OPTIONS_GHC -Wall #-} module System.Console.ShSh.Builtins.Cmp ( cmp ) where import System.Console.ShSh.Builtins.Args ( withArgs, flagOn, flag ) import System.Console.ShSh.Builtins.Util ( readFileOrStdin ) import System.Console.ShSh.Shell ( Shell ) import System.Exit ( ExitCode(..) ) {-# NOINLINE cmp #-} cmp :: [...
shicks/shsh
System/Console/ShSh/Builtins/Cmp.hs
bsd-3-clause
1,457
0
14
592
371
203
168
27
6
{-# LANGUAGE QuasiQuotes #-} module LLVM.General.Quote.Test.DataLayout where import Test.Tasty import Test.Tasty.HUnit import Test.HUnit import Data.Maybe import qualified Data.Set as Set import qualified Data.Map as Map import LLVM.General.Quote.LLVM import LLVM.General.AST import LLVM.General.AST.DataLayout impo...
tvh/llvm-general-quote
test/LLVM/General/Quote/Test/DataLayout.hs
bsd-3-clause
3,333
0
20
816
919
569
350
68
1
{-| Module : Database.Relational.Project Description : Definition of PROJECT and friends. Copyright : (c) Alexander Vieth, 2015 Licence : BSD3 Maintainer : [email protected] Stability : experimental Portability : non-portable (GHC only) -} {-# LANGUAGE AutoDeriveTypeable #-} {-# LANGUAGE TypeFamilies #-}...
avieth/Relational
Database/Relational/Project.hs
bsd-3-clause
1,841
0
8
362
109
74
35
-1
-1
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE OverloadedStrings #-} module Develop.Generate.Index ( toHtml , getProject , moveToRoot ) where import Control.Monad (filterM) import Data.Aeson ((.=)) import qualified Data.Aeson as Json import qualified Data.ByteString.Lazy.UTF8 as BSU8 import qualified Data.List as Li...
evancz/cli
src/Develop/Generate/Index.hs
bsd-3-clause
4,285
0
15
1,113
1,259
673
586
119
3
-- | Internal array type used by the B-tree types {-# LANGUAGE BangPatterns, CPP, MagicHash, Rank2Types, UnboxedTuples #-} module Data.BTree.Array ( -- * Types Array , MArray -- * Creating arrays , run , new , unsafeWrite , unsafeCopy -- * Inspecting arrays , unsafeIn...
jaspervdj/b-tree
src/Data/BTree/Array.hs
bsd-3-clause
2,991
0
15
930
823
432
391
65
2
{-# LANGUAGE RankNTypes, OverloadedStrings #-} module Saturnin.Types ( MachineDescription , Hostname , BuildRequest (..) , JobRequest (..) , TestType (..) , GitSource (..) , YBServer , YBServerState (..) , YBSSharedState , fst3 , TestResult (..) , anyEither , isPassed...
yaccz/saturnin
library/Saturnin/Types.hs
bsd-3-clause
2,738
0
10
618
766
433
333
83
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} import Data.String (fromString) import System.Environment (getArgs) import qualified Network.Wai.Handler.Warp as Warp import qualified Network.Wai as Wai import qualified Network.HTTP...
mitsuji/exp-CloudHaskell
app/WaiChat.hs
bsd-3-clause
5,093
2
14
1,060
1,652
848
804
121
4
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} import Language.JsonGrammar import Types import Prelude hiding (id, (.)) import Control.Category (Category(..)) import Data.Aeson.Types (Value, parseMaybe) import D...
MedeaMelana/JsonGrammar2
tests/Tests.hs
bsd-3-clause
2,169
4
14
371
657
337
320
-1
-1
module Control.Monad.Syntax.Three where (===<<) :: Monad m => (a -> b -> c -> m d) -> m a -> b -> c -> m d (===<<) mf inp b c = inp >>= (\a -> mf a b c) infixl 1 ===<< (=.=<<) :: Monad m => (a -> b -> c -> m d) -> m b -> a -> c -> m d (=.=<<) mf inp a c = inp >>...
athanclark/composition-extra
src/Control/Monad/Syntax/Three.hs
bsd-3-clause
502
0
11
208
280
147
133
19
1
{-# LANGUAGE FlexibleContexts, UndecidableInstances, TypeSynonymInstances, FlexibleInstances, RankNTypes, TupleSections #-} -- Ref.) https://stackoverflow.com/questions/13352205/what-are-free-monads/13352580 module Free where import Control.Arrow import Control.Monad.State data Free f a = Pure a | Roll ...
cutsea110/aop
src/Free.hs
bsd-3-clause
6,957
0
15
2,167
2,901
1,501
1,400
135
6
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-} module Monto.RegisterServiceRequest where import Data.Aeson.TH import Data.Aeson (Value) import Data.Vector (Vector) import qualified Data.Vector as V import Data.Text (Text) import qualified Data.Text as T import Dat...
wpmp/monto-broker
src/Monto/RegisterServiceRequest.hs
bsd-3-clause
1,180
0
14
315
289
165
124
33
1
{-# LANGUAGE OverloadedStrings #-} module Unit.Service.CrawlerServiceTest (tests) where import Control.Applicative ((<$>)) import Data.Text import Service.CrawlerService import Test.HUnit import Text.HTML.TagSoup (Tag(..)) tests = [ "runs crawler" ~: test [ testIO (runCrawler fetcherMock1 "git.io" ["http://k.n...
ptek/sclent
tests/Unit/Service/CrawlerServiceTest.hs
bsd-3-clause
1,416
0
12
184
500
281
219
24
1
{-# LANGUAGE FlexibleInstances #-} module Network.SPDY.Internal.Serialize where import Blaze.ByteString.Builder import Data.Bits (setBit, shiftL, shiftR, (.&.)) import Data.ByteString (ByteString) import qualified Data.ByteString as B import Data.List (foldl') import Data.Monoid import Data.Word (Word8, Word16, Word...
kcharter/spdy-base
src/Network/SPDY/Internal/Serialize.hs
bsd-3-clause
7,641
0
17
1,383
2,102
1,055
1,047
183
9
module Problem16 ( powerDigitSum ) where import Lib (digits) powerDigitSum :: Integer -> Integer -> Integer powerDigitSum x pow = sum.digits $ x^pow
candidtim/euler
src/Problem16.hs
bsd-3-clause
157
0
7
31
50
28
22
5
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} -- | A @Trajectory@ instance based on a chronologically ordered -- list of data. The start and end times are determined by the -- first and last datum in the list. module Astro.Trajectory.EphemTrajectory ( EphemTrajectory (ET) ) where impor...
bjornbm/astro-orbit
Astro/Trajectory/EphemTrajectory.hs
bsd-3-clause
2,598
0
12
658
916
482
434
44
4
{-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# LANGUAGE TypeSynonymInstances, StandaloneDeriving, DeriveDataTypeable, FlexibleInstances, TypeOperators #-} module Database.PostgreSQL.Simple.Tuple.Common ( groupJoin , tuple2 , tuple3 , tuple4 , tuple5 , tuple6 , tuple7 , tuple8 , tuple9 , tuple10 , tuple11 ...
cimmanon/postgresql-simple-tuple
src/Database/PostgreSQL/Simple/Tuple/Common.hs
bsd-3-clause
12,425
4
25
2,431
10,049
5,956
4,093
204
1
{-# language FlexibleContexts #-} module Graph.Util ( module Graph.Util , module Autolib.Graph.Type , module Autolib.Reporter , module Autolib.Reporter.Set , module Autolib.ToDoc , module Autolib.FiniteMap ) where import Autolib.Graph.Type hiding ( iso ) import Autolib.Graph.Ops ( restrict , unlinks ) import Autol...
florianpilz/autotool
src/Graph/Util.hs
gpl-2.0
7,438
203
41
1,868
2,441
1,304
1,137
152
3
module GameLogic.Logic ( setCenterPosLimited , setCenterPos , doSelectCellAction , doGameStep , WorldAction ) where import Debug.Trace import Control.Lens hiding ((<|), (|>)) import Control.Conditional import GameLogic.Data.Facade import GameLogic.Util import GameLogic.AI.Actions import GameLog...
EPashkin/gamenumber-freegame
src_gl/GameLogic/Logic.hs
gpl-3.0
2,348
0
12
483
694
354
340
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -------------------...
Orvid/fbthrift
thrift/compiler/test/fixtures/service-fuzzer/gen-hs/TestService_Client.hs
apache-2.0
3,722
0
14
523
840
525
315
54
1
{-# LANGUAGE PackageImports #-} module Propellor.Property where import System.Directory import Control.Monad import Data.Monoid import Control.Monad.IfElse import "mtl" Control.Monad.Reader import Propellor.Types import Propellor.Info import Propellor.Engine import Utility.Monad import System.FilePath -- Constructs...
abailly/propellor-test2
src/Propellor/Property.hs
bsd-2-clause
5,033
17
15
967
1,284
664
620
91
3
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-} {-# OPTIONS -Wall #-} module Main(main) where import qualified Data.Text.IO as T import Data.Typeable import Hydro import qualified Language.Paraiso.Annotation as Anot import qualified Language.Paraiso.Annotation.Allocation as Alloc import ...
nushio3/Paraiso
examples-old/Hydro-exampled/HydroMain.hs
bsd-3-clause
10,530
0
19
2,826
4,280
2,164
2,116
228
3
{-# LANGUAGE ScopedTypeVariables, PatternGuards, ViewPatterns #-} {- Copyright (C) 2012-2015 John MacFarlane <[email protected]> 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...
infotroph/pandoc
src/Text/Pandoc/Writers/Docx.hs
gpl-2.0
55,702
0
28
16,583
15,592
8,025
7,567
1,014
22
-- | Miscellaneous utilities for various parts of the library module Reddit.Utilities ( unescape ) where import Data.Text (Text) import qualified Data.Text as Text -- | Quick-'n'-dirty unescaping function for posts / wiki pages etc.. unescape :: Text -> Text unescape = replace "&gt;" ">" . replace "&lt;" "<" . repl...
intolerable/reddit
src/Reddit/Utilities.hs
bsd-2-clause
586
0
7
128
113
63
50
11
1
{-# LANGUAGE CPP, BangPatterns #-} module Aws.S3.Core where import Aws.Core import Control.Arrow ((***)) import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.Resource (MonadThrow, throwM) import Crypto.Hash import ...
romanb/aws
Aws/S3/Core.hs
bsd-3-clause
20,800
0
18
6,661
4,490
2,434
2,056
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} module Stack.ConfigSpec where import Data.Aeson.Extended import Data.Yaml import Path import Path.IO hiding (withSystemTempDir) import Stack.Config import Stack.Prelude import Stack....
MichielDerhaeg/stack
src/test/Stack/ConfigSpec.hs
bsd-3-clause
6,310
0
26
1,588
1,478
719
759
148
2
module GetContents where import qualified Github.Repos as Github import Data.List import Prelude hiding (truncate, getContents) main = do putStrLn "Root" putStrLn "====" getContents "" putStrLn "LICENSE" putStrLn "=======" getContents "LICENSE" getContents path = do contents <- Github.contentsFor "mik...
bitemyapp/github
samples/Repos/Contents.hs
bsd-3-clause
1,346
0
12
241
373
182
191
34
1
module Parse.Binop (binops, OpTable) where import qualified Data.List as List import qualified Data.Map as Map import Text.Parsec ((<|>), choice, getState, try) import AST.Declaration (Assoc(L, N, R)) import AST.Expression.General (Expr'(Binop)) import qualified AST.Expression.Source as Source import qualified AST.Va...
laszlopandy/elm-compiler
src/Parse/Binop.hs
bsd-3-clause
3,497
0
17
1,027
1,338
701
637
101
3
module T16114 where data T a instance Eq a => Eq a => Eq (T a) where (==) = undefined
sdiehl/ghc
testsuite/tests/rename/should_fail/T16114.hs
bsd-3-clause
87
1
7
21
44
24
20
-1
-1
{-# htermination enumFromTo :: Int -> Int -> [Int] #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_enumFromTo_4.hs
mit
55
0
2
10
3
2
1
1
0
{-# LANGUAGE LambdaCase, ConstraintKinds #-} ------------------------------------------------------------------------------ -- | -- Module : RemindHelpers -- Copyright : (C) 2014 Samuli Thomasson -- License : BSD-style (see the file LICENSE) -- Maintainer : Samuli Thomasson <samuli.thomasson@pa...
TK009/loyly
RemindHelpers.hs
mit
2,973
0
16
718
669
363
306
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE...
jhedev/todobackend-servant
src/Main.hs
mit
5,848
0
24
1,583
1,626
851
775
132
2
{-# OPTIONS_GHC -XTypeFamilies -XRank2Types #-} {-| This library provides a collection of monad transformers that can be combined to produce various monads. -} module MonadLib ( -- * Types -- $Types Id, Lift, IdT, ReaderT, WriterT, StateT, ExceptionT, ChoiceT, ContT, -- * Lifting -- $Lifting MonadT(..)...
yav/monadlib
experimental/MonadLibTF.hs
mit
24,318
0
14
6,099
9,100
4,718
4,382
-1
-1
module Main ( main ) where {- Automatic solver for Android game "tents & trees" -} {- Design: for now I think the most difficult part will be, given an image, to recognize board position and extract board configuration from it. good old matchTemplate should work, but here I want to see if there are b...
Javran/misc
auto-tents/src/Main.hs
mit
2,344
0
6
546
31
18
13
4
1
module Part2 where import Control.Monad data Item = Item { name :: String, description :: String, weight :: Int, value :: Int } | Weapon { name :: String, description :: String, weight :: Int, value :: Int, damage :: Int } | Armor { name :: String, description :: String, weight :: Int, value :...
utilForever/ProgrammingPractice
Solutions/MoNaDDu/Game Shop/3/Part3.hs
mit
4,510
0
16
1,456
1,382
776
606
80
1
module NeatInterpolation.String where import NeatInterpolation.Prelude unindent :: [Char] -> [Char] unindent s = case lines s of head : tail -> let unindentedHead = dropWhile (== ' ') head minimumTailIndent = minimumIndent . unlines $ tail unindentedTail = case minimumTailInden...
nikita-volkov/neat-interpolation
library/NeatInterpolation/String.hs
mit
1,083
0
17
261
398
209
189
28
3
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.NavigatorUserMediaError (js_getConstraintName, getConstraintName, NavigatorUserMediaError, castToNavigatorUserMediaError, gTypeNavigatorUserMediaError) where import Prelude ((.), (==), (>>=),...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/NavigatorUserMediaError.hs
mit
1,537
6
10
191
365
233
132
25
1
{-# LANGUAGE OverloadedStrings, FlexibleContexts, ScopedTypeVariables #-} module ProcessStatus ( processStatuses , RetryAPI(..) ) where import Data.Conduit import Data.Conduit.Binary import qualified Data.Conduit.Attoparsec as CA import Network.HTTP.Conduit import qualified ...
blitzcode/jacky
src/ProcessStatus.hs
mit
10,047
0
26
4,354
1,739
885
854
160
10
{-# htermination concat :: [[a]] -> [a] #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_concat_1.hs
mit
44
0
2
8
3
2
1
1
0
{-# LANGUAGE TemplateHaskell #-} -- Copyright (c) 2005,8 Jean-Philippe Bernardy module Yi.KillRing (Killring ,krKilled ,krContents ,krEndCmd ,krPut ,krSet, krGet ,krEmpty ) where i...
codemac/yi-editor
src/Yi/KillRing.hs
gpl-2.0
2,151
0
13
743
514
297
217
44
3
{- The parser combinators used when reading in input as a DCFG. This was created as Project 2 for EECS 665 at the University of Kansas. Author: Ryan Scott -} module LR0ItemSet.Parse (parseGrammar) where import Control.Applicative hiding ((<|>), many) import Data.Char import Data.Functor import LR0ItemSet.Data imp...
RyanGlScott/lr0-item-set
src/LR0ItemSet/Parse.hs
gpl-3.0
1,302
0
10
226
221
122
99
24
1
module Text.Gedcom.Parser (gedcom) where import Control.Applicative import Data.Attoparsec.ByteString.Char8 ( Parser , char , isDigit , string ) import qualified Data.Attoparsec.ByteString.Char8 as AT import Data.Attoparsec.Combinator import Data.ByteString (ByteString) import qualified Data.ByteString....
benjumanji/gedcom
src/Text/Gedcom/Parser.hs
gpl-3.0
1,784
0
13
399
706
376
330
54
3
----------------------------------------------------------------------------- -- | -- Module : Main -- Copyright : (c) Gushcha Anton 2013-2014 -- License : GNU GPLv3 (see the file LICENSE) -- -- Maintainer : [email protected] -- Stability : experimental -- Portability : portable -- -- St...
NCrashed/PowerCom
src/powercom/Main.hs
gpl-3.0
1,472
0
13
296
206
112
94
21
2
{---------------------------------------------------------------------} {- Copyright 2015, 2016 Nathan Bloomfield -} {- -} {- This file is part of Feivel. -} {- ...
nbloomf/feivel
src/Feivel/Parse/Expr.hs
gpl-3.0
5,702
0
17
1,563
1,465
762
703
122
2
{-# LANGUAGE BangPatterns #-} module Codec.Video.MpegTS where import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString as BS import Data.ByteString.Lazy (empty) import Data.Binary.Get import Data.Word import Data.Bits import Control.Applicative hiding (empty) import Control.Monad import De...
hepek/MPEG-TS
Codec/Video/MpegTS.hs
gpl-3.0
10,124
0
18
3,151
2,919
1,492
1,427
352
4
module L0216 where data Stream0 a = Cons0 a (Stream0 a) deriving Show data Stream1 a = Cons1 a (Stream1 a) | End1 deriving Show instance Functor Stream0 where fmap f (Cons0 a b) = Cons0 (f a) (fmap f b) a = Cons0 1 $ Cons0 2 $ Cons0 3 $ a b = Cons0 4 $ Cons0 5 $ Cons0 6 $ b interleave :: Stream0 a -> Stream0 a -> ...
cwlmyjm/haskell
AFP/L0216.hs
mpl-2.0
1,265
0
10
341
736
365
371
35
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-language/gen/Network/Google/Resource/Language/Documents/AnalyzeSentiment.hs
mpl-2.0
5,603
0
18
1,347
857
497
360
123
1
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} module Model.Category ( module Model.Category.Types , allCategories , getCategory , getCategory' , categoryJSON , participantCategory ) where import qualified Data.IntMap.Strict as IntMap import Data.Monoid ((<>)) import qualified Data.Text import qual...
databrary/databrary
src/Model/Category.hs
agpl-3.0
2,596
0
11
623
583
316
267
68
1
{-# LANGUAGE OverloadedStrings #-} module Ledger ( accountMap , findParents , transactionLine ) where import Data.Maybe import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import qualified Data.Text as T import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy.Builder as...
pharaun/hGnucash
src/Ledger.hs
apache-2.0
4,991
0
16
1,366
966
514
452
69
3
module GTKMain (main) where import Debug import BattleContext import GTKInitialization (initUI, buildUI, setupUI, startUI) import Data.IORef import Control.Monad.Trans.Reader (runReaderT) dataDir = "/usr/home/nbrk/projects/haskell/ld/executable" main :: IO () main = do putInfo "Starting GTK application" putIn...
nbrk/ld
executable/GTKMain.hs
bsd-2-clause
522
0
8
86
133
68
65
17
1