code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
module Types where data Location = Home | FriendYard | Garden | OtherRoom deriving (Eq, Show, Read) -- Where to go using Walk and Go commands data Direction = North | South | West | East deriving (Eq, Show, Read) -- P...
dskecse/Adv2Game
Types.hs
gpl-3.0
743
0
6
369
158
95
63
29
0
stmt :: Pair String Bool stmt = P "This statement is" False
hmemcpy/milewski-ctfp-pdf
src/content/1.6/code/haskell/snippet10.hs
gpl-3.0
59
1
5
11
24
10
14
2
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-cloudprivatecatalogproducer/gen/Network/Google/Resource/CloudPrivateCatalogProducer/Catalogs/SetIAMPolicy.hs
mpl-2.0
5,397
0
16
1,174
777
453
324
114
1
{-# LANGUAGE TemplateHaskell, TypeFamilies, DeriveDataTypeable, OverloadedStrings, DataKinds #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Model.Metric.Types ( MeasureDatum , MeasureType(..) , Metric(..) , ParticipantFieldMapping2(..) , mkParticipantFieldMapping2 , lookupField ) where import Control.M...
databrary/databrary
src/Model/Metric/Types.hs
agpl-3.0
4,258
0
13
742
1,095
636
459
-1
-1
-------------------------------------------------------------------------- -- -- -- Top.hs -- -- -- -- Top level file in the NFA library. -- -- -- -- (c) Simon Thompson, 1995, 2000 -- -- -- -------------------------------------------------------------------------- modul...
SonomaStatist/CS454_NFA
haskellDFA/RegExp/Top.hs
unlicense
476
0
3
101
40
30
10
10
0
{- 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-auth/src/CodeWorld/Auth/Token.hs
apache-2.0
5,737
0
17
1,068
1,351
713
638
109
2
{-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE RecordWildCards #-} import Data.List import Data.Maybe import Data.Char hypotenuse a b = sqrt(a^2 + b^2) --Conditionals -- identifyCamel humps = if humps == 1 then "Dromeday" else "Bactrian" --Recursive Function -- increasing :: (Ord a) => [a] -> Bool incr...
hungaikev/learning-haskell
Hello.hs
apache-2.0
5,386
4
12
1,420
1,639
875
764
113
4
{-# LANGUAGE DeriveGeneric, StandaloneDeriving #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Main (main) where import Control.Applicative ((<|>)) import Control.Exception (IOException, catch) import Control.Monad (when) import Data.Foldable (traverse_) import Data.List (foldl') import Data.Traversable (for) import ...
haskell/haddock
haddock-library/fixtures/Fixtures.hs
bsd-2-clause
4,689
0
19
1,122
1,535
770
765
130
2
module NLP.Tools.Convenience (smap) where smap :: (b -> c) -> (a, b) -> (a, c) smap f (a,b) = (a,f b)
RoboNickBot/nlp-tools
src/NLP/Tools/Convenience.hs
bsd-2-clause
103
0
7
22
69
41
28
3
1
{-# LANGUAGE StandaloneDeriving, TemplateHaskell, FlexibleContexts, DeriveTraversable #-} import Data.StructuralTraversal.Class import Data.StructuralTraversal.Instances import Data.StructuralTraversal.TH import Data.StructuralTraversal.Indexing import Data.Traversable import Control.Applicative import Control.Monad.W...
nboldi/structural-traversal
test/Example.hs
bsd-3-clause
3,371
0
27
830
1,544
845
699
62
1
{-# LANGUAGE CPP #-} -- | Paths, host bitness and other environmental information about Haste. module Haste.Environment ( hasteSysDir, jsmodSysDir, hasteInstSysDir, pkgSysDir, pkgSysLibDir, jsDir, hasteUserDir, jsmodUserDir, hasteInstUserDir, pkgUserDir, pkgUserLibDir, hostWordSize, ghcLibDir, ghcBinary, ghcPkg...
joelburget/haste-compiler
src/Haste/Environment.hs
bsd-3-clause
4,455
0
14
821
711
411
300
78
2
{-# LANGUAGE OverloadedStrings #-} module Fragment ( readFragment, writeFragment, fragmentUpdateHash, TlsIo, evalTlsIo, liftIO, throwError, readCached, randomByteString, Partner(..), setVersion, setClientRandom, setServerRandom, getClientRandom, getServerRandom, getCipherSuite, cacheCipherSuite, flushCipherSui...
YoshikuniJujo/forest
subprojects/tls-analysis/client/Fragment.hs
bsd-3-clause
1,602
26
12
243
513
274
239
41
2
{-# LANGUAGE TupleSections, OverloadedStrings, QuasiQuotes, TemplateHaskell, TypeFamilies, RecordWildCards, DeriveGeneric ,MultiParamTypeClasses ,FlexibleInstances #-} module Protocol.ROC.PointTypes.PointType17 where import GHC.Generics import qualified Data.ByteString as BS import Data.Word import Data...
jqpeterson/roc-translator
src/Protocol/ROC/PointTypes/PointType17.hs
bsd-3-clause
3,881
0
9
1,236
610
337
273
130
1
module Metrics.RegexTiming(timingRegex2) where import Metrics.Common import qualified Data.ByteString.Lazy.Char8 as B import Text.Regex.Base.RegexLike (matchAllText, MatchText) import Text.Regex.PCRE.ByteString.Lazy import qualified Data.Map as M import Data.Array ...
zsol/hlogster
Metrics/RegexTiming.hs
bsd-3-clause
2,336
0
15
478
836
458
378
45
3
module Main where import Control.Concurrent (forkIO) import Control.Concurrent.Async import Control.Monad.IO.Class import Control.Monad.Trans.Resource import Data.Conduit (Sink, Conduit, Source, await, awaitForever, yield) import Data.Conduit.Async import qualified Data.Conduit.Combinators as DCC import Data.Conduit.Fi...
sweeks-imvu/bullshit
src/Main.hs
bsd-3-clause
2,126
0
20
491
730
370
360
65
3
{-# LANGUAGE CPP, NoImplicitPrelude, FlexibleContexts #-} #if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Safe #-} #endif ------------------------------------------------------------------------------- -- | -- Module : System.Timeout.Lifted -- Copyright : (c) The University of Glasgow 2007 -- License : BSD-...
basvandijk/lifted-base
System/Timeout/Lifted.hs
bsd-3-clause
1,610
0
11
344
230
145
85
12
1
{-# LANGUAGE ConstraintKinds, FlexibleContexts, RankNTypes, OverloadedStrings #-} {-# LANGUAGE UndecidableInstances, ScopedTypeVariables, AllowAmbiguousTypes #-} ----------------------------------------------------------------------------------------------------- ------------------------------------------------------...
lingxiao/GoodGreatIntensity
src/Score.hs
bsd-3-clause
2,707
0
13
503
651
343
308
56
1
module Graphics where import Prelude import FPPrac.Graphics import System.FilePath (splitPath, dropExtension) data Thickness = Thin | Thick deriving (Eq,Show) alphabet = ['a'..'z'] type Node = (Char,Color,Point) type Edge = (Char,Char,Color,Int) data Graph = Graph { name :: String , directed :: Bool ...
christiaanb/fpprac
examples/Graphics.hs
bsd-3-clause
8,201
0
13
2,677
3,054
1,721
1,333
155
2
module Logging ( logInfo , logDebug , logError ) where import Control.Monad ( when ) import Data.Monoid ( (<>) ) import Data.Time import Lens.Simple ( (^.) ) import qualified Configuration as C getT...
rumblesan/proviz
src/Logging.hs
bsd-3-clause
780
0
10
256
238
126
112
23
1
module Sex ( Sex (..) ) where data Sex = M | F deriving (Eq, Show, Ord)
satai/FrozenBeagle
Simulation/Lib/src/Sex.hs
bsd-3-clause
81
0
6
26
38
23
15
3
0
{-# LANGUAGE TypeSynonymInstances #-} -- -- IO.hs -- -- Basic input and output of expressions. -- -- Gregory Wright, 22 April 2011 -- module Math.Symbolic.Wheeler.IO where import Control.Monad.Identity import Text.Parsec import Text.Parsec.Expr as Ex import Text.Parsec.Language import Text.Parsec.String import quali...
gwright83/Wheeler
src/Math/Symbolic/Wheeler/IO.hs
bsd-3-clause
5,099
0
24
1,669
1,483
783
700
106
2
{-# LANGUAGE QuasiQuotes #-} module Main where import Test.Hspec import Test.QuickCheck import Test.QuickCheck.Instances import Data.Aeson as A import qualified Data.Text as T import qualified Data.Bson as B import Text.RawString.QQ import Data.Maybe import Data.Either import Transfuser.Lib import Transfuser.Types ...
stephenpascoe/mongo-sql
test/Spec.hs
bsd-3-clause
2,384
0
22
700
517
273
244
37
1
{-# OPTIONS_HADDOCK hide #-} {-# LANGUAGE ExistentialQuantification #-} module Network.TLS.Crypto ( HashContext , HashCtx , hashInit , hashUpdate , hashUpdateSSL , hashFinal , module Network.TLS.Crypto.DH , module Network.TLS.Crypto.ECDH -- * Hash , hash , Hash(..) , ha...
AaronFriel/hs-tls
core/Network/TLS/Crypto.hs
bsd-3-clause
7,539
0
17
1,646
2,450
1,283
1,167
164
4
{-# LANGUAGE PatternGuards #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE QuasiQuotes #-} -- | Main entry point to hindent. -- -- hindent module Main where import HIndent import HIndent.Types import Control.Applicative import Control.Applica...
adamse/hindent
src/main/Main.hs
bsd-3-clause
3,616
0
17
1,178
766
423
343
82
4
module Types.Common ( sanitizeUserText , sanitizeUserText' , sanitizeChar ) where import Prelude () import Prelude.MH import qualified Data.Text as T import Network.Mattermost.Types ( UserText, unsafeUserText ) sanitizeUserText :: UserText -> T.Text sanitizeUserText = sanitizeUserText' . unsafeUserText san...
aisamanra/matterhorn
src/Types/Common.hs
bsd-3-clause
550
0
7
94
151
84
67
18
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 #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoRebindableSyntax #-} module Duckling.Nu...
facebookincubator/duckling
Duckling/Numeral/AR/EG/Rules.hs
bsd-3-clause
6,691
0
18
1,644
1,681
998
683
239
2
{- n! means n × (n − 1) × ... × 3 × 2 × 1 For example, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800, and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27. Find the sum of the digits in the number 100! -} import Data.Char fact :: Integer -> Integer fact n = product [1..n] digit_sum :: Int digit...
bgwines/project-euler
src/solved/problem20.hs
bsd-3-clause
433
0
9
115
87
45
42
8
1
module Bounded where import Base instance Bounded () where minBound = () maxBound = () instance (Bounded a, Bounded b) => Bounded (a,b) where minBound = (minBound, minBound) maxBound = (maxBound, maxBound) instance (Bounded a, Bounded b, Bounded c) => Bounded (a,b,c) where minBound = (minBound,...
rodrigogribeiro/mptc
src/Libs/Bounded.hs
bsd-3-clause
1,366
0
6
247
562
333
229
23
0
{-# LANGUAGE OverloadedStrings #-} import Control.Monad import Control.Concurrent import System.IO import Text.XML.Pipe import Network import HttpPullSv main :: IO () main = do soc <- listenOn $ PortNumber 80 forever $ do (h, _, _) <- accept soc void . forkIO $ testPusher (undefined :: HttpPullSv Handle) (O...
YoshikuniJujo/forest
subprojects/xml-push/testHttpPullSv.hs
bsd-3-clause
495
2
13
94
199
105
94
19
1
{-# LANGUAGE ForeignFunctionInterface #-} {-# CFILES csrc/gsl_interp.c #-} -- | Cubic-spline interpolation (natural boundary conditions) with the GNU Scientific Library -- -- All @Double@ @Vector@ types are @Unboxed@ - conversion to @Storable@ @CDouble@ is performed internally. -- -- TODO: Possible improvements includ...
swfrench/GSLInterp
src/Math/GSLInterp.hs
bsd-3-clause
5,691
0
13
1,077
772
433
339
103
3
{-#LANGUAGE TemplateHaskell #-} module Parser.Rename (runRename) where import Data.DataType import Control.Lens import qualified Data.Map.Strict as M import Control.Monad.State import Control.Monad.Except data Buffer = Buffer { _counter :: Int , _upper :: M.Map String Int , _current :: M.Map String Int , _v...
jyh1/mini
src/Parser/Rename.hs
bsd-3-clause
2,846
0
13
630
1,174
559
615
90
3
module Watch.Spew where import Data.Foldable import Data.List.NonEmpty import qualified Data.Map as M import System.Console.ANSI import System.FilePath import System.FilePath.Glob import Watch.Types showConcerns :: Refs -> IO () showConcerns cMap = forM_ (M.toList cMap) $ \ (file, d :| ds) -> do setSGR [S...
pikajude/src-watch
src/Watch/Spew.hs
bsd-3-clause
601
0
12
155
217
111
106
19
1
{-# LANGUAGE OverloadedStrings #-} module Network.HTTP.Nano( module Network.HTTP.Nano.Types, Network.HTTP.Conduit.Request, tlsManager, mkJSONData, http, http', httpS, httpSJSON, httpJSON, buildReq, addHeaders ) where import Network.HTTP.Nano.Types import Control.Exception ...
ralphmorton/nano-http
src/Network/HTTP/Nano.hs
bsd-3-clause
3,966
0
14
695
1,349
723
626
73
2
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} -- | This module is intended to be imported @qualified@, for example: -- -- > import qualified Test.Tasty.Laws.Monad as Monad -- module Test.Tasty.Laws.Monad ( testUnit , test , testExhaustive ) where #if !MIN_VERSION_b...
jdnavarro/tasty-laws
Test/Tasty/Laws/Monad.hs
bsd-3-clause
2,144
0
13
538
669
364
305
50
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} -- | -- Module : Auth.Register -- Copyright : (C) 2015 Ricky Elrod -- License : MIT (see LICENSE file) -- Maintainer : (C) Ricky Elrod <[email protected]> -- Stability : experimental -- -- Functions and handlers for performing registration. module Auth.Register wher...
meoblast001/quotum-snap
src/Auth/Register.hs
mit
1,231
0
18
232
269
148
121
-1
-1
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE DeriveLift #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} module Database.Persist.Types.Base ( module Database.Persist.Ty...
paul-rouse/persistent
persistent/Database/Persist/Types/Base.hs
mit
23,580
0
16
6,068
2,900
1,733
1,167
363
7
{- | Module : ./CASL/World.hs Description : adding a parameter to ops and preds Copyright : (c) Christian Maeder, DFKI 2012 License : GPLv2 or higher, see LICENSE.txt Maintainer : [email protected] Stability : provisional Portability : portable add a parameter like the world sort for Modal...
spechub/Hets
CASL/World.hs
gpl-2.0
2,922
0
18
631
866
464
402
48
3
{-| Description : This module converts Verigraph into Partitions structures. Maintainer : Andrei Costa <[email protected]> -} module Data.TypedGraph.Partition.FromVerigraph ( createDisjointUnion, createSatisfyingNacsDisjointUnion ) where import Data.Graphs as G import ...
rodrigo-machado/verigraph
src/library/Data/TypedGraph/Partition/FromVerigraph.hs
gpl-3.0
3,912
0
16
791
1,354
725
629
56
3
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE TemplateHaskell #-} module Foreign.CUDA.Cusparse.Types where import Foreign.CUDA.Cublas.THBase $(doIO $ makeTypes "cusparse" cusparseFile)
kathawala/symdiff
cublas/Foreign/CUDA/Cusparse-bak/Types.hs
gpl-3.0
197
0
8
21
33
20
13
5
0
{-# LANGUAGE ExistentialQuantification,DeriveDataTypeable #-} -- | This module provides typed channels, an alternative -- approach to interprocess messaging. Typed channels -- can be used in combination with or instead of the -- the untyped channels available in the "Remote.Process" -- module via 'send'. module Remote...
jepst/CloudHaskell
Remote/Channel.hs
bsd-3-clause
8,558
0
16
2,080
1,680
894
786
82
4
{- (c) The AQUA Project, Glasgow University, 1993-1998 \section[Simplify]{The main module of the simplifier} -} {-# LANGUAGE CPP #-} module Eta.SimplCore.Simplify ( simplTopBinds, simplExpr, simplRules ) where #include "HsVersions.h" import Eta.Main.DynFlags import Eta.SimplCore.SimplMonad import Eta.Types.Type hi...
rahulmutt/ghcvm
compiler/Eta/SimplCore/Simplify.hs
bsd-3-clause
123,358
20
25
37,632
15,229
8,069
7,160
-1
-1
-------------------------------------------------------------------------------- -- Copyright © 2011 National Institute of Aerospace / Galois, Inc. -------------------------------------------------------------------------------- -- | Main import module for the front-end lanugage. {-# LANGUAGE Safe #-} module Copilot...
niswegmann/copilot-language
src/Copilot.hs
bsd-3-clause
467
0
5
45
23
17
6
4
0
{-| Module : Main Copyright : (c) Henry J. Wylde, 2015 License : BSD3 Maintainer : [email protected] -} module Main ( main ) where import Control.Monad import Qux.Test.Integration import Qux.Test.Steps import System.Directory import System.FilePath import Test.Tasty import Test.Tasty.Golden main ...
qux-lang/qux
test/build/app/Main.hs
bsd-3-clause
1,004
0
15
236
286
146
140
27
1
{-# LANGUAGE ScopedTypeVariables, TypeSynonymInstances, FlexibleInstances, OverlappingInstances, IncoherentInstances #-} -- | Pretty printing utils. -- Taken from BuildBox 2.1.0.1: -- http://hackage.haskell.org/packages/archive/buildbox/2.1.0.1/doc/html/BuildBox-Pretty.html module Pretty ( module Te...
mainland/dph
dph-event-seer/src/Pretty.hs
bsd-3-clause
5,727
29
14
1,449
2,133
1,135
998
136
2
{-# LANGUAGE TypeFamilies, DataKinds, UndecidableInstances #-} module T6018failclosed1 where -- Id is injective... type family IdClosed a = result | result -> a where IdClosed a = a -- ...but despite that we disallow a call to Id type family IdProxyClosed a = r | r -> a where IdProxyClosed a = IdClosed a
acowley/ghc
testsuite/tests/typecheck/should_fail/T6018failclosed1.hs
bsd-3-clause
317
0
6
65
56
37
19
6
0
{-| Module : Data.OrgMode.Parse.Types Copyright : © 2014 Parnell Springmeyer License : All Rights Reserved Maintainer : Parnell Springmeyer <[email protected]> Stability : experimental Types and utility functions. -} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtyp...
imalsogreg/orgmode-parse
src/Data/OrgMode/Parse/Types.hs
bsd-3-clause
6,430
0
12
1,617
1,715
979
736
163
0
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE ScopedTypeVariables #-} module Int where import Language.VHDL (Mode(..)) import Language.Embedded.Hardware import Control.Monad.Identity import Control.Monad.Operational.Higher import Data.ALaC...
markus-git/imperative-edsl-vhdl
examples/Int.hs
bsd-3-clause
1,630
0
14
319
365
196
169
42
1
{-# LINE 1 "Database/MySQL/Base/C.hsc" #-} {-# LANGUAGE CPP, EmptyDataDecls, ForeignFunctionInterface #-} {-# LINE 2 "Database/MySQL/Base/C.hsc" #-} -- | -- Module: Database.MySQL.Base.C -- Copyright: (c) 2011 MailRank, Inc. -- License: BSD3 -- Maintainer: Bryan O'Sullivan <[email protected]> -- Stability...
lhuang7/mysql
dist/dist-sandbox-bd9d9ce/build/Database/MySQL/Base/C.hs
bsd-3-clause
9,473
123
10
2,177
1,848
1,012
836
204
23
module Data.Graph.Inductive.Query.Monad (mapFst, mapSnd, (><), orP, GT(..), apply, apply', applyWith, applyWith', runGT, condMGT', recMGT', condMGT, recMGT, getNode, getContext, getNodes', getNodes, sucGT, sucM, graphRec, graphRec', graphUFold, graphNodesM0, graphNodesM, graphNodes, graph...
ckaestne/CIDE
other/CaseStudies/fgl/CIDEfgl/Data/Graph/Inductive/Query/Monad.hs
gpl-3.0
6,497
1
25
2,709
3,318
1,785
1,533
167
3
module FBHasTooMany2 where f :: Int f x y = x + y
roberth/uu-helium
test/typeerrors/Heuristics/FBHasTooMany2.hs
gpl-3.0
52
0
5
15
23
13
10
3
1
module Import00003 where #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 708 import Data.Typeable (Typeable) #else import Data.Typeable (Typeable,Typeable1,mkTyCon3,mkTyConApp,typeOf) #endif
charleso/intellij-haskforce
tests/gold/parser/Import00003.hs
apache-2.0
203
0
5
18
17
12
5
2
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="si-LK"> <title>Core Language Files | ZAP Extension</title> <maps> <homeID>top</homeID> ...
kingthorin/zap-extensions
addOns/coreLang/src/main/javahelp/org/zaproxy/zap/extension/coreLang/resources/help_si_LK/helpset_si_LK.hs
apache-2.0
980
83
52
160
398
210
188
-1
-1
module TupleIn1 where f :: (a, ([Int], c)) -> ([Int], c) f (x, y@([], m)) = case y of y@(b_1, b_2) -> y f (x, y@([], m)) = y
kmate/HaRe
old/testing/introCase/TupleIn1AST.hs
bsd-3-clause
146
0
9
50
106
65
41
6
1
{-# LANGUAGE CPP #-} #ifndef NO_NEWTYPE_DERIVING {-# LANGUAGE GeneralizedNewtypeDeriving #-} #endif -- | Types to help with testing polymorphic properties. -- -- Types 'A', 'B' and 'C' are @newtype@ wrappers around 'Integer' that -- implement 'Eq', 'Show', 'Arbitrary' and 'CoArbitrary'. Types -- 'OrdA', 'OrdB' and 'Ord...
beni55/quickcheck
Test/QuickCheck/Poly.hs
bsd-3-clause
3,165
0
10
700
947
534
413
63
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} module T11732a where import GHC.Generics data Proxy k (a :: k) deriving Generic1 data family ProxyFam (a :: y) (b :: z) data instance ProxyFam k (a :: k) deriving Generic1
ezyang/ghc
testsuite/tests/deriving/should_compile/T11732a.hs
bsd-3-clause
264
1
5
46
62
43
19
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} module T5371 where import Language.Haskell.TH f :: a -> Name f (x :: a) = ''a
urbanslug/ghc
testsuite/tests/quotes/T5721.hs
bsd-3-clause
117
0
7
22
37
22
15
-1
-1
----------------------------------------------------------------------------- -- -- Module : PhysicalQuantities.Definitions -- Copyright : -- License : MIT -- -- Maintainer : - -- Stability : -- Portability : -- -- | -- {-# LANGUAGE MultiParamTypeClasses , FlexibleContexts , Con...
fehu/PhysicalQuantities
src/PhysicalQuantities/Definitions.hs
mit
9,889
2
11
2,666
2,447
1,338
1,109
-1
-1
module GHCJS.DOM.RequestAnimationFrameCallback ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/RequestAnimationFrameCallback.hs
mit
59
0
3
7
10
7
3
1
0
{-# LANGUAGE TypeFamilies #-} module Agent.PingPong.Role.SendResult where import AgentSystem.Generic import Agent.PingPong import qualified Agent.PingPong.Simple.SendResult as SendRes import Data.IORef -------------------------------------------------------------------------------- data PingRole = PingRole data Po...
fehu/h-agents
test/Agent/PingPong/Role/SendResult.hs
mit
2,684
0
14
851
491
242
249
47
1
module Language.MSH.MethodTable where import qualified Data.Map as M import Language.Haskell.TH import Language.Haskell.TH.Syntax {- Methods -} data MethodTable = MkMethodTable { methodSigs :: M.Map String Dec, methodDefs :: M.Map String Dec } deriving Show emptyMethodTable :: MethodTable emptyMethodTa...
mbg/monadic-state-hierarchies
Language/MSH/MethodTable.hs
mit
1,371
0
14
362
444
236
208
25
5
-- From http://decipheringmusictheory.com/?page_id=46 module Other.Harmonisation where import Mezzo v1 = start $ melody :| d :| g :| fs :< g :| a :^ bf :| a :| a :| a :| d' :| c' :| bf :| a :>> g v2 = start $ melody :| d :| ef :| d :| d :| d :| d :| cs :| d :| d :| ef :| d ...
DimaSamoz/mezzo
examples/src/Other/Harmonisation.hs
mit
922
0
19
365
312
161
151
12
1
module MedicineSpec (main, spec) where import Test.Hspec import Medicine import Medicine.ParserSpec (parsedMedicine) import Text.ParserCombinators.Parsec (parse) sampleBuild = unlines [ "e => H" , "e => O" , "H => HO" , "H => OH" , "O => HH" , "" , "HOH" ...
corajr/adventofcode2015
19/test/MedicineSpec.hs
mit
1,051
0
18
299
319
169
150
32
2
module YourProject where my_func = "This is my package!"
Azabuhs/YourProject
src/YourProject.hs
mit
57
0
4
9
9
6
3
2
1
-- #hide -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.EdgeFlag -- Copyright : (c) Sven Panne 2002-2009 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : [email protected] -- Stability ...
ducis/haAni
hs/common/Graphics/Rendering/OpenGL/GL/EdgeFlag.hs
gpl-2.0
1,231
0
6
160
132
88
44
11
2
module Insult where {- Inspired by http://lost-in-space.soup.io/post/356758305/Butterface-crotch-waffle -} import Control.Concurrent (threadDelay) import Control.Monad import System.Random as Random w1,w2,w3 :: [String] w1 = ["Lazy","Stupid","Insecure","Idiotic","Slimy","Slutty","Smelly","Pompous","Communist","Dic...
runjak/snippets
playground/Insult.hs
gpl-2.0
1,157
0
12
162
417
248
169
22
1
{- ============================================================================ | Copyright 2011 Matthew D. Steele <[email protected]> | | | | This file is part of Fallback. | ...
mdsteele/fallback
src/Fallback/Scenario/Triggers/PerilousRoad.hs
gpl-3.0
6,754
0
30
1,728
1,364
658
706
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-toolresults/gen/Network/Google/Resource/ToolResults/Projects/Histories/Executions/Create.hs
mpl-2.0
5,128
0
17
1,128
556
333
223
90
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/Comments/Update.hs
mpl-2.0
4,876
0
18
1,186
802
468
334
112
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/NodeGroups/Get.hs
mpl-2.0
3,798
0
16
895
470
282
188
75
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.Monitoring -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla P...
brendanhay/gogol
gogol-monitoring/gen/Network/Google/Monitoring.hs
mpl-2.0
34,481
0
52
6,777
3,601
2,609
992
805
0
{- Habit of Fate, a game to incentivize habit formation. Copyright (C) 2019 Gregory Crosswhite This program is free software: you can redistribute it and/or modify it under version 3 of the terms of the GNU Affero General Public License. This program is distributed in the hope that it will be usef...
gcross/habit-of-fate
sources/library/HabitOfFate/Data/QuestState.hs
agpl-3.0
7,636
0
18
1,548
1,859
975
884
174
9
{-# LANGUAGE OverloadedStrings #-} module Commands.Distrowatch ( distrowatch ) where import qualified Data.Response as R import Control.Monad.IO.Class import Network.HTTP.Client import Data.ByteString.Char8 (ByteString, unpack) import qualified Data.ByteString.Lazy as B import Data.Monoid import Data.Maybe import ...
tsahyt/lmrbot
src/Commands/Distrowatch.hs
agpl-3.0
1,331
0
17
312
405
206
199
34
2
import Data.Monoid import Test.QuickCheck -- Exercise: Optional Monoid data Optional a = Nada | Only a deriving (Eq, Show) instance (Arbitrary a) => Arbitrary (Optional a) where arbitrary = do a <- arbitrary oneof [ return Nada , return $ Only a ] instance Monoid a => Monoid (Optional...
dmp1ce/Haskell-Programming-Exercises
Chapter 15/Exercise: Optional Monoid.hs
unlicense
1,490
1
10
390
590
306
284
42
1
{-# LANGUAGE CPP #-} {- Math.hs - Point of switching between MathDirect and MathHmatrix - - Timothy A. Chagnon - CS 636 - Spring 2009 -} module Math ( #ifdef USING_HMATRIX module MathHmatrix, #else module MathDirect, #endif module MatInv ) where #ifdef USING_HMATRIX import MathHmatrix #else impor...
tchagnon/cs636-raytracer
a1/Math.hs
apache-2.0
356
0
4
76
28
22
6
6
0
module Text.Pandoc.RPC where import Text.Pandoc import Text.Pandoc.Rpc.Protocol import Text.Pandoc.Rpc.Protocol.PandocRequest import Text.ProtocolBuffers.Basic import Text.ProtocolBuffers.WireMessage import qualified Text.Pandoc.Rpc.Protocol.PandocResponse as R import Data.ByteString.Lazy.Char8 hiding (putStrLn) impor...
aolshevskiy/pandoc-rpc
Text/Pandoc/RPC.hs
apache-2.0
2,897
0
19
666
983
489
494
70
3
{-# LANGUAGE QuasiQuotes #-} ----------------------------------------------------------------------------- -- | -- Module : Application.HXournal.GUI.Menu -- Copyright : (c) 2011, 2012 Ian-Woo Kim -- -- License : BSD3 -- Maintainer : Ian-Woo Kim <[email protected]> -- Stability : experimental -- Portab...
wavewave/hxournal
lib/Application/HXournal/GUI/Menu.hs
bsd-2-clause
34,087
0
17
8,944
6,158
3,087
3,071
365
2
{-# LANGUAGE PackageImports #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE PolyKinds #-} module Propellor.Property ( -- * Property combinators requires , before , onChange , onChangeFlagOnFail , flagFile , flagFile...
ArchiveTeam/glowing-computing-machine
src/Propellor/Property.hs
bsd-2-clause
11,367
91
16
2,230
2,517
1,329
1,188
222
5
{-# LANGUAGE ScopedTypeVariables #-} {-| Module: HaskHOL.Lib.Meson Copyright: (c) Evan Austin 2015 LICENSE: BSD3 Maintainer: [email protected] Stability: unstable Portability: unknown -} module HaskHOL.Lib.Meson ( tacGEN_MESON , tacASM_MESON , tacASM_MESON_NIL , tacMESON , ta...
ecaustin/haskhol-deductive
src/HaskHOL/Lib/Meson.hs
bsd-2-clause
37,384
0
30
12,987
12,961
6,736
6,225
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} module Propellor.Property.Ssh ( installed, restarted, PubKeyText, SshKeyType(..), -- * Daemon configuration sshdConfig, ConfigKeyword, setSshdConfigBool, setSshdConfig, RootLogin(..), permitRootLogin, passwordAuthentication, noPasswords, listenPort, -- * Host keys ra...
np/propellor
src/Propellor/Property/Ssh.hs
bsd-2-clause
14,661
184
18
2,582
4,148
2,156
1,992
286
2
{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeOperators #-} module PromotedTypes where data RevList a = RNil | RevList a :> a data Pattern :: [*] -> * where Nil :: Pattern '[] Cons :: Maybe h -> Pattern t -> Pattern (h ': t) -...
haskell/haddock
html-test/src/PromotedTypes.hs
bsd-2-clause
584
0
10
136
177
99
78
15
0
{-# LANGUAGE GADTs, TypeFamilies #-} module JS.Types where import Data.Monoid ((<>)) import Data.Text.Lazy.Builder (Builder, fromText) import Yesod.Core (GWidget, Route) import Data.Text (Text) import Control.Monad.Trans.RWS (RWST) import Data.Aeson (ToJSON) -- Javascript representation, tagged via phantom types. ne...
snoyberg/yesod-js
samples/ajax/JS/Types.hs
bsd-2-clause
1,277
0
10
279
477
257
220
30
0
module Haddock.Interface.Rn ( rnDoc, rnHaddockModInfo ) where import Haddock.Types import RnEnv ( dataTcOccs ) import RdrName ( RdrName, gre_name, GlobalRdrEnv, lookupGRE_RdrName ) import Name ( Name ) import Outputable ( ppr, defaultUserStyle ) rnHaddockModInfo :: GlobalRdrEnv -> HaddockModInfo R...
nominolo/haddock2
src/Haddock/Interface/Rn.hs
bsd-2-clause
2,106
0
21
518
811
385
426
59
17
{- Data/Singletons/TypeRepStar.hs (c) Richard Eisenberg 2012 [email protected] This file contains the definitions for considering TypeRep to be the demotion of *. This is still highly experimental, so expect unusual results! -} {-# LANGUAGE RankNTypes, TypeFamilies, KindSignatures, FlexibleInstances, G...
jonsterling/singletons
Data/Singletons/TypeRepStar.hs
bsd-3-clause
839
1
7
148
170
94
76
16
1
-- Copyright : (C) 2009 Corey O'Connor -- License : BSD-style (see the file LICENSE) {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE MagicHash #-} module Bind.Marshal.Action.Base where import Bind.Marshal.Prelude import qualified Prelude import Bind.Marshal.DataModel import Control.DeepSeq import Foreign...
coreyoconnor/bind-marshal
src/Bind/Marshal/Action/Base.hs
bsd-3-clause
1,639
0
9
311
224
132
92
-1
-1
{-# LANGUAGE TemplateHaskell #-} module TH where import Data.Type.Equality import Language.Haskell.TH import Type triangle :: Int -> Int -> Int -> Q Exp triangle a b c = [|Refl :: Triangle $(intToNat a) $(intToNat b) $(intToNat c)|] where intToNat :: Int -> Q Type intToNat 0 = [t|Zero|] intToNat n =...
nkaretnikov/triangle-inequality
src/TH.hs
bsd-3-clause
352
0
8
76
93
56
37
11
2
module Language.Brainfuck.Internals.GenericParser where import Prelude hiding (print, read) import Data.Maybe (catMaybes) import Text.ParserCombinators.Parsec import Language.Brainfuck.Internals.Instructions -- | Encapsulate a parser type GenericParser = Parser [Instr] -- | Record type containing symbols of Brainf...
remusao/Hodor
src/Language/Brainfuck/Internals/GenericParser.hs
bsd-3-clause
1,523
0
12
473
362
203
159
33
1
module PivotalTrackerApi.Iteration ( Iteration , number , project_id , PivotalTrackerApi.Iteration.length , team_strength , stories , start , finish , velocity , kind ) where import PivotalTrackerApi.Base import PivotalTrackerApi.Story (Story) data Iteration = Iteration ...
diogob/pivotal-tracker-api
src/PivotalTrackerApi/Iteration.hs
bsd-3-clause
791
0
9
267
171
103
68
-1
-1
{-# OPTIONS_HADDOCK show-extensions #-} {-| Module : $Header$ Copyright : (c) 2015 Swinburne Software Innovation Lab License : BSD3 Maintainer : Rhys Adams <[email protected]> Stability : unstable Portability : portable Functions for Eclogues API instance election. -} module Eclogues.APIElection (...
futufeld/eclogues
eclogues-impl/app/api/Eclogues/APIElection.hs
bsd-3-clause
1,654
0
11
329
315
181
134
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} module HipBot.AbsoluteURI where import Blaze.ByteString.Builder (toLazyByteString) import Control.Monad import qualified Data.Aeson as A import qualified Data.ByteString.Lazy.UTF8 as LB import Data.List (isSuffixOf) import Data.Maybe import Data.Monoid import Data.String import Dat...
purefn/hipbot
src/HipBot/AbsoluteURI.hs
bsd-3-clause
1,604
0
12
257
493
271
222
42
2
module HipChat.Types.Rooms.GetAllRoomsResponse ( GetAllRoomsResponse(..) ) where data GetAllRoomsResponse = GetAllRoomsResponse
oswynb/hipchat-hs
lib/HipChat/Types/Rooms/GetAllRoomsResponse.hs
bsd-3-clause
133
0
5
15
24
16
8
3
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveDataTypeable #-} -- | Versions for packages. module Stack.Types.Version (Version ,Cabal...
mietek/stack
src/Stack/Types/Version.hs
bsd-3-clause
6,328
0
15
1,521
1,637
866
771
163
3
----------------------------------------------------------------------------------------- -- A Haskell port of GNU's getopt library -- -- Sven Panne <[email protected]> Oct. 1996 (small changes Dec. 1997) -- -- Two rather obscure features are missing: The Bash 2.0 non-option hack (if you don't -- al...
mwotton/ctkl
src/Text/CTK/GetOpt.hs
bsd-3-clause
9,896
0
12
3,066
2,478
1,332
1,146
104
10
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module Model where import qualified Data.ByteString.Lazy as B import GHC.Generics (Generic) import Control.Lens import Data.Aeson import Data.Aeson.TH import Common -- -- Model -- type Model = [Step] data Step = Step { _nInpu...
notae/haskell-exercise
graphics/Model.hs
bsd-3-clause
1,133
0
11
270
351
190
161
38
1
module Lev3 where import Data.Array import qualified Number.Peano.Inf as P mft :: String -> String -> Array (Int, Int) P.Nat mft f t = m where m = array bounds [ ((i, j), lev i j) | (i,j) <- range bounds ] bounds = ((0, 0), (length t, length f)) lev 0 0 = 0 lev 0 j = succ $ m ! (0 , pred j) lev...
sordina/mfug_levenshtein_difference_2016_07_07-
src/Lev3.hs
bsd-3-clause
588
0
13
181
380
201
179
15
4
{-# LINE 1 "fptools\libraries\base\System\CPUTime.hsc" #-} ----------------------------------------------------------------------------- {-# LINE 2 "fptools\libraries\base\System\CPUTime.hsc" #-} -- | -- Module : System.CPUTime -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see ...
OS2World/DEV-UTIL-HUGS
libraries/System/CPUTime.hs
bsd-3-clause
1,371
4
9
205
96
67
29
9
1
{-| Module : Idris.Imports Description : Code to handle import declarations. Copyright : License : BSD3 Maintainer : The Idris Community. -} module Idris.Imports( IFileType(..), findImport, findInPath, findPkgIndex , ibcPathNoFallback, installedPackages, pkgIndex ) where import Control.Applicative ...
enolan/Idris-dev
src/Idris/Imports.hs
bsd-3-clause
4,677
0
15
1,721
1,180
600
580
90
4
module Eval where import System.IO.Unsafe import Data.Either import Data.List (nub) import qualified Data.Map as Map import Foreign.Ptr (FunPtr, castFunPtr) import Control.Monad.Except import qualified LLVM.General.AST as AST import qualified LLVM.General.AST.Type as T import LLVM.General.Analysis import LLVM.Gene...
jjingram/satori
src/Eval.hs
bsd-3-clause
3,126
0
28
914
1,014
511
503
93
4
import App.Models.Comments as CommentsModel import Turbinado.Controller create :: Controller () create = do id' <-getSetting_u "id" :: Controller String body_ <- getParam_u "body" author_ <- getParam_u "author" let pId = (Prelude.read id')::Integer CommentsModel.insert...
abuiles/turbinado-blog
App/Controllers/Comments.hs
bsd-3-clause
448
0
12
110
132
68
64
9
1
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Exception import Control.Monad.IO.Class (liftIO) import Control.Monad.Logger (LoggingT, runStderrLoggingT) import Data.Conduit...
derekjw/scotty-playground
src/Main.hs
bsd-3-clause
3,156
0
17
1,271
762
384
378
71
1
module Network.HaskellNet.SSL ( Settings (..) , defaultSettingsWithPort ) where import Network.Socket.Internal (PortNumber) data Settings = Settings { sslPort :: PortNumber , sslMaxLineLength :: Int , sslLogToConsole :...
lemol/HaskellNet-SSL
src/Network/HaskellNet/SSL.hs
bsd-3-clause
632
0
8
203
121
75
46
16
1