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 CPP #-} -- | -- Module : Data.Vector.Internal.Check -- Copyright : (c) Roman Leshchinskiy 2009 -- License : BSD-style -- -- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au> -- Stability : experimental -- Portability : non-portable -- -- Bounds checking infrastructure -- {-# LANGUAGE Mag...
mightymoose/liquidhaskell
benchmarks/vector-0.10.0.1/Data/Vector/Internal/Check.hs
bsd-3-clause
5,620
0
12
1,218
1,414
759
655
102
2
{-# LANGUAGE Trustworthy #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.ST.Lazy.Safe -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org ...
beni55/haste-compiler
libraries/ghc-7.8/base/Control/Monad/ST/Lazy/Safe.hs
bsd-3-clause
1,034
0
4
217
62
50
12
9
0
module ShouldCompile where infix 5 |- infix 9 := data Equal = Char := Int -- fails in GHC (all versions), due to not doing fixity resolution on -- the lhs before deciding which is the function symbol. (|-) :: Int -> Equal -> Bool 0 |- x:=y = 1 |- x:=y -- XXX fails here 2 |- (x:=y) = 0 |- x:=y _ |- _ = Fa...
ghc-android/ghc
testsuite/tests/parser/should_compile/read027.hs
bsd-3-clause
326
0
7
85
102
56
46
-1
-1
main = do putStrLn "Test"
kevinbenard/code-exercises
haskell/test.hs
mit
26
0
7
5
12
5
7
1
1
{-# LANGUAGE ConstraintKinds, DataKinds, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, TypeFamilies #-} {- | Module : Control.Monad.Levels.RWS Description : Monads with reader, writer and state abilities Copyright : (c) Ivan Lazar Miljenovic License : MIT Maintainer...
ivan-m/monad-levels
Control/Monad/Levels/RWS.hs
mit
1,927
0
9
372
398
232
166
-1
-1
import System.Environment (getArgs) import Jbobaf.Jitro import Jbobaf.Vlatai main = do argv <- getArgs input <- if null argv then getContents else readFile (head argv) mapM_ (\(jvo, rafs) -> let rafs' = either (const []) id (runReaderT (jvokatna jvo) defaults) in if rafs /= rafs' then putStrLn $ "Failur...
jwodder/jbobaf
haskell/cipra/jvokatna.hs
mit
501
0
19
117
199
99
100
13
3
{-# OPTIONS_GHC -Wall -fno-warn-orphans #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE TypeSynonymInstances #-} import Test.QuickCheck import AlignPar as AP -- import AlnHtml --import Align as A -- import Data.Array import Control.Monad --import Data.Char import qualified Data.ByteString.Char8 as BS -- import Debug...
gregoryck/biocalc
testbiocalc.hs
mit
6,341
0
14
2,280
1,705
860
845
128
7
module Week4.Week4 where import Data.Char import Data.List import Data.Maybe import Data.String.Utils import Week4.BST ex1 :: a -> b -> b ex1 _ b = b --must return b - only option ex2 :: a -> a -> a ex2 y z = z -- could return either a or some operation between them ex3 :: Int -> a -> a ex3 a b = b -- to be total m...
rglew/cis194
src/Week4/Week4.hs
mit
1,918
0
11
527
771
392
379
54
1
module Jenkins.Client.RunBuild where import qualified Data.Text as T import qualified Data.ByteString as BS import Jenkins.Client.Types import qualified Jenkins.Endpoints as JEP import Options (BuildParams(..)) runBuild :: T.Text -> BuildParams -> Client () runBuild name params = JEP.runBuild nam...
afiore/jenkins-tty.hs
src/Jenkins/Client/RunBuild.hs
mit
362
0
8
66
99
59
40
11
1
{-# LANGUAGE FlexibleContexts #-} module Jakway.Blackjack.IO.DatabaseReads (readPlayers, readHandStatement, readHand, readPlayerHands, getNumPlayers, readMatchStatement, readMatch, getNumMatches ) where import Prelude hiding (lookup) import Jakway.Blackjack.CardOps import Jakway.Blackjack.Match import Jakway.B...
tjakway/blackjack-simulator
src/Jakway/Blackjack/IO/DatabaseReads.hs
mit
6,969
0
22
1,883
1,615
857
758
88
4
{-# language TypeApplications #-} module Sandbox.Data.Vector.Unboxed.Extra where import qualified Data.Vector.Unboxed as V import qualified Data.Map.Strict as M quicksort :: (V.Unbox a, Ord a) => V.Vector a -> V.Vector a quicksort xs | V.null xs = xs | otherwise = let (hds, tl) = V.splitAt 1 xs hd...
4e6/sandbox
haskell/Sandbox/Data/Vector/Unboxed/Extra.hs
mit
2,589
0
16
595
941
499
442
40
1
import MyLib answer n = sum $ digits n where --n = pow 100
yuto-matsum/contest-util-hs
src/Euler/020.hs
mit
67
0
6
22
21
11
10
3
1
{-# LANGUAGE TemplateHaskell #-} import Language.Haskell.TH.Syntax main = $(return $(return $ InfixE (Just $ (ConE $ mkName "VarE") `AppE` ((VarE $ mkName "mkName") `AppE` (LitE $ StringL "putStrLn"))) (ConE $ mkName "AppE") (Just $ (ConE $ mkName "LitE") `AppE` ...
stefan-j/ProjectEuler
test.hs
mit
384
0
18
104
150
82
68
10
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Hakyll.Web.Agda ( agdaCompilerWith , agdaVerbosityQuiet , CommandLineOptions(..) , PragmaOptions(..) , defaultAgdaOptions , defaultAgdaPragmaOptions , mkFixStdlibLink , mkFixLocalLink , agdaModule...
wenkokke/sf
hs/Hakyll/Web/Agda.hs
mit
7,187
0
19
1,375
1,659
893
766
134
2
module EntityManager where import Control.Monad (liftM, forM, guard, when) import Control.Monad.Trans.Maybe import Control.Monad.Trans.Class import Control.Lens import Data.Monoid (mconcat) import qualified Data.IntMap.Strict as I import Data.IntMap.Strict (IntMap) import qualified Data.Map.Strict as M import Data.Ma...
TK009/CESH
src/EntityManager.hs
mit
4,344
0
14
1,031
1,017
517
500
-1
-1
{-# LANGUAGE TemplateHaskell #-} module TemplateHaskell where import Data.List (intercalate) import Language.Haskell.TH emptyShow :: Name -> Q [Dec] emptyShow name = [d|instance Show $(conT name) where show _ = "empty"|] listFields :: Name -> Q [Dec] listFields name = do TyConI (DataD _ _ _ [RecC _ fields] _) <...
limdauto/learning-haskell
snippets/TemplateHaskell.hs
mit
684
0
14
157
211
112
99
15
1
module StmContainers.Map ( Map, new, newIO, null, size, focus, lookup, insert, delete, reset, unfoldlM, listT, ) where import StmContainers.Prelude hiding (insert, delete, lookup, alter, foldM, toList, empty, null) import qualified StmHamt.Hamt as A import qualified Focus as B import qualified ...
nikita-volkov/stm-containers
library/StmContainers/Map.hs
mit
2,845
0
11
596
846
470
376
58
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} module BCMtools.Convert ( convert , convertOptions ) where import Data.Monoid ((<>)) import Control.Monad.Trans.Resource (runResourceT) import qualified Data.ByteString.Char8 as B import Data.ByteString.Lex.Fractional (readSigned, readExp...
kaizhang/BCMtools
app/BCMtools/Convert.hs
mit
5,768
0
18
2,224
1,695
894
801
136
8
module Main where import Faust.Faust main :: IO () main = undefined
Muzietto/transformerz
haskell/faust-stack/app/Main.hs
mit
70
0
6
14
24
14
10
4
1
{-# LANGUAGE DeriveFunctor #-} module Test.Hspec.Core.Formatters.V1.Free where import Prelude () import Test.Hspec.Core.Compat data Free f a = Free (f (Free f a)) | Pure a deriving Functor instance Functor f => Applicative (Free f) where pure = Pure Pure f <*> Pure a = Pure (f a) Pure f <...
hspec/hspec
hspec-core/src/Test/Hspec/Core/Formatters/V1/Free.hs
mit
591
0
10
155
283
142
141
17
1
import System.IO import XMonad import XMonad.Actions.NoBorders import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Layout.NoBorders (smartBorders) import XMonad.Util.EZConfig (additionalKeys) import XMonad.Util.Run (spawnPipe) -------------------------------------------------------------------...
csebesta/dotfiles
xmonad/.xmonad/xmonad.hs
mit
2,512
0
9
384
406
246
160
35
1
-- The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. -- -- Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2. -- -- (Please note that the palindromic number, in either base, may not include leading zeros.) import Text.Printf isPalindrome :: Str...
daniel-beard/projecteulerhaskell
Problems/p36.hs
mit
650
0
11
121
139
76
63
8
2
-- (C) 2011-14 Nicola Bonelli <nicola@pfq.io> -- -- 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) any later version. -- -- This pr...
Mr-Click/PFQ
user/Haskell/test/test-dispatch.hs
gpl-2.0
1,827
0
14
450
345
175
170
30
2
import Test.HUnit import FileMode testRoundTrip :: String -> String -> Int -> Test testRoundTrip msg exp inp = test $ assertEqual ("round-trip " ++ msg) exp (modeToString (modeFromInt inp)) testRoundTrips = test $ [ testRoundTrip "regular" "100644" 0o100644 , testRoundTrip "executable" "100755" 0o100755 ...
martine/gat
FileMode_test.hs
gpl-2.0
453
0
10
84
125
64
61
11
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE FlexibleInstances, TypeSynonymInstances, CPP #-} {- Copyright (C) 2009 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 Founda...
jgm/yst
Yst/Types.hs
gpl-2.0
6,466
0
12
2,157
1,736
918
818
147
2
{-| Unittest helpers for ganeti-htools. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. 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 op...
damoxc/ganeti
test/hs/Test/Ganeti/TestCommon.hs
gpl-2.0
9,899
0
16
2,028
2,263
1,207
1,056
168
2
{-# LANGUAGE TypeSynonymInstances, MultiParamTypeClasses #-} module PCProblem.Quiz where -- -- $Id$ import PCProblem.Type import PCProblem.Param import PCProblem.Generator import Inter.Types import Inter.Quiz import Challenger.Partial import Data.Array import Autolib.Reporter import Data.List (isPrefixOf) import A...
Erdwolf/autotool-bonn
src/PCProblem/Quiz.hs
gpl-2.0
2,231
27
14
668
693
357
336
58
1
-- 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/LevelPuzzle/File/Write.hs
gpl-3.0
836
0
4
151
37
31
6
4
0
-- Collection of utility functions module Utility where import Numeric.Units.Dimensional.Prelude (ThermodynamicTemperature, ElectricResistance, Dim, Dimensionless, Quantity, pos2, _5, _2, (/~~), (/~), (*~), one) import qualified Numeric.Units.Dimensional.Prelude ((^), (+), (**), (-), (*), (/), log) import qualified Nu...
taktoa/ThermoCalc
src/Utility.hs
gpl-3.0
4,564
2
12
1,262
1,912
1,038
874
-1
-1
module SpacialGameEnv.RunSGEnv where import SpacialGameEnv.SGModelEnv import qualified PureAgents2DDiscrete as Front import qualified Graphics.Gloss as GLO import Graphics.Gloss.Interface.IO.Simulate import qualified PureAgentsConc as PA import System.Random import Data.Maybe import Data.List import Control.Monad.ST...
thalerjonathan/phd
public/ArtIterating/code/haskell/PureAgentsConc/src/SpacialGameEnv/RunSGEnv.hs
gpl-3.0
3,485
0
12
1,115
949
514
435
70
1
--record syntax data CAR = Car {company :: String, model :: String, year :: Int} deriving (Show,Eq) --ghci> Car "x" "z" 3 == Car {company = "x", model = "z", year = 3} --True --it :: Bool
YPBlib/NaiveFunGame_hs
syntax.hs
gpl-3.0
190
0
8
39
43
27
16
1
0
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ScopedTypeVariables #-} module EpsilonNFA where import Data.Set import qualified Data.List as L import Control.Monad import Control.Lens import qualified DFA as D (State(State), Input(Input), Rule(Rule), Label(Label), GoalState(GoalState), Priority, DFA, mkDFA) import qual...
pocket7878/min-tokenizer
src/EpsilonNFA.hs
gpl-3.0
9,899
0
19
3,107
4,221
2,213
2,008
154
5
{- | Module : $Header$ Description : Higher-kinded stuff. Copyright : (c) plaimi 2014 License : GPL-3 Maintainer : plailude@plaimi.net -} module Plailude.Control ( (!?), (~+~), both, erretreat, if', fi, retreat, ) where import Plailude.Control.Arrow import Plailude.Control.Bool import...
plaimi/plailude
src/Plailude/Control.hs
gpl-3.0
400
0
4
78
65
45
20
13
0
module Test.QuickFuzz.Gen.Bnfc.AbsGrammar where -- Haskell module generated by the BNF converter data Exp = EAdd Exp Exp | ESub Exp Exp | EMul Exp Exp | EDiv Exp Exp | EInt Integer deriving (Eq, Ord, Show, Read)
CIFASIS/QuickFuzz
src/Test/QuickFuzz/Gen/Bnfc/AbsGrammar.hs
gpl-3.0
242
0
6
67
66
39
27
8
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/DeleteTable.hs
mpl-2.0
4,142
0
9
868
446
274
172
56
1
--Zaoqilc --Copyright (C) 2017 Zaoqi --This program is free software: you can redistribute it and/or modify --it under the terms of the GNU Affero General Public License as published --by the Free Software Foundation, either version 3 of the License, or --(at your option) any later version. --This program is distrib...
zaoqi/zaoqilc
featuring/MonadList.hs
agpl-3.0
1,108
0
14
288
279
146
133
14
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Kubernetes.V1.TCPSocketAction where import GHC.Generics import Kubernetes.Utils import qualified Data.Aeson -- | TCPSocketAction describes an ...
minhdoboi/deprecated-openshift-haskell-api
kubernetes/lib/Kubernetes/V1/TCPSocketAction.hs
apache-2.0
672
0
8
100
80
49
31
14
0
module SqrtMultiples.A262036 (a262036) where import Data.List (find) import Data.Maybe (fromJust) import HelperSequences.A005117 (a005117) import SqrtMultiples.A261865 (a261865) a262036 :: Integral a => a -> a a262036 n = fromJust $ find (\k -> a261865 k == a005117 n) [1..]
peterokagey/haskellOEIS
src/SqrtMultiples/A262036.hs
apache-2.0
276
0
10
39
105
58
47
7
1
{-# LANGUAGE UndecidableInstances #-} {-# Language FlexibleInstances #-} {-# Language MultiParamTypeClasses #-} -- Search for -fallow-undecidable-instances to see why this is needed ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.Writer.Lazy -- Copyrig...
ifigueroap/mzv
src/Control/Monad/Writer/Lazy.hs
bsd-3-clause
5,007
0
16
1,172
1,684
908
776
93
1
{-# LANGUAGE PackageImports #-} module GHC.IOArray (module M) where import "base" GHC.IOArray as M
silkapp/base-noprelude
src/GHC/IOArray.hs
bsd-3-clause
104
0
4
18
21
15
6
3
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE FlexibleContexts #-} module Feldspar.Algorithm.FFT.Push ( fft , ifft , fftCore , butterfly , twid , twids ) where import qualified Prelude as P import qualified Data.Complex import Feldspar import Feldspar.Mutable import Feldspar.Vector import Feldspar.Algorithm.FF...
emwap/feldspar-language
src/Feldspar/Algorithm/FFT/Push.hs
bsd-3-clause
1,954
0
21
567
842
442
400
50
1
------------------------------------------------------------------------------- -- | -- Module : Example -- Copyright : (C) BaseX Team 2005-22 -- License : BSD -- -- Maintainer : leo@woerteler.de -- Stability : experimental -- Portability : portable -- -- This example shows how database commands...
BaseXdb/basex
basex-api/src/main/haskell/Example.hs
bsd-3-clause
1,139
0
11
241
175
103
72
14
1
{-# LANGUAGE OverloadedStrings #-} {-| This is where all the routes and handlers are defined for your site. The 'site' function combines everything together and is exported by this module. -} module Site ( site ) where import Control.Applicative import Control.Monad ((<=<)) import ...
benarmston/hpastie
src/Site.hs
bsd-3-clause
4,238
0
14
989
767
405
362
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE FlexibleContexts #-} module IO ( readShot , loadVisor , screenShotSource , dir , saveVisor , saveVisorContinuous , saveKernels , loadMany , ioC , pathSource , p...
jonascarpay/visor
src/IO.hs
bsd-3-clause
8,266
1
34
3,374
2,605
1,290
1,315
207
3
{-# LANGUAGE QuasiQuotes #-} {-@ LIQUID "--no-termination "@-} {-@ LIQUID "--maxparams=3 "@-} import LiquidHaskell -- Source: Okasaki, JFP 1995 -- http://www.westpoint.edu/eecs/SiteAssets/SitePages/Faculty%20Publication%20Documents/Okasaki/jfp95queue.pdf ----------------------------------------------------------...
spinda/liquidhaskell
tests/gsoc15/unknown/pos/AmortizedQueue.hs
bsd-3-clause
2,312
0
12
718
526
292
234
35
1
{- (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 \section[WorkWrap]{Worker/wrapper-generating back-end of strictness analyser} -} {-# LANGUAGE CPP #-} module WorkWrap ( wwTopBinds ) where import GhcPrelude import CoreArity ( manifestArity ) import CoreSyn import CoreUnfold ( certainlyWillIn...
sdiehl/ghc
compiler/stranal/WorkWrap.hs
bsd-3-clause
28,177
0
25
8,003
2,095
1,106
989
-1
-1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 TcSplice: Template Haskell splices -} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE InstanceSigs #-} {-# OPTIONS_GHC -fno-warn-orphans...
ghc-android/ghc
compiler/typecheck/TcSplice.hs
bsd-3-clause
64,165
0
18
20,049
1,244
697
547
76
4
module StorySpec where import Debug.Trace import Control.Monad import Control.Monad.Except import Control.Monad.State import qualified Data.ByteString as B import Utils import Test.Hspec import Types import Header import qualified BinReader as BR type TestRes = ExceptT String IO expHeader x = do print x ...
theor/zorkell
test/StorySpec.hs
bsd-3-clause
1,945
0
18
748
364
189
175
37
1
module Wavecore.ECDIS.Types where import Prelude () import Numeric.Units.Dimensional.TF.Prelude import Data.Geodetic import Data.Text (Text) type Coordinate = GeodeticCoordinate WGS84 Double mkCoord :: PlaneAngle Double -> PlaneAngle Double -> Length Double -> Coordinate mkCoord = WGS84 -- | Speed...
wavecorenautic/ecdis-client
src/Wavecore/ECDIS/Types.hs
bsd-3-clause
887
0
9
173
266
154
112
19
1
{-# LANGUAGE CPP, DeriveDataTypeable, DeriveFunctor #-} {-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} ------------------------------------------------------------------------------ -- | -- Module: Database.PostgreSQL.Simple.ToField -- Copyright: (c) 2011 MailRank, Inc. -- (c) 2011-2012 ...
tolysz/postgresql-simple
src/Database/PostgreSQL/Simple/ToField.hs
bsd-3-clause
12,573
0
18
3,467
2,960
1,613
1,347
261
1
{-# LANGUAGE OverloadedStrings #-} module Crypto.Passphrase (Dict, dict, en, de, getPass) where import Prelude hiding (readFile, lines, unwords) import Control.Applicative import Control.Monad import Data.Binary.Strict.Get import Data.ByteString.Char8 (ByteString, readFile, lines, unwords) import Data.Monoid import S...
informatikr/passphrase
Crypto/Passphrase.hs
bsd-3-clause
1,223
0
14
284
450
238
212
35
1
module Dep where test :: [(Char, Integer)] test = undefined $ zip "Monkey!" [1..]
sebastiaanvisser/ghc-goals
tests/Dep.hs
bsd-3-clause
83
0
7
15
35
21
14
3
1
module Pkgs.Syntax where data Toplevel = P PkgTerm | I IfaceTerm data PkgTerm = Pkg { pName :: PVName , pArgs :: [PArg] , pImplName :: IVName , pBody :: PBody } deriving (Eq) data IfaceTerm = Iface { iName :: IVName , iArgs :: [PArg] ...
markflorisson/packages
Pkgs/Syntax.hs
bsd-3-clause
1,526
0
9
521
453
271
182
63
0
{-# LANGUAGE NoImplicitPrelude #-} -- | -- -- Functions in this module return well-formed 'Encoding''. -- Polymorphic variants, which return @'Encoding' a@, return a textual JSON -- value, so it can be used as both @'Encoding'' 'Text'@ and @'Encoding' = 'Encoding'' 'Value'@. module Data.Aeson.Encoding ( -- * E...
dmjio/aeson
src/Data/Aeson/Encoding.hs
bsd-3-clause
1,251
0
4
350
200
138
62
39
0
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, DeriveFunctor, PatternGuards #-} module Idris.Core.Typecheck where import Control.Monad.State import Debug.Trace import qualified Data.Vector.Unboxed as V (length) import Idris.Core.TT import Idris.Core.Evaluate -- To check conversion, normalise ea...
ctford/Idris-Elba-dev
src/Idris/Core/Typecheck.hs
bsd-3-clause
9,976
0
23
4,048
3,827
1,860
1,967
188
42
module Clicklac.Environment ( AppEnvironment(..) , EnvLookup(..) , lookupAppEnv' , lookupEnvVar' ) where import Control.Monad.IO.Class (MonadIO(..)) import System.Environment (lookupEnv) import Data.Maybe (fromMaybe) import Text.Read (readMaybe) data AppEnvironment = Develo...
onurzdg/clicklac
src/Clicklac/Environment.hs
bsd-3-clause
935
0
10
223
286
156
130
25
2
-- Copyright (c) Microsoft. All rights reserved. -- Licensed under the MIT license. See LICENSE file in the project root for full license information. {-# LANGUAGE OverloadedStrings, RecordWildCards #-} module Language.Bond.Syntax.Internal ( showPretty , showQualifiedName , takeName , takeNamespace ...
upsoft/bond
compiler/src/Language/Bond/Syntax/Internal.hs
mit
1,575
1
11
273
384
205
179
35
1
{-# LANGUAGE FlexibleContexts #-} module Opaleye.RunQuery (module Opaleye.RunQuery, QueryRunner, IRQ.QueryRunnerColumn, IRQ.QueryRunnerColumnDefault (..), IRQ.fieldQueryRunnerColumn) where import qualified Database.Pos...
bergmark/haskell-opaleye
src/Opaleye/RunQuery.hs
bsd-3-clause
3,430
0
13
891
516
306
210
41
2
{-# LANGUAGE RecordWildCards #-} module Graphics.GL.Pal.Framebuffer where import Graphics.GL import Control.Monad.Trans import Graphics.GL.Pal.Types import Control.Monad import Foreign bindFramebuffer :: MonadIO m => Framebuffer -> m () bindFramebuffer (Framebuffer framebuffer) = glBindFramebuffer GL_FRAMEBUFFER fram...
lukexi/gl-pal
src/Graphics/GL/Pal/Framebuffer.hs
bsd-3-clause
6,594
0
13
1,180
1,249
586
663
112
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} module Data.HashTable.Weak.Internal.IntArray ( IntArray , Elem , elemMask , primWordToElem , elemToInt , elemToInt# , newArray , readArray , writeArray , length , toPtr ) where ---------------------------...
cornell-pl/HsAdapton
weak-hashtables/src/Data/HashTable/Weak/Internal/IntArray.hs
bsd-3-clause
3,541
0
10
871
568
309
259
56
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} module Network.Pubnub.Types ( convertHistoryOptions -- Record construction , Timestamp(..) , PN(..) , defaultPN , SubscribeOptions(..) , defaultSubscribeOption...
pubnub/haskell
src/Network/Pubnub/Types.hs
mit
7,627
2
14
3,224
1,795
1,022
773
170
1
{-# LANGUAGE OverloadedStrings #-} import Control.Monad import Control.Concurrent import System.Environment import Network.Helics import qualified Data.ByteString.Char8 as S import Control.Exception import System.IO.Error main :: IO () main = do k:_ <- getArgs _ <- forkIO $ sampler 60 withHelics def { lice...
dzotokan/helics
example.hs
mit
811
0
20
213
303
155
148
22
1
{-| PyValue contains instances for the 'PyValue' typeclass. The typeclass 'PyValue' converts Haskell values to Python values. This module contains instances of this typeclass for several generic types. These instances are used in the Haskell to Python generation of opcodes and constants, for example. -} {- Copyrig...
kawamuray/ganeti
src/Ganeti/PyValue.hs
gpl-2.0
2,942
0
13
566
564
306
258
44
0
module Inter.Language where import Autolib.Multilingual import Gateway.CGI choose :: Monad m => Form m Language choose = do open table l <- click_choice_with_default 0 "choose language" $ do l <- [ minBound .. maxBound ] return ( show l, l ) close return l
Erdwolf/autotool-bonn
trial/src/Inter/Language.hs
gpl-2.0
292
0
13
79
97
47
50
11
1
{-# LANGUAGE CPP, UnboxedTuples, MagicHash, StandaloneDeriving, DeriveDataTypeable #-} {-# OPTIONS_GHC -O #-} -- In GHC 6.4, compiling this module gave a Core Lint failure following the -- specialier, because a function was floated out that had a RULE that -- mentioned another fuction (unpack, in fact). but the latte...
lukexi/ghc
testsuite/tests/simplCore/should_compile/spec001.hs
bsd-3-clause
13,358
0
17
3,232
3,239
1,712
1,527
244
4
{-# LANGUAGE PolyKinds, TypeFamilies #-} module T9171 where data Base type family GetParam (p::k1) (t::k2) :: k3 type instance GetParam Base t = t foo = undefined :: GetParam Base (GetParam Base Int)
urbanslug/ghc
testsuite/tests/indexed-types/should_fail/T9171.hs
bsd-3-clause
204
0
7
37
63
39
24
-1
-1
{-# LANGUAGE BangPatterns #-} -- | Tests that conversions between various primitive types (e.g. -- Word, Double, etc) doesn't allocate. module Main (main) where import Data.Word -- Repeatedly convert Words to Doubles loop :: Floating a => Word -> a loop n = go 0 0.0 where go i !acc | i < n = go (i+1) (acc + fr...
urbanslug/ghc
testsuite/tests/perf/should_run/Conversions.hs
bsd-3-clause
543
0
11
130
148
76
72
13
1
{-# LANGUAGE FlexibleContexts #-} -- | It is well known that fully parallel loops can always be -- interchanged inwards with a sequential loop. This module -- implements that transformation. module Futhark.Pass.ExtractKernels.Interchange ( SeqLoop (..) , interchangeLoops ) where import C...
ihc/futhark
src/Futhark/Pass/ExtractKernels/Interchange.hs
isc
4,105
0
17
1,059
1,000
518
482
76
2
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Hearts.Deck where import Prelude hiding (foldr) import Data.Monoid (Monoid) import Data.Foldable (Foldable, foldr) import Data.Set (Set) import qualified Data.Set as S import Hearts.Class -- Data types newtype Deck_ a = Deck { unDeck :: Set a } deriving (Eq, Ord, S...
nadirs/hearts-hs
src/Hearts/Deck.hs
mit
1,132
0
11
216
416
229
187
26
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module Text.Greek.Mounce.NounSecondDeclension where import Text.Greek.Grammar import Text.Greek.Mounce.Morphology import Text.Greek.Mounce.Quote secondDeclensionNouns :: [Cited NounCategory] secondDeclensionNouns = [ mounce §§ ["n-2a"] $ [nounCat...
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/Mounce/NounSecondDeclension.hs
mit
15,504
0
8
2,386
154
103
51
20
1
{-# LANGUAGE OverloadedStrings #-} module Network.Wai.Middleware.Router (Route,router,dir) where import Data.Text (Text,splitOn) import Network.Wai (Request(..),Application) -- | Alias for a function which maps path pieces to applications. type Route = ([Text] -> Maybe Application) -- | Router for mapping paths to...
mdmarek/wai-router
Network/Wai/Middleware/Router.hs
mit
1,192
0
10
305
321
176
145
21
2
module Tree where import Data.Monoid (Monoid, (<>)) import Data.Vector (Vector) import qualified Data.Vector as Vector import Prelude hiding (lookup) data RangeTree a = Node { size :: Int, val :: a, left :: RangeTree a, right :: RangeTree a } | Leaf a fromVector :: Monoid a => Vector a -> Ran...
vladfi1/game-ai
lib/Tree.hs
mit
1,262
0
15
374
511
268
243
38
2
module Google.CalendarSpec (spec) where import Google.Calendar import Test.Hspec spec :: Spec spec = describe "main" $ do it "returns the unit" $ main `shouldReturn` ()
tippenein/google-calendar
test/Web/Google/CalendarSpec.hs
mit
184
0
10
40
56
31
25
8
1
module Main (main) where import ClassyPrelude import System.FilePath.Glob (glob) import Test.DocTest (doctest) main :: IO () main = glob "src/**/*.hs" >>= doDocTest doDocTest :: [String] -> IO () doDocTest options = doctest $ options <> ghcExtensions ghcExtensions :: [String] ghcExtensions = [ "-XConstraintKi...
arowM/ASPico
test/DocTest.hs
mit
1,110
0
7
238
194
119
75
41
1
module Network.Gazelle.Types.Id ( ArtistID(..), SimilarId(..), TorrentID(..), TorrentGroupID(..) ) where import Data.Aeson newtype ArtistID = ArtistID Integer deriving Show instance FromJSON ArtistID where parseJSON v = ArtistID <$> parseJSON v newtype SimilarId = SimilarId Integer deriv...
mr/gazelle
src/Network/Gazelle/Types/Id.hs
mit
700
0
7
140
179
102
77
22
0
module Paths_hangman ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception import Data.Version (Version(..)) import System.Environment (getEnv) import Prelude catchIO :: IO a -> (Exception.IOException -> IO a) -...
diminishedprime/.org
reading-list/haskell_programming_from_first_principles/hangman/.stack-work/dist/x86_64-osx/Cabal-1.22.5.0/build/autogen/Paths_hangman.hs
mit
1,891
0
10
177
362
206
156
28
1
module Rebase.Data.Functor.Compose ( module Data.Functor.Compose ) where import Data.Functor.Compose
nikita-volkov/rebase
library/Rebase/Data/Functor/Compose.hs
mit
104
0
5
12
23
16
7
4
0
module Database.Siege.NetworkHelper where import Control.Monad import Control.Concurrent import Network.Socket listenAt :: Int -> (Socket -> IO ()) -> IO () listenAt port act = do let port' = toEnum port lsock <- socket AF_INET Stream 0 setSocketOption lsock ReuseAddr 1 bindSocket lsock $ SockAddrInet port' i...
DanielWaterworth/siege
src/Database/Siege/NetworkHelper.hs
mit
441
0
13
98
163
76
87
16
1
module Handler.AnalogReadSpec (spec) where import TestImport spec :: Spec spec = withApp $ do describe "getAnalogReadR" $ do error "Spec not implemented: getAnalogReadR"
aufheben/lambda-arduino
test/Handler/AnalogReadSpec.hs
mit
186
0
11
39
44
23
21
6
1
{-# LANGUAGE OverloadedStrings #-} module Test.LDAP.Classy.Dn (dnTests) where import Test.Tasty (TestTree, testGroup) import Test.Tasty.HUnit (Assertion, testCase, (@?=)) import Control.Applicative ((<|>)) import Data.Attoparsec.Text (Parser, eitherRe...
benkolera/haskell-ldap-classy
tests/Test/LDAP/Classy/Dn.hs
mit
7,618
0
15
1,634
1,640
902
738
169
1
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} module Crypto.PubKey.OpenSsh.Encode where import Control.Monad (when) import Data.ByteString.Char8 (ByteString) import Data.Bits (testBit) import Data.List (unfoldr) import Data.Word (Word8) import qualified Data.ByteString as BS import Data.Serialize (Put, Putter,...
knsd/crypto-pubkey-openssh
src/Crypto/PubKey/OpenSsh/Encode.hs
mit
4,335
0
12
1,081
1,140
603
537
104
2
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-} module Data.NGH.Formats.Tests.Sam ( tests ) where import Test.Framework.TH import Test.HUnit import Test.QuickCheck import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 import Data.Maybe import Data.NGH.Alignments import Data.NGH.For...
luispedro/NGH
Data/NGH/Formats/Tests/Sam.hs
mit
2,480
0
12
205
206
125
81
21
1
-- Recommended style of importing. -- YES: -- import qualified Very.Special.Module as VSM -- import Another.Important.Module (printf, (<|>), ) -- -- NO: -- import Very.Special.Module -- import Another.Important.Module hiding (open, close, ) -- -- Nomenclature: the following "reserved words" have a special meaning for t...
iambernie/tryhaskell
somefunctions.hs
mit
11,070
0
15
3,512
3,877
2,099
1,778
206
3
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} import Yesod import Control.Applicative import Data.Text (Text) data MFormExample = MFormExample mkYesod "MFormExample" [parseRoutes| / RootR GET |] in...
cirquit/quizlearner
resources/form/mforms_customfield_3.hs
mit
2,779
0
12
901
497
271
226
48
2
{-# LANGUAGE CPP, NoImplicitPrelude, PackageImports #-} module Data.Functor.Const.Compat ( module Base ) where import "base-compat" Data.Functor.Const.Compat as Base
haskell-compat/base-compat
base-compat-batteries/src/Data/Functor/Const/Compat.hs
mit
169
0
4
21
25
19
6
4
0
{-# htermination delFromFM :: FiniteMap Ordering b -> Ordering -> FiniteMap Ordering b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_delFromFM_11.hs
mit
110
0
3
18
5
3
2
1
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverlappingInstances #-} module System.Console.Questioner ( Question(..) , ChoiceEvent , charToChoiceEvent , listPrompt , checkboxPrompt , module System.Cons...
yamadapc/haskell-questioner
src/System/Console/Questioner.hs
mit
10,376
0
20
4,174
2,528
1,310
1,218
-1
-1
module Main where import System.IO (print) main = print solution revNum :: Integer -> Integer revNum = read . reverse . show palindrome :: Integer -> Bool palindrome n = (show n) == (reverse $ show n) findPali :: Integer -> Int -> Bool findPali n iter | iter == 50 = False | palindrome su...
t00n/ProjectEuler
Euler/Euler55/main.hs
epl-1.0
516
0
11
154
211
109
102
13
2
{- -} module Main ( main ) where {- Standard Library Modules Imported -} import System.Cmd ( system ) import System.Console.GetOpt ( getOpt , usageInfo , ArgOrder ( .. ) , OptDescr ( .. ) , ArgDescr ( .. ) ) import System.Environment ( getArgs , getProgName ) {- External Library Modules ...
allanderek/ipclib
Test/Main.hs
gpl-2.0
4,441
0
14
1,236
804
427
377
86
2
{-# LANGUAGE Arrows #-} {-# LANGUAGE FlexibleContexts #-} module Text.Properties.Node where import Text.Properties.Types import Data.Convertible.Text (ConvertSuccess, cs) import qualified Data.Map as Map import Text.XML.HXT.Core -- Convert an XML node format to a set of properties. -- nodeToProperties nodeToProperti...
d3zd3z/harchive
src/Text/Properties/Node.hs
gpl-2.0
1,865
3
12
375
651
324
327
44
1
--This module contains code for rendering DFDs to Verilog module RenderVerilog (dfdToVerilog) where import Control.Monad import Data.Either import Data.List import Text.Printf import Debug.Trace import Common import DfdDef --IDEA: implement closure support using partial application. This simplifies rewriting applica...
rdnetto/H2V
H2V/RenderVerilog.hs
gpl-2.0
62,911
0
26
27,012
11,348
5,983
5,365
-1
-1
module Main ( main ) where import Sivi import Linear cut :: (Machine m, Backend w) => Double -> Double -> Operation m w () cut d l = chain 5 [ probeHorizontalCylinderRight d l 5 (ProbeTool 3 42) , saw_left d d 1 ] drillings :: (Machine m, Backend w) => Double...
iemxblog/sivi-haskell
examples/handle.hs
gpl-2.0
1,376
0
13
478
545
272
273
38
1
import Text.Pandoc import Text.Pandoc.JSON import Text.Pandoc.CrossRef main :: IO () main = toJSONFilter go where go fmt p@(Pandoc meta _) = runCrossRefIO meta fmt action p where action (Pandoc _ bs) = do meta' <- crossRefMeta bs' <- crossRefBlocks bs return $ Pandoc ...
infotroph/pandoc-crossref
src/pandoc-crossref.hs
gpl-2.0
330
0
12
97
115
57
58
10
1
module GtkBlast.Log ( -- * 'IO' putInvisibleLog -- * 'E' , writeLog , showMessage , clearMessage , tempError , banMessage , uncMessage , redMessage -- * this shouldn't be here , appFile ) where import Import import GtkBlast.Environment import GtkBlast.GtkUti...
exbb2/BlastItWithPiss
src/GtkBlast/Log.hs
gpl-3.0
4,602
0
16
1,215
1,444
708
736
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Numeric.LinearAlgebra.Static.Algorithms -- Copyright : (c) Reiner Pope 2008 -- License : GPL-style -- -- Maintainer : Reiner Pope <reiner.pope@gmail.com> -- Stability : experimental -- Portability : portab...
reinerp/hmatrix-static
Numeric/LinearAlgebra/Static/Algorithms.hs
gpl-3.0
8,652
0
12
2,279
3,869
2,104
1,765
-1
-1
{-| Module : Player Copyright : (c) 2014 Kaashif Hymabaccus License : GPL-3 Maintainer : kaashif@kaashif.co.uk Stability : experimental Portability : POSIX -} module Player where import Vector -- | Player data structure, storing the current position (and will store inventory, health etc) data Player = P...
kaashif/venture
src/Player.hs
gpl-3.0
1,083
0
8
300
234
135
99
12
1
module Teb where import System (getArgs) import System.Directory (getCurrentDirectory, doesDirectoryExist) import System.FilePath (isAbsolute) import Teb.Consts import Teb.Fetch (fetch) import Teb.Init (initialiseRepository) import Teb.Info (info) import Teb.Reinit (reinit) import Teb.Status (status) import Teb.Sync (...
ignesco/teb-h
Teb.hs
gpl-3.0
1,984
66
11
427
628
333
295
58
10
-- | All numbers in the unsorted list are present twice, -- except the one you have to find. import Data.List -- | All numbers in the unsorted list are present twice, -- except the one you have to find. findUnique :: [Int] -> Int findUnique xs = head $ head $ filter (\x -> length x == 1) $ group $ sort xs
yannxia-self/code-war-hasekell-training
find_the_unique_number.hs
gpl-3.0
311
0
12
68
67
36
31
3
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/InstanceGroupManagers/DeleteInstances.hs
mpl-2.0
6,023
0
18
1,337
559
336
223
95
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-run/gen/Network/Google/Resource/Run/Namespaces/Revisions/List.hs
mpl-2.0
7,802
0
25
2,001
1,292
742
550
177
1