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
-- 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.AmountOfMon...
facebookincubator/duckling
Duckling/AmountOfMoney/EN/IE/Rules.hs
bsd-3-clause
1,829
0
17
391
452
264
188
51
2
module Renkon.Command.List ( run ) where import ClassyPrelude import Control.Lens.Operators import Formatting import Renkon.Config import Renkon.Util import System.Directory (doesDirectoryExist) import System.FilePath (getSearchPath) import System.FilePath.Find as FilePath run :: Config -> Bool -> IO () run con...
kayhide/renkon
src/Renkon/Command/List.hs
bsd-3-clause
2,202
0
18
442
784
380
404
-1
-1
{-# LANGUAGE CPP, DefaultSignatures, EmptyDataDecls, FlexibleInstances, FunctionalDependencies, KindSignatures, ScopedTypeVariables, TypeOperators, UndecidableInstances, ViewPatterns, NamedFieldPuns, FlexibleContexts, PatternGuards, RecordWildCards, DataKinds, NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-orphans ...
aelve/json-x
lib/Json/Internal/Generic.hs
bsd-3-clause
27,487
0
18
6,522
7,479
3,765
3,714
-1
-1
{-# LANGUAGE TemplateHaskell #-} module Quid2Pkg (Quid2Pkg(..)) where -- import Types import Test.Data import qualified Types as T import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as L ( ByteString ,unpack,pack) import Quid2.HRT.Class.Serialize as Class.Serialize -- import Class.Seria...
tittoassini/flat
benchmarks/PkgHRT.hs
bsd-3-clause
871
0
11
123
271
147
124
22
1
module Problem61 where -- -- Problem 61: Cyclical figurate numbers -- -- Triangle, square, pentagonal, hexagonal, heptagonal, and octagonal numbers -- are all figurate (polygonal) numbers and are generated by the following formulae: -- -- Triangle P3,n=n(n+1)/2 1, 3, 6, 10, 15, ... -- Square P4,n=n^2 ...
c0deaddict/project-euler
src/Part2/Problem61.hs
bsd-3-clause
2,434
0
13
498
597
335
262
26
1
module CardDeck ( Deck, createOrderedDeck, getCard, getCards ) where import Card import qualified Data.Vector as V type CardVector = V.Vector Card data Deck = Deck CardVector deriving Show getCard :: Deck -> Int -> Card getCard (Deck xs) n = xs V.! n getCards :: Deck -> [Card] getCards (Deck v) ...
fffej/HS-Poker
CardDeck.hs
bsd-3-clause
525
0
8
112
186
105
81
17
1
module HudsonTest where import Text.ParserCombinators.Parsec import HudsonParser import Test.HUnit import HudsonPreproc (parseResult) param a b c = Just Param {ref = a, paramName = b, paramType = c} func a b c = Just FuncDecl {funcName = a, funcParams = b, funcCode = c} testParamSimple = "Simple param" ~: ...
jschaf/hudson-dev
src/Language/Hudson/HudsonTest.hs
bsd-3-clause
1,314
0
11
366
307
163
144
27
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. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE GADT...
rfranek/duckling
Duckling/Numeral/ES/Rules.hs
bsd-3-clause
8,586
0
19
2,117
2,478
1,433
1,045
251
5
{-# OPTIONS_GHC -fno-warn-orphans #-} module Ed25519 ( benchmarks -- :: IO [Benchmark] ) where import Criterion.Main import Crypto.Key import Crypto.Sign.Ed25519 import Control.DeepSeq import qualified Data.ByteString as B import Util ...
thoughtpolice/hs-nacl
benchmarks/Ed25519.hs
bsd-3-clause
874
0
12
269
268
140
128
22
1
{-# LANGUAGE ScopedTypeVariables, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses, FlexibleInstances #-} module NestedPatMatch where import Data.Maybe import Language.XHaskell [xh| data Foo = Foo (Star Bar) deriving Show data Bar = Bar deriving Show f :: Foo -> Choice Foo () f (Foo (x :: Bar)) = Foo x f (Foo ...
luzhuomi/xhaskell
test/NestedPatMatch.hs
bsd-3-clause
898
0
4
236
23
16
7
5
0
import Graphics.Efl.Simple import Control.Monad (when) import Paths_graphics_efl main :: IO () main = do initWindowingSystem engines <- getEngines putStrLn (show engines) let engine = if "opengl_x11" `elem` engines then Just "opengl_x11" else Nothing withDefaultWindow engine $ \ win ...
hsyl20/graphics-efl
examples/Simple.hs
bsd-3-clause
6,156
0
28
2,299
1,824
882
942
137
5
------------------------------------------------------------------------ -- | -- Module : ALife.Creatur.Wain.AudioID.Experiment -- Copyright : (c) Amy de Buitléir 2012-2016 -- License : BSD-style -- Maintainer : amy@nualeargais.ie -- Stability : experimental -- Portability : portable -- -- A data mi...
mhwombat/exp-audio-id-wains
src/ALife/Creatur/Wain/AudioID/Experiment.hs
bsd-3-clause
20,431
0
19
4,291
6,469
3,245
3,224
502
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} module System.HFind.Expr.Eval ( Eval , EvalContext ,...
xcv-/pipes-find
src/System/HFind/Expr/Eval.hs
mit
6,295
0
15
1,505
1,886
974
912
166
2
{-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Test.AWS.Gen.DeviceFarm -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Bren...
fmapfmapfmap/amazonka
amazonka-devicefarm/test/Test/AWS/Gen/DeviceFarm.hs
mpl-2.0
12,656
0
7
2,819
1,492
878
614
259
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} {-# LANG...
fmapfmapfmap/amazonka
gen/src/Gen/Tree.hs
mpl-2.0
6,199
0
22
2,326
1,759
917
842
-1
-1
{-# LANGUAGE PatternGuards #-} module CPS.FromGHC where import CPS.Syntax hiding (Subst, renameIdBinder) import qualified GHC.Data as G import qualified GHC.Var as G import qualified GHC.Syntax as G import qualified GHC.Type as G import qualified GHC.Kind as G import GHC.Primitives import Name import Utilities -- F...
beni55/cps-core
CPS/FromGHC.hs
bsd-3-clause
14,206
0
27
3,983
4,612
2,451
2,161
169
14
import Diagrams.Prelude hiding (doRender) import Diagrams.Backend.OpenGL import Diagrams.Backend.OpenGL.CmdLine main :: IO () main = do defaultMain d v1 :: R2 v1 = r2 (0,1) v2 :: R2 v2 = r2 (0.5,-0.5) p :: Path R2 p = pathFromTrail . closeTrail $ fromOffsets [v1,v2] p2_ :: Path R2 p2_ = pathFromTrail . closeTrai...
mbernat/diagrams-opengl
examples/polygons.hs
bsd-3-clause
459
0
11
94
214
114
100
17
1
-- Copyright (c) 2014-present, Facebook, Inc. -- All rights reserved. -- -- This source code is distributed under the terms of a BSD license, -- found in the LICENSE file. {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE S...
simonmar/Haxl
tests/SleepDataSource.hs
bsd-3-clause
1,179
0
9
186
248
137
111
-1
-1
{-# LANGUAGE CPP #-} module TcSimplify( simplifyInfer, pickQuantifiablePreds, growThetaTyVars, simplifyAmbiguityCheck, simplifyDefault, simplifyTop, simplifyInteractive, solveWantedsTcM, -- For Rules we need these twoo solveWanteds, runTcS ) where #include "H...
fmthoma/ghc
compiler/typecheck/TcSimplify.hs
bsd-3-clause
77,037
1
19
21,347
7,292
3,858
3,434
584
5
{- This module handles generation of position independent code and dynamic-linking related issues for the native code generator. This depends both the architecture and OS, so we define it here instead of in one of the architecture specific modules. Things outside this module which are related to this: + ...
olsner/ghc
compiler/nativeGen/PIC.hs
bsd-3-clause
34,518
0
20
10,544
4,908
2,499
2,409
437
9
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="sr-SP"> <title>GraalVM JavaScript</title> <maps> <homeID>graaljs</homeID> <mapref locat...
thc202/zap-extensions
addOns/graaljs/src/main/javahelp/help_sr_SP/helpset_sr_SP.hs
apache-2.0
967
77
66
156
407
206
201
-1
-1
module OrphanInstancesClass (AClass(..)) where class AClass a where aClass :: a -> Int
niteria/haddock
html-test/src/OrphanInstancesClass.hs
bsd-2-clause
90
0
7
16
31
18
13
3
0
{-# LANGUAGE OverloadedStrings #-} -- | BigTable benchmark implemented using Hamlet. -- {-# LANGUAGE QuasiQuotes #-} module Main where import Criterion.Main import Text.Hamlet import Numeric (showInt) import qualified Data.ByteString.Lazy as L import qualified Text.Blaze.Html.Renderer.Utf8 as Utf8 import Data.Monoid (...
ygale/yesod
yesod-core/bench/widget.hs
mit
1,816
0
14
429
468
265
203
37
1
----------------------------------------------------------------------------- -- | -- Module : XMonad.Util.Dzen -- Copyright : (c) glasser@mit.edu -- License : BSD -- -- Maintainer : glasser@mit.edu -- Stability : stable -- Portability : unportable -- -- Handy wrapper for dzen. Requires dzen >= 0.2....
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Util/Dzen.hs
bsd-2-clause
6,457
0
19
1,303
1,080
614
466
73
2
import Test.Hspec import qualified YesodCoreTest main :: IO () main = hspec YesodCoreTest.specs
psibi/yesod
yesod-core/test/test.hs
mit
97
0
6
14
30
16
14
4
1
{-# LANGUAGE GADTs #-} module Main where import Data.IORef data T a where Li:: Int -> T Int Lb:: Bool -> T Bool La:: a -> T a writeInt:: T a -> IORef a -> IO () writeInt v ref = case v of ~(Li x) -> writeIORef ref (1::Int) readBool:: T a -> IORef a -> IO () readBool v ref = case v of ...
ezyang/ghc
testsuite/tests/gadt/rw.hs
bsd-3-clause
610
0
10
225
278
135
143
22
1
-- | Register available actions and how they will be called module Shaker.PluginConfig where import qualified Data.Map as M (fromList) import Shaker.Type import Shaker.Action.Test import Shaker.Action.Compile import Shaker.Action.Standard -- | The default plugin map contains mapping for compile, help and exit action...
bonnefoa/Shaker
src/Shaker/PluginConfig.hs
isc
1,207
0
11
365
266
170
96
28
1
import Common main = print $ foldl (\acc x -> 10*acc + x) 0 $take 10 $ toDigits $ sum numbers numbers = [ 37107287533902102798797998220837590246510135740250, 46376937677490009712648124896970078050417018260538, 74324986199524741059474233309513058123726617309629, 91942213363574161572522430563301811072406154908250,...
lekto/haskell
Project-Euler-Solutions/problem0013.hs
mit
5,409
0
12
227
357
229
128
103
1
module U.Codebase.Sqlite.Patch.Format where import Data.Vector (Vector) import U.Codebase.Sqlite.DbId (HashId, ObjectId, PatchObjectId, TextId) import U.Codebase.Sqlite.Patch.Diff (LocalPatchDiff) import U.Codebase.Sqlite.Patch.Full (LocalPatch) import Data.ByteString (ByteString) data PatchFormat = Full PatchLocal...
unisonweb/platform
codebase2/codebase-sqlite/U/Codebase/Sqlite/Patch/Format.hs
mit
648
0
9
84
152
93
59
16
0
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, TypeFamilies #-} module Main where import Data.Bits import Data.Monoid import Control.Monad import Control.Exception import System.Socket import System.Socket.Family.Inet as Inet import System.Exit main :: IO () main = do t0001 t0002 t0003 t0001 :: IO () t0...
nh2/haskell-socket
tests/AddrInfo.hs
mit
1,838
0
13
520
665
332
333
55
2
module Twelve where import Data.Char (toUpper) import Data.List (intersperse, unfoldr) notThe :: String -> Maybe String notThe w | w == "the" || w == "The" = Nothing | otherwise = Just w removeThe :: Maybe String -> String removeThe (Just x) = x removeThe Nothing = "a" replaceThe :: String -> String replaceThe s...
mudphone/HaskellBook
src/Twelve.hs
mit
3,627
0
13
915
1,917
999
918
106
3
-- A tutorial on the universality and expressiveness of fold -- TODO: https://jeremykun.com/tag/foldr/ -- foldr -- f x acc fold :: (a -> b -> b) -> b -> [a] -> b fold f v [] = v fold f v (x:xs) = f x (fold f v xs) -- foldl f v (x:xs) = f (fold f v xs) x -- f acc n product = fold (*) 0 and = fold (&) True or = fold (...
Airtnp/Freshman_Simple_Haskell_Lib
Theoritical/Universal-fold.hs
mit
2,945
2
12
920
826
479
347
-1
-1
module Countdown where data Op = Add | Sub | Mul | Div instance Show Op where show Add = "+" show Sub = "-" show Mul = "*" show Div = "/" valid :: Op -> Int -> Int -> Bool valid Add _ _ = True valid Sub x y = x > y valid Mul _ _ = True valid Div x y = x `mod` y == 0 apply :: Op -> Int -> Int -> Int appl...
brodyberg/LearnHaskell
CaesarCypher.hsproj/Countdown.hs
mit
1,051
0
10
444
511
261
250
33
1
{-# LANGUAGE FlexibleContexts, ScopedTypeVariables, StandaloneDeriving #-} module Eval where import Prelude hiding (id, exp) import qualified Prelude import Control.Lens hiding (reuses) import Data.Either (partitionEithers) import Data.Map (Map) import qualified Data.Map as Map import Data.Set (Set) import qualified D...
imccoy/utopia
src/Eval.hs
mit
12,800
0
23
4,348
4,523
2,253
2,270
-1
-1
import Data.Tuple import Data.Maybe import Data.List.Extra import Data.Map (Map) import qualified Data.Map as M test1_map :: OrbitMap test1_map = mkMap [ "COM)B", "B)C", "C)D", "D)E", "E)F", "B)G", "G)H", "D)I", "E)J", "J)K", "K)L"] test2_map :: OrbitMap test2_map = mkMap [ "COM)B", "B)C", ...
wizzup/advent_of_code
2019/haskell/exe/Day06.hs
mit
1,355
0
12
360
552
297
255
63
1
-- (220、284)、(1,184、1,210)、(2,620、2,924)、(5,020、5,564)、(6,232、6,368)、 -- import System.Environment amicable :: Int -> Int -> Bool amicable n m | sum(propDivis n) /= m = False | otherwise = sum(propDivis m) == n amicables :: Int -> [[Int]] amicables n = [[i,j]|i<-[4..n],j<-[i..min n (i*16`div`10)],amic...
yuto-matsum/contest-util-hs
src/Euler/021.hs
mit
689
0
12
145
379
192
187
18
2
{- Copyright (c) 2008-2015 the Urho3D project. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publis...
Teaspot-Studio/Urho3D-Haskell
app/sample06/Mover.hs
mit
4,305
0
21
832
699
361
338
-1
-1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import qualified Map import Control.Applicative import Control.Concurrent.Async import Control.Concurrent.MSem import Control.Concurrent.Timeout import Control.Monad.Catch import ...
gridaphobe/target
bench/MapCoverage.hs
mit
14,904
0
20
3,362
7,560
3,999
3,561
162
5
-- Number-Star ladder -- https://www.codewars.com/kata/5631213916d70a0979000066 module Codewars.Kata.NumberStar where import Data.List(intercalate) pattern :: Int -> String pattern n = intercalate "\n" . ("1" :) . map (\i -> "1" ++ replicate (pred i) '*' ++ show i) $ [2..n]
gafiatulin/codewars
src/7 kyu/NumberStar.hs
mit
278
4
12
41
91
52
39
4
1
{- This module was generated from data in the Kate syntax highlighting file actionscript.xml, version 1.0, by Aaron Miller (armantic101@gmail.com) -} module Text.Highlighting.Kate.Syntax.Actionscript (highlight, parseExpression, syntaxName, syntaxExtensions) where import Text.Highlighting.Kate.Types impor...
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Actionscript.hs
gpl-2.0
11,196
0
36
2,205
2,259
1,204
1,055
158
10
module Std where import Expressions import Eval import qualified Data.Map as Map import Control.Monad.State import Control.Monad.Error true = "t" false = "nil" nothing = "nil" -- Helper functions getSymbol sym = eval $ LispSymbol sym getSymbols syms = mapM getSymbol syms -- Primitives lispQuote = g...
aksiazek/yali
src/Std.hs
gpl-2.0
6,200
24
15
2,165
1,915
986
929
123
3
module GlobRegex ( globToRegex, matchesGlob ) where import Text.Regex.Posix((=~)) type GlobError = String globToRegex :: String -> Either GlobError String globToRegex cs = case globToRegex' cs of Right result -> Right ('^' : result ++ "$") Left error -> Left error globToRegex' :: String -> Either GlobError St...
Tr1p0d/realWorldHaskell
rwh8/GlobRegex.hs
gpl-2.0
1,658
58
11
429
729
356
373
44
6
import System.Environment (getArgs) import System.IO (readLn, getLine) main :: IO() main = do -- args <- getArgs args <- getLine let xs = map read $ words args let x = head xs let y = head $ tail xs let z = last xs putStrLn . show $ mod_fib x y (z-1) mod_fib :: Integer -> Integer -> Integer -> Integer mo...
woodsjc/hackerrank-challenges
hackerrank_fib_modified.hs
gpl-3.0
456
0
11
117
243
120
123
16
1
module BackendState where import System.ZMQ data NetworkState = NetworkState { zmqContext :: Context , replySock :: Socket Rep , requestSock :: Socket Req , broadcastSock :: Socket Pub ...
imalsogreg/arte-ephys
arte-backend/src/System/Arte/Backend/BackendState.hs
gpl-3.0
1,121
1
11
494
238
126
112
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : Text.BlogLiterately.Highlight -- Copyright : (c) 2008-2010 Robert Greayer, 2012 Brent Yorgey -- License : GPL (see LICENSE) -- Maintainer : Brent Yorgey <byorgey@gmail.com>...
jwiegley/BlogLiterately
src/Text/BlogLiterately/Highlight.hs
gpl-3.0
10,848
0
16
2,663
1,350
755
595
105
7
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} import Chorale.Common import qualified Codec.Compression.GZip as GZip import Control.Monad import Data.Aeson hiding (Result) import qualified Data.ByteString as BB import qualified Data.By...
mocnik-science/osm-vis
data-mining/osm-node-changes-per-area/tool.hs
gpl-3.0
4,869
81
15
734
1,319
714
605
75
2
module Inkvizitor.Geocode ( Coords(..) , Query(..) , Location(..) , geocode ) where import Codec.Binary.UTF8.String import Control.Applicative import Control.Monad import Network.HTTP import Network.URI import Text.JSON ( decode , fromJSObject , fromJSString , resultToEither , JSValue(..) ) d...
honzasp/inkvizitor
Inkvizitor/Geocode.hs
gpl-3.0
2,670
0
16
593
745
393
352
64
3
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} module Hadolint.Formatter.TTY ( printResults, formatCheck, formatError, ) where import Colourista import qualified Control.Foldl as Foldl import qualified Data.Text as Text import Hadolint.Formatter.Format import Hadolint.Rule (CheckFailur...
lukasmartinelli/hadolint
src/Hadolint/Formatter/TTY.hs
gpl-3.0
1,914
0
11
352
574
306
268
46
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySites/List.hs
mpl-2.0
11,002
5
30
2,956
1,639
941
698
234
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.PageSpeed.T...
rueshyna/gogol
gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Product.hs
mpl-2.0
45,491
0
23
10,542
7,915
4,509
3,406
903
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/List.hs
mpl-2.0
6,676
0
21
1,690
951
546
405
141
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE ViewPatterns #-} module Xmpp where import Control.Applicative import ...
pontarius/pontarius-service
source/Xmpp.hs
agpl-3.0
29,070
0
30
10,872
7,751
3,781
3,970
-1
-1
module Evaluate where {- const 1 undefined = \a -> \b -> a \1 -> \_ -> 1 1 const undefined 1 = \a -> \b -> a \undefined -> \_ -> undefined undefined flip const undefined 1 = (\a -> \b -> c) -> \b -> \a -> c let b = undefined, a = 1 in (\a -> \_ -> a) \1 -> \_ ->...
thewoolleyman/haskellbook
27/04/maor/Evaluate.hs
unlicense
1,000
0
2
376
5
4
1
1
0
module Main where import Test.HUnit import Test.Framework import Test.Framework.Providers.HUnit import Solutions.Problem001 as P1 tests = TestList [ TestCase (assertEqual "Test 1a" 23 (P1.solution 10)), TestCase (assertEqual "Test 1b" 233168 (P1.solution 1000)) ] main = defaultMain $ hUnitTestToTests te...
jhnesk/project-euler
test/UnitTests.hs
unlicense
324
0
12
54
96
53
43
9
1
module Terminology.CommonAbbrev (quizByAbbrev, quizByMeaning) where import Colors terms = [("ADD","attention deficit disorder") ,("ADR","adverse drug reaction") ,("AIDS","acquired immunodeficiency syndrome") ,("AV","atrial-ventricular") ,("AMI","acute myocardial infarction") ,(...
kohabi/rxquiz
src/Terminology/CommonAbbrev.hs
unlicense
3,289
0
9
865
793
520
273
81
1
module Language.Drasil.Format where -- | Possible formats for output data Format = TeX | Plain | HTML
JacquesCarette/literate-scientific-software
code/drasil-printers/Language/Drasil/Format.hs
bsd-2-clause
104
0
5
19
21
14
7
2
0
module Text.Tokenize.Util.String ( unHyphen ) where unHyphen :: String -> String unHyphen ('‑':'\n':xs) = unHyphen xs unHyphen (x:xs) = x : unHyphen xs unHyphen [] = []
kawu/tokenize
Text/Tokenize/Util/String.hs
bsd-2-clause
172
0
8
28
78
42
36
6
1
-- Collztz sequences chain :: (Integral a) => a -> [a] chain 1 = [1] chain n | even n = n:chain (n `div` 2) | odd n = n:chain (n * 3 + 1) numLongChains :: Int numLongChains = length (filter (\xs -> length xs > 15) (map chain [1..100])) addThree :: (Num a) => a -> a -> a -> a addThree = \x -> \y -> \z -> x + y...
sharkspeed/dororis
languages/haskell/LYHGG/6-higher-order-functions/2-lambda.hs
bsd-2-clause
388
0
11
109
248
130
118
11
1
{-# LANGUAGE PackageImports #-} -- {-# LANGUAGE PackageImports, FlexibleContexts, FlexibleInstances, UndecidableInstances, RankNTypes #-} -- , OverlappingInstances {- | Radix sort of lists, based on binary representation of * floats * Int<N> * Word<N> The lsd prefix is for Lea...
griba2001/haskell-binaryrep-radix-sort
Data/List/RadixSort/Base.hs
bsd-2-clause
5,805
0
10
1,194
1,350
762
588
66
3
module Database.SqlServer.Create.PartitionFunction ( PartitionFunction ) where import Prelude hiding (Left, Right) import Database.SqlServer.Create.Identifier hiding (unwrap) import Database.SqlServer.Create.DataType import Database.SqlServer.Create.Value import Database.SqlServer.Create.Entity...
fffej/sql-server-gen
src/Database/SqlServer/Create/PartitionFunction.hs
bsd-2-clause
2,086
0
17
407
498
268
230
47
1
module Main where import Prelude hiding (lookup) import Control.Concurrent import Control.DeepSeq import Control.Monad import Data.Binary.Put import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL import Data.IORef import System.Mem import Data.Disk.Swapper import Data.Disk.Swapper.Cac...
roman-smrz/swapper
test/test.hs
bsd-2-clause
2,151
0
15
841
704
336
368
61
1
{-# LANGUAGE NoImplicitPrelude #-} module Bamboo.Plugin.Photo.View where import Bamboo.Plugin.Photo.Model import MPSUTF8 import Prelude hiding ((.), (>), (^), (/), id, div) import Text.XHtml.Strict hiding (select, sub, meta) id :: String -> HtmlAttr id = identifier div_id :: String -> Html -> Html div_id s = thedi...
nfjinjing/bamboo-plugin-photo
src/Bamboo/Plugin/Photo/View.hs
bsd-3-clause
2,106
0
12
553
826
447
379
-1
-1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.PixelRectangles.Convolution -- Copyright : (c) Sven Panne 2002-2005 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : sven.panne@aedion.de -- St...
FranklinChen/hugs98-plus-Sep2006
packages/OpenGL/Graphics/Rendering/OpenGL/GL/PixelRectangles/Convolution.hs
bsd-3-clause
12,502
4
19
1,834
2,584
1,354
1,230
-1
-1
{-# Language PatternGuards #-} module Blub ( blub , foo , bar ) where #include "Foo.h" #ifdef FOO import Control.Applicative #endif import Control.BiFunctor import Control.Monad f :: Int -> Int -- ^ Some Haddock doc -- One line more f = (+ 3) g :: Int -> Int g = where
dan-t/hsimport
tests/goldenFiles/ModuleTest37.hs
bsd-3-clause
289
0
5
71
68
44
24
-1
-1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE...
jfischoff/hs-mitsuba
src/Mitsuba/Utils.hs
bsd-3-clause
6,458
0
14
1,863
1,555
848
707
217
1
module Goblin.Workshop.Scheduler where import Control.Concurrent import Control.Concurrent.STM import Control.Monad import Goblin.Workshop.Types import Goblin.Workshop.Util import System.Log.Logger import Text.Printf newSchedulerBus :: STM (Schedul...
y-usuzumi/goblin-workshop
src/Goblin/Workshop/Scheduler.hs
bsd-3-clause
1,894
0
23
543
510
238
272
43
6
module SecondFront.Config ( module SecondFront.Config.Defaults, module SecondFront.Config.Types )where import SecondFront.Config.Defaults import SecondFront.Config.Types
alcidesv/second-front
hs-src/SecondFront/Config.hs
bsd-3-clause
190
0
5
32
34
23
11
5
0
{-# LANGUAGE PatternGuards, TypeSynonymInstances, CPP #-} module IRTS.Compiler(compile, generate) where import IRTS.Lang import IRTS.LangOpts import IRTS.Defunctionalise import IRTS.Simplified import IRTS.CodegenCommon import IRTS.CodegenC import IRTS.DumpBC import IRTS.CodegenJavaScript import IRTS.Inliner import IR...
rpglover64/Idris-dev
src/IRTS/Compiler.hs
bsd-3-clause
26,376
0
21
8,816
7,987
3,965
4,022
440
30
module Main(main) where import PolyPaver.Invocation import Data.Ratio ((%)) main = defaultMain Problem { box = [(0,(409018325532672 % 579004697502343,9015995347763200 % 6369051672525773)),(1,(1 % 2,2 % 1))] ,theorem = thm } thm = Implies (Geq (Var 0) (Over (Over (Lit (1023 ...
michalkonecny/polypaver
examples/old/their_sqrt/their_sqrt_11.hs
bsd-3-clause
1,018
0
29
194
608
323
285
9
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# OPTIONS -Wall #-} -- | -- Module ...
time-cube/time-cube
src/GHC/TypeLits/SigNat.hs
bsd-3-clause
2,116
0
13
500
448
248
200
38
2
{- BlendEqn.hs (adapted from blendeqn.c which is (c) Silicon Graphics, Inc.) Copyright (c) Sven Panne 2002-2005 <sven.panne@aedion.de> This file is part of HOpenGL and distributed under a BSD-style license See the file libraries/GLUT/LICENSE Demonstrate the different blending functions available with th...
FranklinChen/hugs98-plus-Sep2006
packages/GLUT/examples/RedBook/BlendEqn.hs
bsd-3-clause
3,007
0
12
736
593
297
296
50
7
{-# LANGUAGE TemplateHaskell, GeneralizedNewtypeDeriving #-} import System.IO import System.Linux.Input.Event import Control.Concurrent.STM import Control.Concurrent import Control.Lens import Control.Applicative import Data.Int import Data.Functor.Rep import Linear import Control.Monad (forever) import Control.Monad....
bgamari/navigate
Navigate.hs
bsd-3-clause
6,750
0
19
2,242
2,203
1,075
1,128
-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. module Duckling.Time.IT.Tests ( tests ) where import Data.String import Prelude import Test.Tasty import Duck...
facebookincubator/duckling
tests/Duckling/Time/IT/Tests.hs
bsd-3-clause
549
0
9
85
93
57
36
12
1
{-# LANGUAGE RecordWildCards #-} module Tronkell.Server.Server where import Tronkell.Server.Types as Server import Tronkell.Game.Types as Game import Tronkell.Types() import Tronkell.Game.Engine as Engine import qualified Tronkell.Utils as SUtils import qualified Tronkell.Network.Websockets as W import qualified Tron...
nilenso/tronkell
src/Tronkell/Server/Server.hs
bsd-3-clause
9,308
0
22
2,356
2,552
1,237
1,315
187
10
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} -- | Resolving a build plan for a set of packages in a given Stack...
joozek78/stack
src/Stack/BuildPlan.hs
bsd-3-clause
31,150
388
23
10,565
6,800
3,700
3,100
588
5
module Main where import System.Environment import System.Directory import Data.List import Lib main :: IO () main = getArgs >>= parseArgs parseArgs :: [String] -> IO () parseArgs [] = runDefault parseArgs [path] = processDirectory path parseArgs args = photoProcess args runDefault :: IO () runDefault = do putSt...
dominikmayer/photo-process
app/Main.hs
bsd-3-clause
1,091
0
16
199
298
144
154
33
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Y.Buffer where import Control.Lens import Control.Lens.TH import Data.Default import Data.Group import Data.Monoid import qualified Data.Vector as V import qualified Y.String as S data Buffer = Buffer { _text :: S.YiString , _cursorP...
ethercrow/y
src/Y/Buffer.hs
bsd-3-clause
2,078
0
10
462
753
390
363
61
2
module Parse.Helpers where import Prelude hiding (until) import Control.Applicative ((<$>),(<*>),(<*)) import Control.Monad (guard, join) import Control.Monad.State (State) import Data.Char (isUpper) import qualified Data.Map as Map import qualified Language.GLSL.Parser as GLP import qualified Language.GLSL.Syntax as ...
johnpmayer/elm-compiler
src/Parse/Helpers.hs
bsd-3-clause
14,360
0
22
4,121
4,728
2,411
2,317
424
14
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -Wall #-} module Dhall.Import.Types where import Control.Exception (Exception) import Control.Monad.Trans.State.Strict (StateT) import Data.ByteString (ByteString) ...
Gabriel439/Haskell-Dhall-Library
dhall/src/Dhall/Import/Types.hs
bsd-3-clause
8,562
0
11
2,464
1,423
818
605
115
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 TcInstDecls: Typechecking instance declarations -} {-# LANGUAGE CPP #-} module TcInstDcls ( tcInstDecls1, tcInstDecls2 ) where #include "HsVersions.h" import HsSyn import TcBinds import TcTyClsDecls import TcClassDcl( ...
ghc-android/ghc
compiler/typecheck/TcInstDcls.hs
bsd-3-clause
78,248
5
26
23,611
9,001
4,732
4,269
660
5
{-# LANGUAGE FunctionalDependencies #-} module Rachel.Types ( -- * Pretty printing Pretty (..) -- * Rachel values -- ** Primitive values , PrimitiveType (..) , RReal (..), RInteger (..) , RBool (..), RSound (..) -- ** All values , Value (..) -- * Expressions , Id , Exp (..) -- ...
Daniel-Diaz/rachel
Rachel/Types.hs
bsd-3-clause
8,847
0
12
2,268
2,695
1,442
1,253
-1
-1
-- -- HTTP client for use with pipes -- -- Copyright © 2012-2013 Operational Dynamics Consulting, Pty Ltd -- -- The code in this file, and the program it is a part of, is made -- available to you by its authors as open source software: you can -- redistribute it and/or modify it under a BSD licence. -- {-# LANGUAGE Ov...
afcowie/pipes-http
tests/ActualSnippet.hs
bsd-3-clause
1,203
0
11
253
167
96
71
20
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE ...
dmjio/miso
examples/haskell-miso.org/server/Main.hs
bsd-3-clause
6,330
0
17
1,808
1,154
614
540
132
1
#!/usr/bin/env stack -- stack runghc --verbosity info --package hledger-lib -- Run this script from inside the hledger source tree, so that it -- will use the corresponding source version of hledger, which is the -- version it is tested with. -- -- You can compile these scripts by running compile.sh in this directory....
adept/hledger
bin/hledger-check-fancyassertions.hs
gpl-3.0
23,623
94
23
5,969
5,015
2,721
2,294
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-ses/gen/Network/AWS/SES/SetIdentityNotificationTopic.hs
mpl-2.0
4,837
0
9
958
471
290
181
59
1
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="zh-CN"> <title>Replacer | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref lo...
veggiespam/zap-extensions
addOns/replacer/src/main/javahelp/org/zaproxy/zap/extension/replacer/resources/help_zh_CN/helpset_zh_CN.hs
apache-2.0
970
85
52
159
396
209
187
-1
-1
module Haskus.Tests.Common ( isBijective , isEquivalent , ArbitraryByteString (..) , ArbitraryByteStringNoNul (..) , ArbitraryBuffer (..) , ArbitraryBufferNoNul (..) ) where import Test.Tasty.QuickCheck as QC import qualified Data.ByteString as BS import Haskus.Format.Binary.Buffer -- | Ensure...
hsyl20/ViperVM
haskus-system/src/tests/Haskus/Tests/Common.hs
bsd-3-clause
2,345
0
13
524
662
350
312
50
1
{-# LANGUAGE OverloadedStrings #-} ----------------------------------------------------------------------------- -- -- Module : IDE.SourceCandy -- Copyright : (c) Juergen Nicklisch-Franken, Hamish Mackenzie -- License : GNU-GPL -- -- Maintainer : <maintainer at leksah.org> -- Stability : provisional ...
cocreature/leksah
src/IDE/SourceCandy.hs
gpl-2.0
13,617
0
34
4,590
3,518
1,724
1,794
262
7
-- | A parser for the Xtract command-language. (The string input is -- tokenised internally by the lexer 'lexXtract'.) -- See <http://www.haskell.org/HaXml/Xtract.html> for the grammar that -- is accepted. -- Because the original Xtract grammar was left-recursive, we have -- transformed it into a non-left-r...
Ian-Stewart-Binks/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Xtract/Parse.hs
gpl-3.0
12,878
0
22
4,841
3,444
1,735
1,709
226
5
-- | -- Module : Crypto.PubKey.Ed25519 -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- -- Ed25519 support -- {-# LANGUAGE BangPatterns #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Crypto.PubKey.Ed25519...
tekul/cryptonite
Crypto/PubKey/Ed25519.hs
bsd-3-clause
5,061
0
16
1,512
1,025
541
484
103
2
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} module Quoter (quote, quoteFile, quoteFileReload) where import Language.Haskell.TH.Syntax import Language.Haskell.TH.Quote (QuasiQuoter (..)) #ifdef TEST_COFFEE import Text.Coffee import Text.Coffee (coffeeSettings) import Text.Shakespeare (shakespeare...
fgaray/shakespeare
test/Quoter.hs
mit
996
3
13
150
221
125
96
12
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} -- Determine which packages are already installed module Stack.Build.Installed ( InstalledMap , Installed (..) , GetI...
phadej/stack
src/Stack/Build/Installed.hs
bsd-3-clause
11,896
0
19
3,673
2,447
1,289
1,158
225
6
----------------------------------------------------------------------------- -- -- GHCi's :ctags and :etags commands -- -- (c) The GHC Team 2005-2007 -- ----------------------------------------------------------------------------- {-# OPTIONS_GHC -fno-warn-name-shadowing #-} module GHCi.UI.Tags ( createCTagsWithLin...
sdiehl/ghc
ghc/GHCi/UI/Tags.hs
bsd-3-clause
7,831
115
15
1,717
1,887
993
894
148
6
import Test.Cabal.Prelude main = setupTest $ do -- No cabal test because per-component is broken with it skipUnless =<< ghcVersionIs (>= mkVersion [8,1]) withPackageDb $ do let setup_install' args = setup_install_with_docs (["--cabal-file", "Includes2.cabal"] ++ args) setup_install' ["mylib", "-...
mydaum/cabal
cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.test.hs
bsd-3-clause
899
0
17
178
197
102
95
15
1
{- Copyright (C) 2015 John MacFarlane <jgm@berkeley.edu> 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) any later version. This program is distr...
gbataille/pandoc
src/Text/Pandoc/Readers/CommonMark.hs
gpl-2.0
4,286
0
12
1,051
1,203
636
567
78
5
----------------------------------------------------------------------------- -- -- Module : Main -- Copyright : (c) Phil Freeman 2013 -- License : MIT -- -- Maintainer : Phil Freeman <paf31@cantab.net> -- Stability : experimental -- Portability : -- -- | -- ------------------------------------------...
bergmark/purescript
psc-make/Main.hs
mit
4,586
0
18
905
1,362
718
644
101
3
module Graphics.CG.Algorithms.PointInTriangle(pointInTriangle) where import Graphics.CG.Algorithms.Rotate import Graphics.CG.Primitives.Triangle import Graphics.Gloss.Data.Point pointInTriangle :: Point -> Triangle -> Bool pointInTriangle p (p1, p2, p3) = (c1 >= 0 && c2 >= 0 && c3 >= 0) ...
jagajaga/CG-Haskell
Graphics/CG/Algorithms/PointInTriangle.hs
mit
497
0
11
130
166
93
73
9
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds, PolyKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE RankNTypes, ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE TemplateHaskell #-} module List where ...
vladfi1/hs-misc
List.hs
mit
1,470
0
9
326
409
217
192
39
1
import Base.Scene import Base.Camera import Base.Image import SphereScene main = do save 500 500 5
burz/Rayzer
Rayzer.hs
mit
106
0
7
22
34
18
16
6
1
module Main where import Parser import Environment import Eval import PrettyPrint import System.Environment import Text.PrettyPrint.ANSI.Leijen import System.Exit import System.Directory main :: IO () main = do args <- getArgs if null args then do putDoc $ red (text "Error") <> text ": yo...
kellino/TypeSystems
fullSimple/Main.hs
mit
1,099
2
24
379
350
168
182
34
3