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 QuasiQuotes #-} module SAML2.XML.Types where import Data.List.NonEmpty (NonEmpty(..)) import Network.URI (URI(..), URIAuth(..), uriToString) import qualified Text.XML.HXT.DOM.TypeDefs as HXT import qualified Text.XML.HXT.Arrow.Pickle.Xml.Invertible as XP type Node = HXT.XmlTree -- instance XP.XmlPickler...
dylex/hsaml2
SAML2/XML/Types.hs
apache-2.0
1,217
0
9
194
366
207
159
31
1
module ID.GP ( ) where import Filesystem.Path.CurrentOS import Prelude hiding (FilePath, writeFile) import Text.XML import ID.GP.Types -- TODO Output JSON information about the gene. outputMeta :: FilePath -> Gene Element -> Double -> IO () output...
erochest/intelligent-design
src/ID/GP.hs
apache-2.0
337
0
9
111
69
41
28
8
1
-- | Test low-level operations {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-enable-rewrite-rules -fno-warn-missing-signatures -fno-warn-unused-imports #-} module Tests.Properties.LowLevel (testLowLevel) where import Control.Applicative ((<$>), pure) import Control.Exception as E (SomeException, catch, e...
bos/text
tests/Tests/Properties/LowLevel.hs
bsd-2-clause
4,576
0
12
947
1,334
730
604
88
1
{-| Module : Web.Mastodon.API Description : Dummy file to re-export everything from API folder -} module Web.Mastodon.API ( module API , ) where import Web.Mastodon.API.Accounts as API import Web.Mastodon.API.Actions as API import Web.Mastodon.API.Apps as API import ...
cmdd/mastodon-api
src/Web/Mastodon/API.hs
bsd-3-clause
407
0
4
109
60
46
14
7
0
{-# LANGUAGE GADTs, GeneralizedNewtypeDeriving #-} ------------------------------------------------------------------------------- -- | -- Module : Control.Monad.CC.Prompt -- Copyright : (c) R. Kent Dybvig, Simon L. Peyton Jones and Amr Sabry -- License : MIT -- -- Maintainer : Dan Doel -- Stability : Ex...
vito/hummus
src/Control/Monad/CC/Prompt.hs
bsd-3-clause
2,691
0
9
584
362
214
148
25
1
-- 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. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. {-# LANGUAGE Over...
rfranek/duckling
Duckling/Distance/FR/Corpus.hs
bsd-3-clause
1,197
0
9
380
203
121
82
29
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.SUNX -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- -- A convenience module, comb...
haskell-opengl/OpenGLRaw
src/Graphics/GL/SUNX.hs
bsd-3-clause
566
0
5
80
37
30
7
3
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} module Snap.Snaplet.Persistent ( initPersist , PersistState(..) , HasPersistPoo...
plumlife/snaplet-persistent
src/Snap/Snaplet/Persistent.hs
bsd-3-clause
8,240
0
12
1,577
1,378
748
630
115
1
module Distribution.Simple.Test.ExeV10 ( runTest ) where import Prelude () import Distribution.Compat.Prelude import Distribution.Compat.CreatePipe import Distribution.Compat.Environment import qualified Distribution.PackageDescription as PD import Distribution.Simple.Build.PathsModule import Distributi...
sopvop/cabal
Cabal/Distribution/Simple/Test/ExeV10.hs
bsd-3-clause
6,413
0
18
1,819
1,346
701
645
116
4
{-# LANGUAGE LambdaCase #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Util.ExclusiveScratchpads -- Description : Named scratchpads that can be mutually exclusive. -- Copyright : Bruce Forte (2017) -- License : BSD-style (see LICENSE) -- -- Main...
xmonad/xmonad-contrib
XMonad/Util/ExclusiveScratchpads.hs
bsd-3-clause
10,843
0
23
2,667
1,644
898
746
-1
-1
{-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE ScopedTypeVariables #-} module Signal.Core.Reify ( Key (..) , Node (..) , Nodes , reify , reify_fun )where import Control.Monad.Operational.Compositional import Language.Embedded.VHDL (PredicateExp) import Signal...
markus-git/signal
src/Signal/Core/Reify.hs
bsd-3-clause
4,025
0
20
999
1,455
768
687
-1
-1
-- | 'Select' and 'SelectArr' are the composable units of database -- querying that are used in Opaleye. module Opaleye.Select where import qualified Opaleye.QueryArr as Q -- | A Postgres @SELECT@, i.e. some functionality that can run via SQL -- and produce a collection of rows. -- -- @Select a@ is analogous to a Ha...
WraithM/haskell-opaleye
src/Opaleye/Select.hs
bsd-3-clause
463
0
6
84
40
28
12
4
0
module GEC.KeyExchange ( -- * Types P.StsCtx, P.GecKeError(..), P.GenError, P.mkCtx -- * Aliases , P.Message1, P.Message2, P.Message3, P.KeyMaterial -- * Message Construction , initiate, respond, responseAck, finish -- * Constants , P.messageOneSize, P.messageTwoSize, P.messageTh...
GaloisInc/gec
src/GEC/KeyExchange.hs
bsd-3-clause
926
0
10
186
337
187
150
16
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Setup -- Copyright : Isaac Jones 2003-2004 -- Duncan Coutts 2007 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This is a big module, but not very com...
fpco/cabal
Cabal/Distribution/Simple/Setup.hs
bsd-3-clause
78,688
0
18
20,994
15,729
8,874
6,855
1,458
9
module Random (random_nbit_int, random_int) where import System.IO import Data.Word import qualified Data.ByteString.Lazy as BSL import qualified NumberTheory as NT import qualified Encoder as Enc -- Return a random integer with num_bits bits random_nbit_int :: Int -> IO Integer random_nbit_int num_bits = do con...
DanielJanzon/CryptoLab
Random.hs
bsd-3-clause
697
0
15
130
207
112
95
16
2
module Main where import Mitchell.Prelude import Hive (Winner, runHive) import Hive.Console.Player (completion, player) import System.Console.Haskeline main :: IO () main = runInputT (setComplete completion defaultSettings) game >>= print game :: InputT IO (Maybe Winner) game = runHive True Tr...
mitchellwrosen/hive
hive-console/app/Main.hs
bsd-3-clause
363
0
8
71
114
63
51
11
1
import Cppf main = interact (cppf . tokenise)
kirelagin/perfect-formatting-cpp
Main.hs
bsd-3-clause
47
0
7
9
19
10
9
2
1
{-# OPTIONS_GHC -fno-warn-missing-methods #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ScopedTypeVariables #-} {-| Module : Numeric.ER.RnToRm.Approx.PieceWise Description : arbi...
michalkonecny/polypaver
src/Numeric/ER/RnToRm/Approx/PieceWise.hs
bsd-3-clause
25,255
2
17
8,310
5,816
3,043
2,773
431
1
{-# LANGUAGE PatternGuards, RecordWildCards #-} -- | Parsing is a slow point, the below is optimised module Development.Ninja.Parse(parse) where import qualified Data.ByteString.Char8 as BS import Development.Ninja.Env import Development.Ninja.Type import Control.Monad import Data.Char import Data.Maybe ...
nh2/shake
Development/Ninja/Parse.hs
bsd-3-clause
5,941
0
17
1,840
2,536
1,267
1,269
122
4
{-# LANGUAGE TemplateHaskell, PatternGuards #-} module HsBot where import Control.Lens hiding (Action) import Control.Applicative ((<$>), (<*>)) import Control.Arrow ((&&&)) import qualified Text.Printf as P import qualified Control.Monad.State as ST import Control.Monad (when) import qualified Data.List as L import D...
dan-t/hsbot
HsBot.hs
bsd-3-clause
3,199
0
16
761
1,082
580
502
-1
-1
module RBPCP.Handler.Pay where import RBPCP.Handler.Internal.Util import qualified Servant.Server as SS import qualified RBPCP.Types as RBPCP import qualified PaymentChannel as PC import qualified ChanDB as DB import qualified Network.Haskoin.Crypto ...
runeksvendsen/rbpcp-handler
src/RBPCP/Handler/Pay.hs
bsd-3-clause
3,084
0
14
939
692
361
331
61
3
module BookSimpleTypedLambda where data T = Var Char | Varj Int | Abst T T | App T T deriving (Eq) {- ECA: This is a "large-step" semantics matching with the book's full beta-redex semantics. The actual rules are for a "small-step", call-by-value semantics, though. -} ...
armoredsoftware/protocol
demos/PaulPractice/BookSimpleTypedLambda.hs
bsd-3-clause
4,516
0
15
1,409
2,027
1,020
1,007
86
5
module WeiXin.PublicPlatform.Conversation.Message where -- {{{1 imports import ClassyPrelude import qualified Control.Exception.Safe as ExcSafe import Language.Haskell.TH import Control.Monad.Logger import Control.Monad.Except import Data.List.NonEmpty as LNE hiding (insert) import WeiXin.PublicPlat...
yoo-e/weixin-mp-sdk
WeiXin/PublicPlatform/Conversation/Message.hs
mit
4,742
0
14
1,768
804
414
390
-1
-1
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances #-} {- | Module : $Header$ Description : Instance of class Logic for common logic Copyright : (c) Karl Luc, DFKI Bremen 2010, Eugen Kuksa and Uni Bremen 2011 License : GPLv2 or higher, see LICENSE.txt Maintainer : eugenk@informatik.uni-bremen.de...
keithodulaigh/Hets
CommonLogic/Logic_CommonLogic.hs
gpl-2.0
5,796
0
10
1,197
993
532
461
134
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
fmapfmapfmap/amazonka
amazonka-emr/gen/Network/AWS/EMR/RunJobFlow.hs
mpl-2.0
14,756
0
13
3,144
1,944
1,192
752
201
1
{-# LANGUAGE TemplateHaskell #-} {-| Unittest helpers for TemplateHaskell components. -} {- Copyright (C) 2011, 2012, 2013 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributi...
ganeti/ganeti
test/hs/Test/Ganeti/TestHelper.hs
bsd-2-clause
5,545
0
17
1,138
1,144
612
532
76
4
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} module NLP.Partage.Earley.Item ( Span (..) , beg , end , gap , Active (..) , state , spanA , Passive (..) , dagID , spanP , isAdjoinedTo , regular , auxiliary , isRoot -- #ifdef DebugOn , printActive , printPassive -- #endif ) where import ...
kawu/partage
src/NLP/Partage/Earley/Item.hs
bsd-2-clause
3,172
0
17
931
850
460
390
85
3
module Singletons.Empty where import Data.Singletons.TH $(singletons [d| data Empty |])
int-index/singletons
tests/compile-and-dump/Singletons/Empty.hs
bsd-3-clause
93
0
7
15
26
16
10
-1
-1
{-# LANGUAGE NamedFieldPuns, RecordWildCards #-} module Distribution.Server ( -- * Server control Server(..), ServerEnv(..), initialise, run, shutdown, checkpoint, reloadDatafiles, -- * Server configuration ListenOn(..), ServerConfig(..), defaultServerConfig, hasSave...
haskell-infra/hackage-server
Distribution/Server.hs
bsd-3-clause
12,360
0
18
2,943
2,284
1,251
1,033
217
3
module Control.Monad.Extras (seqM) where seqM :: Monad m => m a -> m a seqM m = do a <- m return $! a
maoe/ghc-time-alloc-prof
src/Control/Monad/Extras.hs
bsd-3-clause
107
0
7
29
56
28
28
5
1
module Pos.Util.Future ( FutureError(..) , newInitFuture ) where import Universum import System.IO.Unsafe (unsafeInterleaveIO) data FutureError = FutureAlreadyFilled Text deriving Show instance Exception FutureError -- | 'newInitFuture' creates a thunk and a procedure t...
input-output-hk/pos-haskell-prototype
util/src/Pos/Util/Future.hs
mit
1,466
0
13
329
234
128
106
-1
-1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} -- | This module builds Docker (OpenContainer) images. ...
wskplho/stack
src/Stack/Image.hs
bsd-3-clause
9,570
0
26
3,271
1,742
895
847
202
2
{-# OPTIONS -fno-warn-tabs #-} -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and -- detab the module (please do the detabbing in a separate patch). See -- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces -- fo...
nomeata/ghc
compiler/nativeGen/SPARC/ShortcutJump.hs
bsd-3-clause
2,182
16
12
412
537
277
260
45
4
{-# LANGUAGE CPP #-} -- ----------------------------------------------------------------------------- -- -- (c) The University of Glasgow 1994-2004 -- -- ----------------------------------------------------------------------------- module PPC.Regs ( -- squeeze functions virtualRegSqueeze, real...
acowley/ghc
compiler/nativeGen/PPC/Regs.hs
bsd-3-clause
9,617
0
15
3,044
2,362
1,229
1,133
216
13
{-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE Rank2Types #-} #ifndef HLINT {-# LANGUAGE UnboxedTuples #-} #endif {-# LANGUAGE PatternGuards #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAG...
rpglover64/lens
src/Data/Data/Lens.hs
bsd-3-clause
16,298
0
21
3,301
3,911
2,094
1,817
216
3
{-# LANGUAGE ExplicitForAll, MagicHash, KindSignatures #-} module T12850 where import GHC.Types (RuntimeRep(..), TYPE) f :: forall (x :: TYPE 'IntRep). x -> x f x = x g = () where h = f 0#
ezyang/ghc
testsuite/tests/typecheck/should_compile/T12850.hs
bsd-3-clause
196
0
9
42
72
42
30
-1
-1
module Data.IORef.RunOnce (runOnce) where import Control.Monad.IO.Class import Data.IORef runOnce :: MonadIO m => m a -> m (m a) runOnce f = do ref <- liftIO $ newIORef Nothing return $ do mval <- liftIO $ readIORef ref case mval of Just val -> return val Nothing -> do ...
luigy/stack
src/Data/IORef/RunOnce.hs
bsd-3-clause
423
0
18
158
151
72
79
14
2
{-# LANGUAGE RecordWildCards #-} module T9815 where newtype N = N Int deriving (Show) foo = print N{..}
shlevy/ghc
testsuite/tests/rename/should_fail/T9815.hs
bsd-3-clause
106
0
6
20
33
20
13
4
1
{-# LANGUAGE EmptyDataDecls #-} -- Trac #3572 module Main where import Language.Haskell.TH import Language.Haskell.TH.Ppr main = putStrLn . pprint =<< runQ [d| data Void |]
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/th/T3572.hs
bsd-3-clause
177
0
6
29
39
26
13
-1
-1
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} module Yesod.Core.Internal.Run where import Yesod.Core.Internal.Response i...
ygale/yesod
yesod-core/Yesod/Core/Internal/Run.hs
mit
14,083
2
28
4,780
3,153
1,672
1,481
277
13
-- module module RCL.Query ( Parameter, Parameters, Query, QueryBuilder, auth, create, format, method, param, params, sign, tline, (>=.) ) where -- imports import Control.Monad.Reader import Data.Hash.MD5 import Data.List import Network.URL impor...
nicuveo/RCL
src/RCL/Query.hs
mit
1,596
0
10
402
574
324
250
48
1
module Data.Coded (Coded(..)) where -- | Things that can be encoded and decoded class Coded a where encode :: a -> Integer decode :: Integer -> a
Soares/Dater.hs
src/Data/Coded.hs
mit
155
0
7
36
43
25
18
4
0
{- Large sum Problem 13 Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. -} numbers = [ 37107287533902102798797998220837590246510135740250, 46376937677490009712648124896970078050417018260538, 74324986199524741059474233309513058123726617309629, 919422133635741615725224305...
feliposz/project-euler-solutions
haskell/euler13.hs
mit
5,666
200
9
431
529
315
214
101
1
module Hubris.Parser (parseTerm) where import Hubris.Parser.Internal
jroesch/dependent-tychk
src/Hubris/Parser.hs
mit
70
0
4
7
17
11
6
2
0
{-# LANGUAGE CPP #-} module Util where import Control.DeepSeq import qualified Data.ByteString as B #if !MIN_VERSION_bytestring(0,10,0) instance NFData B.ByteString #endif
thoughtpolice/hs-siphash2448
benchmarks/Util.hs
mit
173
0
6
21
29
19
10
5
0
{-# LANGUAGE TemplateHaskell #-} -- Some common utilities for interprocedual analysis module Language.DFA.Packages.Interp where import Language.DFA.AST import Language.DFA.Core.Label import Language.DFA.Core.Mono import Language.DFA.Common import qualified Data.Set as S import qualified Data.Map as M import Debug.Tr...
izgzhen/static-hs
src/Language/DFA/Packages/Interp.hs
mit
2,720
0
24
963
960
497
463
46
4
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codedeploy-deploymentconfig.html module Stratosphere.Resources.CodeDeployDeploymentConfig where import Stratos...
frontrowed/stratosphere
library-gen/Stratosphere/Resources/CodeDeployDeploymentConfig.hs
mit
2,484
0
14
241
272
158
114
30
1
-- BPM_8Puzzle.hs -- El problema del 8 puzzle por BPM. -- José A. Alonso Jiménez https://jaalonso.github.com -- ===================================================================== module Tema_23.BPM_8Puzzle where -- Hay que elegir una importación: -- import Tema_23.BusquedaPrimeroElMejor import I1M.BusquedaPrimeroE...
jaalonso/I1M-Cod-Temas
src/Tema_23/BPM_8Puzzle.hs
gpl-2.0
12,267
0
11
3,009
1,163
730
433
-1
-1
{- Copyright 2015 Ian Denhardt <ian@zenhack.net> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This ...
zenhack/dedup-backup
src/DedupBackup.hs
gpl-3.0
7,696
0
21
2,263
1,897
968
929
-1
-1
{-# LANGUAGE CPP #-} ---------------------------------------------------------------------- -- | -- Module : Text.TeX.Lexer.TokenParser.Expansion -- Copyright : 2015-2017 Mathias Schenner, -- 2015-2016 Language Science Press. -- License : GPL-3 -- -- Maintainer : mschenner.dev@gmail.com -...
synsem/texhs
src/Text/TeX/Lexer/TokenParser/Expansion.hs
gpl-3.0
2,799
0
10
439
621
337
284
40
1
module PropT25 where import Prelude(Bool(..)) import Zeno -- Definitions True && x = x _ && _ = False False || x = x _ || _ = True not True = False not False = True -- Nats data Nat = S Nat | Z (+) :: Nat -> Nat -> Nat Z + y = y (S x) + y = S (x + y) (*) :: Nat -> Nat -> Nat Z * _ = Z (S x) * y = y + (x...
danr/hipspec
testsuite/prod/zeno_version/PropT25.hs
gpl-3.0
3,002
0
12
923
2,021
1,051
970
114
2
module TB.System.Random.List ( shuffleList, shuffleListCore, shuffleListBase ) where import Data.Function import Data.List import System.Random shuffleList :: Int -> [a] -> [a] shuffleList seed xs = map snd $ sortBy (compare `on` fst) $ zip rands xs where rands = randoms (mkS...
adarqui/ToyBox
haskell/haskell/random/src/TB/System/Random/List.hs
gpl-3.0
594
0
9
140
230
127
103
15
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/LiaSettings/ListposDataproviders.hs
mpl-2.0
4,928
0
17
1,102
632
370
262
98
1
{-| Module : DrawingConsole Description : Связующий модуль консольной система вывода состояния игры License : LGPLv3 -} module DrawingConsole ( createDrawingConsole ) where import DrawingConsole.Internal
cmc-haskell-2015/checkers
src/DrawingConsole.hs
lgpl-3.0
273
0
4
43
15
10
5
2
0
module F_Term where import List(sort) type Symbol = String data M_Term = M_Term Double [Symbol] m_normalize :: M_Term -> M_Term m_normalize (M_Term n list) = M_Term n (sort list) instance Eq M_Term where (==) (M_Term n1 list1) (M_Term n2 list2) = do_eq n1 n2 list1 list2 where do_eq 0 0 _ _ = True do_eq...
ibukanov/ahome
dev/bna/old/F_Term.hs
unlicense
1,910
2
11
457
824
418
406
45
3
{-# LANGUAGE UnicodeSyntax, RankNTypes #-} module Text.LogMerger.Logs.Types ( LogFormat(..) , LogDissector , Origin , SGSNOrigin , SGSNBasicEntry , module Text.Regex , module Text.LogMerger.Types ) where import Pipes import Data.Time (NominalDiffTime) import qualified Pipes.ByteString as P import Tex...
k32/visualsgsn
src/Text/LogMerger/Logs/Types.hs
unlicense
1,105
0
11
255
202
130
72
27
0
{- Copyright 2020 The CodeWorld Authors. All rights reserved. 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 applicab...
google/codeworld
codeworld-compiler/test/testcases/missingModule/source.hs
apache-2.0
663
0
6
121
16
9
7
2
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-unused-do-bind #-} import qualified Data.Foldable as Foldable import qualified Text.Blaze.Html.Renderer.String as R import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attribute...
trskop/FPBrno.github.io
gen/test-html.hs
artistic-2.0
14,741
0
23
5,062
3,077
1,670
1,407
327
2
{-# LANGUAGE PackageImports #-} {-# LANGUAGE RecordWildCards #-} module NW.Util where import "monads-tf" Control.Monad.Identity import Data.Char import Data.List import Data.Maybe import qualified Data.Text.Lazy as T import Text.Parsec.Char import Text.Parsec.Combinator import Text.Parsec.Pos import Text.Parsec.Prim ...
listx/netherworld
src/NW/Util.hs
bsd-2-clause
5,636
50
11
1,164
2,147
1,104
1,043
184
2
{-# LANGUAGE NoMonomorphismRestriction,FlexibleContexts, TypeSynonymInstances,FlexibleInstances,MultiParamTypeClasses #-} module LiveJournal.Login ( login, loginExt, LJLoginRequest(..), LJLoginResponse(..), loginObjectUpdater, loginObjectFactory ) where import LiveJournal.Entity i...
jdevelop/hslj
LiveJournal/Login.hs
bsd-3-clause
6,220
0
14
2,020
1,556
823
733
113
2
module Yuuko.Text.XML.HXT.RelaxNG.PatternToString ( patternToStringTree , patternToFormatedString , xmlTreeToPatternStringTree , xmlTreeToPatternFormatedString , xmlTreeToPatternString , nameClassToString ) where import Yuuko.Control.Arrow.ListArrows import Yuuko.Data.Tree.NTree.TypeDefs import Yuuko.T...
nfjinjing/yuuko
src/Yuuko/Text/XML/HXT/RelaxNG/PatternToString.hs
bsd-3-clause
11,508
22
17
2,745
2,440
1,276
1,164
208
2
{-# LANGUAGE OverloadedStrings #-} module Network.EasyBitcoin.Internal.Base58 ( encodeBase58 , decodeBase58 , addRedundancy , liftRedundacy ) where import qualified Data.ByteString as BS import Data.Char (ord, chr) import Data.Word (Word8) import Data.Maybe (fromJust, isJust, listToMaybe) import Numeric (sho...
vwwv/easy-bitcoin
Network/EasyBitcoin/Internal/Base58.hs
bsd-3-clause
3,299
0
13
684
774
422
352
60
2
{-# LANGUAGE NoImplicitPrelude #-} -- -- -- module Main where import Control.Monad import NumericPrelude import Ray.Algebra import Ray.Geometry import Ray.Physics import Ray.Light import Ray.Optics nphoton = 100000 :: Int lgt = PointLight (Color 0.33 0.33 0.34) 1.0 (Vector3 0 0 0) pt = Vector3 0 2 2 main :: IO () ...
eijian/raytracer
test/TestPhoton2.hs
bsd-3-clause
912
0
14
233
430
223
207
38
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RebindableSyntax #-} module Morpher (main) where import Prelude import FFI import Fay.Text import Cinder.SVG import Cinder.SVG.Attributes main :: Fay () main = addEventListener "load" morpher False morpher :: Fay () morpher = do root >>= insert mu return () ...
crooney/cinder
examples/Morpher.hs
bsd-3-clause
798
0
12
218
306
156
150
22
1
{-# LANGUAGE OverloadedStrings #-} module Utils.Auth.Password ( hash ,validate ) where import Data.Maybe import Crypto.BCrypt as BC import Data.ByteString.Char8 as BSC defaultPolicy :: HashingPolicy defaultPolicy = HashingPolicy 12 (BSC.pack "$2a$") hash :: String -> IO (Maybe String) hash pass = do cr <-...
DavidAlphaFox/sblog
src/Utils/Auth/Password.hs
bsd-3-clause
590
0
14
107
194
102
92
19
2
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} -- | Tag a Store instance with structural version info to ensure we're -- reading a compatible format. module Da...
sjakobi/stack
src/Data/Store/VersionTagged.hs
bsd-3-clause
2,961
0
20
820
812
409
403
66
2
-- | None of the functions currently in here are used -- They just show diffent options of implementing randomRs which is already part -- of the System.Random package import Random (randomR, Random, RandomGen, StdGen) import Data.List (unfoldr) -- | Implementation using unfoldr -- unfoldr :: (b -> Maybe (a, b)) -> b...
thlorenz/Pricetory
src/Utils/Random.hs
bsd-3-clause
1,469
1
10
307
395
210
185
12
1
{-# LANGUAGE ImplicitParams #-} {-# LANGUAGE DoAndIfThenElse #-} ---------------------------------------------------------------------------- -- | -- Module : Language.Core.Interpreter.CaseAnalysis -- Copyright : (c) Carlos López-Camey, University of Freiburg -- License : BSD-3 -- -- Maintainer : c.lope...
kmels/dart-haskell
src/Language/Core/Interpreter/CaseAnalysis.hs
bsd-3-clause
1,031
0
9
141
84
60
24
11
0
module Game.Poker.Simple ( simpleGame ) where import System.Random.Shuffle import Game.Poker.Hands import Game.Poker.Cards import Game.Poker.AI simpleGame :: IO () simpleGame = do putStrLn "------------------" putStrLn "-- simple poker --" putStrLn "------------------" deck <- shuffleM allCards case g...
tokiwoousaka/draw-poker
src/Game/Poker/Simple.hs
bsd-3-clause
3,298
0
15
684
1,040
505
535
84
3
module Slides where import System.Environment import System.Exit import Util import Data.Function (on) import Data.List import qualified Data.Map as Map asIn names c = Map.findWithDefault "" c names handoutSlide :: [(String,[String])] -> String handoutSlide schedule = "\\begin{frame}[shrink]\n \\fontsize{3pt}{3...
mgree/conflict
slides.hs
bsd-3-clause
3,975
0
23
1,052
949
494
455
88
3
module Physics.Plucker ( Plucker(..) , squaredError , isotropic , (><) , plucker , intersects ) where import Control.Applicative import Data.Distributive import Data.Foldable as Foldable import Data.Semigroup import Data.Traversable import Physics.Epsilon import Physics.Metric import Control.Lens.Rep imp...
ekmett/physics
Physics/Plucker.hs
bsd-3-clause
3,180
0
16
805
1,620
834
786
82
1
{-# LANGUAGE FunctionalDependencies, FlexibleInstances, FlexibleContexts #-} module Data.SetLike where import Data.Hashable import Data.HashSet (HashSet(..)) import qualified Data.HashSet as HS import Data.Set (Set) import qualified Data.Set as S import Data.IntSet (IntSet) impo...
ppetr/map-like
Data/SetLike.hs
bsd-3-clause
1,205
0
8
358
342
201
141
-1
-1
{-# OPTIONS_GHC -Wall #-} module InstTerms (instTerms) where import qualified Data.Char as Char import qualified JVM.Assembler as J import qualified Koshucode.Baala.Core as K import qualified Content as K op :: (K.CText c) => String -> (String, c) op name = ("op", K.pTe...
seinokatsuhiro/koshu-java-tool
InstTerms.hs
bsd-3-clause
5,175
0
12
1,642
2,296
1,146
1,150
86
1
-- | Main module module Main ( main ) where import Data.Tuple.Utils (fst3) import Data.Maybe import Data.Word (Word32, Word16) import Data.ByteString.Char8 (unpack) import System.IO (Handle, hClose, hSetBinaryMode) import System.Console.Haskeline (getInputLine) import Control.Monad (unless, liftM) import Control.Mon...
Yuras/hfd
src/hfd.hs
bsd-3-clause
8,936
0
16
2,154
2,483
1,232
1,251
192
4
{-# LANGUAGE GADTs #-} -- {-# LANGUAGE Strict #-} -- Fast type-aligned queue optimized to effectful functions -- (a -> m b) -- (monad continuations have this type). -- Constant-time append and snoc and -- average constant-time left-edge deconstruction module Data.Iota.FTCQueue1 ( FTCQueue, tsingleton, (|>), -...
AaronFriel/eff-experiments
src/Data/Iota/FTCQueue1.hs
bsd-3-clause
1,516
0
9
358
496
266
230
29
2
{-# OPTIONS_GHC -F -pgmF htfpp #-} {-# LANGUAGE DataKinds #-} ----------------------------------------------------------------------------- -- -- Module : MathTests.Optimization -- Copyright : Copyright (C) 2015 Artem M. Chirkin <chirkin@arch.ethz.ch> -- License : BSD3 -- -- Maintainer : Artem M. Chirki...
achirkin/fgeom
test/MathTests/Optimization.hs
bsd-3-clause
4,873
0
21
1,565
1,569
818
751
85
1
module Syntax where data Expr = Number Int | Variable Char | Power Expr Expr | Plus Expr Expr | Mult Expr Expr deriving(Eq, Show)
asi1024/haskell-differentiator
src/Syntax.hs
bsd-3-clause
183
0
6
78
50
29
21
7
0
module Opaleye.Internal.Sql where import Prelude hiding (product) import qualified Opaleye.Internal.PrimQuery as PQ import qualified Opaleye.Internal.HaskellDB.PrimQuery as HPQ import Opaleye.Internal.HaskellDB.PrimQuery (Symbol(Symbol)) import qualified Opaleye.Internal.HaskellDB.Sql as HSql imp...
silkapp/haskell-opaleye
src/Opaleye/Internal/Sql.hs
bsd-3-clause
6,367
0
15
1,824
2,022
1,158
864
143
6
{-#LANGUAGE TypeFamilies#-} {-#LANGUAGE TemplateHaskell#-} {-#LANGUAGE QuasiQuotes#-} {-#LANGUAGE OverloadedStrings#-} module HsVerilog.Verilog ( module HsVerilog.Verilog.Internal , module HsVerilog.Verilog.DSL ) where import HsVerilog.Verilog.Internal import HsVerilog.Verilog.DSL
junjihashimoto/hsverilog
src/HsVerilog/Verilog.hs
bsd-3-clause
287
0
5
27
38
27
11
9
0
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, ScopedTypeVariables, TypeFamilies, FlexibleContexts #-} -- |Utilities for loading texture data. module GLUtil.Textures where import Control.Monad (forM_) import Graphics.Rendering.OpenGL import qualified Graphics.Rendering.OpenGL.GL.VertexArrays as GL...
coghex/abridgefaraway
src/GLUtil/Textures.hs
bsd-3-clause
7,376
0
14
2,193
1,886
966
920
120
16
{-# LANGUAGE DataKinds, KindSignatures, OverloadedStrings, ScopedTypeVariables, TupleSections #-} module Azure.Storage.Protocol.Blob ( BlobName , getBlobName , ContainerName , getContainerName , BlobReference , listBlobs , listContainers , getBlob ) where import Con...
Porges/azure-storage-haskell
src/Azure/Storage/Protocol/Blob.hs
bsd-3-clause
3,165
0
10
645
789
452
337
61
1
module Core.Environment ( Environment, lookup, (-->), env, ids, elems ) where import Prelude hiding ( lookup ) import Core.Ast import Data.Monoid import qualified Data.Map as M newtype Environment t = E { e :: M.Map Ident t } deriving (Show) lookup :: Ident -> Environment t -> Maybe t lookup i (E e) = i `M...
pqwy/redex
src/Core/Environment.hs
bsd-3-clause
844
1
8
216
351
196
155
25
1
{-# LANGUAGE DeriveDataTypeable, DeriveGeneric, FlexibleContexts, MultiParamTypeClasses, TemplateHaskell #-} module Insomnia.ModuleType where import Control.Applicative import Control.Lens import Data.Foldable (Foldable(..)) import Data.Traversable (foldMapDefault, fmapDefault) import Data.Typeable (Type...
lambdageek/insomnia
src/Insomnia/ModuleType.hs
bsd-3-clause
6,022
0
13
1,061
1,435
727
708
173
1
module TaglessFinal.EvalState where import qualified TaglessFinal.VarState as VarState import qualified TaglessFinal.Subst as Subst import TaglessFinal.Term import Control.Monad.State data EvalState = EvalState { getVarState :: VarState.VarState , getSubst :: Subst.Subst Var } getSubstM :: State EvalState (Sub...
kajigor/uKanren_transformations
src/TaglessFinal/EvalState.hs
bsd-3-clause
1,468
0
15
364
450
228
222
43
1
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP, TupleSections, ViewPatterns #-} module TcValidity ( Rank, UserTypeCtxt(..), checkValidType, checkValidMonoType, ContextKind(..), expectedKindInCtxt, checkValidTheta, checkValidFamPats, checkVal...
GaloisInc/halvm-ghc
compiler/typecheck/TcValidity.hs
bsd-3-clause
76,553
4
24
21,428
11,589
5,938
5,651
853
15
module YOLP.Base where import Network.HTTP.Conduit (Request) class Requestable a where toRequest :: a -> Request data Output = XmlOut | JsonOut instance Show Output where show XmlOut = "xml" show JsonOut = "json" data YOLPError = GeocodeError | WeatherError deriving (Show)-- FIXME
lesguillemets/rainfall-vim-hs
src/YOLP/Base.hs
bsd-3-clause
298
0
7
58
87
49
38
9
0
module Media.MpegTs.Pes ( ) where import Data.Bits {- PES Stream ID Values -} data StreamID = PROGRAM_STREAM_MAP | PRIVATE_STREAM_1 | PADDING_STREAM | PRIVATE_STREAM_2 | AUDIO_STREAM | VIDEO_STREAM | ECM_STREAM | EMM_ST...
kevinkirkup/mpegts-hs
src/Media/MpegTs/Pes.hs
bsd-3-clause
3,507
0
10
1,246
600
318
282
81
3
module Util.User ( newToken ) where import ClassyPrelude.Yesod import Data.UUID.V4 (nextRandom) import Data.UUID (toString) newToken :: IO Text newToken = pack . toString <$> nextRandom
vinnymac/glot-www
Util/User.hs
mit
192
0
6
31
58
34
24
7
1
{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} module HyLoRes.Core.Worker ( Worker, Serial, runSerial, SMP, runSMP, -- onClauseSet, onClauseSet_, fromClauseSet, onClausesIndex_, cycleCount, incCycleCount, param, params, getDirective, unsatDetected, postProcessNew ) where imp...
nevrenato/HyLoRes_Source
src/HyLoRes/Core/Worker.hs
gpl-2.0
4,679
4
22
1,377
1,467
763
704
-1
-1
{-# LANGUAGE CPP #-} -- | -- Module : Network.AWS.Compat.Time -- Copyright : (c) 2013-2015 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability : provisional -- Portability : non-portable (GHC extensions) -- module Network.AWS.Compat....
fmapfmapfmap/amazonka
core/src/Network/AWS/Compat/Time.hs
mpl-2.0
610
0
9
122
77
49
28
4
0
{- (c) The University of Glasgow, 1994-2006 Core pass to saturate constructors and PrimOps -} {-# LANGUAGE BangPatterns, CPP, MultiWayIf #-} module Eta.Core.CorePrep ( corePrepPgm, corePrepExpr, cvtLitInteger, lookupMkIntegerName, lookupIntegerSDataConName ) where #include "HsVersions.h" import Eta....
rahulmutt/ghcvm
compiler/Eta/Core/CorePrep.hs
bsd-3-clause
63,349
1
19
17,318
9,729
5,147
4,582
-1
-1
{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE...
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/Types.hs
bsd-3-clause
60,189
2
15
18,267
18,678
9,987
8,691
1,507
16
{-# LANGUAGE BangPatterns, CPP #-} -- | File descriptor cache to avoid locks in kernel. module Network.Wai.Handler.Warp.FdCache ( withFdCache , Fd , Refresh #ifndef WINDOWS , openFile , closeFile , setFileCloseOnExec #endif ) where #ifndef WINDOWS import UnliftIO.Exception (bracket) import Control.Re...
kazu-yamamoto/wai
warp/Network/Wai/Handler/Warp/FdCache.hs
mit
4,240
0
13
825
237
146
91
83
2
--Contributed by Ron Watkins module Main where fib n | n <= 2 = n - 1 | otherwise = fib(n - 1) + fib(n - 2) -- This part is related to the Input/Output and can be used as it is -- Do not modify it main = do input <- getLine print . fib . (read :: String -> Int) $ input
EdisonAlgorithms/HackerRank
practice/fp/recursion/functional-programming-warmups-in-recursion---fibonacci-numbers/functional-programming-warmups-in-recursion---fibonacci-numbers.hs
mit
291
0
10
85
99
51
48
7
1
{-# LANGUAGE DataKinds, GADTs, MultiParamTypeClasses, FlexibleInstances, StandaloneDeriving, GeneralizedNewtypeDeriving, FlexibleContexts #-} -- {-# OPTIONS_GHC -ftype-function-depth=400 #-} -- {-# OPTIONS_GHC -fcontext-stack=400 #-} -- | References: -- -- [1] Jose Guivant, Eduardo Nebot, a...
zaxtax/hakaru
haskell/Examples/Slam.hs
bsd-3-clause
19,711
0
40
5,790
5,904
3,065
2,839
357
5
{-# OPTIONS_GHC -fwarn-unused-matches -fwarn-incomplete-patterns -fwarn-type-defaults #-} module FrontEnd.Syn.Traverse(module FrontEnd.Syn.Traverse, module FrontEnd.HsSyn) where import Control.Monad.Writer import Util.Std import qualified Data.Set as Set import qualified Data.Traversable as T import FrontEnd.HsSyn i...
hvr/jhc
src/FrontEnd/Syn/Traverse.hs
mit
15,784
0
14
4,574
5,432
2,674
2,758
-1
-1
module B where data Value = Value String Int
sdiehl/ghc
testsuite/tests/ghci/T16525a/B.hs
bsd-3-clause
46
0
6
10
15
9
6
2
0
-- | -- Module : Data.Text.Internal.Read -- Copyright : (c) 2014 Bryan O'Sullivan -- -- License : BSD-style -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : GHC -- -- Common internal functiopns for reading textual data. module Data.Text.Internal.Read ( IReader ...
spencerjanssen/text
Data/Text/Internal/Read.hs
bsd-2-clause
1,560
0
13
516
565
302
263
44
2
--- Pretty printing for the P functor module HsPatPretty () where import HsPatStruct import HsIdentPretty import HsFieldsPretty() import HsLiteralPretty() import PrettyPrint instance (PrintableOp i,Printable p) => Printable (PI i p) where ppi (HsPId n) = ppcon wrap n ppi (HsPLit s l) = lit l ...
forste/haReFork
tools/base/AST/HsPatPretty.hs
bsd-3-clause
1,224
0
11
435
551
264
287
33
0
module Qoo where {-@ intid :: forall <r :: y0: Int -> Bool>. i: Int<r> -> Int<r> @-} intid :: Int -> Int intid i = i
mightymoose/liquidhaskell
tests/todo/intP.hs
bsd-3-clause
119
0
5
29
22
13
9
3
1