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
module TicTacToe (module TicTacToe) where import TicTacToe.Data.Board as TicTacToe import TicTacToe.Data.Cell as TicTacToe import TicTacToe.Data.Move as TicTacToe import TicTacToe.Data.Token as TicTacToe import TicTacToe.Game as TicTacToe
rodamber/haskell-tic-tac-toe
src/TicTacToe.hs
bsd-3-clause
298
0
4
84
49
36
13
6
0
{-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE OverloadedStrings #-} module Controllers.Routes ( routes ) where import Control.Applicative import Data.ByteString (ByteString) import Snap.Snaplet import Snap.Snaplet.Heist import Snap.Util.FileServe im...
HaskellCNOrg/snap-web
src/Controllers/Routes.hs
bsd-3-clause
1,089
0
13
381
213
133
80
34
1
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} module Tests ( tests , testsDbInit) where ------------------------------------------------------------------------------ import Control.Error import Control.Monad.State as S import qualified Data.Aeson as A import qualified Data.ByteStri...
nurpax/snaplet-sqlite-simple
test/Tests.hs
bsd-3-clause
12,756
0
17
2,811
2,734
1,375
1,359
232
3
{-# OPTIONS_GHC -Wall #-} module Load where import Data.Vector.Storable (Vector) import qualified Data.Vector.Storable as S import Foreign.Ptr (castPtr) import Foreign.ForeignPtr (newForeignPtr_) import qualified Data.ByteString as B import Data.ByteString.Unsafe as B (unsafeUseAsCString) import Data.Bits import Dat...
peddie/lstsdr
src/Load.hs
bsd-3-clause
2,680
0
16
638
1,012
533
479
70
2
{-# LANGUAGE TupleSections #-} module Deque (Deque, mkDeque, push, pop, shift, unshift) where import Control.Applicative ((<$>), (<*>)) import Control.Concurrent.STM ( STM, TMVar, takeTMVar, putTMVar, readTMVar , swapTMVar, atomically, newEmptyTMVar, newTMVar) import Control.Monad (void) ...
pminten/xhaskell
linked-list/example.hs
mit
2,438
0
13
644
1,118
558
560
66
2
{- | Module : ./Common/SZSOntology.hs Description : The SZS ontology for TPTP prover results Copyright : (c) Christian Maeder DFKI GmbH 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable see <http://www.cs.miami.edu...
spechub/Hets
Common/SZSOntology.hs
gpl-2.0
10,338
0
12
2,158
826
546
280
75
1
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : ./Modal/AS_Modal.der.hs Copyright : (c) T.Mossakowski, W.Herding, C.Maeder, Uni Bremen 2004-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : till@informatik.uni-bremen.de Stability : provisional Portability : portable Abstract syntax fo...
spechub/Hets
Modal/AS_Modal.der.hs
gpl-2.0
1,601
0
10
386
289
160
129
20
0
{- - Copyright 2011-2014 Per Magnus Therning - - 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 ...
mmhat/cblrepo
src/Upgrades.hs
apache-2.0
2,247
1
16
498
560
295
265
38
4
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} module SDL.Internal.Types ( WindowID(..) , Joystick(..) , Window(..) , Renderer(..) ) where import Data.Data (Data) import Data.Typeable import Foreign import GHC.Generics (Generic) import qualified SDL.Raw as Raw newtype WindowID = WindowI...
svenkeidel/sdl2
src/SDL/Internal/Types.hs
bsd-3-clause
684
0
7
112
233
138
95
20
0
{-# LANGUAGE TypeFamilies, Rank2Types, FlexibleContexts, DeriveGeneric, TemplateHaskell, UndecidableInstances, ConstraintKinds, DeriveDataTypeable , ScopedTypeVariables, DataKinds #-} {-# OPTIONS -W -ddump-splices #-} module Tests.Embed (allTests) where import Language.Hakaru.Syntax (Hakaru(..), Order(..)...
bitemyapp/hakaru
Tests/Embed.hs
bsd-3-clause
2,549
0
13
483
868
487
381
53
1
{-# LANGUAGE NoImplicitPrelude #-} -- | -- Module: $HEADER$ -- Description: Test cases for Data.DHT.DKS.Type.StateMachine module. -- Copyright: (c) 2015, Jan Šipr, Matej Kollár, Peter Trško -- License: BSD3 -- -- Stability: stable -- Portability: NoImplicitPrelude -- -- Test cases for "Data.DHT.DKS.T...
FPBrno/dht-dks
test/TestCase/Data/DHT/DKS/StateMachine.hs
bsd-3-clause
612
0
5
91
53
39
14
5
1
----------------------------------------------------------------------------- -- | -- Module : Language.Python.Common.ParseError -- Copyright : (c) 2009 Bernie Pope -- License : BSD-style -- Maintainer : bjpop@csse.unimelb.edu.au -- Stability : experimental -- Portability : ghc -- -- Error values for the...
jml/language-python
src/Language/Python/Common/ParseError.hs
bsd-3-clause
1,144
0
6
198
126
83
43
13
0
module Scene ( Scene , Intersection(..) , mkScene , sceneIntersection , pointLightSources ) where import Data.List ( minimumBy ) import Data.Maybe ( mapMaybe ) import Data.Ord ( comparing ) import Core ( Ray, RayPosition, Point, at ) import Light ( Poi...
stu-smith/rendering-in-haskell
src/experiment04/Scene.hs
mit
1,491
0
10
440
375
213
162
-1
-1
module Main where fib :: Int -> Int fib n = if n < 2 then 1 else fib (n-1) + fib (n-2) main :: IO () main = putStrLn $ "fib 30 = " ++ show (fib 30)
conal/hermit
examples/Talks/hermit-machine/Fib.hs
bsd-2-clause
168
0
9
59
89
47
42
7
2
module List (listModules) where import Control.Applicative import Data.List import GHC import GHCApi import Packages import Types import UniqFM ---------------------------------------------------------------- listModules :: Options -> IO String listModules opt = convert opt . nub . sort <$> list opt list :: Options...
syohex/ghc-mod
List.hs
bsd-3-clause
587
0
11
132
146
76
70
17
1
{-| Ganeti query daemon -} {- Copyright (C) 2009, 2011, 2012, 2013 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later versio...
vladimir-ipatov/ganeti
src/hluxid.hs
gpl-2.0
1,179
0
6
211
93
59
34
16
1
module WhereIn2 where f = (case (x, y, z) of (1, y, z) -> y + z (x, y, z) -> z) where (x, y, z) = g 42 g x = (1, 2, x) f_1 = (case (x, y, z) of (1, y, z) -> return 0 (x, y, z) -> return 1) where (x, y, z) = g 42 g x = (1, 2, x)
mpickering/HaRe
old/testing/simplifyExpr/WhereIn2AST.hs
bsd-3-clause
317
0
9
156
190
111
79
11
2
{-# LANGUAGE TypeOperators, GADTs #-} -- Enable -Werror to fail in case we get this warning: -- -- UNPACK pragma lacks '!' on the first argument of ‘A’ -- -- In this test case we expect to get this warning and fail, -- see T14761c for the opposite. {-# OPTIONS -Werror #-} module T14761a where data A = A { a :: {-#...
sdiehl/ghc
testsuite/tests/typecheck/should_fail/T14761a.hs
bsd-3-clause
508
0
12
121
107
63
44
14
0
-- $Id: SVCOps.hs,v 1.1 2001/07/19 22:36:04 wlh Exp $ module SVCOps (getHOLTyCon, getSVCOp) where --- Now the first bit in "(tf, string)" means: is it an --- *interpreted* function symbol? N.b., all operators are --- prefix in SVC. svcOps = [ ("True", (True, "true")), ("False", (True, "false")), ...
forste/haReFork
tools/pg2svc/SVCOps.hs
bsd-3-clause
935
2
7
296
257
163
94
18
1
module T13604 where
shlevy/ghc
testsuite/tests/driver/T13604.hs
bsd-3-clause
20
0
2
3
4
3
1
1
0
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Text.Read -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libr...
tolysz/prepare-ghcjs
spec-lts8/base/Text/Read.hs
bsd-3-clause
2,521
0
10
506
372
217
155
41
3
{-# LANGUAGE QuasiQuotes #-} module Futhark.CodeGen.OpenCL.Kernels ( SizeHeuristic (..) , DeviceType (..) , WhichSize (..) , HeuristicValue (..) , sizeHeuristicsTable , mapTranspose , TransposeType(..) ) where import qualified Language.C.Syntax as C impor...
ihc/futhark
src/Futhark/CodeGen/OpenCL/Kernels.hs
isc
7,519
0
10
1,927
646
400
246
75
11
import CCNxPacketGenerator import Generator import Writer import System.Environment import System.Random import Data.Bits import Data.Word import Data.ByteString import Data.ByteString.Char8 import Data.List.Split usage :: IO () usage = do Prelude.putStrLn "" Prelude.putStrLn "usage: runhaskell InterestBuilder...
chris-wood/ccnx-pktgen
src/InterestBuilder.hs
mit
1,004
0
20
285
244
118
126
30
3
{-# htermination showsPrec :: Int -> Ordering -> String -> String #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_showsPrec_12.hs
mit
70
0
2
12
3
2
1
1
0
{-# LANGUAGE OverloadedStrings #-} module Bot.NetHack.Messages ( consumeMessages ) where import Bot.NetHack.MonadAI import Bot.NetHack.ScreenPattern import Control.Monad import qualified Data.IntMap.Strict as IM import Data.Monoid import qualified Data.Text as T -- | Presses space until all messages have been co...
Noeda/adeonbot
bot/src/Bot/NetHack/Messages.hs
mit
2,220
0
17
537
602
302
300
47
3
-- | Flexible, type-safe open unions. module Data.OpenUnion ( Union , (@>) , liftUnion , reUnion , flattenUnion , restrict , typesExhausted ) where import Data.OpenUnion.Internal
bfops/open-union
Data/OpenUnion.hs
mit
212
0
4
59
38
26
12
9
0
{-# LANGUAGE OverloadedStrings #-} module AyaScript.GenES where import AyaScript.Types import Data.List import Data.Aeson import Data.ByteString.Lazy.Char8 (unpack) s :: String -> String s = id n :: Num a => a -> a n = id me :: Maybe Expr -> Maybe Expr me = id le :: [Expr] -> [Expr] le = id genES :: Program -> S...
AyaMorisawa/aya-script
src/AyaScript/GenES.hs
mit
4,275
0
13
2,127
1,200
617
583
81
1
module HW3 where import Data.List (findIndices) advancedFilter :: ((a, a, a) -> Bool) -> [a] -> [Int] advancedFilter _ [] = [] advancedFilter _ [x] = [] advancedFilter _ [x, y] = [] advancedFilter pred (x:y:xs) = map (+ 1) $ findIndices pred $ zip3 (x:y:xs) (y:xs) xs prodIndices :: [Integer] -> [Int] prodIndices lis...
GrandArchTemplar/FunctionalProgramming
src/HW3.hs
mit
1,653
0
12
380
970
549
421
43
1
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module Main (main) where import Test.HUnit hiding (Test) import Test.Framework (Test) import Test.Framework (defaultMain, testGroup) import Test.Framework.Providers.HUnit import MicroKanren import MicroKanren.Plain (LVar(LV...
Oregu/featherweight
tests/Main.hs
mit
1,364
0
14
512
409
217
192
-1
-1
{- arch-tag: HVIO main file Copyright (c) 2004-2011 John Goerzen <jgoerzen@complete.org> All rights reserved. For license and copyright information, see the file LICENSE -} {- | Module : System.IO.HVIO Copyright : Copyright (C) 2004-2011 John Goerzen License : BSD3 Maintainer : John Goerzen <jgo...
haskellbr/missingh
missingh-all/src/System/IO/HVIO.hs
mit
24,901
0
24
7,478
3,895
1,935
1,960
298
1
{-# LANGUAGE OverloadedStrings #-} module TestImport ( module Yesod.Test , module Model , module Foundation , module Database.Persist , runDB , getMessageRender , Specs ) where import Yesod.Test import Database.Persist hiding (get) import Database.Persist.Sql (runSqlPool, SqlPersist, Co...
lulf/wishsys
tests/TestImport.hs
mit
1,005
0
10
196
275
159
116
28
1
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Database ( module Generated , js_changeVersion , changeVersion' , changeVersion , js_transaction , transaction' , transaction , js_readTransaction , readTransaction' , readTransaction ) where import Data.Maybe (fromJu...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Database.hs
mit
3,930
28
14
537
986
527
459
-1
-1
module Irg.Lab4.Fractal.Initialize (initialize) where --import qualified Graphics.GL.Compatibility33 as GL import qualified Graphics.UI.GLUT as GLUT import Graphics.UI.GLUT (($=)) --import Data.IORef import Irg.Lab4.Fractal.Utility initialize :: GameState -> ReshapeCallback -> DisplayCallback -> KeyboardCallback -> M...
DominikDitoIvosevic/Uni
IRG/src/Irg/Lab4/Fractal/Initialize.hs
mit
1,056
0
11
135
290
144
146
20
1
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} module TX ( Persistable(..) -- * Managing the database , Database , openDatabase , closeDatabase , withUserData ...
mcschroeder/tx
TX.hs
mit
8,171
0
16
2,151
1,295
700
595
105
5
{-# LANGUAGE RecursiveDo #-} module Spaceships.Assets ( Assets(..), Message(..), loadAssets, bgColor, messageColor ) where import Common.AniTimer import Common.Assets import Common.Counters import Common.Graphics import Common.Util import Control.Applicative import Control.Monad import Graphics.UI.SDL import Graph...
CLowcay/CC_Clones
src/Spaceships/Assets.hs
gpl-3.0
4,446
56
14
797
1,654
865
789
120
24
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANG...
capitanbatata/sandbox
typelevel-computations/src/Injection.hs
gpl-3.0
1,927
18
11
490
415
241
174
30
0
sum [x | x <- [1..999], x `mod` 3 == 0 || x `mod` 5 == 0]
Daphron/project-euler
p1.hs
gpl-3.0
59
0
12
18
51
27
24
-1
-1
module HEP.Automation.MadGraph.Dataset.Set20110715set3 where import HEP.Storage.WebDAV.Type import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Model.SChanC8V import HEP.Automation....
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110715set3.hs
gpl-3.0
2,023
0
16
712
542
340
202
51
1
{-# LANGUAGE OverloadedStrings #-} module Api (startApp) where import Users import Auth import Network.Wai import Network.Wai.Handler.Warp import Servant import Config type API = "user" :> Header "Authorization" AuthHeader :> Capture "username" String :> ReqBody '[JSON] User :> Put '[J...
patrickboe/wheel
src/lib/hs/Api.hs
gpl-3.0
620
0
11
139
196
103
93
-1
-1
{-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} {-# OPTIONS_GHC -fno-warn-type-defaults #-} -- Module : Khan.Model.IAM.Role -- Copyright : ...
brendanhay/khan
khan/Khan/Model/IAM/Role.hs
mpl-2.0
3,072
0
12
817
745
383
362
66
2
{-# LANGUAGE OverloadedStrings #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.EC2.Types -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability : auto-g...
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
34,216
0
13
9,434
4,376
2,985
1,391
1,200
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/RegionInstanceGroupManagers/SetTargetPools.hs
mpl-2.0
6,625
0
19
1,448
638
380
258
111
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/Groups/Patch.hs
mpl-2.0
4,937
0
19
1,204
789
460
329
113
1
data Heap = Heap {value :: Int, left :: Heap, right :: Heap} | Empty deriving (Eq, Show) heapWith value = Heap value Empty Empty add :: Int -> Heap -> Heap add value Empty = Heap value Empty Empty add value (Heap x Empty Empty) = if value < x then Heap value (heapWith x) Empty else Heap x (heapWith value) Emp...
dkandalov/katas
haskell/sort/heap-sort/heap-sort.hs
unlicense
1,109
0
11
296
436
214
222
21
4
module Ch16 where import Test.HUnit (Counts, Test (TestList), runTestTT) import qualified Test.HUnit.Util as U (t) ------------------------------------------------------------------------------ -- ch 16 {- 2nd : composition of two functors which are related via an adjoint relation - e.g., newtype Stat...
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/category-theory/alejandro-serrano-bom/src/Ch16.hs
unlicense
1,305
0
6
235
85
53
32
9
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# OPTIONS_HADDOCK hide #-} -- | -- Module : DNA.Logging -- Copyright : (C) 2014-2015 Braam Research, LLC. -- License : Apache-2.0 -- -- Logging and profiling facilities. Log messages are written to GHC's -...
SKA-ScienceDataProcessor/RC
MS5/dna/core/DNA/Logging.hs
apache-2.0
30,115
0
20
7,004
5,052
2,710
2,342
343
3
{-# LANGUAGE OverloadedStrings #-} module Main where import Prelude hiding (foldr) import Control.Concurrent.STM (atomically) import Control.Monad (void) import Control.Monad.Trans.Resource import Data.ByteString (ByteString) import Data.Conduit import Data.Conduit.Process (sourceCmd) import Data.Conduit.T...
bmjames/xssh-conduit
xssh-conduit.hs
apache-2.0
2,474
0
16
699
760
399
361
64
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE PackageImports #-} module Network ( N.HostName , N.PortNumber , N.PortID(..) , connectTo , withSocketsDo ) where import qualified "network" Network as N import System.Mock.IO.Internal
3of8/mockio
New_Network.hs
bsd-2-clause
230
0
5
34
47
33
14
10
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {- NOTES: stackexchange API spec and its document just sucks! -} module IDP.StackExchange where import Control.Monad.Trans.Except import Data.Aeson import Dat...
freizl/hoauth2
hoauth2-example/src/IDP/StackExchange.hs
bsd-3-clause
3,299
0
11
594
616
367
249
83
2
{-# LANGUAGE FlexibleContexts #-} module Text.XML.Monad.Name where import Control.Monad.Error.Class import Control.Monad.Reader.Class import Data.Char import Data.Function import Text.XML.Monad.Core import Text.XML.Monad.Error import qualified Text.XML.Ligh...
aristidb/xml-monad
Text/XML/Monad/Name.hs
bsd-3-clause
2,537
0
12
425
878
467
411
41
2
{-| Module : Data.Boltzmann.System.Sampler Description : Sampler utilities for combinatorial systems. Copyright : (c) Maciej Bendkowski, 2017-2021 License : BSD3 Maintainer : maciej.bendkowski@tcs.uj.edu.pl Stability : experimental -} {-# LANGUAGE DeriveGeneric #-} module Data.Boltzmann.System.Sa...
maciej-bendkowski/boltzmann-brain
Data/Boltzmann/System/Sampler.hs
bsd-3-clause
4,276
0
13
1,522
1,380
733
647
100
3
{-# LANGUAGE OverloadedStrings #-} module IrcScanner.SnapUtil where import Data.Text(append,Text) import Data.ByteString(ByteString) import Control.Monad.Trans.Either (EitherT(..)) import Snap import Snap.Snaplet.Heist import IrcScanner.Types import Control.Monad.Trans (lift) import Control.Monad.R...
redfish64/IrcScanner
src/IrcScanner/SnapUtil.hs
bsd-3-clause
2,097
0
14
476
691
356
335
58
2
module Tests.Algorithms where import Test.Framework (defaultMain, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.QuickCheck import Control.Monad (liftM) import Data.Function (on) import Data.Foldable as F import Data.List as L import Data.IntMap as M hiding ((!)) import Math....
laughedelic/sparse-lin-alg
Tests/Algorithms.hs
bsd-3-clause
1,911
0
18
506
525
290
235
34
2
{-# LANGUAGE QuasiQuotes #-} import LiquidHaskell [lq| foo :: Fractional a => {v:a | v >= 1.0} |] foo :: Fractional a => a foo = undefined [lq| foo'' :: RealFloat a => {v:a | v >= 1.0} |] foo'' :: RealFloat a => a foo'' = undefined [lq| foo' :: Num a => {v:a | v >= 1} |] foo' :: Num a => a foo' = undefined
spinda/liquidhaskell
tests/gsoc15/unknown/pos/Fractional.hs
bsd-3-clause
316
0
6
77
77
45
32
11
1
{-# LANGUAGE NoMonomorphismRestriction #-} module Lib where import Data.List (elemIndex) import Data.Monoid import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes import Control.Applicative (liftA3) -- 17.5 Applicative in use -- Exercises: Lookups -- 1 added :: Maybe Integer added...
backofhan/HaskellExercises
CH17/src/Lib.hs
bsd-3-clause
8,089
0
13
1,961
3,756
1,970
1,786
182
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} module PeerTrader.Account.Web where import Control.Concurrent (ThreadId) import Control.Concurrent.STM import Control.Lens import Database.PostgreSQL.Simple.ToField import Database.Post...
WraithM/peertrader-backend
src/PeerTrader/Account/Web.hs
bsd-3-clause
1,237
0
12
350
305
162
143
30
1
{-# LANGUAGE OverloadedStrings #-} module Site (app) where import qualified API import qualified Documentation import Application import Data.ByteString (ByteString) import qualified Snap.CORS as CORS import Snap.Snaplet import Snap.Snaplet.Heist import Snap.Util.FileServe routes :: [(ByteString, Handler App App ()...
eval-so/frontend3
src/Site.hs
bsd-3-clause
926
0
10
197
229
133
96
25
1
{-# LANGUAGE TemplateHaskell, MultiParamTypeClasses, TypeFamilies #-} -- TODO: ~15 minutes, needs profiling import Control.Monad (forM_, when) import Control.Monad.ST (runST, ST) import Control.Monad.Primitive import qualified Data.Vector.Unboxed as V import qualified Data.Vector.Unboxed...
foreverbell/project-euler-solutions
src/378.hs
bsd-3-clause
2,378
0
24
697
1,077
548
529
65
2
-- | A binary tree for storing quantifiers. module Logic.PrenexTree ( PrenexTree(..) , Type(..) , add , flatten , merge , swapAll , swapWhen ) where -- | Type of a quantifier together with its bound variable. data Type a = F a -- ^ Universal quantifier. | E a -- ^ Existential qu...
vituscze/logic
src/Logic/PrenexTree.hs
bsd-3-clause
1,800
0
14
553
518
273
245
34
3
{-| Module : Idris.Parser Description : Idris' parser. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE GeneralizedNewtypeDeriving, ConstraintKinds, PatternGuards #-} {-# OPTIONS_GHC -O0 #-} module Idris.Parser(module Idris.Parser, module Idris.Parser.Expr, ...
ozgurakgun/Idris-dev
src/Idris/Parser.hs
bsd-3-clause
73,180
483
26
30,373
15,473
8,415
7,058
1,271
27
{-# LANGUAGE DuplicateRecordFields #-} module Jerimum.Environment -- * Types ( Key , Environment , ReplDatabaseEnvironment(..) , SnapshotDatabaseEnvironment(..) , StorageDriverEnvironment(..) , StorageServerEnvironment(..) , SnapshotServerEnvironment(..) -- * Combinators , envString , envStri...
dgvncsz0f/nws
src/Jerimum/Environment.hs
bsd-3-clause
4,798
0
14
746
1,046
542
504
109
7
module Language.CIL.Types ( Name , Type (..) , Expr (..) , Init (..) , Apply (..) ) where import Language.C hiding (Name) -- | Identifiers. type Name = String -- | Types. data Type = Void | Array Int Type | Ptr Type | Volatile Type -- ^ A volatile qualified type. | Typedef Typ...
tomahawkins/cil
Language/CIL/Types.hs
bsd-3-clause
3,173
0
9
1,243
991
547
444
105
0
-- DrawHilbertCurve.hs {-# OPTIONS_GHC -Wall #-} module Main where import System.Environment(getArgs) import Lab2.HilbertCurve imageSize :: Num a => a imageSize = 500 main :: IO () main = do args <- getArgs let nLevels | length args > 0 = read (head args) | otherwise = 3 :: Int drawHilb...
ghorn/cs240h-class
Lab2/DrawHilbertCurve.hs
bsd-3-clause
347
0
14
85
111
56
55
13
1
module BP.InferSpec where import BP.Ast import BP.Type import BP.Infer import BP.Env import State (resetId, resetUniqueName) import Control.Monad (foldM) import qualified Text.PrettyPrint as PP import qualified Data.Set as S import Test.Hspec runInferSpecCase :: Term -> String -> IO () runInferSpecCase expr expect = ...
zjhmale/HMF
test/BP/InferSpec.hs
bsd-3-clause
5,614
0
25
1,670
1,894
918
976
78
1
-- | Convenience functions for some common operations with teams. Execute the result of these -- functions using 'runGitHub' or 'runGitHub'' module Network.Octohat ( addUserToTeam , membersOfTeamInOrganization , keysOfTeamInOrganization , teamForTe...
stackbuilders/octohat
src/Network/Octohat.hs
mit
2,772
0
11
615
485
264
221
43
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DuplicateRecordFields #-} module Language.LSP.Types.Command where import Data.Aeson import Data.Aeson.TH import Data.Text import Language.LSP.Types.Common import Language.LSP.Types.Progress import ...
alanz/haskell-lsp
lsp-types/src/Language/LSP/Types/Command.hs
mit
1,629
0
11
334
275
160
115
30
0
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 1.0//EN" "http://java.sun.com/products/javahelp/helpset_1_0.dtd"> <helpset version="1.0"> <title>Geometria 3.0</title> <maps> <homeID>top</homeID> <mapref location="jh...
stelian56/geometria
archive/3.2/javahelp/jhelpset.hs
mit
1,155
87
64
163
464
228
236
-1
-1
module Network.StandardPolicy ( elect , availableWifisWithLogs , alreadyUsedWifisWithLogs , connectWifiWithLogs , scanAndConnectToKnownWifiWithMostPowerfulSignal , availa...
lambdatree/hWifi
Network/StandardPolicy.hs
gpl-2.0
4,396
0
11
1,024
794
429
365
53
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -------------------...
sinjar666/fbthrift
thrift/compiler/test/fixtures/namespace/gen-hs/My/Namespacing/Test/Hsmodule_Types.hs
apache-2.0
4,078
0
15
690
1,117
664
453
73
2
module HsLexer {-# DEPRECATED "This module has moved to Language.Haskell.Lexer" #-} (module Language.Haskell.Lexer) where import Language.Haskell.Lexer
FranklinChen/hugs98-plus-Sep2006
fptools/hslibs/hssource/HsLexer.hs
bsd-3-clause
152
0
5
16
20
14
6
4
0
{-# LANGUAGE ImpredicativeTypes #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE NoMonoPatBinds #-} {- | Module : Data.ML.Search Description : Optimum search. Copyright : (c) Paweł Nowak License : MIT Maintainer : pawel834@gmail.com Stability : experimental -}...
bitemyapp/machine-learning
src/Data/ML/Search.hs
mit
1,585
0
18
493
346
195
151
27
1
------------------------------------------------------------------------------- -- | -- Module : System.Hardware.Haskino.SamplePrograms.Rewrite.TransRecurLetTestE -- Copyright : (c) University of Kansas -- License : BSD3 -- Stability : experimental -- -- Recursion test example used for rewrite written ...
ku-fpg/kansas-amber
tests/TransTests/TransRecurLetTestE.hs
bsd-3-clause
2,639
0
26
979
663
341
322
50
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="da-DK"> <title>SOAP Support Add-on</title> <maps> <homeID>soap</homeID> <mapref locatio...
thc202/zap-extensions
addOns/soap/src/main/javahelp/org/zaproxy/zap/extension/soap/resources/help_da_DK/helpset_da_DK.hs
apache-2.0
965
77
67
157
413
209
204
-1
-1
-- #8806 module T8806 where f :: Int => Int f x = x + 1 g :: (Int => Show a) => Int g = undefined
sdiehl/ghc
testsuite/tests/typecheck/should_fail/T8806.hs
bsd-3-clause
101
0
7
30
51
28
23
-1
-1
-- #2038 import System.Posix.Resource main :: IO () main = do let soft = ResourceLimit 5 hard = ResourceLimit 10 setResourceLimit ResourceCPUTime (ResourceLimits soft hard) r <- getResourceLimit ResourceCPUTime let (ResourceLimit s) = softLimit r let (ResourceLimit h) = hardLimit r pu...
jimenezrick/unix
tests/resourceLimit.hs
bsd-3-clause
359
0
11
88
127
57
70
11
1
{-# LANGUAGE CPP #-} -- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow 1993-2004 -- -- The native code generator's monad. -- -- ----------------------------------------------------------------------------- module NCGMonad ( NatM_State(..), mkN...
ezyang/ghc
compiler/nativeGen/NCGMonad.hs
bsd-3-clause
5,477
0
18
1,609
1,699
927
772
150
2
-- !!! ds028: failable pats in top row module ShouldCompile where -- when the first row of pats doesn't have convenient -- variables to grab... mAp f [] = [] mAp f (x:xs) = f x : mAp f xs True |||| _ = True False |||| x = x
ezyang/ghc
testsuite/tests/deSugar/should_compile/ds028.hs
bsd-3-clause
248
0
7
74
72
37
35
5
1
{-# LANGUAGE RankNTypes, MagicHash, TypeFamilies, PolyKinds #-} module T9357 where import GHC.Exts type family F (a :: k1) :: k2 type instance F Int# = Int type instance F (forall a. a->a) = Int
urbanslug/ghc
testsuite/tests/indexed-types/should_fail/T9357.hs
bsd-3-clause
197
0
7
36
57
36
21
6
0
{- TRANSFORMERZ - Monad Transformer in vanilla Haskell Nothing imported - just code Author: Marco Faustinelli (contacts@faustinelli.net) Web: http://faustinelli.net/ http://faustinelli.wordpress.com/ Version: 1.0 The MIT License - Copyright (c) 2015 Transformerz Project -} module TestNilsson_01 where ...
Muzietto/transformerz
haskell/nilsson/TestNilsson_01.hs
mit
8,294
0
15
2,304
1,959
1,030
929
166
1
module Analyzer (analyze) where import Insn import Data.Array import Data.List import Data.Maybe import Text.Printf (printf) objArray :: Object -> Array Int Insn objArray obj = listArray (0, (length obj)) obj data PipelineState = PipelineState { ifetch :: Maybe Int , dcd :: Maybe Int , mem :: Maybe Int , ex...
nyaxt/dmix
nkmd/as/Analyzer.hs
mit
6,163
0
16
1,988
1,981
1,034
947
127
4
module Ratscrew.Game.Internal.Snapping ( isSnap ) where import Ratscrew.Cards import Control.Applicative isSnap :: Int -> [Card] -> Bool isSnap i = listOr [ darkQueen, normalSnap, sandwichSnap, matchesCount i] listOr :: [[Card] -> Bool] -> [Card] -> Bool listOr fs cs = any (\f -> f cs) fs darkQueen :: [Card] ->...
smobs/Ratscrew
src/Ratscrew/Game/Internal/Snapping.hs
mit
1,416
0
10
636
508
280
228
37
14
{-# LANGUAGE UndecidableInstances, TypeSynonymInstances, FlexibleInstances, GeneralizedNewtypeDeriving #-} -- Intel Machine Instructions 386 32bit -- we use only -- 32Bit Registers, signed 32Bit values module Risc386Clone.Intel where import Data.Char -- toLower import Data.Int import Data.List -- elemIndex ...
cirquit/hjc
src/Risc386Clone/Intel.hs
mit
7,739
0
13
2,486
2,750
1,438
1,312
218
1
module Pipes.Kafka.Example where import Control.Monad (void) import Control.Monad.IO.Class (liftIO) import Control.Monad.Logger (runStdoutLoggingT) import qualified Data.ByteString.Char8 as C8 import Data.Monoid ((<>)) import Kafka.Consumer ...
boothead/pipes-kafka
src/Pipes/Kafka/Example.hs
mit
1,732
0
12
575
415
240
175
35
1
{-# htermination (absMyInt :: MyInt -> MyInt) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data MyInt = Pos Nat | Neg Nat ; data Nat = Succ Nat | Zero ; data Ordering = LT | EQ | GT ; primNegInt :: MyInt -> MyInt; primNegInt (Pos x) = Neg x; primNegInt (...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/abs_3.hs
mit
1,930
0
11
403
803
432
371
55
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} module Main where import Control.Monad.State import Criterion import ...
AndrewRademacher/cyberwolf-test
src/IxSet.hs
mit
2,807
0
20
942
953
498
455
50
1
module Search.Naive.Text ( find , findOne , contains ) where import Data.Text (Text) import qualified Data.Text as T import Prelude hiding (pi) type Corpus = Text type Pattern = Text find :: Corpus -> Pattern -> [Int] find c p = let (_, _, _, is) = T.foldl' match (0, 0, Nothing...
AndrewRademacher/string-search
src/Search/Naive/Text.hs
mit
1,372
0
12
655
514
276
238
31
6
module Discogs.Routes.Artist where import Discogs.Types.Artist import Discogs.Types.Release import Network.API.Builder.Routes getArtist :: ArtistID -> Route getArtist (ArtistID artist) = Route [ "artists", artist ] [] "GET" getArtistReleases :: Art...
accraze/discogs-haskell
src/Discogs/Routes/Artist.hs
mit
489
0
7
181
105
60
45
12
1
-- | Data types for representing pictures. module Graphics.Gloss.Data.Picture ( Point , Vector , Path , Picture(..) , BitmapData -- * Aliases for Picture constructors , blank , polygon , line , circle, thickCircle , arc, thickArc , text , bitmap , color ...
gscalzo/HaskellTheHardWay
gloss-try/gloss-master/gloss/Graphics/Gloss/Data/Picture.hs
mit
10,606
95
19
2,483
1,861
1,043
818
172
2
{-# OPTIONS_HADDOCK hide, prune #-} module Handler.Home.LoadingSplash ( loadingSplash ) where import Import -- | Rotating circular progress bar; -- exposes one dom id '#loadingSplash'. loadingSplash :: Widget loadingSplash = do redCircle <- newIdent greyCircle <- newIdent rotRed <- newIdent rotGrey <- n...
mb21/qua-kit
apps/hs/qua-server/src/Handler/Home/LoadingSplash.hs
mit
3,795
0
7
1,089
76
43
33
-1
-1
{-# LANGUAGE GADTs #-} module Text.Regex.Applicative.Compile (compile) where import Control.Monad ((<=<)) import Control.Monad.Trans.State import Data.Foldable import Data.Maybe import Data.Monoid (Any (..)) import qualified Data.IntMap as IntMap import Text.Regex.Applicative.Types compile :: RE s a -> (a -> [Thread ...
feuerbach/regex-applicative
Text/Regex/Applicative/Compile.hs
mit
4,700
0
23
1,741
1,694
851
843
-1
-1
{-# LANGUAGE PackageImports #-} {-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-} -- | Reexports "Data.Bool.Compat" -- from a globally unique namespace. module Data.Bool.Compat.Repl.Batteries ( module Data.Bool.Compat ) where import "this" Data.Bool.Compat
haskell-compat/base-compat
base-compat-batteries/src/Data/Bool/Compat/Repl/Batteries.hs
mit
278
0
5
31
29
22
7
5
0
module Logic.TemporalLogic.Macro where import Types import Macro.MetaMacro import Macro.Text import Logic.AbstractLogic.Macro -- | The 'next' temporal logic operator next :: Note -> Note next = mappend $ comm0 "bigcirc" -- | The 'until' temporal logic operator until :: Note ...
NorfairKing/the-notes
src/Logic/TemporalLogic/Macro.hs
gpl-2.0
872
0
8
238
220
126
94
23
1
-- C->Haskell Compiler: CHS file abstraction -- -- Author : Manuel M T Chakravarty -- Created: 16 August 99 -- -- Copyright (c) [1999..2005] Manuel M T Chakravarty -- -- This file is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- th...
jrockway/c2hs
src/C2HS/CHS.hs
gpl-2.0
52,005
0
21
19,178
12,473
6,395
6,078
909
22
{-# OPTIONS -fglasgow-exts -fno-monomorphism-restriction #-} ---------------------------------------------------------------------------- -- | -- Module : Text.XML.Schema.Org.Xmlsoap.Schemas.Wsdl -- Copyright : (c) Simon Foster 2004 -- License : GPL version 2 (see COPYING) -- -- Maintainer : aca01sdf@s...
twopoint718/haifa
src/Text/XML/Schema/Org/Xmlsoap/Schemas/Wsdl.hs
gpl-2.0
21,571
141
24
8,219
3,692
1,973
1,719
259
12
{-# LANGUAGE CPP #-} module Main where import System.Environment import System.Exit import System.IO import Control.Monad.Except import qualified Data.Map as M import Boot.Options import Boot.ParseArgs import Boot import Object main :: IO () main = do (opts,run) <- parseArgs putStrLn $ version opts boot opts ...
antarestrader/sapphire
Main.hs
gpl-3.0
325
0
8
56
96
55
41
16
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ForeignFunctionInterface #-} module XMonad.Hooks.DynamicLog.Status.Xft where import Graphics.X11.Xft
Fizzixnerd/xmonad-config
site-haskell/src/XMonad/Hooks/DynamicLog/Status/Xft.hs
gpl-3.0
152
0
4
16
17
13
4
4
0
module TVL.Lexer where import Text.Parsec import qualified Text.Parsec.Token as Tok import Text.Parsec.Language (emptyDef) type Parser st a = Parsec String st a tvlDef :: Tok.LanguageDef st tvlDef = emptyDef { Tok.reservedNames = [ "int", "real", "enum", "bool", "struct" , "const", "true", ...
ahmadsalim/p3-tool
p3-tool/TVL/Lexer.hs
gpl-3.0
2,330
0
8
567
792
421
371
66
1
{-| Module: NamedLambda Description: Lambda expressions with named variables License: GPL-3 This package deals with lambda expressions containing named variables instead of DeBruijn indexes. It contains parsing and printing fuctions. -} module NamedLambda ( NamedLambda (LambdaVariable, LambdaAbstraction, LambdaAppl...
M42/mikrokosmos
source/NamedLambda.hs
gpl-3.0
11,675
0
11
2,577
2,970
1,557
1,413
183
2
module Sandpiles where import Constants import CoordinateSystem
Lexer747/Haskell-Fractals
Core/Sandpiles.hs
gpl-3.0
67
0
3
10
10
7
3
3
0
module Math.Topology.KnotTh.ChordDiagram.Test ( test ) where import Control.Monad (forM_) import Text.Printf import Test.Framework (Test, testGroup) import Test.Framework.Providers.HUnit (testCase) import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.HUnit hiding (Test, test) import Math.Topo...
mishun/tangles
test/Math/Topology/KnotTh/ChordDiagram/Test.hs
lgpl-3.0
2,451
0
22
685
872
501
371
43
1