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
-- | Graph Coloring. -- This is a generic graph coloring library, abstracted over the type of -- the node keys, nodes and colors. -- module GraphColor ( module GraphBase, module GraphOps, module GraphPpr, colorGraph ) where import GraphBase import GraphOps import GraphPpr i...
vTurbine/ghc
compiler/utils/GraphColor.hs
bsd-3-clause
15,333
68
18
5,908
2,128
1,164
964
199
5
<?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="si-LK"> <title>Access Control Testing | ZAP Extension</title> <maps> <homeID>top</homeID> ...
0xkasun/security-tools
src/org/zaproxy/zap/extension/accessControl/resources/help_si_LK/helpset_si_LK.hs
apache-2.0
777
83
14
121
323
173
150
-1
-1
x = y where y = z z = 10
itchyny/vim-haskell-indent
test/where/no_newline_same_line.out.hs
mit
25
3
4
10
28
10
18
2
1
{-# OPTIONS_GHC -fglasgow-exts #-} -- This tests scoped type variables, used in an expression -- type signature in t1 and t2 module Foo7 where import Control.Monad import Control.Monad.ST import Data.Array.MArray import Data.Array.ST import Data.STRef import Data.Set hiding (map,filter) -- a store that allows to ma...
hvr/jhc
regress/tests/1_typecheck/2_pass/ghc/uncat/tc213.hs
mit
1,542
5
14
412
685
354
331
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Lens.Equality -- Copyright : (C) 2012-15 Edward Kmett -- License : BSD-style (see the file LICENSE) -...
danidiaz/lens
src/Control/Lens/Equality.hs
bsd-3-clause
2,744
0
10
520
457
266
191
40
1
-- | Free regs map for i386 module RegAlloc.Linear.X86.FreeRegs where import X86.Regs import RegClass import Reg import Panic import Platform import Data.Word import Data.Bits newtype FreeRegs = FreeRegs Word32 deriving Show noFreeRegs :: FreeRegs noFreeRegs = FreeRegs 0 releaseReg :: RealReg -> FreeRegs -> F...
urbanslug/ghc
compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
bsd-3-clause
1,327
0
14
309
395
211
184
33
2
module ShouldCompile where -- ^ bla main=undefined -- ^ vkfja hej=main -- ^ ieasdkjahsdkjashd x = hej -- ^ eroiewuroieuwr y = undefined
urbanslug/ghc
testsuite/tests/haddock/should_compile_flag_haddock/haddockA013.hs
bsd-3-clause
140
0
4
27
28
19
9
5
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} module Tests.Math.Ftensor.G...
mikebenfield/ftensor
test/Tests/Math/Ftensor/General.hs
isc
9,020
0
17
2,172
4,761
2,660
2,101
218
1
{-# LANGUAGE OverloadedStrings #-} module MacFinder.Controllers.Index ( index ) where import Web.Scotty.Trans as S import Text.Hastache import Text.Hastache.Context import Web.Scotty.Hastache import Control.Monad.IO.Class (liftIO) import qualified Database.Redis as R import qualified Data.ByteString as B import D...
tlunter/MacFinder
src/MacFinder/Controllers/Index.hs
mit
1,119
0
12
224
387
203
184
28
2
{-| Provides the page management handlers for the admin interface. For the public facing page related handlers see the "Handler.Public.Page" module. These handlers provides functionality to list, edit, create and remove pages. -} module Handler.Admin.Page where import Database.Persist.Sql (fromSqlKey, toSql...
rzetterberg/alven
src/lib/Handler/Admin/Page.hs
mit
8,378
0
16
2,035
1,383
680
703
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TemplateHaskell #-} module Blaze.MonadicReact ( App(..) , githubTest ) wh...
MoixaEnergy/blaze-react
src/Blaze/MonadicReact.hs
mit
14,866
0
5
4,068
39
33
6
11
0
-- Collatz -- http://www.codewars.com/kata/5286b2e162056fd0cb000c20/ module Collatz where collatz :: Int -> String collatz 1 = "1" collatz n = show n ++ "->" ++ collatz (if odd n then 3 * n + 1 else n `div` 2)
gafiatulin/codewars
src/6 kyu/Collatz.hs
mit
214
0
10
42
73
40
33
4
2
{-# LANGUAGE QuasiQuotes #-} module CSPMRecursionRefactorings where import Control.Monad.State import Data.Graph import CSPMDataStructures import CSPMTypeChecker.TCCommon import CSPMTypeChecker.TCDependencies import CSPMTypeChecker.TCModule import CSPMTypeChecker.TCMonad import CSPMParser import CSPMPrettyPrinter im...
tomgr/tyger
src/CSPMRecursionRefactorings.hs
mit
19,220
3
32
7,120
5,119
2,496
2,623
397
4
module Main where import Control.Monad import Parser import Eval import System.Environment import System.IO import LispVal flushStr :: String -> IO () flushStr str = putStr str >> hFlush stdout readPrompt :: String -> IO String readPrompt prompt = flushStr prompt >> getLine evalAndPrint :: Env -> String -> IO () ev...
diminishedprime/.org
programmey_stuff/write_yourself_a_scheme/ch_08/wyas/app/Main.hs
mit
1,123
0
12
272
411
203
208
31
3
{-# OPTIONS_GHC -w #-} {-# OPTIONS -fglasgow-exts #-} module Parser ( parse ) where import TPTPSyntax import ParseGlue import Lex -- parser produced by Happy Version 1.18.6 data HappyAbsSyn = HappyTerminal (Token) | HappyErrorToken Int | HappyAbsSyn4 ([TPTPInput]) | HappyAbsSyn5 (TPTPInput) | HappyAbsSy...
frelindb/agsyHOL
Parser.hs
mit
54,029
1,840
36
8,483
16,043
8,745
7,298
1,565
31
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GADTs #-} module GhostLang.Interpreter.Intrinsic ( IntrinsicSet (..) ) where import Control.Concurrent (threadDelay) import GHC.Generics (Generic) import GhostLang.Interpreter.InstructionSet (InstructionSet (..)) import GhostLang.Interpreter.InterpreterM ( In...
kosmoskatten/ghost-lang
ghost-lang/src/GhostLang/Interpreter/Intrinsic.hs
mit
3,512
0
13
1,285
777
399
378
81
2
module Foundation where import ClassyPrelude.Yesod import Database.Persist.Sql (ConnectionPool, runSqlPool) import Model import Settings import Settings.StaticFiles import Text.Hamlet (hamletFile) import Text.Jasmine (minifym) import Yesod.Auth import Yesod.Auth.BrowserId (authBrowserId) import Yesod....
cirquit/HaskellPie
HaskellPie/Foundation.hs
mit
6,327
0
18
1,501
897
477
420
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-association-parametervalues.html module Stratosphere.ResourceProperties.SSMAssociationParameterValues whe...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/SSMAssociationParameterValues.hs
mit
1,640
0
13
164
174
100
74
23
1
module Compiler.Rum.Internal.Parser where import Control.Applicative ((<|>), liftA2) import Data.String (fromString) import Data.Text (Text) import qualified Data.Text as T import Text.Megaparsec ( anyChar, alphaNumChar, between, char ...
vrom911/Compiler
src/Compiler/Rum/Internal/Parser.hs
mit
6,753
0
20
2,092
2,243
1,138
1,105
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-| Module : Pladen.Config Description : Customize the behaviour of the application Copyright : Thomas Scholtes, 2014 License : MIT Maintainer : thomas-scholtes@gmx.de Stability : experimental The 'Config' data contains settings that allow the user to customize the appl...
geigerzaehler/pladen
Pladen/Config.hs
mit
1,399
0
13
372
173
100
73
21
0
module Spec (main, spec) where import Test.Hspec.Monadic import Test.Hspec.HUnit () import Test.HUnit.ShouldBe import Control.Exception main :: IO () main = hspecX spec spec :: Specs spec = do describe "shouldBe" $ do it "this should succeed" $ do "foo" `shouldBe`...
Erkan-Yilmaz/test-shouldbe
example/Spec.hs
mit
1,245
0
18
341
367
178
189
36
1
module Bonlang.Lexer where import qualified Bonlang.Lang as L import Data.Functor.Identity import qualified Data.Map as Map import qualified Data.Text as T import qualified Text.Parsec as Parsec import Text.Parsec.Language import Text.Parsec.Pri...
charlydagos/bonlang
src/Bonlang/Lexer.hs
mit
9,630
0
15
3,473
2,235
1,145
1,090
207
2
{-# LANGUAGE ScopedTypeVariables #-} module Euler.Polygonal ( polys, tris, sqrs, pentas, hexas, isPoly, isTri, isSqr, isPenta, isHexa, poly, tri, sqr, penta, hexa ) where import Euler.Integral import Data.Word polys :: Word64 -> [Word64] polys 1 = undefined polys 2 = undefined polys s = scanl1 (+) [1, s - 1..] t...
Undeterminant/euler-haskell
Euler/Polygonal.hs
cc0-1.0
1,091
6
13
286
596
328
268
36
1
{-# LANGUAGE TemplateHaskell #-} {-| Some common types. -} {- Copyright (C) 2009, 2010, 2011, 2012 Google Inc. 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 ...
damoxc/ganeti
src/Ganeti/HTools/Types.hs
gpl-2.0
14,526
0
12
3,747
2,301
1,404
897
244
1
module LoanCommissionConf where {- Sept 2007 Bartosz Wójcik Loan Commission Module. Allows calculation of commission different types. Can be used also for subvention purposes. Subventions are to be recognized by negative sign. Figures are to be calculated on the begining of the life of the loan and fixed during...
bartoszw/elca
LoanCommissionConf.hs
gpl-2.0
2,756
0
13
869
549
294
255
40
1
main :: IO () main = putStrLn "Hello!"
Shedward/timus
templates/template.hs
gpl-2.0
40
0
6
9
19
9
10
2
1
{-# LANGUAGE PatternSignatures #-} {-# LANGUAGE PatternSignatures #-} {-# LANGUAGE DeriveDataTypeable #-} module Operate.Student where import Operate.Types -- import Inter.Evaluate import Types.Documented as D import Types.Solution import qualified Util.Xml.Output as UXO import Operate.Bank import Operate.Common im...
marcellussiegburg/autotool
db/src/Operate/Student.hs
gpl-2.0
5,702
69
13
1,818
1,354
757
597
125
3
module RunLength (decode, encode) where import Data.List (group) import Data.Char (isDigit) decode :: String -> String decode "" = "" decode s@(x:xs) | null left = x : decode xs | otherwise = replicate (read left) (head right) ++ decode (tail right) where ini = span isDigit s left = fst ini ...
munyari/programming-problems
exercism.io/haskell/run-length-encoding/src/RunLength.hs
gpl-2.0
534
0
11
149
241
122
119
17
1
{- Piffle, Copyright (C) 2007, Jaap Weel. 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 distribut...
jaapweel/piffle
src/PifflePretty.hs
gpl-2.0
3,235
0
16
868
770
376
394
42
0
h :: m -> n
hmemcpy/milewski-ctfp-pdf
src/content/2.3/code/haskell/snippet09.hs
gpl-3.0
11
1
5
4
14
6
8
1
0
module HEP.Automation.MadGraph.Dataset.Set20110716set4 where import HEP.Storage.WebDAV.Type import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Model.SChanC8Vschmaltz import HEP.Aut...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110716set4.hs
gpl-3.0
1,895
0
10
621
417
263
154
47
1
import Rebass.Reaper.ReaperProjectFileParser import Rebass.Reaper.ReaperProjectFileSerializer import System.Environment(getArgs) import Text.ParserCombinators.Parsec(parseFromFile) main = getArgs >>= parse parse [file] = do result <- parseFromFile project file case result of Left err -> print err Right p...
codeflows/rebass
test/ParserMain.hs
gpl-3.0
360
3
12
52
109
54
55
10
2
-- | Display a page to show one gallery, its immediate child pictures, and sub-galleries. module Dragonfly.ImageGallery.GalleryPage ( displayGalleryTree ) where import Control.Monad.Reader import Control.Concurrent.MVar import qualif...
colin-adams/dragonfly-website
Dragonfly/ImageGallery/GalleryPage.hs
gpl-3.0
8,516
0
27
2,774
2,139
1,110
1,029
140
8
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} module LLVMRepresentation ( Module(MkModule), decls, ...
GaroBrik/haskell-compiler
src/LLVMRepresentation.hs
gpl-3.0
2,444
0
9
592
821
466
355
73
1
{-# LANGUAGE NoImplicitPrelude, KindSignatures, TemplateHaskell, DeriveFunctor, DeriveFoldable, DeriveTraversable, GeneralizedNewtypeDeriving, RankNTypes, RecordWildCards #-} module Lamdu.Sugar.Types ( EntityId , Definition(..), drEntityId, drName, drBody , DefinitionBody(..), _DefinitionBodyExpression, _De...
da-x/lamdu
Lamdu/Sugar/Types.hs
gpl-3.0
19,924
0
13
4,266
5,352
3,104
2,248
492
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TupleSections #-} -- | -- Module : Aura.Dependencies -- Copyright : (c) Colin Woodbury, 2012 - 2020 -- License : GPL3 -- Maintainer: Colin Woodbury <colin@fosskers.ca> -- -- Library for handling package dependencies and version conflicts. ...
aurapm/aura
aura/lib/Aura/Dependencies.hs
gpl-3.0
7,742
0
26
1,939
2,332
1,188
1,144
-1
-1
{-# LANGUAGE InstanceSigs #-} module Chapter26_monad_transformers where import Control.Applicative (liftA2, Alternative(..)) import Control.Monad import Control.Monad.Trans.Class -- MonadTrans import Control.Monad.IO.Class -- MonadIO import Debug.Trace -- IdentityT newtype Identity a = Identity { runIdentity :: a }...
maruks/haskell-book
src/Chapter26_monad_transformers.hs
gpl-3.0
7,600
0
14
2,033
2,870
1,481
1,389
160
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-sqladmin/gen/Network/Google/Resource/SQL/Tiers/List.hs
mpl-2.0
4,565
0
17
1,118
709
415
294
103
1
import Data.Char -- lists the index points in xs where the value in xs == x positions :: Eq a => a -> [a] -> [Int] positions x xs = [i | (x', i) <- zip xs [0..], x == x'] -- ord takes a character and returns its unicode value let2Int :: Char -> Int let2Int c = ord c - ord 'a' -- chr takes a unicode value and returns...
Crossroadsman/ProgrammingInHaskell
05/caesar.hs
apache-2.0
2,243
0
11
846
786
435
351
58
1
module Plot(plotDefault,plot,writePlot,plot3d,simple2d,plotX11) where import Graphics.Gnuplot.Advanced import qualified Graphics.Gnuplot.Terminal.X11 as X11 import Graphics.Gnuplot.File import qualified Graphics.Gnuplot.Graph.TwoDimensional as Graph2D import qualified Graphics.Gnuplot.Plot.TwoDimensional as Plot2D im...
dorchard/array-memoize
Plot.hs
bsd-2-clause
1,673
0
16
308
488
283
205
34
1
{-# LANGUAGE StrictData #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} module Citeproc.Eval ( evalStyle ) where import Citeproc.Types import Citeproc.Style (mergeLocales) import qualified Citeproc...
jgm/citeproc
src/Citeproc/Eval.hs
bsd-2-clause
109,825
2,156
31
42,483
27,706
14,809
12,897
2,361
31
{-# LANGUAGE OverloadedStrings #-} module Site.Zangsisi where import qualified Data.Text as T import Text.XML import Text.XML.Cursor -- import Network.Download -- import qualified Text.HTML.DOM as HTML -- import qualified Data.ByteString.Lazy.Char8 as L8 -- aaa :: IO () -- aaa = do -- p ...
drskur/Zang
src/Site/Zangsisi.hs
bsd-3-clause
1,083
0
9
212
218
121
97
20
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} module Onedrive.Types.SpecialFolderFacet where import Control.Lens (makeLensesWith, camelCaseFields) import Data.Aeson (FromJSON(parseJSON), Value(Object), (.:)) import Da...
asvyazin/hs-onedrive
src/Onedrive/Types/SpecialFolderFacet.hs
bsd-3-clause
662
0
8
91
133
78
55
18
0
{-# LANGUAGE TemplateHaskell, LambdaCase, TypeOperators #-} -- | TemplateHaskell functions for introducing new units. module Units.TH (makeUnit, makeUnits, makeConvert) where import Prelude hiding (div, exp, Rational, Int) import Data.Char (toLower) import Data.Maybe (catMaybes) import Language.Haskell.TH import Lan...
haasn/units
src/Units/TH.hs
bsd-3-clause
3,555
0
21
738
587
316
271
32
2
{-# LANGUAGE PackageImports #-} module ExportQualified_Export (main, X.X) where import Prelude import "foo" X main :: Fay () main = return ()
fpco/fay
tests/ExportQualified_Export.hs
bsd-3-clause
164
0
6
44
42
25
17
6
1
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVar...
dalaing/type-systems
src/Fragment/TyArr/Rules/Type/Infer/Common.hs
bsd-3-clause
3,959
0
16
1,058
1,272
674
598
100
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE ScopedTypeVariables #-} module QCommon.NetChannel where import Control.Lens (Traversal', Lens', use, (^.), (.=), (+=), preuse, (%=), zoom) import Control.Monad (void, when, liftM) import Data.Bits ((.&.), xor, (.|.)...
ksaveljev/hake-2
src/QCommon/NetChannel.hs
bsd-3-clause
10,719
0
32
2,920
2,835
1,509
1,326
-1
-1
module Main where import Criterion.Main import Data.Packed.Matrix as M import Numeric.LinearAlgebra.Algorithms as H -- hmatrix import Numeric.LinearAlgebra.Matrix as LA -- lin-alg import Numeric.LinearAlgebra.Matrix.Mat44 -- lin-alg main = do let m = (4><4)[1,0,0,0 ,0,1,0,0 ...
dagit/matrix-marks
src/MatrixMarks.hs
bsd-3-clause
800
0
13
282
300
164
136
22
1
{-# LANGUAGE OverloadedStrings, PackageImports #-} import Control.Applicative import Control.Monad import "monads-tf" Control.Monad.State import Control.Concurrent import Data.HandleLike import System.Environment import Network import Network.PeyoTLS.Server import Network.PeyoTLS.ReadFile import "crypto-random" Crypto...
YoshikuniJujo/peyotls
peyotls/examples/clcertServer.hs
bsd-3-clause
1,328
10
17
244
476
252
224
38
2
{- Copyright James d'Arcy 2011 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the followi...
jamesdarcy/Hastur
src/Hastur/Image.hs
bsd-3-clause
2,932
0
15
514
446
232
214
41
2
{-# OPTIONS_GHC -fno-warn-orphans #-} -- For the Arbitrary NFA instance. {-# LANGUAGE FlexibleInstances #-} module NFAGen where import Data.List ( genericReplicate ) import Data.List.NonEmpty ( NonEmpty(..), fromList ) import qualified Data.Set as S import Test.QuickCheck ( Arbitrary(..), elements, choose ) import qua...
owst/Penrose
test/NFAGen.hs
bsd-3-clause
1,830
0
14
532
548
299
249
38
0
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} {-# OPTIONS_GHC -funbox-strict-fields #-} module Tinfoil.Data.Token( SecureToken (..) , secureTokenLength ) where import Control.DeepSeq.Generics (genericRnf) import GHC.Generics (Generic) ...
ambiata/tinfoil
src/Tinfoil/Data/Token.hs
bsd-3-clause
714
0
6
145
97
63
34
18
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} module Scripts.FCCForm471Certification where import ClassyPrelude hiding (takeWhile, take) import Control.Lens hiding (index) import Data.Aeson import Data.Aeson.Lens import Appian ...
limaner2002/EPC-tools
USACScripts/src/Scripts/FCCForm471Certification.hs
bsd-3-clause
3,707
0
20
840
923
478
445
-1
-1
-- | Parse an interpret Bash configuration files. module Bash.Config ( -- * Types Env(..) , emptyEnv , Value(..) , Script , Function -- * Parsing , parse -- * Interpretation , Eval , interpret ) where import Bash.Config.Eval import Bash.Config.Parser import Bash.C...
knrafto/bash-config
src/Bash/Config.hs
bsd-3-clause
332
0
5
99
62
43
19
13
0
module BlunderLib.Units.Bishop where import Data.List import Data.Maybe import BlunderLib.Types import BlunderLib.Util allBishopMoves :: Board -> Color -> Position -> [Move] allBishopMoves brd col pos = mapMaybe (moveOrCap brd col pos) (diagonals brd pos)
karljs/blunderbot
src/BlunderLib/Units/Bishop.hs
bsd-3-clause
261
0
8
38
82
45
37
8
1
{-# LANGUAGE RecordWildCards #-} {-| This module exports basic Guesswork definitions for reading/writing files and basic tools to get started quickly. -} module Guesswork ( -- * Guesswork Monad Guesswork , Conf , defaultConf -- ** Guesswork flows , runGuesswork -- ** Essenti...
deggis/guesswork
src/Guesswork.hs
bsd-3-clause
1,336
0
5
367
211
144
67
50
0
-- | -- Module : Simulation.Aivika.Lattice.Estimate -- Copyright : Copyright (c) 2016-2017, David Sorokin <david.sorokin@gmail.com> -- License : BSD3 -- Maintainer : David Sorokin <david.sorokin@gmail.com> -- Stability : experimental -- Tested with: GHC 8.0.1 -- -- The module defines the 'Estimate' monad tran...
dsorokin/aivika-lattice
Simulation/Aivika/Lattice/Estimate.hs
bsd-3-clause
6,450
0
23
1,968
1,005
526
479
110
3
module Language.Interpreter.StdLib.Util ( addUtilStdLib ) where import Control.Monad ( mapM_ ) import Control.Monad.Except ( throwError ) import Control.Monad.Trans ( liftIO ) import System.Random ( mkStdGen ...
rumblesan/improviz
src/Language/Interpreter/StdLib/Util.hs
bsd-3-clause
3,154
0
13
1,184
717
361
356
63
3
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses ,PatternSynonyms ,CPP #-} module ZM.AsValue ( AsValue(..) , value , unValue ) where import Data.Model import ZM.Parser.Types ( Value , valName ...
tittoassini/typed
src/ZM/AsValue.hs
bsd-3-clause
20,225
0
16
6,549
5,825
3,154
2,671
-1
-1
{-| Module : Graphics.Sudbury.Protocol.Knot Description : Tie the knot of wayland protocol data Copyright : (c) Auke Booij, 2015-2017 License : MIT Maintainer : auke@tulcod.com Stability : experimental Portability : POSIX -} {-# LANGUAGE ScopedTypeVariables #-} module Graphics.Sudbury.Protocol.Knot where ...
abooij/sudbury
Graphics/Sudbury/Protocol/Knot.hs
mit
6,079
0
20
2,088
1,438
718
720
127
13
module Allergies (Allergen(..), isAllergicTo, allergies) where import Data.Bits (testBit) data Allergen = Eggs | Peanuts | Shellfish | Strawberries | Tomatoes | Chocolate | Pollen | Cats deriving (Enum, Eq, Show) isAl...
Bugfry/exercism
exercism/haskell/allergies/src/Allergies.hs
mit
523
0
8
165
145
83
62
15
1
-- -*- mode: haskell -*- {-# LANGUAGE TemplateHaskell #-} module NFA.SI where import Autolib.Exp import qualified Autolib.Exp.Example as E import Autolib.Set import Autolib.ToDoc import Autolib.Reader import Data.Typeable data SI = SI { name :: String -- abkürzung , ausdruck :: Exp , alphabet :: Set...
florianpilz/autotool
src/NFA/SI.hs
gpl-2.0
860
4
10
211
216
127
89
25
1
{- | Module : ./CASL/ToDoc.hs Description : pretty printing data types of BASIC_SPEC Copyright : (c) Christian Maeder and Uni Bremen 2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : experimental Portability : portable Pretty printing data types of ...
spechub/Hets
CASL/ToDoc.hs
gpl-2.0
19,088
0
29
5,420
6,731
3,402
3,329
452
19
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[PrelInfo]{The @PrelInfo@ interface to the compiler's prelude knowledge} -} {-# LANGUAGE CPP #-} module PrelInfo ( wiredInIds, ghcPrimIds, primOpRules, builtinRules, ghcPrimExports, knownKeyNames, primOpId, ...
AlexanderPankiv/ghc
compiler/prelude/PrelInfo.hs
bsd-3-clause
6,445
0
12
1,954
728
406
322
70
4
{-# LANGUAGE TemplateHaskell, QuasiQuotes #-} -- | -- Module : Language.C.Inline.ObjC -- Copyright : [2013] Manuel M T Chakravarty -- License : BSD3 -- -- Maintainer : Manuel M T Chakravarty <chak@cse.unsw.edu.au> -- Stability : experimental -- Portability : non-portable (GHC extensions) -- -- This modul...
beni55/language-c-inline
Language/C/Inline/ObjC.hs
bsd-3-clause
27,547
14
22
8,110
4,894
2,690
2,204
341
9
{-# LANGUAGE GADTs #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ViewPatterns #-} -- | -- Module : Data.Array.Accelerate.CUDA.CodeGen.Arit...
mwu-tow/accelerate-cuda
Data/Array/Accelerate/CUDA/CodeGen/Arithmetic.hs
bsd-3-clause
11,304
0
16
3,182
4,069
2,185
1,884
244
10
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, DeriveFunctor, PatternGuards #-} module Idris.ElabDecls where import Idris.AbsSyntax import Idris.ASTUtils import Idris.DSL import Idris.Error import Idris.Delaborate import Idris.Directives import Idris.Imports import Idris.Elab.Term import Idris.Co...
Enamex/Idris-dev
src/Idris/ElabDecls.hs
bsd-3-clause
10,607
0
21
3,479
3,677
1,852
1,825
223
6
module Strategies.Compose where import Startups.Interpreter import Startups.GameTypes import qualified Data.Map.Strict as M -- | Given a default strategy, and a list of player-specific strategy, -- builds a global strategy suitable for the intepreter. composeStrat :: Strategy p m -> [(PlayerId, Strategy p m)] -> Str...
bitemyapp/7startups
Strategies/Compose.hs
bsd-3-clause
577
0
10
114
153
81
72
9
1
-- | This module implements encoding and decoding of CSV data. The -- implementation is RFC 4180 compliant, with the following -- extensions: -- -- * Empty lines are ignored. -- -- * Non-escaped fields may contain any characters except -- double-quotes, commas, carriage returns, and newlines. -- -- * Escaped fiel...
howell/cassava
Data/Csv.hs
bsd-3-clause
6,885
0
5
1,486
351
292
59
43
0
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.StateVar -- Copyright : (c) Sven Panne 2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- -- Stat...
IreneKnapp/direct-opengl
Graphics/Rendering/OpenGL/GL/StateVar.hs
bsd-3-clause
4,573
0
10
877
716
414
302
45
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="sr-SP"> <title>Passive Scan Rules - Alpha | ZAP Extension</title> <maps> <homeID>top</homeI...
0xkasun/security-tools
src/org/zaproxy/zap/extension/pscanrulesAlpha/resources/help_sr_SP/helpset_sr_SP.hs
apache-2.0
988
80
67
163
422
213
209
-1
-1
module API where newtype Interface = Interface { field :: Int }
abuiles/turbinado-blog
tmp/dependencies/hs-plugins-1.3.1/testsuite/pdynload/spj4/api/API.hs
bsd-3-clause
67
0
6
15
17
12
5
2
0
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} module Blockchain.VM.Memory ( Memory(..), getSizeInBytes, getSizeInWords, getShow, getMemAsByteString, mLoad, mLoad8, mLoadByteString, unsafeSliceByteString, mStore, mStore8, mStoreByteString ) where import Control.Monad import Control....
jamshidh/ethereum-vm
src/Blockchain/VM/Memory.hs
bsd-3-clause
6,443
0
21
1,214
1,985
987
998
128
4
module ETA.Debug (module ETA.Utils.Outputable, unsafePerformIO, str, debugIO) where import ETA.Utils.Outputable hiding ((<>)) import ETA.Utils.FastString import Control.Monad.IO.Class import System.IO.Unsafe(unsafePerformIO) str :: String -> SDoc str = ptext . sLit debugIO :: (MonadIO m) => String -> m ()...
alexander-at-github/eta
compiler/ETA/Debug.hs
bsd-3-clause
383
0
8
63
126
75
51
13
1
{-# LANGUAGE OverloadedStrings #-} module Yesod.Form.I18n.German where import Yesod.Form.Types (FormMessage (..)) import Data.Monoid (mappend) import Data.Text (Text) germanFormMessage :: FormMessage -> Text germanFormMessage (MsgInvalidInteger t) = "Ungültige Ganzzahl: " `Data.Monoid.mappend` t germanFormMessage (Ms...
psibi/yesod
yesod-form/Yesod/Form/I18n/German.hs
mit
1,498
0
7
168
320
178
142
24
1
module Compile (compile) where import qualified Data.Map as Map import qualified AST.Module as Module import qualified AST.Module.Name as ModuleName import qualified Canonicalize import Elm.Utils ((|>)) import qualified Elm.Package as Package import qualified Nitpick.PatternMatches as Nitpick import qualified Nitpick...
pairyo/elm-compiler
src/Compile.hs
bsd-3-clause
2,083
0
13
462
466
263
203
49
1
module M1 where --Any type/data constructor name declared in this module can be renamed. --Any type variable can be renamed. --Rename type Constructor 'BTree' to 'MyBTree' data BTree a = Empty | T a (BTree a) (BTree a) deriving Show buildtree :: (Monad m, Ord a) => [a] -> m (BTree a) buildtree [] = ...
kmate/HaRe
old/testing/asPatterns/M1.hs
bsd-3-clause
1,007
0
15
415
345
170
175
21
3
module A2 where len xs = length xs {- map2 xs = map len xs -} map2 xs = case (len, xs) of (f, []) -> [] (f, (x : xs)) -> (f x) : (map2 xs)
kmate/HaRe
old/testing/generativeFold/A2_TokOut.hs
bsd-3-clause
175
0
10
73
85
47
38
5
2
{-# Language DeriveGeneric, MagicHash #-} import GHC.Generics import GHC.Prim data Array a = Array (Array# a) deriving Generic1 newtype Vec a = MkVec {unVec :: Array a} deriving Generic1
urbanslug/ghc
testsuite/tests/generics/T8468.hs
bsd-3-clause
189
0
8
31
51
31
20
5
0
{-# LANGUAGE RankNTypes #-} module Text.Greek.Script.Place where import qualified Data.Set as Set data Initial = IsInitial | NotInitial deriving (Eq, Ord, Show) data Medial = IsMedial | NotMedial deriving (Eq, Ord, Show) data Final = IsFinal | NotFinal deriving (Eq, Ord, Show) type Place3 = (Initial, Medial, Final)...
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/Script/Place.hs
mit
1,371
0
11
237
560
323
237
32
2
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE RankNTypes #-} module Web.Stripe.Test.Transfer where import Data.Maybe import Data.Either import Data.String import Web.Stripe.Test.Prelude import Web.St...
dmjio/stripe
stripe-tests/tests/Web/Stripe/Test/Transfer.hs
mit
3,582
0
18
1,170
366
205
161
42
1
module SplitLines (splitLines) where splitLines [] = [] splitLines cs = let (pre, suf) = break isLineTerminator cs in pre : case suf of ('\r':'\n':rest) -> splitLines rest ('\r':rest) -> splitLines rest ('\n':rest) -> splitLines rest _ -> [] i...
adz/real_world_haskell
ch04/SplitLines.hs
mit
364
0
12
127
136
69
67
10
4
{-# htermination insert :: Char -> [Char] -> [Char] #-} import List
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/List_insert_3.hs
mit
68
0
3
12
5
3
2
1
0
import System.Environment import GB2.Geometry import GB2.Primitive import GB2.Material import GB2.Color import GB2.RayTrace import System.Process import System.IO (openFile, IOMode(..)) import System.Exit (ExitCode(..)) import System.Random (mkStdGen) import Control.Monad.Random (evalRand) -- Scene -- Vec (50, 70, 8...
gbataille/halray
Halray.hs
mit
3,584
0
21
887
1,238
628
610
59
4
module Lib ( ui , output , heartRate , zone , formatZone ) where import qualified Data.Map as M import Text.Read(readMaybe) import System.Environment ui :: IO () ui = do (input:_) <- getArgs let hr = heartRate input putStrLn $ output hr output :: Maybe Int -> String output Nothing = "Wr...
dimus/zones
src/Lib.hs
mit
1,432
0
23
469
503
257
246
40
3
{-| Module: Flaw.FFI.COM.TH Description: Generating declarations for Windows COM interfaces. License: MIT -} {-# LANGUAGE TemplateHaskell #-} module Flaw.FFI.COM.TH ( genCOMInterface ) where import Data.Maybe import qualified Data.UUID as UUID import Foreign.Ptr import Foreign.Storable import Language.Haskell.TH...
quyse/flaw
flaw-ffi/Flaw/FFI/COM/TH.hs
mit
9,072
0
28
1,720
2,458
1,308
1,150
143
2
module Network.BitFunctor.P2P where import Network.BitFunctor.Block import Network.BitFunctor.Transaction relayBlock :: Block -> CurrencyP2P relayBlock = undefined relayTx :: Transaction -> CurrencyP2P relayTx = undefined requestBlocks :: [Hash Id] -> ([Hash Id] -> ()) -> CurrencyP2P requestBlocks = undefined req...
BitFunctor/bitfunctor
src/Network/BitFunctor/P2P.hs
mit
418
0
10
57
125
71
54
11
1
last' :: [x] -> x last' xs = xs !! (length xs - 1) last'' :: [x] -> x -- last'' xs = head (reverse xs) last'' = head . reverse
fabioyamate/programming-in-haskell
ch02/ex04.hs
mit
128
0
8
32
57
31
26
4
1
{-# LANGUAGE BangPatterns, LambdaCase, OverloadedStrings, TemplateHaskell #-} module Main ( main ) where import Control.Concurrent ( MVar , newMVar , threadDelay ...
adamse/mat-chalmers
app/Main.hs
mit
6,021
0
27
3,648
963
529
434
97
4
-- | This file implements evaluation of tree structure used for the formulas. -- -- Author: Thorsten Rangwich. See file <../LICENSE> for details. module FormulaEngine.Evaluate ( calcTree, calcCell, showTree ) where import qualified Data.List as List import qualified Data.Plain as P import qualified Tree.FormulaT...
tnrangwi/grill
src/FormulaEngine/Evaluate.hs
mit
3,327
0
11
1,098
695
375
320
49
3
----------------------------------------------------------------------------- -- | -- Module : JsHs.JSString.Read -- Copyright : Artem Chirkin -- License : MIT -- -- Maintainer : Artem Chirkin -- Stability : experimental -- -- --------------------------------------------------------------------------...
mb21/qua-kit
libs/hs/ghcjs-hs-interop/src/JsHs/JSString/Read.hs
mit
423
0
5
68
33
26
7
3
0
{-- -- Natume -- an implementation of Kana-Kanji conversion in Haskell -- Copyright (C) 2006-2012 Takayuki Usui -- -- 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 th...
takayuki/natume
Parser.hs
gpl-2.0
2,064
0
13
545
624
329
295
36
2
{-# LANGUAGE OverloadedStrings #-} module Adapter.ETree where import Prelude hiding (FilePath) import Types.Base import Types.ETree as ETree import qualified Types.Brick as B import qualified Data.Vector as V import qualified Logic.Tree as T import qualified Logic.Zipper as Z toTree :: ETree -> Tree (Entry, Zi...
diegospd/pol
src/Adapter/ETree.hs
gpl-3.0
532
0
14
95
184
107
77
14
1
---------------------------------------------------------------------------------- -- | -- Module : Tct.Utils.Xml -- Copyright : (c) Martin Avanzini <martin.avanzini@uibk.ac.at>, -- Georg Moser <georg.moser@uibk.ac.at>, -- Andreas Schnabl <andreas.schnabl@uibk.ac.at> -- License ...
mzini/TcT
source/Tct/Utils/Xml.hs
gpl-3.0
1,874
0
10
419
325
187
138
28
1
-- | This module defines the levels. -- -- Objects are represented as Signal Functions ('ObjectSF'). In this -- game we are introducing a novel construct, named 'AliveObject' in this -- a particular instance of a 'ListSF'. A 'ListSF' is a signal function that -- can die, or can produce more signal functions of the sam...
keera-studios/pang-a-lambda
src/Game/Levels.hs
gpl-3.0
20,415
0
10
7,299
7,258
4,132
3,126
250
1
{- Merch.Race.Ruleset.Load - Ruleset loader. Copyright 2013 Alan Manuel K. Gloria This file is part of Merchant's Race. Merchant's Race 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 Li...
AmkG/merchants-race
Merch/Race/Ruleset/Load.hs
gpl-3.0
1,424
0
12
250
181
94
87
17
2
module Main where import qualified Data.Bimap as Bimap import Data.Function import qualified Data.Map.Strict as Map import Data.Monoid import System.Random (getStdGen) import Options.Applicative import Snorkels.Board import Snorkels.Game import Snorkels.Actions data MainParser = MainParser { optPlayers :: [PlayerT...
unaizalakain/snorkels-hs
src/Main.hs
gpl-3.0
2,794
0
14
1,103
721
368
353
66
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.CloudErrorReporting.Types.Sum -- Copyright : (c) 2015-...
brendanhay/gogol
gogol-clouderrorreporting/gen/Network/Google/CloudErrorReporting/Types/Sum.hs
mpl-2.0
11,136
0
11
2,464
1,332
729
603
161
0
{-# LANGUAGE OverloadedStrings #-} module WikiTest ( wikiSpecs ) where import TestImport wikiSpecs :: Spec wikiSpecs = ydescribe "wiki" $ do yit "creates a new page" $ [marked| login get $ NewWikiR "snowdrift" "testpage" statusIs 200 request $ do...
Happy0/snowdrift
tests/WikiTest.hs
agpl-3.0
1,684
0
9
743
58
34
24
-1
-1
-- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } func :: ( ( lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd , (lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd) , lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd ) )
lspitzner/brittany
data/Test386.hs
agpl-3.0
287
0
7
50
22
14
8
4
0