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
{- Defines the basic data types such as sorts, terms and types. See Chapters 2 and 4. Includes functions needed to make instances of Show, as well as common definitions used to construct and manipulate formulas. -} module HOCHC.DataTypes where import Data.Maybe(fromJust,fromMaybe) import Data.List import Data.Char(t...
penteract/HigherOrderHornRefinement
HOCHC/DataTypes.hs
bsd-3-clause
7,789
0
15
1,846
3,110
1,644
1,466
155
8
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoMonomorphismRestriction #-} module Instrument.Utils ( formatDecimal, formatInt, showT, showBS, collect, noDots, encodeCompress, decodeCompress, indefinitely, seconds, milliseconds, for, ) where --------------------------...
Soostone/instrument
instrument/src/Instrument/Utils.hs
bsd-3-clause
4,669
0
13
732
1,031
572
459
82
2
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} module Scheduler.Lib ( someFunc , jobTable , createJob , header , runJobsButton , scheduleInput , pureButton ) where import Lucid import ClassyPrelude hiding (for_) import Control.Ar...
limaner2002/EPC-tools
scheduler-ui/src/Scheduler/Lib.hs
bsd-3-clause
2,303
0
17
445
763
376
387
56
1
{-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE Strict #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Graphics.Vulkan.DeviceInitialization where import Graphics.Vulkan.Device( VkPhysicalDeviceFeatures(..) , VkPhysicalDe...
oldmanmike/vulkan
src/Graphics/Vulkan/DeviceInitialization.hs
bsd-3-clause
47,766
0
114
16,915
10,085
5,740
4,345
-1
-1
module ParserSpec ( parserTests ) where import Test.Tasty import Test.Tasty.QuickCheck as QC import Test.Tasty.HUnit import Text.Parsec import Text.Parsec.String (Parser) import Text.ParserCombinators.Parsec.Error(ParseError, Message, errorMessages, messageEq) import Data.Char import Data.Either (isLeft) import Nu...
arzig/hednist
test/ParserSpec.hs
bsd-3-clause
5,336
0
11
823
1,381
702
679
95
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 Overl...
rfranek/duckling
Duckling/Distance/HR/Corpus.hs
bsd-3-clause
1,133
0
9
347
197
117
80
27
1
{-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE DefaultSignatures #-} ------------------------------------------------------------------------------- -- | -- Module : Control.Lens.Empty -- Copyright : (C) 2012-14 Edward Kmett -- License : BSD-style (see the file LICENSE) -- Maintainer : Ed...
hvr/lens
src/Control/Lens/Empty.hs
bsd-3-clause
4,307
0
18
839
1,232
673
559
112
0
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-| Module : Finance.Blpapi.Event Description : An event resulting for subscription or request Copyright : Bloomberg Finance L.P. License : MIT Maintainer : agupta182@bloomberg.net Stability : experimental Portability : *nix, wind...
bitemyapp/blpapi-hs
src/Finance/Blpapi/Event.hs
mit
9,230
0
13
2,481
1,826
964
862
198
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GADTs #-} module Yi.Snippet.Internal ( Snippet (..) , Var (..) , VarValue (..) , SnippetBody , EditState (..) , Edi...
siddhanathan/yi
yi-snippet/src/Yi/Snippet/Internal.hs
gpl-2.0
7,869
0
21
2,123
2,875
1,462
1,413
-1
-1
module Utils.System.Random where import System.Random import Control.Monad.State -- Warning: an empty list leads to a crash. -- TODO: make more failsafe randomL/randomLs functions. randomL :: RandomGen g => [a] -> g -> (a, g) randomL [] _ = error "randomL: empty list" randomL lst gen = let len = length l...
charringer/gonimo-back
src/Utils/System/Random.hs
agpl-3.0
500
0
11
112
183
101
82
12
1
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} -------------------------------------------------------------------------------- {-| Module : Timer Copyright : (c) Daan Leijen 2003 License : wxWindows Maintainer : wxhaskell-devel@lists.sourceforge.net Stability : provisional Portability : ...
jacekszymanski/wxHaskell
wx/src/Graphics/UI/WX/Timer.hs
lgpl-2.1
2,317
0
17
639
423
224
199
40
2
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE LiberalTypeSynonyms #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import Test.QuickCheck import Test.QuickCheck...
PipocaQuemada/ermine
tests/properties.hs
bsd-2-clause
857
0
7
122
115
75
40
28
1
{-# LANGUAGE RecordWildCards #-} module Network.HTTP.Download.VerifiedSpec where import Crypto.Hash import Control.Monad.IO.Class (MonadIO) import Control.Monad.Logger (LoggingT, runStdoutLoggingT) import Control.Monad.Trans.Reader import Control.Retry (limitRetries) import Data.Maybe import Network.HTTP.Client.Condui...
Blaisorblade/stack
src/test/Network/HTTP/Download/VerifiedSpec.hs
bsd-3-clause
5,664
0
22
1,086
1,308
667
641
109
1
module Weak {-# DEPRECATED "This module has moved to System.Mem.Weak" #-} (module System.Mem.Weak) where import System.Mem.Weak
FranklinChen/hugs98-plus-Sep2006
fptools/hslibs/lang/Weak.hs
bsd-3-clause
133
0
5
21
20
14
6
4
0
module Language.Java.Paragon.TypeCheck.Test where import Language.Java.Paragon.Syntax import Language.Java.Paragon.Pretty import Language.Java.Paragon.Parser import Language.Java.Paragon.TypeCheck.TcExp import Language.Java.Paragon.TypeCheck.Monad import Language.Java.Paragon.TypeCheck.TcEnv import Language.Java.Para...
bvdelft/parac2
src/Language/Java/Paragon/TypeCheck/Test.hs
bsd-3-clause
2,351
0
14
824
683
410
273
67
2
-- | Visibility on the 2D plane. -- Uses an instance of Warnocks algorithm. -- TODO: animate the line segments, make them spin and move around so we can see -- that it's a dynamic visiblity algorithm -- not pre-computed. -- Draw lines in random shades of color depending on the index. -- Mak...
mainland/dph
dph-examples/broken/Visibility/Main.hs
bsd-3-clause
723
29
7
181
118
69
49
19
1
module Control.Monad.Lazy ( mapM' , forM' -- , mapM_' , sequence' ) where import System.IO.Unsafe (unsafeInterleaveIO) sequence' (mx:xs) = unsafeInterleaveIO $ combine xs =<< mx where combine xs x = return . (x:) =<< sequence' xs sequence' [] = return [] mapM' f (x:xs) = unsafeInterleaveIO $ do y <- f x ...
kawu/nerf-misc
src/Control/Monad/Lazy.hs
bsd-3-clause
512
0
10
128
183
96
87
15
1
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "Data/IP/Op.hs" #-} module Data.IP.Op where import Data.Bits import Data.IP.Addr import Data.IP.Mask import Data.IP.Range ---------------------------------------------------------------- {-| >>> toIPv4 [127,0,2,1] `masked` intToMask 7 126.0.0.0 -} class Eq a => Addr a where ...
phischu/fragnix
tests/packages/scotty/Data.IP.Op.hs
bsd-3-clause
3,438
0
11
684
479
261
218
31
1
-- | -- Module : System.Mesos.Executor -- Copyright : (c) Ian Duncan 2014 -- License : MIT -- -- Maintainer : ian@iankduncan.com -- Stability : unstable -- Portability : non-portable -- -- Mesos executor interface and executor driver. An executor is -- responsible for launching tasks in a framework specif...
jhedev/hs-mesos
src/System/Mesos/Executor.hs
mit
9,755
0
16
1,908
1,650
849
801
121
1
-- GSoC 2013 - Communicating with mobile devices. {-# LANGUAGE FlexibleContexts #-} -- | This Module define the main data types for sending Push Notifications through Apple Push Notification Service. module Network.PushNotify.Apns.Types ( -- * APNS Settings APNSConfig(..) , APNSManager(..) , Device...
MarcosPividori/GSoC-Communicating-with-mobile-devices
push-notify/Network/PushNotify/Apns/Types.hs
mit
6,801
0
16
2,475
1,105
637
468
121
3
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Tests for lock allocation. -} {- Copyright (C) 2014 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. Redistri...
apyrgio/ganeti
test/hs/Test/Ganeti/Locking/Allocation.hs
bsd-2-clause
14,952
0
27
3,127
3,390
1,815
1,575
231
2
<?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="pt-BR"> <title>SAML Support</title> <maps> <homeID>saml</homeID> <mapref location="map....
kingthorin/zap-extensions
addOns/saml/src/main/javahelp/help_pt_BR/helpset_pt_BR.hs
apache-2.0
958
82
52
156
390
206
184
-1
-1
module Network.Transport.Test where import qualified Network.Transport as NT import Data.Typeable (Typeable) -- | Extra operations required of transports for the purposes of testing. data TestTransport = TestTransport { -- | The transport to use for testing. testTransport :: NT.Transport -- | IO action to p...
jeremyjh/distributed-process-lifted
test/Network/Transport/Test.hs
bsd-3-clause
461
0
12
78
75
46
29
7
0
{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE ExtendedDefaultRules #-} module T12797 where import Prelude import Control.Monad.IO.Class import Data.Kind (Type) type family FuncArg (m :: (Type -> Type)) :: Maybe Type te...
sdiehl/ghc
testsuite/tests/typecheck/should_compile/T12797.hs
bsd-3-clause
395
0
8
90
97
57
40
11
1
{-# LANGUAGE BangPatterns, CPP, ForeignFunctionInterface, MagicHash, Rank2Types, RecordWildCards, UnboxedTuples, UnliftedFFITypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} {-@ LIQUID "--c-files=../../cbits/cbits.c" @-} -- | -- Module : Data.Text.Array -- Copyright ...
abakst/liquidhaskell
benchmarks/text-0.11.2.3/Data/Text/Array.hs
bsd-3-clause
14,643
0
12
4,558
1,885
1,071
814
-1
-1
{-# LANGUAGE OverloadedStrings #-} {- This URI URL thing is truly confusing... This is how I'll handle it. If the URI is a star then the server will handle it itself. (never get evaluated) So the parsing will return nothing. If the URI is an abs path we'll cheat and just throw it into the URL object -} module Smutt...
black0range/Smutt
src/Smutt/HTTP/URI.hs
mit
894
0
9
189
139
86
53
15
1
module Main where import HaskellSkeleton main :: IO () main = do putStrLn getHelloString
FunTimeCoding/haskell-skeleton
src/Main.hs
mit
96
0
7
21
28
15
13
5
1
-- | Prefer using the main module. If you manipulate the internals of `Plan` -- to add fake steps, bad things might happen. {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ViewPatterns #-} {-#...
danidiaz/plan-applicative
lib/Control/Plan/Core.hs
mit
24,885
0
23
6,732
7,216
3,794
3,422
353
5
---------------------------------------------------------------- -- -- Module: Quark.Layout -- Author: Stefan Peterson -- License: MIT License -- -- Maintainer: Stefan Peterson (stefan.j.peterson@gmail.com) -- Stability: Stable -- Portability: Unknown -- -- ---------------------------------------------...
sjpet/quark
src/Quark/Layout.hs
mit
2,003
0
8
604
702
368
334
30
1
module Core.Parser ( ParseError , parseFile , parseProgram ) where import Control.Exception (Exception(), throw) import Data.Functor import Data.Maybe import Text.Parsec hiding (spaces) import Text.Parsec.Language import qualified Text.Parsec.Token as P import qualified Text.Parsec.Expr as P import Text.Parse...
themattchan/core
src/Core/Parser.hs
mit
3,102
0
16
771
1,013
514
499
93
1
{-# LANGUAGE OverloadedStrings #-} import Numeric import Control.Monad import qualified Data.ByteString.Char8 as S import Data.ByteString.Read import Test.Tasty import Test.Tasty.QuickCheck (=~~) :: Double -> Double -> Bool (=~~) a b = a == b || abs (a - b) <= max (abs a) (abs b) * 1e20 -- Word newtype Word8 = Word8...
philopon/bytestring-read
tests/tasty.hs
mit
4,961
0
21
1,635
1,952
989
963
124
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} module OpaleyeDemo.Utils ( -- * Exports printSql , runQueryDebug , runQ , todoToString ) where import Data.List (intercalate) import Data.Profunctor.Product.Default (Defaul...
charlydagos/haskell-sql-edsl-demo
code/opaleye/src/OpaleyeDemo/Utils.hs
mit
1,805
0
14
651
461
251
210
37
2
module Language.Doczen.PrettyPrint ( prettyPrintDocument ) where import Text.PrettyPrint import Language.Doczen.Types prettyPrintDocument :: Document -> String prettyPrintDocument = render . document document (Document h ss) = (header h) <> separator <> body ss separator = text "---\n" header (Header "") = empty ...
yanatan16/doczen-generator
src/Language/Doczen/PrettyPrint.hs
mit
2,039
0
9
352
861
422
439
48
2
module Types where -- TODO: include all languages supported by pandoc or pygments or whatnot. data Language = Bash | Haskell | Scala | Python | Html | Css | CoffeeScript | JavaScript | Handlebars ...
sshastry/litany
Types.hs
mit
739
0
8
327
168
103
65
21
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE ViewPatterns #-} module Database.Persist.Quasi ( parse , PersistSettings (..) , upperCaseSettings , lowerCaseSettings , nullable #if TEST , Token (..) , tokenize , parseFieldType #endif ...
pseudonom/persistent
persistent/Database/Persist/Quasi.hs
mit
20,289
0
20
6,243
6,359
3,283
3,076
401
13
module Language.Lambda.HspecUtils where import Data.Map (empty) import Test.Hspec import Language.Lambda shouldEvalTo :: String -> String -> Expectation shouldEvalTo s1 = shouldBe (eval s1) . eval eval :: String -> Either ParseError (LambdaExpr String) eval = fmap fst . evalString empty
sgillespie/lambda-calculus
test/Language/Lambda/HspecUtils.hs
mit
292
0
8
44
96
51
45
8
1
module Position where data Position = Position { row :: Int, col :: Int } -- Translating a position translate :: Position -> Position -> Position translate (Position row col) (Position drow dcol) = Position (row + drow) (col + dcol)
crockeo/maze
src/Position.hs
mit
237
0
8
45
84
47
37
5
1
{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveDataTypeable #-} module Hablog.Data.Slug ( Slug(..) , slugify ) where import Data.Char (toLower) import Data.Data (Data, Typeable) import Database.Persist (PersistField(..)) import Web.Routes (PathInfo(..)) newtype Slug = Slug { unSlug :: String } ...
garrettpauls/Hablog
src/Hablog/Data/Slug.hs
mit
734
0
11
176
271
153
118
18
3
import Utils.ListOps (minimumUsing) import Utils.IntegerOps (divide) main = print problem71Value problem71Value :: Int problem71Value = (`quot` 7) $ (*3) $ minimumUsing (\x -> ((x*3) `divide` 7) - (fromIntegral (x*3 `quot` 7))) $ filter (\x -> x `rem` 7 /= 0) [5..1000000]
jchitel/ProjectEuler.hs
Problems/Problem0071.hs
mit
275
0
15
43
139
81
58
5
1
{-# LANGUAGE Rank2Types #-} {- | Module : Summoner.Tui.Field Copyright : (c) 2018-2022 Kowainik SPDX-License-Identifier : MPL-2.0 Maintainer : Kowainik <xrom.xkov@gmail.com> Stability : Stable Portability : Portable This modules adds necessary func...
vrom911/hs-init
summoner-tui/src/Summoner/Tui/Field.hs
mit
4,309
0
16
1,202
938
529
409
81
5
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisanalyticsv2-applicationcloudwatchloggingoption-cloudwatchloggingoption.html module Stratosphere.Resour...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/KinesisAnalyticsV2ApplicationCloudWatchLoggingOptionCloudWatchLoggingOption.hs
mit
2,588
0
13
168
178
104
74
23
1
{-# OPTIONS_GHC -fno-warn-missing-methods #-} {-# LANGUAGE CPP, OverloadedStrings, TypeSynonymInstances, MultiParamTypeClasses #-} -- Copyright (C) 2010 Petr Rockai -- -- Permission is hereby granted, free of charge, to any person -- obtaining a copy of this software and associated documentation -- files (the "Softwar...
DavidAlphaFox/darcs
src/Darcs/Patch/Annotate.hs
gpl-2.0
9,955
0
18
3,051
2,909
1,532
1,377
-1
-1
{-| Implementation of the Ganeti Confd client functionality. -} {- Copyright (C) 2012 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 optio...
damoxc/ganeti
src/Ganeti/Confd/Client.hs
gpl-2.0
5,059
0
17
1,058
1,003
495
508
86
3
{-# LANGUAGE NoImplicitPrelude #-} module Lib.Directory ( getMFileStatus , catchDoesNotExist , removeFileOrDirectory , removeFileOrDirectoryOrNothing , createDirectories , getDirectoryContents , makeAbsolutePath ) where import Prelude.Compat hiding (FilePath) import Control.Monad import Lib.Exception...
da-x/buildsome
src/Lib/Directory.hs
gpl-2.0
2,538
0
14
455
686
351
335
65
2
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} module TinyMicro.Board where import MOS6502.Utils import TinyMicro.Video import Language.KansasLava import Data.Sized.Unsigned import Data.Bits import qualified Data.ByteString as BS import Language.KansasLava.Signal import Control.Applicative -- ...
gergoerdi/tinymicro-mos6502-kansas-lava
lava/TinyMicro/Board.hs
gpl-2.0
2,102
0
12
534
642
343
299
49
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} module Lambia.Index (nil, indexing, append, ixDecl, ixExpr, Indexed) where import Prelude hiding (lookup, foldr) import Control.Monad.State.Strict import Control.Monad.Trans.Except import Control.Applicative hiding (empty) import Data.Char import Data....
phi16/Lambia
src/Lambia/Index.hs
gpl-3.0
5,847
152
18
1,788
2,913
1,543
1,370
181
12
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Main ( main ) where import Control.Applicative ((<*>), Applicative) import Control.Monad (Monad, return) import Control.Monad.IO.Class (MonadIO, liftIO) import Con...
jrpotter/portfolio
src/Main.hs
gpl-3.0
6,417
0
18
1,256
1,416
777
639
122
2
{-# LANGUAGE NoImplicitPrelude, TemplateHaskell, DeriveFunctor, DeriveFoldable, DeriveTraversable #-} -- TODO: Move to more general place? module Lamdu.Compiler.Flatten ( Composite(..), tags, rest , case_, Case , recExtend, Record ) where import qualified Control.Lens as Lens import Control.L...
da-x/lamdu
Lamdu/Compiler/Flatten.hs
gpl-3.0
1,450
0
12
398
465
248
217
-1
-1
module Inkvizitor.LocFile ( locFile ) where import Geocode ( Coords(..) , Location(..) ) locFile :: [Location] -> String locFile locations = header ++ concat (map locEntry locations) ++ footer where locEntry :: Location -> String locEntry loc = "<waypoint>\n" ++ " <n...
honzasp/inkvizitor
Inkvizitor/LocFile.hs
gpl-3.0
800
0
21
246
198
106
92
20
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/Delegates/List.hs
mpl-2.0
5,383
0
19
1,266
718
422
296
110
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/CreativeFieldValues/Patch.hs
mpl-2.0
6,516
0
22
1,566
1,008
580
428
145
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/BackendBuckets/List.hs
mpl-2.0
7,172
0
19
1,550
758
454
304
109
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.RuntimeConfig -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozill...
brendanhay/gogol
gogol-runtimeconfig/gen/Network/Google/RuntimeConfig.hs
mpl-2.0
2,786
0
6
573
237
177
60
52
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Triggers/Webhook.hs
mpl-2.0
6,509
0
21
1,562
1,022
592
430
145
1
{-| Implementation of the Ganeti Query2 node queries. -} {- Copyright (C) 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. Redistributions of source code must retain the abo...
yiannist/ganeti
src/Ganeti/Query/Node.hs
bsd-2-clause
13,353
0
21
2,589
2,477
1,354
1,123
223
3
module Horbits.UI.VisibilityToggle where import Graphics.UI.Gtk visibilityToggleButton :: WidgetClass w => String -> w -> IO ToggleButton visibilityToggleButton toggleText widget = do button <- toggleButtonNewWithLabel toggleText _ <- on button toggled $ set widget [ widgetVisible :~ not ] retur...
chwthewke/horbits
src/horbits/Horbits/UI/VisibilityToggle.hs
bsd-3-clause
329
0
11
64
90
44
46
7
1
module Linear.Grammar.Types.Syntax where import Data.String (IsString (fromString)) import Test.QuickCheck (Arbitrary (arbitrary), Gen, sized, resize, scale, oneof, choose) -- | User-facing abstract syntax tree, polymorphic in the numeric type used. data LinAst k a = -- | Variable names EVar k | -- | Numer...
athanclark/cassowary-haskell
src/Linear/Grammar/Types/Syntax.hs
bsd-3-clause
1,829
0
16
500
599
312
287
-1
-1
module Cards( -- Data types Suit (..), Face (..), Card (..), SuitColor (..), -- functions suitColor, sameColor, pack36, pack52, shuffle ) where import System.Random import Data.List import Test.QuickCheck data Suit = Spades | Clubs | Diamonds ...
sakhnik/FreeCell
Cards.hs
bsd-3-clause
4,056
0
15
1,400
1,402
771
631
125
3
module Modify where import MTable import BruijnTerm hiding (incFree) import LambdaF -- TODO switch result around peek -- -- | peek will apply modifications stored in mtabel and apply it on first node in ast -- and will give back a new 'MTable' that can be used to view the subtrees -- -- you should only use the new 'M...
kwibus/myLang
src/Modify.hs
bsd-3-clause
1,234
0
13
270
338
178
160
17
6
-------------------------------------------------------------------------------- module Language.Haskell.Stylish ( -- * Run runSteps -- * Steps , imports , languagePragmas , records , tabs , trailingWhitespace , unicodeSyntax -- ** Data types , Imports.Align (..) , ...
eigengrau/stylish-haskell
src/Language/Haskell/Stylish.hs
bsd-3-clause
2,966
0
9
457
452
286
166
55
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecursiveDo #-} {-# LANGUAGE TypeSynonymInstances #-} module RazorsLambda.TypeCheck where import Data.Map (Map) import qualified Data.Map as Map import MonadLib hiding ...
acfoltzer/RazorsLambda
src/RazorsLambda/TypeCheck.hs
bsd-3-clause
4,750
0
18
1,212
1,656
799
857
132
11
module Examples.ProxyToUpper (main) where import Pipes import Pipes.Network.TCP import Control.Concurrent.Async import Control.Monad main :: IO () main = serve (Host "127.0.0.1") "4002" $ \(client, _) -> connect "127.0.0.1" "4000" $ \(server, _) -> do let act1 = runEffect $ fromSocket client 4096 >-> toSo...
michaelt/pipes-network-tcp-examples
Examples/ProxyToUpper.hs
bsd-3-clause
1,016
0
16
240
166
92
74
12
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FlexibleInstances #-} {- | A module providing access to internals (in case you really need them). Can change at any time, though probably won't. -} module Fmt.Internal ( -- * Classes FormatAsHex(..), FormatAsBase64(..), -- ...
aelve/fmt
lib/Fmt/Internal.hs
bsd-3-clause
2,972
0
9
453
487
308
179
48
0
module Main where main :: IO () main = putStrLn "test"
chengzh2008/hpffp
src/ch14-Testing/exercise/app/Main.hs
bsd-3-clause
56
0
6
12
22
12
10
3
1
{-# LANGUAGE FlexibleInstances #-} module Guide.Api.Error ( ErrorResponse, ) where import Imports import Data.Swagger import GHC.TypeLits import Servant import Servant.Swagger -- Taken from https://github.com/haskell-servant/servant-swagger/issues/59 data ErrorResponse (code :: Nat) (description :: Symbol) ...
aelve/guide
back/src/Guide/Api/Error.hs
bsd-3-clause
1,183
0
10
242
381
200
181
-1
-1
{-# LANGUAGE TypeFamilies ,KindSignatures #-} module Local where import Linear.V1 import Linear.V2 import Linear.V3 import Linear.V4 type family CLocal (f :: *) :: * -> * type family Local (f :: * -> * ) :: * -> * type instance Local V1 = V1 type instance Local V2 = V2 type instance Local V3 = V3 type instance Loca...
massudaw/mtk
Local.hs
bsd-3-clause
331
0
7
68
107
66
41
12
0
-- Copyright (c) 2012 Eric McCorkle. All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditi...
emc2/proglang-util
Data/Polynomial/Multivariate.hs
bsd-3-clause
7,693
0
20
1,882
2,263
1,210
1,053
97
6
{-# LANGUAGE KindSignatures #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} module Main where import Control.Monad import Control.Monad.Trans.Free import Control.Monad.Free.TH import Control.Monad.IO.Class import Control.Monad.Trans.Maybe import qualified Data.Foldable as...
dhess/free-experiments
src/RetryTransTH.hs
bsd-3-clause
3,263
0
14
850
669
350
319
54
5
{-# LANGUAGE TemplateHaskell #-} module Monto.DeregisterService where import Data.Aeson.TH import qualified Data.Text as T import Monto.Types data DeregisterService = DeregisterService { deregisterServiceID :: ServiceID } deriving (Eq) $(deriveJSON (defaultOptions { fieldLabelModifi...
wpmp/monto-broker
src/Monto/DeregisterService.hs
bsd-3-clause
566
0
14
135
133
75
58
18
0
{- Compile, Run and Clean. A helper program for running standalone tests for haskell-mpi. Intended to be used in conjunction with shelltestrunner. Use like so: haskell-mpi-comprunclean -np 2 Pi.hs The last argument is the name of a haskell file to compile (should be the Main module). All other arg...
bjpop/haskell-mpi
test/CompileRunClean.hs
bsd-3-clause
1,505
0
14
371
326
166
160
27
2
-- | Classic word count MapReduce algorithm written with the monad -- -- Takes as argument: -- -- * The name of file of word-based text -- -- * (Optional) the number of mappers to use in the first stage -- (defaults to 16) module Main where import System.IO import System.Environment (getArgs) import Paralle...
Julianporter/Haskell-MapReduce
src/WordCount.hs
bsd-3-clause
1,437
0
20
588
379
184
195
33
3
module Hyph_UTF8.Language (tags) where tags :: [String] tags = [ "af" , "hy" , "as" , "eu" , "bn" , "bg" , "ca" , "zh-latn-pinyin" , "cop" , "hr" , "cs" , "da" , "nl" , "en-gb" , "en-us" , "eo" , "et" , "mul-ethi" , "fi" , "fr" , "fur" , "gl" , "ka" , "de-1901" , "...
ndr-qef/hyph-utf8.json
src/Hyph_UTF8/Language.hs
bsd-3-clause
832
0
5
313
246
163
83
78
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} -- Module : Network.AWS -- Copyrig...
romanb/amazonka
amazonka/src/Network/AWS.hs
mpl-2.0
7,314
0
15
2,049
1,378
762
616
136
4
-- Usage: -- cabal build Holostress && ./dist/build/Holostress/Holostress +RTS -T -RTS -- {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-...
deepfire/mood
tests/Holostress.hs
agpl-3.0
6,847
5
22
2,312
1,565
848
717
112
2
{- - Copyright (c) 2017 The Agile Monkeys S.L. <hackers@theam.io> - - 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 requir...
J2RGEZ/haskell-do
src/common/HaskellDo/Compilation/View.hs
apache-2.0
1,789
0
10
408
302
154
148
29
1
{-# LANGUAGE TemplateHaskell #-} module Database.DSH.VSL.Opt.Rewrite.PruneEmpty(pruneEmpty) where -- import Control.Monad import Database.DSH.Common.Opt import Database.DSH.Common.VectorLang import Database.DSH.VSL.Opt.Properties.Types import Database.DSH.VSL.Opt.Rew...
ulricha/dsh
src/Database/DSH/VSL/Opt/Rewrite/PruneEmpty.hs
bsd-3-clause
3,986
0
5
998
129
97
32
10
1
module Halfs.Directory ( DirHandle(..) , FileStat(..) , FileMode(..) , AccessRight(..) , FileType(..) , addDirEnt , addDirEnt_lckd , addDirEnt_lckd' , closeDirectory , find , findInDir , getDHINR_lckd , makeDirectory , newDirHandle , openDirectory , removeDirectory , rmDirEnt , rmDir...
hackern/halfs
Halfs/Directory.hs
bsd-3-clause
13,422
0
26
4,300
3,043
1,515
1,528
278
4
-- Compile this with 'ghc -o Game Game.hs' and run it with './Game'. import Graphics.Gloss.Game -- A sprite representing our character slimeSprite = bmp "Slime.bmp" -- Our game world consists purely of the location of our character. data World = World Point -- This starts our gamein a window with a give size, runni...
mchakravarty/lets-program
step1/Game.hs
bsd-3-clause
1,303
0
9
263
352
193
159
10
1
import Language.Haskell.Pretty (prettyPrint) import Language.Haskell.Parser (ParseResult(ParseOk, ParseFailed), parseModule) import System.Environment (getArgs) import System.Exit (exitWith, ExitCode(ExitFailure)) import System.IO (hPutStrLn, stderr) import Control.Monad (when) import Text.PrettyPrint.HughesPJ (render...
llelf/language-c
examples/DumpAst.hs
bsd-3-clause
1,332
0
15
196
515
272
243
27
1
-- A variant of T5654 where instead of evaluating directly to a -- funciton, f evaluates to a new PAP. This exposes a slightly -- different but related bug, where when we create a new PAP by -- applying arguments to an existing PAP, we should take into account -- the stack on the original PAP. -- The stack we should ...
nushio3/ghc
testsuite/tests/profiling/should_run/T5654b.hs
bsd-3-clause
599
0
7
142
98
55
43
10
1
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 ************************************************************************ * * \section[FloatIn]{Floating Inwards pass} * ...
da-x/ghc
compiler/simplCore/FloatIn.hs
bsd-3-clause
23,054
0
17
6,139
2,976
1,612
1,364
190
4
module BigNum where {-@ type Foo = { v : Integer | 0 <= v && v < 4611686018427387903 * 8 } @-} {-@ f :: i : Foo -> { o : Foo | i < o } @-} f :: Integer -> Integer f i = i * 2
abakst/liquidhaskell
tests/neg/BigNum.hs
bsd-3-clause
177
0
5
53
27
16
11
3
1
module HAD.Y2014.M04.D16.Exercise where {- | reverseMap No definition, look to types -} reverseMap :: [a -> b] -> a -> [b] reverseMap = undefined
1HaskellADay/1HAD
exercises/HAD/Y2014/M04/D16/Exercise.hs
mit
151
0
7
29
38
24
14
3
1
{-# LANGUAGE CPP #-} module Lib ( someFunc ) where someFunc :: IO () someFunc = putStrLn "someFunc" #if !WORK #error Not going to work, sorry #endif
AndreasPK/stack
test/integration/tests/335-multi-package-flags/files/src/Lib.hs
bsd-3-clause
159
0
6
37
31
19
12
-1
-1
module Language.HPHP.AST ( PHP(..), Expr(..) ) where import Data.Text data PHP = Expr Expr deriving Show data Expr = Var Expr | StringLiteral Text | Concat Expr Expr deriving Show
pikajude/hphp
Language/HPHP/AST.hs
mit
230
0
6
80
64
40
24
10
0
-- Warm-up and review -- For the following set of exercises, you are not expected to use folds. These -- are intended to review material from previous chapters. Feel free to use any -- syntax or structure from previous chapters that seems appropriate. -- 1. Given the following sets of consonants and vowels: stops = ...
diminishedprime/.org
reading-list/haskell_programming_from_first_principles/10_10.hs
mit
4,919
0
13
1,280
1,177
653
524
61
2
module Language.Imperia.Compiler.Operation (perform) where import Processor.Sprockell (Assembly (..), Value (..), OpCode (..)) import Language.Imperia.Compiler.Store perform :: (Store -> a -> (Store, [Assembly])) -> Store -> OpCode -> a -> a -> (Store, [Assembly]) perform compile store opCode expr1 expr2 = let ...
thomasbrus/imperia
src/Language/Imperia/Compiler/Operation.hs
mit
906
0
12
231
236
138
98
14
1
{-# OPTIONS_GHC -fno-warn-missing-fields #-} {-# LANGUAGE TupleSections, TemplateHaskell #-} module IHaskell.Display.Rlangqq ( module RlangQQ, rDisp, rDisplayAll, rOutputParsed, rOutput, getPlotNames, getCaptions, ) where import RlangQQ import RlangQQ.ParseKnitted import System.Directory i...
aostiles/LiveHaskell
ihaskell-display/ihaskell-rlangqq/IHaskell/Display/Rlangqq.hs
mit
3,295
0
16
691
942
497
445
87
2
module MyGraphics (initializeWorld, callShowWorld) where import Data.Array.IArray import Data.Fixed (mod') import Data.IORef import Graphics.UI.GLUT import qualified Parameters as P import Fitness import Types callShowWorld :: IO () callShowWorld = mainLo...
KarimxD/Evolverbetert
src/MyGraphics.hs
mit
3,861
0
15
1,297
1,024
528
496
72
1
{-# LANGUAGE ScopedTypeVariables , TypeApplications , FlexibleContexts #-} module Main ( main ) where import Data.Word import Data.Time.Clock import qualified Graphics.Image.Interface as HIP import qualified Graphics.Image as HIP import qualified Graphics.Image.IO as HIP import qualified Repa type Pix...
Javran/misc
hip-match-template/src/Main.hs
mit
2,954
0
17
761
997
512
485
67
1
module ControlFlow ( -- optionsWindow ---,visualize makeAnalViewInterface ,convertSimFileWindow ,getRestriction , ResultType ( CSV, SScanner, Accident, SScrim) ,ioLogger -- , WindowTypes (NetworkAnalysis, SchemAnalysis, AccidentAnalysis -- , SchemeBuilder, AnalyseOrExtract,...
rawlep/EQS
sourceCode/ControlFlow.hs
mit
53,136
743
18
18,459
10,718
5,919
4,799
703
21
{-# LANGUAGE GADTs #-} module MonotoneFramework where import Ast import Data.Set (Set, intersection, difference) import qualified Data.Set as Set import Data.Map (Map, findWithDefault, (!)) import qualified Data.Map as Map import AnalysisTools import Lattice data MonotoneFramework a where MonotoneInstance :: Abstra...
fiigii/dataflow
MonotoneFramework.hs
mit
1,899
0
16
539
558
306
252
-1
-1
module Main where import Control.Applicative import Data.Tree import Data.Monoid import Data.Generics -- | a tree containing integers exTree1 :: Tree Int exTree1 = Node (1 :: Int) [Node 2 [], Node 3 [], Node 4 [Node 5 [], Node 6 [Node 7 []]]] -- | exTree1 converted to a tree of strings exTree2 :: Tree String exTree2...
Javran/misc
syb-play/src/Main.hs
mit
1,335
0
14
304
517
257
260
25
1
module Leob00 where leob fs = xs where xs = fmap ($ xs) fs
HaskellForCats/HaskellForCats
leob00.hs
mit
62
0
8
17
28
16
12
2
1
module Fasta (toFasta, fastaEx) where data Fasta = Fasta { header :: String, body :: String } fastaEx :: String fastaEx = ">Rosalind_1\n\ \GATTACA\n\ \>Rosalind_2\n\ \TAGACCA\n\ \>Rosalind_3\n\ \ATACA>Rosalind_6404\n\ \CCTGCGGAAGATCGGCACTAGAATAGC...
brodyberg/LearnHaskell
Web/sqlitetest/Rosalind/8CountingPointMutations/src/Fasta.hs
mit
1,973
0
8
464
63
38
25
6
1
module Solidran.Fasta ( parse ) where import Data.Map (Map) import Solidran.List (splitBy) import qualified Data.Map as Map parseSingle :: String -> (String, String) parseSingle inp = let (l:r) = lines inp in (l, concat r) parse :: String -> Map String String parse inp = let bks = filter (/=""...
Jefffrey/Solidran
src/Solidran/Fasta.hs
mit
389
0
12
91
161
87
74
13
1
import Control.Monad (guard) import Data.Char (toUpper) import Data.List (intercalate) isIncreasingTuple :: (Ord a) => (a,a) -> Bool -- this is our first type signature for the function isIncreasingTuple. It gives context to the tuple argument of type, a, which belongs to the typeclass Ord (more details on this to com...
rtoal/ple
haskell/tuples_functions_algebraictypes.hs
mit
5,004
6
11
974
1,197
654
543
56
2
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} module DataLoader.CSV ( parseCSV, parseCSVstruc ) where import qualified Data.ByteString.Lazy as BL import qualified Data.Vector as V import qualified Data.List as L import qualified Data.Map.Lazy as M import Maps.DataType import qualified Data.Csv as C --...
sc14lga/Maps
src/DataLoader/CSV.hs
gpl-2.0
3,105
6
13
542
753
405
348
42
1
{-# LANGUAGE FlexibleInstances #-} {- | Module : $Header$ Description : interface to Reduce CAS Copyright : (c) Dominik Dietrich, DFKI Bremen, 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : Dominik.Dietrich@dfki.de Stability : provisional Portability : non-portable (uses type-express...
nevrenato/HetsAlloy
CSL/Reduce_Interface.hs
gpl-2.0
12,991
0
15
2,847
3,434
1,741
1,693
229
8
module Flowskell.Lib.Jack where import qualified Sound.JACK as Jack import qualified Sound.JACK.Audio as JA import qualified Sound.JACK.Exception as JackExc import Sound.JACK (NFrames(NFrames), Process, Client, Port) import qualified Control.Monad.Exception.Synchronous as Sync import qualified Control.Monad.Trans.Con...
lordi/flowskell
src/Flowskell/Lib/Jack.hs
gpl-2.0
3,164
0
16
690
945
510
435
70
2