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 DataKinds, PolyKinds, RankNTypes, GADTs #-} module T7481 where import Data.Proxy data D a where D1 :: a -> D a D2 :: (a~Int) => D a D3 :: forall (a::k) b. Proxy a -> D b data Foo :: D * -> *
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/polykinds/T7481.hs
bsd-3-clause
214
0
8
54
86
49
37
-1
-1
{- Copyright (c) 2016 Albert Krewinkel Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANT...
tarleb/huskydoc
test/Text/Huskydoc/ParsingSpec.hs
isc
2,336
0
14
495
351
169
182
37
1
module Language.Aspell.Options ( ACOption(..), WordListSize(..), Encoding(..), SuggestMode(..), NormalizeForm(..) ) where import Data.ByteString data WordListSize = Tiny | ReallySmall | Small | MediumSmall | Medium ...
pikajude/haspell
Language/Aspell/Options.hs
mit
6,227
0
6
1,619
333
220
113
60
0
module Week11 where import Data.Char (isAlpha, isAlphaNum) import Week10 import Control.Applicative ------------------------------------------------------------ -- 1. Parsing repetitions ------------------------------------------------------------ zeroOrMore :: Parser a -> Parser [a] zeroOrMore p = oneOrMore p <|>...
taylor1791/cis-194-spring
src/Week11.hs
mit
1,524
0
12
250
315
174
141
26
1
import Control.Monad import Data.Char import Text.Printf -- | count the number of alphabets main :: IO () main = do str <- getContents forM_ (words str) $ printf "%s\t1\n"
nushio3/UFCORIN
exe-src/hs-wordcount-mapper.hs
mit
179
0
10
36
58
29
29
7
1
-- | -- Module : Network.Wamp -- Description : Re-exports -- Copyright : (c) Maciej Kazulak, 2015 -- License : MIT -- Maintainer : kazulakm@gmail.com -- Stability : experimental -- Portability : portable -- -- This module simply re-exports from other modules for convenience. -- module Network.Wamp ( --...
mulderr/haskell-wamp
wamp/Network/Wamp.hs
mit
705
0
5
118
98
71
27
14
0
{-# LANGUAGE TupleSections, OverloadedStrings #-} module Handler.Browse where import qualified Data.Map as M import qualified Data.Text as T import Import import Barch.Adaptors import Barch.Widgets (shortReferenceView) pageLimit::Int pageLimit = 30 getBrowseR::Int->Handler Html getBrowseR page = do citations <- ...
klarh/barch
Handler/Browse.hs
mit
771
0
13
160
213
115
98
21
1
module Main where import qualified Data.ByteString.Lazy as BL import qualified Data.Foldable as F -- from cassava import Data.Csv.Streaming type BaseballStats = (BL.ByteString, Int, BL.ByteString, Int) baseballStats :: BL.ByteString -> Records BaseballStats baseballStats = decode NoHeader fourth :: (a, b, c, d) -> ...
pgarrison/bassbull
src/Main.hs
mit
548
0
12
98
194
111
83
15
1
before :: (Int, Int) -> (Int, Int) -> Bool before (a, b) (c, d) = b < c after :: (Int, Int) -> (Int, Int) -> Bool after (a, b) (c, d) = a > d mergeCrossing :: (Int, Int) -> (Int, Int) -> (Int, Int) mergeCrossing (a, b) (c, d) = ((min a c), (max b d)) insertInterval :: (Int, Int) -> [(Int, Int)] -> [(Int, Int)] inse...
stoimenoff/functional-programming
examples/intervals.hs
mit
579
0
8
127
353
197
156
14
1
--determineType.hs {-# LANGUAGE NoMonomorphismRestriction #-} module DetermineType where example = 1 a = (* 9) 6 b = head [(0, "doge"), (1, "kitteh")] c = head [(0 :: Integer, "doge"), (1, "kitteh")] d = if False then True else False e = length [1,2,3,4,5] --f = (length [1,2,3,4]) > (length "TACOCAT") x = 5 y = x ...
deciduously/Haskell-First-Principles-Exercises
2-Defining and combining/5-Types/code/determineType.hs
mit
365
0
7
79
156
95
61
13
2
module Primes (primes) where import qualified Data.PQueue.Prio.Min as PQ import Control.Monad.State.Lazy type PrimesState = ([Integer], PQ.MinPQueue Integer Integer) initPrimes :: PrimesState initPrimes = ([5, 7 ..], PQ.fromList [(9, 3)]) nextPrime :: () -> State PrimesState Integer nextPrime () = do (nns@(n : ns...
farrellm/euler
src/Primes-old.hs
mit
767
0
16
188
363
193
170
23
3
module Server.Execute where import Utils.Utils import CodeGen.Metadata.Metadata import Data.Schema import Data.Name import Server.QueryCompile import Data.Types import Server.NutleyInstance import Utils.Include import CodeGen.SerializeCode import CodeGen.NutleyQuery import System.Plugins.Make import System.Plugins.Lo...
jvictor0/JoSQL
Server/Execute.hs
mit
3,429
0
14
634
572
296
276
39
2
-- Strange principal -- http://www.codewars.com/kata/55fc061cc4f485a39900001f/ module Codewars.G964.StrangePrinc where numOpenLockers :: Int -> Int numOpenLockers n = floor . sqrt . fromIntegral
gafiatulin/codewars
src/7 kyu/StrangePrinc.hs
mit
197
0
6
23
34
20
14
3
1
module Service.VerifyTaskConfig ( verify_task_config, verify_task_config_localized ) where import Util.Task import Util.Sign import Util.Parse import Util.Description import Util.Timeout import Types.Basic import Types.Signed import Types.Config import Types.Description import Types.TT import Inter.Types imp...
marcellussiegburg/autotool
server-implementation/src/Service/VerifyTaskConfig.hs
gpl-2.0
1,244
0
15
277
398
204
194
34
2
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} module Graph.Selfcom where -- $Id$ import Graph.Util import Graph.Iso import Autolib.Graph.Ops ( complement ) import Autolib.Graph.Basic import Inter.Types import Autolib.ToDoc import Autolib.Size import Autolib.FiniteMap import qualifie...
Erdwolf/autotool-bonn
src/Graph/Selfcom.hs
gpl-2.0
1,489
7
14
355
458
238
220
36
1
-- rm1x-template: make keymaps for Yamaha Rm1X -- Copyright (C) 2017 karamellpelle@hotmail.com -- -- 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 Licen...
karamellpelle/rm1x-template
source/Helpers.hs
gpl-2.0
1,894
0
11
382
235
149
86
35
2
{- | Module : $Header$ Description : A Parser for the TPTP-THF0 Syntax Copyright : (c) A. Tsogias, DFKI Bremen 2011 License : GPLv2 or higher, see LICENSE.txt Maintainer : Alexis.Tsogias@dfki.de Stability : provisional Portability : portable A Parser for the TPTP-THF0 Input Syntax taken from <htt...
nevrenato/Hets_Fork
THF/ParseTHF0.hs
gpl-2.0
20,163
0
19
4,334
6,035
2,880
3,155
534
15
import Control.Applicative import qualified Data.Map as M import Data.List -- DP approach, dp[i][j] means whether the first i number -- can produce number j(j <= 101). The following is a very nice -- approach to do the dp process by reading @tanakh's solution main :: IO () main = do n <- readLn :: IO Int ns ...
m00nlight/hackerrank
functional/memorization-dp/Expression/main.hs
gpl-2.0
824
0
20
288
298
161
137
17
1
{-# OPTIONS_GHC -fno-warn-orphans #-} -- SJC: is it possible to move this to the prototype part of ampersand? I mean, -- do functions like plugFields and plug-path really need to be here? -- perhaps we can at least move the largest part? module Database.Design.Ampersand.FSpec.Plug (Plugable(..), PlugInfo...
guoy34/ampersand
src/Database/Design/Ampersand/FSpec/Plug.hs
gpl-3.0
16,084
7
21
4,623
2,391
1,326
1,065
123
5
{-# LANGUAGE FlexibleInstances, OverloadedStrings #-} module Quran.QLines ( QLines , qLines , qLines_ , unQLines , fromQLines , readQtfFiles , readQpfFiles , defaultBrkToText , qtfRngToQlf , GrpStyle (RefRangesOnly, BigBreaks, AllBreaks, ByVerse) , applyGrpStyleToRng , splitRngByVerses , splitRngByPars ) where ...
oqc/hqt
Quran/QLines.hs
gpl-3.0
4,751
0
19
1,216
1,455
780
675
88
4
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.AdSense.Types.Sum -- Copyright : (c) 2015-2016 Brendan...
brendanhay/gogol
gogol-adsense/gen/Network/Google/AdSense/Types/Sum.hs
mpl-2.0
70,725
0
11
16,166
6,975
3,846
3,129
911
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-webmaster-tools/gen/Network/Google/Resource/Webmasters/Sitemaps/Submit.hs
mpl-2.0
3,086
0
14
688
387
233
154
60
1
-- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca) -- Copyright 2014 2015 2016, Julia Longtin (julial@turinglace.com) -- Released under the GNU AGPLV3+, see LICENSE module Graphics.Implicit.Export.Render.GetLoops (getLoops) where -- Explicitly include what we want from Prelude. import Prelude (hea...
krakrjak/ImplicitCAD
Graphics/Implicit/Export/Render/GetLoops.hs
agpl-3.0
2,647
0
12
566
440
257
183
24
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Kubernetes.V1.NodeDaemonEndpoints where import GHC.Generics import Kubernetes.V1.DaemonEndpoint import qualified Data.Aeson -- | NodeDaemonEnd...
minhdoboi/deprecated-openshift-haskell-api
kubernetes/lib/Kubernetes/V1/NodeDaemonEndpoints.hs
apache-2.0
649
0
9
83
84
51
33
14
0
module Staircase.A282427Spec (main, spec) where import Test.Hspec import Staircase.A282427 (a282427) main :: IO () main = hspec spec spec :: Spec spec = describe "A282427" $ it "correctly computes the first 5 elements" $ take 5 (map a282427 [1..]) `shouldBe` expectedValue where expectedValue = [1,3,7,39,4...
peterokagey/haskellOEIS
test/Staircase/A282427Spec.hs
apache-2.0
323
0
10
59
115
65
50
10
1
{-# LANGUAGE MultiParamTypeClasses #-} module Tetris.Block.Coords where import Tetris.Block.Dir (DirTo) data Zero = Zero data One = One data Two = Two data Three = Three class CanMove t e where move :: t -> e instance CanMove Zero One where move Zero = One instance CanMove One Two where move One = T...
melrief/tetris
src/Tetris/Block/Coords.hs
apache-2.0
966
0
7
215
446
245
201
-1
-1
{- Copyright 2013 Matthew Gordon. 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 writing, softwar...
matthewscottgordon/funk
test/Test/Module.hs
apache-2.0
5,051
0
9
1,446
1,197
626
571
104
1
{-# LANGUAGE TemplateHaskell #-} {-| The WConfd functions for direct configuration manipulation This module contains the client functions exported by WConfD for specific configuration manipulation. -} {- Copyright (C) 2014 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with o...
dimara/ganeti
src/Ganeti/WConfd/ConfigModifications.hs
bsd-2-clause
7,452
0
19
1,726
1,440
755
685
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE UnicodeSyntax #-} {-| Module : Main Copyright : 2009–2012 Roel van Dijk License : BSD3 (see the file LICENSE) Maintainer : Roel van Dijk <vandijk.roel@gmail.com> -} module Main where ...
roelvandijk/ls-usb
ls-usb.hs
bsd-3-clause
5,925
0
14
1,382
1,567
903
664
114
2
{-# LANGUAGE DataKinds, GADTs, KindSignatures, TypeOperators #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ScopedTypeVariables #-} module Data.Fin.Unary ( Fin (..) ) where import Data.Nat import Data.Fin data Fin :: PNat -> * where FZ :: Fin (S n) FS :: Fin n -> Fin (S n) finToInteger :: Fin n -> Inte...
bmsherman/haskell-vect
Data/Fin/Unary.hs
bsd-3-clause
634
0
12
163
214
114
100
22
2
module IptAdmin.DelChainPage where import Control.Monad.Error import Happstack.Server.SimpleHTTP import IptAdmin.DelChainPage.Render import IptAdmin.Render import IptAdmin.System import IptAdmin.Template import IptAdmin.Types import IptAdmin.Utils import Iptables import Iptables.Types import Text.Blaze.Renderer.Prett...
etarasov/iptadmin
src/IptAdmin/DelChainPage.hs
bsd-3-clause
3,242
2
24
1,337
514
263
251
59
4
-- Copyright (c) 2014-present, Facebook, Inc. -- All rights reserved. -- -- This source code is distributed under the terms of a BSD license, -- found in the LICENSE file. An additional grant of patent rights can -- be found in the PATENTS file. {-# LANGUAGE DeriveDataTypeable, GADTs, OverloadedStrings, Standalone...
tolysz/Haxl
Haxl/Core/Memo.hs
bsd-3-clause
3,088
0
8
550
542
299
243
44
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Arity and eta expansion -} {-# LANGUAGE CPP #-} -- | Arity and eta expansion module CoreArity ( manifestArity, exprArity, typeArity, exprBotStrictness_maybe, exprEtaExpandArity, findRhsArity, Chea...
gcampax/ghc
compiler/coreSyn/CoreArity.hs
bsd-3-clause
36,420
0
14
10,071
4,501
2,309
2,192
272
7
{-# LANGUAGE DataKinds #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} -- | New-style @.travis.yml@ script generator using cabal 1.24's nix-style -- tech-preview facilities. -- -- See also <https://github....
hvr/multi-ghc-travis
src/HaskellCI.hs
bsd-3-clause
22,256
0
23
5,583
5,519
2,735
2,784
420
7
module Servant.Server.Auth.Token.LevelDB( LevelDBBackendT , runLevelDBBackendT , LevelDBEnv , newLevelDBEnv ) where import Control.Monad.Catch import Control.Monad.Except import Control.Monad.IO.Unlift import Control.Monad.Reader import Control.Monad.Trans.Resource import Servant.Server import Servant.Serv...
NCrashed/servant-auth-token
servant-auth-token-leveldb/src/Servant/Server/Auth/Token/LevelDB.hs
bsd-3-clause
6,113
0
13
933
1,203
655
548
-1
-1
{- TexGen.hs (adapted from texgen.c which is (c) Silicon Graphics, Inc) Copyright (c) Sven Panne 2002-2005 <sven.panne@aedion.de> This file is part of HOpenGL and distributed under a BSD-style license See the file libraries/GLUT/LICENSE This program draws a texture mapped teapot with automatically gene...
FranklinChen/hugs98-plus-Sep2006
packages/GLUT/examples/RedBook/TexGen.hs
bsd-3-clause
4,580
0
14
1,081
1,311
629
682
102
6
----------------------------------------------------------------------------- -- | -- Module : Data.Metrology.Parser -- Copyright : (C) 2014 Richard Eisenberg -- License : BSD-style (see LICENSE) -- Maintainer : Richard Eisenberg (eir@cis.upenn.edu) -- Stability : experimental -- Portability : non-p...
hesiod/units
Data/Metrology/Parser.hs
bsd-3-clause
8,516
0
20
2,091
1,460
812
648
98
6
{-# LANGUAGE BangPatterns, CPP, NondecreasingIndentation, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} -- NB: we specifically ignore deprecations. GHC 7.6 marks the .QSem module as -- deprecated, although it became un-deprecated later. As a result, using 7.6 -- as your bootstrap compiler ...
oldmanmike/ghc
compiler/main/GhcMake.hs
bsd-3-clause
88,323
9
35
27,926
14,465
7,397
7,068
-1
-1
module Utils.Misc where import Data.Time import Data.Char (isSpace) maybeRead :: Read a => String -> Maybe a maybeRead xs = case reads xs of [(y,xs)] | all isSpace xs -> Just y _ -> Nothing whenJust :: Monad m => Maybe a -> (a -> m ()) -> m () whenJust (Just x) f = f x whenJust...
glguy/hpaste
src/Utils/Misc.hs
bsd-3-clause
1,041
0
11
278
331
166
165
24
2
{-# LANGUAGE CPP #-} {-# LANGUAGE DoAndIfThenElse #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TupleSections #...
GaloisInc/saw-script
saw-core/src/Verifier/SAW/Simulator/Prims.hs
bsd-3-clause
49,399
0
35
13,516
18,857
9,402
9,455
1,073
27
module Exercises912 where import Data.Char -- Data.Char problems -- 1. isUpper :: Char -> Bool -- toUpper :: Char -> Char -- 2. removeLower :: [Char] -> [Char] removeLower = filter isUpper -- 3. capitalize :: [Char] -> [Char] capitalize (x:xs) = (toUpper x):xs capitalize _ = [] -- 4. allCaps :: [Char] -> [C...
pdmurray/haskell-book-ex
src/ch9/Exercises9.12.hs
bsd-3-clause
3,051
0
11
757
1,057
562
495
59
2
module Game.LambdaPad.Core.Run ( Stop, stop , PadConfigSelector, runPadConfigSelector , padConfigByName , padConfigByShortName , padConfigByDefault , startLambdaPad , rawLambdaPad ) where import Game.LambdaPad.Core.Internal
zearen-wover/lambda-pad-core
src/Game/LambdaPad/Core/Run.hs
bsd-3-clause
241
0
4
39
44
30
14
9
0
{-# LANGUAGE CPP,TemplateHaskell #-} {- This module is used to create arrays from lists in template haskell -} module Data.Encoding.Helper.Template where import Data.Char import Data.Word import Data.Array.IArray (Array,array) import Language.Haskell.TH createCharArray :: [(Integer,Char)] -> Integer -> Integer -> Q ...
abuiles/turbinado-blog
tmp/dependencies/encoding-0.4.1/Data/Encoding/Helper/Template.hs
bsd-3-clause
1,108
14
20
195
475
260
215
22
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Compiler -- Copyright : Isaac Jones 2003-2004 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This should be a much more sophisticated abstraction than it is. Current...
alphaHeavy/cabal
Cabal/Distribution/Simple/Compiler.hs
bsd-3-clause
7,751
0
15
1,546
915
533
382
73
2
{-# LANGUAGE DeriveFunctor , DeriveFoldable , DeriveTraversable , TemplateHaskell , EmptyDataDecls , TypeFamilies #-} module Data.Tree.Abstract where import Data.Binary import Data.Foldable import Data.Traversable import Data.Fixpoint import Generics.Regular hiding (Fix (..)) import qualified Generics....
sebastiaanvisser/fixpoints
src/Data/Tree/Abstract.hs
bsd-3-clause
1,200
0
11
288
391
212
179
30
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE...
bnordbo/bloodhound
src/Database/Bloodhound/Types.hs
bsd-3-clause
80,749
0
17
25,115
16,585
9,152
7,433
1,651
16
{-# LANGUAGE UnicodeSyntax #-} module AXT.TicTacToe.Graphics ( display, idle ) where import Data.Ratio(Ratio, (%)) import Control.Monad(forM_) import AXT.TicTacToe.Types as AT (Coor3DRI(..), CoorOnField, GameField, GameType(..), Field(F), GameLevel(..), RangeCoor(..), RatI, SCoor(..), State(..),...
xruzzz/axt-tic-tac-toe-gl-haskell
src/AXT/TicTacToe/Graphics.hs
bsd-3-clause
4,405
130
19
1,160
1,732
936
796
89
3
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ScopedTypeVariables #-} module RetrySpec where ------------------------------------------------------------------------------- import Control.Applicative import Control.Exception (MaskingState (..), getMaskingState) import Control....
bergmark/retry
test/RetrySpec.hs
bsd-3-clause
6,242
9
21
1,844
1,863
934
929
143
2
{-# LANGUAGE ImplicitParams #-} import Graphics.FreeGame import Data.Vect import Lib.Action import Lib.Field import Lib.Settings test :: (?player :: Picture, ?block :: Picture) => Game () test = do drawPicture $ Translate startPos ?player drawField tick test main :: IO (Maybe ()) main = runGame gameP...
amutake/free-game-ex
main.hs
bsd-3-clause
615
0
11
155
191
93
98
23
1
{-# LANGUAGE TypeSynonymInstances #-} -- | All of the datatypes and class definitions which are required to -- control the process, represent the state, and report on the status, of -- crawling a domain. The common feature of everything included in this module -- is that it supports this core functionality. module N...
brentonashworth/sitecheck
src/Network/SiteCheck/Data.hs
bsd-3-clause
10,231
6
13
2,795
2,829
1,560
1,269
206
2
module PostgREST.RangeQuery ( rangeParse , rangeRequested , rangeLimit , rangeOffset , NonnegRange ) where import Control.Applicative import Network.HTTP.Types.Header import PostgREST.Types () import qualified Data.ByteString.Char8 as BS import Data.Ranged.Boun...
pap/postgrest
src/PostgREST/RangeQuery.hs
mit
1,703
0
12
412
475
256
219
44
2
-- Copyright (c) 2014 Contributors as noted in the AUTHORS file -- -- 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. -...
frp-arduino/frp-arduino
examples/DoubleBlink.hs
gpl-3.0
1,199
3
13
246
189
103
86
9
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-cognito-identity/gen/Network/AWS/CognitoIdentity/LookupDeveloperIdentity.hs
mpl-2.0
8,265
0
14
1,730
919
552
367
98
1
{-# LANGUAGE FlexibleContexts #-} import System.Environment(getArgs) import Control.Monad.IO.Class(liftIO) import Text.Printf(printf) import qualified Data.Vector.Storable as DVS(mapM_) import Clang.String(unpack) import Clang.TranslationUnit(getCursor) import Clang(parseSourceFile, getChildren) import Clang.Cursor(ge...
chetant/LibClang
test/Test_ChildVisitor.hs
bsd-3-clause
680
1
11
102
210
111
99
17
1
{-# LANGUAGE FlexibleContexts #-} module Futhark.Representation.AST.Attributes.Context ( expExtContext ) where import qualified Data.HashMap.Lazy as HM import Futhark.Representation.AST.Attributes.Types import Futhark.Representation.AST.Attributes.Patterns import Futhark.Representation.AST.Attributes.TypeOf imp...
CulpaBS/wbBach
src/Futhark/Representation/AST/Attributes/Context.hs
bsd-3-clause
1,099
0
15
210
303
159
144
23
2
{-# LANGUAGE LambdaCase #-} module OpenCog.Lojban ( WordList , initParserPrinter , lojbanToAtomese , lojbanToAtomeseRaw , atomeseToLojban , loadWordLists ) where import OpenCog.Lojban.Syntax import OpenCog.Lojban.Util import OpenCog.Lojban.WordList import OpenCog.Lojban.Syntax.Types (WordList) import ...
ruiting/opencog
opencog/nlp/lojban/HaskellLib/src/OpenCog/Lojban.hs
agpl-3.0
1,932
0
10
392
461
255
206
38
1
module GoToSymbolFunction_RecordsType where data Pool a = Pool (Maybe a) getResource :: P<caret>ool a -> Maybe a getResource (Pool maybeA) = maybeA
charleso/intellij-haskforce
tests/gold/codeInsight/GoToSymbolFunction_RecordsType.hs
apache-2.0
149
0
8
23
57
30
27
-1
-1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="ru-RU"> <title>Местоположение изображения и сканер конфиденциальности | ZAP-расширение </title> <...
kingthorin/zap-extensions
addOns/imagelocationscanner/src/main/javahelp/org/zaproxy/zap/extension/imagelocationscanner/resources/help_ru_RU/helpset_ru_RU.hs
apache-2.0
1,109
78
67
162
586
293
293
-1
-1
-- !!! A rules test -- At one time the rule got too specialised a type: -- -- _R "ffoo" forall {@ a1 v :: (a1, ((), ()))} -- fst @ a1 @ () (sndSnd @ a1 @ () @ () v) = fst @ a1 @ ((), ()) v module Main where import System.IO import System.IO.Unsafe ( unsafePerformIO ) {-# NOINLINE [0] sndSnd #-} -- Don'...
ezyang/ghc
testsuite/tests/simplCore/should_run/simplrun002.hs
bsd-3-clause
709
0
11
162
149
87
62
11
1
module Bugs where data A a = A a (a -> Int)
Acidburn0zzz/haddock
html-test/src/Bugs.hs
bsd-2-clause
45
0
8
13
23
14
9
2
0
{-# LANGUAGE RankNTypes, PolyKinds, TypeInType, GADTs, UndecidableSuperClasses #-} module T11520 where import GHC.Types hiding (TyCon) data TypeRep (a :: k) class Typeable k => Typeable (a :: k) where typeRep :: TypeRep a data Compose (f :: k1 -> *) (g :: k2 -> k1) (a :: k2) = Compose (f (g a)) -- Note how th...
ezyang/ghc
testsuite/tests/polykinds/T11520.hs
bsd-3-clause
464
3
9
95
159
90
69
-1
-1
module T8469 where import T8469a
sdiehl/ghc
testsuite/tests/ghci/scripts/T8469.hs
bsd-3-clause
34
0
3
6
7
5
2
2
0
module A (a) where a = "2.0"
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/driver/recomp007/a2/A.hs
bsd-3-clause
30
0
4
8
14
9
5
2
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module Sproxy.Application ( sproxy , redirect ) where import Blaze.ByteString.Builder (toByteString) import Blaze.ByteString.Builder.ByteString (fromByteString) import Control.Exception (Exception, Handler(..), So...
zalora/sproxy
src/Sproxy/Application.hs
mit
17,758
0
30
4,783
4,794
2,500
2,294
418
12
------------------------------------------------------------------------------ -- | -- Module : Mahjong.Yaku -- Copyright : (C) 2014 Samuli Thomasson -- License : MIT (see the file LICENSE) -- Maintainer : Samuli Thomasson <samuli.thomasson@paivola.fi> -- Stability : experimental -- Portabi...
SimSaladin/hajong
hajong-server/src/Mahjong/Hand/Yaku.hs
mit
2,971
0
11
635
523
323
200
50
2
{-# LANGUAGE RecordWildCards #-} module Learning.IOHMM.Internal ( IOHMM (..) , LogLikelihood , init , withEmission , euclideanDistance , viterbi , baumWelch , baumWelch' -- , baumWelch1 -- , forward -- , backward -- , posterior ) where import Control.Applicative ...
mnacamura/learning-hmm
src/Learning/IOHMM/Internal.hs
mit
12,449
53
22
4,068
3,537
1,996
1,541
198
1
module Network.BitFunctor.Crypto.Signing ( Signature , sign , verify ) where import Network.BitFunctor.Crypto.Signing.Types import Network.BitFunctor.Crypto.Key.Types import qualified Crypto.Pub...
BitFunctor/bitfunctor
src/Network/BitFunctor/Crypto/Signing.hs
mit
550
0
8
182
119
72
47
11
1
module Proteome.Test.AddFTest where import qualified Data.Map as Map (fromList) import Path (Dir, Rel, parseAbsDir, reldir, (</>)) import Ribosome.Api.Path (nvimCwd) import Ribosome.Control.Ribosome (newRibosome) import Ribosome.Nvim.Api.IO (vimCallFunction, vimCommand, vimSetVar) import Ribosome.Test.Await (awaitEqua...
tek/proteome
packages/test/test/Proteome/Test/AddFTest.hs
mit
1,550
0
14
239
464
264
200
-1
-1
module PPOL.Permutation.APermutation ( ) where import qualified Data.Array as Array type APermutation = Array.Array Int Int newAPermutation :: Int -> APermutation newAPermutation n = Array.array (1,n) [(i, i) | i <- [1..n]] fromList :: [Int] -> APermutation fromLPermutation :: LP.LPermutation -> APermutation toLP...
vialette/PPOL
src/PPOL/Permutation/APermutation.hs
mit
469
0
9
64
139
80
59
11
1
{-# LANGUAGE LambdaCase, NamedFieldPuns, OverloadedStrings, ScopedTypeVariables #-} module Main where import Prelude hiding (FilePath) import Data.String (fromString) import Data.Maybe (fromMaybe) import Compile import Control.Arrow import Control.Monad import Control.Monad.Except import Control.Monad.Catch import Con...
imeckler/proof
Main.hs
mit
4,653
0
21
980
1,422
728
694
100
3
module Chimera.Engine.Core ( module M ) where import Chimera.Engine.Core.Types as M import Chimera.Engine.Core.Field as M import Chimera.Engine.Core.Layers as M import Chimera.Engine.Core.Menu as M import Chimera.Engine.Core.Util as M
myuon/Chimera
Chimera/Engine/Core.hs
mit
240
0
4
32
58
44
14
7
0
module GHCJS.DOM.SVGPathSegLinetoVerticalRel ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/SVGPathSegLinetoVerticalRel.hs
mit
57
0
3
7
10
7
3
1
0
lucky :: (Integral a) => a -> String lucky 7 = "lucky number seven" lucky x = "sorry" factorial :: (Integral a) => a -> a factorial 0 = 1 factorial n = n * factorial (n - 1) addVectors :: (Num a) => (a, a) -> (a, a) -> (a, a) addVectors (x1, y1) (x2, y2) = (x1 + x2, y1 + y2) -- Patten match with x:xs -- [a+b+c | a:b...
autocorr/lyah
chap4.hs
mit
2,948
0
11
858
1,263
670
593
73
3
-- Copyright (c) 2016-present, SoundCloud Ltd. -- All rights reserved. -- -- This source code is distributed under the terms of a MIT license, -- found in the LICENSE file. {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} module Kubern...
soundcloud/haskell-kubernetes
lib/Kubernetes/Model/V1/EnvVarSource.hs
mit
2,104
0
14
724
321
194
127
39
1
-- ex7.2.hs import Control.Monad find_ :: (a -> Bool) -> [a] -> Maybe a find_ p l = let pl = map (\e -> if p e then Just e else Nothing) l in msum pl
hnfmr/beginning_haskell
ex7.2.hs
mit
175
0
13
61
84
43
41
5
2
module Main where import Data.Char import qualified Brainfuck.Types as BF import Brainfuck.Interpreter import Brixy.AST import Brixy.Compiler {- simpl = Module "Main" [Function (Ident "test") [Ident "x"] [Print (VL (Ident "x"))] ,Function (Ident "main") [] [Cal...
EXio4/brixy
src/Main.hs
mit
7,654
0
19
3,265
1,671
848
823
73
2
{-# LANGUAGE UndecidableInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Edison.Concrete.FingerTree -- Copyright : (c) Ross Paterson, Ralf Hinze 2006 -- License : BSD-style -- Maintainer : robdockins AT fastmail DOT fm -- Stability : in...
robdockins/edison
edison-core/src/Data/Edison/Concrete/FingerTree.hs
mit
32,813
0
16
9,479
15,829
7,936
7,893
-1
-1
module Relations.Basics.Terms where import Notes makeDefs [ "relation" , "unit relation" , "inverse relation" , "binary relation" , "reflexive" , "transitive" , "symmetric" , "total" ] makeEx "divides is relation" makeThm "Inverse of Inverse relation is normal"
NorfairKing/the-notes
src/Relations/Basics/Terms.hs
gpl-2.0
314
0
6
89
52
29
23
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DeriveDataTypeable #-} module Goto.Type where import RAM.Builtin import Autolib.ToDoc import Autolib.Reader import Autolib.Size import Autolib.TES.Identifier import Data.Typeable import Autolib.Xm...
marcellussiegburg/autotool
collection/src/Goto/Type.hs
gpl-2.0
1,004
0
13
219
325
179
146
34
5
module Patat.Presentation ( PresentationSettings (..) , defaultPresentationSettings , Presentation (..) , readPresentation , Size , getDisplaySize , Display (..) , displayPresentation , displayPresentationError , dumpPresentation , PresentationCommand (..) , readPrese...
jaspervdj/patat
lib/Patat/Presentation.hs
gpl-2.0
582
0
5
150
94
64
30
19
0
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings, LambdaCase #-} ----------------------------------------------------------------------------- -- -- Module : IDE.Completion -- Copyright : 2007-2011 Juergen Nicklisch-Franken, Hamish Mackenzie -- License : GPL -- -- Maintainer : <maintainer@leksah.org>...
JPMoresmau/leksah
src/IDE/Completion.hs
gpl-2.0
24,845
0
32
7,903
6,341
3,119
3,222
459
16
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies , FlexibleInstances #-} {- | Module : $Header$ Description : Symbols and signature morphisms for the CASL logic Copyright : (c) Christian Maeder, Till Mossakowski and Uni Bremen 2002-2004 License : GPLv2 or higher, see LICENSE.txt Maintainer ...
nevrenato/HetsAlloy
CASL/Morphism.hs
gpl-2.0
26,993
0
27
8,091
9,667
4,882
4,785
623
22
{-# OPTIONS_GHC -Wno-deferred-type-errors #-} -- | API server routes. module Routes ( routes, root, media, pub, static, gpgKeyFile, blog, ) where import API (API, BlogAPI, BlogArticleAPI, BlogListingAPI, BrowseAPI, ComponentAPI, FeedAPI, GPGAPI, runServerAPI) import Config (Config (..)) im...
phaazon/phaazon.net
backend/src/Routes.hs
gpl-3.0
2,355
0
12
392
649
355
294
61
2
{-# OPTIONS -fwarn-tabs -fwarn-incomplete-patterns -Wall -fno-warn-type-defaults #-} {-# LANGUAGE RecordWildCards, MultiParamTypeClasses #-} module CatanGUI (beginGUI) where import Prelude hiding(log) import Control.Monad(when, void) import qualified Graphics.UI.Threepenny as UI import Grap...
dylanmann/CurriersOfCatan
src/CatanGUI.hs
gpl-3.0
20,666
0
30
6,535
7,319
3,493
3,826
513
12
module Data.Record.StateFields ( IdField(..) , StateField(..) , idStateField , StateTField(..) , idStateTField , ReaderField(..) , idReaderField , FieldPath(..) , FieldState(..) , modf , enter , enterT , FieldReader(..) , proj , projT , record , (!/) , (&/) ) where import Data.Re...
ktvoelker/state-record
src/Data/Record/StateFields.hs
gpl-3.0
5,323
0
12
1,295
2,055
1,067
988
-1
-1
module Masque.Ejectors where import Control.Monad.Error.Class import Control.Monad.Trans.Either import Data.Unique import Masque.Monte -- | Run an action, catching a single specified ejector. If caught, the -- ejector's payload will be run through the given handler action. catchEjector :: Unique -> Monte Obj -> (O...
monte-language/masque
Masque/Ejectors.hs
gpl-3.0
723
0
13
178
186
95
91
14
2
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} -- | Importing of FR3D data. Both "basepairs" and "near interactions" are -- currently supported. More parsers will come if required. module Biobase.FR3D.Import where import Control.Arrow import Data.ByteString.Char8 as BS import Data.Char import Da...
choener/BiobaseFR3D
Biobase/FR3D/Import.hs
gpl-3.0
2,772
0
20
603
671
367
304
49
1
module Interface.Completed (startCompleted, startCompletedNum, completedUI, Completed) where import Interface.Expand import HTorrentPrelude import Torrent.Env import qualified Data.IntMap as IM import qualified Graphics.UI.Threepenny as UI import Graphics.UI.Threepenny.Core import Reactive.Threepenny type Completed ...
ian-mi/hTorrent
Interface/Completed.hs
gpl-3.0
1,410
0
12
222
414
210
204
32
1
{-# LANGUAGE QuasiQuotes #-} module Styles (mainCss) where import Text.Lucius render = undefined mainCss' = [lucius| .form-urlshort { max-width: 550px; padding: 15px; margin: 0 auto; margin-top: 25vh; * { margin: 15px 0 15px 0; } } |] mainCss = renderCss $ mainCss' render
nico-izo/hsUrlShort
src/Styles.hs
gpl-3.0
315
0
6
85
41
26
15
6
1
-- Copyright (C) 2017 Jonathan W. Armond module Loco.Interpreter where import Loco.Parser import Loco.Eval import Loco.Error import Loco.Store import Loco.AST import Loco.Pretty import Control.Monad import Control.Monad.Except import Data.List import Data.List.Zipper trace = False traceShow = show -- |Execute a pro...
jarmond/locomotive-haskell
src/Loco/Interpreter.hs
gpl-3.0
2,904
0
17
752
825
408
417
65
4
{-# LANGUAGE NoOverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module GUI.RSCoin.TransactionsTab ( createTransactionsTab , initTransactionsTab ) where import Control.Exception (SomeException (..), catch) import Control.Monad (void, when) import ...
input-output-hk/rscoin-haskell
src/User/GUI/RSCoin/TransactionsTab.hs
gpl-3.0
6,675
0
20
1,925
1,597
789
808
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-servicecontrol/gen/Network/Google/Resource/ServiceControl/Services/Check.hs
mpl-2.0
6,766
0
19
1,614
955
561
394
133
1
{- ORMOLU_DISABLE -} -- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca) -- Copyright (C) 2016, Julia Longtin (julial@turinglace.com) -- Released under the GNU AGPLV3+, see LICENSE module Graphics.Implicit.Export.Render.Interpolate (interpolate) where import Prelude((*), (>), (<), (/=), (+), (-), (...
colah/ImplicitCAD
Graphics/Implicit/Export/Render/Interpolate.hs
agpl-3.0
4,334
3
15
1,100
909
517
392
43
4
module SubprimeFib.A282812Spec (main, spec) where import Test.Hspec import SubprimeFib.A282812 (a282812) main :: IO () main = hspec spec spec :: Spec spec = describe "A282812" $ it "correctly computes the first 20 elements" $ take 20 (map a282812 [1..]) `shouldBe` expectedValue where expectedValue = [239,...
peterokagey/haskellOEIS
test/SubprimeFib/A282812Spec.hs
apache-2.0
393
0
10
59
160
95
65
10
1
{-# LANGUAGE FlexibleInstances #-} module Camfort.ReprintSpec (spec) where import Camfort.Functionality import Camfort.Reprint import Camfort.Specification.Units.Monad (LiteralsOpt(LitMixed)) import qualified Data.ByteString.Char8 as B import qualified Language.Fortran.Util.Position as FU import System.FilePath imp...
mrd/camfort
tests/Camfort/ReprintSpec.hs
apache-2.0
4,711
0
16
1,314
1,319
707
612
79
1
{-# LANGUAGE TupleSections, NamedFieldPuns, ScopedTypeVariables, RankNTypes, GADTs #-} {-| Filtering of jobs for the Ganeti job queue. -} {- Copyright (C) 2014 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that t...
leshchevds/ganeti
src/Ganeti/JQScheduler/Filtering.hs
bsd-2-clause
10,127
0
21
2,514
1,763
958
805
-1
-1
module Main where import Crypto.Classes import Crypto.Hash.Ed2k import qualified Data.ByteString as B import Data.Word (Word8) import System.Exit testHash :: [Word8] testHash = [83,211,145,194,240,9,199,230,55,34,205,252,35,114,246,228] main :: IO () main = do testData <- B.readFile "testData.bin" let testHash' ...
nullref/haskell-hash-ed2k
Benchmark/Strict.hs
bsd-2-clause
467
0
14
84
180
104
76
17
2
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QUndoView.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:14 Warning : this file is machine generated - do not...
uduki/hsQt
Qtc/Gui/QUndoView.hs
bsd-2-clause
87,687
0
15
14,183
28,636
14,519
14,117
-1
-1
{-# LANGUAGE FlexibleInstances #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Hooks.FadeWindows -- Description : A more flexible and general compositing interface than FadeInactive. -- Copyright : Brandon S Allbery KF8NH <allbery.b@gmail.com> -- Licen...
xmonad/xmonad-contrib
XMonad/Hooks/FadeWindows.hs
bsd-3-clause
9,223
0
18
2,967
846
519
327
77
2
{-# LANGUAGE DefaultSignatures, FlexibleContexts #-} -- | -- Module: Data.Aeson.Types.Class -- Copyright: (c) 2011-2015 Bryan O'Sullivan -- (c) 2011 MailRank, Inc. -- License: Apache -- Maintainer: Bryan O'Sullivan <bos@serpentine.com> -- Stability: experimental -- Portability: portable -- -...
nurpax/aeson
Data/Aeson/Types/Class.hs
bsd-3-clause
6,569
0
11
1,322
650
418
232
40
1