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
-- Mainly provides a kind checker on types module Language.Granule.Checker.Kinds ( inferKindOfType , inferKindOfTypeInContext , hasLub , joinKind , mguCoeffectTypesFromCoeffects , inferCoeffectType...
dorchard/gram_lang
frontend/src/Language/Granule/Checker/Kinds.hs
bsd-3-clause
12,958
0
20
3,617
3,710
1,914
1,796
-1
-1
import Diagrams.Backend.Cairo.CmdLine import Diagrams.TwoD.Apollonian main = defaultMain (apollonianGasket (1/500) 1 1 1)
diagrams/diagrams-test
misc/ApollonianTest.hs
bsd-3-clause
122
1
9
12
44
23
21
3
1
module Evaluator where import Tokenizer import Conversion import Data.IORef import Data.Maybe import Data.List import Control.Monad.Error import Control.Monad.Reader import Control.Monad.Trans.Class import qualified Data.Traversable as Traversable import Debug.Trace data PHPError = UndefinedVariable String ...
jhartikainen/hs-language-php
Evaluator.hs
bsd-3-clause
14,793
0
23
4,563
4,699
2,251
2,448
342
24
{-# LANGUAGE TupleSections #-} module Day17 where -- Improvements to Day12 import Control.Monad (when) import Control.Monad.Gen import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Either import qualified Data.Map as Map data Type = Function Type Type | RecordT [(String, Type)] | VariantT [(Stri...
joelburget/daily-typecheckers
src/Day18.hs
bsd-3-clause
7,686
0
23
2,367
1,998
1,016
982
162
10
{-# language CPP #-} -- | = Name -- -- VK_EXT_scalar_block_layout - device extension -- -- == VK_EXT_scalar_block_layout -- -- [__Name String__] -- @VK_EXT_scalar_block_layout@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 222 -- -- [__Revision__] -- 1 -- -- [...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_EXT_scalar_block_layout.hs
bsd-3-clause
4,846
0
8
925
268
204
64
-1
-1
module Main where import System.Environment(getArgs) import Data.Char (isDigit, digitToInt) import qualified Data.Vector as V import qualified Data.Vector.Unboxed as UV import Data.List (sortBy, groupBy, nub, sort, unfoldr) import ExactCover import Test.QuickCheck import Control.Monad textToRawSudoku :: String -> [(In...
kapilash/dc
src/sudokus/hs/ExactCover/app/Main.hs
bsd-3-clause
14,320
1
15
3,733
6,649
3,488
3,161
400
2
{-# LANGUAGE OverloadedStrings , ParallelListComp , ScopedTypeVariables , TupleSections #-} -- | Backend interface and CoProc interpreter implementations. module System.Posix.CoProc.Internals where import Control.Applicative import Control.Concurrent import ...
solidsnack/coproc
System/Posix/CoProc/Internals.hs
bsd-3-clause
3,163
0
13
723
694
378
316
52
2
module Rasa.Ext.Views.Internal.Actions ( rotate , closeInactive , focusViewLeft , focusViewRight , focusViewAbove , focusViewBelow , hSplit , vSplit , addSplit , nextBuf , prevBuf , focusDo , focusDo_ , focusedBufs , isFocused , scrollBy ) where import Rasa.Ext import qualified Rasa.E...
samcal/rasa
rasa-ext-views/src/Rasa/Ext/Views/Internal/Actions.hs
gpl-3.0
3,492
0
16
717
959
493
466
86
2
module Distribution.AutoUpdate.MenuItem ( autoUpdateMenuItem, mkUpdateVersionRef, ) where import Safe import Data.Version import Text.Logging import Control.Monad import Control.Monad.Trans.Error import Control.Concurrent.MVar import Control.Concurrent import Graphics.Qt import Utils import Base imp...
geocurnoff/nikki
src/Distribution/AutoUpdate/MenuItem.hs
lgpl-3.0
3,082
0
18
842
726
361
365
60
2
{-# LANGUAGE MultiParamTypeClasses , FlexibleInstances , EmptyDataDecls #-} module Data.FibHeap #ifndef TESTING ( Heap(..) , HeapPolicy(..) , empty , peek , insert , decreaseKey , datum , key , focusElement ) #endif where -- import Control.Arrow ...
rbonifacio/funsat
etc/fiblib/Data/FibHeap.hs
bsd-3-clause
12,658
0
17
3,718
3,386
1,807
1,579
188
4
module Main where import Test.Framework import Test.Compiler import Test.Property main :: IO () main = defaultMain [ compilerTests , propertyTests ]
JoeyEremondi/utrecht-apa-p1
tests/Test.hs
bsd-3-clause
168
0
6
40
43
25
18
9
1
{-# LANGUAGE TemplateHaskell, ForeignFunctionInterface #-} module Graphics.Wayland.Internal.SpliceClient where import Data.Functor import Language.Haskell.TH import Foreign.C.Types import Graphics.Wayland.Scanner.Protocol import Graphics.Wayland.Scanner import Graphics.Wayland.Internal.SpliceClientTypes import quali...
abooij/haskell-wayland
Graphics/Wayland/Internal/SpliceClient.hs
mit
432
0
8
34
70
46
24
10
0
<?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="ar-SA"> <title>Passive Scan Rules - Alpha | ZAP Extension</title> <maps> <homeID>top</homeI...
0xkasun/security-tools
src/org/zaproxy/zap/extension/pscanrulesAlpha/resources/help_ar_SA/helpset_ar_SA.hs
apache-2.0
988
87
52
163
403
212
191
-1
-1
-- {-# OPTIONS -fglasgow-exts -XNoMonomorphismRestriction -XOverlappingInstances #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} module Control.Monatron.Open where import Cont...
neothemachine/monadiccp
src/Control/Monatron/Open.hs
bsd-3-clause
1,419
1
10
392
600
321
279
39
2
{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE PatternGuards #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} --------------------------------------------------------- -- -- Module : Network.Wai.Handler.Warp -- Copyright : Michael Snoyman -- License : BSD3 -- -- Maintainer : Michael Sn...
dylex/wai
warp/Network/Wai/Handler/Warp.hs
mit
11,989
0
13
2,134
1,515
966
549
146
1
{-# LANGUAGE Safe #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE DeriveGeneric #-} -- | The sytnax of numeric propositions. module Cryptol.TypeCheck.Solver.Numeric.AST ( Name(..), ppName , Prop(..), cryPropExprs, cryPropFVS , ppProp, ppPropPrec , Expr(..), zero, one, ...
ntc2/cryptol
src/Cryptol/TypeCheck/Solver/Numeric/AST.hs
bsd-3-clause
11,768
0
15
4,150
4,006
2,129
1,877
262
15
{- $Id: AFRPTestsWFG.hs,v 1.2 2003/11/10 21:28:58 antony Exp $ ****************************************************************************** * A F R P * * * * Module: ...
ony/Yampa-core
tests/AFRPTestsWFG.hs
bsd-3-clause
3,156
0
8
1,044
875
509
366
64
1
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-} {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -O -funbox-strict-fields #-} -- We always optimise this, otherwise performance of a non-optimised -- compiler is severely affected -- -- (c) The University of Glasgow 2002-2006 -- -- Binary I/O library, with special twea...
oldmanmike/ghc
compiler/utils/Binary.hs
bsd-3-clause
29,425
0
19
9,755
9,202
4,440
4,762
662
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# Language ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS -Wno-noncanonical-monoid-instances #-} module T13758 wh...
sdiehl/ghc
testsuite/tests/deriving/should_compile/T13758.hs
bsd-3-clause
1,600
0
9
310
589
314
275
41
1
{-# LANGUAGE CPP, FlexibleContexts, QuasiQuotes, DeriveDataTypeable, DeriveGeneric, OverloadedStrings #-} module Gen2.ClosureInfo where import Control.DeepSeq import GHC.Generics import Data.Array import Data.Bits ((.|.), shiftL) import Data.ByteString (ByteString) i...
beni55/ghcjs
src/Gen2/ClosureInfo.hs
mit
18,755
0
16
5,920
4,656
2,445
2,211
399
10
module FoldingsOneMoreTime where -- Yep, traditinal dig into why foldr works with infinite list -- and foldl does not. -- This definition might support incorrect intuition about -- the fact that foldl works with infinite collection. -- Because we create newInit right now and go to the next -- iteration. -- Left fo...
raventid/coursera_learning
haskell/will_kurt/9.5_myfoldl_myfoldr.hs
mit
780
0
7
168
121
68
53
7
1
-- List n = [1, 2, 3] -- List holds multiple values of the same type b = [True, False, True] c = ['H', 'e', 'l', 'l', 'o'] arr = 'A': ['B', 'C', 'D'] -- : operator append a value at the beginning of the list 'ABCD' -- Tuples: They hold a fixed number of values, which can have different types tp = (1, True) z = zip [...
domenicosolazzo/practice-haskell
basics/data-structures.hs
mit
356
6
6
81
130
70
60
7
1
{-# LANGUAGE OverloadedStrings #-} module WebserverInternalSpec (spec) where import BasicPrelude import qualified Data.Text.Lazy as TL import qualified DynamoDbEventStore.Webserver as W import Test.Tasty.Hspec import Test.Tasty.QuickCheck import Text.Read ...
adbrowne/dynamodb-eventstore
dynamodb-eventstore-web/tests/WebserverInternalSpec.hs
mit
1,262
0
18
324
384
195
189
26
1
{-# htermination lookupFM :: FiniteMap Ordering b -> Ordering -> Maybe b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_lookupFM_11.hs
mit
94
0
3
15
5
3
2
1
0
import LSys import LSys.LSys import LSys.Sierpinski main = (\p -> _display p (_state p)) . (!! 8) . iterate nextGen $ sierpinski
lesguillemets/lsyst.hs
examples/sierpinski.hs
mit
129
0
12
22
57
31
26
4
1
{-# LANGUAGE TemplateHaskell #-} module Main where --Gets the structure of the Database before compiling main program import HLINQ $(createDB "../test.db" "test")
juventietis/HLINQ
main.hs
mit
168
0
7
26
21
12
9
4
0
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.HTMLDataListElement (js_getOptions, getOptions, HTMLDataListElement, castToHTMLDataListElement, gTypeHTMLDataListElement) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Doubl...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLDataListElement.hs
mit
1,430
6
10
164
371
236
135
24
1
{-# OPTIONS -Wall #-} import Data.Functor (($>)) import qualified Data.List as List import Data.Map.Lazy (Map, (!)) import qualified Data.Map.Lazy as Map import qualified Data.Maybe as Maybe import Data.Set (Set) import qualified Data.Set as Set import Helpers.Numbers import Helpers.Parse import Text.Parsec type Item...
SamirTalwar/advent-of-code
2021/AOC_08_2.hs
mit
2,233
1
17
546
878
492
386
67
1
-- file: ch04/SplitLines.hs -- re-implementation of "lines" (?) splitLines [] = [] splitLines cs = let (pre, suf) = break isLineTerminator cs in pre : case suf of ('\r':'\n':rest) -> splitLines rest ('\r':rest) -> splitLines rest ('\n':rest) -> splitLines rest _ -> [] isLineTerminator ...
imrehg/rwhaskell
ch04/SplitLines.hs
mit
347
0
12
87
130
65
65
9
4
module Nunavut.NeuralNet.Internal where import Prelude hiding (reverse) import Control.Lens (Lens', lens, to, views) import Data.List (intercalate) import Data.List.NonEmpty (NonEmpty, toList) import Nunavut.Layer (Layer) import ...
markcwhitfield/nunavut
src/Nunavut/NeuralNet/Internal.hs
mit
1,561
0
10
540
250
142
108
16
1
-- | -- -- Checks that namespaces and sources can be on the "same" level of the hierarchy module Main where import Control.Biegunka import Control.Biegunka.Source.Git main :: IO () main = do biegunka id run $ namespace "outer" $ do namespace "inner" $ git (url "git@github.com:ghc/ghc" . path "ghc...
biegunka/biegunka
test/typecheck/should_compile/OK7.hs
mit
394
0
14
89
105
52
53
11
1
{-# LANGUAGE TemplateHaskell, OverloadedStrings, PostfixOperators, NoMonomorphismRestriction #-} {-# LANGUAGE FlexibleContexts, LambdaCase #-} {-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-partial-type-signatures #-} {-# OPTIONS_GHC -O0 -fno-cse -fno-full-laziness #-} -- preserve "lexical" sharing for observe...
sboosali/commands-spiros
config/Commands/Plugins/Spiros/Correct/Grammar.hs
gpl-2.0
1,375
0
15
166
211
120
91
25
3
{-| Module : $Header$ Copyright : (c) 2015 Edward O'Callaghan License : GPL2 Maintainer : eocallaghan@alterapraxis.com Stability : provisional Portability : portable This module contains various misc actions, such as for example, generic error handling and cleanups. -} module Misc ( ch...
victoredwardocallaghan/haskflash
src/Misc.hs
gpl-2.0
1,418
0
15
422
283
141
142
27
2
module Postructures where import qualified Prelude data Bool = True | False andb :: Bool -> Bool -> Bool andb b1 b2 = case b1 of { True -> b2; False -> False} orb :: Bool -> Bool -> Bool orb b1 b2 = case b1 of { True -> True; False -> b2} negb :: Bool -> Bool negb b = case b of { True -> F...
ConsensusResearch/MultiBranch
postructures.hs
gpl-2.0
39,308
77
38
11,980
16,481
8,534
7,947
1,125
32
{-# LANGUAGE LambdaCase #-} {-| Module : Voogie.FOOL.Traverse Description : Helper functions for traversing FOOL formulas. Copyright : (c) Evgenii Kotelnikov, 2019 License : GPL-3 Maintainer : evgeny.kotelnikov@gmail.com Stability : provisional -} module Voogie.FOOL.Traverse ( traverseProblem, ...
aztek/voogie
src/Voogie/FOOL/Traverse.hs
gpl-3.0
2,863
0
11
952
928
435
493
62
13
module P05MathsSpec (main,spec) where import Test.Hspec import Test.Hspec.QuickCheck import P05Maths hiding (main) main :: IO () main = hspec spec x, y :: Float x = 120 y = 9 spec :: Spec spec = do describe "plus" $ do it "is the same as adding 2 floats and calling show" $ x `plus` y `shouldBe` 129.0 ...
ciderpunx/57-exercises-for-programmers
test/P05MathsSpec.hs
gpl-3.0
1,235
0
17
313
357
199
158
31
1
{- hmatrix-labeled: matrices with row and column headers. Copyright 2014 Nikita Karetnikov <nikita@karetnikov.org> 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, version 3 of the License...
nkaretnikov/hmatrix-labeled
src/Data/Packed/LMatrix.hs
gpl-3.0
7,791
0
15
2,159
3,295
1,688
1,607
166
3
module Jumpie.Bresenham(bresenham) where import Data.List(sort,unfoldr,map) import Data.Function((.),($),id) import Prelude(abs,(-),(+),(*),Num) import Data.Ord((>),(<),(>=),Ord) import Data.Maybe(Maybe(..)) import Data.Bool(otherwise) import Jumpie.Geometry.Point(Point2(..),pX,pY,pointToTuple) import Jumpie.Geometry....
pmiddend/jumpie
lib/Jumpie/Bresenham.hs
gpl-3.0
1,151
2
12
276
545
316
229
24
4
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.MachineLearning.Types -- Copyright : (c) 2015-2016 Bre...
brendanhay/gogol
gogol-ml/gen/Network/Google/MachineLearning/Types.hs
mpl-2.0
24,426
0
7
4,431
1,935
1,340
595
554
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Builds/Retry.hs
mpl-2.0
7,736
0
19
1,733
892
532
360
125
1
{-| Module : Data.JustParse.Language Description : Regular expressions Copyright : Copyright Waived License : PublicDomain Maintainer : grantslatton@gmail.com Stability : experimental Portability : portable Allows for conversion from a regular expression and a 'Parser'. -} {-# LANGUAGE Safe #-} module D...
grantslatton/JustParse
src/Data/JustParse/Language.hs
unlicense
6,216
0
13
1,590
1,878
963
915
-1
-1
primes :: Integral a => [a] primes = map fromIntegral $ [2, 3] ++ primes' where primes' = [5] ++ f 1 7 primes' f m s (p:ps) = [n | n <- ns, gcd m n == 1] ++ f (m * p) (p * p) ps where ns = [x + y | x <- [s, s + 6 .. p * p - 2], y <- [0, 4]] ans (p1:p2:ps) n = if n < p1 ...
a143753/AOJ
0044.hs
apache-2.0
684
2
12
306
379
193
186
20
5
import Network.Eureka (withEureka, EurekaConfig(eurekaInstanceInfoReplicationInterval, eurekaRegion, eurekaServerServiceUrls), InstanceConfig(instanceAppName, instanceLeaseRenewalInterval, instanceMetadata), InstanceStatus(OutOfService), def, discoverDataCenterAmazon, lookupByAppName, setStatus, Dat...
SumAll/haskell-eureka-client
src/test.hs
apache-2.0
1,669
1
15
353
378
213
165
37
1
module Text.Nagato.Models ( Freqs ,Probs )where import Data.Map type Freqs a = Map a Int type Probs a = Map a Float
haru2036/nagato
Text/Nagato/Models.hs
apache-2.0
119
0
5
25
44
27
17
6
0
module HaskHOL.Lib.Arith.Base where import HaskHOL.Core import HaskHOL.Deductive hiding (getDefinition, getSpecification, newSpecification, newDefinition) import HaskHOL.Lib.Nums import HaskHOL.Lib.Recursion defPRE :: HOL cls thry HOLThm defPRE = unsafeCacheProof "defPRE" $ getRecurs...
ecaustin/haskhol-math
src/HaskHOL/Lib/Arith/Base.hs
bsd-2-clause
10,771
0
26
2,689
2,817
1,568
1,249
-1
-1
-- 5537376230 import Euler(fromDigits, readGrid, toDigitsBase) nn = 10 calcSum n xs = fromDigits $ take n $ toDigitsBase 10 $ sum $ head xs main = putStrLn $ show $ calcSum nn $ readGrid ss ss = "\ \37107287533902102798797998220837590246510135740250 \ \46376937677490009712648124896970078050417018260538 \ \743249861...
higgsd/euler
hs/13.hs
bsd-2-clause
5,601
0
9
242
84
43
41
5
1
module Problem301 where import Data.Bits main :: IO () main = print $ length $ filter (\n -> f (1 * n) (2 * n) (3 * n)) [1 .. 2 ^ 30] f :: Int -> Int -> Int -> Bool f a b c = a `xor` b `xor` c == 0
adityagupta1089/Project-Euler-Haskell
src/problems/Problem301.hs
bsd-3-clause
201
0
11
57
128
71
57
6
1
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE UndecidableInstances #-} -- | A continuation-based error monad. module Control.Monad.EitherK ( EitherKT , runEitherKT ) where import Control....
osa1/fast-tags
src/Control/Monad/EitherK.hs
bsd-3-clause
1,332
0
15
342
506
266
240
32
0
-- Lib.hs module Lib ( symbol , readExp , spaces ) where import Text.ParserCombinators.Parsec hiding (spaces) import Numeric (readHex, readOct, readFloat) import Data.Char (digitToInt) import qualified Data.Complex as C import Data.Ratio ((%)) data LispVal = Atom String | List [LispVal] ...
edgarlepe/scheme
src/Lib.hs
bsd-3-clause
4,673
0
13
1,504
1,537
753
784
150
4
-- 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. {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Duration.SV.Rules ( rules ) where ...
facebookincubator/duckling
Duckling/Duration/SV/Rules.hs
bsd-3-clause
3,226
0
18
745
845
473
372
94
2
-- | -- This module defines how to lex the language module Language.Pureli.Lexer where import Text.Parsec.String (Parser) import Text.Parsec.Language (emptyDef) import Text.ParserCombinators.Parsec ((<|>)) import qualified Text.Parsec as P import qualified Text.Parsec.Token as Tok lexer :: Tok.TokenParser () lexer ...
soupi/pureli
src/Language/Pureli/Lexer.hs
bsd-3-clause
1,405
0
11
304
417
232
185
36
1
module Numeric.LinearAlgebra.Matrix.Class where -- import Numeric.LinearAlgebra.Vector class Functor m => Matrix m where mDim :: m a -> Int mElement :: m a -> Int -> Int -> a mIndexOf :: (Ord a) => (a -> a -> Bool) -> m a -> (Int, Int) mZip :: (a -> b -> c) -> m a -> m b -> m c -- | mFold is foldl1'...
dagit/lin-alg
src/Numeric/LinearAlgebra/Matrix/Class.hs
bsd-3-clause
1,214
0
11
373
343
183
160
15
1
import Control.Arrow(second) import Distribution.Simple import Distribution.PackageDescription import Distribution.Text (display) import qualified Distribution.Simple.LocalBuildInfo as LBI import qualified Distribution.Simple.Compiler as Compiler import qualified Distribution.Simple.Configure as Configure m...
philopon/hassistant.vim
Setup.hs
bsd-3-clause
996
0
17
211
306
166
140
20
1
module Language.Mojito.Inference.Context where import Data.List (union) import Language.Mojito.Syntax.Types (Type, showType) -- Typing context Gamma. -- Each element is a pair (term variable,s) called 'typing'. -- Multiple typings can be given to let-bound variable. data Context = Context { ctxAssoc :: [(String,...
noteed/mojito
Language/Mojito/Inference/Context.hs
bsd-3-clause
641
0
10
114
214
120
94
11
1
{-# LANGUAGE ForeignFunctionInterface #-} module Data.BerkeleyDB.IO ( new , insert -- , Data.BerkeleyDB.IO.lookup , lookupMany , getAllObjects , serialise , Db(..) , module Data.BerkeleyDB.Internal ) where import Data.Binary import qualified Data.ByteString.Lazy as Lazy import qualif...
dmjio/BerkeleyDB
src/Data/BerkeleyDB/IO.hs
bsd-3-clause
3,261
0
19
891
965
505
460
70
2
-- -- VectorTest: test of Vector type definitions -- module VectorTest3 where import Test.QuickCheck nearlyZero = 0.00000001 :: Double class Vector a where vadd :: a -> a -> a vsub :: a -> a -> a vscale :: Double -> a -> a -- vdiv :: a -> Double -> Maybe a -- vdiv a s -- |s == 0 = Nothing -- |othe...
eijian/raytracer
test/VectorTest4.hs
bsd-3-clause
2,767
0
13
750
752
430
322
-1
-1
module Hydra.Stages.BuildEvents (buildEvents) where import Hydra.Data buildEvents :: SymTab -> SymTab buildEvents st = buildEvs 0 (st {events = []}) (model st) buildEvs :: Int -> SymTab -> [Equation] -> SymTab buildEvs _ acc [] = acc buildEvs i acc (eq : eqs) = case eq of App (SR f1) s1 -> buildEvs i acc (...
giorgidze/Hydra
src/Hydra/Stages/BuildEvents.hs
bsd-3-clause
626
0
17
158
322
164
158
14
5
-- 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. module Duckling.Dimensions.Common ( allDimensions ) where import Duckling.Dimensions.Types allDimensions ::...
facebookincubator/duckling
Duckling/Dimensions/Common.hs
bsd-3-clause
473
0
6
90
75
44
31
11
1
module Language.SimPOL.Template.Retention where import Prelude hiding ( until ) import Language.SimPOL import Language.SimPOL.Template.Option import Language.SimPOL.Template.Obs retain :: Time -> Contract -> Universe Contract retain t c = (\present -> until (at (present + t)) (option c) ) `fmap` now -- vim: ft=ha...
ZjMNZHgG5jMXw/privacy-option-simpol
Language/SimPOL/Template/Retention.hs
bsd-3-clause
346
0
12
48
101
60
41
9
1
{-| Module : GHC.Hs.Utils Description : Generic helpers for the HsSyn type. Copyright : (c) The University of Glasgow, 1992-2006 Here we collect a variety of helper functions that construct or analyse HsSyn. All these functions deal with generic HsSyn; functions which deal with the instantiated versions are lo...
sdiehl/ghc
compiler/GHC/Hs/Utils.hs
bsd-3-clause
58,828
0
18
15,395
14,954
7,692
7,262
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FunctionalDependencies #-} #ifndef MIN_VERSION_base...
hvr/lens
src/Control/Lens/Each.hs
bsd-3-clause
8,574
0
15
1,575
3,021
1,668
1,353
107
0
{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving, RecordWildCards, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} module Database.Redis.Core ( Connection, connect, ConnectInfo(..), defaultConnectInfo, Redis(),runRedis, RedisCtx(..), MonadRedis(..), send, recv, se...
fpco/hedis
src/Database/Redis/Core.hs
bsd-3-clause
6,428
0
16
1,454
1,029
583
446
87
2
module LJI.Parser ( module Text.Parsec , module Text.Parsec.String , Chart(..) , parseChart , wrapParser , chartParser , rangeParser , durParser , integerParser , listParser ) where import Prelude hiding (mapM, mapM_, foldl, sum) import Control.Applicative hiding ((<|>), many) import Contro...
mrehayden1/lji
src/LJI/Parser.hs
bsd-3-clause
6,953
0
28
2,339
2,514
1,325
1,189
158
14
{- | Module : Control.Monad.Cont Copyright : (c) The University of Glasgow 2001, (c) Jeff Newbern 2003-2007, (c) Andriy Palamarchuk 2007 License : BSD-style (see the file LICENSE) Maintainer : libraries@haskell.org Stability : experimental Portability : portable [Comp...
davnils/minijava-compiler
lib/mtl-2.1.3.1/Control/Monad/Cont.hs
bsd-3-clause
5,185
0
5
1,014
96
70
26
16
0
{-# LANGUAGE TypeFamilies, DeriveDataTypeable, TemplateHaskell #-} -- | This module is an IRC plugin that manages quotes for posterity and legend module Hsbot.Plugin.Quote ( QuoteArgs (..) , quote , theQuote ) where import Control.Monad.Reader import Control.Monad.State import Data.Acid import qualifie...
adyxax/hsbot
Hsbot/Plugin/Quote.hs
bsd-3-clause
15,130
0
24
4,846
4,122
2,058
2,064
261
30
module MsgDiagram.Lexer where import Control.Monad (void) import Text.Parsec import Text.Parsec.String (GenParser) import qualified Text.Parsec.Token as Tok import Text.Parsec.Language (javaStyle) type Parser a = GenParser Char Int a -- ----------------------------------------------------- [ Define Token Parser ] ...
jfdm/hUML
src/MsgDiagram/Lexer.hs
bsd-3-clause
2,153
0
9
460
557
295
262
46
1
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE QuasiQuotes #-} import Database.Persist.Quasi import Prelude hiding (filter) import Database.Persist import Database.Persis...
yesodweb/persistent
persistent-sqlite/test3.hs
mit
2,079
2
14
496
702
322
380
-1
-1
-- Ferlicot Delbecque Cyril -- PF TP3 module Main where import Graphics.Gloss main::IO() main = animate (InWindow "L-systeme" (1000, 1000) (0, 0)) white brindilleAnime dessin :: Picture dessin = interpreteMot (((-150,0),0),100,1,pi/3,"F+-") "F+F--F+F" type Symbole = Char type Mot = [Symbole] type Axiome =...
jecisc/TP_PF_L3
PF-TP3/src/TP3_PF_FERLICOT/Main.hs
mit
6,415
0
17
1,573
2,191
1,203
988
119
3
module Lib.Fifo ( Fifo , empty, null , enqueue, dequeue , extract ) where import Prelude.Compat hiding (null) import Data.List (partition) data Fifo a = Fifo { _new :: [a] -- reverse order (fast prepend) , _old :: [a] -- forward order (fast pop-head) } null :: Fifo a -> Bool null (Fifo [] []) = True...
buildsome/buildsome
src/Lib/Fifo.hs
gpl-2.0
822
0
11
203
415
222
193
27
2
instance SomeClass [a]
roberth/uu-helium
test/typeClassesStatic/UndefinedClass.hs
gpl-3.0
23
0
6
3
11
5
6
1
0
{-# LANGUAGE FlexibleContexts #-} module Propellor.Property.Apt where import Data.Maybe import Control.Applicative import Data.List import System.IO import Control.Monad import Propellor import qualified Propellor.Property.File as File import qualified Propellor.Property.Service as Service import Propellor.Property....
sjfloat/propellor
src/Propellor/Property/Apt.hs
bsd-2-clause
9,497
74
17
1,616
2,660
1,418
1,242
195
4
-- The main module of the application. Performs GLFW-specific initialization and others. module Main ( main ) where import Control.Concurrent import Control.Monad import qualified Graphics.UI.GLFW as GLFW import System.Environment import System.IO import qualified Renderer as R -- | The error handler to be called ...
fujiyan/toriaezuzakki
haskell/opengl/texture/Rectangle.hs
bsd-2-clause
1,686
0
11
364
396
194
202
43
1
-- | -- Module : Data.Memory.Internal.DeepSeq -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- -- Simple abstraction module to allow compilation without deepseq -- by defining our own NFData class if not compiling with deepseq...
NicolasDP/hs-memory
Data/Memory/Internal/DeepSeq.hs
bsd-3-clause
733
0
5
139
37
30
7
9
0
-- -- Data vault for metrics -- -- 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. -- {-...
afcowie/vaultaire
tests/IntegrationTest.hs
bsd-3-clause
3,958
0
24
1,122
857
436
421
101
3
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE BangPatterns #-} module Bench.State where import Pure.Bench import Pure.Test import Ef import Ef.Interpreter as I import qualified Control.Monad.Trans.State as T import Data.Functor.Identity import Control.Concurrent suite :: Test S...
grumply/mop
bench/Bench/State.hs
bsd-3-clause
2,472
0
14
552
1,107
575
532
77
1
import Control.Monad import Paths import System.FilePath import qualified Graphics.UI.Threepenny as UI import Graphics.UI.Threepenny.Core {----------------------------------------------------------------------------- Main ------------------------------------------------------------------------------} main :: IO...
yuvallanger/threepenny-gui
samples/Drawing.hs
bsd-3-clause
1,161
0
13
280
375
189
186
26
1
{-# LANGUAGE Safe #-} {-# LANGUAGE ScopedTypeVariables #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Bifoldable -- Copyright : (C) 2011-2016 Edward Kmett -- License : BSD-style (see the file LICENSE) -- -- Maintainer : libraries@haskell.org -- S...
sdiehl/ghc
libraries/base/Data/Bifoldable.hs
bsd-3-clause
13,417
0
14
3,222
3,555
1,949
1,606
168
2
{-# LANGUAGE TypeFamilies #-} module T17067 where import Data.Kind data family D1 a data family D2 :: Type -> Type type family F a type instance F (D1 a) = a type instance F (D2 a) = a
sdiehl/ghc
testsuite/tests/typecheck/should_compile/T17067.hs
bsd-3-clause
188
0
6
41
64
40
24
-1
-1
#!/usr/bin/env stack -- stack --install-ghc runghc --package=shake --package=extra --package=zip-archive --package=mime-types --package=http-types --package=http-conduit --package=text --package=conduit-combinators --package=conduit --package=case-insensitive --package=aeson --package=zlib --package executable-path {-#...
chreekat/stack
scripts/release/release.hs
bsd-3-clause
22,652
104
24
6,078
5,088
2,637
2,451
495
6
{-# LANGUAGE RankNTypes #-} {-# OPTIONS_GHC -funbox-strict-fields #-} -- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow, 2010 -- -- The Session type and related functionality -- -- ------------------------------------------------------------------------...
spacekitteh/smcghc
compiler/main/GhcMonad.hs
bsd-3-clause
6,878
0
18
1,622
1,740
913
827
106
1
-- Dummny LeftistHeap module module LeftistHeap where import Sequence data Heap a maxElem :: Ord a => Heap a -> a maxElem = undefined null :: Ord a => Heap a -> Bool null = undefined delete :: Ord a => a -> Heap a -> Heap a delete = undefined insert :: Ord a => a -> Heap a -> Heap a insert = undefined empty :: Or...
forste/haReFork
tools/base/tests/GhcLibraries/LeftistHeap.hs
bsd-3-clause
554
0
8
130
242
123
119
-1
-1
module LiftToToplevel.NoWhere where liftToTopLevel' modName pn = do renamed <- getRefactRenamed return [] where {-step1: divide the module's top level declaration list into three parts: 'parent' is the top level declaration containing the lifted declaration, 'before' and `after` are th...
RefactoringTools/HaRe
test/testdata/LiftToToplevel/NoWhere.hs
bsd-3-clause
718
0
8
172
56
30
26
7
1
{-# OPTIONS_GHC -fdefer-type-errors #-} -- Very important to this bug! {-# Language PartialTypeSignatures #-} {-# Language TypeFamilyDependencies, KindSignatures #-} {-# Language PolyKinds #-} {-# Language DataKinds #-} {-# Language TypeFamilies #-} {-# Language RankNTypes #-} {-# Language NoImplicitPrelude #-} {-#...
sdiehl/ghc
testsuite/tests/partial-sigs/should_fail/T14584.hs
bsd-3-clause
1,593
31
10
298
419
238
181
-1
-1
{-# LANGUAGE ScopedTypeVariables, PatternSynonyms, DataKinds, PolyKinds, GADTs, TypeOperators, TypeFamilies #-} module T13441 where import Data.Functor.Identity data FList f xs where FNil :: FList f '[] (:@) :: f x -> FList f xs -> FList f (x ': xs) data Nat = Zero | Succ Nat type family Length (x...
shlevy/ghc
testsuite/tests/patsyn/should_compile/T13441.hs
bsd-3-clause
1,051
0
12
301
428
231
197
-1
-1
-- Trac #2931 module Foo where a = 1 -- NB: no newline after the 'a'! b = 'a
urbanslug/ghc
testsuite/tests/quotes/T2931.hs
bsd-3-clause
79
0
4
21
17
12
5
-1
-1
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleContexts #-} module T4398 where {-# RULES "suspicious" forall (x :: a) y. f (x :: Ord a => a) y = g x y #-} {-# NOINLINE f #-} f :: a -> a -> Bool f x y = True g :: Ord a => a -> a -> Bool g = (<)
urbanslug/ghc
testsuite/tests/simplCore/should_compile/T4398.hs
bsd-3-clause
276
0
7
67
58
34
24
9
1
{-# OPTIONS -XRecursiveDo #-} -- OLD: mdo requires MonadFix instance, even -- if no recursion is present -- Dec 2010: Small change of behaviour -- MonadFix is only required if recursion is present module Main (main) where import Control.Monad.Fix import Control.Applicative (Applicative(..)) import Control...
urbanslug/ghc
testsuite/tests/mdo/should_fail/mdofail004.hs
bsd-3-clause
605
0
8
145
172
99
73
-1
-1
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE JavaScriptFFI #-} module GHCJS.DOMDelegator.Internal where import Language.Haskell.TH.Quote import GHCJS.Foreign.QQ import GHCJS.Types foreign import javascript unsafe "h$domDelegator.addEvent($1,$2,$3)" js_add_event :: JSRef a -> JSString -> JSFun (JSRef b...
wavewave/ghcjs-dom-delegator
src/GHCJS/DOMDelegator/Internal.hs
mit
810
15
8
118
209
109
100
16
0
-- Type.hs --- -- -- Filename: Type.hs -- Description: -- Author: Manuel Schneckenreither -- Maintainer: -- Created: Thu Sep 4 12:19:36 2014 (+0200) -- Version: -- Package-Requires: () -- Last-Updated: Mon Apr 8 09:49:45 2019 (+0200) -- By: Manuel Schneckenreither -- Update #: 95 -- URL: -- Doc URL: -- ...
ComputationWithBoundedResources/ara-inference
src/Data/Rewriting/ARA/ByInferenceRules/CmdLineArguments/Type.hs
mit
1,696
0
11
609
269
184
85
31
0
module Main where import Analys import System.Environment parse :: String -> ([Int], [([Int], [Int])]) parse = subParse . lines where subParse :: [String] -> ([Int], [([Int], [Int])]) subParse (strMark : strTranses) = let mark = read strMark transfers = read $ concat strTranses i...
NickolayStorm/PetriNet
main.hs
mit
1,081
0
14
347
258
143
115
20
2
module TLexer ( testModule -- tests the module Lexer ) where -- imports -- import Test.HUnit import InterfaceDT as IDT import qualified Preprocessor as PreProc import qualified Lexer -- functions -- testLexer01 = "Proper turning: " ~: res [Constant "1"...
SWP-Ubau-SoSe2014-Haskell/SWPSoSe14
tests/TLexer.hs
mit
3,372
0
13
823
1,396
826
570
33
2
head1 :: [a] -> a head1 [] = error "Can't call head on an empty list, dummy!" head1 (x:_) = x
v0lkan/learning-haskell
session-003/006-head-1.hs
mit
94
0
7
21
41
21
20
3
1
module Foster.Generator (generate) where import Foster.Data import Foster.Utils import Foster.IO (writeUnsolvedPuzzle) import Control.Monad import System.Random import Data.Array.IO hiding (newArray) calcNorthId :: Size -> Int -> PieceId calcNorthId (w, _) i = let x = i - w in if x >= 0 then show x else noneId...
Jefffrey/Foster
src/Foster/Generator.hs
mit
2,455
30
16
776
1,037
528
509
78
2
{-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -Wno-partial-type-signatures #-} module Oczor.Converter.Converter where import Oczor.Utl import Control.Monad.State import Control.Monad.Reader import ClassyPrelude hiding (first) import Oczor.Infer.Substitutable import Oczor.Syntax.Syntax as S import qualified Oczor...
ptol/oczor
src/Oczor/Converter/Converter.hs
mit
18,878
0
19
3,744
6,464
3,217
3,247
-1
-1
module Network.BitTorrent.Tracker.AnnounceServer ( AnnounceConfig(..) , AnnounceEnv(..) , AnnounceState(..) , AnnounceT(..) , IpVersion(..) , defaultConfig , emptyAnnounceState , handleAnnounce , handleScrape , pruneQueue ) where import Control.Concurrent.MVar import Control.M...
iteratee/haskell-tracker
Network/BitTorrent/Tracker/AnnounceServer.hs
mit
11,882
0
22
3,324
2,996
1,498
1,498
273
8
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.SVGPathSegLinetoAbs (js_setX, setX, js_getX, getX, js_setY, setY, js_getY, getY, SVGPathSegLinetoAbs, castToSVGPathSegLinetoAbs, gTypeSVGPathSegLinetoAbs) where import Prelude ((.), (...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGPathSegLinetoAbs.hs
mit
2,345
28
8
309
594
353
241
35
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExplicitNamespaces #-} -- | Extensions to 'Data.ConfigFile' and utility functions for dealing with -- configuration in general and reading/writing files. module Data.ConfigFile.B9Extras ( addSectionCP, setShowCP, setCP, ...
sheyll/b9-vm-image-builder
src/lib/Data/ConfigFile/B9Extras.hs
mit
2,501
0
15
494
477
269
208
-1
-1
{-# LANGUAGE OverloadedStrings #-} module ParseWorks where import Control.Applicative import qualified Data.Attoparsec.Combinator as AC import Data.Attoparsec.Text (Parser) import qualified Data.Attoparsec.Text as A import Data.Char import Data.Text ...
alokpndy/haskell-learn
src/parsers/parseWorks.hs
mit
2,409
0
16
704
728
380
348
55
3
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Jabara.Wunderlist.Client.Types ( AccessToken , ClientId , UserId , ListId , TaskId , NoteId , Revision , fromWunderlistDay , Credential(..), credentialAccessToken, credentialClientId , ...
jabaraster/jabara-wunderlist-client
src/Jabara/Wunderlist/Client/Types.hs
mit
4,174
0
15
943
1,073
617
456
115
1
module Pnj where import qualified Trie as Trie import System.Random import Control.Monad data Stat =S(String,Integer) -- Maybe implement feats one day data Feat = F (Stat -> Bool, Stat -> Stat) d6 :: StdGen -> (Integer, StdGen) d6 gen = randomR (1,6) gen sumDice :: (StdGen -> (Integer, StdGen)) -> (Integer,StdG...
panzerr/RobotPanzerr
app/Pnj.hs
mit
1,108
0
12
221
485
269
216
28
1