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
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE Over...
rfranek/duckling
Duckling/Numeral/PT/Corpus.hs
bsd-3-clause
3,971
0
11
1,922
744
427
317
123
1
-- -- Copyright © 2013-2014 Anchor Systems, Pty Ltd and Others -- -- The code in this file, and the program it is a part of, is -- made available to you by its authors as open source software: -- you can redistribute it and/or modify it under the terms of -- the 3-clause BSD licence. -- {-# LANGUAGE CPP #-} module Ma...
anchor/rados-timestore
src/Store.hs
bsd-3-clause
2,848
0
16
991
530
272
258
56
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE NoImplicitPrelude #-} -- | Converts an OFX file to Copper transactions. -- -- Typically all you wil need is 'ofxImportProgram' and the types it -- uses as its arguments. U...
massysett/penny
penny/lib/Penny/OfxToCopper.hs
bsd-3-clause
14,927
0
15
3,074
3,014
1,634
1,380
264
3
module Privilege ( tryDropPrivilege ) where import Control.Applicative ( (<$>) ) import Data.IORef ( newIORef, readIORef , writeIORef ) import System.Posix.User ( getUserEntryForName, setUserID , userID, getRealUserID ) import Control.Monad ( join, unless ) -- Obtain an action that wi...
j3h/doc-review
src/Privilege.hs
bsd-3-clause
2,787
0
22
1,003
374
197
177
37
5
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE PatternGuards #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} -- | This module implements a high-level view of the ...
TomMD/irc-core
src/Irc/Model.hs
bsd-3-clause
47,820
0
21
14,410
12,755
6,499
6,256
1,148
138
module Main where import CsvToJson.Core (parseCsvToJson) main :: IO () main = parseCsvToJson
ulisses-alves/csv-to-json
app/Main.hs
bsd-3-clause
95
0
6
15
29
17
12
4
1
-- | Utility functions. module OANDA.Internal ( module X ) where import OANDA.Internal.Import as X import OANDA.Internal.Request as X import OANDA.Internal.Types as X
jdreaver/oanda-rest-api
src/OANDA/Internal.hs
bsd-3-clause
173
0
4
29
37
27
10
5
0
module Sharc.Instruments.AltoFlute (altoFlute) where import Sharc.Types altoFlute :: Instr altoFlute = Instr "altoflute_vibrato" "Alto Flute" (Legend "McGill" "2" "5") (Range (InstrRange (HarmonicFreq 1 (Pitch 195.99 43 "g3")) (Pitch 195.99 43 "g3") (Amplitu...
anton-k/sharc-timbre
src/Sharc/Instruments/AltoFlute.hs
bsd-3-clause
32,174
0
15
9,337
12,143
6,290
5,853
1,110
1
{- | Cabal support for creating Mac OSX application bundles. GUI applications on Mac OSX should be run as application /bundles/; these wrap an executable in a particular directory structure which can also carry resources such as icons, program metadata, images, other binaries, and copies of shared libraries. This mod...
mchinen/cabal-macosx
Distribution/MacOSX.hs
bsd-3-clause
7,527
0
18
1,900
1,153
582
571
109
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} module Ivory.BSP.STM32.Driver.CAN ( canTower ) where import Control.Monad (forM, forM_) import Ivory.Language import Ivory.Stdlib import Ivory.Tower imp...
GaloisInc/ivory-tower-stm32
ivory-bsp-stm32/src/Ivory/BSP/STM32/Driver/CAN.hs
bsd-3-clause
6,553
0
35
1,974
1,879
916
963
131
1
----------------------------------------------------------------------------- -- -- Module : Code.Generating.Utils.Syntax.Names -- Copyright : (c) 2011 Lars Corbijn -- License : BSD-style (see the file /LICENSE) -- -- Maintainer : -- Stability : -- Portability : -- -- | -- -----------------------------...
Laar/CodeGenerating
src/Code/Generating/Utils/Syntax/Names.hs
bsd-3-clause
2,335
0
18
514
652
355
297
46
5
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE PatternGuards, ViewPatterns, TupleSections #-} module Development.Shake.Internal.FilePattern( -- * Primitive API, as exposed FilePattern, (?==), (<//>), -- * General API, used by other people. filePattern, -- * Optimisation opportunities simple, (?==*), ...
ndmitchell/shake
src/Development/Shake/Internal/FilePattern.hs
bsd-3-clause
12,475
0
20
2,965
3,903
2,071
1,832
189
6
-- The @FamInst@ type: family instance heads {-# LANGUAGE CPP, GADTs #-} module FamInst ( FamInstEnvs, tcGetFamInstEnvs, checkFamInstConsistency, tcExtendLocalFamInstEnv, tcLookupDataFamInst, tcLookupDataFamInst_maybe, tcInstNewTyCon_maybe, tcTopNormaliseNewTypeTF_maybe, newFam...
tjakway/ghcjvm
compiler/typecheck/FamInst.hs
bsd-3-clause
25,802
0
17
7,345
4,383
2,313
2,070
-1
-1
main = do x <- getLine if x == "42" then return () else do putStrLn x main
paramsingh/codechef-solutions
src/practice/test.hs
mit
131
0
10
74
42
19
23
7
2
{-# LANGUAGE LambdaCase, ScopedTypeVariables #-} module GLHelpers ( getGLStrings , getGLExtensionList , traceOnGLError , throwOnGLError , getCurTex2DSize , disableVAOAndShaders , Transparency(..) , s...
blitzcode/rust-exp
hs-src/GLHelpers.hs
mit
5,254
0
17
1,342
1,425
744
681
113
3
{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2011-2015 John MacFarlane <jgm@berkeley.edu> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) a...
mindriot101/pandoc
src/Text/Pandoc/SelfContained.hs
gpl-2.0
7,140
0
19
1,932
2,071
1,065
1,006
132
7
{-# OPTIONS_GHC -fno-warn-unused-imports #-} -- disable warning for unused imports, need to import Arbitrary instances module Agent.Ageing ( prop_agent_ageing , prop_agent_dieOfAge ) where import Data.Maybe import Test.Tasty.QuickCheck as QC import Agent.Agent import SugarScape.Agent.Ageing import SugarScape.A...
thalerjonathan/phd
thesis/code/sugarscape/src/test/Agent/Ageing.hs
gpl-3.0
1,689
0
11
397
330
184
146
31
1
{-# LANGUAGE TupleSections, PatternGuards, BangPatterns, TypeSynonymInstances, FlexibleInstances, FlexibleContexts #-} module Language.Java.Paragon.TypeCheck.Monad ( {- check, checkM, ignore, orElse, maybeM, withFold, withFoldMap, getReturn, extendVarEnvList, extendVarEnv, lookupPre...
bvdelft/parac2
src/Language/Java/Paragon/TypeCheck/Monad.hs
bsd-3-clause
37,627
0
36
12,271
7,217
3,710
3,507
453
17
module Language.JsonGrammar.Util where import Control.Monad ((>=>), MonadPlus(..)) manyM :: (Monad m, MonadPlus m) => (a -> m a) -> a -> m a manyM m x = (m >=> manyM m) x `mplus` return x
MedeaMelana/JsonGrammar2
src/Language/JsonGrammar/Util.hs
bsd-3-clause
190
0
9
37
99
55
44
4
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} import Data.Monoid ((<>)) import Data.Aeson (FromJSON, ToJSON) import GHC.Generics import Web.Scotty data User = User { userId :: Int, userName :: String } deriving (Show, Generic) instance ToJSON User instance FromJSON User bob :: User bob = User { u...
ryoia/practical-haskell
04-rest-api/src/Assignments.hs
bsd-3-clause
946
0
17
231
325
167
158
31
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
kim/amazonka
amazonka-cloudfront/gen/Network/AWS/CloudFront/GetStreamingDistributionConfig.hs
mpl-2.0
4,654
0
11
901
520
312
208
64
1
{-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} #ifndef MIN_VERSION_profunctors #define MIN_VERSION_profunctors(x,y,z) 1 #endif #if __GLASGOW_HASKELL__ < 708 || !(MIN_VERSION_profunctors(4,4,0)) {-# LANGUAGE T...
danidiaz/lens
src/Control/Lens/Fold.hs
bsd-3-clause
91,384
0
17
21,309
11,592
6,878
4,714
-1
-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="sl-SI"> <title>OpenAPI Support Add-on</title> <maps> <homeID>openapi</homeID> <mapref l...
thc202/zap-extensions
addOns/openapi/src/main/javahelp/org/zaproxy/zap/extension/openapi/resources/help_sl_SI/helpset_sl_SI.hs
apache-2.0
971
82
53
157
396
209
187
-1
-1
{-# LANGUAGE CPP #-} import GetURL import Control.Concurrent #if __GLASGOW_HASKELL__ < 706 import ConcurrentUtils (forkFinally) #endif import Control.Exception import qualified Data.ByteString as B import Control.Concurrent.STM ----------------------------------------------------------------------------- -- Our Asyn...
prt2121/haskell-practice
parconc/geturls7.hs
apache-2.0
1,849
1
14
348
630
316
314
43
2
import System.Process (readProcessWithExitCode) import System.Exit (ExitCode(ExitSuccess)) import System.IO.Unsafe (unsafeInterleaveIO) import Data.List (intercalate) import Utils (stringsFromStatus, Hash(MkHash)) import Data.Maybe (fromMaybe) import Control.Applicative ((<$>)) {- Git commands -} successOrNothing ::...
TiddoLangerak/zsh-git-prompt
src/Main.hs
mit
1,136
3
13
177
362
192
170
27
2
{-# LANGUAGE RankNTypes, ImplicitParams, UnboxedTuples #-} -- Test two slightly exotic things about type signatures module ShouldCompile where -- The for-all hoisting should hoist the -- implicit parameter to give -- r :: (?param::a) => a r :: Int -> ((?param :: a) => a) r = error "urk" -- The unboxed ...
lukexi/ghc
testsuite/tests/typecheck/should_compile/tc145.hs
bsd-3-clause
457
0
8
116
68
43
25
7
1
module LayoutIn1 where --Layout rule applies after 'where','let','do' and 'of' --In this Example: rename 'sq' to 'square'. sumSquares x y= sq x + sq y where sq x= x^pow --There is a comment. pow=2
mpickering/ghc-exactprint
tests/examples/transform/LayoutIn1.hs
bsd-3-clause
236
0
7
73
46
25
21
3
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} -- ---------------------------------------------------------------------------- -- -- (c) The University of Glasgow 2006 -- -- Fingerprints for recompilation checking and ABI versioning, and -- implementing fast comparison of Typeable. -- -- ------------...
jtojnar/haste-compiler
libraries/ghc-7.8/base/GHC/Fingerprint/Type.hs
bsd-3-clause
615
0
7
76
63
42
21
7
0
{-# LANGUAGE OverloadedStrings #-} module Lib ( dnsimpleMain ) where import Data.Bool import qualified Data.ByteString.Char8 as C import qualified Data.Map.Strict as Map import Data.Maybe (fromJust) import GHC.Generics import Options.Applicative (customExecParser) import System.Environment (getArgs, getEnv) ...
dxtr/dnsimple
src/Lib.hs
isc
2,267
0
12
568
731
373
358
52
3
-- Kind Polymorphism -- The regular value level function which takes a function and applies it to an argument is universally generalized over in the usual Hindley-Milner way. app :: forall a b. (a -> b) -> a -> b app f a = f a -- But when we do the same thing at the type-level we see we lose information about the po...
Airtnp/Freshman_Simple_Haskell_Lib
Intro/WIW/Promoted/KindPolymorphism.hs
mit
3,570
0
10
825
594
342
252
-1
-1
module Util where import Control.Monad import Control.Monad.State import Control.Monad.List -- a generic counter freshInt :: Monad m => StateT Int m Int freshInt = do x <- get () <- put (x+1) return x freshInts :: Monad m => Int -> StateT Int m [Int] freshInts 0 = return [] freshInts k = do x <- freshInt x...
noamz/linlam-gos
src/Util.hs
mit
357
0
10
78
162
81
81
15
1
{-# LANGUAGE ExistentialQuantification #-} module Scheme48.Interpreter ( eval , primitiveBindings ) where import System.IO import Control.Monad.Except import Text.ParserCombinators.Parsec (Parser, parse) import Scheme48.Core import Scheme48.Parser (readExpr, readExprList) import Scheme48.Environment data ...
mpitid/scheme48
src/Scheme48/Interpreter.hs
mit
11,870
0
14
2,555
4,103
2,124
1,979
224
3
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn...
jcristovao/persistent
persistent-template/Database/Persist/TH.hs
mit
58,887
0
23
17,368
14,794
7,760
7,034
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Main where import Criterion.Main import qualified Dissent.Crypto.Rsa as R import qualified Data.ByteString as BS recrypt :: R.KeyPair -> BS.ByteString -> IO BS.ByteString recrypt pair secret = do encrypted <- R.encrypt (R.public pair) secret R.decrypt (R.private pair) e...
solatis/dissent
bench/Crypto.hs
mit
1,775
0
14
661
544
271
273
37
1
{-# htermination (lookup :: MyBool -> (List (Tup2 MyBool a)) -> Maybe a) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Tup2 a b = Tup2 a b ; data Maybe a = Nothing | Just a ; esEsMyBool :: MyBool -> MyBool -> MyBool esEsMyBool MyFalse MyFalse = MyTru...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/lookup_2.hs
mit
835
0
9
188
341
183
158
20
1
{-# LANGUAGE DeriveDataTypeable #-} {- Copyright (C) 2012-2014 Kacper Bak, Jimmy Liang <http://gsd.uwaterloo.ca> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including ...
juodaspaulius/clafer-old-customBNFC
src/Language/Clafer/ClaferArgs.hs
mit
8,812
0
13
1,923
1,586
859
727
117
6
-- | Function module {-# LANGUAGE UnicodeSyntax #-} module Test.Function where import Data.Foldable (toList) import Data.Maybe (catMaybes) import Data.Proof (base1) import Data.TSTP import T2A.Core import Test.Proof func1 ∷ [Formula] func1 = do ...
agomezl/tstp2agda
test/Test/Function.hs
mit
567
0
9
150
152
85
67
18
1
{-# LANGUAGE FlexibleInstances #-} {- | Module : HaskBF.Tape Description : Implement the brainfuck tape Copyright : (c) Sebastian Galkin, 2014 License : MIT Maintainer : paraseba@gmail.com Stability : experimental Provides a type and operations to implement the brainfuck tape. The tape has the concept o...
paraseba/haskell-brainfuck
src/HaskBF/Tape.hs
mit
3,479
0
9
854
662
361
301
57
1
{-# LANGUAGE TypeFamilies, PatternGuards, CPP #-} module Yesod.Core.Internal.LiteApp where #if __GLASGOW_HASKELL__ < 710 import Data.Monoid #endif #if !(MIN_VERSION_base(4,11,0)) import Data.Semigroup (Semigroup(..)) #endif import Yesod.Routes.Class import Yesod.Core.Class.Yesod import Yesod.Core.Class.Dispatch import...
psibi/yesod
yesod-core/Yesod/Core/Internal/LiteApp.hs
mit
2,700
0
14
615
930
488
442
69
2
module Language.Haskell.Format.HIndent ( autoSettings , formatter , defaultFormatter ) where import Data.ByteString.Builder import Data.ByteString.Lazy as L import qualified Data.Text as Text import Data.Text.Encoding as Encoding im...
danstiner/hfmt
src/Language/Haskell/Format/HIndent.hs
mit
1,942
0
17
531
457
248
209
50
3
import Data.Function(on) -- IV) First qst s :: (a -> a -> Ordering) -> [a] -> [a] s _ [] = [] s cmp (x:xs) = (s cmp $ filter lessThanX xs) ++ x : (s cmp $ filter (not . lessThanX) xs) where lessThanX = (\y -> (cmp y x) == LT) -- IV) Second qst -- s (compare `on` length) ["xjkh", "jfh", "dgj", ...
NMouad21/HaskellSamples
HaskellFinalExIV.hs
mit
352
0
11
98
154
80
74
5
1
module Main where import Graphics.Rendering.Chart import Graphics.Rendering.Chart.Backend.Diagrams import Control.Lens import Data.Default.Class import Data.List import Data.Complex import ComplexShapes import ComplexPlots import Mappings intercircle :: Polygon intercircle = fmap (zeroOut 0.01) $ circle...
ChristoSilvia/conform
src/Main.hs
mit
621
0
10
112
182
98
84
23
1
{-# LANGUAGE RankNTypes, ImpredicativeTypes, ScopedTypeVariables, FlexibleContexts #-} module State.Operations where import Control.Applicative import Control.Arrow import Control.Lens import Control.Monad import Control.Monad.State import Data.Functor.Ident...
mplamann/magic-spieler
src/State/Operations.hs
mit
20,141
0
22
4,411
5,815
2,904
2,911
-1
-1
module Main (main) where import Test.Tasty (defaultMain, testGroup) import qualified Test.Parser.SPF as TPS main :: IO () main = defaultMain tests tests = testGroup "Collected" [ TPS.tests ]
ilexius/spf-ips
tests/tests.hs
gpl-3.0
195
0
7
32
64
38
26
6
1
{- Copyright 2012 Dustin DeWeese This file is part of peg. peg 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. peg i...
HackerFoo/peg
Peg.hs
gpl-3.0
3,347
0
23
982
1,166
589
577
84
6
{-# LANGUAGE CPP, DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : Hie.Language.Haskell.Exts.SrcLoc -- Copyright : (c) Niklas Broberg 2009 -- License : BSD-style (see the file LICENSE.txt) -- -- Maintainer : Niklas Broberg, d00n...
monsanto/hie
Hie/Language/Haskell/Exts/SrcLoc.hs
gpl-3.0
5,813
0
10
1,266
1,182
665
517
83
2
module Model.Classes where import qualified Linear as L import Model.Types class Transformable a where translationVector :: a -> TransformationVector rotationVector :: a -> TransformationVector scaleVector :: a -> TransformationVector mkTransMat :: a -> TransformationMa...
halvorgb/AO2D
src/Model/Classes.hs
gpl-3.0
1,165
0
13
589
353
183
170
26
0
module CircuitDiagram (circuitToSvg) where import Prelude import Diagrams.Prelude import Diagrams.Backend.SVG import Graphics.SVGFonts import Data.List (foldl') import Circuit lWidth, targetRad, charSize, ctrlRad, colSpace :: Double lWidth = 0.07 targetRad = 0.5 charSize = 1 ctrlRad = 0.2 colSpace = 0.2 -- | Tak...
aparent/jcc
src/CircuitDiagram.hs
gpl-3.0
4,461
0
14
1,579
1,670
848
822
101
8
module SpecHelper ( module Test.Hspec , module TruthTable ) where import Test.Hspec import TruthTable
adamschoenemann/truth-table
test/SpecHelper.hs
gpl-3.0
114
0
5
26
24
16
8
5
0
-- Find the last element of a list -- myLast [1,2,3,4] -> 4 -- myLast ['x', 'y', 'z'] -> 'z' myLast :: [a] -> a myLast [a] = a myLast (_:xs) = myLast xs -- Find the last but on element of a list -- myButLast [1,2,3,4] -> 3 -- myButLast ['x', 'y', 'z'] -> 'y' myButLast :: [a] -> a myButLast (x:[_]) = x myButLast (_:x...
muralikrishna8/Haskell-problems
lists.hs
gpl-3.0
1,475
1
12
319
543
292
251
32
2
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid 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 Lice...
karamellpelle/grid
source/Game/Run/RunWorld/Face.hs
gpl-3.0
1,482
0
5
318
144
98
46
36
1
{- | Module : $Header$ Description : Benchmark for Crypto.Phec.Primes. Copyright : 2015 Stian Ellingsen <stian@plaimi.net> License : LGPL-3 Maintainer : Stian Ellingsen <stian@plaimi.net> -} module Crypto.Phec.PrimesBench (benchmarks) where import Crypto.Phec.Primes (isGermainPrime') import Math.Numbe...
stiell/phec
benchmark/Crypto/Phec/PrimesBench.hs
gpl-3.0
1,011
0
12
211
311
170
141
20
1
module Lib ( run1 , run2 ) where -- express any monoid as a list in some "language" runMonoid :: Monoid b => (a -> b) -> [a] -> b runMonoid f [] = mempty runMonoid f (a:as) = mappend (f a) (runMonoid f as) data Move = Back Integer | Forth Integer moves = [Forth 7, Forth 3, Back 1, Forth 2, Back 19] inst...
aztecrex/haskell-experiments-free-monoid
src/Lib.hs
unlicense
602
0
8
147
279
148
131
19
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QGraphicsPathItem_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:25 Warning : this file is machine generate...
uduki/hsQt
Qtc/Gui/QGraphicsPathItem_h.hs
bsd-2-clause
98,020
0
18
20,810
30,658
14,667
15,991
-1
-1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QBoxLayout.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:30 Warning : this file is machine generated - do no...
keera-studios/hsQt
Qtc/Gui/QBoxLayout.hs
bsd-2-clause
32,997
0
16
5,444
10,827
5,490
5,337
-1
-1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} import Control.Exception import Control.Monad.Writer.Lazy import Data.List import Data.Version import Development.GitRev (gitCo...
kmate/HaRe
src/MainHaRe.hs
bsd-3-clause
10,213
82
18
3,513
2,082
1,059
1,023
233
2
module Main where import System.IO import System.Exit import Data.Lectures import Data.DB import Timetabling {- | 'main' is the main-function of spiritcore -} main :: IO () main = do let loL = mkListOfLectures timetable lectures wishList allRooms let allOneLP = mkAllOneLecturePossibilities startLectureList ...
spirit-fhs/core
SpiritCore.hs
bsd-3-clause
4,475
0
14
1,789
892
395
497
90
1
module ProjectEuler.Problem203 (solution203) where import Data.List import Data.Numbers.Primes import Util pascal :: [[Integer]] pascal = iterate (map sum . clump 2 . (:) 0 . flip (++) [0]) [1] squareFree :: Integer -> Bool squareFree = all (== 1) . map length . group . primeFactors genericSolution203 :: Int -> Int...
guillaume-nargeot/project-euler-haskell
src/ProjectEuler/Problem203.hs
bsd-3-clause
464
0
10
77
172
94
78
12
1
module Exercises.ChapterSevenSpec ( spec ) where -- import Control.Exception (evaluate) import Test.Hspec import Test.QuickCheck import Exercises.ChapterSeven spec :: Spec spec = describe "Chapter Seven" $ do describe "channel" $ do it "chop8 equals mychop8" $ property $ \l -> chop8 l == mychop8 l ...
philipcraig/hutton
test/Exercises/ChapterSevenSpec.hs
bsd-3-clause
1,355
0
16
358
475
265
210
26
1
{-# LANGUAGE DeriveDataTypeable, TypeFamilies, CPP #-} -- | -- Module : Data.UUID -- Copyright : (c) 2008-2009, 2012 Antoine Latter -- (c) 2009 Mark Lentczner -- -- License : BSD-style -- -- Maintainer : aslatter@gmail.com -- Stability : experimental -- Portability : portable module Data.U...
necrobious/uuid
Data/UUID/Internal.hs
bsd-3-clause
10,254
0
21
2,978
2,659
1,427
1,232
173
4
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE RecordWildCards #-} module Main where import Control.Monad.Reader import Control.Monad.Except import Control.Concurrent.Async import Control.Exception ( throwIO ) import Data.Aeson import Data.Pool import quali...
kevin-li-195/books
webservice/Main.hs
bsd-3-clause
3,213
0
19
697
919
494
425
87
2
{-# LANGUAGE OverloadedStrings #-} module Web.XING.API.Error ( mapError , handleError , handleStatusCodeException ) where import Web.XING.Types import Network.HTTP.Types (ResponseHeaders) import Data.Maybe (fromMaybe) import qualified Data.ByteString.Lazy.Char8 as BSL import qualified Data.ByteS...
JanAhrens/xing-api-haskell
lib/Web/XING/API/Error.hs
bsd-3-clause
2,726
0
11
552
585
313
272
53
2
module Scurry.Console.Parser ( parseConsole ) where import Text.Parsec import Text.Parsec.String import Scurry.Util import Scurry.Types.Network import Scurry.Types.Console parseConsole :: String -> Either ParseError ConsoleCmd parseConsole = parse consoleCmd "Console" consoleCmd :: Parser ConsoleCmd consoleCmd =...
dmagyar/scurry
src/Scurry/Console/Parser.hs
bsd-3-clause
1,833
0
14
543
535
262
273
61
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} module Language.Haskell.Liquid.Bare.Plugged ( makePluggedSigs , makePluggedAsmSigs , makePluggedDataCons ) where import DataCon import Module import Name import NameSet import TyCon import Type (expandTypeSynonyms) import Var import Control....
abakst/liquidhaskell
src/Language/Haskell/Liquid/Bare/Plugged.hs
bsd-3-clause
5,503
0
22
1,741
2,103
1,091
1,012
103
16
-- | Generators for "Prelude" types. -- -- This module also contains function generators, like 'function1' and -- 'function2'. These generate random functions. To use these, get a -- coarbitrary function from one of the modules whose name ends in -- @Coarbitrary@ or by using the QuickCheck 'coarbitrary' function, -- ...
massysett/barecheck
lib/Prelude/Generators.hs
bsd-3-clause
2,702
0
17
763
1,329
680
649
61
1
{-The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations of one another. There are no arithmetic sequences made up of three 1-, 2-, or 3-digit primes, exhibiting this ...
bgwines/project-euler
src/solved/problem49.hs
bsd-3-clause
1,252
9
12
231
348
191
157
21
1
{-# LANGUAGE TupleSections #-} module System.Metrics.Prometheus.Metric.Histogram ( Histogram , HistogramSample (..) , Buckets , UpperBound , new , observe , sample , observeAndSample ) where import Control.Applicative ((<$>)) import C...
LukeHoersten/prometheus
src/System/Metrics/Prometheus/Metric/Histogram.hs
bsd-3-clause
1,841
0
13
538
474
265
209
50
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 HsTypes: Abstract syntax: user-defined types -} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeSynonymInstance...
vikraman/ghc
compiler/hsSyn/HsTypes.hs
bsd-3-clause
51,142
1
17
13,131
8,516
4,577
3,939
536
7
{-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DoAndIfThenElse #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE ScopedTypeVariables #-} ------------------------...
emilaxelsson/ag-graph
src/DagSimple.hs
bsd-3-clause
6,757
0
19
1,853
1,450
771
679
92
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} -------------------------------------------------------------------------------- -- | -- Module : Life.Simulation -- Copyright : (C) 2013 Sam Fredrickson -- License : BSD-style (see "LICENSE" file) -- Maintainer : Sam Fredrickson <...
kinghajj/Life
src/Life/Simulation.hs
bsd-3-clause
2,618
0
17
662
664
360
304
52
2
-- | Export Module for SSTG.Core.Preprocessing module SSTG.Core.Preprocessing ( module SSTG.Core.Preprocessing.Defunctionalization ) where import SSTG.Core.Preprocessing.Defunctionalization
AntonXue/SSTG
src/SSTG/Core/Preprocessing.hs
bsd-3-clause
200
0
5
25
25
18
7
3
0
module Main where import Data.Version (showVersion) import Git.Freq import Options.Applicative import qualified Paths_git_freq (version) filePaths :: Parser [FilePath] filePaths = many (argument str (metavar "PATH..." <> help "Target paths")) version :: Parser (a -> a) versi...
fujimura/git-freq
src/Main.hs
bsd-3-clause
850
0
14
241
200
105
95
19
1
{-# LANGUAGE Rank2Types, ViewPatterns, TypeFamilies, DeriveFunctor, GeneralizedNewtypeDeriving #-} module Data.Graphics.Scene ( -- * Scene Rendering(..) , Intensive(..) , VFX(..) , vfx , withVertices , drawPrimitive , applyMatrix , vertices , foggy , embedIO , Scene(..) -- * Picture , Pictu...
fumieval/audiovisual
src/Data/Graphics/Scene.hs
bsd-3-clause
4,987
1
16
1,125
2,232
1,150
1,082
135
1
-- | An implementation of the International Geomagnetic Reference Field, as defined at <http://www.ngdc.noaa.gov/IAGA/vmod/igrf.html>. module IGRF ( MagneticModel(..) , igrf11 , igrf12 , igrf13 , fieldAtTime , evaluateModelGradientInLocalTangentPlane ) where import Data.VectorSpace import Math.SphericalHarmonics --...
dmcclean/igrf
src/IGRF.hs
bsd-3-clause
9,299
0
10
2,308
5,422
3,449
1,973
107
1
{- Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.0 Kubernetes API version: v1.9.12 Generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) -} {-| Module : Kubernetes.OpenAPI.API.Authent...
denibertovic/haskell
kubernetes/lib/Kubernetes/OpenAPI/API/Authentication.hs
bsd-3-clause
2,752
0
8
331
484
333
151
-1
-1
{-# LANGUAGE NoMonomorphismRestriction #-} module Grammar (pUnit ,pName ,runParser {- from Parser -} ,initialParserState {- from Grammar.Utils -} ) where import Control.Applicative import Data.Maybe import AST import CppToken import Grammar.Expr import Grammar.Parser import Grammar.Types import Grammar.U...
olsner/m3
Grammar.hs
bsd-3-clause
2,402
0
19
404
769
395
374
53
1
{- Totality checker -} module Test () where {-@ foo :: {vv:[{v:[a]|((len v) = 1)}]|((len vv)= 1)} -> [[a]] @-} foo [[x]] = [[x]]
spinda/liquidhaskell
tests/gsoc15/broken/pos/grty2.hs
bsd-3-clause
136
0
7
31
29
19
10
2
1
{-# LANGUAGE TupleSections #-} -- | Extra functions for working with pairs and triples. -- Some of these functions are available in the "Control.Arrow" module, -- but here are available specialised to pairs. Some operations work on triples. module Data.Tuple.Extra( module Data.Tuple, -- * Specialised 'Arro...
ndmitchell/extra
src/Data/Tuple/Extra.hs
bsd-3-clause
3,116
0
9
706
995
607
388
44
1
module Hint.GHC ( Message, module X ) where import GHC as X hiding (Phase, GhcT, runGhcT) import Control.Monad.Ghc as X (GhcT, runGhcT) import HscTypes as X (SourceError, srcErrorMessages, GhcApiError) import Outputable as X (PprStyle, SDoc, Outputable(ppr), showSDoc, showSDocForUser, sho...
int-e/hint
src/Hint/GHC.hs
bsd-3-clause
1,065
0
6
191
293
205
88
20
0
{-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDer...
davdar/pretty-monadic-printer
Text/PrettyPrint/Final/Demos/STLCDemo.hs
mit
5,971
0
15
1,307
2,340
1,244
1,096
-1
-1
module System.Logging.LogSink.Compat ( module Prelude , module Control.Applicative ) where import Control.Applicative
sol/logsink
src/System/Logging/LogSink/Compat.hs
mit
131
0
5
25
25
17
8
4
0
{-# LANGUAGE OverloadedStrings #-} module Lamdu.Infer.Error ( Error(..) ) where import qualified Lamdu.Calc.Term as V import qualified Lamdu.Calc.Type as T import Lamdu.Calc.Type.Constraints (Constraints) import Text.PrettyPrint ((<+>), Doc) import Text.PrettyPrint.HughesPJClass ...
Peaker/Algorithm-W-Step-By-Step
src/Lamdu/Infer/Error.hs
gpl-3.0
1,712
0
10
423
431
233
198
41
0
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Module : Test.AWS.EFS.Internal -- Copyright : (c) 2013-2015 Brendan Hay -- License : This Source Code Form is subject to the terms of -- the Mozilla Public License, v. 2.0. -- A copy of the MPL can...
fmapfmapfmap/amazonka
amazonka-efs/test/Test/AWS/EFS/Internal.hs
mpl-2.0
613
0
4
140
25
21
4
4
0
module Data.Profunctor.Product.Newtype where import qualified Data.Profunctor as P class Newtype t where constructor :: a -> t a field :: t a -> a pNewtype :: (P.Profunctor p, Newtype t) => p a b -> p (t a) (t b) pNewtype = P.dimap field constructor
karamaan/product-profunctors
Data/Profunctor/Product/Newtype.hs
bsd-3-clause
263
0
9
58
109
58
51
7
1
module Main (main) where import Control.Exception import Data.Array.IArray a :: Array Int Int a = listArray (1,4) [1..4] b :: Array (Int,Int) Int b = listArray ((0,0), (3,3)) (repeat 0) main :: IO () main = do print (a ! 5) `catch` \e -> print (e :: SomeException) print (b ! (0,5)) `catch` \e -> print (e...
DavidAlphaFox/ghc
libraries/array/tests/T2120.hs
bsd-3-clause
340
0
11
75
188
107
81
10
1
{-# LANGUAGE TypeSynonymInstances #-} module Text.XML.HaXml.Schema.PrimitiveTypes ( -- * Type class for parsing simpleTypes SimpleType(..) , module Text.Parse , -- * Primitive XSD datatypes XsdString(..) , Boolean(..) , Base64Binary(..) , HexBinary(..) , Float(..) , Decimal(..) , Double(..) ...
Ian-Stewart-Binks/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Schema/PrimitiveTypes.hs
gpl-3.0
12,300
2
20
3,479
3,265
1,802
1,463
254
2
{-# OPTIONS_HADDOCK hide #-} -- #hide #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Safe #-} #endif module Text.XHtml.Strict.Attributes where import Text.XHtml.Internals -- * Attributes in XHTML Strict action :: String -> HtmlAttr align :: String -> HtmlAttr alt :: String -...
DavidAlphaFox/ghc
libraries/xhtml/Text/XHtml/Strict/Attributes.hs
bsd-3-clause
4,187
0
5
1,836
812
436
376
99
1
{-# LANGUAGE TemplateHaskell #-} module Common ( TestDependable(..) , repoRoot , testFile ) where import CommonTH import System.FilePath ( (</>) ) import Language.Haskell.TH.Syntax (lift) import Database.Schema.Migrations.Dependencies ( Dependable(..) ) repoRoot :: FilePath repoRoot = $(getRepoRoot >...
creswick/dbmigrations
test/Common.hs
bsd-3-clause
646
0
9
179
163
99
64
19
1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} -- | Some next-gen helper functions for the scaffolding's configuration system. module Yesod.Default.Config2 ( MergedValue (..) , applyCurrentEnv , getCurrentEnv , applyEnvValue , loadAppSettings , loadAppSettingsArgs , configSettingsYm...
pikajude/yesod
yesod/Yesod/Default/Config2.hs
mit
6,524
0
20
1,575
1,572
828
744
147
8
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE PolyKinds, DataKinds, TypeFamilies, TypeOperators, UndecidableInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Either -- Copyright : ...
TomMD/ghc
libraries/base/Data/Either.hs
bsd-3-clause
8,039
1
9
1,711
852
512
340
51
1
{-# LANGUAGE ExistentialQuantification #-} -- Examples from Doaitse Swierstra and Brandon Moore -- GHC users mailing list, April 07, title "Release plans" -- This one should fail, but Hugs passes it module ShouldFail where data T s = forall x. T (s -> (x -> s) -> (x, s, Int)) run :: T s -> Int run ts = case ts of...
ezyang/ghc
testsuite/tests/typecheck/should_fail/tcfail179.hs
bsd-3-clause
390
0
12
115
109
61
48
7
1
module Ripple.Amount ( Amount(..), Currency(..), CurrencySpecifier(..) ) where import Control.Monad import Control.Applicative import Data.Bits import Data.Word import Data.Binary (Binary(..), Get, putWord8) import Data.Binary.Get (getLazyByteString) import Data.Base58Address (RippleAddress) import Control.Error (r...
singpolyma/ripple-haskell
Ripple/Amount.hs
isc
4,922
56
19
971
2,142
1,119
1,023
128
1
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.WebKitMediaKeys (newWebKitMediaKeys, createSession, createSession_, isTypeSupported, isTypeSupported_, ge...
ghcjs/jsaddle-dom
src/JSDOM/Generated/WebKitMediaKeys.hs
mit
3,604
0
12
650
789
451
338
61
1
module CustomSet ( CustomSet , empty , null , singleton , union , toList , fromList , member , delete , difference , isSubsetOf , isDisjointFrom , size , intersection , insert ) where -- This example is a naive unbalanced binary search tree implementation. -- No attempt at implementing ...
pminten/xhaskell
custom-set/example.hs
mit
2,691
0
14
697
1,225
613
612
80
3
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.FontFace (newFontFace, load, load_, setFamily, getFamily, setStyle, getStyle, setWeight, getWeight, setSt...
ghcjs/jsaddle-dom
src/JSDOM/Generated/FontFace.hs
mit
6,512
0
13
1,002
1,515
832
683
93
1
import Control.Monad.Trans.Except import Control.Monad.Trans.Maybe import Control.Monad.Trans.Reader embedded :: MaybeT (ExceptT String (ReaderT () IO)) Int embedded = return 1 maybeUnwrap = runMaybeT embedded eitherUnwrap = runExceptT maybeUnwrap readerUnwrap = runReaderT eitherUnwrap -- TODO: I haven't figured this...
diminishedprime/.org
reading-list/haskell_programming_from_first_principles/26_08.hs
mit
429
0
11
58
137
73
64
10
1
module Hasql.Private.Decoders.Composite where import Hasql.Private.Prelude import qualified PostgreSQL.Binary.Decoding as A newtype Composite a = Composite (ReaderT Bool A.Composite a) deriving (Functor, Applicative, Monad, MonadFail) {-# INLINE run #-} run :: Composite a -> Bool -> A.Value a run (Composite imp...
nikita-volkov/hasql
library/Hasql/Private/Decoders/Composite.hs
mit
671
0
9
110
214
115
99
18
1
{-# LANGUAGE OverloadedStrings #-} import qualified Crypto.Hash import Data.ByteString (ByteString) import Data.Text (Text) import qualified Data.Text as Text import Data.Text.Encoding (decodeUtf8, encodeUtf8) import qualified Data.Text.IO as IO main = do input <- Text.strip <$> IO.getContents print $ mineAdventC...
SamirTalwar/advent-of-code
2015/AOC_04_1.hs
mit
718
0
15
130
255
142
113
20
1
substituteChar :: Char -> Char substituteChar c = case c of 'e' -> '3' 'o' -> '0' 'a' -> '4' 't' -> '7' _ -> c translateWord word = map substituteChar word main :: IO () main = do putStr "Please enter a word.\n" word1 <- getLine print (translateWord word1)
brodyberg/Notes
FindingSuccessAndFailure/leetspeak.hs
mit
297
0
9
90
105
50
55
15
5
{-# LANGUAGE NoImplicitPrelude, FlexibleContexts, ImpredicativeTypes, DeriveDataTypeable #-} module Eyeshadow.Phase.Lexical.Types (Action, Classification(..), LexerStateData(..), LexerStateDataActionMap(..), LexerState(..), Lexer(..)) where import qualified Control.Eff as Eff import qua...
IreneKnapp/Eyeshadow
Haskell/Eyeshadow/Phase/Lexical/Types.hs
mit
3,224
0
12
563
631
383
248
98
0