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
import Text.Parsec import Control.Applicative hiding ((<|>)) module ParsecUtils ( some , some1 , someAccum , some1Accum ) regex :: ParsecT s u m (ParsecT t v n someType) regex = undefined some :: ParsecT s u m a -> ParsecT s u m b -> ParsecT s u m b some p q | Right _ <- parse p "" "" = error "some applied ...
genisage/parsec-exercises
ParsecRegex.hs
unlicense
2,193
2
11
721
877
439
438
-1
-1
data Tree a = Empty | Node {this::a, left::Tree a, right::Tree a } deriving (Eq,Show,Ord) addLeft :: (Eq a) => Tree a -> Tree a -> Tree a addLeft (Node a l r) y |l == Empty = Node a y r |otherwise = Node a (addLeft l y) r addRight ...
ccqpein/Arithmetic-Exercises
Binary-Trees/AVL-tree/haskell/AVL.hs
apache-2.0
2,017
0
16
653
1,034
501
533
55
1
-- Copyright 2013 Matthew Spellings -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- http://www.apache.org/licenses/LICENSE-2.0 -- Unless required by applicable law or agreed to in wr...
klarh/hasdy
src/Hasdy/Thermostats.hs
apache-2.0
1,105
0
11
185
168
94
74
10
1
-- | Builtin Type and Kind definitions module CLaSH.Core.TysPrim ( liftedTypeKind , typeNatKind , typeSymbolKind , intPrimTy , voidPrimTy , tysPrimMap ) where import Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as HashMap import Unbound....
christiaanb/clash-compiler
clash-lib/src/CLaSH/Core/TysPrim.hs
bsd-2-clause
2,152
0
7
329
383
231
152
47
1
{-# LANGUAGE RecordWildCards #-} -- | Automaton -- minimal implementation. module NLP.TAG.Vanilla.Auto.Mini ( Auto (..) , allIDs , allEdges , AutoR ) where import qualified Control.Monad.State.Strict as E import qualified Data.Set as S import Data.DAWG.Gen.Types (ID) import ...
kawu/tag-vanilla
src/NLP/TAG/Vanilla/Auto/Mini.hs
bsd-2-clause
1,785
0
18
515
509
286
223
33
1
{-# LANGUAGE OverloadedStrings #-} module XmlHtmlWriter ( XmlHtmlWriterOptions(..) , defaultXmlHtmlWriterOptions , writeXmlHtml ) where import Blaze.ByteString.Builder (toByteString) import Control.Monad.State import qualified Data.Text as T import qualified Data.Text.Encoding as T import Text.XmlHtml hidin...
dikmax/haskell-blog
src/XmlHtmlWriter.hs
bsd-2-clause
13,481
0
24
2,822
4,900
2,505
2,395
322
6
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE OverloadedStrings #-} module Web.Twitter.Conduit.Response ( Response (..) , TwitterError (..) , TwitterErrorMessage (..) ) where import Control...
Javran/twitter-conduit
Web/Twitter/Conduit/Response.hs
bsd-2-clause
1,882
0
9
363
404
231
173
45
0
module HasOffers.API.Affiliate.BrandDesign where import Data.Text import GHC.Generics import Data.Aeson import Control.Applicative import Network.HTTP.Client import qualified Data.ByteString.Char8 as BS import HasOffers.API.Common -------------------------------------------------------------------------------...
kelecorix/api-hasoffers
src/HasOffers/API/Affiliate/BrandDesign.hs
bsd-3-clause
322
0
4
31
50
34
16
8
0
{-# LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #-} module Data.ByteString.Nums.Careless.Int where import Prelude hiding (head, tail, null) import Data.Word import Data.Int import Data.ByteString hiding (head, pack) import Data.ByteString.Internal import Data....
solidsnack/bytestring-nums
Data/ByteString/Nums/Careless/Int.hs
bsd-3-clause
4,440
0
10
1,572
986
521
465
91
1
-- | A small logging framework for Guide, implemented as a wrapper over the -- "di" package. -- -- Used mostly in "Guide.Main" and "Guide.Api.Methods". -- -- Some internals are exposed in modules under @Guider.Logger.*@, but you -- shouldn't need them. If you do, consider exporting them from this module. module Guide.L...
aelve/guide
back/src/Guide/Logger.hs
bsd-3-clause
764
0
4
133
90
64
26
13
0
{-# LANGUAGE PatternGuards #-} module FPPrac.GUI.Prompt ( drawPrompt ) where import Graphics.Gloss titleshift :: Float titleshift = 4 titlebarheight :: Float titlebarheight = 16 titlebarShift :: Float titlebarShift = 8 lblVshift :: Float lblVshift = -6 drawPrompt :: (String,String) -> String -...
christiaanb/fpprac
src/FPPrac/GUI/Prompt.hs
bsd-3-clause
1,267
0
15
263
485
253
232
40
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} -- Note [Pass...
snoyberg/ghc
compiler/hsSyn/HsDecls.hs
bsd-3-clause
80,837
0
17
23,288
12,646
6,946
5,700
924
7
{-# LANGUAGE OverloadedStrings, RecordWildCards, ScopedTypeVariables #-} module Properties where import Control.Applicative (Const) import Data.Aeson (eitherDecode) import Data.Aeson.Encode (encode) import Data.Aeson.Internal (IResult(..), formatError, ifromJSON, iparse) import Data.Aeson.Parser (value) import Data.A...
roelvandijk/aeson
tests/Properties.hs
bsd-3-clause
10,903
0
19
2,373
2,810
1,491
1,319
186
3
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Flexib...
RudolfVonKrugstein/diagrams-wxHaskell
src/Diagrams/Backend/WX/Internals.hs
bsd-3-clause
16,068
2
18
5,276
3,658
1,911
1,747
278
3
module FunVM.JsCompiler ( compile ) where import Data.List import FunVM.Core.Destructors import FunVM.Core.Syntax data Js = Js { unJs :: String } instance Show Js where show (Js s) = s cv :: Val -> Js cv (Lit (Integer x _)) = Js $ show x cv (Lit (Char c)) = Js $ show c cv (Lit (String s)) = Js $ show...
tomlokhorst/FunVM
src/FunVM/JsCompiler.hs
bsd-3-clause
2,218
0
15
679
1,046
536
510
49
3
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} module Reflex.Dom.Builder.InputDisabled wh...
reflex-frp/reflex-dom
reflex-dom-core/src/Reflex/Dom/Builder/InputDisabled.hs
bsd-3-clause
4,627
0
14
692
1,162
606
556
77
1
---------------------------------------------------------------------------- -- | -- Module : Math.LinearRecursive.Monad -- Copyright : (c) Bin Jin 2011 -- License : BSD3 -- -- Maintainer : bjin1990+haskell@gmail.com -- Stability : experimental -- Portability : portable -- -- A monad to calculate l...
bjin/monad-lrs
Math/LinearRecursive/Monad.hs
bsd-3-clause
10,091
0
16
2,188
2,382
1,302
1,080
119
1
{-# LANGUAGE DeriveDataTypeable #-} module App.TeamDetails.Repository (findTeam, getTeam, findTeamAndMap, saveTeam, saveMaybeTeam, getTeamNames, saveNewTeam, deleteTeam) where import App.TeamDetails.Types (TeamDetails(..)) import App.Helper.FileDB(listEntities, findEntity, saveEntity, deleteEntity) import Control.Exc...
afcastano/cafe-duty
src/App/TeamDetails/Repository.hs
bsd-3-clause
1,852
0
13
449
583
291
292
40
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE MagicHash #-} ----------------------------------------------------------------------------- -- | -- Module : Pretty -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : David Terei <code@davidterei....
sdiehl/ghc
compiler/utils/Pretty.hs
bsd-3-clause
38,527
0
26
12,118
8,512
4,484
4,028
518
18
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Description: Types defining the protocol for client/server interaction -- with synchronised. module Synchronise.Network.Protocol where import Control.Applicative impo...
anchor/synchronise
lib/Synchronise/Network/Protocol.hs
bsd-3-clause
6,739
0
11
1,356
1,480
799
681
153
2
{-# OPTIONS -Wall #-} {-# LANGUAGE OverloadedStrings #-} module Language.Pck.Tool.Debugger ( -- * Debugger drivers runDbg , runDbgIO , evalProgDbg -- * Data type -- ** trace , TrcLog , DbgTrc(..) -- ** break , DbgBrk(..) , DbgO...
takenobu-hs/processor-creative-kit
Language/Pck/Tool/Debugger.hs
bsd-3-clause
9,534
0
17
3,625
2,211
1,182
1,029
174
6
{-# LANGUAGE OverloadedStrings, NoImplicitPrelude #-} module NLP.Albemarle.Tokens ( icuTokenize , whitespaceTokenize , wordTokenize ) where import ClassyPrelude import NLP.Albemarle import Data.Text (Text) import Control.Applicative ((<$>)) import qualified Data.Text.ICU as ICU import qualified Data.Tex...
SeanTater/albemarle
src/NLP/Albemarle/Tokens.hs
bsd-3-clause
804
0
11
130
171
103
68
20
1
----------------------------------------------------------------------------- -- | -- Module : Plugins.Monitors.Common -- Copyright : (c) Andrea Rossato -- License : BSD-style (see LICENSE) -- -- Maintainer : Andrea Rossato <andrea.rossato@unibz.it> -- Stability : unstable -- Portability : unportab...
neglectedvalue/xmobar-freebsd
Plugins/Monitors/Common.hs
bsd-3-clause
9,738
0
18
3,274
2,898
1,479
1,419
225
6
-- | Encode deterministic pushdown automata as functions module DPDA where -- We want the stack to be our "evaluation stack" (even if the -- language does not use one per se). {- We will be using a simple parser as an example. Our language shall be formula with variables "a" and "b", binary operators "+" and ...
xicesky/sky-haskell-playground
src/Sky/Parsing/DPDA.hs
bsd-3-clause
2,660
0
10
1,046
600
342
258
31
1
-- copied from taffybar, and tweaked -- -- | A vertical bar that can plot data in the range [0, 1]. The -- colors are configurable. module VerticalBar ( -- * Types VerticalBarHandle, BarConfig(..), BarDirection(..), -- * Accessors/Constructors verticalBarNew, verticalBarSetPercent, verticalBarSetToolti...
vincenthz/topbar
src/VerticalBar.hs
bsd-3-clause
5,260
0
18
1,586
1,368
700
668
107
4
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} module CO4.Thesis.Fib where import Language.Haskell.TH (runIO) import qualified Satchmo.Core.SAT.Minisat import qualified Satchmo....
apunktbau/co4
test/CO4/Thesis/Fib.hs
gpl-3.0
1,176
0
9
448
176
101
75
37
1
module Model where import Prelude import Yesod import Data.Text (Text) -- You can define all of your database entities in the entities file. -- You can find more information on persistent and how to declare entities -- at: -- http://www.yesodweb.com/book/persistent/ share [mkPersist sqlSettings, mkMigrate "migrateAl...
axman6/MovieServer
Model.hs
bsd-2-clause
355
0
8
50
51
29
22
-1
-1
-- | Wrappers for the various solvers. module Solver ( Solver , solvers) where import Common.Body import qualified Solver.ListBH.Solver as SolverLB import qualified Data.Vector.Unboxed as V import qualified Solver.VectorBH.Solver as SolverVB import qualified Solver.VectorNaive.Solver as SolverVN import qualifi...
mainland/dph
dph-examples/examples/real/NBody/Solver.hs
bsd-3-clause
1,424
50
11
225
382
223
159
36
1
{-# LANGUAGE OverloadedLists #-} {-# LANGUAGE QuasiQuotes #-} -- | Boolean functions, like in "Data.Bool". -- -- This module should be imported qualified to avoid clashes with standard -- Haskell definitions. module Stg.Prelude.Bool ( and2, or2, not, bool, eq_Bool, ) where import Prelude () ...
quchen/stg
src/Stg/Prelude/Bool.hs
bsd-3-clause
1,689
0
4
581
132
106
26
17
1
{-# OPTIONS_GHC -fglasgow-exts #-} module Main where import Data.Maybe ( fromMaybe ) main = print (fromMaybe 0 (Just 3)) {- data Foo = Foo0 | Foo2 Foo Foo instance Show Foo where show Foo0 = "*" show (Foo2 f1 f2) = "(" ++ show f1 ++ "-" ++ show f2 ++ ")" f x ys = [ (x, y) | Just y <- ys ...
CristhianMotoche/scion
tests/Test001.hs
bsd-3-clause
547
0
9
201
151
79
72
-1
-1
{-# LANGUAGE DeriveGeneric #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Haddock -- Copyright : Isaac Jones 2003-2005 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This module deals ...
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/Simple/Haddock.hs
bsd-3-clause
32,429
0
26
9,837
7,206
3,715
3,491
583
8
module Pkg.PParser where import Core.CoreParser import Core.TT import Idris.REPL import Idris.AbsSyntaxTree import Paths_idris import Text.ParserCombinators.Parsec import Text.ParserCombinators.Parsec.Error import Text.ParserCombinators.Parsec.Expr import Text.ParserCombinators.Parsec.Language import qualified Text....
christiaanb/Idris-dev
src/Pkg/PParser.hs
bsd-3-clause
3,307
0
20
1,167
1,043
522
521
88
2
{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} module SPL.Parser2 (P (..), Syntax (..), SynParams (..), parse, res) where import Data.Map as M hiding (map) -- UNUSED import System.IO.Unsafe data SynMark = MarkR deriving (Eq, Show) data SynParams = SynK [Syntax]...
ingvar-lynn/HNC
SPL/Parser2.hs
lgpl-3.0
9,747
226
19
2,233
6,793
3,674
3,119
266
6
import "hint" HLint.Default ignore "Use fromMaybe" ignore "Parse error"
ekmett/ermine
HLint.hs
bsd-2-clause
73
0
5
10
19
8
11
-1
-1
import Data.Time.Calendar import Data.Time.Calendar.WeekDate p19 = length [() | y <- [1901..2000], m <- [1..12], let (_, _, d) = toWeekDate $ fromGregorian y m 1, d == 7]
luoyetx/Coding4Fun
euler/p019.hs
bsd-3-clause
229
0
12
87
92
50
42
6
1
-- | Terminal control. Internal QuickCheck module. module Test.QuickCheck.Text ( Str(..) , ranges , number , short , showErr , oneLine , isOneLine , bold , newTerminal , withStdioTerminal , withNullTerminal , terminalOutput , handle , Terminal , putTemp , putPart , putLine ) where...
srhb/quickcheck
Test/QuickCheck/Text.hs
bsd-3-clause
3,506
0
14
774
1,250
648
602
100
2
{-# LANGUAGE CPP #-} module CodeGen.Platform.SPARC where import GhcPrelude #define MACHREGS_NO_REGS 0 #define MACHREGS_sparc 1 #include "../../../../includes/CodeGen.Platform.hs"
ezyang/ghc
compiler/codeGen/CodeGen/Platform/SPARC.hs
bsd-3-clause
183
0
3
21
14
11
3
3
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE PolyKinds #-} {-# OPTIONS_GHC -ddump-deriv -fprint-explicit-kinds #-} module T10604_deriving where import GHC.Generics data Empty (a :: Bool) deriving (Generic, Generic1) data Proxy (a :: k) = Proxy deriving (Fun...
ezyang/ghc
testsuite/tests/generics/T10604/T10604_deriving.hs
bsd-3-clause
682
0
10
119
224
130
94
-1
-1
module Rebase.Data.Functor.Reverse ( module Data.Functor.Reverse ) where import Data.Functor.Reverse
nikita-volkov/rebase
library/Rebase/Data/Functor/Reverse.hs
mit
104
0
5
12
23
16
7
4
0
module Backend.OptimizeAsm (preOptimMod, optimMod, substBlock, readVarsB, readVarsCCC, whnfTag) where import Data.Either import Data.List (lookup, elemIndex) import Data.Map (Map, fromList, (!)) import Data.Maybe (fromMaybe, catMaybes, listToMaybe) import Debug.Trace import Backend.AsmLang preOptimMod :: String -> A...
comonoidial/ALFIN
Backend/OptimizeAsm.hs
mit
30,367
0
19
7,042
14,810
7,806
7,004
446
6
module GitHub.Repositories.Commits where import GitHub.Internal --| GET /repos/:owner/:repo/commits listRepositoryCommits :: OwnerName -> RepoName -> Maybe Sha -> Maybe Path -> Maybe Author -> Maybe UTCTime -> Maybe UTCTime -> GitHub CommitsData --| GET /repos/:owner/:repo/commits/:sha getCommit :: OwnerName...
SaneApp/github-api
src/GitHub/Repositories/Commits.hs
mit
477
30
12
73
216
106
110
-1
-1
module Hablog.Admin.Pages ( home , login , logout , entryNew , entryList ) where import Prelude hiding (head) import Control.Monad.Trans.Class (lift) import Hablog.Admin.Pages.Login (login) import Hablog.Admin.Pages.Entry (entryNew, entryList) import Hablog.Data (Page) import Hablog.Data.Ses...
garrettpauls/Hablog
src/Hablog/Admin/Pages.hs
mit
1,497
0
18
325
502
275
227
41
1
{-# LANGUAGE DataKinds, TypeOperators, TypeApplications #-} import Control.Monad import Control.Monad.Except import Control.Monad.Logger import Data.Aeson import Data.Aeson.TH import Data.Aeson.Encode.Pretty (encodePrettyToTextBuilder', defConfig) import qualified Data.ByteString.Lazy as BS import qualified Data.Text.L...
myuon/DOTO
src/App.hs
mit
2,017
0
19
356
625
336
289
62
2
-- | Contains @newtype@ wrapper around logger name to support hierarchy. module System.Wlog.LoggerName ( LoggerName (..) ) where import Universum import Data.Aeson.Types (ToJSON, ToJSONKey (..), toJSONKeyText) import Fmt (Buildable(..)) -- | Logger name to keep in context. newtype LoggerName = LoggerN...
serokell/log-warper
src/System/Wlog/LoggerName.hs
mit
1,053
0
9
208
229
125
104
21
0
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections, LambdaCase, RecordWildCards, OverloadedStrings, ScopedTypeVariables, FlexibleContexts #-} module HsToCoq.ConvertHaskell.Declarations.Instances ( convertClsInstDecls ) where import Control.Lens ...
antalsz/hs-to-coq
src/lib/HsToCoq/ConvertHaskell/Declarations/Instances.hs
mit
19,863
55
23
5,553
4,414
2,259
2,155
-1
-1
isPrime :: Integer -> Bool isPrime n = and [ n `mod` i /= 0 | i <- [2..n-1]] primeList :: Integer -> [Integer] primeList n = filter isPrime [2..n]
mino2357/Hello_Haskell
2018-02-24.hsproj/Main.hs
mit
147
0
10
30
81
43
38
4
1
-- By starting at the top of the triangle below and moving to adjacent -- numbers on the row below, the maximum total from top to bottom is -- 23. -- _3_ -- _7_ 4 -- 2 _4_ 6 -- 8 5 _9_ 3 -- That is, 3 + 7 + 4 + 9 = 23. -- Find the maximum total from top to bottom of the triangle below: -- ...
whittle/euler
src/Euler/Problem018.hs
mit
1,951
0
11
757
257
156
101
16
2
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Com.Mysql.Cj.Mysqlx.Protobuf.Open.CtxOperation (CtxOperation(..)) where import Prelude ((+), (/), (.)) import qualified Prelude as Prelude' import qualified Dat...
naoto-ogawa/h-xproto-mysql
src/Com/Mysql/Cj/Mysqlx/Protobuf/Open/CtxOperation.hs
mit
2,754
0
11
418
638
352
286
54
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DuplicateRecordFields #-} module PostgREST.DbRequestBuilder ( readRequest , mutateRequest , fieldNames ) where import Control.Applicative import Control.Arrow ((***)) import Control.Lens.Getter (view) import C...
Skyfold/postgrest
src/PostgREST/DbRequestBuilder.hs
mit
13,206
281
28
3,603
3,373
1,853
1,520
204
10
{-# LANGUAGE TupleSections #-} module Data.Graphics.BoundingBox where import Control.Arrow import Control.Monad import Data.Foldable import Control.Logic.Frege ((<<-), adjoin) -- http://lpaste.net/111101 -- a solution to the problem posted by http://lpaste.net/4021501857770766336 type Index = Int {-- Th...
geophf/1HaskellADay
exercises/HAD/Data/Graphics/BoundingBox.hs
mit
3,133
0
12
602
777
432
345
-1
-1
{-# LANGUAGE CPP #-} module GHCJS.DOM.WebKitSubtleCrypto ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.WebKitSubtleCrypto #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.J...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/WebKitSubtleCrypto.hs
mit
367
0
5
33
33
26
7
4
0
module Language.Jass.CAPI.JIT.Calling( ) where import Language.Jass.CAPI.Base import Language.Jass.CAPI.JIT.Module import Language.Jass.JIT.Module import Foreign.C.String import Foreign.C.Types import Foreign.Ptr import Foreign.Storable import LLVM.General.ExecutionEngine import LLVM.General.AST cGetJassFuncPtr ::...
NCrashed/hjass
src/library/Language/Jass/CAPI/JIT/Calling.hs
mit
980
0
19
211
282
144
138
26
3
---------------------------------------------------------------------------- ---- Examples ---- Examples ---- Examples ---- Examples ---- Examples ---- ---------------------------------------------------------------------------- module Main ( main, test ) where import Neuro.DSL import Neuro.Show.Tikz import qualifie...
fehu/hneuro
src/Test1.hs
mit
1,351
0
18
522
364
184
180
20
1
module PureScript.Ide.Error (ErrorMsg, Error(..), textError, first) where import Data.Aeson import Data.Monoid import Data.Text (Text, pack) import PureScript.Ide.Types (ModuleIdent) import qualified Text.Parsec.Error as P type ErrorMsg = Strin...
nwolverson/psc-ide
src/PureScript/Ide/Error.hs
mit
1,461
0
9
421
383
208
175
31
1
s1 = [ x^2 | x <-[0..10], x < 10] s2 = [ (x, y) | x <- [1..4], y <- [1..4]] map' f xs = [ f x | x <- xs] -- pi series :: Int -> [Double] series n =[1/(2*(fromIntegral k)+1) * (-1)^k | k <- [0..n]] pi2 = 4 * (sum $ series 200000) -- series' :: Int -> [Double] -- -- series' n = [(5^(2*k+1)/(((2*(fromIntegral k)+1...
dalonng/hellos
haskell.hello/ListComprehension.hs
gpl-2.0
1,305
15
13
329
769
407
362
28
2
{-# LANGUAGE TemplateHaskell #-} module Ocram.Intermediate.NormalizeCriticalCalls -- exports {{{1 ( normalize_critical_calls ) where -- imports {{{1 import Data.Generics (everywhereM, mkM) import Control.Monad (liftM) import Control.Monad.State (State, runState, put, get, modify) import Language.C.Syntax.AST import ...
copton/ocram
ocram/src/Ocram/Intermediate/NormalizeCriticalCalls.hs
gpl-2.0
3,578
47
22
1,043
1,337
719
618
76
12
module Config where -- | Path to the post directory. postsDir :: FilePath postsDir = "posts/" -- | Path to the file describing all blog posts. postsFile :: FilePath postsFile = postsDir ++ "postlist" blogRoot :: String blogRoot = "http://" ++ serverAddress googleAnalyticsId :: String googleAnalyticsId = "UA-407148...
gibiansky/blog
Config.hs
gpl-2.0
391
0
5
61
64
39
25
11
1
-- GenI surface realiser -- Copyright (C) 2005 Carlos Areces and Eric Kow -- -- 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 ...
kowey/GenI
src/NLP/GenI/Parser.hs
gpl-2.0
21,945
394
16
5,895
4,691
2,674
2,017
410
5
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveDataTypeable #-} module Grammatik.CF.Instance.Config ( Config (..) -- , Long (..) , module Autolib.Long ) where -- -- $Id$ import Language.Syntax import Grammatik.Property import Autolib.Long import Autolib.ToDoc import Autolib.Reader import Data.Typeable dat...
marcellussiegburg/autotool
collection/src/Grammatik/CF/Instance/Config.hs
gpl-2.0
561
3
10
118
143
90
53
18
0
module ScopeMap where import Stack as Stack import qualified Data.Map as HashTable type HashTable a = HashTable.Map String a type ScopeMap a = Stack (HashTable a, Bool) empty :: ScopeMap a empty = Stack.empty enscope :: ScopeMap a -> Bool -> ScopeMap a enscope st bl = Stack.push (HashTable.empty, bl) st descope ::...
gangsterveggies/julia-pinheiro-compiler
ScopeMap.hs
gpl-2.0
1,477
0
16
324
358
182
176
21
2
{-| This is the entry point to hledger's reading system, which can read Journals from various data formats. Use this module if you want to parse journal data or read journal files. Generally it should not be necessary to import modules below this one. -} {-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-} module...
mstksg/hledger
hledger-lib/Hledger/Read.hs
gpl-3.0
11,370
0
15
2,182
2,023
1,102
921
176
4
{-# LANGUAGE FlexibleInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Hoodle.Type.Event -- Copyright : (c) 2011-2013 Ian-Woo Kim -- -- License : BSD3 -- Maintainer : Ian-Woo Kim <ianwookim@gmail.com> -- Stability : experimental -- Portability :...
wavewave/hoodle-core
src/Hoodle/Type/Event.hs
gpl-3.0
9,198
0
11
4,062
1,236
751
485
223
3
{-| Module : Data.HdrHistogram.Mutable Copyright : (c) Josh Bohde, 2015 License : GPL-3 Maintainer : josh@joshbohde.com Stability : experimental Portability : POSIX A Haskell implementation of <http://www.hdrhistogram.org/ HdrHistogram>. It allows storing counts of observed values within a range, while m...
joshbohde/hdr-histogram
src/Data/HdrHistogram/Mutable.hs
gpl-3.0
5,002
0
11
1,213
1,300
684
616
77
1
module UnderstandingMonads.Examples.While where import Control.Applicative ----------------------------------------- -- Base definitions for the module ----------------------------------------- type Z = Integer type T = Bool type State = Var -> Z type Var = String data Aexp = N Integer ...
EduardoGR/Understanding-Monads
src/Monad/While.hs
gpl-3.0
3,673
0
15
1,374
1,436
757
679
87
2
{-| Module : Craeft.AST Description : The untyped Craeft Abstract Syntax Tree. Copyright : (c) Ian Kuehne, 2017 License : GPL-3 Maintainer : ikuehne@caltech.edu Stability : experimental The Craeft abstract syntax tree consists of a series of transparent algebraic data types, containing the information ne...
ikuehne/craeft-hs
lib/Craeft/AST.hs
gpl-3.0
3,234
0
10
818
491
300
191
61
0
{- go-analyze Copyright (C) 2015 Emily A. Bellows 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 program is dist...
rainbowbismuth/go-analyze
src/Go/Parser.hs
gpl-3.0
10,030
0
15
2,671
3,333
1,676
1,657
339
9
{-# OPTIONS_HADDOCK show-extensions #-} {-# OPTIONS_GHC -fno-warn-tabs #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-| Module : Sigma Description : Alphabet and symbols Copyright : (c) Jorge Santiago Alvarez Cuadros, 2016 Licens...
sanjorgek/turingMachine
src/Data/Sigma.hs
gpl-3.0
2,587
2
14
561
596
330
266
49
2
{-# LANGUAGE UnicodeSyntax, NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE PatternGuards #-} module Layout.Modifier ( Modifier(..) , Shiftstate , Shiftlevel , toBaseModifier , toEqualModifiers , getEqualModifiers , controlMods , ...
39aldo39/klfc
src/Layout/Modifier.hs
gpl-3.0
4,162
0
14
798
1,246
709
537
119
1
module Hadolint.Rule.DL3008 (rule) where import qualified Data.Text as Text import Hadolint.Rule import Hadolint.Shell (ParsedShell) import qualified Hadolint.Shell as Shell import Language.Docker.Syntax rule :: Rule ParsedShell rule = simpleRule code severity message check where code = "DL3008" severity = ...
lukasmartinelli/hadolint
src/Hadolint/Rule/DL3008.hs
gpl-3.0
1,048
0
11
198
276
153
123
23
2
{- Copyright 2009-2010 Uwe Hollerbach <uh@alumni.caltech.edu> This file is part of umm, Uwe's Money Manager. umm 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 optio...
np/umm
UMMData.hs
gpl-3.0
23,577
0
18
6,432
8,447
4,457
3,990
493
12
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Docs.Types....
brendanhay/gogol
gogol-docs/gen/Network/Google/Docs/Types/Product.hs
mpl-2.0
466,980
0
42
106,520
74,324
42,881
31,443
8,675
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/MachineTypes/Get.hs
mpl-2.0
3,758
0
16
903
468
280
188
77
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-ses/gen/Network/AWS/SES/GetIdentityDkimAttributes.hs
mpl-2.0
5,232
0
10
952
512
314
198
58
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-resourcemanager/gen/Network/Google/Resource/CloudResourceManager/TagValues/TestIAMPermissions.hs
mpl-2.0
6,022
0
16
1,263
784
460
324
117
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.AbusiveExperienceReport.Types -- Copyright : (c) 2015-...
brendanhay/gogol
gogol-abusiveexperiencereport/gen/Network/Google/AbusiveExperienceReport/Types.hs
mpl-2.0
1,741
0
7
316
134
96
38
32
1
module Model.Comment.HandlerInfo ( CommentHandlerInfo(..) , projectCommentHandlerInfo , wikiPageCommentHandlerInfo ) where import Import import Model.Comment.ActionPermissions import Model.Comment.Mods import Model.Comment.Routes import Model.Comment.Sql -- | Data type that packages together the nece...
Happy0/snowdrift
Model/Comment/HandlerInfo.hs
agpl-3.0
1,549
0
9
260
264
146
118
25
1
module Network.HighHock.Runtime ( Runtime(..) , createRuntime , Config(..) , dockerClientOpts , setupLogging ) where import qualified Data.Text as T import qualified Network.BSD as N import qualified Data.ByteString.Lazy as BS import qualified Network.Docker.Types as D import ...
bluepeppers/highhockwho
src/Network/HighHock/Runtime.hs
agpl-3.0
5,180
4
19
1,091
1,670
847
823
-1
-1
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-} module Text.Fractions where import Control.Applicative import Data.Ratio ((%)) import Text.RawString.QQ import Text.Trifecta type FractionOrDecimal = Either Rational Integer eitherSuccess :: String eitherSuccess = [r| 123 1/2 23 3/23 |] eitherFail :: String eitherF...
dmvianna/haskellbook
src/Ch24-FractionsEx.hs
unlicense
1,189
0
12
303
298
157
141
35
2
{-# LANGUAGE CPP #-} {-# LANGUAGE Rank2Types #-} module System.IO.Machine where #if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$>)) #endif import Control.Monad.IO.Class (MonadIO, liftIO) import Data.IOData (IOData, hGetChunk, hGetLine, hPut, hPutStrLn) import Data.Machine import Data.Word (Word8) import Sy...
aloiscochard/machines-io
src/System/IO/Machine.hs
apache-2.0
2,372
0
13
502
1,055
555
500
55
2
{-# LANGUAGE BangPatterns #-} ----------------------------------------------------------------------------- -- -- Module : AI.Network.RNN.Util -- Copyright : (c) JP Moresmau -- License : BSD3 -- -- Maintainer : JP Moresmau <jp@moresmau.fr> -- Stability : experimental -- Portability : -- -- | Utility ...
JPMoresmau/rnn
src/AI/Network/RNN/Util.hs
bsd-2-clause
5,839
0
18
1,825
2,216
1,193
1,023
118
3
{-# LANGUAGE GADTs #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeOperators #-} {-# LAN...
pbl64k/gpif-datakinds
src/Control/IxFunctor.hs
bsd-2-clause
1,684
0
5
441
201
147
54
73
0
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, UndecidableInstances, ScopedTypeVariables, FlexibleContexts, FlexibleInstances, EmptyDataDecls #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Type.Binary.Internals -- Copyright : (C) 2006-2007 E...
ekmett/type-int
Data/Type/Binary/Internals.hs
bsd-2-clause
16,861
0
11
4,058
6,953
3,554
3,399
-1
-1
module GLUtil.UI where -- the ui elements and how they are drawn are defined import Graphics.GL import qualified Graphics.Rendering.OpenGL as GL import qualified GLUtil.ABFA as GLFW import GLUtil.Font import GLUtil.Util import GLUtil.Draw import GLUtil.Textures import ABFA.State import ABFA.Settings import ABFA.Game i...
coghex/abridgefaraway
src/GLUtil/UI.hs
bsd-3-clause
6,592
0
15
1,446
2,318
1,192
1,126
144
1
-- Copyright (c) 2015 Eric McCorkle. All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditi...
emc2/iridium
src/IR/FlatIR/Syntax.hs
bsd-3-clause
60,131
26
17
18,622
14,503
7,955
6,548
1,004
2
{-# OPTIONS_GHC -fno-warn-orphans #-} module Binary.Fast where import Control.Applicative import Data.Binary import Data.ByteString.Char8 (ByteString) import Foreign import qualified Data.ByteString.Char8 as SB import qualified Data.ByteString.Lazy as LB import qualified Data.Vector.Storable as V import GraphicsPipel...
csabahruska/GFXDemo
Binary/Fast.hs
bsd-3-clause
2,312
0
11
732
860
427
433
65
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} module Textures (texturedRectangle) where import Text.RawString.QQ import qualified Graphics.UI.GLFW as GLFW import qualified GLWrap as GL import qualified Data.ByteString as B impor...
binarin/learnopengl
src/Textures.hs
bsd-3-clause
5,513
0
15
1,361
1,542
768
774
120
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} module Servant.Server.UsingContextSpec where import Network.Wai import Test.Hspec (Spec, describe, it) import Test.Hspec.Wai import Servant import ...
zerobuzz/servant
servant-server/test/Servant/Server/UsingContextSpec.hs
bsd-3-clause
3,670
0
17
747
949
491
458
94
1
module FetchSpec (main, spec) where import Fetch import Test.Hspec import Test.QuickCheck import Test.QuickCheck.Instances main :: IO () main = hspec spec spec :: Spec spec = do describe "someFunction" $ do it "should work fine" $ do property someFunction someFunction :: Bool -> Bool -> Property someFu...
athanclark/hackage-use
test/FetchSpec.hs
bsd-3-clause
341
0
13
70
112
59
53
14
1
{-# LANGUAGE DeriveDataTypeable, DeriveFoldable, DeriveTraversable, DeriveFunctor #-} module Language.Haskell.AST.Exts.TypeFamilies where import Data.Data import Data.Foldable (Foldable) import Data.Traversable (Traversable) import Language.Haskell.AST.Core hiding ( Decl, ClassBody, InstBody ) import Language.Haskel...
jcpetruzza/haskell-ast
src/Language/Haskell/AST/Exts/TypeFamilies.hs
bsd-3-clause
2,876
0
10
777
1,057
559
498
45
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE PackageImports #-} module Main where import Criterion.Main import Crypto.Hash.Algorithms as Crypto import "cryptonite" Crypto.KDF.PBKDF2 as Crypto import "fastpbkdf2" Crypto.KDF.PBKDF2 as Fast import ...
adinapoli/fastpbkdf2-hs
bench/Bench.hs
bsd-3-clause
1,198
0
14
283
305
166
139
22
1
{-# LANGUAGE OverloadedStrings #-} module Main ( main ) where import Control.Applicative import Options.Applicative import Smoke.C import Smoke.Gen data Opts = Opts { qDestDir :: FilePath , qCabalTemplate :: FilePath , qLibrary :: String } deriving (Show) ...
travitch/humidor
tools/humidor-gen.hs
bsd-3-clause
1,282
0
13
387
303
154
149
33
1
{-# LANGUAGE OverloadedStrings, BangPatterns #-} -- ----------------------------------------------------------------------------- -- | -- Module : Ircfs.Process -- Copyright : (c) Andreas-Christoph Bernstein 2011 -- License : BSD3-style (see LICENSE) -- -- Maintainer : andreas.bernstein@googlemail.com -...
bernstein/ircfs
Ircfs/Misc.hs
bsd-3-clause
3,183
0
16
694
1,043
563
480
76
3
module Advent.Day2Spec where import Test.Hspec import Advent.Day2 spec :: Spec spec = describe "Day 2" $ do it "parses dimensions" $ -- A present with dimensions 2x3x4 requires 2+2+3+3 = 10 feet of ribbon to wrap the present plus 2*3*4 = 24 feet of ribbon for the bow, for a total of 34 feet. -- ribb...
screamish/adventofhaskellcode
test/Advent/Day2Spec.hs
bsd-3-clause
583
0
11
137
122
67
55
12
1
{-# LANGUAGE OverloadedStrings, FlexibleInstances #-} -- | For practical examples see "Qualys.Cookbook.HostListDetection". module Qualys.HostListDetection ( -- * Actions runHostListDetection , getHostListDetection -- * Options , hldoActKernelOnly , hldoIds , hldoIdMin , hldoIdMax ...
ahodgen/qualys
Qualys/HostListDetection.hs
bsd-3-clause
12,186
0
24
3,076
3,007
1,613
1,394
225
3
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedLists #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE PatternSynonyms #-} {-# LANG...
esmolanka/sexp-grammar
sexp-grammar/test/Main.hs
bsd-3-clause
18,540
0
20
4,412
6,239
3,252
2,987
473
3
{-# LANGUAGE OverloadedStrings #-} module Vacuole.UI.Draw (showGraph, canvasClear, linkStrength) where import Haste.Prim import Haste.JSON import Control.Monad import qualified Data.IntMap as Map import Vacuole.View.Types import qualified Vacuole.UI.Vec as Vec import Vacuole.UI.Multi import V...
llelf/vacuole
Vacuole/UI/Draw.hs
bsd-3-clause
1,852
0
18
482
671
339
332
55
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Evaluators -- Copyright : (c) Sven Panne 2002-2005 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : sven.panne@aedion.de -- Stability : prov...
FranklinChen/hugs98-plus-Sep2006
packages/OpenGL/Graphics/Rendering/OpenGL/GL/Evaluators.hs
bsd-3-clause
23,907
145
30
5,085
6,745
3,514
3,231
-1
-1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} -- | Construct a @Plan@ for how to build module Stack.Build.ConstructPlan ( constr...
meiersi-11ce/stack
src/Stack/Build/ConstructPlan.hs
bsd-3-clause
23,252
0
27
7,586
6,028
3,031
2,997
512
9
#define IncludedmapLenFusion {-@ automatic-instances mapLenFusion @-} mapLenFusion :: RString -> RString -> RString -> RString -> List Integer -> Proof {-@ mapLenFusion :: tg:RString -> xi:RString -> yi:RString -> zi:RString -> zis:List (GoodIndex zi tg) -> {map (shiftStringRight tg xi (yi <+> z...
nikivazou/verified_string_matching
src/AutoProofs/mapLenFusion.hs
bsd-3-clause
682
0
11
164
142
72
70
8
1
{-| Module : Data.Index Description : Definition of nat-indices. Copyright : (c) Alexander Vieth, 2015 Licence : BSD3 Maintainer : aovieth@gmail.com Stability : experimental Portability : non-portable (GHC only) -} {-# LANGUAGE AutoDeriveTypeable #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE DataKinds #-} ...
avieth/Algebraic
Data/Algebraic/Index.hs
bsd-3-clause
989
0
10
255
252
144
108
41
1