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
-- Fishtank: 3D OpenGL demo with flocking boids -- Author: Matthew Danish. License: BSD3 (see LICENSE file) -- -- Generic 'Boids' algorithm implementation. 'Boids' are objects with -- position and velocity that decide the velocity on each frame by -- adding up the result of a set of simple rules. -- -- Default rules ...
mrd/fishtank
Boids.hs
bsd-3-clause
4,122
0
16
1,291
1,399
785
614
65
7
{-# LANGUAGE PolyKinds, DeriveGeneric #-} -- | Basic functors. -- -- Definitions of the type-level equivalents of -- 'const', 'id', and ('.'), and a definition of -- the lifted function space. -- -- These datatypes are generally useful, but in this -- library, they're primarily used as parameters for -- the 'NP', 'NS',...
well-typed/generics-sop
sop-core/src/Data/SOP/BasicFunctors.hs
bsd-3-clause
9,296
0
10
2,181
3,315
1,775
1,540
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Database.Bloodhound.Internal.Aggregation where import Bloodhound.Import import qualified Data.Aeson as Aeson import qualified Data.HashMap.Strict as HM import qualified...
bitemyapp/bloodhound
src/Database/Bloodhound/Internal/Aggregation.hs
bsd-3-clause
17,692
0
20
5,783
4,115
2,199
1,916
381
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module Clicklac.User ( -- * Data Types Account(..) , AccountState(..) , AccountStateUpdate...
onurzdg/clicklac
src/Clicklac/User.hs
bsd-3-clause
15,985
0
26
4,047
4,559
2,355
2,204
438
5
{-| Description: response utilities utilities and defaults for sending responses. -} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} module Web.Respond.Response where import Control.Applicative ((<$>)) import Network.Wai import qualified Data.ByteString as BS import Network.HTTP.Types.Status import ...
raptros/respond
src/Web/Respond/Response.hs
bsd-3-clause
5,765
0
10
943
1,136
602
534
64
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {- | Annotating monads with tags to turn untagged constraints into tagged ones. > import quali...
bitemyapp/ether
src/Control/Ether/Wrapped.hs
bsd-3-clause
3,259
0
10
628
921
495
426
57
1
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE OverloadedStrings #-} module Reporting.Error.Help ( Report , report , docReport , compilerReport , reportToDoc , hintLink , stack , reflow , note , toString , toStdout , toStderr ) where import qualified Data.List as List import GHC.IO.Handle (hIsTermi...
evancz/builder
src/Reporting/Error/Help.hs
bsd-3-clause
2,835
0
21
734
914
487
427
94
3
module Interpreter where import Data.Char (isDigit) import Data.List (foldl') import Evaluator (evaluate) import InterpreterUtil (parseMultiple, unparse) import Parser (parse) import Types -- This is the Interpreter module, which ...
joelchelliah/diy-lang-haskell
src/Interpreter.hs
bsd-3-clause
1,532
0
13
350
269
151
118
20
1
{-# LANGUAGE CPP #-} #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-} #endif {-# LANGUAGE MultiParamTypeClasses #-} ------------------------------------------------------------------------------------------- -- | -- Module : Control.Category.Braided -- Copyright : 2008-20...
ekmett/categories
old/src/Control/Category/Braided.hs
bsd-3-clause
1,988
0
9
368
264
148
116
-1
-1
-- c-repl: a C read-eval-print loop. -- Copyright (C) 2008 Evan Martin <martine@danga.com> -- This module is responsible for managing the child process that actually -- executes the code snippets. module Child ( Child(..), -- Start/stop a child subprocess. start, stop, -- Instruct a child subprocess to ru...
martine/c-repl
Child.hs
bsd-3-clause
4,273
0
21
1,099
956
488
468
94
5
module FindSkews ( computeSkewsFromFiles ) where import qualified Codec.Wav as Wav import Control.Monad (liftM2) import qualified Data.Array.Unboxed as UA import Data.Audio import Data.Either (lefts) import Data.Int (Int16) import Text.Printf -- | Find skews between two audio tracks of MechBass strings. -- ...
mzero/PlainChanges2
src/FindSkews.hs
bsd-3-clause
2,499
0
16
656
670
352
318
42
4
module Sols.Prob1 ( solution ) where solution = print (sum [x | x <- [1..999], x `mod` 3 == 0 || x `mod` 5 == 0])
authentik8/haskell-euler
src/Sols/Prob1.hs
bsd-3-clause
118
0
14
30
69
39
30
3
1
module Main where import System.Hwloc import Numeric (showHex) import Data.Tree import Control.Monad main :: IO () main = do putStrLn $ "Using HWLOC version " ++ showHex getApiVersion "" Just topo <- initTopology _ <- loadTopology topo root <- getObject topo 0 0 tree <- buildTree root putStrLn ....
hsyl20/haskell-hwloc
src/apps/HwLoc.hs
bsd-3-clause
539
0
11
117
199
96
103
17
1
{- (c) The University of Glasgow 2006-2012 (c) The GRASP Project, Glasgow University, 1992-2002 Various types used during typechecking, please see TcRnMonad as well for operations on these types. You probably want to import it, instead of this module. All the monads exported here are built on top of the same IOEnv m...
elieux/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
99,418
0
16
28,955
11,887
6,805
5,082
950
5
-- Base64 decode and encode bytes module Base64 where import qualified Data.ByteString as B -- pull off 8 bytes - if this fails, try until none left, and pad with = -- encode bytes, encode tail encode8 :: B -> string encode8 s :: i encode None :: "" encode8 val = ???
jdowns/crypto
src/base64.hs
gpl-2.0
275
4
6
60
47
29
18
-1
-1
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, DeriveDataTypeable #-} {- - Construction of human + common ancestor (of human and chimp) genome. - Input is emf files from EPO (compara) output. - - What do we want: find all known trees that contain at least human or - chimp. From those, take all the human...
udo-stenzel/anfo
tools/make_ancestral_genome.hs
gpl-3.0
23,136
1
22
7,034
7,496
3,945
3,551
367
22
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.AutoScaling.Waiters -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public Lice...
olorin/amazonka
amazonka-autoscaling/gen/Network/AWS/AutoScaling/Waiters.hs
mpl-2.0
636
0
4
122
39
31
8
7
0
{-# OPTIONS_GHC -F -pgmF hspec-discover #-} -- See http://hspec.github.io/hspec-discover.html
wxzh/fcore
testsuite/Spec.hs
bsd-2-clause
93
0
2
8
4
3
1
1
0
{- (c) The AQUA Project, Glasgow University, 1994-1998 \section[ErrsUtils]{Utilities for error reporting} -} {-# LANGUAGE CPP #-} module ErrUtils ( MsgDoc, Validity(..), andValid, allValid, isValid, getInvalids, ErrMsg, WarnMsg, Severity(..), Messages, ErrorMessages, WarningMessages,...
TomMD/ghc
compiler/main/ErrUtils.hs
bsd-3-clause
15,574
0
23
4,506
3,513
1,829
1,684
276
5
{-# LANGUAGE CPP, GADTs #-} -- | -- The Eta Serv server. -- -- For details on Remote Eta Serv, see Note [Remote Eta REPL] in -- compiler/eta-repl/Eta/REPL/TH.hs. -- import Lib (serv) import Eta.REPL.RemoteTypes import Eta.REPL.Message import Control.Exception import Control.Monad import Data.IORef import System.Envi...
rahulmutt/ghcvm
eta-serv/src/main/eta/Main.hs
bsd-3-clause
1,051
0
11
206
229
121
108
27
3
{-# LANGUAGE Haskell98, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} {-# LINE 1 "Control/Monad/State.hs" #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.State -- Copyright : (c) Andy Gill 2001, -- (c) Oregon...
phischu/fragnix
tests/packages/scotty/Control.Monad.State.hs
bsd-3-clause
1,028
0
5
172
44
37
7
5
0
{-| Module : Idris.ElabDecls Description : Code to elaborate declarations. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE DeriveFunctor, FlexibleInstances, MultiParamTypeClasses, PatternGuards #-} module Idris.ElabDecls where import Idris.AbsSyntax import Idris....
Heather/Idris-dev
src/Idris/ElabDecls.hs
bsd-3-clause
13,517
0
21
4,433
4,427
2,214
2,213
264
12
{-# LANGUAGE TemplateHaskell, QuasiQuotes, FlexibleContexts #-} module TensorQQ where import Text.Peggy genParser [("tens", "tensor")] [peggy| tensor :: Exp = ident '_' ident { $$1 !! $$2 } ident :: String = [a-z]+ { $1 } |]
tanakh/Peggy
example/TensorQQ.hs
bsd-3-clause
231
0
7
42
31
20
11
4
0
module GA1 where import Text.ParserCombinators.Parsec parseStr :: CharParser () String parseStr = char '"' *> (many1 (noneOf "\"")) <* char '"'
RefactoringTools/HaRe
test/testdata/GenApplicative/GA1expect.hs
bsd-3-clause
145
0
10
22
53
28
25
4
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE IncoherentInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Key generators and miscellaneous html utilities. -- -- Uses the lucid 'Lucid.Html'. module Web.Rep.Html ( class__, toText, li...
tonyday567/lucid-page
src/Web/Rep/Html.hs
mit
2,219
0
11
403
450
255
195
42
1
module World ( World , ship , bullets , asteroids , GameEventType , getInitWorld , updateWorld ) where import GHC.Float (double2Int) import Constants import Entities import Random data World = World { ship :: Ship , bullets :: [Bullet] , asteroids :: [Asteroid] } deriving (Show) data GameEventType = AsteroidSh...
rdtaylor/CelestialBodies
World.hs
mit
4,693
0
13
1,442
1,350
768
582
103
2
module Desugar ( ) where import Language.Haskell.Exts.Annotated.Syntax import Control.Arrow ((***)) import Control.Applicative import Data.Traversable import DesugarClass import Desugar.If instance Functor Desugar where fmap f a = do a' <- a return $ f a' -- fmap f (Desugar k) = Desugar $ \s -> -- ...
CindyLinz/Haskell.js
trans/src/Desugar.hs
mit
35,062
0
18
6,453
17,186
8,413
8,773
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Kantour.GameResource.Magic ( servers , magicCode ) where import Data.Monoid import Data.Char import qualified Data.IntMap.Strict as IM import qualified Data.Text as T import qualified Data.Vector.Unboxed as VU servers :: IM.IntMap T.Text servers = IM.fromList [ (...
Javran/tuppence
src/Kantour/GameResource/Magic.hs
mit
1,815
0
15
406
703
448
255
51
2
module Main where import Text.Printf import Data.Time.Clock.POSIX import Lib main :: IO () main = do printf "head panDigitalTriples = %s\n" $ show $ head panDigitalTriples startTime <- getPOSIXTime printf "sum of products of all pandigital triples x * y = z: %d" sumPandigitalProducts stopTime <- getPO...
JohnL4/ProjectEuler
Haskell/Problem032/app/Main.hs
mit
385
0
10
78
93
46
47
11
1
-- | -- Module: Math.NumberTheory.Pell -- Copyright: (c) 2016 by Dr. Lars Brünjes -- Licence: MIT -- Maintainer: Dr. Lars Brünjes <brunjlar@gmail.com> -- Stability: Provisional -- Portability: portable -- -- This module provides a function to solve generalized Pell Equations, -- using the "LMM Algorithm" ...
brunjlar/pell
Math/NumberTheory/Pell.hs
mit
4,982
0
19
1,802
1,785
965
820
80
4
module AFCalc where -- Module for getting actual points using functions defined in model -- We use complex numbers import Data.Complex -- We use custom integrators written specifically for needs of AFCALC -- EDIT @ 2011-09-26: Cabalized as complex-integrate package import Data.Complex.Integrate ---------------------...
hijarian/AFCALC
program/src/FluidCalc.hs
cc0-1.0
4,140
0
11
901
903
500
403
56
1
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-} module Number.Float.Config where import Prelude hiding ( exponent ) import qualified Number.Base.Data as B import Autolib.Reader import Autolib.ToDoc import Autolib.Size import Data.Typeable import Autolib.Reporter import qualified Number.Float.Data as F data ...
Erdwolf/autotool-bonn
src/Number/Float/Config.hs
gpl-2.0
1,589
6
19
438
405
213
192
39
1
{-# OPTIONS_GHC -Wall -fwarn-tabs -Werror #-} ------------------------------------------------------------------------------- -- | -- Module : View -- Copyright : Copyright (c) 2014 Michael R. Shannon -- License : GPLv2 or Later -- Maintainer : mrshannon.aerospace@gmail.com -- Stability : unstable -...
mrshannon/trees
src/View.hs
gpl-2.0
3,769
0
10
1,122
747
436
311
74
1
-- | The Delta module parses and applies the delta format found within Git -- pack files. -- -- See patch-delta.c in the git code. module Delta ( Delta(..) , readDelta , applyDelta ) where import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as BL import Data.Binary.Strict.Get import Da...
martine/gat
Delta.hs
gpl-2.0
3,470
0
17
967
930
489
441
82
9
module Greg where import Greg.Simple import Greg.IRC (connect) import Greg.Types (Command, Message, Bot (..)) import Data.Text (Text) import Control.Concurrent import Control.Monad -- | Simplest way to get a bot up and running. -- This function logs to stdout with 'Greg.Simple.monitor', and makes a small IRC c...
mikeplus64/Greg
src/Greg.hs
gpl-3.0
794
0
13
182
183
100
83
17
1
module Resources where import Data.Monoid data Resources = Resources { gold :: Integer, food :: Integer, tech :: Integer } deriving (Eq, Show) instance Monoid Resources where mempty = Resources 0 0 0 mappend (Resources g f t) (Resources g' f' t') = Resources (g+g') (f+f') (t+t')
Tomsik/SpaceHegemony
src/Resources.hs
gpl-3.0
303
0
8
70
125
69
56
10
0
-- In C, we use mutable variables to create loops: -- long factorial (int n) { -- long result = 1; -- while (n > 1) { -- result *= n--; -- } -- return result; -- } -- In Haskell, use recursion to "re-bind" argument symbols in new scope -- factorial n = if n > 1 -- then n * factorial (n - 1)...
lamontu/learning_haskell
tail_recursion.hs
gpl-3.0
601
0
12
231
88
50
38
5
2
module Handler.UserDetailsSpec (spec) where import TestImport spec :: Spec spec = withApp $ do describe "getUserDetailsR" $ do error "Spec not implemented: getUserDetailsR"
Lionex/s16_mangohacks
JEGL/test/Handler/UserDetailsSpec.hs
gpl-3.0
189
0
11
39
44
23
21
6
1
module TestScreen where import Test.QuickCheck import Screen main :: IO () main = do quickCheck prop_append quickCheck prop_update quickCheck prop_cjk prop_append :: Bool prop_append = toStrings (append "h" fr) == ["h\0\0", "\0\0\0"] && toStrings (append "he" fr) == ["he\0",...
clchiou/gwab
test/TestScreen.hs
gpl-3.0
2,935
0
48
892
1,029
542
487
61
1
{-# LANGUAGE RankNTypes #-} module Handler.TextMessage where import Prelude import Database.Esqueleto import Data.Text import Handler.DB.Internal import Handler.DB.Enums import Control.Monad import Control.Monad.Trans.Class import Control.Monad.IO.Class import Control.Monad.Trans.Reader import Control.Monad.Trans.Maybe...
tlaitinen/sms
backend/Handler/TextMessage.hs
gpl-3.0
2,149
0
33
423
865
469
396
36
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-firestore/gen/Network/Google/Resource/FireStore/Projects/Databases/CollectionGroups/Indexes/Create.hs
mpl-2.0
6,680
0
17
1,402
789
463
326
125
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-firestore/gen/Network/Google/Resource/FireStore/Projects/Databases/CollectionGroups/Indexes/List.hs
mpl-2.0
7,141
0
19
1,596
966
559
407
146
1
module Math.Topology.KnotTh.Tangle ( module Math.Topology.KnotTh.Knotted , module Math.Topology.KnotTh.Knotted.Crossings.Projection , module Math.Topology.KnotTh.Knotted.Crossings.Diagram , module Math.Topology.KnotTh.Tangle.CascadeCode , module Math.Topology.KnotTh.Tangle.GaussCode , module Mat...
mishun/tangles
src/Math/Topology/KnotTh/Tangle.hs
lgpl-3.0
8,704
0
21
1,948
2,584
1,444
1,140
196
5
{-# LANGUAGE CPP #-} {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE JavaScriptFFI #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE ScopedTypeVariables #-} {- Copyright 2019 The CodeWorld Authors. All rights reserved. Licensed under the Apache L...
pranjaltale16/codeworld
codeworld-base/src/Internal/Truth.hs
apache-2.0
3,184
6
12
730
619
341
278
46
2
module Polynomial.A329479 (a329479) where import HelperSequences.A024493 (a024493) import HelperSequences.A024495 (a024495) a329479 :: Integer -> Integer a329479 n | even n = a024495 (n'-1) * a024493 n' | odd n = a024495 n' * a024493 n' where n' = n `div` 2
peterokagey/haskellOEIS
src/Polynomial/A329479.hs
apache-2.0
268
0
9
51
109
56
53
8
1
{-# LANGUAGE OverloadedStrings #-} module Api.V1 (v1 ) where import Api (RoutesMap, prependRoute) v1 :: RoutesMap IO -> RoutesMap IO v1 packagesRoutes = prependRoute "/packages" packagesRoutes
haskell-serverless/management
src/Api/V1.hs
apache-2.0
210
0
6
43
51
28
23
6
1
module Helpers ( requestIP , parseJsonParam , parseJsonParam_ , maybe404 , either500 , niceTime , createThumbs , Thumbnail (..) , ThumbError (..) , ThumbSize (..) , thumbR ) where import Prelude import Network.Wai (remoteHost, queryString, requestHeaders) import Network.Sock...
JerrySun/league-famous
Helpers.hs
bsd-2-clause
3,662
0
15
891
1,185
638
547
82
3
module BuiltIn ( builtIns , emitBuiltIn , evalBuiltIn , envBuiltIn , ppusage ) where import Data.List (intercalate) import qualified Data.Map as M import Data.Monoid ((<>)) import BuiltIn.Date import BuiltIn.Finance import BuiltIn.Logic import ...
ahodgen/archer-calc
src/BuiltIn.hs
bsd-2-clause
1,516
0
10
471
440
236
204
39
2
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} {-# LANGUAGE ConstraintKinds #-} module Fragment.Annotation.Rules.Term ( AnnotationEvalConstraint , annotationEvalRules ) where import Control.Lens (review, p...
dalaing/type-systems
src/Fragment/Annotation/Rules/Term.hs
bsd-3-clause
1,756
0
12
496
569
287
282
41
1
{-# OPTIONS_GHC -Wall -XFlexibleInstances #-} module SCD.Lobster.Symbolic.LobsterUtil ( active -- Make qualified name for an active port , child -- Make qualified name for a child port , getattr -- Make qualified name for a getatter port , readPort -- Make qualified name for a read port , ...
GaloisInc/sk-dev-platform
libs/SCD/src/SCD/Lobster/Symbolic/LobsterUtil.hs
bsd-3-clause
886
0
5
195
185
112
73
21
1
-- Copyright : (C) 2009 Corey O'Connor -- License : BSD-style (see the file LICENSE) {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE MagicHash #-} -- | dynamic actions can have none, one, or both of the attributes: pre_open ; post_open -- pre_open means that there is a non 0 sized pre buffer requirement. -- post_o...
coreyoconnor/bind-marshal
src/Bind/Marshal/Action/Monad.hs
bsd-3-clause
33,154
0
20
12,607
7,378
3,769
3,609
-1
-1
{-# LANGUAGE UnicodeSyntax #-} import Prelude.Unicode data Tree a = Empty | Branch a (Tree a) (Tree a) deriving (Show, Eq) mirror ∷ Tree t → Tree t → Bool mirror Empty Empty = True mirror Empty _ = False mirror _ Empty = False mirror (Branch _ l1 r1) (Branch _ l2 r2) = mirror r1 l2 ∧ mirror l1 r2 s...
m00nlight/99-problems
haskell/p-56.hs
bsd-3-clause
432
0
8
102
183
92
91
13
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE OverloadedStrings #-} module Data.IHO.S52.Types.LineStyle ( LineStyle (..) , Record (..) ) where import Prelude hiding (take, takeWhile) import Data.Text (Text) import Data.Int import Data.Attoparsec.Text import Data.IHO.S52.Types.Module import Data.IHO.S52.Types...
alios/iho-presentation
Data/IHO/S52/Types/LineStyle.hs
bsd-3-clause
3,258
26
13
1,483
750
421
329
-1
-1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Error.Lens -- Copyright : (C) 2014 Edward Kmett -- License : BSD-style (see the ...
hvr/lens
src/Control/Monad/Error/Lens.hs
bsd-3-clause
8,842
0
12
1,851
1,205
672
533
70
2
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.VertexArrays -- Copyright : (c) Sven Panne 2002-2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable --...
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/VertexArrays.hs
bsd-3-clause
18,189
0
12
2,519
3,679
1,880
1,799
348
14
{-# LANGUAGE ScopedTypeVariables, FlexibleContexts, OverlappingInstances, GADTs, RecordWildCards, TypeFamilies, TemplateHaskell #-} module YaLedger.Reports.IncomeStatement where import YaLedger.Reports.API data IncomeStatement = IncomeStatement data IOptions = Common CommonFlags | IIncomesCls String ...
portnov/yaledger
YaLedger/Reports/IncomeStatement.hs
bsd-3-clause
5,985
0
22
1,735
1,731
861
870
-1
-1
{-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module NejlaCommon.Test.Json where import qualified Data.Aeson as Aeson import qualified Data.ByteString.Lazy as BSL import qualified Data.Text as Text import qualified Data.Text.Encoding as Text import T...
nejla/nejla-common
src/NejlaCommon/Test/Json.hs
bsd-3-clause
693
0
9
140
159
93
66
16
0
module Language.MDL.Tokens (Token(..)) where import Data.ByteString.Lazy (ByteString) data Token = TokenDouble !Double | TokenComment | TokenLight | TokenConstants | TokenSaveCoords | TokenCamera | TokenAmbient | TokenTorus | Toke...
jbaum98/graphics
src/Language/MDL/Tokens.hs
bsd-3-clause
1,024
0
7
472
154
99
55
40
0
{-# LANGUAGE GeneralizedNewtypeDeriving, FlexibleInstances, MultiParamTypeClasses #-} module Logic.Unification where import Control.Applicative import Control.Monad.State import Control.Monad.Reader import Control.Monad.Error import qualified Data.Map as Map import Data.Map(Map) import qualified Data.Set as Set import ...
bmmoore/logic
Logic/Unification.hs
bsd-3-clause
2,612
77
11
582
1,019
537
482
61
5
module AERN2.Frac ( module AERN2.Frac.Eval , module AERN2.Frac.Maximum , module AERN2.Frac.Integration , module AERN2.Frac.Type ) where import AERN2.Frac.Eval import AERN2.Frac.Maximum import AERN2.Frac.Integration import AERN2.Frac.Ring() import AERN2.Frac.Field() import AERN2.Frac.Type
michalkonecny/aern2
aern2-fun-univariate/src/AERN2/Frac.hs
bsd-3-clause
300
0
5
39
78
53
25
12
0
module Sexy.Instances.FromInteger () where import Sexy.Instances.FromInteger.Int () import Sexy.Instances.FromInteger.Double ()
DanBurton/sexy
src/Sexy/Instances/FromInteger.hs
bsd-3-clause
129
0
4
11
30
21
9
3
0
{-# LANGUAGE OverloadedStrings #-} module Piki (piki) where import CharParser import Data.Char import Data.List (intercalate) import qualified Data.Text.Lazy as L import LineParser import Notation import Types ---------------------------------------------------------------- piki :: L.Text -> [Element] piki line = e...
kazu-yamamoto/piki
src/Piki.hs
bsd-3-clause
3,966
0
15
782
1,100
564
536
92
2
{-# LANGUAGE DeriveDataTypeable #-} module CryptoLatte.CryptoExceptions ( CryptoExceptions(..) ) where import Control.Exception import Data.Typeable data CryptoExceptions = RandomSourceUnavailable | InvalidSize | PrimeNumberNotFound ...
axelexic/sgx-bunny
src/CryptoLatte/CryptoExceptions.hs
bsd-3-clause
482
0
6
176
63
38
25
13
0
{-# LANGUAGE DeriveDataTypeable, PatternGuards, TupleSections, ViewPatterns #-} -- | Module for defining and manipulating expressions. module Proof.Exp.Prop( Prop(..), sym, tautology, simplifyProp, (==>) ) where import Proof.Exp.Core import Proof.Util import Data.Data import Data.Maybe import Data.List.Extra ...
ndmitchell/qed
src/Proof/Exp/Prop.hs
bsd-3-clause
1,863
0
17
526
828
427
401
38
2
{-# LANGUAGE FlexibleContexts #-} module Main where import Language.Gator main :: IO () main = do l <- compile logic putStrLn "/* " print l putStrLn " */" putStrLn $ mkDot l logic :: StateT Logic IO () logic = do inA <- newInputN "A" inB <- newInputN "B" inC <- newInputN "Cin" out...
sw17ch/gator
examples/fullAdder.hs
bsd-3-clause
817
0
10
234
308
142
166
28
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Patter...
achirkin/easytensor
easytensor/src/Numeric/Vector/Internal.hs
bsd-3-clause
6,830
13
13
2,029
2,664
1,449
1,215
166
1
-- Syntax in Functions -- Define separate function bodies for different pattern lucky :: (Integral a) => a -> String lucky 7 = "LUCKY NUMBER SEVEN!" -- The most specific ones first lucky x = "Sorry, you're out of luck, pal!" -- catch-all pattern fibonacci :: (Integral a) => a -> a fibonacci 0 = 0 fibonac...
kyk0704/haskell-test
src/Function.hs
bsd-3-clause
4,749
0
11
1,389
1,356
739
617
81
3
module Language.Haskell.GhcMod.Browse (browseModule, browse) where import Control.Applicative import Control.Monad (void) import Data.Char import Data.List import Data.Maybe (catMaybes) import DataCon (dataConRepType) import FastString (mkFastString) import GHC import Panic(throwGhcException) import Language.Haskell.G...
bitemyapp/ghc-mod
Language/Haskell/GhcMod/Browse.hs
bsd-3-clause
4,770
0
15
1,136
1,306
652
654
98
3
{-# LANGUAGE OverloadedStrings #-} module DbTests.PlaceCategory (placeCategoryTests) where import Control.Lens import Test.Tasty import Test.Tasty.HUnit import Db import DbTests.Internal placeCategoryTests :: TestTree placeCategoryTests = testGroup "PlaceCategory" [ testCase "roundTrip" testRoundTrip ] testRoundT...
benkolera/talk-stacking-your-monads
code/tests/DbTests/PlaceCategory.hs
mit
492
0
9
59
100
56
44
16
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-codecommit/gen/Network/AWS/CodeCommit/UpdateRepositoryDescription.hs
mpl-2.0
4,798
0
12
941
491
297
194
72
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-rds/gen/Network/AWS/RDS/DescribeDBClusterSnapshots.hs
mpl-2.0
9,096
0
15
1,805
1,109
670
439
126
1
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="sr-CS"> <title>HTTPS Info | ZAP Add-on</title> <maps> <homeID>top</homeID> <mapref loc...
veggiespam/zap-extensions
addOns/httpsInfo/src/main/javahelp/org/zaproxy/zap/extension/httpsinfo/resources/help_sr_CS/helpset_sr_CS.hs
apache-2.0
969
80
67
160
419
212
207
-1
-1
-- | -- Module : Crypto.Hash.Types -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- -- Crypto hash types definitions -- {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-}...
vincenthz/cryptonite
Crypto/Hash/Types.hs
bsd-3-clause
4,928
0
17
1,335
932
518
414
62
0
{- (c) The AQUA Project, Glasgow University, 1994-1998 \section[TysPrim]{Wired-in knowledge about primitive types} -} {-# LANGUAGE CPP #-} -- | This module defines TyCons that can't be expressed in Haskell. -- They are all, therefore, wired-in TyCons. C.f module TysWiredIn module TysPrim( mkPrimTyConName...
nushio3/ghc
compiler/prelude/TysPrim.hs
bsd-3-clause
37,357
0
15
9,696
3,815
2,151
1,664
371
1
module Generate.JavaScript.Expression (generateDef) where import Control.Arrow (second) import Control.Monad.State (State, foldM) import qualified Data.List as List import qualified Data.Map as Map import Language.ECMAScript3.Syntax import AST.Expression.General as Expr (Main(..)) import AST.Expression.Optimized as O...
mgold/Elm
src/Generate/JavaScript/Expression.hs
bsd-3-clause
14,681
0
21
4,443
4,894
2,420
2,474
363
24
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Utils/Containers/Internal/PtrEquality.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# OPTIONS_HADDOCK hide #-} -- | Really unsafe pointer equality module Utils.Containers.Internal.PtrEquality (ptrEq, hetPtrEq) wh...
phischu/fragnix
tests/packages/scotty/Utils.Containers.Internal.PtrEquality.hs
bsd-3-clause
1,059
0
7
223
145
89
56
17
1
{-# LANGUAGE CPP #-} #ifdef __GLASGOW_HASKELL__ {-# LANGUAGE Trustworthy #-} #endif module System.Posix.Process.Internals ( pPrPr_disableITimers, c_execvpe, decipherWaitStatus, ProcessStatus(..) ) where import Foreign import Foreign.C import System.Exit import System.IO.Error import GHC.Conc (Signal) -...
jwiegley/ghc-release
libraries/unix/System/Posix/Process/Internals.hs
gpl-3.0
2,483
12
19
672
508
273
235
54
5
{- NOTE: This file is also used in the Compile tests. -} module RecordImport_Import where import RecordImport_Export f :: R -> R f (R i) = R i g :: Fields -> Fields g Fields { fieldFoo = a, fieldBar = b } = Fields { fieldFoo = a, fieldBar = b } showR :: R -> String showR (R i) = "R " ++ show i showFie...
beni55/fay
tests/RecordImport_Import.hs
bsd-3-clause
507
0
9
133
197
105
92
14
1
{-# LANGUAGE CPP #-} {-# LANGUAGE ViewPatterns #-} module Hpack.FormattingHints ( FormattingHints (..) , sniffFormattingHints #ifdef TEST , extractFieldOrder , extractSectionsFieldOrder , breakLines , unindent , sniffAlignment , splitField , sniffIndentation , sniffCommaStyle #endif ) where import Prelude ...
mitchellwrosen/hpack
src/Hpack/FormattingHints.hs
mit
3,851
0
18
766
1,135
606
529
77
4
<?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>Access Control Testing | ZAP Extension</title> <maps> <homeID>top</homeID> ...
kingthorin/zap-extensions
addOns/accessControl/src/main/javahelp/org/zaproxy/zap/extension/accessControl/resources/help_pl_PL/helpset_pl_PL.hs
apache-2.0
779
63
53
120
342
172
170
-1
-1
module HAD.Y2014.M04.D01.Solution where data Binary = A Binary | B Binary | Done deriving (Eq, Read, Show) -- | isCyclic Check if the Binary object is cyclic -- -- Examples -- >>> isCyclic $ A $ B $ Done -- False -- -- >>> :{ -- let -- x = A y -- y = B x -- in isCyclic x -- :} -- True -- isCyclic ...
1HaskellADay/1HAD
exercises/HAD/Y2014/M04/D01/Solution.hs
mit
399
0
6
105
70
48
22
8
1
{-# LANGUAGE BlockArguments #-} module BlockArguments where import Control.Monad foo :: IO () foo = when True do return () foo' :: IO () foo' = do forM [1 .. 10] \x -> print x forM [1 .. 10] \x -> do print x print x return () foo'' :: IO () foo'' = when do True do return ()
shlevy/ghc
testsuite/tests/parser/should_compile/BlockArguments.hs
bsd-3-clause
306
0
11
91
145
70
75
-1
-1
{-# LANGUAGE OverloadedStrings, StandaloneDeriving, RecordWildCards, GADTs, TypeFamilies, MultiParamTypeClasses, DeriveDataTypeable, FlexibleInstances #-} -- QSem was deprecated in 7.6, but no more {-# OPTIONS_GHC -fno-warn-deprecations #-} module FB.DataSource ( FacebookReq(..) , initGlobalState , Creden...
hiteshsuthar/Haxl
example/facebook/FB/DataSource.hs
bsd-3-clause
3,121
1
13
624
909
477
432
94
2
-- Error message in monomorphic case module ShouldFail where f = (*) -- Monomorphic g :: Num b => b -> b g x = f x x
urbanslug/ghc
testsuite/tests/typecheck/should_fail/tcfail131.hs
bsd-3-clause
125
0
6
36
42
24
18
4
1
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# OPTIONS_GHC -ddump-deriv #-} module GenDerivOutput where import GHC.Generics (Generic, Generic1) data List a = Nil | Cons { element :: a, rest :: List a } deriving (Generic, Generic1, Functor) data Rose a = Empty | Rose a (List (Rose a)) deri...
urbanslug/ghc
testsuite/tests/generics/GenDerivOutput.hs
bsd-3-clause
345
0
10
65
101
60
41
9
0
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} module Futhark.Pass.ExtractKernels.BlockedKernel ( DistRep, MkSegLevel, ThreadRecommendation (..), segRed, nonSegRed, segScan, segHist, segMap, mapKernel, KernelInput (..), readKer...
diku-dk/futhark
src/Futhark/Pass/ExtractKernels/BlockedKernel.hs
isc
7,894
0
21
1,863
2,563
1,306
1,257
214
2
module Building where data Building = Cursor | Grandma | Farm | Mine | Factory | Bank | Temple | WizardTower | Shipment | AlchemyLab | Portal | TimeMachine | Antimatter | Prism | Chancemaker | FractalEngine | JavascriptConsole deriving (Read, Show, Eq, Ord, Enum) buildingName :: Bu...
glguy/CookieCalculator
src/Building.hs
isc
848
0
7
221
205
113
92
40
17
module Exercise where type Node = Int type Graph = [(Node, [Node])] adjacentNodes :: Node -> Graph -> [Node] adjacentNodes _ [] = [] adjacentNodes n ((a, b):graph) | n == a = b | otherwise = adjacentNodes n graph isCycle :: [Node] -> Graph -> Bool isCycle nodes@(n:_) g | duplicates nod...
tcoenraad/functioneel-programmeren
2012/opg3c.hs
mit
728
0
10
216
327
172
155
18
1
{-# LANGUAGE OverloadedStrings #-} module Yesod.Auth.Message ( AuthMessage (..) , defaultMessage -- * All languages , englishMessage , portugueseMessage , swedishMessage , germanMessage , frenchMessage , norwegianBokmålMessage , japaneseMessage , finnishMessage , chine...
geraldus/yesod
yesod-auth/Yesod/Auth/Message.hs
mit
51,191
3
8
5,778
6,646
3,431
3,215
836
1
{-| Module : HSat.Make.Instances.Common.Clause Description : Provides functionality for creating random clauses Copyright : (c) Andrew Burnett 2014-2015 Maintainer : andyburnett88@gmail.com Stability : experimental Portability : Unknown Exports a function for creating random 'Clause' -} module HSat.Make.Ins...
aburnett88/HSat
src/HSat/Make/Instances/Common/Clause.hs
mit
2,011
0
12
463
397
204
193
37
2
module Zwerg.Geometry.Pathfinding (Path, findPath) where import Zwerg.Prelude import Zwerg.Data.GridMap import Zwerg.Data.Position import Data.Sequence (Seq, (|>), ViewR(..)) import qualified Data.Sequence as S (empty, viewr, null) import Lens.Micro.Platform (makeLenses, (%=), (.=), use, view) ----------------------...
zmeadows/zwerg
lib/Zwerg/Geometry/Pathfinding.hs
mit
2,953
0
15
700
835
434
401
-1
-1
module SpecHelper ( module Test.Hspec -- , module Text.Liquid.Parse ) where import Test.Hspec --import Text.Liquid.Parse
joshsz/raskell
test/SpecHelper.hs
mit
122
0
5
16
19
13
6
3
0
module Data.Functor.Extended ( module Data.Functor , forEach ) where import Data.Functor forEach :: Functor m => m a -> (a -> b) -> m b forEach = flip fmap
rubenmoor/skull
skull-server/src/Data/Functor/Extended.hs
mit
182
0
9
55
64
35
29
10
1
{-# LANGUAGE FlexibleContexts #-} --import Data.Ratio import qualified Data.Array.Repa as R import Data.Array.Repa.Index (Z, DIM2, ix2) import Data.Array.Repa.Algorithms.Matrix (mmultS) import Control.Monad (liftM) data Power = Power Double Double deriving (Show, Eq, Ord) dx :: Power -> Power dx (Power c p) = Power...
michaeljklein/LeechLatticeAnimation
Main.hs
mit
2,223
14
12
478
857
446
411
38
2
module Main where main :: IO () main = print $ "Ok"
evge-niy/learn_yesod
src/Main.hs
mit
53
0
6
13
23
13
10
3
1
newtype Compose f g a = Compose {getCompose :: f (g a)} deriving (Eq, Show) instance (Functor f, Functor g) => Functor (Compose f g) where fmap f (Compose fga) = Compose $ (fmap . fmap) f fga instance (Applicative f, Applicative g) => Applicative (Compose f g) where pure = Compose . pure . pure (Compose f) ...
diminishedprime/.org
reading-list/haskell_programming_from_first_principles/25_04.hs
mit
366
0
9
81
181
96
85
7
0
{-# LANGUAGE TemplateHaskell #-} module Network.GDAX.Test.Types where import Control.Lens import Network.GDAX.Implicit class HasSandbox a where sandbox :: Lens' a Gdax class HasLiveUnsigned a where liveUnsigned :: Lens' a Gdax data Env = Env { _envSandboxGdax :: Gdax ...
AndrewRademacher/gdax
test/Network/GDAX/Test/Types.hs
mit
514
0
8
126
117
64
53
15
0
{-# LANGUAGE OverloadedStrings #-} module Stock.Hash ( stHash ) where import Codec.Digest.SHA import Data.ByteString import qualified Data.ByteString.Base64 as Base64 import Data.String.Conv import Stock.Types toHash :: ByteString -> ByteString toHash = hash SHA51...
tattsun/stock
src/Stock/Hash.hs
mit
573
0
8
129
142
81
61
15
1
{-# LANGUAGE NoMonomorphismRestriction #-} import Diagrams.Prelude import Diagrams.Backend.SVG.CmdLine import Viz.Catalan import Viz.List import Viz.Lambda import Data.List import Data.Ord import Bijections import qualified Tamari as T import qualified Lambda as Lam import qualified Chapo as Ch main = do putStr ...
noamz/linlam-gos
src/Viz/TestTypes.hs
mit
1,502
0
24
344
703
366
337
29
4
{-# LANGUAGE RecordWildCards #-} module Shiva.Storage where import Shiva.Config import Shiva.Feeds import qualified Shiva.Table.ArticleContent as Content import qualified Shiva.Table.ArticleMetadata as Meta import Shiva.Translation import Control.Monad (void) ...
BlackBrane/shiva
src/Shiva/Storage.hs
mit
1,344
0
10
321
378
213
165
32
1