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: Database.CourseQueries Description: Respond to various requests involving database course information. This module contains the functions that perform different database queries and serve the information back to the client. -} module Database.CourseQueries (retrieveCourse, ...
hermish/courseography
app/Database/CourseQueries.hs
gpl-3.0
11,718
0
23
3,689
2,853
1,445
1,408
-1
-1
-- | This module is deprecated -- use -- System.IO.Streams.Attoparsec.ByteString instead (this module simply -- re-exports that one). module System.IO.Streams.Attoparsec ( -- * Parsing parseFromStream , parserToInputStream , ParseException(..) ) where ------------------------------------------------------...
snapframework/io-streams
src/System/IO/Streams/Attoparsec.hs
bsd-3-clause
462
0
6
62
51
37
14
6
0
module Flags where import System.Console.GetOpt data Mode = Help | Version | UseConfig (ConfigM Maybe) newtype Id a = Id { fromId :: a } type Config = ConfigM Id data ConfigM m = Config { cmTemplate :: m FilePath, cmCompiler :: m FilePath, ...
DavidAlphaFox/ghc
utils/hsc2hs/Flags.hs
bsd-3-clause
4,892
0
11
1,595
1,512
812
700
111
2
{- (c) The University of Glasgow, 1994-2006 Core pass to saturate constructors and PrimOps -} {-# LANGUAGE BangPatterns, CPP #-} module CorePrep ( corePrepPgm, corePrepExpr, cvtLitInteger, lookupMkIntegerName, lookupIntegerSDataConName ) where #include "HsVersions.h" import OccurAnal import HscType...
vTurbine/ghc
compiler/coreSyn/CorePrep.hs
bsd-3-clause
56,158
31
19
15,254
9,269
4,911
4,358
598
10
module Shake (module Shake.BuildNode ) where import Shake.BuildNode
reckbo/ppl
pipeline-lib/Shake.hs
bsd-3-clause
72
0
5
12
17
11
6
3
0
module Graphics.UI.Gtk.Layout.Notebook.ComponentInfoNoteBook where import Data.IORef import Graphics.UI.Gtk type ComponentInfoNoteBook = (NoteBook, IORef [(String,ComponentInfo,ComponentViewInfo)]) type ComponentInfo = (String, [String]) type ComponentViewInfo = (HBox,IconView, TextView) componentInfoWidget :: IO ...
keera-studios/gtk-helpers
gtk2/src/Graphics/UI/Gtk/Layout/Notebook/InfoNotebook.hs
bsd-3-clause
1,026
0
10
135
292
159
133
24
1
{-# LANGUAGE NoImplicitPrelude #-} -- | -- Module: $HEADER$ -- Description: Picky JSON parser based on Parsec and Aeson -- Copyright: (c) 2015, Matej Kollar -- License: BSD3 -- -- Maintainer: 208115@mail.muni.cz -- -- JSON parser with nice error messages and -- little more strict syntax (whitespace-wis...
FPBrno/aeson-parsec-picky
src/Data/Aeson/Parser/Parsec/Picky.hs
bsd-3-clause
5,368
0
14
1,245
1,529
851
678
126
2
{-# LANGUAGE OverloadedStrings #-} import Yi hiding (super) import qualified Yi.Keymap.Vim as V2 import qualified Yi.Keymap.Vim.Common as V2 import qualified Yi.Keymap.Vim.Utils as V2 import qualified Yi.Mode.Haskell as Haskell import qualified Yi.Rope as R main :: IO () main = yi $ defaultVimConfig { m...
TOSPIO/yi
example-configs/yi-vim-colemak.hs
gpl-2.0
2,687
0
21
793
579
322
257
45
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 #-} -------------------...
getyourguide/fbthrift
thrift/compiler/test/fixtures/includes/gen-hs/Module_Consts.hs
apache-2.0
2,229
0
6
409
427
310
117
40
0
test a = foo (\x -> True)
mpickering/hlint-refactor
tests/examples/Default44.hs
bsd-3-clause
25
0
7
6
20
10
10
1
1
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="fr-FR"> <title>Directory List v2.3 LC</title> <maps> <homeID>directorylistv2_3_lc</homeID> ...
thc202/zap-extensions
addOns/directorylistv2_3_lc/src/main/javahelp/help_fr_FR/helpset_fr_FR.hs
apache-2.0
984
78
66
158
414
210
204
-1
-1
module Foo where {-@ type Foos = [Foo] @-} {-@ type Foo = {v:Int | vv > 0} @-} foo :: [Int] {-@ foo :: Foos @-} foo = []
abakst/liquidhaskell
tests/todo/Aliases.hs
bsd-3-clause
124
0
5
33
22
15
7
3
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude, BangPatterns, MagicHash, UnboxedTuples #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Word -- Copyright : (c) The University of Glasgow, 1997-2002 -- License ...
beni55/haste-compiler
libraries/ghc-7.10/base/GHC/Word.hs
bsd-3-clause
31,589
0
15
10,232
7,551
3,910
3,641
480
1
module FacState where fac :: Int -> a -> (a, Int) fac n s | n < 2 = (s,1) | otherwise = case fac (n-1) s of (s',n') -> let n'' = n*n' in n'' `seq` (s',n'')
ghc-android/ghc
testsuite/tests/stranal/sigs/FacState.hs
bsd-3-clause
172
0
13
54
113
61
52
4
1
module Bug where compose :: [a -> a] -> a -> a compose = foldr (.) id class Compose a where compose1 :: a -> a -> a
urbanslug/ghc
testsuite/tests/codeGen/should_compile/T3579.hs
bsd-3-clause
123
0
8
35
58
32
26
5
1
module Station.Types.Card.Hash where import Import import Control.Exception (Exception) import qualified Crypto.Hash.BLAKE2.BLAKE2b as BK import qualified Data.Hashable as HA import Base64URL -------------------------------------------------- -- * Types ---------...
seagreen/station
src/Station/Types/Card/Hash.hs
mit
2,186
0
14
509
468
259
209
45
2
{-# htermination fmap :: (a -> b) -> (IO a -> IO b) #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_fmap_4.hs
mit
56
0
2
14
3
2
1
1
0
module Record.Syntax.Shared where import Record.Syntax.Prelude marker :: IsString a => a marker = "Ѣ" type Error = (Position, String) type Position = (Int, Int) data Level = Level_Type | Level_Exp | Level_Pat | Level_Decl deriving (Show) data BraceType = BraceType_Curly | BraceType_Rou...
nikita-volkov/record-syntax
library/Record/Syntax/Shared.hs
mit
1,442
0
9
261
414
241
173
-1
-1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} module Control.Concurrent.Singular.Event.Status ( Status (..), StatusRef (), newStatusRef, readStatusRef, writeStatusRef, casStatusRef ) where import GHC.IO (IO (..)) import GHC.Prim (RealWorld, MutVar#, newMutVar#, rea...
YellPika/Hannel
src/Control/Concurrent/Singular/Event/Status.hs
mit
1,239
0
11
269
417
229
188
33
1
module NavigationSpec (testZoomControl) where import Test.HUnit import Test.HUnit.Approx import Graphics.Gloss.Data.ViewPort import Graphics.Gloss.Interface.Pure.Game import Navigation.Internals errorMargin :: Float errorMargin = 1e-6 fuzzyEquals x y = abs (x - y) <= errorMargin testZoomControl :: Test testZoomCon...
tsoding/boids
test/NavigationSpec.hs
mit
1,924
0
14
589
324
178
146
31
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE FlexibleContexts #-} module Yage.Wire.Types where import Yage.Prelude --------------------------------------------------------------------------------------------------- import Control.Wire (Wire, Timed, Session) import ...
MaxDaten/yage
src/Yage/Wire/Types.hs
mit
857
0
8
134
136
81
55
-1
-1
-- | -- Module: Network.Transportation.Germany.DVB.Route.JSON -- Copyright: (C) 2015 Braden Walters -- License: MIT (see LICENSE file) -- Maintainer: Braden Walters <vc@braden-walters.info> -- Stability: experimental -- Portability: ghc {-# LANGUAGE OverloadedStrings #-} module Network.Transportation.Germany.DVB.Rout...
meoblast001/dresdner-verkehrsbetriebe
src/Network/Transportation/Germany/DVB/Route/JSON.hs
mit
2,650
0
13
799
589
336
253
64
0
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} -- | -- Module : Web.Stripe.Error -- Copyright : (c) David Johnson, 2014 -- Maintainer : djohnson.m@gmail.com -- Stability : experimental -- Portability : POSIX module Web.Stripe.Error ( -- * Types StripeErrorHTTPCode (..) ,...
dmjio/stripe
stripe-core/src/Web/Stripe/Error.hs
mit
3,773
0
11
1,015
565
324
241
85
1
module Game where import qualified MountainCar as MC maxStep :: Int maxStep = 200 data Game = Game { _observation :: MC.Observation , _lastAction :: MC.Action , _nwins :: Int , _episode :: Int , _step :: Int , _xis :: [Double] , _inputLeft :: Bool , _inputRight :: Bool } createGame :...
fgaz/shine
shine-examples/mountaincar/Game.hs
mit
941
0
11
259
393
206
187
24
1
{-# LANGUAGE MultiParamTypeClasses , FlexibleContexts , FlexibleInstances #-} ---------------------------------------------------------------------- -- | -- Module : Unbound.LocallyNameless.SubstM -- License : MIT (see LICENSE) -- Maintainer : Nathan Collins <nathan.collins@gmail.c...
spire/substM
src/Unbound/LocallyNameless/SubstM.hs
mit
5,849
2
16
1,256
1,688
872
816
-1
-1
#!/usr/bin/runhaskell import Control.Applicative ((<$>)) import Control.Concurrent (MVar, newEmptyMVar, putMVar, takeMVar, forkIO) import Control.Exception (SomeException, onException, evaluate, catch, try, throwIO, mask) import Control.Monad (when) import Control.Monad.State (StateT(runStateT), get, put) import Contr...
ddssff/process-listlike-old
Tests/Test6.hs
mit
3,162
0
16
714
1,061
553
508
49
2
import XXP main = runXXP $ do cmake "test1" -- gitCommit spawnWithMPI "test1" defaultMPIConfig { bridgeCommand = "../../build_mpi/mpibridge" , instances = Just 10 }
mahrz/xxp
example/xp_test2.hs
mit
318
0
11
177
45
23
22
4
1
{-# htermination (unzip :: (List (Tup2 a b)) -> Tup2 (List a) (List b)) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Tup2 a b = Tup2 a b ; foldr :: (a -> b -> b) -> b -> (List a) -> b; foldr f z Nil = z; foldr f z (Cons x xs) = f x (foldr f z xs);...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/unzip_1.hs
mit
546
0
9
146
281
150
131
12
1
module Main where main = print $ f $ List [List [Elem 1, List [Elem 9, Elem 3]], Elem 2, List [Elem 3, Elem 5], Elem 932] data NestedList a = Elem a | List [NestedList a] f :: NestedList a -> [a] f (List x) = g x f (Elem x) = [x] g :: [NestedList a] -> [a] g [x] = f x g (x:xs) = f x ++ g xs
Rsgm/Haskell-problems
7.hs
mit
314
0
12
95
207
107
100
10
1
{-# LANGUAGE ExistentialQuantification #-} module Web.Crawlee.Crawler ( Crawler(..) , getResults ) where import Web.Crawlee.Queue import Web.Crawlee.TypeDefs import Control.Monad import Data.Monoid data Crawler q i m r = (Monoid (q i), Monoid r, Monad m) => Crawler { scrap :: (i -> m (q i, r)) } getResults :...
thoferon/crawlee
Web/Crawlee/Crawler.hs
mit
638
0
13
162
273
146
127
18
2
{-# LANGUAGE PartialTypeSignatures #-} import Control.Monad (void) import Control.Arrow (first) import XMonad.Actions.PhysicalScreens (viewScreen, sendToScreen) -- Docks import XMonad.Hooks.ManageDocks (avoidStruts, docksEventHook, docksStartupHook, manageDocks, docks, ToggleStruts(..)) -- Full Screen Events import ...
joranvar/dotfiles
xmonad/xmonad.hs
gpl-3.0
5,757
0
18
1,335
1,499
861
638
91
1
-- generate random permutations import System.Random p23 :: [a] -> Int -> [a] p23 l n = do gen <- getStdGen return $ take n [l !! x | x <- randomRs (0, length l - 1) gen] p25 :: [a] -> [a] p25 l = p23 l (length l)
yalpul/CENG242
H99/21-28/p25.hs
gpl-3.0
219
0
15
55
122
63
59
7
1
{-# LANGUAGE TemplateHaskell, DeriveGeneric, DeriveDataTypeable #-} module Hive.Problem.Types ( ProblemType (..) , Problem (Problem, problemType, problemInstance) , Solution (..) ) where import Data.Data import Data.Text.Lazy (Text) import Data.Text.Binary () import Data.Binary (Binary, put, putWord8, ...
chrisbloecker/Hive
src/Hive/Problem/Types.hs
gpl-3.0
1,554
0
8
360
350
203
147
34
0
{- teafree, a Haskell utility for tea addicts Copyright (C) 2013 Fabien Dubosson <fabien.dubosson@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of t...
StreakyCobra/teafree
src/Teafree/Core/Version.hs
gpl-3.0
1,129
0
6
242
63
39
24
10
1
{-# LANGUAGE Arrows #-} module Main where import System.IO import Text.Printf import Control.Monad.Random import Control.Monad.Reader import Control.Monad.State import Control.Monad.Trans.MSF.Random import Data.Array.IArray import FRP...
thalerjonathan/phd
coding/papers/pfe/LiveDemo/src/Main.hs
gpl-3.0
8,957
3
27
3,058
3,039
1,620
1,419
240
4
import Data.List data Type = LW | LG | WG deriving(Show, Eq) data Node = Node { t::Type, len::Int, next::[Node] } -- deriving(Show) check 0 0 _ = [] check 0 _ 0 = [] check 0 _ _ = [LW] check _ _ 0 = [LG] check _ 0 _ = [WG] check _ _ _ = [LW, LG, WG] calcnew t goat lion wolf | t == LW = (goat+1, lion-1, wolf-1) | t...
autarchprinceps/a-challenge-a-day-keeps-the-doctor-away
GoatWolfLion/main.hs
gpl-3.0
946
0
14
206
552
294
258
20
1
{-# 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 #-} -- ...
olorin/amazonka
amazonka-iam/gen/Network/AWS/IAM/UpdateAccountPasswordPolicy.hs
mpl-2.0
8,832
0
11
1,622
1,047
633
414
124
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-ssm/gen/Network/AWS/SSM/UpdateAssociationStatus.hs
mpl-2.0
4,801
0
9
1,019
569
345
224
72
1
{- | The CanvasHs.Colors module exposes 139 'Color' functions for frequently used colors -} module CanvasHs.Colors where default(Int, Float) aliceblue = (240, 248, 255, 1.0) antiquewhite = (250, 235, 215, 1.0) aqua = (0, 255, 255, 1.0) aquamarine = (127, 255, 212, 1.0) azure = (240, 255, 255, 1.0) beige = (245, 24...
CanvasHS/Canvas.hs
canvashs-module/CanvasHs/Colors.hs
lgpl-2.1
4,607
0
5
864
2,396
1,551
845
142
1
{-# LANGUAGE FlexibleContexts #-} module Lib where -- Chapter Exercises import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes import Data.Monoid -- Traversable instances -- Identity newtype Identity a = Identity a deriving (Eq, Ord, Show) instance Functor Identity where fmap f (...
dmp1ce/Haskell-Programming-Exercises
Chapter 21/traversable-instances/src/Lib.hs
unlicense
8,582
0
12
2,071
3,788
1,944
1,844
217
1
module Cardinality where -- Cardinality = 1 data PugType = PugData -- Cardinality = 3 data Airline = PapuAir | CatapultsR'US | TakeYourChancesUnited -- Int16 cardinality is 2^16 so 65536 -- maxBound::Int = 9223372036854775807 and minBound::Int = -9223372036854775808 - Huge cardinality -- maxBound and ...
thewoolleyman/haskellbook
11/07/eric/Cardinality.hs
unlicense
473
0
5
90
30
21
9
6
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE Trustworthy #-} module System.Hurtle.Unsafe where import Control.Applicative import Unsafe.Coerce (unsafeCoerce) import qualified System.Hurtle.Log as Log import qualified System.Hurtle.Typed...
bens/hurtle
src/System/Hurtle/Unsafe.hs
apache-2.0
966
0
14
316
251
134
117
21
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RankNTypes #-} module Grenade.Utils.OneHot ( oneHot , h...
HuwCampbell/grenade
src/Grenade/Utils/OneHot.hs
bsd-2-clause
2,914
0
16
868
855
454
401
65
2
{-# language CPP #-} module OpenXR.Zero ( Zero(..) ) where #if defined(USE_VULKAN_TYPES) import Vulkan.Zero #else import Data.Int ( Int16 ) import Data.Int ( Int32 ) import Data.Int ( Int64 ) import ...
expipiplus1/vulkan
openxr/src-manual/OpenXR/Zero.hs
bsd-3-clause
2,194
0
5
883
24
17
7
55
0
-- -- xmonad example config file. -- -- A template showing all available configuration hooks, -- and how to override the defaults in your own xmonad.hs conf file. -- -- Normally, you'd only override those defaults you care about. -- import XMonad import Data.Monoid import System.Exit import qualified XMonad.StackSet ...
xmonad/xmonad
man/xmonad.hs
bsd-3-clause
12,001
0
14
3,011
1,504
951
553
132
1
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE ExistentialQuantification #-} module Testing where import Data.Maybe import Control.Arrow data Test = forall a. Show a => Test String (a -> Bool) [a] data Failure = forall a. Show a => Fail String [a] instance Show Failure where show (Fail name inputs) = "Failed Test \""...
ThomWright/CIS194
test/Testing.hs
bsd-3-clause
1,171
0
12
332
597
323
274
24
2
{-# OPTIONS -fno-implicit-prelude #-} ----------------------------------------------------------------------------- -- | -- Module : Data.List -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- Stabi...
OS2World/DEV-UTIL-HUGS
libraries/Data/List.hs
bsd-3-clause
28,941
167
14
8,435
6,250
3,615
2,635
314
2
module W3C.W3CAssertions where import qualified Data.Text as T import Data.RDF import qualified Test.HUnit as TU import Test.Tasty import W3C.Manifest runManifestTests :: (TestEntry -> TestTree) -> Manifest -> TestTree runManifestTests mfEntryToTest manifest = testGroup (T.unpack $ d...
jutaro/rdf4h
testsuite/tests/W3C/W3CAssertions.hs
bsd-3-clause
1,325
0
12
294
467
235
232
-1
-1
module Main where import qualified Apps.X.Client as Client main :: IO () main = Client.mainProgrammatic
haroldcarr/juno
app/X/Client.hs
bsd-3-clause
106
0
6
17
30
19
11
4
1
{-| Version 1 'UUID' utilities. -} {-# LANGUAGE ForeignFunctionInterface , CPP #-} module System.UUID.V1 ( uuid ) where import System.UUID.FromForeign import Foreign.C import Foreign.Ptr {-| Obtain a Version 1 'UUID' with the native 'UUID' generator. -} uuid = runAn...
solidsnack/system-uuid
System/UUID/V1.hs
bsd-3-clause
580
0
8
172
68
41
27
10
1
module Main where import Build_doctests (deps) import Chat import Chat.Bot.Calculator import Chat.Bot.Misc.Calculator import Chat.Bot.Answer.Calculator import Chat.Bot.Run.Calculator import Chat.Bot.Ping import Chat.Bot.Answer.Ping impo...
charleso/haskell-in-haste
test/doctests.hs
bsd-3-clause
2,644
0
15
758
685
391
294
79
1
-- Config.hs {-# OPTIONS_GHC -Wall #-} module Design.Config( Config(..) , HorizTail(..) , VertTail(..) , SurfaceControl(..) , ACType(..) , cruiseReynolds , bodyFineness , meanAer...
ghorn/conceptual-design
Design/Config.hs
bsd-3-clause
7,219
0
14
2,905
1,579
937
642
125
2
{-# LANGUAGE RankNTypes #-} module Lava.MyST ( ST , STRef , newSTRef , readSTRef , writeSTRef , runST , fixST , unsafePerformST , unsafeInterleaveST , unsafeIOtoST ) where import Control.Applicative (Applicative (..)) import Control.Monad (ap) import System.IO import System.IO.Unsafe import Dat...
shayan-najd/MiniLava
Lava/MyST.hs
bsd-3-clause
1,328
0
12
322
634
327
307
49
1
module Jade.Memo where emptyMemo = Memo DM.empty emptyTopl = TopLevel DM.empty getMemo :: J Memo getMemo = globalMemo <$> get putMemo memo = do Global x _ <- get put $ Global x memo
drhodes/jade2hdl
src/Jade/Memo.hs
bsd-3-clause
190
0
8
42
75
37
38
8
1
{-# LANGUAGE ForeignFunctionInterface, CPP #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.NV.PathRendering -- Copyright : (c) Sven Panne 2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stab...
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/NV/PathRendering.hs
bsd-3-clause
24,882
0
19
2,512
3,999
2,330
1,669
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Azure.Storage.Protocol.Common ( version, MonadIO, baseRequest ) where import Control.Monad.IO.Class (MonadIO, liftIO) import Data.ByteString (ByteString) import qualified Data.ByteString.Char8 as BSAscii import qualified Data.Time.Clock as ...
Porges/azure-storage-haskell
src/Azure/Storage/Protocol/Common.hs
bsd-3-clause
875
0
15
208
207
123
84
22
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.JHC -- Copyright : Isaac Jones 2003-2006 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This module contains most of the JHC-specific code for configuring, building ...
fpco/cabal
Cabal/Distribution/Simple/JHC.hs
bsd-3-clause
10,045
0
17
2,242
2,038
1,121
917
145
2
import Control.Applicative validateLength :: Int -> String -> Maybe String validateLength maxLen s = if (length s) > maxLen then Nothing else Just s newtype Name = Name String deriving (Eq, Show) newtype Address = Address String deriving (Eq, Show) mkName :: String -> Maybe Name mkName s = fmap Name $ validateLeng...
chengzh2008/hpffp
src/ch17-Applicative/maybeApplicative.hs
bsd-3-clause
1,580
0
12
400
590
297
293
39
3
{-# LANGUAGE QuasiQuotes #-} import LiquidHaskell import Language.Haskell.Liquid.Prelude -- import Data.List import Data.Vector hiding (map, concat, zipWith, filter, foldr, foldl, (++)) propVec = (vs ! 3) == 3 where xs = [1,2,3,4] :: [Int] vs = fromList xs
spinda/liquidhaskell
tests/gsoc15/unknown/pos/vector00.hs
bsd-3-clause
289
0
7
70
93
59
34
7
1
{-# LANGUAGE CPP #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RoleAnnotations #-} {-# LANG...
achirkin/easytensor
easytensor/src/Numeric/DataFrame/Internal/Backend.hs
bsd-3-clause
9,832
4
18
2,510
2,451
1,386
1,065
-1
-1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE TupleSections #-} module Language.Rsc.SSA.SSA (ssaTransform) where import Control.Monad import Data.D...
UCSD-PL/RefScript
src/Language/Rsc/SSA/SSA.hs
bsd-3-clause
44,946
0
20
14,255
12,714
6,494
6,220
635
7
import Control.Monad import Control.Concurrent import Control.Concurrent.STM import System.IO import Network main :: IO () main = do soc <- listenOn $ PortNumber 54492 forever $ do (h, _, _) <- accept soc (>> return ()) . forkIO $ do hGetLine h >>= putStrLn hGetLine h >>= putStrLn hClose h
YoshikuniJujo/xmpipe
test/s2s_model/s2s_sv.hs
bsd-3-clause
307
0
14
65
126
62
64
14
1
{-# LANGUAGE LambdaCase, PatternGuards, RecordWildCards #-} {- Reduce the number of import declarations. Two import declarations can be combined if: (note, A[] is A with whatever import list, or none) import A[]; import A[] = import A[] import A(B); import A(C) = import A(B,C) import A; impor...
ndmitchell/hlint
src/Hint/Import.hs
bsd-3-clause
5,337
0
18
1,214
1,556
820
736
79
5
{-# LANGUAGE OverloadedStrings #-} module Main where import Options.Applicative import Options.Applicative.Builder (str) import Data.Text import Lib data Verbosity = Normal | Verbose data Options = Options { verbose :: Verbosity , tickers :: [Text] } commaListOption :: Mod OptionFields [Text] -> Parser [Tex...
strudlez/contravariance-crisis
app/Main.hs
bsd-3-clause
1,014
0
11
227
305
159
146
34
1
-- © 2003 Peter Thiemann {-| Implements Locking via directory creation, which seems to be the only portable way to do it through Haskell's standard IO library. -} module WASH.Utility.Locking (obtainLock, releaseLock) where import Data.Convertible (convert) import WASH.Utility.Auxiliary import System.Directory import S...
nh2/WashNGo
WASH/Utility/Locking.hs
bsd-3-clause
1,178
6
11
272
306
155
151
30
3
module Build.Print where import System.IO (hPutStrLn, stderr) import System.Exit (exitFailure) import qualified Data.Map as Map import qualified Data.List as List import qualified SourceSyntax.Module as M import qualified SourceSyntax.PrettyPrint as Pretty import qualified Type.Alias as Alias import qualified Text....
deadfoxygrandpa/Elm
compiler/Build/Print.hs
bsd-3-clause
1,232
0
15
263
418
219
199
29
1
module Rogue (solve) where import Data.List (tails) data Tile = Trap | Safe deriving (Show, Eq) windows :: Int -> [a] -> [[a]] windows n xs = take (length xs - n + 1) . map (take n) . tails $ xs tileType :: Tile -> Tile -> Tile -> Tile tileType Trap Trap Safe = Trap tileType Safe Trap Trap = Trap tileType Trap Safe...
cjlarose/advent-2016
src/Rogue.hs
bsd-3-clause
1,015
0
12
231
471
242
229
26
2
module Cardano.Wallet.API.Response.Sort.IxSet where import Cardano.Wallet.API.Indices (IsIndexOf, IxSet) import qualified Cardano.Wallet.API.Request.Sort as S import Cardano.Wallet.Kernel.DB.Util.IxSet (toAscList, toDescList, toList) -- | Sort the data, stopping at the first e...
input-output-hk/pos-haskell-prototype
wallet/src/Cardano/Wallet/API/Response/Sort/IxSet.hs
mit
936
0
9
182
220
123
97
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} module FormattableSpec (main) where import Test.Hspec.ShouldBe import Data.Text (Text) import qualified Data.Text.Lazy as L (Text) import Text.Format.Formattable data Foo = Foo deriving Show main = hsp...
beni55/format
test/FormattableSpec.hs
mit
1,131
0
17
296
326
169
157
28
1
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- -- | Parsing the top of a Haskell source file to get its module name, -- imports and options. -- -- (c) Simon Marlow 2005 -- (c) Lemmih 2006 -- -------------------------------------------------------------------------...
elieux/ghc
compiler/main/HeaderInfo.hs
bsd-3-clause
14,283
3
28
4,514
2,959
1,517
1,442
232
19
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} module System.IO.Streams.Tests.Handle (tests) where ------------------------------------------------------------------------------ import Control.Exception import Control.Monad hiding (mapM) import Dat...
TomMD/io-streams
test/System/IO/Streams/Tests/Handle.hs
bsd-3-clause
8,205
0
19
1,916
2,021
999
1,022
149
1
{-# LANGUAGE RecordWildCards, DeriveDataTypeable, OverloadedStrings #-} -- | Nix configuration module Stack.Config.Nix (nixOptsFromMonoid ,nixCompiler ,StackNixException(..) ) where import Control.Applicative import Control.Monad (join, when) import Data.Maybe import Data.Monoid.Extra impo...
Heather/stack
src/Stack/Config/Nix.hs
bsd-3-clause
2,981
0
16
648
737
384
353
64
12
{-| Module : Idris.Elab.Rewrite Description : Code to elaborate rewrite rules. Copyright : License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE PatternGuards #-} {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} module Idris.Elab.Rewrite(elabRewrite, elabRewriteLemma) where import Idris.AbsSyntax ...
markuspf/Idris-dev
src/Idris/Elab/Rewrite.hs
bsd-3-clause
11,025
0
22
4,368
3,465
1,715
1,750
185
15
{-# OPTIONS_HADDOCK hide #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Texturing.Filter -- Copyright : (c) Sven Panne 2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -...
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/Texturing/Filter.hs
bsd-3-clause
2,612
0
10
370
490
275
215
39
6
module BaseSyntaxStruct(module Struct) where import HsDeclStruct as Struct import HsExpStruct as Struct import HsFieldsStruct as Struct import HsGuardsStruct as Struct import HsKindStruct as Struct import HsPatStruct as Struct import HsTypeStruct as Struct import HsAssocStruct as Struct --import HsModule ...
forste/haReFork
tools/base/AST/BaseSyntaxStruct.hs
bsd-3-clause
449
0
4
91
62
49
13
11
0
-- $Id: GenSym.hs,v 1.1 2001/07/24 17:39:10 moran Exp $ {- Horribly hacked up gensym. -} module GenSym (newName) where import IOExts count :: IORef Int count = unsafePerformIO $ newIORef 0 incCount :: Int incCount = unsafePerformIO $ do c <- readIORef count writeIORef count $! (c + 1) re...
forste/haReFork
tools/base/SA/GenSym.hs
bsd-3-clause
370
0
10
91
94
49
45
12
1
{-# OPTIONS_GHC -g1 -O #-} import System.Environment summap :: (Int -> Int) -> (Int -> Int) summap f n = f 10 {-# NOINLINE summap #-} main = do n <- length `fmap` getArgs print $ summap (+ n) n
sdiehl/ghc
testsuite/tests/simplCore/should_run/T14894.hs
bsd-3-clause
199
0
9
45
78
42
36
8
1
module Main (main) where import DynFlags import Data.List import System.Environment main :: IO () main = do args <- getArgs case args of [] -> error "Need to give filename to generate as an argument" [f] -> case f of "docs/users_guide/use...
urbanslug/ghc
utils/mkUserGuidePart/Main.hs
bsd-3-clause
2,364
0
16
819
412
217
195
47
5
module Render.GlossInterface where import Prelude hiding (id, (.)) import FRP.Yampa import Graphics.Gloss (Color, Display, Picture(Blank)) import qualified Graphics.Gloss.Interface.IO.Game as G import Data.IORef import System.Mem playYampa :: Display -> Color -> Int -> SF (Event G.Event) Picture -...
santolucito/Euterpea_Projects
TransGame/src/Render/GlossInterface.hs
mit
1,662
0
18
601
398
208
190
43
3
{{hs_copyright}} {-# OPTIONS_GHC -F -pgmF hspec-discover #-}
rcook/ptool-templates
_shared/haskell/test/Spec.hs
mit
61
1
3
7
9
7
2
-1
-1
{-# LANGUAGE DataKinds, TypeOperators #-} import Data.Proxy import Data.Vinyl import Data.Word import Foreign.Ptr (nullPtr, plusPtr) import Graphics.Rendering.OpenGL (DataType(..), GLfloat, VertexArrayDescriptor(..)) import Graphics.VinylGL import Linear (V1(..), V3(..)) import Test.Fr...
spetz911/progames
vinyl-gl-master/tests/BasicTest.hs
mit
862
0
9
157
255
152
103
23
1
{-# LANGUAGE GeneralizedNewtypeDeriving, RecordWildCards #-} module GMEParser (parseTipToiFile) where import qualified Data.ByteString.Lazy as B import qualified Data.ByteString.Lazy.Char8 as BC import qualified Data.Binary.Get as G import Text.Printf import Data.List import Data.Maybe import Control.Monad import Con...
entropia/tip-toi-reveng
src/GMEParser.hs
mit
16,169
0
19
4,570
5,350
2,620
2,730
380
12
{------------------------------------------------------------------------------- If a box contains twenty-one coloured discs, composed of fifteen blue discs and six red discs, and two discs were taken at random, it can be seen that the probability of taking two blue discs, P(BB) = (15/21)×(14/20) = 1/2. The next such...
dpieroux/euler
0100.hs
mit
2,474
0
14
570
245
125
120
11
1
{-# LANGUAGE NoImplicitPrelude #-} module Prelude.Source.GHC.IO.Exception ( IOError, ioError, userError, ) where import Prelude ( IOError, ioError, userError, )
scott-fleischman/cafeteria-prelude
src/Prelude/Source/GHC/IO/Exception.hs
mit
175
0
5
33
37
26
11
5
0
module DataTypes where import Data.Function -- | Data type describing the days of the week data Day = Mon | Tue | Wed | Thurs | Fri | Sat | Sun deriving (Eq, Enum, Ord, Read) instance Show Day where show Mon = "Monday" show Tue = "Tuesday" show Wed = "Wednesday" show Thurs = "Thursday" show Fri =...
Jiggins/CS225-Haskell
DataTypes.hs
mit
2,316
0
11
641
906
461
445
50
1
{-# LANGUAGE ScopedTypeVariables #-} {-| Module : Labyrinth.Data.Array2d Description : 2 dimensional arrays Copyright : (c) deweyvm 2014 License : MIT Maintainer : deweyvm Stability : experimental Portability : unknown 2 dimensional arrays (implemented as a flat Data.Vector) and utility methods. -} modul...
deweyvm/labyrinth
src/Labyrinth/Data/Array2d.hs
mit
2,846
0
14
671
1,045
555
490
57
1
module Main where import Control.Dangerous import System.Environment import Options ( configure ) import Book ( load, compile ) main :: IO () main = do name <- getProgName argv <- getArgs opts <- execute $ runDangerous $ configure name argv book <- execute =<< runDangerousT (load opts) compile book...
Soares/Bookbuilder
src/Main.hs
mit
321
0
11
70
108
55
53
12
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module Demos.Physics ( PhysicsDemo(..) , allo...
schell/odin
app/Demos/Physics.hs
mit
8,057
0
18
2,734
2,548
1,284
1,264
196
1
module Main where import Test.Framework (defaultMain) import qualified Test.Data.Network.Address.IP as IP main = defaultMain $ concat [ IP.tests ]
sebnow/haskell-network-address
Test.hs
mit
157
0
8
29
42
27
15
5
1
module Compiler.Type.Pipeline where import Compiler.PreAST.Type import Compiler.Syntax.Type import Compiler.Serializable import Compiler.TypeCheck import Control.Monad.Except import Control.Monad.State import Data.List (sort) import Data.Set (Set) import qualified Data.Set as Set -----...
banacorn/mini-pascal
src/Compiler/Type/Pipeline.hs
mit
6,846
0
15
2,043
1,791
952
839
111
4
module Utils (module Proposition, (/\), (\/), (<=>) ,destAnd, destEq, truth, false ,splitTwo, splitThree ,inst1, inst2, inst3, mp ,match, instM) where import Control.Monad import Data.Maybe (mapMaybe) import Instances import Proposition hiding (mp) import qualified ...
Chattered/proplcf
Utils.hs
mit
2,595
0
13
732
1,104
570
534
57
6
module Idle where import Data.IORef import Graphics.UI.GLUT import Model registerBoardUpdater :: (IdleCallback -> IO ()) -> IORef Board -> IO () registerBoardUpdater f b = do b $~ fallAll b $~ (`movePieceConstrained` down) f (registerBoardUpdater f b) postRedisplay Nothi...
mrlovre/LMTetrys
src/Idle.hs
gpl-2.0
323
0
9
88
101
52
49
10
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Darcs.Patch.Prim ( showPrim, showPrimFL, primIsAddfile, primIsHunk, primIsBinary, primIsSetpref, primIsAdddir, is_filepatch, canonize, tryToShrink, sortCoalesceFL, coalesce, canonizeFL, tryShrinkingInverse, summari...
DavidAlphaFox/darcs
src/Darcs/Patch/Prim.hs
gpl-2.0
772
0
6
195
191
133
58
20
0
module Paralleliser where import Language.Core import Data.List(intersect, nub) import Data.Char(isLower) import Partitioner import qualified Language.Haskell.Exts as LHE isDistilledExpression :: Term -> Bool isDistilledExpression (Free _) = True isDistilledExpression (Bound _) = True isDistilledExpression (Con _ []...
distillation/paralleliser
Paralleliser.hs
gpl-3.0
4,733
0
15
858
2,262
1,132
1,130
79
1
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} module Web.TwitterClient (acquireTempTokens, acquireAccessTokens, displayTimeline) where import Data.Aeson import Data.Aeson.Lens import Data.ByteString.Char8 (pack, unpack) import Data.ByteString.Lazy (ByteString(..), toStrict) import Data.Maybe i...
jsantos17/twitter-wreq
src/Web/TwitterClient.hs
gpl-3.0
3,143
0
13
659
838
414
424
-1
-1
{-# OPTIONS_GHC -XTypeFamilies -XTypeSynonymInstances -XOverloadedStrings #-} module Framework where import MarXup import MarXup.Latex import MarXup.Tex import Data.Monoid import Data.List (intersperse) return' :: a -> Tex a return' = return ---------- -- Text anon :: TeX -> TeX anon x = x -- "(Anonymised) " ...
jyp/ControlledFusion
paper/Framework.hs
gpl-3.0
1,220
0
13
272
442
220
222
39
1
{-# OPTIONS_GHC -fno-warn-tabs #-} {-# OPTIONS_HADDOCK show-extensions #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GADTSyntax #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeOperators #-} {-| Module : Turing Descr...
sanjorgek/turingMachine
src/Math/Model/Turing.hs
gpl-3.0
2,247
4
11
552
910
507
403
63
1
-- | 'Document' class allowing to have different interpretations of the -- HughesPJ pretty-printing combinators. module Text.PrettyPrint.Class ( P.Doc , Document(..) , P.isEmpty , P.render , P.renderStyle , P.style , P.Style(..) , P.Mode(..) , ($--$) , semi ...
meiersi/scyther-proof
src/Text/PrettyPrint/Class.hs
gpl-3.0
2,937
0
11
948
1,192
665
527
113
2
-- Copyright 2016, 2017 Robin Raymond -- -- This file is part of Purple Muon -- -- Purple Muon 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) an...
r-raymond/purple-muon
src/Client/Loop.hs
gpl-3.0
2,574
0
13
670
542
295
247
39
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Bidders/Accounts/FilterSets/BidResponsesWithoutBids/List.hs
mpl-2.0
8,137
0
18
1,610
894
523
371
138
1