code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
module Language.TheExperiment.AST ( module Language.TheExperiment.AST.Type , module Language.TheExperiment.AST.Statement , module Language.TheExperiment.AST.Expression , module Language.TheExperiment.AST.Module ) where import Language.TheExperiment.AST.Type import Language.TheExperiment.AST.Statement import...
jvranish/TheExperiment
src/Language/TheExperiment/AST.hs
bsd-3-clause
400
0
5
36
69
50
19
9
0
----------------------------------------------------------------------------- -- -- Module : MSnail.Game -- Copyright : (c) 2010, Dmitry Zamkov -- License : BSD3 (See LICENSE) -- ----------------------------------------------------------------------------- module MSnail.Game ( GameInputEvent(..), GameI...
dzamkov/MSnail
src/MSnail/Game.hs
bsd-3-clause
2,049
154
19
408
685
357
328
53
1
module Sexy.Instances.Functor.Function () where import Sexy.Classes (Functor(..)) instance Functor ((->) a) where -- (<$>) :: (b -> c) -> (a -> b) -> a -> c (f <$> g) x = f (g x)
DanBurton/sexy
src/Sexy/Instances/Functor/Function.hs
bsd-3-clause
185
1
9
40
68
39
29
4
0
{-# LANGUAGE ForeignFunctionInterface #-} module SimpleFFI( main ) where {- | Module : SimpleFFI Description : Introduction to FFI Copyright : (c) Thomas Lang, "Real World Haskell" License : BSD3 Portability : portable Stability : stable This module gives a short introduction of using the F...
langthom/Hack-A-Thon-Haskell
SimpleFFI.hs
bsd-3-clause
1,051
0
9
216
111
65
46
9
1
module VkModulePrefix ( vulkanModule , vulkanModulePrefix ) where import qualified Data.Text as T import Relude import Render.Element ( ModName(..) ) -- | Module prefix for generated source vulkanModulePrefix :: Text vulkanModulePrefix = "Vulkan" vulkanM...
expipiplus1/vulkan
generate-new/src/VkModulePrefix.hs
bsd-3-clause
415
0
8
113
82
51
31
10
1
{-# LANGUAGE OverloadedStrings, Safe #-} module Evalso.Cruncher.Language.Bash (bash) where import Evalso.Cruncher.Language (Language (..)) bash :: Language bash = Language { _codeFilename = "program.sh" , _compileCommand = Nothing , _compileTimeout = Nothing , _runCommand = ["bash", "program.sh"] , _runT...
eval-so/cruncher
src/Evalso/Cruncher/Language/Bash.hs
bsd-3-clause
403
0
7
74
95
63
32
13
1
module D13Spec (main, spec) where import Test.Hspec import D13Lib import qualified PathSearch as PS main :: IO () main = hspec spec spec :: Spec spec = parallel $ do describe "num2bin" $ it "formats numbers" $ do num2bin 1 `shouldBe` "1" num2bin 2 `shouldBe` "10" num2...
wfleming/advent-of-code-2016
2016/test/D13Spec.hs
bsd-3-clause
1,000
0
19
316
392
221
171
24
1
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ {-# LANGUAGE MagicHash, DeriveDataTypeable, StandaloneDeriving #-} #endif #if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Trustworthy #-} #endif {-# LANGUAGE ScopedTypeVariables #-} #if __GLASGOW_HASKELL__ >= 708 {-# LANGUAGE TypeFamilies #-} #endif --------...
hvr/containers
Data/IntMap/Base.hs
bsd-3-clause
83,511
0
22
21,659
19,069
9,887
9,182
-1
-1
module Deflisp.CoreSpec (main, spec) where import Test.Hspec import Deflisp.Core import Deflisp.Core.Show import Deflisp.Core.Types import Deflisp.Core.Parser -- import Control.Monad.State main :: IO () main = hspec spec spec :: Spec spec = do describe "parsing" $ do it "empty list is parsed as an empty list...
ifesdjeen/deflisp
test/DefLisp/CoreSpec.hs
bsd-3-clause
2,582
0
21
870
528
261
267
44
1
module NWA ( new, exec, NWA, State(..), Symbol(..), Transition(..) ) where import qualified Data.Set as DataSet import Stack newtype State = State Int deriving (Eq, Ord, Show) data Transition a = Internal State a State | Call State a (Symbol Int, State) | Return (Symbol Int, State) a State de...
katydid/nwe
src/NWA.hs
bsd-3-clause
3,823
0
13
885
1,781
931
850
66
4
{-# LANGUAGE KindSignatures #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE MonadComprehensions #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUA...
mstksg/expr-gadt
src/Data/ExprGADT/Dumb.hs
bsd-3-clause
5,461
0
11
1,767
1,871
963
908
137
6
module Sodium.Chloride.Inline (inline) where import Control.Applicative import Control.Monad.Reader import Control.Lens hiding (Index, Fold) import qualified Data.Map as M import Sodium.Chloride.Program.Vector import Sodium.Chloride.Recmap.Vector import Sodium.ApplyOnce inline :: Program -> Program inline = recmapPro...
kirbyfan64/sodium
src/Sodium/Chloride/Inline.hs
bsd-3-clause
3,550
62
14
605
834
472
362
-1
-1
module Test.Balance where import Data.Interval import Data.IntervalSet as IS balanced :: IntervalSet -> Bool balanced Empty = True balanced (IntervalSet i t) = balancedTree i 1 1 t balancedTree :: Interval -> Int -> Int -> Tree -> Bool balancedTree (Interval a b) lmin rmin Leaf = b - a >=max lmin rmin balancedTree (...
ian-mi/interval-set
tests/Test/Balance.hs
bsd-3-clause
930
0
11
204
356
182
174
19
1
{-# LANGUAGE FlexibleContexts #-} import Data.Point2d import Data.KdTree.Static as KDT import Data.KdTree.Dynamic as DKDT import Control.DeepSeq import Control.Monad import qualified Control.Monad.Random as CMR import Criterion.Main import Data.List import Data.Maybe import qualified Data.Heap as Q import System.Rand...
ScrambledEggsOnToast/kdt
app-src/Benchmarks/KDTBenchmark.hs
mit
6,396
6
17
1,634
2,295
1,163
1,132
128
2
{-# LANGUAGE OverloadedStrings, ExistentialQuantification, ExtendedDefaultRules, FlexibleContexts, TemplateHaskell #-} module Dashdo.Examples.TestDashdo where import Numeric.Datasets.Iris import Dashdo import Dashdo.Types import Dashdo.Serve import Dashdo.Elements import Dashdo.FlexibleInput import Control.Monad impo...
filopodia/open
dashdo-examples/lib/Dashdo/Examples/TestDashdo.hs
mit
2,237
0
18
485
661
342
319
-1
-1
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} module Qi.Config.AWS.ApiGw.ApiMethod.Accessors where import Control.Lens import Data.Char (isAlphaNum) import qualified Data.HashMap.Strict as SHM import Data.Text (Text) import qualified Data.Te...
qmuli/qmuli
library/Qi/Config/AWS/ApiGw/ApiMethod/Accessors.hs
mit
622
0
8
176
127
79
48
17
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} module Command.Types where import qualified Data.Aeson as A import Data.Aeson.Types (Parser) import Data.Aeson ((.:), (.=)) import qualified Data.HashMap.Lazy as HM import qualified Data.Map as M import GHC.Generics (Generic) import Network.Socket (Sock...
rlupton20/vanguard-dataplane
app/Command/Types.hs
gpl-3.0
2,229
0
13
470
609
329
280
42
2
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} module Pipes.Docker (dockerListener) where import Prelude hiding (putStrLn, getLine, words, lines, concat, length, drop, dropWhile, null, lookup) import Network.Socket hiding (recv) -- import qualified GHC.IO.Exception as Ex -- import Control.Exception (try, thro...
metaml/dokreg
src/Pipes/Docker.hs
gpl-3.0
7,008
0
26
2,216
2,204
1,132
1,072
126
6
{-# language ExistentialQuantification, FunctionalDependencies, RecordWildCards, NamedFieldPuns, FlexibleInstances, MultiParamTypeClasses, DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable #-} -- module for often used types (in one Base module, to avoid module import cycles.) module Base.T...
geocurnoff/nikki
src/Base/Types.hs
lgpl-3.0
23,024
0
20
5,265
6,153
3,302
2,851
548
4
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} module Test.Async.Common ( value , TestException(..) , module X ) where import Data.Typeable import Control.Exception.Lifted import Test.Tasty as X import Test.Tasty.HUnit as X import Test.Tasty.TH as X value :: Int value = 42 data TestEx...
dmjio/lifted-async
tests/Test/Async/Common.hs
bsd-3-clause
410
0
6
67
98
63
35
16
1
{-# OPTIONS_GHC -Wall #-} module Transform.Expression (crawlLet, checkPorts) where import Control.Applicative ((<$>),(<*>)) import AST.Annotation ( Annotated(A) ) import AST.Expression.General import qualified AST.Expression.Canonical as Canonical import AST.Type (Type, CanonicalType) crawlLet :: ([def] -> Either...
JoeyEremondi/utrecht-apa-p1
src/Transform/Expression.hs
bsd-3-clause
2,677
0
17
1,021
1,025
501
524
74
19
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Program.HcPkg -- Copyright : Duncan Coutts 2009, 2013 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This module provides an library interface to the @hc-pkg@ progra...
randen/cabal
Cabal/Distribution/Simple/Program/HcPkg.hs
bsd-3-clause
18,337
0
16
4,572
3,583
1,888
1,695
321
5
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[RnPat]{Renaming of patterns} Basically dependency analysis. Handles @Match@, @GRHSs@, @HsExpr@, and @Qualifier@ datatypes. In general, all of these functions return a renamed thing, and a set of free variables. -} {-# LANGUAGE RankNTypes, Scoped...
pparkkin/eta
compiler/ETA/Rename/RnPat.hs
bsd-3-clause
31,249
9
21
9,775
6,202
3,212
2,990
-1
-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>LightZone - Help</title> <!-- maps --> <maps> <homeID>top</homeID> <mapref locati...
MarinnaCole/LightZone
linux/help/LightZone.hs
bsd-3-clause
1,928
150
118
357
794
403
391
-1
-1
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANG...
dbp/snaplet-wordpress
src/Web/Offset/Types.hs
bsd-3-clause
9,587
0
13
3,134
2,838
1,572
1,266
-1
-1
{-# OPTIONS_GHC -fglasgow-exts #-} -- fix this later {-# LANGUAGE FlexibleInstances, PatternGuards #-} -- | This marvellous module contributed by Thomas J\344ger module Plugin.Pl.RuleLib ( -- Using rules RewriteRule(..), fire , -- Defining rules rr,rr0,rr1,rr2,up,down ) where...
zeekay/lambdabot
Plugin/Pl/RuleLib.hs
mit
6,364
0
11
1,596
1,762
958
804
105
3
{- Copyright (C) 2006-7 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 dis...
yxm4109/pandoc
src/Text/Pandoc/Writers/RST.hs
gpl-2.0
14,380
0
20
3,616
4,457
2,206
2,251
266
9
module IrrefError where import Prelude topEntity :: Maybe Int -> Int topEntity ~(Just x) = x
christiaanb/clash-compiler
tests/shouldwork/Basic/IrrefError.hs
bsd-2-clause
95
0
8
18
34
18
16
4
1
yes = baz baz >> return ()
mpickering/hlint-refactor
tests/examples/Default93.hs
bsd-3-clause
26
0
7
6
18
8
10
1
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="sq-AL"> <title>Tips and Tricks | ZAP Extension</title> <maps> <homeID>top</homeID> <map...
kingthorin/zap-extensions
addOns/tips/src/main/javahelp/org/zaproxy/zap/extension/tips/resources/help_sq_AL/helpset_sq_AL.hs
apache-2.0
976
78
66
160
415
210
205
-1
-1
import qualified Data.Vector as U main = print (U.length (U.replicate 1 (pi :: Float)))
dolio/vector
old-testsuite/microsuite/length-float.hs
bsd-3-clause
89
0
10
15
41
23
18
2
1
import Test.Cabal.Prelude -- Test that we can resolve a module name ambiguity when reexporting -- by explicitly specifying what package we want. main = setupAndCabalTest $ do skipUnless =<< ghcVersionIs (>= mkVersion [7,9]) withPackageDb $ do withDirectory "p" $ setup_install [] withDirectory "q...
mydaum/cabal
cabal-testsuite/PackageTests/Ambiguity/setup-reexport.test.hs
bsd-3-clause
533
0
16
128
128
58
70
10
1
{-# LANGUAGE GADTs, ScopedTypeVariables #-} -- Supplied by Henrik Nilsson, showed up a bug in GADTs module Nilsson where data Event a = NoEvent | Event a fromEvent :: Event a -> a fromEvent = undefined usrErr :: String -> String -> String -> a usrErr = undefined type DTime = Double -- [s] data SF a b = SF {s...
olsner/ghc
testsuite/tests/gadt/Nilsson.hs
bsd-3-clause
10,900
0
17
4,524
3,829
1,940
1,889
172
37
import System.Environment import Control.Monad import Control.Concurrent main = do [n] <- map read <$> getArgs mvars <- replicateM n newEmptyMVar sequence_ [ forkIO $ putMVar m $! nsoln n | (m,n) <- zip mvars (repeat 9) ] mapM_ takeMVar mvars nsoln nq = length (gen nq) where safe :: Int -> In...
ezyang/ghc
testsuite/tests/rts/numa001.hs
bsd-3-clause
543
0
14
160
312
158
154
16
3
import System import Foreign import qualified Data.ByteString as B main = do w <- getArgs >>= readIO . head let n = w `div` 8 loop_y = B.unfoldrN n (next_x w (2/fromIntegral w) n) unfold x = case loop_y x of (s, Nothing) -> B.putStr s (s, Just x) -...
stayradiated/terminal.sexy
templates/vim/vivify/haskell.hs
mit
880
0
15
328
492
241
251
-1
-1
{-# LANGUAGE CPP #-} -- Haskelly Test Script -- Written by Liam O'Connor-Davis for comp3161 10s2 -- BSD3 -- Copyright (C) Liam O'Connor-Davis 2010 -- #define NOCOLOR import Control.Exception import System.Directory import Control.Applicative((<$>)) import System.FilePath import System.Environment import Data.List i...
pierzchalski/cs3161a1
tests/driver/Check.hs
mit
5,865
0
24
1,891
1,687
843
844
117
7
{-# LANGUAGE RecordWildCards #-} {- The Parser is responsible for transforming a 'String' into an AST. -} module SuperUserSpark.Parser where import Import import Control.Exception (try) import SuperUserSpark.Language.Types import SuperUserSpark.OptParse.Types import SuperUserSpark.Parser.Internal import SuperUs...
NorfairKing/super-user-spark
src/SuperUserSpark/Parser.hs
mit
1,250
0
12
230
353
178
175
30
2
{-# LANGUAGE ScopedTypeVariables , GADTs #-} -- ============================================================================ -- ---------------------------------------------------------------------------- {-| Module : Game.Make10Spec Description : puzzle game Copyright : (c) ...
hanepjiv/make10_hs
test/spec/Game/Make10Spec.hs
mit
1,018
0
6
148
44
30
14
7
1
module Y2016.M11.D21.Exercise where {-- Let's say you've joined the National November Writing Month challenge to write a novel of 50,000 words during the month of November. Let's say you've ... 'kinda' started that novel, and it's here in this directory at foo.txt or at the URL: https://raw.githubusercontent.com/geop...
geophf/1HaskellADay
exercises/HAD/Y2016/M11/D21/Exercise.hs
mit
1,255
0
6
217
85
52
33
10
1
module MLUtil.LabelledMatrix ( LabelId , LabelledMatrix (..) , mkLabelledMatrix , readLabelledMatrix ) where import Control.Exception import Control.Monad import Control.Monad.ST import Data.List.Split import qualified Data.Map as M import qualified Data.Vect...
rcook/mlutil
mlutil/src/MLUtil/LabelledMatrix.hs
mit
2,616
7
12
776
718
404
314
58
2
import Control.Arrow ((***)) import Data.Set (Set) import qualified Data.Set as S import Common (bothF, bothV) main :: IO () main = do partOne >>= print partTwo >>= print partOne :: IO Int partOne = process stepOne partTwo :: IO Int partTwo = process stepTwo process :: (String -> Int) -> IO Int process f = f <...
wizzup/advent_of_code
2015/haskell/exe/Day03.hs
mit
1,537
2
9
320
700
368
332
35
1
{-# LANGUAGE CPP #-} module GHCJS.DOM.MediaList ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.MediaList #else module Graphics.UI.Gtk.WebKit.DOM.MediaList #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(US...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/MediaList.hs
mit
430
0
5
39
33
26
7
4
0
module Main where import Control.Exception import Data.Typeable handler :: SomeException -> IO () handler (SomeException e) = do print (typeOf e) putStrLn ("We errored! It was: " ++ show e) -- didn't compile: "Couldn't match expected type ‘e’ with actual type ‘AsyncException’" -- handler :: SomeException ->...
NickAger/LearningHaskell
HaskellProgrammingFromFirstPrinciples/Chapter30/writePls.hs
mit
818
0
10
149
103
55
48
10
1
-- Since July 20 2013 module Main where import System.IO main = do putStrLn "What's your name?" name <- getLine tell name tell_case name tell name = do putStrLn ( if elem name ["Simon", "John", "Phil"] then "I think Haskell is a great programming language." else if ...
fossilet/yaht
ex_5.1.hs
mit
898
0
11
323
151
74
77
26
5
{-# LANGUAGE PackageImports #-} {-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-} -- | Reexports "System.Environment.Compat" -- from a globally unique namespace. module System.Environment.Compat.Repl ( module System.Environment.Compat ) where import "this" System.Environment.Compat
haskell-compat/base-compat
base-compat/src/System/Environment/Compat/Repl.hs
mit
304
0
5
31
28
21
7
5
0
{-# LANGUAGE OverloadedStrings #-} import Control.Applicative ((<$>)) import Data.Binary (encode) import qualified Data.ByteString.Char8 as Char import Data.Global (declareIORef) import Data.IORef (IORef, readIORef, modifyIORef) import Data.Maybe (fromJust) import Data.Text as Text import Network.HTTP.Types (status201...
justincampbell/url-shortener-haskell
Main.hs
mit
2,503
0
12
586
789
390
399
67
3
module Network.IPFS where import Control.Applicative ((<$>)) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Base58 as B58 import qualified Data.ByteString.Char8 as C import Data.Maybe (fromJust) import Data.Foldable (toList) import Text.ProtocolBuffer...
bitemyapp/hs-ipfs-api
src/Network/IPFS.hs
mit
1,736
0
12
365
515
289
226
38
2
module Categories where categories :: Directory -> Map String File
Soares/tagwiki
src/Categories.hs
mit
68
0
6
11
18
10
8
2
0
module NetHack.Control.Farlook (farLook) where import Control.Monad(when) import Control.Monad.IO.Class(liftIO) import NetHack.Monad.NHAction import NetHack.Control.Screen import NetHack.Data.Messages(trim) import qualified Terminal.Data as T import qualified Terminal.Terminal as T farLook :: (Int, Int) -> NHActi...
Noeda/Megaman
src/NetHack/Control/Farlook.hs
mit
971
0
17
267
366
193
173
31
3
{-# LANGUAGE OverloadedStrings #-} -- | This module holds all of the logic used to build queries. module Docker.QueryBuilder ( QueryBuilder , isAllowedQS , param , stringParam , noParams ...
nahiluhmot/docker-hs
src/Docker/QueryBuilder.hs
mit
1,563
0
11
428
353
194
159
29
2
foldl1 (lcm) [1..20]
tamasgal/haskell_exercises
ProjectEuler/p005.hs
mit
21
0
6
3
17
8
9
-1
-1
module PlotLab.Events (attachHandlers) where -------------------------------------------------------------------------------- import PlotLab.Figure (figurePlot) import PlotLab.Settings -------------------------------------------------------------------------------- import Data...
sumitsahrawat/plot-lab
src/PlotLab/Events.hs
gpl-2.0
7,628
0
19
2,154
1,903
913
990
146
10
{-# LANGUAGE TypeFamilies #-} -- | -- Module: Instruments.Instrument -- Copyright: (c) Johan Astborg, Andreas Bock -- License: BSD-3 -- Maintainer: Andreas Bock <bock@andreasbock.dk> -- Stability: experimental -- Portability: portable -- -- Top-level class for financial instruments module Instruments.Inst...
andreasbock/hql
src/Instruments/Instrument.hs
gpl-2.0
538
0
9
102
69
42
27
7
0
{-# LANGUAGE Arrows, NoMonomorphismRestriction, TypeOperators #-} {- The Robot example in circuits. - Copyright : (C)opyright 2006, 2009-2011 peteg42 at gmail dot com - License : GPL (see COPYING for details) - - ghc -O -main-is Robot_spr_broadcast.main -rtsopts -prof -package ADHOC Robot_spr_broadcast.hs ...
peteg/ADHOC
Apps/Robot/Robot_spr_broadcast.hs
gpl-2.0
5,182
12
18
1,020
1,184
635
549
-1
-1
module HEP.Automation.MadGraph.Dataset.Set20110516set1 where import HEP.Storage.WebDAV import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Model.ZpHFull import HEP.Automation.MadGra...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110516set1.hs
gpl-3.0
1,829
0
13
470
462
273
189
46
1
module Extension.Data.Accessor ( -- * Containers mapDirect ) where import qualified Data.Map as M import Data.Accessor import Data.Accessor.Container -- | A direct accessor for maps. Will fail at runtime, if the element is not -- present. mapDirect :: Ord k => k -> Accessor (M.Map k v) v mapDirect k = accessor (...
meiersi/scyther-proof
src/Extension/Data/Accessor.hs
gpl-3.0
349
0
10
67
99
57
42
7
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-fusiontables/gen/Network/Google/Resource/FusionTables/Template/Update.hs
mpl-2.0
3,489
0
15
822
481
285
196
73
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-spanner/gen/Network/Google/Resource/Spanner/Scans/List.hs
mpl-2.0
6,001
0
19
1,506
1,041
601
440
139
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.BigtableAdmin -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozill...
brendanhay/gogol
gogol-bigtableadmin/gen/Network/Google/BigtableAdmin.hs
mpl-2.0
23,906
0
49
4,187
2,484
1,846
638
495
0
{-# LANGUAGE OverloadedStrings, RecordWildCards, DataKinds #-} module Model.Transcode ( module Model.Transcode.Types , defaultTranscodeOptions , transcodeAuth , lookupTranscode , lookupActiveTranscodes , addTranscode , updateTranscode , findTranscode , findMatchingTranscode , checkAlreadyTranscoded ...
databrary/databrary
src/Model/Transcode.hs
agpl-3.0
72,130
0
25
29,753
8,881
5,436
3,445
-1
-1
import Test.Hspec import Data.List import Digits factorial :: Integer -> Integer factorial 1 = 1 factorial n = n * factorial(n-1) process n = sum (digits_list (factorial n)) -- Tests + result print main = hspec $ do describe "Dummy" $ do it "dummy test" $ do True `shouldBe` True describe ...
orbitgray/ProjectEuler
haskell/020.hs
lgpl-3.0
556
0
19
163
192
92
100
17
1
module Utils where import qualified Data.ByteString as B import Data.List import Data.List.Split import Data.Word import Data.Bits import Data.Maybe import Data.Char digits = "0123456789ABCDEF" -- Utility code bs2hex :: B.ByteString -> String bs2hex = concatMap toHex . map fromIntegral . B.unpack toHex n = (digits...
nsmryan/BIC
Utils.hs
unlicense
1,068
0
11
226
411
223
188
33
1
dupli :: [a] -> [a] dupli [] = [] dupli (x:xs) = x:x:(dupli xs)
alephnil/h99
14.hs
apache-2.0
63
0
7
13
57
30
27
3
1
-- -*- coding: utf-8 -*- -- Copyright (c) 2010-2014, MIT Probabilistic Computing Project -- -- 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/license...
probcomp/haxcat
Haxcat.hs
apache-2.0
1,234
0
10
232
250
137
113
17
1
{-# LANGUAGE OverloadedStrings #-} module Codec.Sarsi.SBT where import Codec.Sarsi (Message (..)) import Codec.Sarsi.Scala import Data.Attoparsec.Text import qualified Data.Attoparsec.Text as AttoText import Data.Text (Text) import qualified Data.Text as Text data SBTEvent = CompileStart Text | TaskFinish Bool Text ...
aloiscochard/sarsi
src/Codec/Sarsi/SBT.hs
apache-2.0
1,266
0
14
283
401
213
188
30
1
module FractalFlame.Histogram ( render ) where import Control.Monad import Control.Monad.ST import Data.Monoid import Data.STRef import qualified Data.Vector as V import qualified Data.Vector.Storable as SV import qualified Data.Vector.Storable.Mutable as MV import FractalFlame.Camera import FractalFlame.Color im...
anthezium/fractal_flame_renderer_haskell
FractalFlame/Histogram.hs
bsd-2-clause
4,686
0
24
1,369
991
516
475
-1
-1
module Main ( main ) where import Spec.StripExtensions import Parse.Spec import Write.Spec import System.IO(hPutStr, stderr) import System.Exit main :: IO () main = do specString <- getContents specMay <- parseSpec specString case specMay of Nothing -> do hPutStr stderr "Failed t...
oldmanmike/vulkan
generate/src/Main.hs
bsd-3-clause
505
0
14
160
126
63
63
15
2
import Data.List import Data.List.Split import Data.Char import Debug.Trace triangles = [(n / 2) * (n + 1) | n <- [1..]] codedTriangleWords ws = length [w | w <- ws, elem (fromIntegral (score w)) (take 18 triangles)] where score w = sum $ map (subtract 64 . ord) w main = do f <- readFile "042.txt" print . code...
JacksonGariety/euler.hs
042.hs
bsd-3-clause
375
0
12
75
184
94
90
10
1
{-# LANGUAGE TemplateHaskell #-} module Test where import Language.Haskell.TH.SCCs data E a = Nil | ECons a (Odd a) data O a = OCons a (E a) type Odd = O data X = X (E Int) printQ (Just "E: ") (binding_group ''E) printQ (Just "O: ") (binding_group ''O) printQ (Just "O!: ") (scc ''O) printQ (Just "Odd: ") (bind...
nfrisby/th-sccs
Test.hs
bsd-3-clause
734
0
9
125
374
187
187
19
0
module Main where import Control.Monad.Reader (runReaderT) import Data.IORef (newIORef) import Data.Types (bufLen) import qualified Data.Vector.Storable.Mutable as VM (replicate) import Engine import Linear.V3 import Render import Render.Camera import Render.Engine import Render.Mesh main :: IO () main = do camera ...
Lucsanszky/soft-engine
app/Main.hs
bsd-3-clause
1,621
0
16
933
513
266
247
43
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} -- | Preprocessing collecting names, data types, newtypes, imports, and exports -- for all modules recursively. module Fay.Compiler.InitialPass (initialPass ) where import Fay.Compiler.Prelude impor...
beni55/fay
src/Fay/Compiler/InitialPass.hs
bsd-3-clause
6,424
21
35
1,870
1,715
874
841
115
11
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeSynonymInstances #-} module PixeloSolver.AI.OCR( PixeloBoard(..) , pixeloBoardGetTileWidth , pixeloBoardGetWidth , pixeloBoardGetHeight , TileDistanceTolerance...
gregorias/pixelosolver
src/PixeloSolver/AI/OCR.hs
bsd-3-clause
22,926
0
18
5,092
7,649
4,074
3,575
539
6
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Main ( main ) where import Distribution.Nixpkgs.Haskell.FromCabal ( fromGenericPackageDescription ) import Distribution.Nixpkgs.Haskell.FromCabal.Flags import Distribution.Nixpkgs.Haskell.HackageGit ( readHackage, Hackage ) import Distribution...
gridaphobe/cabal2nix
hackage2nix/src/Main.hs
bsd-3-clause
8,899
0
29
1,945
2,254
1,166
1,088
-1
-1
{-# LANGUAGE OverloadedStrings #-} module PeerReview.Web.Server ( runServer , service -- Exposed for testing. ) where import Network.Wai.Middleware.Cors import Network.Wai.Middleware.RequestLogger import Web.Spock.Safe import PeerReview.Types import PeerRe...
keveri/peer-review-service
src/PeerReview/Web/Server.hs
bsd-3-clause
1,062
0
10
256
219
117
102
26
1
{-# LANGUAGE OverloadedStrings #-} module Common where import Data.Version (Version) import Distribution.Package (Dependency) import Distribution.ModuleName (ModuleName) import Distribution.Text (display,simpleParse) import qualified Language.Haskell.Exts.Annotated as HSE (Module,SrcSpanInfo) import Language.Haskell....
phischu/hackage-analysis
src/Common.hs
bsd-3-clause
7,480
0
12
1,212
1,993
1,057
936
158
3
-- | Modulo de funciones utiles module Utils.Utiles where {- ( -- * Funciones para tuplas fst3 , snd3 , thd3 , fst4 , snd4 , thd4 , fth4 -- ** aplicar funciones a tuplas , toTupleFloat , mapTuple , funTuple -- * Funciones para numeros , toInt , toFloat ) where -} import Data.Char -- | Comparar 2 strings compareSt...
carliros/Simple-San-Simon-Functional-Web-Browser
src/Utils/Utiles.hs
bsd-3-clause
1,170
0
7
275
374
214
160
25
1
module ExampleArmoredConfig where import ProtoTypes --the request to send request = ReqLS [RequestItem OS Name,RequestItem VC Name] --the conditions that the results must meet conditions = Or (OneOf OS Name [ValString "Windows", ValString "Linux"]) (And (Equals VC Name (ValString "UniVaccine")) ...
armoredsoftware/protocol
tpm/mainline/shared/protocolprotocol/ExampleArmoredConfig.hs
bsd-3-clause
745
0
12
240
204
108
96
12
1
module Sodium.Chloride.JoinMultiIf (joinMultiIf) where import Control.Lens import Sodium.Chloride.Program.Scalar import Sodium.Chloride.Recmap.Scalar joinMultiIf :: Program -> Program joinMultiIf = recmapProgram' (recmapper' joinMultiIfStatement) joinMultiIfStatement = _MultiIfStatement %~ tryApply joinMultiIfBranc...
kirbyfan64/sodium
src/Sodium/Chloride/JoinMultiIf.hs
bsd-3-clause
565
6
10
75
160
86
74
-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. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. ------------------...
rfranek/duckling
Duckling/Ranking/Classifiers/ID.hs
bsd-3-clause
825
0
6
105
66
47
19
8
1
{- - Intel Concurrent Collections for Haskell - Copyright (c) 2010, Intel Corporation. - - This program is free software; you can redistribute it and/or modify it - under the terms and conditions of the GNU Lesser General Public License, - version 2.1, as published by the Free Software Foundation. - - This prog...
rrnewton/Haskell-CnC
examples/sched_tree.hs
bsd-3-clause
2,013
56
11
570
337
184
153
-1
-1
module Monitor where import Job.Scheduler data Monitor = StatusCodeMonitor { mJobId :: String , mJobName :: String , mJobStatus :: JobStatus , mOutput :: String } | StdoutMonitor {...
rickardlindberg/codemonitor
src/Monitor.hs
bsd-3-clause
1,076
0
10
497
211
120
91
23
4
module WASH.Mail.Message where import WASH.Mail.HeaderField data Message = Singlepart { getHeaders :: [Header] , getLines :: [String] , getDecoded :: [Char] , getContentType :: ContentType , getContentTransferEncoding :: ContentTransferEncoding , getContentDisposition :: ContentDisposition }...
nh2/WashNGo
WASH/Mail/Message.hs
bsd-3-clause
2,098
46
13
431
582
311
271
65
1
-- | A series with a start value and consecutive next vaules. module Data.MediaBus.Basics.Series ( Series (..), _Next, _Start, type Series', AsSeries (..), AsSeriesStart (..), AsSeriesNext (..), ) where import Control.DeepSeq import Control.Lens import Data.Bifunctor import GHC.Generics (Ge...
lindenbaum/mediabus
src/Data/MediaBus/Basics/Series.hs
bsd-3-clause
3,164
0
10
721
998
535
463
-1
-1
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} module Test.ZM.ADT.Content.K1ba230d92eb8 (Content(..)) where import qualified Prelude(Eq,Ord,Show) import qualified GHC.Generics import qualified Flat import qualified Data.Model import qualified Test.ZM.ADT.List.Kb8cd13187198 import qualified Test.ZM.ADT....
tittoassini/typed
test/Test/ZM/ADT/Content/K1ba230d92eb8.hs
bsd-3-clause
579
0
9
68
143
93
50
13
0
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecursiveDo #-} module Zero.GDAX.Widget ( TickerWidget(..) , tickerWidget ) where import Data.Proxy (Proxy(..)) import qualified Data.Text as T import Data.Text (...
et4te/zero
src/Zero/GDAX/Widget.hs
bsd-3-clause
1,620
0
13
373
396
214
182
39
1
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : $Header$ Description : sublogic analysis for CASL_DL Copyright : (c) Dominik Luecke 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : luecke@informatik.uni-bremen.de Stability : experimental Portability : portable Sublogic analysis for ...
keithodulaigh/Hets
CASL_DL/Sublogics.hs
gpl-2.0
771
0
6
147
55
31
24
6
0
{-# LANGUAGE RecordWildCards, DeriveDataTypeable, FlexibleInstances, TupleSections, OverloadedStrings #-} {-| Postings report, used by the register command. -} module Hledger.Reports.PostingsReport ( PostingsReport, PostingsReportItem, postingsReport, mkpostingsReportItem, -- * Tests tests_Hledger_Repor...
mstksg/hledger
hledger-lib/Hledger/Reports/PostingsReport.hs
gpl-3.0
23,824
0
18
7,438
2,681
1,447
1,234
141
4
module Util ( loadGrammar , loadSndOrderGrammar ) where import Control.Monad import qualified System.FilePath as FilePath import System.Exit (exitFailure) import Category.TypedGraph (TypedGraphMorphism) import Category.TypedGraphRule (RuleMorphism) import ...
rodrigo-machado/verigraph
src/CLI/Util.hs
gpl-3.0
1,970
0
16
420
539
277
262
41
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/CancelReservedInstancesListing.hs
mpl-2.0
4,592
0
10
806
431
264
167
58
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Ambiata.Cli ( uploadCommand , downloadCommand , doUpload , doDownload ) where import Ambiata.Cli.Api import Ambiata.Cli.Data import Ambiata.Cli.Downloads import ...
ambiata/tatooine-cli
src/Ambiata/Cli.hs
apache-2.0
4,300
0
14
1,248
1,145
577
568
88
2
{-# LANGUAGE TemplateHaskellQuotes #-} module TH_StringLift where import Language.Haskell.TH.Syntax foo :: Quote m => String -> m (TExp String) foo x = [|| x ||] foo2 :: Quote m => String -> m Exp foo2 x = [| x |]
sdiehl/ghc
testsuite/tests/th/TH_StringLift.hs
bsd-3-clause
217
0
9
43
48
28
20
-1
-1
-- | -- Module : $Header$ -- Copyright : (c) 2013-2014 Galois, Inc. -- License : BSD3 -- Maintainer : cryptol@galois.com -- Stability : provisional -- Portability : portable -- -- This module defines the scoping rules for value- and type-level -- names in Cryptol. module Cryptol.Parser.Names where ...
TomMD/cryptol
src/Cryptol/Parser/Names.hs
bsd-3-clause
9,337
0
14
2,719
3,586
1,765
1,821
189
17
{- | Module : $Header$ Description : folding functions for VSE progams Copyright : (c) Christian Maeder, DFKI Bremen 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable folding functions for VSE progams -} module VS...
keithodulaigh/Hets
VSE/Fold.hs
gpl-2.0
2,862
0
13
766
1,309
681
628
58
9
-- (C) Copyright Chris Banks 2011 -- This file is part of The Continuous Pi-calculus Workbench (CPiWB). -- CPiWB 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 3 of the License...
chrisbanks/cpiwb
CPi/Lib.hs
gpl-3.0
17,088
1
18
5,146
6,805
3,591
3,214
376
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: + ...
mcschroeder/ghc
compiler/nativeGen/PIC.hs
bsd-3-clause
32,682
0
20
9,917
4,670
2,374
2,296
409
8
<?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="ru-RU"> <title>GraalVM JavaScript</title> <maps> <homeID>graaljs</homeID> <mapref locat...
thc202/zap-extensions
addOns/graaljs/src/main/javahelp/help_ru_RU/helpset_ru_RU.hs
apache-2.0
999
77
66
156
463
232
231
-1
-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="hi-IN"> <title>Sequence Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> <ma...
kingthorin/zap-extensions
addOns/sequence/src/main/javahelp/org/zaproxy/zap/extension/sequence/resources/help_hi_IN/helpset_hi_IN.hs
apache-2.0
977
78
66
159
413
209
204
-1
-1
{-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} module Foo where import Data.Kind import Data.Proxy type family T1 (x :: f (a :: Type)) class C (a :: Type) where type T2 (x :: f a) class C2 (a :: Type) (b :: Proxy a) (c :: Proxy b) where ...
sdiehl/ghc
testsuite/tests/ghci/scripts/T15591.hs
bsd-3-clause
756
0
13
200
260
153
107
-1
-1
{-@ LIQUID "--short-names" @-} {-@ LIQUID "--no-warnings" @-} {-@ LIQUID "--no-termination" @-} {-@ LIQUID "--smtsolver=cvc4" @-} module Refinements where import Prelude hiding (abs) divide :: Int -> Int -> Int ----------------------------------------------------------------------- -- | Simple Refinement ...
ssaavedra/liquidhaskell
docs/slides/Galois2014/000_Refinements.hs
bsd-3-clause
2,490
0
8
436
202
126
76
13
1
import Control.Monad import Foreign import Foreign.Ptr type CInt = Int32 type CSize = Word32 foreign import ccall "wrapper" mkComparator :: (Ptr Int -> Ptr Int -> IO CInt) -> IO (Ptr (Ptr Int -> Ptr Int -> IO CInt)) foreign import ccall qsort :: Ptr Int -> CSize -> CSize -> Ptr (Ptr Int -> Ptr Int -> IO CI...
urbanslug/ghc
testsuite/tests/ffi/should_run/fed001.hs
bsd-3-clause
827
21
11
213
381
199
182
25
1