code
stringlengths
2
1.05M
repo_name
stringlengths
5
101
path
stringlengths
4
991
language
stringclasses
3 values
license
stringclasses
5 values
size
int64
2
1.05M
-- | Functionality common to all repo kinds module Distribution.Client.Mirror.Repo.Util ( readIndex , provideAuthInfo ) where -- stdlib import Control.Exception import Control.Monad import Data.Time import Data.Time.Clock.POSIX import Network.URI hiding (authority) import System.FilePath import System.IO impor...
ocharles/hackage-server
Distribution/Client/Mirror/Repo/Util.hs
Haskell
bsd-3-clause
2,747
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-} ------------------------------------------------------------------------------- -- -- | Break Arrays in the IO monad -- -- Entries in the array are Word sized Conceptually, a zero-indexed IOArray of -- Bools, initially False. They're represented as Words with 0==False, 1...
urbanslug/ghc
compiler/main/BreakArray.hs
Haskell
bsd-3-clause
3,723
{-# OPTIONS_GHC -fno-package-trust #-} -- | Basic test to see if Safe flags compiles -- test should fail as there shouldn't be a no-package-trust flag, only a -- package-trust flag! module SafeFlags19 where f :: Int f = 1
sdiehl/ghc
testsuite/tests/safeHaskell/flags/SafeFlags19.hs
Haskell
bsd-3-clause
224
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Homework.Week11.Assignment where import Control.Monad.Random ------------------------------------------------------------ -- Die values newtype DieValue = DV { unDV :: Int } deriving (Eq, Ord, Show, Num) first :: (a -> b) -> (a, c) -> (b, c) first f (a, c) = (f...
jxv/cis-194-winter-2016
src/Homework/Week11/Assignment.hs
Haskell
mit
1,030
module Main where import Dom import HTML.Parsec import HTML.Parser import CSS --this is just here so cabal has a main to compile main :: IO () main = print "This doesn't do anything yet"
Hrothen/Hubert
src/Main.hs
Haskell
mit
188
{-# LANGUAGE ExistentialQuantification #-} module Undo where import Data.IORef import Control.Monad.State data Restore = forall a . Restore (IORef a) a type Undo = StateT [Restore] IO ureadIORef :: IORef a -> Undo a ureadIORef ptr = lift $ readIORef ptr unewIORef :: a -> Undo (IORef a) unewIORef v = lift $ newIOR...
frelindb/agsyHOL
Undo.hs
Haskell
mit
1,011
{-# htermination inits :: [a] -> [[a]] #-} import List
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/List_inits_1.hs
Haskell
mit
55
module Rebase.Data.DList ( module Data.DList ) where import Data.DList
nikita-volkov/rebase
library/Rebase/Data/DList.hs
Haskell
mit
74
module MonadBot.Plugins.ListZipper ( ListZipper , forward , back ) where type ListZipper a = ([a], [a]) forward :: ListZipper a -> Maybe (ListZipper a) forward (ys, x : xs) = Just (x : ys, xs) forward _ = Nothing back :: ListZipper a -> Maybe (ListZipper a) back (y : ys, xs) = Just (ys, y ...
saevarb/Monadbot
lib/MonadBot/Plugins/ListZipper.hs
Haskell
mit
354
module Language.Jass.Semantic.Variable( -- | Variable utilities Variable(..), getVarName, getVarPos, getVarConstness, getVarInitializator, getVarType, isVarArray, isGlobalVariable ) where import Language.Jass.Parser.AST -- | Variable could be global, local and as a function parameter data Variable...
NCrashed/hjass
src/library/Language/Jass/Semantic/Variable.hs
Haskell
mit
1,926
module BTError where data BTError = NoParse | NoKey String | FailureReason String instance Show BTError where show NoParse = "no parse" show (NoKey s) = "no key: " ++ s show (FailureReason s) = "failure reason: " ++ s
nabilhassein/bitcurry
src/BTError.hs
Haskell
mit
228
{-# LANGUAGE OverloadedStrings #-} module Network.API.Mandrill.RejectsSpec where import Test.Hspec import Test.Hspec.Expectations.Contrib import Network.API.Mandrill.Types import Network.API.Mandrill.Utils import qualified Network.API.Mandrill.Rejects as Rejects import qualified Data.Text ...
krgn/hamdrill
test/Network/API/Mandrill/RejectsSpec.hs
Haskell
mit
1,353
-- ------------------------------------------------------------------------------------- -- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved. -- For email, run on linux (perl v5.8.5): -- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0...
cbrghostrider/Hacking
HackerRank/Algorithms/Implementation/timeInWords.hs
Haskell
mit
1,457
{-# OPTIONS_HADDOCK hide #-} module Graphics.Gloss.Internals.Interface.ViewState.Reshape (callback_viewState_reshape, viewState_reshape) where import Graphics.Gloss.Internals.Interface.Callback import Graphics.Gloss.Internals.Interface.Backend import Graphics.Rendering.OpenGL (($=)) import qualified Graphics.Render...
gscalzo/HaskellTheHardWay
gloss-try/gloss-master/gloss/Graphics/Gloss/Internals/Interface/ViewState/Reshape.hs
Haskell
mit
879
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Main where import Control.Monad import Control.Monad.State import Control.Applicative import Data.List import System.IO import System.Random import Data.Function (on) import AI import Types im...
artems/blockbattle
src/Main.hs
Haskell
mit
2,690
{-# LANGUAGE CPP #-} module GHCJS.DOM.KeyPair ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.KeyPair #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.Generated.KeyPair...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/KeyPair.hs
Haskell
mit
334
module Util.Server where import Control.Monad.Reader import Server.Config import Util.JWT import Servant import Servant.Server import Web.JWT requireToken :: Maybe (Token a) -> ConfigM a requireToken Nothing = errorOf err401 requireToken (Just (Token token)) = do mAuth <- token <$> asks jwtSecret case mAut...
benweitzman/PhoBuddies-Servant
src/Util/Server.hs
Haskell
mit
386
import XMonad import XMonad.Config.Desktop import XMonad.Config.Gnome import XMonad.Util.EZConfig import qualified XMonad.StackSet as W import XMonad.Actions.CycleWS import XMonad.ManageHook import XMonad.Hooks.ManageDocks import XMonad.Layout.ToggleLayouts import XMonad.Hooks.DynamicLog import XMonad.Actions.GridSelec...
yjpark/dotfiles
linux/xmonad.old/xmonad_vm.hs
Haskell
mit
7,141
module Blockchain.UI.Service.Server ( UiService(..) , newUiServiceHandle ) where import Control.Monad.IO.Class (MonadIO) import Data.IORef (readIORef) import Data.Text (Text) import Blockchain.Node.Account (Account(accountId)) import Blockchain.Node.Service (StatusMessage) import Blockchain.Node.Transaction (Ne...
carbolymer/blockchain
blockchain-ui/src/Blockchain/UI/Service/Server.hs
Haskell
apache-2.0
1,220
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances, FlexibleInstances #-} module Web.Scotty.CRUD where import Web.Scotty import Data.Aeson import Data.Aeson.Parser as P import Data.Attoparsec.ByteString as Atto import qualified Data.ByteString as BS import qualified Data.ByteString...
andygill/scotty-crud
src/Web/Scotty/CRUD.hs
Haskell
bsd-2-clause
11,141
module Utils.Vigilance.UtilsSpec (spec) where import Utils.Vigilance.Utils import SpecHelper spec :: Spec spec = parallel $ do describe "watchIntervalSeconds" $ do it "converts seconds" $ watchIntervalSeconds (Every 3 Seconds) `shouldBe` 3 it "converts minutes" $ watchIntervalSeconds (Every 3 Minutes) `sho...
MichaelXavier/vigilance
test/Utils/Vigilance/UtilsSpec.hs
Haskell
bsd-2-clause
664
{-# LANGUAGE RankNTypes #-} module Text.SExpr.Print where import Text.SExpr.Type import Text.SExpr.Convert.Classes import Text.PrettyPrint import qualified Codec.Binary.Base64.String as B64 import Data.Char (ord, intToDigit) import Numeric (showOct) import Data.List (intersperse) import Data.Binary import Data.Binary...
mokus0/s-expression
src/Text/SExpr/Print.hs
Haskell
bsd-3-clause
6,677
broken:(
bergmark/snaplet-fay
example/snaplets/fay/src/BrokenFile.hs
Haskell
bsd-3-clause
10
{-# OPTIONS_GHC -fno-warn-orphans #-} -- Not good reasons, but shouldn't be too fatal {- Sample renderings: -- ONE MODE Program description programname [OPTIONS] FILE1 FILE2 [FILES] Program to perform some action -f --flag description Flag grouping: -a --another description -- MANY MODES WITH ONE SHOWN ...
ndmitchell/cmdargs
System/Console/CmdArgs/Explicit/Help.hs
Haskell
bsd-3-clause
5,424
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts, FlexibleInstances #-} {-# LANGUAGE OverlappingInstances, UndecidableInstances, TypeSynonymInstances #-} {-# LANGUAGE RecordWildCards, NamedFieldPuns, DisambiguateRecordFields #-} {-# ...
pepeiborra/narradar
src/Narradar/Constraints/SAT/RPOAF.hs
Haskell
bsd-3-clause
34,363
-- Standard semantics of While in direct style. -- We do not make any reuse. module While.DenotationalSemantics.Main0 where import qualified Prelude import Prelude hiding (Num, True, False) import While.AbstractSyntax -- Denotation types type MA = State -> Num type MB = State -> Bool type MS = State -> State -- Sta...
grammarware/slps
topics/implementation/NielsonN07/Haskell/src/While/DenotationalSemantics/Main0.hs
Haskell
bsd-3-clause
1,389
module Stats where import Data.List type Series = [Double] type Statistic = Double mean :: Series -> Statistic mean xs = sum xs / genericLength xs median :: Series -> Statistic median xs | odd (length xs) = sorted !! middle_i | otherwise = (sorted !! middle_i + sorted !! (middle_i + 1) ) / 2 where middle_...
tinyrock/gr4j
src/Stats.hs
Haskell
bsd-3-clause
1,017
{-# language MultiParamTypeClasses #-} module OpenCV.Internal.Core.Types.Mat.Depth ( Depth(..) , ToDepth(toDepth) , ToDepthDS(toDepthDS) , DepthT ) where import "base" Data.Int import "base" Data.Proxy import "base" Data.Word import "this" OpenCV.TypeLevel ----------------------------------------...
Cortlandd/haskell-opencv
src/OpenCV/Internal/Core/Types/Mat/Depth.hs
Haskell
bsd-3-clause
2,420
module Tinc.SetupSpec (spec) where import Prelude () import Prelude.Compat import Test.Hspec import Test.Mockery.Directory import System.Directory import System.FilePath import Tinc.Types import Tinc.GhcInfo import Tinc.Setup ...
beni55/tinc
test/Tinc/SetupSpec.hs
Haskell
bsd-3-clause
894
module Char8ProllyNotWhatYouWant where import qualified Data.Text as T import qualified Data.Text.Encoding as TE import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as B8 -- utf8-string import qualified Data.ByteString.UTF8 as UTF8 -- Manual unicode encoding of japanese text -- GHC Haskell a...
dmvianna/strict
src/char8.hs
Haskell
bsd-3-clause
926
module MIX.Assembler.MIXWord ( MIXWord , wordMask , getByte , storeInField , storeManyInField , toWord , wordToInteger , setNegative , clearNegative , clearByte , addWord , subWord , multWord , divWord , isNegative , bitsPerByte , bytesPerWord ) ...
jtdaugherty/mix-assembler
src/MIX/Assembler/MIXWord.hs
Haskell
bsd-3-clause
3,680
---------------------------------------------------------------------------- -- | -- Module : Language.Core.Interpreter.Structures -- Copyright : (c) Carlos López-Camey, University of Freiburg -- License : BSD-3 -- -- Maintainer : c.lopez@kmels.net -- Stability : stable -- -- -- Defines fundamental s...
kmels/dart-haskell
src/Language/Core/Interpreter/Structures.hs
Haskell
bsd-3-clause
13,071
module Boilerplater where import Data.Char import Data.List import Data.List.Split import Data.Maybe import Language.Haskell.TH import Debug.Trace testProperties :: Q [Dec] -> Q Exp testProperties mdecs = do decs <- mdecs -- NB: the use of mkName here ensures we do late binding to the testProperty function...
batterseapower/hashtables
tests/Boilerplater.hs
Haskell
bsd-3-clause
2,104
module HaskellCI.ShVersionRange ( compilerVersionPredicate, compilerVersionArithPredicate, ) where import HaskellCI.Prelude import Algebra.Lattice (joins) import Algebra.Heyting.Free (Free (..)) import qualified Algebra.Heyting.Free as F import qualified Data.Set as S import qualified Distrib...
hvr/multi-ghc-travis
src/HaskellCI/ShVersionRange.hs
Haskell
bsd-3-clause
7,849
{-# LANGUAGE TypeFamilies, ExistentialQuantification, FlexibleInstances, UndecidableInstances, FlexibleContexts, DeriveDataTypeable, ScopedTypeVariables, MultiParamTypeClasses, FunctionalDependencies,ParallelListComp, EmptyDataDecls, TypeSynonymInstances, TypeOperators, TemplateHaskell #-} -- | KansasLava is desig...
andygill/kansas-lava
Language/KansasLava/Rep.hs
Haskell
bsd-3-clause
13,705
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} module Reflex.Model where import Control.Monad import Data.Functor.Misc import Data.Maybe (fromJust, isJ...
jeffreyrosenbluth/reflex-semantics
src/Model.hs
Haskell
bsd-3-clause
2,270
-- | This simply re-exports some commonly-used modules. module Data.Thyme ( module Data.Thyme.Calendar , module Data.Thyme.Clock , module Data.Thyme.Format , module Data.Thyme.LocalTime ) where import Data.Thyme.Calendar import Data.Thyme.Clock import Data.Thyme.Format import Data.Thyme.LocalTime
liyang/thyme
src/Data/Thyme.hs
Haskell
bsd-3-clause
319
module Rumpus.Systems.Hands where import Rumpus.Systems.Controls import Rumpus.Systems.Physics import Rumpus.Systems.Collisions import Rumpus.Systems.Shared import Rumpus.Systems.Attachment import PreludeExtra import RumpusLib type HandEntityID = EntityID data HandsSystem = HandsSystem { _hndLeftHand :: HandEnti...
lukexi/rumpus
src/Rumpus/Systems/Hands.hs
Haskell
bsd-3-clause
4,703
; ; HSP help manager—p HELPƒ\[ƒXƒtƒ@ƒCƒ‹ ; (æ“ª‚ªu;v‚̍s‚̓Rƒƒ“ƒg‚Æ‚µ‚ďˆ—‚³‚ê‚Ü‚·) ; %type Šg’£–½—ß %ver 3.3 %note llmod3.hsp‚ðƒCƒ“ƒNƒ‹[ƒh‚·‚éB•K—v‚ɉž‚¶‚Äabout.hsp,msgdlg.hsp,multiopen.hsp,console.hsp,unicode.hsp,dragdrop.hsp,input.hsp‚ðƒCƒ“ƒNƒ‹[ƒh‚·‚é %date 2009/08/01 %author tom %dll llm...
zakki/openhsp
package/hsphelp/llmod3_stdio.hs
Haskell
bsd-3-clause
11,627
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} module System.IO.Streams.Network.HAProxy.Tests (tests) where ------------------------------------------------------------------------...
23Skidoo/io-streams-haproxy
test/System/IO/Streams/Network/HAProxy/Tests.hs
Haskell
bsd-3-clause
25,160
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module GTFS.Realtime.Internal.Com.Google.Transit.Realtime.TripDescriptor.ScheduleRelationship (ScheduleRelationship(..)) where import Prelude ((+), ...
romanofski/gtfsbrisbane
src/GTFS/Realtime/Internal/Com/Google/Transit/Realtime/TripDescriptor/ScheduleRelationship.hs
Haskell
bsd-3-clause
3,453
{-# LANGUAGE DeriveGeneric, DeriveAnyClass #-} module Data where import Flat ggg = encode (Uno,Due,Tre) {- (One Two) Three (Four Five) Four = 110 = 6 -} data Numero = Uno | Due | Tre | Quattro deriving (Eq,Show,Generic,Flat) -- chkSize 9 >> unsafeEnc 1 >> -- chkSize 3 >> Bit8...
tittoassini/flat
benchmarks/Data.hs
Haskell
bsd-3-clause
524
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RecordWildCards, FlexibleInstances, DefaultSignatures #-} ------------------------------------------------------------------------------ -- | -- Module: Database.PostgreSQL.Simple.FromRow -- Copyright: (c) 2012 Leon P Smith -- License: BSD3 -- Maintainer: Leo...
timmytofu/postgresql-simple
src/Database/PostgreSQL/Simple/FromRow.hs
Haskell
bsd-3-clause
10,591
-- | Select the specific media header from the 'HandlerType' module Data.ByteString.IsoBaseFileFormat.Boxes.SpecificMediaHeader where -- -- import Data.ByteString.IsoBaseFileFormat.Boxes.VideoMediaHeader import Data.ByteString.IsoBaseFileFormat.Boxes.Handler -- -- | An open type family to select the specific media he...
sheyll/isobmff-builder
src/Data/ByteString/IsoBaseFileFormat/Boxes/SpecificMediaHeader.hs
Haskell
bsd-3-clause
397
----------------------------------------------------------------------------- -- | -- Module : Examples.CRC.USB5 -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- The USB5 CRC implementation -------------------------------------------...
Copilot-Language/sbv-for-copilot
SBVUnitTest/Examples/CRC/USB5.hs
Haskell
bsd-3-clause
1,586
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings...
yesodweb/persistent
persistent-mysql/test/JSONTest.hs
Haskell
mit
1,137
-- -- -- ----------------- -- Exercise 7.27. ----------------- -- -- -- module E'7'27 where import Prelude hiding ( getLine ) -- Subchapter 7.6 (relevant definitions of it): type Word = String type Line = [Word] getLine :: Int -> [Word] -> Line -- Use "import Prelude hiding (getLine)" to avoid an ambiguous oc...
pascal-knodel/haskell-craft
_/links/E'7'27.hs
Haskell
mit
1,815
{-# LANGUAGE BangPatterns #-} {-# OPTIONS_HADDOCK hide, prune #-} -- | -- Module : Data.ByteString.Search.Internal.BoyerMoore -- Copyright : Daniel Fischer -- Chris Kuklewicz -- Licence : BSD3 -- Maintainer : Daniel Fischer <daniel.is.fischer@googlemail.com> -- Stability : ...
seereason/stringsearch
Data/ByteString/Search/Internal/BoyerMoore.hs
Haskell
bsd-3-clause
22,290
{-# LANGUAGE DataKinds, TypeOperators, OverloadedStrings #-} module CoinBias20 where import Prelude (print, length, IO) import Language.Hakaru.Syntax.Prelude import Language.Hakaru.Disintegrate import Language.Hakaru.Syntax.ABT import Language.Hakaru.Syntax.AST import Language.Hakaru.Types.DataKind import Language.Ha...
zaxtax/hakaru
haskell/Tests/Unroll/CoinBias20.hs
Haskell
bsd-3-clause
3,050
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ViewPatterns #-} {-# OPTIONS -f...
GaloisInc/halvm-ghc
ghc/GHCi/UI.hs
Haskell
bsd-3-clause
141,934
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE RecordWildCards #-} module Tinc.RecentCheck ( isRecent , markRecent , tincEnvCreationTime ) where import Data.Maybe import Data.Time import System.Directory import System.FilePath import Tinc.Facts import Tinc.Nix i...
haskell-tinc/tinc
src/Tinc/RecentCheck.hs
Haskell
bsd-3-clause
1,741
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Haddock -- Copyright : Isaac Jones 2003-2005 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This module deals with the @haddock@ and @hscolour...
corngood/cabal
Cabal/Distribution/Simple/Haddock.hs
Haskell
bsd-3-clause
32,693
{-# LANGUAGE CPP, MagicHash, UnboxedTuples #-} -- | -- Module : Data.Text.Unsafe -- Copyright : (c) 2009, 2010, 2011 Bryan O'Sullivan -- License : BSD-style -- Maintainer : bos@serpentine.com, rtomharper@googlemail.com, -- duncan@haskell.org -- Stability : experimental -- Portability : porta...
ssaavedra/liquidhaskell
benchmarks/text-0.11.2.3/Data/Text/Unsafe.hs
Haskell
bsd-3-clause
6,469
a = b b = a main :: IO () main = return ()
hvr/jhc
regress/tests/0_parse/2_pass/Recursive2.hs
Haskell
mit
45
{-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Util.Replace -- Copyright : (c) Jan Vornberger 2009 -- License : BSD3-style (see LICENSE) -- -- Maintainer : Adam Vogt <vogt.adam@gmail.com> -- Stability : unstabl...
markus1189/xmonad-contrib-710
XMonad/Util/Replace.hs
Haskell
bsd-3-clause
4,020
{-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | An abstraction for re-running actions if values or files have changed. -- -- This is not a full-blown make-style incremental build system, it's a bit -- more ad-hoc than that, but it's easier to integrate with existing code. -- -- It's a convenient interface to the "Dis...
mydaum/cabal
cabal-install/Distribution/Client/RebuildMonad.hs
Haskell
bsd-3-clause
8,448
{-# OPTIONS_GHC -fprof-auto #-} module B where plus_noinline :: Integer -> Integer -> Integer plus_noinline x y = x + y {-# NOINLINE plus_noinline #-} -- | This is the key function. We do not want this to be inlined into bar, but -- we DO want it to be inlined into main (in A.hs). Moreover, when it is inlined -- into...
ezyang/ghc
testsuite/tests/profiling/should_compile/T5889/B.hs
Haskell
bsd-3-clause
2,438
module Q where q = "I AM THE ONE"
mydaum/cabal
cabal-testsuite/PackageTests/InternalLibraries/p/q/Q.hs
Haskell
bsd-3-clause
34
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeOperators #-} {- Exercising avoidance of known landmines. We need one each of PostTc id Kind PostTc id Type PostRn id Fixity PostRn id NameSet -} module MineType where foo = undefined
urbanslug/ghc
testsuite/tests/ghc-api/landmines/MineType.hs
Haskell
bsd-3-clause
298
{-# OPTIONS -XRecursiveDo -XScopedTypeVariables #-} module Main(main) where import Control.Monad.Fix import Data.Array.IO import Control.Monad norm a = mdo (_, sz) <- getBounds a s <- ioaA 1 s sz 0 return () where ioaA i s sz acc | i > sz = return acc | True = do v <- readArray a i ...
siddhanathan/ghc
testsuite/tests/mdo/should_run/mdorun001.hs
Haskell
bsd-3-clause
740
{-# LANGUAGE NoMonomorphismRestriction #-} module Plugins.Gallery.Gallery.Manual17 where import Diagrams.Prelude example = position (zip (map mkPoint [-3, -2.8 .. 3]) (repeat dot)) where dot = circle 0.2 # fc black mkPoint x = p2 (x,x^2)
andrey013/pluginstest
Plugins/Gallery/Gallery/Manual17.hs
Haskell
mit
266
import Test.HUnit foo x = x --test1 = TestCase (assertEqual "for (foo 3)," (1,2) (foo 3)) return' a = a >> a
RAFIRAF/HASKELL
test.hs
Haskell
mit
113
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeSynonymInstances #-} module IHaskell.Display.Widgets.Selection.RadioButtons ( -- * The RadioButtons Widget RadioButtons, -- * Constructor mkRadioButtons) where -- To keep `cab...
sumitsahrawat/IHaskell
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Selection/RadioButtons.hs
Haskell
mit
2,234
module Rebase.Data.ByteString.Builder.Scientific ( module Data.ByteString.Builder.Scientific ) where import Data.ByteString.Builder.Scientific
nikita-volkov/rebase
library/Rebase/Data/ByteString/Builder/Scientific.hs
Haskell
mit
146
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.SVGFETileElement (getIn1, SVGFETileElement(..), gTypeSVGFETileElement) where import Prelude ((.), (==), (>>=), re...
ghcjs/jsaddle-dom
src/JSDOM/Generated/SVGFETileElement.hs
Haskell
mit
1,275
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE DeriveDataTypeable #-} module SharedTypes where import Prelude import Data.Data import Fay.Yesod import Data.Text (Text) data Command = AModel (Text) (Returns [(Text, Int)]) | AAge (Text) (Returns [(Text, Int)]) | AGen (Text,Text) (Returns ...
swamp-agr/carbuyer-advisor
fay-shared/SharedTypes.hs
Haskell
mit
1,423
module Hoton.VectorSpec (spec) where import Test.Hspec import Test.QuickCheck import Control.Exception import Hoton.TestUtils import Hoton.Types import Hoton.Vector t2cart (x1,x2,x3) = Cartesian x1 x2 x3 spec :: Spec spec = do describe "Hoton.Vector.scalar" $ do it "returns 0 for perpendicular vectors"...
woufrous/hoton
test/Hoton/VectorSpec.hs
Haskell
mit
2,294
main = print(sum [x | x <- [1..1000], mod x 3 == 0 || mod x 5 == 0])
mhseiden/euler-haskell
src/p1.hs
Haskell
mit
70
-- | -- The 'FP15.Compiler.Syntax' module contains FP15-specific parsing logic for -- syntactic sugars. module FP15.Compiler.Syntax ( module FP15.Compiler.Syntax.SmartSplit , module FP15.Compiler.Syntax.Precedence , module FP15.Compiler.Syntax.CommaNotation ) where import FP15.Compiler.Syntax.SmartSplit import FP15.C...
Ming-Tang/FP15
src/FP15/Compiler/Syntax.hs
Haskell
mit
451
-- | Canon representation of linear program module Numeric.Limp.Canon.Program where import Numeric.Limp.Canon.Linear import Numeric.Limp.Canon.Constraint import Numeric.Limp.Rep import Data.Map (Map) import qualified Data.Map as M import Data.Set (Set) import qualified Data.Set as S -- | A program represented by obj...
amosr/limp
src/Numeric/Limp/Canon/Program.hs
Haskell
mit
1,843
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeFamilies #-} {- |Implementation of a connection using WebSockets. -} module WsConnection (WsConnection(..)) where import App.ConnectionMgnt import ClassyPrelude import qualified Data.Aeson as Aeson import qualified Network.WebSockets...
Haskell-Praxis/core-catcher
app/WsConnection.hs
Haskell
mit
731
{-# LANGUAGE DeriveDataTypeable #-} module Template.Module ( moduleXml, configXml ) where import Template (render) import Data.Data (Data, Typeable) data ModuleTemplate = ModuleTemplate { codepool :: String, fullModuleName :: String } deriving (Data, Typeable) moduleXml :: String -> String -> IO Str...
prasmussen/magmod
Template/Module.hs
Haskell
mit
559
import SudokuGen import SudokuSorted import SudokuHelper main = do puzzle <- sudokuGen putStrLn (pretty $ puzzle) putStrLn (pretty $ solveStr puzzle)
ztuowen/sudoku
sgen.hs
Haskell
mit
163
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-attributedef.html module Stratosphere.ResourceProperties.DynamoDBTableAttributeDefinition where imp...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/DynamoDBTableAttributeDefinition.hs
Haskell
mit
2,339
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html module Stratosphere.Resources.BatchJobDefinition where import Stratosphere.ResourceIm...
frontrowed/stratosphere
library-gen/Stratosphere/Resources/BatchJobDefinition.hs
Haskell
mit
4,874
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ssm-maintenancewindowtask-maintenancewindowlambdaparameters.html module Stratosphere.ResourceProperties.SSMMa...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/SSMMaintenanceWindowTaskMaintenanceWindowLambdaParameters.hs
Haskell
mit
3,719
-- Top-level functions: -- * reading/writing morphology databases -- * writing Lexicon, Tables, GF, XFST, Latex -- * analysis/synthesis (Trie) module GeneralIO where import Print import General import Dictionary import Trie import IO import Map import Frontend import List (nub) import Maybe(fromJust) import ErrM t...
icemorph/icemorph
bin/FM/lib/GeneralIO.hs
Haskell
cc0-1.0
6,102
module Transputer ( Op(..), Transputer(..), Registers(..), StatusRegisters(..) ) where import Data.ByteString import Data.Int ( Int32 ) import Control.Lens data Op = Prefix | NegativePrefix | Operate | LoadConstant | LoadLocal | StoreLocal | LoadLocalPointer | A...
rossng/transputer-simulator
src/Transputer.hs
Haskell
apache-2.0
3,595
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="ru-RU"> <title>Code Dx | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref loca...
secdec/zap-extensions
addOns/codedx/src/main/javahelp/org/zaproxy/zap/extension/codedx/resources/help_ru_RU/helpset_ru_RU.hs
Haskell
apache-2.0
968
module Distribution.Sandbox.Utils where import System.Directory (doesFileExist) import System.FilePath ((</>)) import Data.Maybe (mapMaybe, listToMaybe) import Codex.Internal findSandbox :: FilePath -> IO (Maybe FilePath) findSandbox prjDir = do fileExists <- doesFileExist configFile if fileExists then readSandb...
aloiscochard/codex
src/Distribution/Sandbox/Utils.hs
Haskell
apache-2.0
1,245
{-# LANGUAGE RecordWildCards #-} module NLP.FeatureStructure.Reid ( -- * Pure operations reidGraph -- * Reid monad , ReidT , Reid , runReidT , runReid -- * Primitives , reid , reidGraphM , split ) where import Control.Applicative ((<$>), (<*>)) import qualified Control.Monad.State.Strict as S import ...
kawu/feature-structure
src/NLP/FeatureStructure/Reid.hs
Haskell
bsd-2-clause
2,414
module FractalFlame.Flam3.Types.Xform where import FractalFlame.Types.Base import FractalFlame.Types.LinearParams import FractalFlame.Variation.Types.Variation import FractalFlame.Variation.Types.VParams -- | Basic unit sampled by Iterated Function System. Corresponds to an xform element in a flam3 file. data Xform ...
anthezium/fractal_flame_renderer_haskell
FractalFlame/Flam3/Types/Xform.hs
Haskell
bsd-2-clause
817
{-# LANGUAGE TemplateHaskell #-} module Database.Relational.Schema.Oracle ( normalizeColumn, notNull, getType , columnsQuerySQL, primaryKeyQuerySQL ) where import Control.Applicative ((<|>), (<$>)) import Data.ByteString (ByteString) import Data.Char (toLower) import Data.Map (Map) import qualified Data.M...
amutake/haskell-relational-record-driver-oracle
src/Database/Relational/Schema/Oracle.hs
Haskell
bsd-3-clause
4,619
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE PolyKinds #-} {-# OPTIONS_HADDOCK not-home #-} module Servant.API.Header ( Header(..), ) where import Data.ByteString (ByteString) import Data.Typeable (Typeable)...
zerobuzz/servant
servant/src/Servant/API/Header.hs
Haskell
bsd-3-clause
913
import Criterion.Main import qualified Data.Conduit as C import qualified Data.Conduit.List as CL import qualified Data.Conduit.Binary as CB import Control.Pipe.Binary import Control.Pipe.Combinators import Control.Pipe testFile :: FilePath testFile = "bench/general.hs" main :: IO () main = defaultMain [ bench "...
pcapriotti/pipes-extra
bench/general.hs
Haskell
bsd-3-clause
946
module MiniMarkdown where {-# LANGUAGE NoMonomorphismRestriction #-} import Text.ParserCombinators.Parsec (Parser) import Text.Parsec import Control.Applicative (pure, liftA2, (*>),(<*),(<*>),(<$>)) import Data.List (intersperse) import Debug.Trace data Token = Head (Int, String) | Par [Token] ...
greole/calendula
MiniMarkdown.hs
Haskell
bsd-3-clause
6,218
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module RazorsLambda.Interactive where import Control.Monad import Control.Monad.Free import Control.Monad.Free.TH import qualified Data.Map as Map import Data...
acfoltzer/RazorsLambda
src/RazorsLambda/Interactive.hs
Haskell
bsd-3-clause
2,642
module Bindings.GObject ( module Bindings.GObject.BaseObjectType, module Bindings.GObject.BoxedTypes, module Bindings.GObject.Closures, module Bindings.GObject.EnumerationAndFlagTypes, module Bindings.GObject.GenericValues, module Bindings.GObject.GParamSpec, module Bindings.GObject.GTypeModule, ...
Yuras/bindings-gobject
src/Bindings/GObject.hs
Haskell
bsd-3-clause
1,054
module GHCApi where import Control.Monad import CoreMonad import DynFlags import ErrMsg import Exception import GHC import GHC.Paths (libdir) import Types ---------------------------------------------------------------- withGHC :: (MonadPlus m) => Ghc (m a) -> IO (m a) withGHC body = ghandle ignore $ runGhc (Just li...
himura/ghc-mod
GHCApi.hs
Haskell
bsd-3-clause
1,760
{-# LANGUAGE TypeFamilies #-} ----------------------------------------------------------------------------- -- | -- Module : Geometry.ThreeD.Combinators -- Copyright : (c) 2013-2017 diagrams team (see LICENSE) -- License : BSD-style (see LICENSE) -- Maintainer : diagrams-discuss@googlegroups.com -- -- ...
cchalmers/geometry
src/Geometry/ThreeD/Combinators.hs
Haskell
bsd-3-clause
4,587
{-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Main (main) where import Control.Concurrent --import Codec.Text.Detect (detectEncodingName) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as L imp...
jystic/language-csharp
src/Main.hs
Haskell
bsd-3-clause
4,467
-- | This module provides the type and the rules for building the computation graph. -- Refinement and evaluation steps depend on the (abstract) semantics. -- Strategies for finding instances are should be implemented here. module Jat.CompGraph ( MkJGraph , JGraph , mkJGraph , mkJGraph2Dot , mkJGraph2TRS...
ComputationWithBoundedResources/jat
src/Jat/CompGraph.hs
Haskell
bsd-3-clause
13,058
{-# LANGUAGE FlexibleContexts, DeriveDataTypeable #-} module Aws.Xml where import Aws.Response import Control.Monad.IO.Class import Data.Attempt (Attempt(..)) import Data.Conduit (($$)) import Data.IORef import Data.Monoid impo...
jgm/aws
Aws/Xml.hs
Haskell
bsd-3-clause
2,110
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE CPP #-} module VC.Tree where import Filesystem.Path (basename) import Shelly import Control.Monad.Extra import Prelude hiding (FilePath) #if __GLASGOW_HASKELL__ < 710 import Data.Traversable #endif ch...
bergey/vcatt
src/VC/Tree.hs
Haskell
bsd-3-clause
1,941
module Muster.Internal.Charset ( Charset(..) , none , any , elem , notElem , insert , remove , intersect , oneOf ) where import Prelude hiding (any, elem, notElem) import qualified Data.List as L import Data.Maybe import Test.QuickCheck data Charset = AnyOf String | NoneOf String ...
DasIch/haskell-muster
src/Muster/Internal/Charset.hs
Haskell
bsd-3-clause
2,025
module Container.Tree.PersistentCont where import Annotation.Persistent (P) import Control.Applicative import Data.Binary import Data.Maybe import Generics.Cont import Generics.Regular.Base () import Generics.Fixpoint import Heap.Heap hiding (size) import Prelude hiding (lookup, null) import qualified Container.Tree.A...
sebastiaanvisser/islay
src/Container/Tree/PersistentCont.hs
Haskell
bsd-3-clause
1,988
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE RankNTypes #-} module LazyCrossCheck.Utils where import Data.Data import LazyCrossCheck.Primitives getConstructors :: forall a . Data a => Proxy a -> [Constr] getConstructors _ = dataTypeConstrs $ dataTypeOf (undefined :: a) ...
TristanAllwood/lazyCrossCheck
LazyCrossCheck/Utils.hs
Haskell
bsd-3-clause
606
import CCO.ArithBool (eval) import CCO.Component (component, printer, ioWrap) import CCO.Tree (parser, Tree (fromTree, toTree)) import Control.Arrow (Arrow (arr), (>>>)) main = ioWrap $ parser >>> component toTree >>> component eval >>> arr fromTree >>> printer
UU-ComputerScience/uu-cco
uu-cco-examples/src/EvalArithBool.hs
Haskell
bsd-3-clause
273
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} module SSH.Session where import Control.Concurrent.Chan import Control.Monad.IO.Class import Control.Monad.Trans.State import Data.Binary (decode, encode) import Data.Word import System.IO import qualified Codec.Crypto.SimpleAES as A import qualified Data.ByteSt...
teh/teh-ssh
src/SSH/Session.hs
Haskell
bsd-3-clause
5,603
----------------------------------------------------------------------------- -- | -- Module : Data.Yaml.YamlLight -- Copyright : Michael Ilseman (c) 2010 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : michael <dot> ilseman <at> gmail <dot> com -- Stability : provisional -- Portabil...
ilseman2/yaml-light
Data/Yaml/YamlLight.hs
Haskell
bsd-3-clause
9,759