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
{-# LANGUAGE PackageImports #-} module Camera where import "linear" Linear d0 = V3 0 (-1) 0 u0 = V3 0 0 (-1) s0 p = (p,zero,zero,(0,0)) calcCam dt (dmx,dmy) (left,up,down,right,turbo) (p0,_,_,(mx,my)) = (p',p' + d,u,(mx',my')) where nil c n = if c then n else zero p' = nil left (v ^* (-t)) + nil up (d ^* ...
csabahruska/gpipe-quake3
Camera.hs
bsd-3-clause
763
0
15
217
438
242
196
19
3
{-# LANGUAGE UnicodeSyntax #-} import Prelude.Unicode paths ∷ Eq a ⇒ a → a → [(a, a)] → [[a]] paths source sink edges | source ≡ sink = [[sink]] | otherwise = [[source] ++ path | edge ← edges, (fst edge) ≡ source, path ← (paths (snd edge) sink [e | e ← edges, e ≢ edge]) ...
m00nlight/99-problems
haskell/p-81.hs
bsd-3-clause
362
0
13
125
158
83
75
8
1
{-# LANGUAGE OverloadedStrings #-} module PersistenceSpec (spec) where import Data.Foldable import Test.Hspec import Test.Hspec.QuickCheck (prop) import Test.QuickCheck.Instances () import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy.Char8 as LBS8 import OrphanInstances () import Store (Modifi...
channable/icepeak
server/tests/PersistenceSpec.hs
bsd-3-clause
966
0
19
191
280
152
128
25
1
----------------------------------------------------------------------------- -- -- Building info tables. -- -- (c) The University of Glasgow 2004-2006 -- ----------------------------------------------------------------------------- module StgCmmLayout ( mkArgDescr, emitCall, emitReturn, adjustHpBackwa...
ekmett/ghc
compiler/codeGen/StgCmmLayout.hs
bsd-3-clause
16,801
0
17
4,506
3,164
1,701
1,463
237
25
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE TypeOperators #-} import Data.Functor.Identity import Data.Proxy import Data.Vinyl import ...
andrewthad/graphite
example/main.hs
bsd-3-clause
7,763
0
23
1,952
1,170
662
508
-1
-1
module Main where import System.Console.Haskeline import System.IO import System.Environment import System.Exit import System.FilePath ((</>), addTrailingPathSeparator) import Data.Maybe import Data.Version import Control.Monad.Trans.Error ( ErrorT(..) ) import Control.Monad.Trans.State.Strict ( execStateT, get, put ...
ctford/Idris-Elba-dev
main/Main.hs
bsd-3-clause
5,886
0
56
2,190
960
487
473
116
4
{-# OPTIONS_GHC -fno-warn-orphans -fno-warn-type-defaults #-} module Main where import Prelude hiding ( null, lookup, max ) import qualified Prelude import Control.Applicative ( (<$>), (<*>) ) import qualified Data.Array as A import Data.Binary ( encode, decode ) import Data.Maybe ( fromJust ) import Data.Monoid imp...
tkonolige/vector-clock
test/Props.hs
gpl-3.0
8,380
0
19
2,088
3,393
1,831
1,562
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} module InnerEar.Types.User where import Text.JSON import Text.JSON.Generic import InnerEar.Types.Handle import InnerEar.Types.Password import InnerEar.Types.Data data Role = NormalUser | -- can only log in, do exercises, inspect their own data/history Manager | -- can ...
d0kt0r0/InnerEar
src/InnerEar/Types/User.hs
gpl-3.0
693
0
8
125
151
90
61
21
1
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import Network.Wai.Handler.Warp (Port, run) import Network.Wai.Middleware.Cors (simpleCors) import System.Environment (getArgs, getEnv) import System.IO (BufferMode (..), hSetBuffering, ...
iphydf/hs-toxcore
web/webservice.hs
gpl-3.0
864
0
11
279
203
112
91
19
2
{-# LANGUAGE StrictData #-} {-# LANGUAGE Trustworthy #-} module Network.Tox.NodeInfo.PortNumberSpec where import Test.Hspec import Data.Proxy (Proxy (..)) import Network.Tox.EncodingSpec import Network.Tox.NodeInfo.PortNumber (PortNumber) spec :: Spec sp...
iphydf/hs-toxcore
test/Network/Tox/NodeInfo/PortNumberSpec.hs
gpl-3.0
450
0
9
115
102
59
43
12
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Test.Ambiata.Cli where import qualified Data.Text as T import P import System.IO import Turtle testShell :: [Text] -> Shell Text -> IO (ExitCode, Text) testShell args = shellStrict args' where a...
ambiata/tatooine-cli
test/Test/Ambiata/Cli.hs
apache-2.0
429
0
8
106
112
64
48
12
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="si-LK"> <title>Plug-n-Hack | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref...
veggiespam/zap-extensions
addOns/plugnhack/src/main/javahelp/org/zaproxy/zap/extension/plugnhack/resources/help_si_LK/helpset_si_LK.hs
apache-2.0
973
80
68
159
421
213
208
-1
-1
-- |Make URI an instance of Read and Ord, and add functions to -- manipulate the uriQuery. module Extra.URI ( module Network.URI , relURI , setURIPort , parseURIQuery , modifyURIQuery , setURIQuery , setURIQueryAttr , deleteURIQueryAttr ) where import Network.URI -- (URIAuth(..), UR...
eigengrau/haskell-extra
Extra/URI.hs
bsd-3-clause
3,659
0
17
967
887
491
396
60
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Main where import Headings import PropertyDrawer import Test.Tasty import Timestamps import Document main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "Or...
imalsogreg/orgmode-parse
test/Test.hs
bsd-3-clause
522
0
6
180
71
43
28
18
1
data BinaryTree a = Node a (BinaryTree a) (BinaryTree a) | Empty createTree :: Int -> [[Int]] -> BinaryTree Int createTree n arr = head subtrees where subtrees = [getSubtree x | x <- [0..n - 1]] getSubtree x = (\[l, r] -> Node (x + 1) l r) . map (\x -> if x == -1 t...
EdisonAlgorithms/HackerRank
practice/fp/ds/swap-nodes/swap-nodes.hs
mit
1,189
0
16
365
645
332
313
25
2
{-# LANGUAGE CPP #-} module Main where import HList rev :: [a] -> [a] rev [] = [] rev (y:ys) = rev ys ++ [y] main :: IO () main = print $ rev [1..10] -- Should be in the "List" module {-# RULES "++ []" forall xs . xs ++ [] = xs #-} {-# RULES "++ strict" (++) undefined = undefined #-} -- The "Algeb...
beni55/hermit
examples/concatVanishes/Rev.hs
bsd-2-clause
571
0
7
191
94
55
39
13
1
{-# LANGUAGE OverloadedStrings #-} module Bead.View.Content.Assignment.Page ( newGroupAssignment , newCourseAssignment , modifyAssignment , viewAssignment , newGroupAssignmentPreview , newCourseAssignmentPreview , modifyAssignmentPreview ) where import Control.Monad.Error import qualified D...
pgj/bead
src/Bead/View/Content/Assignment/Page.hs
bsd-3-clause
10,185
0
14
1,788
2,603
1,278
1,325
206
4
{-# LANGUAGE OverloadedStrings #-} module Yesod.Form.I18n.Japanese where import Yesod.Form.Types (FormMessage (..)) import Data.Monoid (mappend) import Data.Text (Text) japaneseFormMessage :: FormMessage -> Text japaneseFormMessage (MsgInvalidInteger t) = "無効な整数です: " `Data.Monoid.mappend` t japaneseFormMessage (MsgIn...
s9gf4ult/yesod
yesod-form/Yesod/Form/I18n/Japanese.hs
mit
1,650
0
7
136
320
178
142
24
1
{-# LANGUAGE ScopedTypeVariables #-} module Stackage.LoadDatabase where import qualified Codec.Archive.Tar as Tar import qualified Codec.Compression.GZip as GZip import Control.Exception (IOException, handle) import Control.Monad ...
Tarrasch/stackage
Stackage/LoadDatabase.hs
mit
12,417
0
21
5,293
2,771
1,434
1,337
210
22
{-# LANGUAGE PatternGuards #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Util.NamedScratchpad -- Copyright : (c) Konstantin Sobolev <konstantin.sobolev@gmail.com> -- License : BSD-style (see LICENSE) -- -- Maintainer : Konstantin Sobolev <konst...
markus1189/xmonad-contrib-710
XMonad/Util/NamedScratchpad.hs
bsd-3-clause
7,541
0
24
1,739
896
521
375
72
4
{-# LANGUAGE DataKinds, ExistentialQuantification, GADTs, PolyKinds, TypeOperators #-} {-# LANGUAGE TypeInType, TypeFamilies #-} {- # LANGUAGE UndecidableInstances #-} module T15552 where import Data.Kind data Elem :: k -> [k] -> Type where Here :: Elem x (x : xs) There :: Elem x xs -> Elem x (y : xs) data Entr...
sdiehl/ghc
testsuite/tests/typecheck/should_fail/T15552a.hs
bsd-3-clause
1,051
0
12
231
327
191
136
18
0
module AddOneParameter.D1 where {-add parameter 'f' to function 'sq' . This refactoring affects module 'D1', 'C1' and 'A1'-} sumSquares (x:xs) = sq x + sumSquares xs sumSquares [] = 0 sq x = x ^ pow pow =2
RefactoringTools/HaRe
test/testdata/AddOneParameter/D1.hs
bsd-3-clause
215
0
7
47
59
31
28
5
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE Rank2Types #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Machine.Wye -- Copyright : (C) 2012 Edward Kmett, Rúnar Bjarnason, Paul Chiusano -- License : BSD-style (see the file LICENSE) -- -- Maintainer : Edward ...
YoEight/machines
src/Data/Machine/Wye.hs
bsd-3-clause
4,564
0
32
1,467
1,367
690
677
67
16
module SubPatternIn3 where -- takes into account general type variables -- within type implementation. -- here T has its arguments instantiated within g -- selecting 'b' should instantiate list patterns -- selecting 'c' should give an error. -- data T a b = C1 a b | C2 b g :: Int -> T Int [Int] -> Int g z (C1 b c) ...
kmate/HaRe
old/testing/subIntroPattern/SubPatternIn3_TokOut.hs
bsd-3-clause
500
0
10
130
236
124
112
12
1
{-# LANGUAGE BangPatterns #-} {-# OPTIONS -fvia-C -optc-O3 -fexcess-precision -optc-msse3 #-} import Control.Monad.ST import Data.Array.ST import Data.Array.Base main = print $ runST (do arr <- newArray (1,2000000) 137.0 :: ST s (STUArray s Int Double) go arr 2000000 0.0 ) go :: STUArray s I...
urbanslug/ghc
testsuite/tests/perf/should_run/T3586.hs
bsd-3-clause
544
2
13
163
220
106
114
16
1
{-# LANGUAGE TypeApplications #-} {-# LANGUAGE TemplateHaskell #-} module SuperUserSpark.CompilerSpec where import TestImport hiding ((<.>)) import Data.Either (isLeft, isRight) import Data.List (isPrefixOf) import System.FilePath.Posix ((<.>)) import SuperUserSpark.Compiler import SuperUserSpark.Compiler.Gen () im...
NorfairKing/super-user-spark
test/SuperUserSpark/CompilerSpec.hs
mit
18,597
0
24
6,794
4,055
1,941
2,114
391
2
module REPL.Parser where import Letter.Core import Letter.Parser import Control.Monad (void) data Command = Eval Line | Describe Line | Import String | Quit deriving Show commandToken long short = choice' $ map (symbol . (':':)) [long, short] importCmd = Import <$...
harlanhaskins/Letter
Haskell/app/REPL/Parser.hs
mit
587
0
11
160
182
102
80
17
1
{-# LANGUAGE OverloadedStrings #-} module Idle.Screens.Home where import Data.IORef import Data.List.NonEmpty import Data.Maybe import Data.Monoid import qualified Data.Text as T import Idle.Ore import Graphics.Vty hiding (string) import Graphics.Vty.Widgets.All import System.Exit import System.IO.Unsafe import Text....
pikajude/idle
src/Idle/Screens/Home.hs
mit
2,879
0
20
838
1,059
529
530
74
6
-- BNF Converter: Error Monad -- Copyright (C) 2004 Author: Aarne Ranta -- This file comes with NO WARRANTY and may be used FOR ANY PURPOSE. module ComponentModel.Parsers.ErrM where -- the Error monad: like Maybe type with error msgs import Control.Monad (MonadPlus(..), liftM) data Err a = Ok a | Bad String der...
hephaestus-pl/hephaestus
willian/hephaestus-integrated/asset-base/component-model/src/ComponentModel/Parsers/ErrM.hs
mit
598
0
8
153
169
91
78
15
0
module Config.AppConfig ( AppConfig (..) , getAppConfig ) where import Auth0.Config as Auth0 import Config.Environment (Environment (..)) import Control.Monad (liftM) import Data.Maybe (fromJust) import Data.Text as T import LoadEnv import qualified Network.Wai.Middleware.RequestLogger.LogEntries as LE import Sy...
gust/feature-creature
auth-service/src/Config/AppConfig.hs
mit
3,553
0
14
743
789
422
367
77
1
module Main where import qualified Dropbox as DB import System.Exit (exitFailure) import System.Environment (getArgs) import System.IO (hGetLine, hPutStrLn, stderr, stdout, stdin) import qualified Data.ByteString.Char8 as C8 import Control.Monad.IO.Class (liftIO) hostsDev = DB.Hosts "meta.dbdev.corp.dropbox.com" "ap...
cakoose/dropbox-sdk-haskell
Examples/Simple.hs
mit
3,524
0
15
788
985
477
508
79
2
{-# LANGUAGE PackageImports #-} {- Instead of generating C code directly, the STG compiler will instead build *abstract* C, a data structure representing the subset of C to which we want to compile. Abstract C supports nested definitions of functions and static arrays. These are floated to the top level when transfor...
tcsavage/lazy-compiler
src/AbstractC.hs
mit
2,860
0
12
636
802
419
383
46
2
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, RecordWildCards #-} module Text.Blaze.Html.Bootstrap where import Text.Blaze import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A hiding (form, label) import Text.Blaze.Html5 import Text.Blaze.Html5.Attributes hiding (form, labe...
glutamate/blaze-bootstrap
Text/Blaze/Html/Bootstrap.hs
mit
7,552
0
35
2,148
2,446
1,185
1,261
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Landing.Markdown (parseMarkdown) where import Text.Pandoc import Text.Pandoc.Options import Data.Set (Set, fromList) import Network.URI (isAbsoluteURI) import Landing.Repo (Repo, joinPath) import qualified Data.ByteString.Lazy.Char8 as C parseMarkdown :: Repo -> C.ByteString...
dennis84/landing-haskell
Landing/Markdown.hs
mit
1,552
0
9
319
386
216
170
45
1
{-# LANGUAGE CPP #-} module Cabal ( getPackageGhcOpts , findCabalFile, findFile ) where import Stack import Control.Exception (IOException, catch) import Control.Monad (when) import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.State (execStateT, modify) import Data.Char (isSpace) import Data.List ...
hdevtools/hdevtools
src/Cabal.hs
mit
11,960
0
28
3,017
2,242
1,213
1,029
147
5
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE UnicodeSyntax #-} module Unison.FileParsers where import Unison.Prelude import Control.Lens (view, _3) import qualified Unison.Parser as Parser import Control.Monad.State (evalStateT) import Control.Monad.Wr...
unisonweb/platform
parser-typechecker/src/Unison/FileParsers.hs
mit
9,073
0
25
2,429
2,616
1,381
1,235
-1
-1
module Language.TaPL.TypedArith.Parser (parseString, parseFile) where import qualified Text.Parsec.Token as Token import Text.Parsec.Language (emptyDef) import Text.Parsec.Prim (parse) import Text.Parsec.String (Parser) import Control.Applicative ((<|>)) import Control.Monad (liftM) import Language.TaPL.TypedArith.Sy...
zeckalpha/TaPL
src/Language/TaPL/TypedArith/Parser.hs
mit
2,844
0
11
1,073
625
325
300
66
2
<?xml version='1.0' encoding='ISO-8859-1' ?> <!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"> <!-- title --> <title>Hilfe zu j-Algo</title> <!-- maps --> <maps> <homeID>main.in...
jurkov/j-algo-mod
res/main/help/jhelp/main_help.hs
gpl-2.0
1,632
139
34
220
658
334
324
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-...
alevy/postgresql-orm
src/Database/PostgreSQL/ORM/Model.hs
gpl-3.0
50,385
1
22
11,080
7,654
4,268
3,386
-1
-1
-- | -- Module : Commands.RpmBuild -- Copyright : (C) 2007-2008 Bryan O'Sullivan -- (C) 2012-2015 Jens Petersen -- -- Maintainer : Jens Petersen <petersen@fedoraproject.org> -- Stability : alpha -- Portability : portable -- -- Explanation: Support for building RPM packages. Can also gen...
opensuse-haskell/cabal-rpm
src/Commands/RpmBuild.hs
gpl-3.0
3,188
0
17
700
628
337
291
46
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Jobs/TestIAMPermissions.hs
mpl-2.0
6,462
0
16
1,384
789
465
324
120
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.DoubleClick...
rueshyna/gogol
gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Product.hs
mpl-2.0
62,378
0
43
16,210
11,714
6,732
4,982
1,304
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Partners.Types.Sum -- Copyright : (c) 2015-2016 Brenda...
rueshyna/gogol
gogol-partners/gen/Network/Google/Partners/Types/Sum.hs
mpl-2.0
600
0
4
109
29
25
4
8
0
{-# 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/Licenses/TestIAMPermissions.hs
mpl-2.0
4,407
0
17
990
479
287
192
80
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} module Blick.Server where import Servant import qualified Servant.Server.StaticFiles as Static import qualified Blick.API as API import Blick.Context (AppCtx (..), AppM) import qualified Blick.Data...
erik/sketches
projects/blick/src/Blick/Server.hs
agpl-3.0
2,340
0
10
596
359
200
159
45
2
{-# LANGUAGE ForeignFunctionInterface, FlexibleInstances #-} ----------------------------------------------------------------------------------------- {-| Module : Types Copyright : (c) Daan Leijen 2003 License : wxWindows Maintainer : wxhaskell-devel@lists.sourceforge.net Stability : provisiona...
thielema/wxhaskell
wxcore/src/haskell/Graphics/UI/WXCore/Types.hs
lgpl-2.1
19,284
0
14
4,817
4,967
2,663
2,304
332
1
module Game where import Linear import Time import Input import Transform data GameState a = GameState { worms :: [Worm a] } data Worm a = Worm type Position = V2 -- nextState :: State -> DTime -> [InputEvent] -> State -- nextState s dt is = s -- TODO
epeld/zatacka
old/Game.hs
apache-2.0
257
0
10
55
54
35
19
8
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ScopedTypeVariables #-} module Network.GRPC.HighLevel.Client ( ClientError(..) , ClientRegisterable(..) , ClientRequest(..) , ClientResult(..) , GRP...
awakenetworks/gRPC-haskell
src/Network/GRPC/HighLevel/Client.hs
apache-2.0
10,256
0
17
2,753
2,129
1,129
1,000
154
7
{-# LANGUAGE FlexibleContexts, TypeOperators, Rank2Types, TypeFamilies #-} module Data.HMin where import Data.MemoTrie import Data.AdditiveGroup import Data.VectorSpace import Data.Maclaurin import Data.Basis import Data.LinearMap import Control.Arrow -- convenience type and eq operator type Equation a b = (a -> b) ...
cspollard/hminimize
src/Data/HMin.hs
apache-2.0
3,062
0
13
763
1,160
624
536
45
2
module OAuthToken ( AccessToken , RequestToken , OAuthToken ) where import Prelude import Yesod import qualified Data.Text as T import Database.Persist.Store ( SqlType (SqlString) , PersistValue (PersistText) ) class (Read a, Show a, PathPiece a, PersistField a) => OAuthToken a where mkToken :: String -> May...
JanAhrens/yesod-oauth-demo
OAuthToken.hs
bsd-2-clause
2,945
0
10
858
855
452
403
73
2
-- Usage: xmacrorec2 | ConvertClicks > clicks.txt module Main (main) where import Control.Monad (void) import Data.Char (isDigit) import Data.List (isPrefixOf) import System.Environment (getArgs) main :: IO () main = do args <- getArgs let printFunc = toClick $ if "--haskell" `elem` args ...
KaiHa/GuiTest
src/ConvertClicks.hs
bsd-3-clause
1,984
0
12
559
583
313
270
36
2
-- | Simple prettified log module Emulator.Log ( prettify , state , core , registers , ram ) where import Control.Applicative ((<$>)) import Control.Monad (forM) import Data.List (intercalate) import Emulator import Emulator.Monad import Instruction import Memory (Address (..)) import Util pr...
jaspervdj/dcpu16-hs
src/Emulator/Log.hs
bsd-3-clause
1,573
0
15
457
585
301
284
45
1
{-# LANGUAGE TemplateHaskell #-} module Cloud.AWS.EC2.Types.RouteTable ( PropagatingVgw , Route(..) , RouteOrigin(..) , RouteState(..) , RouteTable(..) , RouteTableAssociation(..) ) where import Cloud.AWS.EC2.Types.Common (ResourceTag) import Cloud.AWS.Lib.FromText (deriveFromText) import ...
worksap-ate/aws-sdk
Cloud/AWS/EC2/Types/RouteTable.hs
bsd-3-clause
1,682
0
9
335
382
230
152
49
0
{-# OPTIONS -fglasgow-exts #-} ---------------------------------------------------------------------- -- | -- Module : Interface.TV.Misc -- Copyright : (c) Conal Elliott 2006 -- License : LGPL -- -- Maintainer : conal@conal.net -- Stability : experimental -- Portability : portable -- -- Miscellan...
conal/TV
src/Interface/TV/Misc.hs
bsd-3-clause
1,361
0
10
294
100
66
34
6
1
{-# LANGUAGE NamedFieldPuns #-} module Main where import Control.Monad.Except import Data.Foldable import System.Environment import System.IO import Language.Scheme.Pretty import Language.Scheme.Reader data FormatError = FormatError deriving (Eq, Show) type FormatM = ExceptT FormatError IO -- FIXME: Don't ignore bl...
alldne/scheme
schemefmt/Main.hs
bsd-3-clause
923
0
11
179
262
132
130
30
2
-- -- | Values with a @public@ boolean accessor. module Data.Geo.OSM.Lens.PublicL where import Control.Lens.Lens class PublicL a where publicL :: Lens' a Bool
tonymorris/geo-osm
src/Data/Geo/OSM/Lens/PublicL.hs
bsd-3-clause
168
0
7
32
35
21
14
5
0
module Parser ( dimacs, CNF, Clause, Lit, Var, ) where import Control.Applicative import Control.Monad import Text.Trifecta type CNF = [Clause] type Clause = [Lit] type Lit = Int type Var = Int dimacs :: Parser CNF dimacs = do skipMany $ char 'c' >> manyTill anyChar newline (_...
tanakh/necosat
src/Parser.hs
bsd-3-clause
537
0
12
133
192
106
86
16
1
{-# LANGUAGE ViewPatterns, TupleSections, RecordWildCards, ScopedTypeVariables, PatternGuards, DeriveDataTypeable #-} module Output.Items(writeItems, lookupItem) where import Language.Haskell.Exts import System.IO.Extra import Data.List.Extra import System.FilePath import Control.Monad.Extra import Data.Maybe import ...
ndmitchell/hogle-dead
src/Output/Items.hs
bsd-3-clause
2,938
0
30
778
1,035
526
509
61
4
-- | This module exports functionality for generating a call graph of -- an Futhark program. module Futhark.Analysis.CallGraph ( CallGraph , buildCallGraph , FunctionTable , buildFunctionTable ) where import Control.Monad.Reader import qualified Data.HashMap.Lazy as HM import Futhark.Representation.SOACS...
mrakgr/futhark
src/Futhark/Analysis/CallGraph.hs
bsd-3-clause
3,338
0
20
908
848
426
422
62
8
{-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types, GeneralizedNewtypeDeriving, TemplateHaskell, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, UndecidableInstances #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.AD.Int...
yairchu/ad
src/Numeric/AD/Internal/Types.hs
bsd-3-clause
2,573
0
11
461
513
294
219
-1
-1
module Serv.Server ( bootstrap ) where import Control.Concurrent.Async import Serv.Server.Core.Runtime import Serv.Server.Features.Runtime import Serv.Server.ServerEnv bootstrap :: IO () bootstrap = do serverEnv <- setupServerEnv concurrently_ (runCore se...
orangefiredragon/bear
src/Serv/Server.hs
bsd-3-clause
353
0
9
94
79
45
34
10
1
module Text.Liquid.Generators where import Control.Monad (join) import Data.List.NonEmpty import Data.Monoid import Data.Scientific import Data.Text import Prelude hiding (null) import Test.QuickCheck import Text.Liquid.Typ...
projectorhq/haskell-liquid
test/Text/Liquid/Generators.hs
bsd-3-clause
6,564
0
17
2,274
1,736
943
793
152
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE IncoherentInstances #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Control.Exception.Enclosed.Either ( eTry , eExIO , eIoTry , eIOExIO , eTextTry , eTxIO , eIOExTxIO ) where import Data.Text a...
jcristovao/enclosed-exceptions-either
src/Control/Exception/Enclosed/Either.hs
bsd-3-clause
2,114
0
10
387
384
222
162
39
1
module T271 where import Data.Kind (Type) import Data.Singletons.Base.TH $(singletons [d| newtype Constant (a :: Type) (b :: Type) = Constant a deriving (Eq, Ord) data Identity :: Type -> Type where Identity :: a -> Identity a deriving (Eq, Ord) |])
goldfirere/singletons
singletons-base/tests/compile-and-dump/Singletons/T271.hs
bsd-3-clause
301
0
7
92
35
22
13
-1
-1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -Wno-unused-top-binds #-} module Nix.String ( NixString , principledGetContext , principledMakeNixString , principledMempty , StringContext(..) , ContextFlavor(..) , NixLikeContext...
jwiegley/hnix
src/Nix/String.hs
bsd-3-clause
8,970
0
13
1,597
1,862
992
870
173
4
import Control.Concurrent import GHCJS.Marshal.Pure import GHCJS.Require helloWorld = putStrLn "[haskell] Hello World" launchTheMissiles = do threadDelay (1000 * 1000 * 5) putStrLn "[haskell] OMG what did I do?!" return $ Just $ pToJSVal (10 :: Double) main = do export0 ...
beijaflor-io/ghcjs-commonjs
old-examples/ghcjs-loader-test/Main.hs
mit
409
0
10
103
97
47
50
12
1
{-# LANGUAGE DeriveGeneric #-} module Pos.DB.Epoch.Index ( writeEpochIndex , getEpochBlundOffset , SlotIndexOffset (..) ) where import Universum import Data.Binary (Binary, decode, encode) import qualified Data.ByteString.Builder as Builder import qualified Data.ByteSt...
input-output-hk/pos-haskell-prototype
db/src/Pos/DB/Epoch/Index.hs
mit
3,622
0
13
842
713
385
328
58
3
-- Copyright (c) 2010, Diego Souza -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- this list of conditio...
dgvncsz0f/iyql
src/main/haskell/Yql/UI/CLI/Commands/Logout.hs
gpl-3.0
1,909
0
9
347
118
77
41
8
1
-- Copyright (c) 2010, Diego Souza -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- * Redistributions of source code must retain the above copyright notice, -- this list of conditio...
dgvncsz0f/iyql
src/main/haskell/iyql.hs
gpl-3.0
2,535
0
15
600
303
173
130
20
3
{-# LANGUAGE QuasiQuotes #-} module CUDA (cudaTests) where import Test.Framework import Test.Framework.Providers.HUnit import Test.HUnit (Assertion, (@?=)) import Language.C.Quote.CUDA import Language.C.Syntax import Data.Loc (noLoc) mkDeclarator params mutability = LambdaDeclarator (Params params False noLoc) muta...
flowbox-public/language-c-quote
tests/unit/CUDA.hs
bsd-3-clause
2,423
0
12
498
629
369
260
40
1
module T3132 where import Data.Array.Unboxed step :: UArray Int Double -> [Double] step y = [y!1 + y!0]
mpickering/ghc-exactprint
tests/examples/ghc710/T3132.hs
bsd-3-clause
106
0
8
20
50
28
22
4
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Pattern-matching bindings (HsBinds and MonoBinds) Handles @HsBinds@; those at the top level require different handling, in that the @Rec@/@NonRec@/etc structure is thrown away (whereas at lower levels it is preserved with...
ml9951/ghc
compiler/deSugar/DsBinds.hs
bsd-3-clause
48,481
0
24
15,268
8,297
4,237
4,060
543
21
-- | Devel web server. module DevelMain where import HL.Dispatch () import HL.Foundation import Control.Concurrent import Data.IORef import Foreign.Store import Network.Wai.Handler.Warp import System.Environment (getEnvironment) import Yesod import Yesod.Static -- | Start the web server. main :: IO (Store (IORef Ap...
mietek/hl
src/DevelMain.hs
bsd-3-clause
1,219
0
16
413
381
180
201
41
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {- Copyright (C) - 2017 Róman Joost <roman@bromeco.de> This file is part of gtfsschedule. gtfsschedule 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 Fo...
romanofski/gtfsbrisbane
src/CSV/Import/Route.hs
bsd-3-clause
2,302
0
10
718
303
166
137
41
1
-- | -- Module : Basement.These -- License : BSD-style -- Maintainer : Nicolas Di Prima <nicolas@primetype.co.uk> -- Stability : stable -- Portability : portable -- -- @These a b@, sum type to represent either @a@ or @b@ or both. -- module Basement.These ( These(..) ) where import Basement.Compat.B...
vincenthz/hs-foundation
basement/Basement/These.hs
bsd-3-clause
951
0
8
232
295
159
136
20
0
{- Copyright 2015 Google Inc. 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 applicable law or a...
xwysp/codeworld
codeworld-base/src/GHC/TypeLits.hs
apache-2.0
739
0
4
136
23
17
6
4
0
{-# LANGUAGE CPP , GADTs , KindSignatures , DataKinds , Rank2Types , ScopedTypeVariables , MultiParamTypeClasses , FlexibleContexts , FlexibleInstances #-} {-# OPTIONS_GHC -Wall -fwarn-tabs #-} --------------------------...
zaxtax/hakaru
haskell/Language/Hakaru/Evaluation/EvalMonad.hs
bsd-3-clause
12,638
0
22
3,646
2,985
1,579
1,406
197
3
foo f = (\ g x -> f (g x))
bitemyapp/tandoori
input/lambda.hs
bsd-3-clause
27
0
9
10
28
14
14
1
1
{-# LANGUAGE NoImplicitPrelude #-} {-| Module : Stack.Sig Description : GPG Signatures for Stack Copyright : (c) 2015-2018, Stack contributors License : BSD3 Maintainer : Tim Dysinger <tim@fpcomplete.com> Stability : experimental Portability : POSIX -} module Stack.Sig (module Sig) where import Stack.Si...
anton-dessiatov/stack
src/Stack/Sig.hs
bsd-3-clause
362
0
4
64
30
22
8
4
0
haskell comment {- haskell comment {- 3 lines of comments total! -} haskell blank haskell comment -} haskell blank
scriptum/ohcount
test/expected_dir/haskell3.hs
gpl-2.0
131
6
4
35
15
8
7
-1
-1
{-# LANGUAGE DeriveGeneric, ScopedTypeVariables #-} module GCoArbitraryExample where import GHC.Generics (Generic) import Test.QuickCheck import Test.QuickCheck.Function data D a = C1 a | C2 deriving (Eq, Show, Read, Generic) instance Arbitrary a => Arbitrary (D a) instance CoArbitrary a => CoArbitrary (D a) inst...
srhb/quickcheck
tests/GCoArbitraryExample.hs
bsd-3-clause
480
0
11
86
194
106
88
13
1
{-# LANGUAGE Rank2Types, ScopedTypeVariables #-} -- Test the handling of conditionals in rank-n stuff -- Should fail, regardless of branch ordering module ShouldFail where -- These two are ok f1 = (\ (x :: forall a. a->a) -> x) f2 = (\ (x :: forall a. a->a) -> x) id 'c' -- These fail f3 v = (if v then (\ (x :: ...
hvr/jhc
regress/tests/1_typecheck/4_fail/ghc/tcfail104.hs
mit
470
12
13
135
196
114
82
12
2
{-# LANGUAGE BangPatterns, CPP, Rank2Types #-} -- | -- Module : Data.Text.Internal.Encoding.Fusion -- Copyright : (c) Tom Harper 2008-2009, -- (c) Bryan O'Sullivan 2009, -- (c) Duncan Coutts 2009 -- -- License : BSD-style -- Maintainer : bos@serpentine.com -- Stability : exper...
beni55/text
Data/Text/Internal/Encoding/Fusion.hs
bsd-2-clause
7,772
0
16
2,388
2,393
1,248
1,145
145
3
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Utility functions on @Core@ syntax -} {-# LANGUAGE CPP #-} module CoreSubst ( -- * Main data types Subst(..), -- Implementation exported for supercompiler's Renaming.hs only TvSubstEnv, IdSubstEnv,...
acowley/ghc
compiler/coreSyn/CoreSubst.hs
bsd-3-clause
59,475
1
22
15,090
11,390
5,987
5,403
667
13
module Parser where import Ast import Text.Trifecta import Text.Trifecta.Delta
Agrosis/haxpr
src/Parser.hs
mit
81
0
4
11
18
12
6
4
0
{-# htermination filterM :: Monad m => (a -> m Bool) -> [a] -> m [a] #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_filterM_2.hs
mit
86
0
3
19
5
3
2
1
0
{-# LANGUAGE OverloadedStrings #-} module Web.Scotty.Blaze ( blaze , builder ) where import Network.Wai import Web.Scotty (ActionM, header) import qualified Control.Monad.State as MS import Text.Blaze.Html (Html) import Blaze.ByteString.Builder (Builder) import Text...
jb55/scotty-blaze
src/Web/Scotty/Blaze.hs
mit
837
0
8
178
243
134
109
20
1
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings, TemplateHaskell, TypeSynonymInstances #-} module SpaceWeather.Regressor.Linear where import qualified Data.Aeson.TH as Aeson import SpaceWeather.Prediction data LinearOption = LinearOption deriving (Eq, Ord, Show, Read) Aeso...
nushio3/UFCORIN
src/SpaceWeather/Regressor/Linear.hs
mit
440
0
6
45
75
43
32
8
0
{-# htermination liftM2 :: Monad m => (a -> b -> c) -> (m a -> m b -> m c) #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_liftM2_1.hs
mit
92
0
3
24
5
3
2
1
0
----------------------------------------------------------------------------- -- -- Module : SGC.Object -- Copyright : -- License : MIT -- -- Maintainer : -- Stability : -- Portability : -- -- | -- {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE Constrain...
fehu/hsgc
SGC/Object_OLD.hs
mit
2,381
0
9
479
533
291
242
-1
-1
newtype DiffList a = DiffList {getDiffList :: [a] -> [a]} toDiffList :: [a] -> DiffList a toDiffList xs = DiffList (xs++) fromDiffList :: DiffList a -> [a] fromDiffList (DiffList f) = f [] instance Monoid (DiffList a) where mempty = DiffList (\xs -> [] ++ xs) (DiffList f) `mappend` (DiffList ...
RAFIRAF/HASKELL
For a Few Monads More/difflist.hs
mit
353
0
11
86
170
91
79
8
1
-- necessary for `ToParamSchema Core.EpochIndex` {-# OPTIONS_GHC -fno-warn-orphans #-} module Cardano.Node.API.Swagger where import Universum import Control.Lens (at, (?~)) import Data.Swagger import Servant import Servant.Swagger import Servant.Swagger.UI ...
input-output-hk/pos-haskell-prototype
node/src/Cardano/Node/API/Swagger.hs
mit
2,254
0
16
683
516
272
244
-1
-1
{{hs_copyright}} module {{module_name}}App.Types ( Milliseconds (..) ) where newtype Milliseconds = Milliseconds Int
rcook/ptool-templates
elm-haskell/app_Types.hs
mit
126
2
5
22
34
24
10
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} {-| Module : Ogma.Api.Definition Copyright : (c) Ogma Project, 2016 License : MIT Stability : experimental -} module Ogma.Api.Definition where import Data.Aeson...
lgeorget/ogma
api/src/Ogma/Api/Definition.hs
mit
2,891
0
26
1,022
620
337
283
59
1
module MHMC.Error ( --TODO: EVERYTHING ) where
killmous/MHMC
src/MHMC/Error.hs
mit
47
0
3
7
10
7
3
2
0
module Graphics.CG.Primitives.Triangle(Triangle, makeTriangle, sortTrianglePoints) where import Data.List (sort) import Graphics.Gloss.Data.Point type Triangle = (Point, Point, Point) makeTriangle :: Point -> Point -> Point -> Triangle makeTriangle a b c = (a, b, c) sortTriangleP...
jagajaga/CG-Haskell
Graphics/CG/Primitives/Triangle.hs
mit
425
0
8
96
157
96
61
8
1
{-# LANGUAGE DeriveGeneric #-} module TypeHierarchy where import Data.List import Data.Functor import Data.Monoid import Data.Binary import Data.Serialize import GHC.Generics as GGen import Text.ParserCombinators.ReadPrec import Text.ParserCombinators.Parsec.Token as P import Text.ParserCombinators.Parsec import Tex...
wetneb/yanker
src/TypeHierarchy.hs
gpl-3.0
9,164
0
17
1,771
2,838
1,479
1,359
188
4
{-#LANGUAGE DeriveGeneric #-} module Handler.Instructor where import Import import Util.Data import Util.Database import Yesod.Form.Bootstrap3 import Carnap.GHCJS.SharedTypes(ProblemSource(..)) import Yesod.Form.Jquery import Handler.User (scoreByIdAndClassTotal, scoreByIdAndClassPerProblem) import Text.Blaze.Html (to...
gleachkr/Carnap
Carnap-Server/Handler/Instructor.hs
gpl-3.0
48,694
0
41
20,263
8,739
4,416
4,323
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE PostfixOperators #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} import Control.Monad.IO.Class import Control.Monad.Trans.Either -- import Data.Array -- import Data.Enumerated.Partition import Data.Enumerated.Sequence import Dat...
wavewave/qft
old/exe/qft5.hs
gpl-3.0
1,539
0
20
517
494
257
237
37
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-books/gen/Network/Google/Resource/Books/Bookshelves/List.hs
mpl-2.0
3,053
0
14
714
386
231
155
58
1