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
{- Generated from "srcLoc.duck" automatically; do not edit! -} {-# LINE 1 "srcLoc.duck" #-} module Gen.SrcLoc where {-# LINE 1 "srcLoc.duck" #-} import Memory {-# LINE 3 "srcLoc.duck" #-} data SrcLoc = SrcNone{srcFile :: !String} | SrcLoc{srcFile :: !String, srcLine :: !Int, srcCol :: !Int} ...
girving/duck
duck/Gen/SrcLoc.hs
bsd-3-clause
2,036
0
13
749
531
277
254
37
0
{-# LANGUAGE OverloadedStrings #-} module Spec.Logic ( logicSpecs ) where import Prelude hiding (lookup) import Base import Logic import Models (true) import Universe import Util (toSqlKey) import Test.Hspec import Spec.Helpers import Control.Monad.State (runState) runU :: State Universe a -> (a, Universe) run...
jamesdabbs/pi-base-2
test/Spec/Logic.hs
bsd-3-clause
1,849
0
19
509
758
388
370
51
1
module Sexy.Instances.DesnocMay () where import Sexy.Instances.DesnocMay.List () import Sexy.Instances.DesnocMay.Maybe ()
DanBurton/sexy
src/Sexy/Instances/DesnocMay.hs
bsd-3-clause
123
0
4
11
30
21
9
3
0
module Language.LaTeX.Builder.Rotating (pkg, turn) where import Language.LaTeX.Types import qualified Language.LaTeX.Builder.Internal as BI pkg :: PackageName pkg = BI.pkgName "rotating" turn :: Int -> LatexItem -> LatexItem turn i = BI.latexEnvironment "turn" [BI.packageDependency pkg, BI.mandatory (BI.num i)]
np/hlatex
Language/LaTeX/Builder/Rotating.hs
bsd-3-clause
316
0
10
39
99
57
42
7
1
{-# LINE 1 "Data.Void.hs" #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE EmptyCase #-} {-# LANGUAGE Safe #-} {-# LANGUAGE StandaloneDeriving #-} ----------------------------------------------------------------------------- -- | -- Copyright : (C) 2008-2014 Edward Kmett -- Licens...
phischu/fragnix
builtins/base/Data.Void.hs
bsd-3-clause
1,767
0
7
355
258
150
108
-1
-1
module HSync.Server.Types where import HSync.Server.Import.NoFoundation -------------------------------------------------------------------------------- data AccessOptionType = ByAnonimous | ByPassword | ByUser deriving (Show,Read,Eq,Ord) instance PathPiece AccessOptionType where toPathPie...
noinia/hsync-server
src/HSync/Server/Types.hs
bsd-3-clause
379
0
6
60
65
39
26
7
0
{-# LANGUAGE ForeignFunctionInterface #-} {-| Module : Finance.Blpapi.Impl.ServiceImpl Description : FFI for Service Copyright : Bloomberg Finance L.P. License : MIT Maintainer : agupta182@bloomberg.net Stability : experimental Portability : *nix, windows -} module Finance.Blpapi.Impl.ServiceImpl where i...
bitemyapp/blpapi-hs
src/Finance/Blpapi/Impl/ServiceImpl.hs
mit
5,975
0
13
1,752
1,091
530
561
99
1
module Main where import Test.Hspec import Spec main :: IO () main = hspec spec
dzotokan/minions-api
test/Main.hs
mit
82
0
6
17
30
17
13
5
1
{-# LANGUAGE TypeOperators, TypeFamilies, GADTs, KindSignatures #-} {-# LANGUAGE ExistentialQuantification, ScopedTypeVariables, PatternGuards #-} {-# LANGUAGE MagicHash, ConstraintKinds, ViewPatterns, MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts, FlexibleInstances #-} {-# LANGUAGE CPP #-} {-# LANGUAGE Undec...
conal/lambda-ccc
src/LambdaCCC/Lambda.hs
bsd-3-clause
23,605
0
14
6,216
6,300
3,359
2,941
323
6
{-# OPTIONS -fno-warn-type-defaults -fno-warn-unused-binds -fno-warn-orphans #-} {-# LANGUAGE FlexibleInstances, ExistentialQuantification #-} module Test.TestParseTime where import Control.Monad import Data.Char import Data.Ratio import Data.Time import Data.Time.Calendar.OrdinalDate import Data.Time.Calendar.WeekDa...
hvr/time
test/Test/TestParseTime.hs
bsd-3-clause
22,343
0
40
4,285
6,945
3,692
3,253
403
2
{-# LANGUAGE OverloadedStrings #-} module HomeTest ( homeSpecs ) where import qualified Data.List as L import TestImport homeSpecs :: Spec homeSpecs = ydescribe "These are some example tests" $ do yit "loads the index and checks it looks right" $ do get HomeR st...
Codas/campaign-next
tests/HomeTest.hs
bsd-3-clause
1,294
0
16
463
216
97
119
28
1
module Feature.ProxySpec where import Test.Hspec hiding (pendingWith) import SpecHelper import Network.Wai (Application) import Protolude hiding (get) spec :: SpecWith Application spec = describe "GET / with proxy" $ it "returns a valid openapi spec with proxy" $ validateOpenApiResponse [("Accept", "ap...
Skyfold/postgrest
test/Feature/ProxySpec.hs
mit
346
0
8
57
78
45
33
10
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RankNTypes #-} module Language.Haskell.Refact.Utils.ExactPrint ( replace , replaceAnnKey , copyAnn , setAnnKeywordDP , clearPriorComments , balanceAllCo...
RefactoringTools/HaRe
src/Language/Haskell/Refact/Utils/ExactPrint.hs
bsd-3-clause
10,046
0
21
2,569
2,824
1,445
1,379
188
3
{-# OPTIONS_GHC -Wall -fno-warn-unused-do-bind #-} module Parse.Type where import Control.Applicative ((<$>),(<*>),(<*)) import Data.List (intercalate) import Text.Parsec ((<|>), (<?>), char, many, optionMaybe, string, try) import qualified AST.Type as Type import qualified AST.Variable as Var import Parse.Helpers im...
johnpmayer/elm-compiler
src/Parse/Type.hs
bsd-3-clause
2,639
0
17
739
910
461
449
81
3
{-# LANGUAGE CPP #-} module Set ( Set, member, empty, insert ) where import Data.Set #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 603 member :: Ord a => a -> Set a -> Bool member = elementOf empty :: Set a empty = emptySet insert :: Ord a => a -> Set a -> Set a insert = flip addToSet #endif
beni55/alex
src/Set.hs
bsd-3-clause
311
0
8
65
101
55
46
3
0
{-# LANGUAGE ScopedTypeVariables #-} module Greek where import Prelude hiding (words) import qualified Data.ByteString as BS import qualified Data.Either as Either import qualified Data.List as List import qualified Data.Maybe as Maybe import Data.Map (Map) import qualified Data.Map.Strict as Map import qualified Dat...
ancientlanguage/haskell-analysis
prepare/app/Greek.hs
mit
7,028
0
23
1,382
2,412
1,225
1,187
-1
-1
{-# LANGUAGE BangPatterns , CPP , RecordWildCards , TypeFamilies , TypeOperators #-} module BigPixel.BigRGBPixel ( BigRGBPixel (..), BigRGB, BigRGBDelayed ) where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative ((<$>), (<*>)) #endif import Vision.Image.RGB.T...
eklinkhammer/haskell-vision
BigPixel/BigRGBPixel.hs
mit
2,033
0
12
594
552
303
249
53
0
{-# htermination isAlphaNum :: Char -> Bool #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_isAlphaNum_1.hs
mit
48
0
2
8
3
2
1
1
0
module Bank.Models.Account ( module X ) where import Bank.Models.Account.CommandHandler as X import Bank.Models.Account.Commands as X import Bank.Models.Account.Events as X import Bank.Models.Account.Projection as X
jdreaver/eventful
examples/bank/src/Bank/Models/Account.hs
mit
221
0
4
28
49
37
12
6
0
-- -- This code was created by Jeff Molofee '99 (ported to Haskell GHC 2005) -- module Main where import qualified Graphics.UI.GLFW as GLFW -- everything from here starts with gl or GL import Graphics.Rendering.OpenGL.Raw import Graphics.Rendering.GLU.Raw ( gluPerspective ) import Data.Bits ( (.|.) ) import System.Ex...
spetz911/progames
nehe-tuts-0.2.3/lesson02.hs
mit
3,600
0
11
969
711
361
350
75
1
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances, FlexibleContexts, LambdaCase #-} module Control.Monad.Activatable.Class ( -- * The 'MonadActivatable' class MonadActivatable(..), switching', activateWith, activate, -- * ...
antalsz/hs-to-coq
src/lib/Control/Monad/Activatable/Class.hs
mit
7,714
0
11
1,892
2,225
1,241
984
110
3
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiWayIf #-} -- | -- Module : Game.Game.Poker -- Copyright : (c) 2017 Christopher A. Gorski -- License : MIT -- Maintainer : Christopher A. Gorski <cgorski@cgorski.org> -- -- The Game.Game.Poker module provides operations ...
cgorski/general-games
src/Game/Game/Poker.hs
mit
22,974
0
18
5,294
6,108
3,147
2,961
471
13
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} module Main where import Network.IRC.Client import Network.IRC.Client.Types import System.Environment import Options.Applicative import Control.Applicative import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.IO as T import Control.Mon...
danchoi/irclog
Main.hs
mit
3,511
0
17
703
821
419
402
71
2
module Interpreter.RuntimeError ( RuntimeError(..) ) where import Util.Error (ErrorT(kind)) data RuntimeError = Unsupported | UnknownVariable String | MatchFailure deriving (Show) instance ErrorT RuntimeError where kind _ = "RuntimeError"
tadeuzagallo/verve-lang
src/Interpreter/RuntimeError.hs
mit
256
0
6
45
67
40
27
10
0
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} module StringBuffer where import Data.Monoid import Buffer instance Buffer String where toString = id fromString = id line n b = safeIndex n (lines b) replaceLine n l = unlines . uncurry replaceLine' . splitAt n . lines where replaceLi...
mauriciofierrom/cis194-homework
homework07/src/StringBuffer.hs
mit
625
0
10
171
237
122
115
18
1
module Discussion.Data where -------------------------------------------------------------------------------- data Term = VarT Var | App [Term] | Lambda [Var] Term | Joint Term -- Termに対する処理の途中で目印として使う事がある deriving (Eq, Show) newtype Var = Var Identifier ...
todays-mitsui/discussion
src/Discussion/Data.hs
mit
1,055
0
8
343
188
115
73
24
0
{-# LANGUAGE OverloadedStrings #-} module Y2021.M01.D20.Solution where import Control.Arrow ((&&&)) import Data.Aeson import Data.Aeson.WikiDatum import Graph.Query import Graph.JSON.Cypher import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe (fromMaybe) import qualified Data.ByteString.Lazy....
geophf/1HaskellADay
exercises/HAD/Y2021/M01/D20/Solution.hs
mit
1,781
0
12
381
251
147
104
-1
-1
import System.Environment (getArgs) import Data.List import Data.List.Split import Juicer.Freeze import Juicer.Puree import Juicer.Blend main :: IO () main = do args <- getArgs case args of (diffname:archivename:[]) -> do maybeDiff <- diffthaw diffname maybeArchive <- thaw archivename ...
blanu/juicer
blend.hs
gpl-2.0
791
0
16
206
272
133
139
25
4
-- | Streaming Fasta handling via the @streaming@ library. -- -- The functions in here should be streaming in constant memory. -- -- A typical, slightly complicated is this: -- @ -- forEach :: forall r . Stream (ByteString m) m r -> m (Stream (Of ()) m r) -- forEach dna = do -- -- extract the header, but at most ...
choener/BiobaseFasta
Biobase/Fasta/Streaming.hs
gpl-3.0
8,118
0
18
1,704
1,775
944
831
-1
-1
module NumberTheory.ModularExponentiation where import NumberTheory.PositionalBases modular_pow a k m = m_P 1 0 where m_P c e | e == k = c | otherwise = m_P (mod (c*a) m) (e+1) modular_pow_bin_method a k m = (product $ zipWith (expv2) (binary_Powers_a) (binary_Digits_k)) `mod` m where bin...
mathlover2/number-theory
NumberTheory/ModularExponentiation.hs
gpl-3.0
559
5
12
157
264
134
130
14
1
-- file: ch02/add.hs add a b = a + b
craigem/RealWorldHaskell
ch02/add.hs
gpl-3.0
37
0
5
10
16
8
8
1
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveAnyClass #-} {-# OPTIONS_GHC -fno-warn-orphans #-} ...
kmilner/tamarin-prover
src/Web/Types.hs
gpl-3.0
26,863
0
13
7,643
4,588
2,447
2,141
-1
-1
{-# language OverloadedStrings #-} module Main where import Spieler import Game import Bank import Registrar import Logger import State import Chart ( chart_location ) import Rating ( taxman, taxman2, chartman ) import Network.Wai.Handler.Warp import Network.HTTP.Types (statusOK) import Network.Wai import Control.C...
jwaldmann/mex
src/Server.hs
gpl-3.0
1,654
0
17
467
453
242
211
48
4
quicksort [] = [] quicksort (p:xs) = (quicksort lesser) ++ [p] ++ (quicksort greater) where (lesser, greater) = partition (< p) xs
BaReinhard/Hacktoberfest-Data-Structure-and-Algorithms
algorithms/quick_sort/haskell/quicksort.hs
gpl-3.0
134
0
8
25
74
39
35
3
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-ssm/gen/Network/AWS/SSM/DescribeAssociation.hs
mpl-2.0
4,078
0
9
870
503
305
198
64
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-admin-directory/gen/Network/Google/Resource/Admin/Customers/Chrome/Printers/BatchDeletePrinters.hs
mpl-2.0
6,208
0
20
1,409
792
461
331
126
1
import Hastistics import Hastistics.Distributions import Hastistics.Types hiding ((-)) import Hastistics.Data.CSV simpleReport :: HSTable t => t -> HSReport simpleReport t = select $ avgOf "Punkte" $ avgOf "Note" $ from t genderReport :: HSTable t => t -> HSReport genderReport t = s...
fluescher/hastistics
tests/report.hs
lgpl-3.0
1,758
0
11
607
449
222
227
37
1
{-#LANGUAGE DeriveDataTypeable#-} ----------------------------------------------------------------------------- -- | -- Module : Bindings.Verba.ErrorCodes -- Copyright : (c) Macil 2014 -- License : PublicDomain -- -- Maintainer : Macil.dev@gmail.com -- Stability : experimental -- Portability : unpo...
Macil-dev/verhface-ll
src/Bindings/Verba/ErrorCodes.hs
unlicense
7,482
0
9
1,315
950
458
492
62
1
-- the Out-of-the-Tarpit example in Haskell and Project:M36 {-# LANGUAGE DeriveAnyClass, DeriveGeneric, OverloadedStrings, DerivingVia #-} import ProjectM36.Client import ProjectM36.DataTypes.Primitive import ProjectM36.Tupleable import ProjectM36.Relation import ProjectM36.Error import Data.Either import GHC.Generics ...
agentm/project-m36
examples/out_of_the_tarpit.hs
unlicense
11,289
0
15
3,516
2,290
1,257
1,033
-1
-1
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} module P5 where import Data.Monoid ((<>)) import Control.Lens import Control.Monad.Except import Control.Monad.Reader import ...
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/program-structure/2015-06-george-wilson-classy-optics/src/P5.hs
unlicense
4,994
0
18
1,340
1,431
745
686
137
2
module Main where import Control.Monad import Control.Monad.Error import Control.Monad.Identity import Control.Monad.Trans import Data.Char import Data.List import Data.Maybe import Error import Expr import Parser import qualified Data.Map as DM import System.Exit import Text.Printf type Eval a = Erro...
ulan/hisp
level1/Hisp1.hs
unlicense
6,484
0
19
1,742
3,026
1,530
1,496
160
3
{- Copyright 2020 The CodeWorld Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicab...
google/codeworld
codeworld-compiler/test/testcases/typedHoleWithRelevantBindings/source.hs
apache-2.0
650
0
6
122
30
16
14
2
1
-- | -- Module: Network.Riak -- Copyright: (c) 2011 MailRank, Inc. -- License: Apache -- Maintainer: Bryan O'Sullivan <bos@mailrank.com> -- Stability: experimental -- Portability: portable -- -- A client for the Riak decentralized data store. -- -- The functions in this module use JSON as the storage -- r...
bumptech/riak-haskell-client
src/Network/Riak.hs
apache-2.0
2,152
0
6
441
195
145
50
28
0
#!/usr/bin/env runhaskell -- The classic 8-queens problem made famous by Wirth. -- This version Colin Runciman, March 2000. main = if null solutions then putStrLn "no solution!" else putStr (board (head solutions)) where solutions = queens 8 queens :: Int -> [[Int]] queens n = valid n n valid :: Int ...
sergev/vak-opensource
languages/haskell/queens.hs
apache-2.0
1,188
8
16
337
614
326
288
32
3
<?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="tr-TR"> <title>HTTPS Info Add-on</title> <maps> <homeID>httpsinfo</homeID> <mapref loca...
secdec/zap-extensions
addOns/httpsInfo/src/main/javahelp/org/zaproxy/zap/extension/httpsinfo/resources/help_tr_TR/helpset_tr_TR.hs
apache-2.0
975
77
67
157
419
211
208
-1
-1
{-# LANGUAGE OverloadedStrings #-} module GeneratedTests where import Test.Tasty import Test.Tasty.HUnit (assertEqual, testCase, (@?=)) import Data.String import Proto3.Suite.DotProto.Generate import Turtle hiding (err) generatedTests :: TestTree generatedTests = testGroup "Code generator tests" [ testServerGen...
awakenetworks/gRPC-haskell
tests/GeneratedTests.hs
apache-2.0
2,389
0
17
504
607
296
311
64
1
{-# LANGUAGE Haskell2010 #-} -- | This module tests that if we're trying to link to a /qualified/ -- identifier that's not in scope, we get an anchor as if it was a -- variable. Previous behaviour was to treat it as a type constructor -- so issue like #253 arose. Also see @rename@ function comments in -- source. module...
haskell/haddock
html-test/src/Bug253.hs
bsd-2-clause
426
0
5
78
25
18
7
4
1
{-# LANGUAGE DeriveGeneric #-} module Effects where import Control.Applicative import Control.Category import Control.Lens import Control.Monad.Reader as Reader import qualified Data.IntMap.Strict as IntMap import GHC.Generics import Prelude hiding (Either(..), id, (.)) import Coord import Entity import GameM import ...
fros1y/umbral
src/Effects.hs
bsd-3-clause
2,903
0
15
671
867
458
409
77
2
module HighOrdAluOps where import CLasH.HardwareTypes type Op n e = (Vector n e -> Vector n e -> Vector n e) type Opcode = Bit constant :: NaturalT n => e -> Op n e constant e a b = vcopy e invop :: Op n Bit invop a b = vmap hwnot a andop f a b = vzipWith f a b -- Is any bit set? anyset :: NaturalT n => (e -> e -...
christiaanb/clash
examples/HighOrdAluOps.hs
bsd-3-clause
433
0
9
126
221
112
109
13
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.PackageDescription.Check -- Copyright : Lennart Kolmodin 2008 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This has code for checking for various p...
corngood/cabal
Cabal/Distribution/PackageDescription/Check.hs
bsd-3-clause
75,627
0
22
20,287
14,211
7,392
6,819
1,274
33
module Compile.SimpleLambda where import Bytecode.Instruction import Compile.Variable -- a simple lambda is one that doesnt have a nested lambda expression data SimpleLambda = SimpleLambda { simpleLambdaSymbol :: Symbol , simpleLambdaArity :: Int , simpleLambdaBody :: SimpleLambda...
exFalso/lambda
src/lib/Compile/SimpleLambda.hs
bsd-3-clause
479
0
8
107
79
48
31
14
0
module Tokenizer where import Data.Char import FPPrac import Debug.Trace data Token = TokProgram -- supporting | TokComma | TokSemi | TokLcurly | TokRcurly | TokLparen | TokRparen -- assign | TokAssign -- int operands | TokPlus -- can be unary | TokMinus -- can be unary | TokMult | TokDivide | TokM...
tscheepers/Simple-Compiler
Tokenizer.hs
bsd-3-clause
4,195
20
10
1,182
1,950
1,046
904
115
1
{-# LANGUAGE DeriveGeneric #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} -- A place to explore some early ideas about nested data parallelism on -- hierarchical architectures. -------------------------------------------------------------------------------- module NDP_Hierarchical where import Data.Map as M impo...
iu-parfunc/ndp_brainstorm
NDP_Hierarchical.hs
bsd-3-clause
13,545
0
20
3,030
2,179
1,194
985
142
4
module GitRunner ( GitRepo(..) , GitCommand(..) , gitIsDirtyTree , buildGitRevisionString , runGit ) where import System.IO import System.Process import System.Exit data GitRepo = GitRepo { gitRepoPath :: FilePath } deriving (...
kaitanie/irt
src/GitRunner.hs
bsd-3-clause
2,144
0
21
528
613
319
294
50
2
module Exercises where -- (2.12) page 82 -- let x = 3; y = 1000 in x * 3 + y op1 = x * 3 + y where x = 3 y = 1000 -- let y = 10; x = 10 * 5 + y in x * 5 op2 = x * 5 where y = 10 x = 10 * 5 * y -- let x = 7; y = negate x; z = y * 10 in z / x + y op3 = z / x + y where x = 7 y = negate...
dsaenztagarro/haskellbook
src/chapter2/Exercises.hs
bsd-3-clause
478
0
8
212
158
89
69
17
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Prosper.User ( User(..) ) where import Control.Monad (when) import Data.ByteString (ByteString) -- | User info for Prosper data data User = User { username :: !ByteString -- ^ Username ...
WraithM/prosper
src/Prosper/User.hs
bsd-3-clause
414
0
9
121
74
46
28
14
0
module Astro.Trajectory.CroppedSpec where import Test.Hspec --import Test.QuickCheck (property, (==>)) import TestUtil import TestInstances import Astro.Trajectory import Astro.Trajectory.Cropped import Astro.Trajectory.EphemTrajectory import qualified Prelude import Numeric.Units.Dimensional.Prelude import Astro.T...
bjornbm/astro-orbit
test/Astro/Trajectory/CroppedSpec.hs
bsd-3-clause
9,995
0
19
2,434
3,677
1,979
1,698
188
1
module Hilt.Handles.Cache (module Hilt.Handles.Cache) where import Data.Text (Text) data Handle = Handle { insert :: Text -> Text -> IO () , lookup :: Text -> IO (Maybe Text) , delete :: Text -> IO () , keys :: IO [Text] , size :: IO Int }
supermario/hilt
src/Hilt/Handles/Cache.hs
bsd-3-clause
260
0
12
67
109
62
47
9
0
{-# LANGUAGE PatternGuards #-} {-# LANGUAGE ViewPatterns #-} module Mistral.TypeCheck.Patterns ( withPatEnv , genMatch , tcLit ) where import Mistral.ModuleSystem.Name import qualified Mistral.Parser.AST as P import Mistral.TypeCheck.AST import Mistral.TypeCheck.Env import ...
GaloisInc/mistral
src/Mistral/TypeCheck/Patterns.hs
bsd-3-clause
11,170
0
19
3,143
3,506
1,814
1,692
194
13
-------------------------------------------------------------------------------- -- | Exports a datastructure for the top-level hakyll configuration module Hakyll.Core.Configuration ( Configuration (..) , shouldIgnoreFile , defaultConfiguration ) where -------------------------------------------------...
freizl/freizl.github.com-old
src/Hakyll/Core/Configuration.hs
bsd-3-clause
4,747
0
14
1,341
643
382
261
57
3
module Data.WithClass.Derive.MData (makeMDataAbstract,makeMData,ctorDeclsTypes,ctorDeclVars,app2,app4,mkCtorExp,mkCtorPat) where import Language.Haskell as H import Data.Derive.Internal.Derivation import Data.List -- * Derive opaque @MData@ instances (default @gfoldl@ and empty declarations for the remaining functio...
cornell-pl/HsAdapton
syb-with-class-and-effects/src/Data/WithClass/Derive/MData.hs
bsd-3-clause
6,054
6
18
1,027
2,614
1,356
1,258
74
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module RDPURI ( -- Our Type RDPURI(..), Attribute(..), -- The lenses rdpuriAddress, rdpuriAttributes, -- Rendering renderRDPURI, -- Support addAttribute, -- Data types ZeroOne(..), ZeroOneTwo...
vlc/rdp-uri
src/RDPURI.hs
bsd-3-clause
5,142
0
14
987
1,362
737
625
119
29
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} module Pretty where import Syntax -- import Cegt.Rewrite import Text.PrettyPrint import Text.Parsec.Pos import Data.Char import Text.Parsec.Error(ParseError,showErrorMessages,errorPos,errorMessages) -- import Debug.Trace class Disp d where disp :: d -> Doc pr...
Fermat/higher-rank
src/Pretty.hs
bsd-3-clause
5,075
0
16
1,529
2,302
1,133
1,169
127
2
module AST.Module where import Data.Binary import qualified Data.List as List import qualified Data.Map as Map import Control.Applicative ((<$>),(<*>)) import qualified AST.Expression.Canonical as Canonical import qualified AST.Declaration as Decl import qualified AST.Type as Type import qualified AST.Variable as Var...
JoeyEremondi/utrecht-apa-p1
src/AST/Module.hs
bsd-3-clause
4,262
0
13
1,094
1,329
738
591
120
3
module Test.Integration.Scenario.Addresses ( spec ) where import Universum import Cardano.Wallet.API.V1.Types (Account (accAddresses), WalletAddress (..)) import qualified Cardano.Wallet.Client.Http as Client import Test.Integration.Framework.DSL spec :: Sce...
input-output-hk/pos-haskell-prototype
wallet/test/integration/Test/Integration/Scenario/Addresses.hs
mit
3,653
0
19
1,241
766
385
381
-1
-1
module Main where import Statistics.Quantile.Bench import Statistics.Quantile.Exact import Statistics.Quantile.Util import Statistics.Quantile.Types import System.IO main :: IO () main = do hSetBuffering stdin LineBuffering hSetBuffering stdout LineBuffering selectFromHandle median external stdin >>= print
fractalcat/slides
2015-08-26-fp-syd-approx-quantiles/approx-quantile/main/quantile.hs
mit
318
0
8
42
78
42
36
11
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE...
qmuli/qmuli
library/Qi/Program/CF/Ipret/Gen.hs
mit
5,096
0
25
2,052
778
437
341
81
8
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Unittests for the 'Ganeti.Common' module. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 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...
sarahn/ganeti
test/hs/Test/Ganeti/Common.hs
gpl-2.0
6,790
0
17
2,260
1,125
619
506
109
5
-- What a basic console application would look like using hplayground import Haste.HPlay.View import Prelude hiding(print) main= runBody $ do print "What is your name?" name <- getString Nothing `fire` OnKeyUp print $ "hello " ++ name ++"!" print= wraw . pre
agocorona/tryhplay
examples/console.hs
gpl-3.0
273
0
10
56
72
38
34
7
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE PackageImports #-} import "hint" HLint.Default import "hint" HLint.Dollar ignore "Use import/export shortcut"
saep/nvim-hs
HLint.hs
apache-2.0
157
0
5
19
21
12
9
5
0
{-# LANGUAGE TupleSections #-} {-| This module contains the logging configuration functions for K3's logging system. -} module Language.K3.Utils.Logger.Config ( configureLogging , parseInstruction , configureLoggingHandlers , configureByInstruction ) where import Control.Applicative ((<$>)) import Data.List.Split...
DaMSL/K3
src/Language/K3/Utils/Logger/Config.hs
apache-2.0
2,682
0
12
565
562
296
266
59
9
{-# LANGUAGE TemplateHaskell, ScopedTypeVariables, NamedFieldPuns #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Unittests for the job scheduler. -} {- Copyright (C) 2014 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the...
ganeti/ganeti
test/hs/Test/Ganeti/JQScheduler.hs
bsd-2-clause
21,793
0
28
7,081
4,441
2,386
2,055
-1
-1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Network/Wai/Handler/Warp/Counter.hs" #-} {-# LANGUAGE CPP #-} module Network.Wai.Handler.Warp.Counter ( Counter , newCounter , waitForZero , increase ...
phischu/fragnix
tests/packages/scotty/Network.Wai.Handler.Warp.Counter.hs
bsd-3-clause
824
0
10
257
232
124
108
22
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash, UnboxedTuples, StandaloneDeriving, AutoDeriveTypeable, NegativeLiterals #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Int -...
rahulmutt/ghcvm
libraries/base/GHC/Int.hs
bsd-3-clause
37,025
0
17
11,926
9,801
5,143
4,658
648
2
-------------------------------------------------------------------- -- | -- Module : Text.Feed.Export -- Copyright : (c) Galois, Inc. 2008 -- License : BSD3 -- -- Maintainer: Sigbjorn Finne <sof@galois.com> -- Stability : provisional -- Description: Convert from Feeds to XML. -- ----------------------------------...
GaloisInc/feed
Text/Feed/Export.hs
bsd-3-clause
891
0
9
159
144
89
55
14
4
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE DeriveGeneric, NoImplicitPrelude, MagicHash, ExistentialQuantification, ImplicitParams #-} {-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : G...
olsner/ghc
libraries/base/GHC/IO/Exception.hs
bsd-3-clause
14,126
0
17
3,025
2,077
1,170
907
234
2
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Text.ParserCombinators.ReadPrec -- Copyright : (c) The University of Glasgow 2002 -- License : BSD-style (see the file librar...
elieux/ghc
libraries/base/Text/ParserCombinators/ReadPrec.hs
bsd-3-clause
4,185
0
15
835
1,049
579
470
80
2
{-# LANGUAGE OverloadedStrings #-} module TwinkleBear.Lesson01 (main) where import Prelude hiding (init) import Linear import Linear.Affine ( Point(P) ) import qualified SDL import Paths_sdl2 (getDataFileName) main :: IO () main = do SDL.initializeAll let winConfig = SDL.defaultWindow { SDL.windowPosition = SD...
seppeljordan/sdl2
examples/twinklebear/Lesson01.hs
bsd-3-clause
1,042
0
16
228
290
144
146
27
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Main where -- Protolude uses <> and options from Semigroups, but -- optparse-applicative hasn't caught up yet. import Protolude hiding ((<>)) import Control.Monad.Catch (MonadMask) import Data.Monoid ((<>)) import D...
dhess/gpio
examples/Gpio.hs
bsd-3-clause
4,708
0
18
1,425
1,171
614
557
126
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE PatternGuards #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Configure -- Copyright :...
headprogrammingczar/cabal
Cabal/Distribution/Simple/Configure.hs
bsd-3-clause
98,539
1
22
29,672
15,976
8,378
7,598
1,394
15
module Distribution.Server.Pages.Util ( hackageNotFound , hackageError , makeInput , makeCheckbox , packageType ) where import Data.List (intercalate) import Distribution.Server.Pages.Template (hackagePage) import Text.XHtml.Strict hackageNotFound :: HTML a => a -> Html hackageNotFound co...
agrafix/hackage-server
Distribution/Server/Pages/Util.hs
bsd-3-clause
2,154
0
14
746
657
350
307
53
11
<?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="ko-KR"> <title>Retest Add-On</title> <maps> <homeID>retest</homeID> <mapref location="m...
kingthorin/zap-extensions
addOns/retest/src/main/javahelp/org/zaproxy/addon/retest/resources/help_ko_KR/helpset_ko_KR.hs
apache-2.0
961
77
67
156
411
208
203
-1
-1
module TestTerms where import qualified Src as S import Core import Language.Java.Syntax as J (Op(..)) import Prelude hiding (const) -- mu loop. \x -> loop x loopStr = "fix loop. \\(x : Int). loop x : Int -> Int" loop = fix (\loop x -> App (var loop) (var x)) (JClass "java.lang.Integer") (JClass "java.lang.Integer"...
bixuanzju/fcore
testsuite/TestTerms.hs
bsd-2-clause
5,281
0
26
1,334
2,591
1,333
1,258
88
1
{-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} module T17566b where class C f where type T1 (f :: k1) type T2 (f :: k2)
sdiehl/ghc
testsuite/tests/typecheck/should_fail/T17566b.hs
bsd-3-clause
135
0
7
30
35
23
12
6
0
<?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="de-DE"> <title>Import/Export</title> <maps> <homeID>exim</homeID> <mapref location="map...
thc202/zap-extensions
addOns/exim/src/main/javahelp/help_de_DE/helpset_de_DE.hs
apache-2.0
959
77
67
155
408
207
201
-1
-1
{-# LANGUAGE KindSignatures, GADTs, TypeFamilies, MultiParamTypeClasses, FlexibleContexts, ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances #-} module T5303( showContextSeries ) where import Control.Monad.State.Strict( StateT ) import Control.Monad.Trans ( lift ) import Data.Kind (Type) data Tree (m...
sdiehl/ghc
testsuite/tests/simplCore/should_compile/T5303.hs
bsd-3-clause
1,927
5
13
399
717
382
335
-1
-1
-- GSoC 2015 - Haskell bindings for OpenCog. {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE DataKinds #-} -- | This Module defines the main functions to interact with the Pattern Matcher. module OpenCog.AtomSpace.Query where import Control.Monad.IO.Class (liftIO) import Foreign ...
inflector/atomspace
opencog/haskell/OpenCog/AtomSpace/Query.hs
agpl-3.0
2,011
0
14
550
417
227
190
41
2
-- | contains a prettyprinter for the -- Template Haskell datatypes module Language.Haskell.TH.Ppr where -- All of the exports from this module should -- be "public" functions. The main module TH -- re-exports them all. import Text.PrettyPrint (render) import Language.Haskell.TH.PprLib import Language.Ha...
holzensp/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
21,874
25
14
6,675
8,088
3,965
4,123
448
6
{-# LANGUAGE OverloadedStrings, FlexibleContexts #-} module Network.Wai.Handler.Warp.Header where import Data.Array import Data.Array.ST import Network.HTTP.Types import Network.Wai.Handler.Warp.Types ---------------------------------------------------------------- -- | Array for a set of HTTP headers. type Indexed...
dylex/wai
warp/Network/Wai/Handler/Warp/Header.hs
mit
2,591
0
11
482
496
276
220
50
1
-- To test with GHC before liftA2 was added to the Applicative -- class, remove the definition of liftA2 here, and import -- liftA2 separately from Control.Applicative. {-# LANGUAGE DeriveTraversable, GADTs, DataKinds, DeriveFunctor, StandaloneDeriving #-} module Main where import Control.Applicative (Applicative ...
ezyang/ghc
libraries/base/tests/T13191.hs
bsd-3-clause
1,877
0
11
444
817
420
397
54
1
{-# LANGUAGE PackageImports #-} {-# LANGUAGE MagicHash, UnliftedFFITypes #-} {-# LANGUAGE ForeignFunctionInterface #-} module Test10313 where import "b\x61se" Data.List {-# WARNING Logic , solverCheckAndGetModel "New Z3 API support is still incomplete and fragile: \ \you may experience ...
siddhanathan/ghc
testsuite/tests/ghc-api/annotations/Test10313.hs
bsd-3-clause
934
0
9
235
106
63
43
-1
-1
module B where import A data Y = Y Int Int thing :: X -> a thing (X (Y a b)) = thing (X (Y a b))
urbanslug/ghc
testsuite/tests/driver/T8184/B.hs
bsd-3-clause
100
0
9
30
66
35
31
5
1
{- ------- Forwarded Message Date: Wed, 30 Nov 1994 16:34:18 +0100 From: John Hughes <rjmh@cs.chalmers.se> To: augustss@cs.chalmers.se, simonpj@dcs.gla.ac.uk Subject: Nice little program Lennart, Simon, You might like to look at the fun little program below. THUMBS DOWN to hbc for compiling it (it prin...
siddhanathan/ghc
testsuite/tests/typecheck/should_fail/tcfail065.hs
bsd-3-clause
795
1
10
161
130
64
66
7
1
{-# OPTIONS_HADDOCK show-extensions #-} {-# LANGUAGE Arrows #-} {-# LANGUAGE RankNTypes #-} {-| Module : Data.Utils.Arrow Description : arrow utilities Copyright : (c) Lars Brünjes, 2016 License : MIT Maintainer : brunjlar@gmail.com Stability : experimental Portability : portable This module defines ut...
brunjlar/neural
src/Data/Utils/Arrow.hs
mit
1,781
1
12
415
359
193
166
23
1
{-# OPTIONS -XDeriveDataTypeable #-} module Database where import Data.Time.Calendar hiding (Day) import System.Time hiding (Day, Month) import Data.Generics import Data.Map (Map) import qualified Data.Map as Map import Types import ReservationUtils type WV v = WebView Database v users :: Map String (String, Strin...
Oblosys/webviews
src/exec/Reservations/Database.hs
mit
4,042
0
15
1,313
1,221
706
515
71
2
{-# LANGUAGE OverloadedStrings #-} module Main where import HlLog import HlAdif import HlOptions import Options.Applicative import Prelude hiding (readFile, putStr) import System.IO hiding (readFile, putStr) import qualified Data.ByteString.Char8 as B import Data.ByteString.Char8 (ByteString) import qualified Data.Byt...
netom/hamloghs
app/hl-to-msoxml.hs
mit
5,103
0
53
1,802
705
378
327
101
2
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} module MySafeStore ( initDB , insertDB , preparedInsertDB , readDB , closeDB , sanitize , DataStore , UserInput , readInput ) where import Prelude hiding (takeWhile) import Database.SQLite3 import Data.Monoid ((<>)) import Data.Text (Text, ...
haskell-web-intro/secdev
examples/common/src/MySafeStore.hs
mit
1,636
0
9
317
427
225
202
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} -- Needed to catch exceptions properly -- | Author: Thorsten Rangwich -- | See file LICENSE for details on using this code. -- | This module contains a TCP/IP socket server that executes functions -- | over a network socket. A particular protocol is used to send a one -- | line requ...
tnrangwi/CompareProgrammingUsingHolidayManager
haskell/SocketServer.hs
mit
12,605
0
20
3,296
1,899
1,054
845
147
5
module Main where import Test.Tasty import Test.Tasty.HUnit import qualified Centrinel as C import qualified Centrinel.Report as C import Centrinel.System.RunLikeCC (runLikeCC, ParsedCC(..)) import Language.C.System.GCC (newGCC) import qualified Centrinel.Util.Datafiles as CData main :: IO () main = defaultMain sm...
lambdageek/use-c
tests/smoke.hs
mit
1,278
0
18
264
332
177
155
27
4
import Data.Char (isLetter, toLower) import Data.List (groupBy, sortBy) isVowel :: Char -> Bool isVowel = flip elem ['a', 'e', 'i', 'o', 'u', 'y', 'å', 'ä', 'ö'] . toLower vowelGroups :: String -> [String] vowelGroups "" = [] vowelGroups s@(c:cs) | isVowel c = fst sp : vowelGroups (snd sp) ...
wunderdogsw/funniest-finnish-words
haskell-idiomatic-but-slow/HassutSanat.hs
mit
961
1
14
227
374
191
183
19
1