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 DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} ...
ublubu/shapes
shapes/src/Physics/Broadphase/Grid.hs
mit
4,986
0
13
1,369
1,489
807
682
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE GADTs #-} module Bench.ARec where import Data.Vinyl import Data.Vinyl.ARec.Internal import Data.Vinyl.Syntax () im...
VinylRecords/Vinyl
benchmarks/Bench/ARec.hs
mit
1,411
0
23
434
530
265
265
31
1
module Antiqua.Utils where select :: a -> a -> Bool -> a select f t b = if b then t else f (&&&) :: (a -> Bool) -> (a -> Bool ) -> a -> Bool (&&&) f g x = all id [f x, g x] (|@|) :: (a, b) -> c -> (a, b, c) (|@|) (x, y) z = (x, y, z) (.:) :: (a -> b) -> (x -> y -> a) -> x -> y -> b (.:) = (.) . (.) fold3 :: [a] ->...
olive/antiqua-prime
src/Antiqua/Utils.hs
mit
1,183
0
13
371
748
412
336
30
3
{-| Module : Bang Description : A Domain Specific Language for generating drum compositions Copyright : (c) Benjamin Kovach, 2014 License : MIT Maintainer : bkovach13@gmail.com Stability : experimental Portability : Mac OSX The Bang module exports the main functions to actually play a constructed composi...
5outh/Bang
src/Bang.hs
mit
3,526
0
16
880
780
401
379
71
3
{-# LANGUAGE TemplateHaskell #-} module UnitTest.CallbackParse.OptinCallback where import Data.Aeson (Value) import Data.Yaml.TH (decodeFile) import Test.Tasty as Tasty import Web.Facebook.Messenger import UnitTest.Internal ----------- -- OPTIN -- ----------- optinCallbackVal :: Value optinCallbackVal = $$(decode...
Vlix/facebookmessenger
test/UnitTest/CallbackParse/OptinCallback.hs
mit
669
0
11
175
115
66
49
-1
-1
{-# LANGUAGE OverloadedStrings #-} module DynamoDbEventStore.Paging (runStreamRequest ,FeedDirection(..) ,StreamResult(..) ,EventStartPosition(..) ,ReadStreamRequest(..) ,StreamOffset) where import DynamoDbEventStore.ProjectPrelude import qualified Test.QuickCheck as QC import quali...
adbrowne/dynamodb-eventstore
dynamodb-eventstore-web/src/DynamoDbEventStore/Paging.hs
mit
5,509
0
16
1,010
1,382
736
646
110
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANG...
schell/odin
odin-engine/src/Odin/Engine/Eff/Coroutine.hs
mit
2,230
0
14
674
682
343
339
49
4
module Problem5 where import Problem1 smallestMultipleOfAll :: [Int] -> Int smallestMultipleOfAll = foldl (\ acc x -> acc * (if acc `multipleOf` x then 1 else x `div` gcd acc x)) 1 problem5 :: IO () problem5 = print $ smallestMultipleOfAll [1..20]
Strikingwolf/project-euler
src/Problem5.hs
mit
254
0
12
48
98
56
42
8
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalyticsv2-applicationreferencedatasource-referenceschema.html module Stratosphere.ResourceProperties...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/KinesisAnalyticsV2ApplicationReferenceDataSourceReferenceSchema.hs
mit
4,646
0
13
268
356
209
147
36
1
module Tema_14b_PilaConListas_Spec (main, spec) where import Tema_14.PilaConListas import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = do describe "Tema_14b" $ do it "e1" $ show (apila 1 (apila 2 (apila 3 vacia))) `shouldBe` "1|2|3|-" it "e2" $ show (vacia :: Pila Int) `should...
jaalonso/I1M-Cod-Temas
test/Tema_14b_PilaConListas_Spec.hs
gpl-2.0
718
0
20
187
336
168
168
22
1
{-# LANGUAGE ExistentialQuantification #-} import Text.ParserCombinators.Parsec hiding (spaces) import System.Environment import Control.Monad import Control.Monad.Error import System.IO import Data.IORef data LispVal = Atom String | List [LispVal] | DottedList [LispVal] LispVal | Number Integ...
nabacg/hSchemeParser
src/schemeParser.hs
gpl-2.0
18,503
152
16
4,713
6,517
3,324
3,193
383
3
{-| Module : Cabal2Ebuild Copyright : (C) 2005, Duncan Coutts License : GPL-2+ Maintainer : haskell@gentoo.org A program for generating a Gentoo ebuild from a .cabal file -} -- This library is free software; you can redistribute it and/or -- modify it under the terms of the GNU General Public License -- as...
gentoo-haskell/hackport
Cabal2Ebuild.hs
gpl-3.0
5,792
0
16
1,994
1,154
637
517
81
10
-- | -- Copyright : (c) 2010, 2011 Benedikt Schmidt & Simon Meier -- License : GPL v3 (see LICENSE) -- -- Maintainer : Simon Meier <iridcode@gmail.com> -- Portability : GHC only -- -- Support for interaction with the console: argument parsing. {-# LANGUAGE TemplateHaskell #-} module Main.Console ( default...
rsasse/tamarin-prover
src/Main/Console.hs
gpl-3.0
7,752
0
18
1,999
1,397
786
611
143
2
-- | Example usage of the library. module Main where import Data.ML.DecisionTree import Data.ML.TestData.Disease import Text.PrettyPrint.ANSI.Leijen main :: IO () main = do let t = fitTree disease attrDisease Minimize (impurity `by` missclassificationError) NoPrune dataDisease print (pretty t) ...
schnecki/HaskellMachineLearning
src/Main.hs
gpl-3.0
433
0
12
80
123
65
58
10
1
module Test where f :: Int -> Int f x = x + 1 foreign export ccall f :: Int -> Int
leroux/testsuite
tests/rts/Test.hs
gpl-3.0
85
0
6
24
39
22
17
4
1
{-# LANGUAGE NamedFieldPuns #-} module LIR where import qualified Parser as P import qualified Analyzer as A import Data.Maybe import qualified Data.Map.Strict as Map import Data.List (mapAccumL, intercalate, findIndex, lookup) import Text.Printf import Debug.Trace data VReg = VReg { regsize :: Integer, regid :: In...
zc1036/Compiler-project
src/LIR.hs
gpl-3.0
17,026
0
16
5,064
5,350
2,883
2,467
228
9
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-bigquery/gen/Network/Google/Resource/BigQuery/RowAccessPolicies/GetIAMPolicy.hs
mpl-2.0
3,958
0
12
812
389
236
153
66
1
-- -*- hindent-style: "chris-done" -*- module Model.Paste where import Control.Lens import Crypto.Random import qualified Data.ByteString.Base16 as BH import qualified Data.Text as T import qualified Data.Text.Encoding as T import Data.Time import Import import Text.P...
learnyou/lypaste
Model/Paste.hs
agpl-3.0
3,472
0
14
1,179
608
320
288
-1
-1
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} module Data.Match where import Control.Applicative import Control.Monad import Data.Foldable import Data.Traversable import qualified Data.Logic as Logic data MatchExpr a = Match a | Not (MatchExpr a)...
bflyblue/tag
Data/Match.hs
unlicense
1,041
0
10
243
441
229
212
32
1
module Orlin.Types where import Control.Applicative import Data.Ratio import Data.Map.Strict( Map ) import qualified Data.Map.Strict as Map import Control.Monad.Trans.State import Control.Monad.Trans.Class import Orlin.Tokens( Pn ) import qualified Orlin.AS...
robdockins/orlin
src/Orlin/Types.hs
bsd-2-clause
13,446
1
30
4,210
4,697
2,362
2,335
274
17
{-# LANGUAGE OverloadedStrings #-} {- MSP430 instruction set. -} module Translator.Assembler.Target.MSP430 (Instr430(..), Suffix(..), Reg(..), Op(..), module Translator.Assembler.Directive) where import qualified Translator.Assembler.Directive as G import Translator.Expr...
hth313/hthforth
src/Translator/Assembler/Target/MSP430.hs
bsd-2-clause
3,781
0
15
1,511
1,462
766
696
82
0
----------------------------------------------------------------------------- -- | -- Module : XMonad.Util.WindowProperties -- Copyright : (c) Roman Cheplyaka -- License : BSD-style (see LICENSE) -- -- Maintainer : Roman Cheplyaka <roma@ro-che.info> -- Stability : unstable -- Portability : unportabl...
f1u77y/xmonad-contrib
XMonad/Util/WindowProperties.hs
bsd-3-clause
3,398
0
12
715
742
403
339
51
2
module Sexy.Instances.Monad () where import Sexy.Instances.Monad.Function () import Sexy.Instances.Monad.Maybe () import Sexy.Instances.Monad.Either () import Sexy.Instances.Monad.List () import Sexy.Instances.Monad.IO ()
DanBurton/sexy
src/Sexy/Instances/Monad.hs
bsd-3-clause
223
0
4
20
60
42
18
6
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE TypeInType #-} {-# ...
GaloisInc/saw-script
heapster-saw/src/Verifier/SAW/Heapster/archival/CtxPermImpl.hs
bsd-3-clause
4,825
0
12
936
772
432
340
-1
-1
{-# LANGUAGE Rank2Types #-} module HO where ho :: (forall a. f a -> a) -> f a -> a ho f = f -- This undefined should have type "forall a. f a -> a", but it has "f a -> a" -- which means either "forall f a. f a -> a" or "exists f a. f a -> a", both -- of which is wrong. f :: f a -> a f = ho undefined
sebastiaanvisser/ghc-goals
tests/HO.hs
bsd-3-clause
303
0
9
80
67
37
30
6
1
-- | Parsing and Printing NextStep style (old style) plist files module Text.NSPlist ( NSPlistValue(..), parseNSPlist, readNSPlistFromFile, showNSPlist, writeNSPlistToFile ) where import Text.Parsec (runParser) import Text.Parsec.Error (ParseError) import Text.PrettyPrint (render) import Tex...
plancalculus/nextstep-plist
Text/NSPlist.hs
bsd-3-clause
1,065
0
14
211
265
143
122
25
2
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} module Lambdasim.Simulation where import Control.Parallel.Strategies import Data.DeriveTH import Data.Record.Label import Data.Time (UTCTime) import Text.Printf (printf) import Prelude () import Lambdasim.Prelude import Lambdasim.Geographical import Lam...
jystic/lambdasim
src/Lambdasim/Simulation.hs
bsd-3-clause
2,607
0
12
684
887
470
417
74
2
module Main where import D16Lib import D16Lib.Parser as P import System.Environment (getArgs) main :: IO () main = do file <- head <$> getArgs parseResult <- P.parseFile file let endDancers = run dancers <$> parseResult putStrLn $ "p1: dancers after dance = " ++ (show endDancers) let c = cycleLength dancer...
wfleming/advent-of-code-2016
2017/D16/app/Main.hs
bsd-3-clause
627
0
12
125
202
101
101
15
1
----------------------------------------------------------------------------- -- | -- Module : Numeric.LinearAlgebra.Packed.ST -- Copyright : Copyright (c) 2010, Patrick Perry <patperry@gmail.com> -- License : BSD3 -- Maintainer : Patrick Perry <patperry@gmail.com> -- Stability : experimental -- -- Mutable pac...
patperry/hs-linear-algebra
lib/Numeric/LinearAlgebra/Packed/ST.hs
bsd-3-clause
882
0
5
198
69
53
16
12
0
{-# LANGUAGE BangPatterns, CPP, DeriveFunctor, ScopedTypeVariables #-} -- | This module allows for incremental decoding and encoding of CSV -- data. This is useful if you e.g. want to interleave I\/O with -- parsing or if you want finer grained control over how you deal with -- type conversion errors. -- -- Decoding e...
hvr/cassava
src/Data/Csv/Incremental.hs
bsd-3-clause
17,033
0
15
3,994
3,144
1,699
1,445
218
5
module Utilities.ParseByteString (parseByteString) where import Control.Applicative ((<$>)) import Data.Word import Data.Binary.Get import qualified Data.ByteString.Lazy as BS data Action m = A1 (m Word8) | A2 (m Word16) | A4 (m Word32) action 1 = A1 getWord8 action 2 = A2 getWord16be action 4 = A4 getWord32be actio...
ckkashyap/Chitra
Utilities/ParseByteString.hs
bsd-3-clause
1,045
0
12
206
458
238
220
26
1
import Data.Bits import Crypto.PubKey.ECC.Prim import Crypto.Types.PubKey.ECC import System.Random import System.IO.Unsafe add = pointAdd secp256r1 mul = pointMul secp256r1 secp256r1 = getCurveByName SEC_p256r1 rev (Point x y) = Point x (- y) point = Point 10 85 bl = Point 32 95 bl234 = mul 234 bl bl234rev = rev...
YoshikuniJujo/forest
subprojects/tls-analysis/ecc/testEcc.hs
bsd-3-clause
1,216
0
10
285
586
310
276
41
2
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} -- | -- Module : Data.Array.Nikola.Backend.CUDA.TH.Util -- Copyright : (c) Geoffrey Mainland 2012 -- License : BSD-style -- -- Maintainer : Geoffrey Mainland <mainland@apeiron.net> -- Sta...
mainland/nikola
src/Data/Array/Nikola/Backend/CUDA/TH/Util.hs
bsd-3-clause
3,929
0
16
832
1,230
658
572
-1
-1
{-# OPTIONS -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Bool -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stabi...
OS2World/DEV-UTIL-HUGS
libraries/Data/Bool.hs
bsd-3-clause
706
0
5
140
52
43
9
7
0
-- | -- Module : Simulation.Aivika.Lattice -- Copyright : Copyright (c) 2016-2017, David Sorokin <david.sorokin@gmail.com> -- License : BSD3 -- Maintainer : David Sorokin <david.sorokin@gmail.com> -- Stability : experimental -- Tested with: GHC 7.10.3 -- -- This module re-exports the library functionality rel...
dsorokin/aivika-lattice
Simulation/Aivika/Lattice.hs
bsd-3-clause
1,007
0
5
150
113
86
27
14
0
{-| Module : Data.Number.MPFR.Special Description : Special functions Copyright : (c) Aleš Bizjak License : BSD3 Maintainer : ales.bizjak0@gmail.com Stability : experimental Portability : non-portable For documentation on particular functions see <http://www.mpfr.org...
ekmett/hmpfr
src/Data/Number/MPFR/Special.hs
bsd-3-clause
13,527
0
26
4,425
5,214
2,661
2,553
281
1
module Main where import Control.Concurrent (forkIO, threadDelay) import Control.Concurrent.STM.TChan (TChan, dupTChan, newTChan, readTChan, writeTChan) import Control.Exception (bracket) import Control.Monad ...
haskellbr/yesod-fast-devel
Main.hs
bsd-3-clause
7,801
0
17
2,255
1,814
904
910
198
3
{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE PostfixOperators #-} {-# LANGUAGE NoImplicitPrelude #-} module CatEye.IOPrimitives where import qualified UTF8Prelude as P import qualified Control.Monad.Error as E import MPSUTF8 hiding (none_of, apply) import UTF8Pre...
nfjinjing/cateye
src/CatEye/IOPrimitives.hs
bsd-3-clause
2,113
6
9
388
693
376
317
54
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ViewPatterns #-} -- | Compile FFI definitions. module Fay.Compiler.FFI (emitFayToJs ,emitJsToFay ,compileFFIExp ,jsToFayHash ,fayToJsHash ,typeArity ) where import Fay.Co...
fpco/fay
src/Fay/Compiler/FFI.hs
bsd-3-clause
14,618
0
21
4,319
4,796
2,416
2,380
282
17
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Desugaring exporessions. -} {-# LANGUAGE CPP, MultiWayIf #-} {-# LANGUAGE TypeFamilies #-} module DsExpr ( dsExpr, dsLExpr, dsLExprNoLP, dsLocalBinds , dsValBinds, dsLit, dsSyntaxExpr ) where #include "HsV...
ezyang/ghc
compiler/deSugar/DsExpr.hs
bsd-3-clause
47,346
7
24
14,866
9,210
4,685
4,525
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Network.Syncthing.Types.Ignore ( Ignore(..) ) where import Control.Applicative ((<$>), (<*>)) import Control.Monad (MonadPlus (mzero)) import Data.Aeson (FromJSON, Value (..), parseJSON, (.:?)) import Data.Text ...
jetho/syncthing-hs
Network/Syncthing/Types/Ignore.hs
bsd-3-clause
697
0
10
216
181
110
71
16
0
{- (c) The University of Glasgow 2006 Functions for working with the typechecker environment (setters, getters...). -} {-# LANGUAGE CPP, ExplicitForAll, FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module TcRnMonad( module TcRnMonad, module TcRnTypes, module IOEnv ) where #...
green-haskell/ghc
compiler/typecheck/TcRnMonad.hs
bsd-3-clause
52,814
51
25
16,775
12,384
6,446
5,938
867
4
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -Wall -fwarn-tabs #-} ---------------------------------------------------------------- -- ~ 2021.10.17 -- | -- Module : Data.Number.LogFloat.IArrayTest -- Copyright : Copyright (c) 2007--2021 wren gayle romano -- License ...
wrengr/logfloat
test/Data/Number/LogFloat/IArrayTest.hs
bsd-3-clause
2,333
0
11
519
342
197
145
25
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} module Storage.InfluxDB where import Control.Exception (catch, throw) import Control.Monad (unless, when) import Data.Aeson (FromJSON (..), ToJ...
chemist/fixmon
src/Storage/InfluxDB.hs
bsd-3-clause
11,687
0
21
3,940
2,749
1,455
1,294
217
4
----------------------------------------------------------------------------- -- | -- Module : Data.SBV.BitVectors.Rounding -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Implementation of floating-point operations that know about ...
Copilot-Language/sbv-for-copilot
Data/SBV/BitVectors/Rounding.hs
bsd-3-clause
3,042
0
13
765
795
399
396
40
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE Arrows #-} {-# LANGUAGE OverloadedStrings #-} module Main where import Opaleye import Data.Profunctor.Product (p3) import Data.Profunctor.Product.Default import Database.PostgreSQL.Simple import Database.Postgr...
vacationlabs/haskell-webapps
doc/docs/opaleye/code/opaleye-select-with-condition.hs
mit
1,603
1
15
304
457
249
208
40
1
-- -- -- ----------------- -- Exercise 5.24. ----------------- -- -- -- module E'5'24 where pushRight :: String -> Integer -> String pushRight string lineLength = [ ' ' | currentLength <- [1 .. blankCount] ] ++ string where blankCount :: Integer blankCount = lineLength - (toInteger (length string)...
pascal-knodel/haskell-craft
_/links/E'5'24.hs
mit
1,156
0
14
362
243
137
106
17
1
head' (x:xs) = x drop' n [] = [] drop' 0 xs = xs drop' n (x:xs) = drop' (pred n) xs getName = do line <- getLine return line main = do line <- getName if line == "jojon" then putStrLn "ssakit" else main
squest/Zenx-trainer-training
haskell/teta.hs
epl-1.0
217
0
8
59
116
57
59
10
2
{-# LANGUAGE Rank2Types #-} {-| Implementation of the Ganeti Query2 filterning. The filtering of results should be done in two phases. In the first phase, before contacting any remote nodes for runtime data, the filtering should be executed with 'Nothing' for the runtime context. This will make all non-runtime filte...
narurien/ganeti-ceph
src/Ganeti/Query/Filter.hs
gpl-2.0
10,026
0
13
2,152
2,115
1,087
1,028
144
5
{-# OPTIONS -O2 -Wall #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Data.Store.Rev.Branch (Branch, new, move, curVersion, newVersion) where import Control.Monad (liftM) import Data.Store.Rev.Change (Change) import Data.Store.Rev.Version (Version) import Data.Store.Rev.ViewBranchInternal (BranchData(..), B...
alonho/bottle
src/Data/Store/Rev/Branch.hs
gpl-3.0
1,334
0
9
202
400
216
184
26
1
module GrLang.ReplIntegrationSpec (spec) where import System.Directory (listDirectory) import System.Exit (ExitCode (..)) import System.FilePath (takeBaseName, takeExtension) import System.Process (readProcessWithExitCode) import Test.Hspec spec :: Spec spec =...
rodrigo-machado/verigraph
tests/GrLang/ReplIntegrationSpec.hs
gpl-3.0
961
0
15
192
289
154
135
21
1
{-# LANGUAGE CPP #-} #if MIN_VERSION_transformers(0,5,6) ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.RWS.Strict -- Copyright : (c) Andy Gill 2001, -- (c) Oregon Graduate Institute of Science and Technology, 2001 -- License : B...
ekmett/mtl
Control/Monad/RWS/CPS.hs
bsd-3-clause
1,995
0
5
367
190
138
52
2
0
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module RouteTableSpec where #if __GLASGOW_HASKELL__ < 709 import Control.Applicative #endif import Control.Monad import Data.IP import Data.IP.RouteTable.Internal import Data.List (sort, nub) import Test.Hspec import Test.Hs...
DanielG/iproute
test/RouteTableSpec.hs
bsd-3-clause
2,526
0
14
563
821
422
399
55
2
{-# LANGUAGE ExistentialQuantification, KindSignatures, NoImplicitPrelude, StandaloneDeriving #-} {-# OPTIONS -Wall #-} -- | the components for constructing Orthotope Machine data flow draph. -- Most components take three arguments: -- -- [@vector :: * -> *@] The array dimension. It is a 'Vector' that --...
nushio3/Paraiso
Language/Paraiso/OM/Graph.hs
bsd-3-clause
4,516
0
12
1,119
1,068
604
464
79
2
{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples, BangPatterns #-} ----------------------------------------------------------------------------- -- | -- Module : Java.PrimitiveBase -- Copyright : (c) Rahul Muttineni 2016-2017 -- -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Ma...
rahulmutt/ghcvm
libraries/base/Java/PrimitiveBase.hs
bsd-3-clause
18,887
0
19
6,330
7,586
3,878
3,708
335
0
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Network.Helics ( HelicsConfig(..) , withHelics , sampler -- * metric , recordMetric , recordCpuUsage , recordMemoryUsage -- * transaction , TransactionType(..) , TransactionId , w...
dzotokan/helics
dummy/Network/Helics.hs
mit
3,247
0
10
793
792
428
364
87
1
module Language ( languageField , languageList ) where import Import languageField :: Field Handler Text languageField = selectFieldList languageList languageList :: [(Text, Text)] languageList = [ ("Afrikaans", "af") , ("Albanian", "sq") , ("Basque", "eu") , ("Belarusian", "be") , ("...
vaporware/carnival
Language.hs
mit
3,340
0
6
781
916
607
309
104
1
{-# LANGUAGE ScopedTypeVariables, RecursiveDo #-} import Data.Char import System.Environment import Control.Applicative import Text.Earley data Expr = Expr :+: Expr | Expr :*: Expr | Var String | Lit Int deriving (Show) grammar :: forall r. Grammar r (Prod r String Char Expr) grammar = mdo whitespace <- ...
bitemyapp/Earley
examples/Expr2.hs
bsd-3-clause
1,006
0
16
273
396
199
197
34
1
{-# LANGUAGE OverloadedStrings #-} -- | Convenience module for debugging streams. Provides stream transformers -- that wrap 'InputStream's and 'OutputStream's, sending a description of all -- data to an 'OutputStream' for debugging. module System.IO.Streams.Debug ( -- * Debuggers debugInput , debugOutput , debu...
LukeHoersten/io-streams
src/System/IO/Streams/Debug.hs
bsd-3-clause
4,042
0
14
1,240
712
381
331
66
2
import Yi -- Import the desired UI as needed. -- Some are not complied in, so we import none here. -- import Yi.UI.Vty (start) -- import Yi.UI.Pango (start) myConfig :: Config myConfig = defaultCuaConfig -- replace with defaultVimConfig or defaultCuaConfig defaultUIConfig :: UIConfig defaultUIConfig = configUI myCo...
coreyoconnor/yi
example-configs/yi-cua.hs
gpl-2.0
1,248
0
10
308
112
71
41
13
1
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} ...
sdiehl/ghc
testsuite/tests/indexed-types/should_compile/T9316.hs
bsd-3-clause
2,822
5
13
503
613
342
271
54
1
{-# LANGUAGE OverloadedStrings, CPP #-} module Haste.Timer (Timer, Interval (..), setTimer, stopTimer) where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative #endif import Control.Monad.IO.Class import Haste.Foreign import Haste.Events.Core type Identifier = Int -- | Timer handle. data Timer = Timer !Identifi...
jtojnar/haste-compiler
libraries/haste-lib/src/Haste/Timer.hs
bsd-3-clause
1,455
0
17
302
394
203
191
40
2
{-# LANGUAGE CPP #-} -- --------------------------------------------------------------------------- -- | -- Module : Data.Vector.Algorithms.Optimal -- Copyright : (c) 2008-2010 Dan Doel -- Maintainer : Dan Doel -- Stability : Experimental -- Portability : Portable -- -- Optimal sorts for very small array siz...
ssaavedra/liquidhaskell
benchmarks/vector-algorithms-0.5.4.2/Data/Vector/Algorithms/Optimal.hs
bsd-3-clause
13,173
0
32
6,816
2,498
1,175
1,323
175
24
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 ************************************************************************ * * \section[OccurAnal]{Occurrence analysis pass} * ...
urbanslug/ghc
compiler/simplCore/OccurAnal.hs
bsd-3-clause
76,124
0
16
21,190
8,018
4,377
3,641
564
7
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Eq -- Copyright : (c) The University of Glasgow 2005 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : ...
beni55/haste-compiler
libraries/ghc-7.8/base/Data/Eq.hs
bsd-3-clause
577
0
5
91
38
31
7
4
0
{-# LANGUAGE PatternSynonyms #-} module ShouldCompile where pattern Single{x} = [x] -- Selector selector :: Int selector = x [5] update :: [String] update = ["String"] { x = "updated" }
ezyang/ghc
testsuite/tests/patsyn/should_compile/records-compile.hs
bsd-3-clause
189
0
7
34
63
38
25
7
1
module Data.Binary.Format.DWG.ObjectMap (ObjectMap) where import Control.Applicative import Data.Binary import Data.Binary.Get (runGet) import qualified Data.Binary.Bits.Get as Bits import Data.Binary.Format.DWG.Types import Data.Binary.Format.DWG.Util import Data.Binary.Format.DWG.Bitcoded import qualified Data.Bina...
polachok/yodawg
src/Data/Binary/Format/DWG/ObjectMap.hs
isc
1,541
0
16
398
480
267
213
33
2
-- | Settings are centralized, as much as possible, into this file. This -- includes database connection settings, static file locations, etc. -- In addition, you can configure a number of different aspects of Yesod -- by overriding methods in the Yesod typeclass. That instance is -- declared in the Foundation.hs file....
nek0/yocage
Settings.hs
mit
5,163
0
12
1,388
676
388
288
-1
-1
-- | Transactional variables, for use with 'MonadSTM'. module Control.Concurrent.STM.CTVar ( -- * @CTVar@s CTVar , newCTVar , readCTVar , writeCTVar , modifyCTVar , modifyCTVar' , swapCTVar ) where import Control.Monad.STM.Class -- * @CTVar@s -- | Mutate the contents of a 'CTVar'. This is non-str...
bitemyapp/dejafu
Control/Concurrent/STM/CTVar.hs
mit
835
0
9
190
246
123
123
23
1
module VM.Core where import qualified Data.Bits as B import qualified Data.Vector as V data CPU a = CPU Int (V.Vector Int) (V.Vector Int) deriving (Eq) instance (Show a) => Show (CPU a) where show (CPU c rs _) = "CPU " ++ (show c) ++ " " ++ (show rs) data Arg a = Reg Int | Mem Int | Val a deriving (Show, Eq) da...
gabrielPeart/VM.hs
src/VM/Core.hs
mit
3,297
0
15
1,070
1,725
877
848
73
2
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.RTCDTMFToneChangeEvent (js_getTone, getTone, RTCDTMFToneChangeEvent, castToRTCDTMFToneChangeEvent, gTypeRTCDTMFToneChangeEvent) where import Prelude ((.), (==), (>>=), return, IO, Int, Float,...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/RTCDTMFToneChangeEvent.hs
mit
1,417
6
10
169
365
233
132
24
1
-- Parser (Syntax Analyzer) -- Version: 14/06/2017 module Parser where -- External imports import Control.Monad.IO.Class import Text.Parsec -- Internal imports import Lexer import Types import State -- ----------------------------------------------------------------------------- -- Parser to Tokens -- ---------------...
brenov/set
interpreter/Parser.hs
mit
10,906
0
12
2,255
3,502
1,908
1,594
172
4
module Main where import Static.Checker main :: IO () main = return ()
mooreniemi/pfpl
app/Main.hs
mit
73
0
6
15
29
16
13
4
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Web.TodoMVC.Servant.Shared ( Store, LnAPI, todoAPI, newBigS...
adarqui/todomvc-haskell-servant-purescript
haskell_src/Web/TodoMVC/Servant/Shared.hs
mit
2,177
0
29
508
624
331
293
51
1
{-# LANGUAGE TypeOperators #-} module Language.CL.C.Types.Pointer where import Language.CL.C.CodeGen.TypeRepr import Language.CL.C.HOAS.AST import Language.CL.C.Types.Classes import Language.CL.C.Types.Scalar data Pointer a = Pointer Int instance LangType a => LangType (Pointer a) where typeOf = mkPtrTR . typeOf ....
pxqr/language-cl-c
Language/CL/C/Types/Pointer.hs
mit
1,238
0
10
217
466
240
226
29
1
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-} {- | Module : $Header$ Description : Coding a description language into CASL Copyright : (c) Stef Joosten, Christian Maeder DFKI GmbH 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de S...
nevrenato/Hets_Fork
Comorphisms/Adl2CASL.hs
gpl-2.0
9,381
0
27
2,977
3,376
1,753
1,623
240
23
{-# LANGUAGE DeriveDataTypeable #-} module LexML.Linker.LexerPrim where import Text.HTML.TagSoup --import Text.HTML.TagSoup.Parser import qualified Data.Foldable as F import Data.Maybe import Data.Char import Data.Typeable import Control.Monad.Except import qualified Data.Set as S import Data.Word (Word8) import Codec...
lexml/lexml-linker
src/main/haskell/LexML/Linker/LexerPrim.hs
gpl-2.0
4,214
0
20
1,054
1,415
773
642
132
4
module Model ( NewAgentState , NewAgentMsg (..) , NewAgentEnvironment , NewAgentDef , NewAgentBehaviour , NewAgentIn , NewAgentOut , NewAgentObservable ) where import FRP.Chimera ------------------------------------------------------------------------------------------------------------------...
thalerjonathan/phd
coding/libraries/chimera/examples/ABS/NewAgents/Model.hs
gpl-3.0
1,099
0
5
153
125
76
49
19
0
module Carbon.Website.Files (serve) where {- This module serves the static files on the website which are located in /files/. It uses the Config.File module for configuration. -} import Control.Monad.State import Happstack.Server (Browsing(..), serveDirectory, Response) import qualified Happstack.Server as S imp...
runjak/carbon-adf
Carbon/Website/Files.hs
gpl-3.0
754
0
11
123
163
93
70
16
1
import Prelude hiding (catch) import System.Environment import System.IO import System.Directory import System.Posix.Files import Control.Monad import Control.Concurrent import Control.Exception import System.Console.Terminfo import Text.Printf import Data.Char (isDigit) readcontent :: String -> String readcontent x =...
bartavelle/progressbar
ProgressBar.hs
gpl-3.0
3,082
0
19
848
1,117
554
563
75
4
{-# LANGUAGE TemplateHaskell #-} import qualified Aws as Aws import qualified Aws.S3 as S3 import qualified Data.ByteString.Lazy as BL (hGetContents) import Data.Text (pack, unpack) import Control.Monad (when) import Data.Condui...
RayRacine/hs3
src/hs3.hs
gpl-3.0
4,875
0
20
1,306
1,483
744
739
120
3
{- CC_Clones - Classic games reimplemented © Callum Lowcay 2006-2011 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This prog...
CLowcay/CC_Clones
src/Tetris/GameState.hs
gpl-3.0
19,117
417
16
3,816
7,335
4,265
3,070
410
21
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-servicebroker/gen/Network/Google/Resource/ServiceBroker/GetIAMPolicy.hs
mpl-2.0
5,639
0
16
1,275
801
466
335
116
1
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} module Data.Func...
ntc2/haskell-call-trace
experiments/constraint-logic.hs
mpl-2.0
2,108
5
11
394
272
167
105
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/Users/SignOut.hs
mpl-2.0
4,740
0
19
1,165
717
418
299
104
1
{-# LANGUAGE TemplateHaskell #-} deriveFromJSON (unPrefix "assignPost") ''AssignmentPost
lspitzner/brittany
data/Test322.hs
agpl-3.0
89
0
7
8
18
8
10
2
0
{-# LANGUAGE OverloadedStrings #-} module Core.Request.ContentDispositionSpec where import Core.Request.ContentDisposition import qualified Misc.Parser as P import SpecHelper spec :: Spec spec = describe "Core.Request.ContentSpec" $ context "Simple parsing" $ it "...
inq/agitpunkt
spec/Core/Request/ContentDispositionSpec.hs
agpl-3.0
589
0
13
141
124
66
58
15
1
import Test.Hspec import Primes main :: IO() main = hspec $ do describe "Dummy" $ do it "dummy test 1" $ do (1 + 1) > 1 `shouldBe` True describe "Divisible" $ do it "Empty list" $ do divisible [] 1 `shouldBe` False divisible [] 2 `shouldBe` False divisible [] 3 `shouldBe` Fals...
orbitgray/ProjectEuler
haskell/common/Primes_test.hs
lgpl-3.0
2,036
0
17
603
1,055
631
424
32
1
module ItemLookup where import qualified Data.Map as Map import Data.Map (Map) itemLookup :: Map Int String itemLookup = Map.fromList [ (0, "Air") , (1, "Stone") , (2, "Grass Block") , (3, "Dirt") , (4, "Cobblestone") , (5, "Wood Planks") , (6, "Sapling") , (7, "Bedrock") , (8, "Wa...
Xandaros/MinecraftCLI
app/ItemLookup.hs
bsd-2-clause
12,957
0
7
3,727
4,200
2,797
1,403
467
1
{-# LANGUAGE TypeFamilies, QuasiQuotes, TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} module Yesod.Helpers.Crud ( Item (..) , Crud (..) , Crud...
chreekat/yesod
yesod-form/Yesod/Helpers/Crud.hs
bsd-2-clause
6,693
0
18
1,986
1,593
813
780
128
3
module Utils.Drasil.Phrase where import Language.Drasil import qualified Language.Drasil.Development as D import Control.Lens ((^.)) import Utils.Drasil.Sentence (sAnd, sOf) -- | Creates an NP by combining two 'NamedIdea's with the word "and" between -- their terms. Plural is defaulted to @(phrase t1) "of" (plural t...
JacquesCarette/literate-scientific-software
code/drasil-utils/Utils/Drasil/Phrase.hs
bsd-2-clause
6,306
0
11
1,267
2,145
1,118
1,027
97
1
module MB.Processors.Mathjax ( mathjaxProcessor ) where import qualified Text.Pandoc as Pandoc import MB.Types mathjaxProcessor :: Processor mathjaxProcessor = nullProcessor { applyWriterOptions = Just mathjaxOpts } mathjaxOpts :: Pandoc.WriterOptions -> Pandoc.WriterOptions mathjaxOpts...
jtdaugherty/mathblog
src/MB/Processors/Mathjax.hs
bsd-3-clause
416
0
8
86
82
48
34
10
1
module Test(main) where import TestGen import TestUtil import TestCustom -- Check that we managed to export everything _unused1 x = whenJust _unused2 x = (&&^) _unused3 x = system_ _unused4 x = word1 _unused5 x = readFile' _unused6 x = x :: Seconds main :: IO () main = runTests $ do testSetup tests tes...
ndmitchell/extra
test/Test.hs
bsd-3-clause
328
0
7
72
100
54
46
15
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAG...
music-suite/music-preludes
src/Music/Prelude/Instances.hs
bsd-3-clause
6,127
0
14
1,370
1,389
733
656
91
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[Id]{@Ids@: Value and constructor identifiers} -} {-# LANGUAGE CPP #-} -- | -- #name_types# -- GHC uses several kinds of name internally: -- -- * 'OccName.OccName': see "OccName#name_types" -- -- * 'RdrName.RdrNam...
forked-upstream-packages-for-ghcjs/ghc
compiler/basicTypes/Id.hs
bsd-3-clause
28,863
0
14
7,552
4,455
2,425
2,030
380
6
{-| Module : Data.Validation Copyright : (c) Marcin Mrotek, 2016 License : BSD3 Maintainer : marcin.jan.mrotek@gmail.com Stability : experimental Accumulating Either-like type. -} {-# LANGUAGE DeriveDataTypeable , DeriveFunctor , DeriveFoldable , DeriveGeneric #-} module Data.Validation (...
marcinmrotek/pipes-key-value-csv
src/Data/Validation.hs
bsd-3-clause
2,592
0
11
694
955
487
468
74
1
{-# LANGUAGE OverloadedStrings #-} module Analyzer.Checker where import System.FilePath.Find import System.FilePath.Posix import qualified Data.ByteString as BS import qualified Data.Map as M import Control.Applicative import qualified Data.ByteString.Char8 as BSC import Text.Regex import Data.Maybe(isJust) import qua...
marcmo/includeSpellChecker
src/Analyzer/Checker.hs
bsd-3-clause
3,929
0
14
850
1,488
785
703
77
3
-------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.EXT.CopyTexture -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- ------------------...
haskell-opengl/OpenGLRaw
src/Graphics/GL/EXT/CopyTexture.hs
bsd-3-clause
709
0
4
98
56
42
14
10
0
module GUI where import Run (run,numberOfImages) import ImageQuery ( ImageQueryStatement(GetImageQueryResult,SetImageQueryParameter), ImageQuery(ImageOfAverage,IslandImage,LineImage,TableQuery,AreaHistogram), Polarity(Dark,Bright), Orientation(Horizontal,Vertical), Channel(Red,Green,Blue), Imag...
phischu/pem-images
src/GUI.hs
bsd-3-clause
22,858
0
36
5,479
5,257
2,690
2,567
386
6
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE Trustworthy #-} {-# OPTIONS_HADDOCK show-extensions #-} {-| Module : $Header$ Co...
rimmington/eclogues
eclogues/src/Eclogues/API.hs
bsd-3-clause
9,925
0
23
2,009
2,462
1,360
1,102
156
3