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
{-# OPTIONS_GHC -fexcess-precision -XBangPatterns#-} ----------------------------------------------------------------------------- {-| Module : Vec.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:42 Warning : this file is machine ge...
keera-studios/hsQt
extra-pkgs/Glome/Qt/Glome/Vec.hs
bsd-2-clause
12,073
0
19
4,124
6,367
3,247
3,120
-1
-1
module Tests.Network where import Hans.Network.Types import Test.QuickCheck (Gen,arbitraryBoundedRandom) arbitraryProtocol :: Gen NetworkProtocol arbitraryProtocol = arbitraryBoundedRandom
GaloisInc/HaNS
tests/Tests/Network.hs
bsd-3-clause
194
0
5
20
38
23
15
5
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE...
sjakobi/bloodhound
src/Database/Bloodhound/Types.hs
bsd-3-clause
90,900
0
17
28,086
18,263
10,078
8,185
1,802
16
{- | Module : $Header$ Description : Test case for CSMOF parsing, parses a file and shows the resulting CSMOF metamodel Copyright : (c) Daniel Calegari Universidad de la Republica, Uruguay 2013 License : GPLv2 or higher, see LICENSE.txt Maintainer : dcalegar@fing.edu.uy Stability : provisional Porta...
keithodulaigh/Hets
CSMOF/tests/Test_Parser.hs
gpl-2.0
1,009
0
11
278
122
61
61
16
2
----------------------------------------------------------------------------- -- | -- Module : Distribution.Compat.ReadP -- Copyright : (c) The University of Glasgow 2002 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Portability : portable -- -...
jwiegley/ghc-release
libraries/Cabal/cabal/tests/UnitTests/Distribution/Compat/ReadP.hs
gpl-3.0
4,200
0
12
868
756
421
335
55
1
{-# LANGUAGE PatternSynonyms #-} {- Copyright 2017 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-...
venkat24/codeworld
codeworld-api/src/CodeWorld.hs
apache-2.0
2,283
0
5
666
360
242
118
103
0
module Main where import Graphics.Vty import Control.Applicative import Control.Arrow import Control.Monad.RWS import Data.Sequence (Seq, (<|) ) import qualified Data.Sequence as Seq import Data.Foldable eventBufferSize = 1000 type App = RWST Vty () (Seq String) IO main = do vty <- mkVty defaultConfig _ <...
jtdaugherty/vty
test/EventEcho.hs
bsd-3-clause
966
0
13
236
320
161
159
29
1
no = elem 1 [] : []
bitemyapp/apply-refact
tests/examples/Default43.hs
bsd-3-clause
20
0
7
7
19
9
10
1
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UnliftedNewtypes #-} -- In tcConDecl, there is a place where a panic can happen if -- a newtype has multiple fields. This test is here to make -- sure that the appropriate ...
sdiehl/ghc
testsuite/tests/typecheck/should_fail/UnliftedNewtypesMultiFieldGadt.hs
bsd-3-clause
559
0
7
96
49
33
16
-1
-1
module Infix3 where data T1 a b = b :#: a g :: (T1 Int Int) -> Int g ((x :#: y)) = y - x f x y = g (error "x :$: y no longer defined for T1 at line: 5")
kmate/HaRe
old/testing/removeCon/Infix3AST.hs
bsd-3-clause
185
0
8
75
75
41
34
7
1
{-# LANGUAGE TypeFamilies, FlexibleInstances, UndecidableInstances #-} module TH_tf3 where type family T a $( [d| foo :: T [a] ~ Bool => a -> a foo x = x |] ) $( [d| class C a instance a ~ Int => C a |] )
spacekitteh/smcghc
testsuite/tests/th/TH_tf3.hs
bsd-3-clause
223
0
6
63
33
22
11
-1
-1
{-# LANGUAGE TemplateHaskell #-} module ASCII () where import Tree import PatternGenerator type EP g = Bool templateFoo ''EP ['A'..'Z']
ezyang/ghc
testsuite/tests/th/should_compile/T13949/ASCII.hs
bsd-3-clause
146
0
6
30
36
22
14
6
0
{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE DeriveAnyClass #-} data Foo a = F Int | A a deriving Show data Foo1 a = F1 Int | A1 a deriving (Show) data Foo2 a = F2 Int | A2 a deriving (Show, Eq) data FooStock = FS Int deriving stock Show data FooAnyClass = Fa Int deriving anyclass Show newtype FooNe...
ezyang/ghc
testsuite/tests/printer/Ppr018.hs
bsd-3-clause
361
0
6
84
114
67
47
-1
-1
{-# LANGUAGE TypeFamilies, EmptyDataDecls #-} module T2639 where data Eps data family Work a v data instance Work Eps v = Eps v type family Dual a type instance Dual Eps = Eps class Connect s where connect :: (Dual s ~ c, Dual c ~ s) => Work s a -> Work c b -> (a,b) instance Connect Eps where connect (Eps...
urbanslug/ghc
testsuite/tests/indexed-types/should_compile/T2639.hs
bsd-3-clause
340
0
10
82
145
79
66
-1
-1
-- | Wrappers around "Futhark.Compiler" to provide functionality -- useful for Template Haskell. module Futhark.Compiler.TH (embedBasis) where import Control.Monad.Except (runExceptT) import Language.Futhark.TH () import Language.Haskell.TH.Syntax (Exp, Q, runIO, lift, qAddDependentFile) import System.FilePath impo...
ihc/futhark
src/Futhark/Compiler/TH.hs
isc
1,474
0
12
262
330
177
153
24
2
-- A Context-Free Grammar Library module ContextFreeGrammar data BNF a = [Rule a] data Rule a = Rule { ruleName :: String , ruleDef :: [RuleDef a] } data RuleDef a = (Terminal a) => Term a | RuleRef String | ConcatOf [RuleDef a]
shouya/thinking-dumps
automata/ContextFreeGrammar.hs
mit
300
2
10
115
85
48
37
-1
-1
{-# htermination (lcm :: MyInt -> MyInt -> MyInt) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data MyInt = Pos Nat | Neg Nat ; data Nat = Succ Nat | Zero ; data Ordering = LT | EQ | GT ; primNegInt :: MyInt -> MyInt; primNegInt (Pos x) = Neg x; primN...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/lcm_1.hs
mit
6,102
0
11
1,312
3,090
1,611
1,479
159
1
module Dama.Error (Error(Error, UnknownError)) where import Dama.Location data Error = UnknownError | Error Location String deriving Show instance Monoid Error where mempty = UnknownError Error la sa `mappend` Error lb sb | lb > la = Error lb sb | otherwise = Error la sa Error l s `ma...
tysonzero/dama
src/Dama/Error.hs
mit
412
0
9
111
163
84
79
14
0
{- The MIT License (MIT) Copyright (c) 2015 Mário Feroldi Filho Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the right...
thelostt/climbu
src/Token.hs
mit
2,078
0
6
559
262
170
92
74
0
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 800 {-# OPTIONS_GHC -fdefer-type-errors #-} #endif module TupleTest where import Testing import Control.Hspl.Internal.Tuple #if __GLASGOW_HASKELL__ >= 800 import Test.ShouldNotTypecheck #endif test = describeModule "Control.Hspl.Internal.Tuple" $ do describe "Tupleab...
jbearer/hspl
test/TupleTest.hs
mit
3,821
0
17
871
1,689
991
698
56
1
{-# LANGUAGE DataKinds #-} {-# OPTIONS_HADDOCK prune #-} -- | Biegunka.Source.Tar - functions to work with [.tar, .tar.gz, .tar.bz2] archives as sources module Control.Biegunka.Source.Tar ( -- * Source layer tar, tar_ ) where import qualified Codec.Archive.Tar as Tar import qualified Codec.Compression.GZip as ...
biegunka/biegunka-archive
src/Control/Biegunka/Source/Tar.hs
mit
1,957
0
10
305
338
196
142
24
3
module Pregame.Either ( module X , maybeToLeft , maybeToRight ) where import Data.Either.Combinators as X ( leftToMaybe , rightToMaybe ) import Pregame.Base maybeToLeft :: b -> Maybe a -> Either a b maybeToLeft _ (Just x) = Left x maybeToLeft y Nothing = Right y maybeToRight :: b -> Maybe a -> Either...
jxv/pregame
src/Pregame/Either.hs
mit
392
0
7
88
145
76
69
14
1
module Main where import ConstantPool import Method import Attribute import Field --import Text.Pretty.Simple import Text.Show.Pretty import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString as B import Data.Binary.Get import Data.Word import qualified Data.ByteString.UTF8 as UTF8 import Numeric...
cwgreene/javaclassreader
src/Main.hs
mit
1,953
0
11
484
491
261
230
65
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} module System.Mesos.Resources where import Control.Lens import Data.ByteString (ByteString) import Data.List (find, foldl'...
jhedev/hs-mesos
src/System/Mesos/Resources.hs
mit
3,411
0
17
987
930
488
442
-1
-1
import Text.Parsec import Text.Parsec.String roman :: Parser Int roman = do x <- many (char 'X') v <- many (char 'V') i <- many (char 'I') eof return $ (length x * 10) + (length v * 5) + length i main = print $ parse roman "fail" "XVII"
Russell91/roman
04.hs
mit
259
0
12
71
130
62
68
10
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} module Data.Makefile.Parse.Internal where import Control.Monad import Data.Foldable import Data.Attoparsec.Text import Data.Makefile import Data.Monoid import Control.Applicative import qualified Data.Att...
nmattia/mask
src/Data/Makefile/Parse/Internal.hs
mit
7,577
1
18
1,731
1,598
857
741
124
11
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-property-redshift-clusterparametergroup-parameter.html module Stratosphere.ResourceProperties.RedshiftClusterParameterGr...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/RedshiftClusterParameterGroupParameter.hs
mit
2,515
0
13
221
266
152
114
29
1
{- Textures.hs; Mun Hon Cheong (mhch295@cse.unsw.edu.au) 2005 This module is for loading textures -} module Textures where import Graphics.UI.GLUT import TGA (readTga) import Data.Word (Word8) import Foreign.Marshal.Alloc (free) import Control.Exception (catch) import Control.Exception.Base (SomeExcept...
elitak/frag
src/Textures.hs
gpl-2.0
2,037
0
13
473
503
258
245
32
1
{-| Implementation of the Ganeti configuration database. -} {- Copyright (C) 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 (at your opt...
badp/ganeti
src/Ganeti/Config.hs
gpl-2.0
15,196
0
20
3,519
3,338
1,728
1,610
256
4
{-# LANGUAGE CPP #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} ----------------------------------------------------------------------------- -- -- Module : IDE.Metainfo.InterfaceCollector -- Copyright : (c) Juergen Nicklisc...
leksah/leksah-server
src/IDE/Metainfo/InterfaceCollector.hs
gpl-2.0
18,090
0
26
6,439
4,016
2,118
1,898
267
13
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE...
sebastianpoeplau/servant-experiment
src/Types.hs
gpl-2.0
753
0
7
232
48
33
15
15
0
-- Map declaration as in PFDS Appendix A, p 204 {-# OPTIONS_GHC -XMultiParamTypeClasses #-} module FiniteMap(FiniteMap(..)) where -- m: concrete map type, k: key type, a: value type -- Note: changed the name of the lookup function to "find", to avoid having -- hide "lookup" in Prelude. class FiniteMap m k where em...
fishbee/pfds-haskell
chapter2/FiniteMap.hs
gpl-3.0
403
0
10
92
87
47
40
-1
-1
module Main ( main ) where main :: IO () main = do print "hi"
adarqui/Darqios
examples/simple.hs
gpl-3.0
65
0
7
18
30
16
14
5
1
module RenamerSpec (spec) where import Test.Hspec import Language.Mulang.Ast import Language.Mulang.Transform.Renamer (rename) import Language.Mulang.Parsers.JavaScript (js) spec :: Spec spec = do describe "rename" $ do it "renames empty asts" $ do (rename (js "")) ...
mumuki/mulang
spec/RenamerSpec.hs
gpl-3.0
2,519
0
17
597
539
270
269
39
1
getChar :: () -> IO Char
hmemcpy/milewski-ctfp-pdf
src/content/3.5/code/haskell/snippet30.hs
gpl-3.0
24
0
6
5
15
7
8
1
0
{-# OPTIONS -fno-warn-missing-signatures #-} module Editor.Config( overlayDocKeys, quitKeys, undoKeys, -- cutKeys, pasteKeys, makeBranchKeys, delBranchKeys, -- actionKeys, -- moveToParentKeys, addParamKeys, delParamKeys, exprFocusDelegatorKeys) where import qualified Graphics.UI....
alonho/bottle
examples/Editor/Config.hs
gpl-3.0
1,098
0
8
235
238
140
98
23
1
-- generate balanced numbers -- with max height n data Tree a = Empty | Branch a (Tree a) (Tree a) deriving (Show, Eq) p59 :: a -> Int -> [Tree a] p59 x n = trees !! n where trees = [Empty] : [Branch x Empty Empty] : zipWith combine (tail trees) trees where combine t st = [ Branch x l r | (lt...
yalpul/CENG242
H99/54-60/p59.hs
gpl-3.0
421
0
13
153
196
107
89
6
1
{-# LANGUAGE OverloadedStrings #-} module WebParsing.UTSCParser (parseUTSC) where import Network.HTTP import Text.HTML.TagSoup import Text.HTML.TagSoup.Match import Database.Persist.Sqlite import qualified Data.Text as T import Database.Tables as Tables import WebParsing.ParsingHelp utscCalendarUrl :: String utsc...
arkon/courseography
hs/WebParsing/UTSCParser.hs
gpl-3.0
2,871
0
17
644
800
415
385
62
3
module Chap02.Exercise03 where import Chap02.Data.Set () import Chap02.Data.UnbalancedSet import Data.Maybe import Control.Applicative (liftA3, pure, (<$>)) insert :: Ord a => a -> UnbalancedSet a -> UnbalancedSet a insert x t = fromMaybe t $ BST <$> go x (unBST t) where go :: Ord a => a -> BinaryTree a -> Mayb...
stappit/okasaki-pfds
src/Chap02/Exercise03.hs
gpl-3.0
505
0
12
142
252
126
126
13
2
import Language.Dockerfile main = do ef <- parseFile "./Dockerfile" print ef
beijaflor-io/haskell-language-dockerfile
examples/parse.hs
gpl-3.0
85
0
8
19
27
12
15
4
1
{-# LANGUAGE NoMonomorphismRestriction #-} ----------------------------------------------------------------------------- -- | -- Module : HEP.Parser.LHE.Sanitizer.Action -- Copyright : (c) 2013 Ian-Woo Kim -- -- License : GPL-3 -- Maintainer : Ian-Woo Kim <ianwookim@gmail.com> -- Stability : experimental...
wavewave/LHE-sanitizer
src/HEP/Parser/LHE/Sanitizer/Action.hs
gpl-3.0
5,847
0
17
1,551
1,615
828
787
110
3
{- Copyright 2013 Mario Pastorelli (pastorelli.mario@gmail.com) This file is part of HSProcess. HSProcess 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, or (at ...
melrief/HSProcess
tests/System/Console/HSProcess/Representable/Test.hs
gpl-3.0
3,344
0
18
780
1,048
581
467
56
1
module SeedyPelias where import Data.Char import Data.String.Utils import Pelias seedyExtract :: [JSONOperation] -> String -> Maybe Value seedyExtract = optimisedExtract seedyOptimiser seedyOptimiser :: Optimiser seedyOptimiser (Index i : ops) json = (reform $ (substr start end) splitJSON, ops) where splitJSON...
ivanmoore/seedy
src/SeedyPelias.hs
gpl-3.0
815
0
14
199
330
179
151
18
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-adexchange-buyer/gen/Network/Google/Resource/AdExchangeBuyer/PretargetingConfig/Patch.hs
mpl-2.0
4,034
0
14
868
499
295
204
75
1
import Data.Array import Text.Regex.PCRE langs = ["C","CPP","JAVA","PYTHON","PERL","PHP","RUBY","CSHARP","HASKELL","CLOJURE","BASH","SCALA","ERLANG","CLISP","LUA","BRAINFUCK","JAVASCRIPT","GO","D","OCAML","R","PASCAL","SBCL","DART","GROOVY","OBJECTIVEC"] validity :: String -> String validity s = let p = "^\\d{5}\\s+(...
itsbruce/hackerrank
alg/regex/hacklang.hs
unlicense
596
0
14
131
237
134
103
12
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} -- | -- Module : Credentials -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : B...
brendanhay/credentials
credentials/src/Credentials.hs
apache-2.0
3,741
0
5
910
175
144
31
26
0
-- Copyright 2020 Google LLC -- -- 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 applicable law or agreed to in ...
google/cabal2bazel
bzl/tests/rules/UnicodeLib.hs
apache-2.0
734
0
4
126
29
24
5
2
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. {-# LANGUAGE GADTs #-} module Duckling.Rules.TA ( defaultRules , langRules , localeRules ) where import ...
facebookincubator/duckling
Duckling/Rules/TA.hs
bsd-3-clause
1,307
0
9
199
418
224
194
32
1
module Main () where import Data.Word import Data.Bits ((.&.), shiftL, shiftR) import Data.Char (digitToInt) import Data.ByteString (ByteString) import qualified Data.ByteString as B import Control.Concurrent.STM import Network.Socket (Socket) import qualified Network.Socket as S import Protocol.Peer import qualifie...
artems/FlashBit
demo/peer.hs
bsd-3-clause
1,344
0
14
312
551
311
240
35
2
import MIPS_I import Elf import Control.Monad.Trans.Except import Control.Monad.Trans.Class (lift) main = do r <- runExceptT $ do img <- readElfFile "/media/tmpfs/testsuite/basic_tests/jumpr.elf" run img case r of Right _ -> print "Ok" Left s -> print $ "Fail: " ++ s ...
p12nGH/miss
src/Main.hs
bsd-3-clause
321
0
12
93
94
47
47
11
2
module Lib.Config ( getConfig , Config , getWidth , getHeight ) where import Data.Char (digitToInt) import Data.Maybe (isJust) import Data.Either import Control.Applicative ((*>)) import Text.Parsec (many, (<|>), sepBy1, parse) import Text.Parsec.Char (char, digit) import Text.Parsec.String (Parser...
edvakf/haskell-thumber
src/Lib/Config.hs
bsd-3-clause
1,450
0
13
313
575
296
279
50
2
-- | RDP is able to model feedback cycles with shared resources. For -- demand monitors, a cycle might be: -- -- monitor >>> bfmap foo >>> bdelay 0.1 >>> demand -- -- Logically, the above behavior will cycle at 10Hz. Without choke, -- Sirea would compute it as fast as possible, perhaps at 10kHz, and -- thus be 9990 ...
dmbarbour/Sirea
src/Sirea/Internal/Choke.hs
bsd-3-clause
8,960
0
28
2,106
2,024
1,052
972
154
3
{- | Module : Network.Silver.Meta Description : Bittorrent protocol metainfo. Copyright : (c) Eric Izoita 2017 License : BSD3 Maintainer : ericizoita@gmail.com Stability : experimental Portability : portable This module handles validation and reading of metainfo files. -} module Network.Silver.M...
nytopop/silver
src/Network/Silver/Meta.hs
bsd-3-clause
4,396
0
16
1,242
1,381
721
660
121
6
{-# LANGUAGE JavaScriptFFI #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecursiveDo #-} module Main ( main ) where import JsHs.LikeJS.Class (asJSVal) import JsHs.Useful --import JsHs.Nullable (Nullable(..)) import Control.Monad (when) import Data.Geometry import Data.Coerce import qualified Data.Geometry.Trans...
achirkin/ghcjs-modeler
src/Main.hs
bsd-3-clause
8,969
0
28
2,910
1,919
957
962
150
18
module L1.Tests where import L1.Grammar import L1.Parser import L1.Display import Test.QuickCheck main = qc {- Quickcheck identity tests -} prop_program_identity :: Program -> Bool prop_program_identity x = x == (readProg . displayProgram $ x) qc = quickCheckWith progArgs prop_program_identity progArgs = Args {...
mhuesch/scheme_compiler
test/L1/Tests.hs
bsd-3-clause
492
0
8
150
111
66
45
14
1
{-# LANGUAGE OverloadedStrings #-} module Web.Stripe.Charge ( Charge(..) , ChargeId(..) , chargeToken , chargeTokenById , chargeCustomer , chargeCustomerById , chargeRCard , getCharge , getCharges , partialRefund , partialRefundById , fullRefund , fullRefundById ...
michaelschade/hs-stripe
src/Web/Stripe/Charge.hs
bsd-3-clause
7,223
0
21
1,958
1,639
937
702
115
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} ------------------------------------------------------------------- -- | -- Module : Irreverent.Bitbucket.Json.Common -- Copyright : (C) 2017 Irreverent Pixel Feats -- License ...
irreverent-pixel-feats/bitbucket
bitbucket-json/src/Irreverent/Bitbucket/Json/Common.hs
bsd-3-clause
11,516
0
16
2,138
3,163
1,703
1,460
329
3
{-# LANGUAGE CPP #-} module Test.SSH.Internal.Util (sshInternalUtilTests) where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative #endif import qualified Data.ByteString.Char8 as Char8 import Test.Tasty (TestTree, testGroup) import Test.Tasty.QuickCheck (choose, elements, listOf, testProperty) import SSH.Int...
cdepillabout/ssh
test/Test/SSH/Internal/Util.hs
bsd-3-clause
2,541
0
16
547
710
384
326
58
1
module RomanNumbersKata.Day4Spec (spec) where import Test.Hspec import RomanNumbersKata.Day4 (toRomanNumber) spec :: Spec spec = do it "returns an empty string when given 0" (toRomanNumber 0 == "") it "returns \"I\" when given 1" (toRomanNumber 1 == "I") ...
Alex-Diez/haskell-tdd-kata
old-katas/test/RomanNumbersKata/Day4Spec.hs
bsd-3-clause
882
0
10
313
198
94
104
23
1
module Main where import Measurer import VChanUtil import Demo3Shared import Control.Monad main = do putStrLn "main of Measurer" putStrLn "OPENING CHAN" chan <- server_init attId forever $ meaLoop chan putStrLn "CLOSING CHAN" close chan return () meaLoop :: LibXenVChan -> IO () meaLoop chan = do ...
armoredsoftware/protocol
tpm/mainline/measurer/MeasurerMain.hs
bsd-3-clause
336
0
8
71
103
47
56
16
1
-- | Controller library. module HL.Controller (module C) where import HL.Foundation import Yesod as C type Controller = Handler
yogsototh/hl
src/HL/Controller.hs
bsd-3-clause
136
0
4
27
29
20
9
5
0
{-# Language FlexibleInstances #-} -- | Rendering of Csound files and playing the music in real time. -- -- How are we going to get the sound out of Haskell code? -- Instruments are ready and we have written all the scores for them. -- Now, it's time to use the rendering functions. We can render haskell expressions -...
silky/csound-expression
src/Csound/IO.hs
bsd-3-clause
9,519
0
12
2,338
2,677
1,376
1,301
174
2
{-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_HADDOCK hide #-} -- we hide this module from haddock to enforce GHC.Stack as the main -- access point. ----------------------------------------------------------------------------- -- | -- Module : GHC.Stack.Types -- Copyright : (c) The University of Glasgow 2015...
gridaphobe/ghc
libraries/base/GHC/Stack/Types.hs
bsd-3-clause
5,604
0
9
964
406
279
127
36
3
module Main where import BasicPrelude import NeuroSpider.Gui main :: IO () main = runGUI
pavelkogan/NeuroSpider
src/Main.hs
bsd-3-clause
93
0
6
18
27
16
11
5
1
-- -- HTTP client for use with io-streams -- -- Copyright © 2012-2013 Operational Dynamics Consulting, Pty Ltd -- -- The code in this file, and the program it is a part of, is made -- available to you by its authors as open source software: you can -- redistribute it and/or modify it under a BSD licence. -- {-# LANGUA...
afcowie/pipes-http
tests/SecureSocketsSnippet.hs
bsd-3-clause
1,596
0
12
271
275
154
121
32
1
{-# LANGUAGE MultiParamTypeClasses, FlexibleContexts, TypeFamilies #-} {-# LANGUAGE ConstraintKinds #-} {-# OPTIONS -Wall #-} module RegisterMachine.Models.CM3 ( mach ) where import Basic.Types import Basic.MemoryImpl (ListMem, fillMem, Address(..)) import Basic.Features import RegisterMachine.State import Regist...
davidzhulijun/TAM
RegisterMachine/Models/CM3.hs
bsd-3-clause
1,094
0
9
221
462
241
221
27
1
{- | Module : ./DFOL/Comorphism.hs Description : Helper functions for the DFOL -> CASL translation Copyright : (c) Kristina Sojakova, DFKI Bremen 2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : k.sojakova@jacobs-university.de Stability : experimental Portability : portable -} module ...
spechub/Hets
DFOL/Comorphism.hs
gpl-2.0
15,055
0
18
4,477
4,416
2,268
2,148
295
11
{-| Module : Idris.Parser.Expr Description : Parse Expressions. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE ConstraintKinds, GeneralizedNewtypeDeriving, PatternGuards, TupleSections #-} module Idris.Parser.Expr where import Idris.AbsSyntax import Idris.Core.TT ...
jmitchell/Idris-dev
src/Idris/Parser/Expr.hs
bsd-3-clause
57,438
1
38
20,942
17,600
8,679
8,921
1,020
51
{-| Module : Idris.IBC Description : Core representations and code to generate IBC files. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} module Idris.IBC (loadIBC, loadPkgIndex, writeIBC,...
bravit/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
102,501
0
21
56,836
27,999
12,852
15,147
2,455
17
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module Ros.Turtlesim.TeleportAbsoluteRequest where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros...
acowley/roshask
msgs/Turtlesim/Ros/Turtlesim/TeleportAbsoluteRequest.hs
bsd-3-clause
1,940
1
12
419
505
284
221
41
0
{-# LANGUAGE TypeSynonymInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Network.BufferType -- Description : Abstract representation of request and response buffer types. -- Copyright : See LICENSE file -- License : BSD -- -- Maintainer : Gane...
beni55/HTTP
Network/BufferType.hs
bsd-3-clause
6,368
0
16
1,803
1,199
711
488
99
1
{-# LANGUAGE MultiParamTypeClasses, ScopedTypeVariables , TypeSynonymInstances, FlexibleInstances #-} {- | Module : $Header$ Description : CspCASL instance of type class logic Copyright : (c) Markus Roggenbach, Till Mossakowski and Uni Bremen 2003 License : GPLv2 or higher, see LICENSE.txt Maintainer...
keithodulaigh/Hets
CspCASL/Logic_CspCASL.hs
gpl-2.0
5,912
0
11
1,205
1,127
602
525
119
1
{-# language MultiParamTypeClasses #-} {-# language FlexibleInstances #-} module DPLL.Pattern where import DPLL.Data import Autolib.Reader import Autolib.ToDoc import Autolib.Reporter import Control.Applicative ( (<$>) ) import System.Random data Pattern v = Any | This v instance ToDoc v => ToDoc (Pattern v) wh...
marcellussiegburg/autotool
collection/src/FD/Pattern.hs
gpl-2.0
1,974
0
12
608
818
407
411
56
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 A ``lint'' pass to check for Core correctness -} {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fprof-auto #-} module CoreLint ( lintCoreBindings, lintUnfolding, lintPassResult, lintInteractiveExpr, lintExpr, lintAnno...
fmthoma/ghc
compiler/coreSyn/CoreLint.hs
bsd-3-clause
73,272
50
25
21,183
17,024
8,622
8,402
1,126
17
{-# OPTIONS -fno-warn-unused-imports #-} {-# LANGUAGE ForeignFunctionInterface #-} #ifdef __HASTE__ {-# LANGUAGE OverloadedStrings #-} #endif #include "HsConfigure.h" -- #hide module Data.Time.LocalTime.TimeZone ( -- * Time zones TimeZone(..),timeZoneOffsetString,timeZoneOffsetString',minutesToTimeZone,hoursToTimeZo...
beni55/haste-compiler
libraries/time/lib/Data/Time/LocalTime/TimeZone.hs
bsd-3-clause
4,552
24
16
847
882
491
391
51
2
{-# LANGUAGE CPP #-} -------------------------------------------------------------------------------- -- -- Module : MatrixMul -- Copyright : (c) 2009 Trevor L. McDonell -- License : BSD -- -- Matrix multiplication using driver interface -- --------------------------------------------------------------------------...
mwu-tow/cuda
examples/src/matrixMulDrv/MatrixMul.hs
bsd-3-clause
5,101
0
23
1,143
1,680
881
799
-1
-1
{-# OPTIONS_GHC -Wall #-} module Main where import Test.Framework import GHC.IO.Encoding import qualified Tests.Old import qualified Tests.Readers.LaTeX import qualified Tests.Readers.Markdown import qualified Tests.Readers.Org import qualified Tests.Readers.RST import qualified Tests.Readers.Docx import qualified Te...
peter-fogg/pardoc
tests/test-pandoc.hs
gpl-2.0
2,045
0
9
395
445
269
176
50
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="pl-PL"> <title>Token Generator | ZAP Extension</title> <maps> <homeID>top</homeID> <map...
thc202/zap-extensions
addOns/tokengen/src/main/javahelp/org/zaproxy/zap/extension/tokengen/resources/help_pl_PL/helpset_pl_PL.hs
apache-2.0
976
78
66
159
413
209
204
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} -- | Define our Wiki data type, routes, and the YesodWiki typeclass. Due to the -- GHC stage restriction, the routes must be ...
pikajude/yesod
demo/subsite/WikiRoutes.hs
mit
1,575
0
11
372
198
117
81
-1
-1
module PrettyJSON (renderJValue) where import Prettify import JSONClass import Numeric (showHex) import Data.Bits (shiftR, (.&.)) import Char (ord) renderJValue :: JValue -> Doc renderJValue (JBool True) = text "true" renderJValue (JBool False) = text "false" renderJValue JNull = text "null" renderJValue (JNumber num...
pauldoo/scratch
RealWorldHaskell/ch06/mypretty/PrettyJSON.hs
isc
1,835
0
12
482
793
403
390
46
2
{-| Copyright (c) 2014 Maciej Bendkowski Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, me...
maciej-bendkowski/LCCLUtils
src/BCKWTests.hs
mit
3,105
0
12
798
538
296
242
35
2
{-# LANGUAGE OverloadedStrings #-} module TestImport ( module Yesod.Test , App (..) , runDB , statusIs ) where import ClassyPrelude import Control.Monad.Logger import Control.Monad.Trans.Resource import Data.Conduit.Pool (Pool) import Database.Persist.Sql hiding (LogFunc, runSqlPool, runSqlPersistM...
fpco/schoolofhaskell.com
tests/TestImport.hs
mit
1,760
0
19
444
524
276
248
43
2
module Main where import Idris.AbsSyntax import Idris.Core.TT import Idris.ElabDecls import Idris.Main import Idris.Options import IRTS.CodegenGo import IRTS.Compiler import Util.System import Paths_idris_go import Control.Monad import System.Environment import System.Exit data Opts = Opts { inputs :: [FilePath]...
Trundle/idris-go
src/Main.hs
mit
1,289
0
12
377
390
200
190
36
3
{-# LANGUAGE OverloadedStrings #-} module Unison.Parsers where import Control.Arrow ((***)) import Data.Text (Text) import Unison.Term (Term) import Unison.Type (Type) import Unison.Parser (Result(..), run, unsafeGetSucceed) import Unison.Var (Var) import qualified Unison.Parser as Parser import qualified Data.Text a...
nightscape/platform
shared/src/Unison/Parsers.hs
mit
4,118
0
11
838
1,362
734
628
94
3
{-# LANGUAGE RecordWildCards #-} module Robot ( Bearing(East, North, South, West) , bearing , coordinates , mkRobot , simulate , turnLeft , turnRight ) where data Bearing = North | East | South | West deriving (Eq, Show) data Robot = Robot { bearing :: Bearing , coordinates :: Position ...
enolive/exercism
haskell/robot-simulator/src/Robot.hs
mit
1,390
0
9
276
507
285
222
49
1
module Labyrinth.Models ( labyrinthSize, Kind(..), Direction(..), Treasure, EmptyTile(..), FreeTile(..), Tile(..), Color(..), Control(..), Position(..), Cards, Player(..), Board(..), Game(..), hasOpening, inverse, hasTreasure, treasureToChar, intToTreasure ) where import Labyrinth.Helpers import Prelude hi...
amoerie/labyrinth
Labyrinth/Models.hs
mit
6,267
0
10
2,131
1,549
838
711
101
1
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} {-# LANGUAGE Arrows #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards ...
MaxDaten/yage
Main.hs
mit
4,841
1
17
810
1,090
599
491
132
1
module Example.Schema.Student ( studentTable , studentIdField , studentNameField , studentMajorField , majorTable , majorIdField , majorNameField , majorCollegeField ) where import qualified Database.Orville.PostgreSQL as O import Example.Data.Major ( Major(..) , MajorCollege(..) , MajorId(..)...
flipstone/orville
orville-postgresql/sample-project/Example/Schema/Student.hs
mit
2,382
0
12
398
604
335
269
66
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-redshift-clustersubnetgroup.html module Stratosphere.Resources.RedshiftClusterSubnetGroup where import Stratos...
frontrowed/stratosphere
library-gen/Stratosphere/Resources/RedshiftClusterSubnetGroup.hs
mit
2,779
0
15
308
370
213
157
37
1
module Proteome.Data.ProjectLang where newtype ProjectLang = ProjectLang { _lang :: Text } deriving stock (Ord, Eq, Show, Generic) deriving newtype (MsgpackEncode, MsgpackDecode, IsString) makeClassy ''ProjectLang
tek/proteome
packages/proteome/lib/Proteome/Data/ProjectLang.hs
mit
222
0
6
33
66
37
29
-1
-1
-- | -- Module: Parser.EnumDesc -- Copyright: (c) 2015-2016 Martijn Rijkeboer <mrr@sru-systems.com> -- License: MIT -- Maintainer: Martijn Rijkeboer <mrr@sru-systems.com> -- -- Enum Descriptor type and functions. module Parser.EnumDesc ( EnumDesc , new , getName , addValueDesc , addValu...
sru-systems/protobuf-simple
src/Parser/EnumDesc.hs
mit
1,557
0
10
290
382
224
158
36
1
import Test.Tasty import Test.Tasty.HUnit import Test.Tasty.SmallCheck import Confetti main :: IO () main = defaultMain $ testGroup "all-tests" tests -- TODO(|p=101|#lol) - some tests would be good for future avi to write. tests :: [TestTree] tests = []
aviaviavi/confetti
test/Main.hs
mit
257
0
6
41
61
35
26
8
1
{- Main.hs -} import Text.Parsec ( parseTest, string ) import Text.Parsec.String ( Parser ) main = do parseTest (string "abcd") "abcd"
ubnt-intrepid/orslang
haskell/src/Main.hs
mit
168
0
9
54
45
25
20
4
1
{-# LANGUAGE ScopedTypeVariables, FlexibleContexts #-} {-| Module : Labyrinth.Generator Description : pathfinding testcase generator Copyright : (c) deweyvm 2014 License : MIT Maintainer : deweyvm Stability : experimental Portability : unknown Generates maps for checking the validity of pathfinding algor...
deweyvm/labyrinth
src/Labyrinth/Generator.hs
mit
6,510
0
18
1,845
2,534
1,302
1,232
136
3
--Project Euler Problem 4 Find largest number smaller than 999^2 which is a --palindrome isPalindrome x = (==) (show(x)) (reverse(show(x))) -- Simple solution is to create string and compare it to its reverse problem_4 = maximum [x*y | x <- [100..999], y <- [100..999], isPalindrome (x*y)] main :: IO() main = do ...
calewis/SmallProjectsAndDev
project_euler/haskell/problem_4.hs
mit
396
0
11
77
145
76
69
6
1
module ApachePrettyPrinter where --{{{ Modules imports import TreeConfigApacheFiller import ApacheSourceCreator import TypeFiles.ApacheTypes import TypesAndFunctions --}}} --{{{ Haskell imports import Text.PrettyPrint --}}} --{{{ Function that will pretty print the ApacheWebserver printApache :: ApacheWebserver -> D...
prl-tokyo/bigul-configuration-adaptation
Transformations/Parsers/Apache_Parser/ApachePrettyPrinter.hs
mit
45,708
2,351
200
5,374
14,108
7,022
7,086
1,519
3
-- | module Workflow.Reexports ( MonadThrow , MonadFree ) where import Control.Monad.Catch (MonadThrow) import Control.Monad.Free (MonadFree)
sboosali/workflow-types
sources/Workflow/Reexports.hs
mit
146
0
5
20
37
24
13
5
0
module Wf.Application.Time ( Time , formatTime , diffTime , addSeconds , getCurrentTime , mjd ) where import qualified Data.Time.Clock as T (UTCTime(..), diffUTCTime, addUTCTime, getCurrentTime) import qualified Data.Time.Calendar as T (Day(..)) import qualified Data.Time.Format as T (formatTime) import System.Locale ...
bigsleep/Wf
src/Wf/Application/Time.hs
mit
1,062
0
12
198
368
205
163
31
1
{- Handles all the functionality surrounding the commenting ability. This covers things like everything to do with reading and writing comments and provides lots of helper functions. Author(s): Lewis Deane License: MIT Last Modified: 20/7/2016 -} module CommentTools (setComment, ...
lewisjdeane/Comet
CommentTools.hs
mit
6,316
0
18
1,866
1,634
831
803
96
4
{-# OPTIONS_GHC -Wall #-} -- This module uses cabal package 'sdl2', -- instead of the legacy sdl1(Graphics.UI.SDL) bindings. module Main where import qualified Control.Concurrent as C import qualified Control.Monad as M import qualified Data.Vector.Storable.Mutable as V import qualified Data.Set as S import qual...
MiroslavVitkov/voiceid
src/Main2.hs
mit
1,730
0
11
502
432
245
187
39
1