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
module Arp (doArp, main) where import Control.Concurrent import qualified Data.Map as Map import Data.ByteString.Lazy (ByteString) import Data.Word import Frenetic.NetCore import Frenetic.NetworkFrames (arpReply) import MacLearning (learningSwitch) import System.Log.Logger type IpMap = Map.Map IPAddress EthernetAddre...
frenetic-lang/netcore-1.0
examples/Arp.hs
Haskell
bsd-3-clause
7,162
{-# LANGUAGE GADTs, DataKinds, TypeFamilies #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell#-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} module QueryAlgebras where import Types import Control.Error import Control.Monad.Free import Data.Singletons.TH data VFCrudable = User...
martyall/freeapi
src/QueryAlgebras.hs
Haskell
bsd-3-clause
5,384
-- The @FamInst@ type: family instance heads {-# LANGUAGE CPP, GADTs #-} module FamInst ( FamInstEnvs, tcGetFamInstEnvs, checkFamInstConsistency, tcExtendLocalFamInstEnv, tcLookupFamInst, tcLookupDataFamInst, tcLookupDataFamInst_maybe, tcInstNewTyCon_maybe, tcTopNormaliseNewTyp...
urbanslug/ghc
compiler/typecheck/FamInst.hs
Haskell
bsd-3-clause
16,229
module Main(main) where import System.Environment import System.IO import CCodeGen import Lexer import Parser import Program main :: IO () main = do (fileName:rest) <- getArgs fileHandle <- openFile fileName ReadMode programText <- hGetContents fileHandle putStrLn programText let compiledProg = compile pro...
dillonhuff/IntLang
src/Main.hs
Haskell
bsd-3-clause
654
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilyDependencies #-} module Data.Diverse.WhichSpe...
louispan/data-diverse
test/Data/Diverse/WhichSpec.hs
Haskell
bsd-3-clause
13,143
{-# LANGUAGE MultiParamTypeClasses , DefaultSignatures , FlexibleInstances , TypeSynonymInstances , OverlappingInstances #-} -- |Used as the context for diagrams-ghci module MyPrelude () where import Prelude import Data.List (intersperse) import Data.Ratio import Diagrams.Prelude import Diagrams.Back...
mgsloan/diagrams-ghci
MyPrelude.hs
Haskell
bsd-3-clause
2,872
import System.Nemesis import System.Nemesis.Utils ((-)) import Prelude hiding ((-)) main = run - do -- desc is optional, it gives some description to the task -- task syntax: task "keyword: space seperated dependencies" io-action desc "Hunter attack macro" task "attack: pet-attack auto-attack" (putStrLn "atta...
nfjinjing/nemesis
test/N2.hs
Haskell
bsd-3-clause
574
----------------------------------------------------------------------------- -- | -- Module : Data.FMList -- Copyright : (c) Sjoerd Visscher 2009 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : sjoerd@w3future.com -- Stability : experimental -- Portability : portable -- -- FoldMap ...
sjoerdvisscher/fmlist
Data/FMList.hs
Haskell
bsd-3-clause
11,902
{-# OPTIONS_GHC -fno-warn-orphans #-} module Test.Pos.Cbor.Arbitrary.UserSecret ( ) where import Universum import Test.QuickCheck (Arbitrary (..)) import Test.QuickCheck.Arbitrary.Generic (genericArbitrary, genericShrink) import Pos.Util.Use...
input-output-hk/cardano-sl
lib/test/Test/Pos/Cbor/Arbitrary/UserSecret.hs
Haskell
apache-2.0
633
{-# OPTIONS -#include "comPrim.h" #-} -- Automatically generated by HaskellDirect (ihc.exe), version 0.20 -- Created: 20:11 Pacific Standard Time, Tuesday 16 December, 2003 -- Command line: -fno-qualified-names -fno-imports -fno-export-lists -fout-pointers-are-not-refs -c ComPrim.idl -o ComPrim.hs module ComPrim ...
sof/hdirect
comlib/ComPrim.hs
Haskell
bsd-3-clause
23,964
{-# LANGUAGE OverloadedStrings #-} -- | Home/landing page. module HL.View.Home where import HL.View import HL.View.Code import HL.View.Home.Features import HL.View.Template -- | Home view. homeV :: [(Text, Text, Text)] -> FromLucid App homeV vids = skeleton "Haskell Language" (\_ _ -> linkcss "http...
josefs/hl
src/HL/View/Home.hs
Haskell
bsd-3-clause
7,563
-- | -- Module : Data.ASN1.Types -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE BangPatterns #-} module Data.ASN1.Types ( -- * Raw types ASN1Class(..) , ASN1...
mboes/hs-asn1
data/Data/ASN1/Types.hs
Haskell
bsd-3-clause
2,624
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP #-} module VarSet ( -- * Var, Id and TyVar set types VarSet, IdSet, TyVarSet, CoVarSet, TyCoVarSet, -- ** Manipulating these sets emptyVarSet, unitVarSet, mkVarSet, ...
oldmanmike/ghc
compiler/basicTypes/VarSet.hs
Haskell
bsd-3-clause
9,744
module Turbinado.Database.ORM.Types where import qualified Data.Map as M import Database.HDBC type TypeName = String -- -- * Types for the Table descriptions -- type Tables = M.Map TableName (Columns, PrimaryKey) type TableName = String type Columns = M.Map ColumnName ColumnDesc type ColumnName = String type Primary...
alsonkemp/turbinado-website
Turbinado/Database/ORM/Types.hs
Haskell
bsd-3-clause
532
{-# OPTIONS -fglasgow-exts #-} module BinaryDerive where import Data.Generics import Data.List deriveM :: (Typeable a, Data a) => a -> IO () deriveM (a :: a) = mapM_ putStrLn . lines $ derive (undefined :: a) derive :: (Typeable a, Data a) => a -> String derive x = "instance " ++ context ++ "Binary " ++ inst ...
beni55/binary
tools/derive/BinaryDerive.hs
Haskell
bsd-3-clause
2,264
<?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="it-IT"> <title>Alert Filters | ZAP Extension</title> <maps> <homeID>top</homeID> <mapre...
kingthorin/zap-extensions
addOns/alertFilters/src/main/javahelp/org/zaproxy/zap/extension/alertFilters/resources/help_it_IT/helpset_it_IT.hs
Haskell
apache-2.0
974
{-# LANGUAGE CPP, GADTs #-} ----------------------------------------------------------------------------- -- -- Generating machine code (instruction selection) -- -- (c) The University of Glasgow 1996-2004 -- ----------------------------------------------------------------------------- -- This is a big module, but, i...
oldmanmike/ghc
compiler/nativeGen/PPC/CodeGen.hs
Haskell
bsd-3-clause
73,920
module Compose where {-@ cmp :: forall < p :: b -> c -> Prop , q :: a -> b -> Prop , r :: a -> c -> Prop >. {x::a, w::b<q x> |- c<p w> <: c<r x>} f:(y:b -> c<p y>) -> g:(z:a -> b<q z>) -> x:a -> c<r x> @-} cmp :: (b -> c) -> (a -> b) -> a -> c...
mightymoose/liquidhaskell
benchmarks/icfp15/neg/Composition.hs
Haskell
bsd-3-clause
1,474
{-# LANGUAGE TypeFamilies, PatternGuards, CPP #-} module Yesod.Core.Internal.LiteApp where #if __GLASGOW_HASKELL__ < 710 import Data.Monoid #endif import Yesod.Routes.Class import Yesod.Core.Class.Yesod import Yesod.Core.Class.Dispatch import Yesod.Core.Types import Yesod.Core.Content import Data.Text (Text) import We...
MaxGabriel/yesod
yesod-core/Yesod/Core/Internal/LiteApp.hs
Haskell
mit
2,542
{-| Ganeti logging functions expressed using MonadBase This allows to use logging functions without having instances for all possible transformers. -} {- Copyright (C) 2014 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that ...
apyrgio/ganeti
src/Ganeti/Logging/Lifted.hs
Haskell
bsd-2-clause
2,867
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Bool -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer :...
beni55/haste-compiler
libraries/ghc-7.8/base/Data/Bool.hs
Haskell
bsd-3-clause
919
module D where data T = A Int | B Float deriving Eq f x = x + 1
urbanslug/ghc
testsuite/tests/ghci/prog001/D2.hs
Haskell
bsd-3-clause
66
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.EXTBlendMinMax (pattern MIN_EXT, pattern MAX_EXT, EXTBlendMinMax(..), gTypeEXTBlendMinMax) where i...
ghcjs/jsaddle-dom
src/JSDOM/Generated/EXTBlendMinMax.hs
Haskell
mit
1,104
-- 1. It’s not a typo, we’re just being cute with the name. data TisAnInteger = TisAn Integer instance Eq TisAnInteger where (==) (TisAn a) (TisAn b) = a == b --2. data TwoIntegers = Two Integer Integer instance Eq TwoIntegers where (==) (Two a b) (Two a' b') = a == a' && b == b' -- 3. data StringOrInt = TisAnI...
diminishedprime/.org
reading-list/haskell_programming_from_first_principles/06_12.hs
Haskell
mit
1,184
main = putStrLn . show. sum $ [ x | x <- [1..999], (x `mod` 3) == 0 || (x `mod` 5) == 0]
clementlee/projecteuler-haskell
p1.hs
Haskell
mit
89
module Graphics.Layouts ( fixedLayout, borderLayout, AnchorConstraint(..), anchorLayout, adaptativeLayout, ) where import Data.Maybe import Data.Tree import Data.Tree.Zipper import Graphics.Rendering.OpenGL import Graphics.View --------------------------------------------------------------------...
Chatanga/kage
src/Graphics/Layouts.hs
Haskell
mit
5,724
{-# LANGUAGE DeriveGeneric #-} module Handler.Account where import Import import Yesod.Auth.Simple (setPasswordR) import Util.Slug (mkSlug) import Util.User (newToken) import Util.Handler (title) import Util.Alert (successHtml) import qualified Model.Snippet.Api as SnippetApi import qualified Model.Run.Api as RunApi ...
vinnymac/glot-www
Handler/Account.hs
Haskell
mit
1,929
module Main where {- A Tic-Tac-Toe Board 012 345 678 -} import TTT.GameLogic as GL main :: IO () main = print $ GL.hasWon 012
tripattern/haskell
ticTacToe/src/Main.hs
Haskell
mit
138
{-| Module : Database.Orville.PostgreSQL.Internal.Select Copyright : Flipstone Technology Partners 2016-2018 License : MIT -} module Database.Orville.PostgreSQL.Internal.Select where import Control.Monad.Reader import qualified Data.List as List import Database.HDBC import Database.Orville.PostgreSQL.Internal.Ex...
flipstone/orville
orville-postgresql/src/Database/Orville/PostgreSQL/Internal/Select.hs
Haskell
mit
2,552
module Solar.Caster.Client where
Cordite-Studios/solar
solar-wind/Solar/Caster/Client.hs
Haskell
mit
33
module Exercise where money :: Int -> [[Int]] money 0 = [[]] money n = [(k:rest) | k <- [1,2,5,10,20,50], k <= n, rest <- (money (n - k)), k <= minimum (n:rest), -- ordering does not matter n == sum (k:rest) ]...
tcoenraad/functioneel-programmeren
2014/opg1b.hs
Haskell
mit
321
------------------------------------------------------------------------------ -- | -- Module : Hajong.Server.Config -- Copyright : (C) 2016 Samuli Thomasson -- License : %% (see the file LICENSE) -- Maintainer : Samuli Thomasson <samuli.thomasson@paivola.fi> -- Stability : experimental -- ...
SimSaladin/hajong
hajong-server/src/Hajong/Server/Config.hs
Haskell
mit
2,149
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {- hsCRD...
ssoudan/hsCRDT
src/CRDT.hs
Haskell
apache-2.0
1,946
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeFamilies #-} -- | Data types for K3 dataflow provenance module Language.K3.Analysis.Provenance.Core where import Control.DeepSeq import GHC.Generics (Generic) import Data.Binary import Data.Serializ...
DaMSL/K3
src/Language/K3/Analysis/Provenance/Core.hs
Haskell
apache-2.0
4,165
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QTextLayout.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:15 Warning : this file is machine generated - do n...
uduki/hsQt
Qtc/Gui/QTextLayout.hs
Haskell
bsd-2-clause
18,021
{-# OPTIONS_GHC -Wall -Werror #-} module IRTS.CLaSH.Show where import Core.CaseTree import Core.TT showSC :: SC -> String showSC (STerm t) = showTerm t showSC (Case n alts) = "Case " ++ show n ++ " of " ++ unlines (map showAlt alts) showSC sc = "showSC: " ++ show sc showAlt :: CaseAlt -> String showA...
christiaanb/Idris-dev
src/IRTS/CLaSH/Show.hs
Haskell
bsd-3-clause
2,225
{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} module Passman.Engine.Conversions where import Control.Error.Safe (assertErr) import Data.Bits (shift) import Data.Foldable (all) import Data.Semigroup ...
chwthewke/passman-hs
src/Passman/Engine/Conversions.hs
Haskell
bsd-3-clause
3,136
{-# LANGUAGE Rank2Types, TemplateHaskell, BangPatterns, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances, ScopedTypeVariables #-} ----------------------------------------------------------------------------- -- | -- Module : Numeric.AD.Mode.Reverse -- Copyright : (c) Edwar...
yairchu/ad
src/Numeric/AD/Mode/Reverse.hs
Haskell
bsd-3-clause
8,302
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP, DeriveDataTypeable, ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types] ...
gridaphobe/ghc
compiler/hsSyn/HsExpr.hs
Haskell
bsd-3-clause
84,578
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} module Data.Default.Aux (Default(..)) where import Data.Default import Foreign.Ptr (Ptr, FunPtr, IntPtr, WordPtr, nullPtr, nullFunPtr, ptrToIntPtr, ptrToWordPtr) import Data.Bits (Bits, zeroBits) instance Default (Ptr a) wh...
michaeljklein/CPlug
src/Data/Default/Aux.hs
Haskell
bsd-3-clause
588
module ParserTest where import Test.Hspec import qualified Parser as Parser testParser = hspec $ do describe "Parser" $ do it "1. consumes head of lexemes when head of lexemes is identical to lookahead" $ do Parser.match "sTag" ["sTag", "eTag"] `shouldBe` ["eTag"] it "2. consumes head...
chris-bacon/HTML-LaTeX-Compiler
tests/ParserTest.hs
Haskell
bsd-3-clause
496
{- Copyright (c) 2014-2015, Johan Nordlander, Jonas Duregård, Michał Pałka, Patrik Jansson and Josef Svenningsson All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Re...
josefs/autosar
oldARSim/AR.hs
Haskell
bsd-3-clause
10,018
module Signal.Wavelet.List2Test where import Test.HUnit (Assertion) import Signal.Wavelet.List2 import Signal.Wavelet.List.Common (inv) import Test.ArbitraryInstances (DwtInputList(..)) import Test.Data.Wavelet as DW import Test.Utils ((=~), (@=~?)) testDwt :: ([Double], [Double], [Doubl...
jstolarek/lattice-structure-hs
tests/Signal/Wavelet/List2Test.hs
Haskell
bsd-3-clause
779
-- | NLP.WordNet.Prims provides primitive operations over the word net database. -- The general scheme of things is to call 'initializeWordNet' to get a 'WordNetEnv'. -- Once you have this, you can start querying. A query usually looks like (suppose -- we want "Dog" as a Noun: -- -- 'getIndexString' on "Dog". This wi...
pikajude/WordNet-ghc74
NLP/WordNet/Prims.hs
Haskell
bsd-3-clause
13,742
module Main where import SDL hiding (Event) import SDL.Video.Renderer (Rectangle(..), drawRect, fillRect) import SDL.Vect (Point(..)) import qualified SDL.Event as SDLEvent import Linear (V4(..), V2(..)) import qualified Data.Set as Set import qualified Data.Map.Strict as Map import Data.Maybe (mapMaybe, fromMaybe)...
SPY/netwire-sandbox
app/Main.hs
Haskell
bsd-3-clause
3,669
{-# LANGUAGE OverloadedStrings, TupleSections, Arrows, RankNTypes, ScopedTypeVariables #-} module FRP.Yampa.Canvas.Virtual (reactimateVirtualSFinContext) where import FRP.Yampa import Data.Time.Clock import Data.IORef import Control.Concurrent.STM import Graphics.Blank hiding (Event) import qualified Graphics.Blank ...
ku-fpg/protocols
FRP/Yampa/Canvas/Virtual.hs
Haskell
bsd-3-clause
2,283
module Network.Orchid.Format.Xml (fXml) where import Text.XML.Light.Output import Data.FileStore (FileStore) import Network.Orchid.Core.Format import Text.Document.Document fXml :: WikiFormat fXml = WikiFormat "xml" "text/xml" xml xml :: FileStore -> FilePath -> FilePath -> String -> IO Output xml _ _ _ src = retur...
sebastiaanvisser/orchid
src/Network/Orchid/Format/Xml.hs
Haskell
bsd-3-clause
391
{-# OPTIONS_GHC -fno-warn-partial-type-signatures #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PartialTypeSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GADTs #-} module Haskell.Ide.Engine.BasePlugin where import Control.Monad import Data.Aeson impor...
JPMoresmau/haskell-ide-engine
src/Haskell/Ide/Engine/BasePlugin.hs
Haskell
bsd-3-clause
5,320
{-# LANGUAGE OverloadedStrings #-} module Main where import Route import Nix import Conf import Control.Monad.Error () import Control.Monad.IO.Class (liftIO) import Data.ByteString.Lazy.Char8 (pack) import Data.Default (def) import Data.List (isPrefixOf) import Network.HTTP.Types import Network.Wai import Network.Wa...
rickynils/nixrbd
Main.hs
Haskell
bsd-3-clause
2,169
{-# LANGUAGE GeneralizedNewtypeDeriving, StandaloneDeriving, DeriveDataTypeable #-} {-# OPTIONS_GHC -Wall -Werror -fno-warn-orphans -cpp #-} {- | Module : $Header$ Description : Working with Shrimp M4 abstract syntax. Copyright : (c) Galois, Inc. Working with Shrimp M4 abstract syntax. -} module SCD.M4.Util whe...
GaloisInc/sk-dev-platform
libs/SCD/src/SCD/M4/Util.hs
Haskell
bsd-3-clause
1,608
-- 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. ------------------...
rfranek/duckling
Duckling/Ranking/Classifiers/CS.hs
Haskell
bsd-3-clause
825
{-# LANGUAGE DeriveGeneric #-} module Day11 (part1, part2, test1, testStartState, part1Solution,part2Solution) where import Control.Arrow (second) import Data.Foldable import Data.Graph.AStar import Data.Hashable import qualified Data.HashSet as H import Data.Li...
z0isch/aoc2016
src/Day11.hs
Haskell
bsd-3-clause
5,992
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE PartialTypeSignatures #-} module Omniscient.Server.Core where import Control.Monad.Reader import Control.Monad.Logger import Control.Monad.Except import Database.Persist.Sql import Servant type Omn...
bheklilr/omniscient
src/Omniscient/Server/Core.hs
Haskell
bsd-3-clause
634
{- | Module : Main Description : Test the PuffyTools journal functions Copyright : 2014, Peter Harpending License : BSD3 Maintainer : Peter Harpending <pharpend2@gmail.com> Stability : experimental Portability : Linux -} module Main where import Data.Char import Data.List imp...
pharpend/puffytools
test/Test.hs
Haskell
bsd-3-clause
939
module Test.QuickCheck.Arbitrary ( -- * Arbitrary and CoArbitrary classes Arbitrary(..) , CoArbitrary(..) -- ** Helper functions for implementing arbitrary , arbitrarySizedIntegral -- :: Num a => Gen a , arbitraryBoundedIntegral -- :: (Bounded a, Integral a) => Gen a , arbitrarySizedBo...
AlexBaranosky/QuickCheck
Test/QuickCheck/Arbitrary.hs
Haskell
bsd-3-clause
16,724
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS -fno-warn-unused-imports #-} {-# OPTIONS -fno-warn-unused-binds #-} {-# OPTIONS_HADDOCK hide #-} -- | -- Module : Data.Array.Accelerate.Debug -- Copyright : [2008..2014] Manuel M T Chakravarty, Gabrie...
kumasento/accelerate
Data/Array/Accelerate/Debug.hs
Haskell
bsd-3-clause
10,874
{-# LANGUAGE GADTs, RecordWildCards, ScopedTypeVariables, FlexibleContexts, FlexibleInstances, DeriveDataTypeable, MultiParamTypeClasses, UndecidableInstances #-} -- | Declaration of exceptions types module YaLedger.Exceptions (throwP, InternalError (..), NoSuchRate (..), InsufficientFunds (..), ReconciliationE...
portnov/yaledger
YaLedger/Exceptions.hs
Haskell
bsd-3-clause
4,623
module Data.TrieMap.WordMap.Tests where import Data.TrieMap.WordMap () import Data.Word import qualified Data.TrieMap.TrieKey.Tests as TrieKeyTests import Test.QuickCheck tests :: Property tests = TrieKeyTests.tests "Data.TrieMap.WordMap" (0 :: Word)
lowasser/TrieMap
Data/TrieMap/WordMap/Tests.hs
Haskell
bsd-3-clause
254
{-# LANGUAGE CPP, DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : Language.Py.Token -- Copyright : (c) 2009 Bernie Pope -- License : BSD-style -- Maintainer : bjpop@csse.unimelb.edu.au -- Stability : experimental -- Portability : ghc --...
codeq/language-py
src/Language/Py/Token.hs
Haskell
bsd-3-clause
18,123
{-# OPTIONS_HADDOCK hide, prune #-} module Import.BootstrapUtil where import Import bootstrapSelectFieldList :: (Eq a, RenderMessage site FormMessage) => [(Text, a)] -> Field (HandlerT site IO) a bootstrapSelectFieldList opts = Field { fieldParse = parse , fieldView = viewF...
achirkin/qua-kit
apps/hs/qua-server/src/Import/BootstrapUtil.hs
Haskell
mit
1,325
<?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>Plug-n-Hack | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref...
veggiespam/zap-extensions
addOns/plugnhack/src/main/javahelp/org/zaproxy/zap/extension/plugnhack/resources/help_fr_FR/helpset_fr_FR.hs
Haskell
apache-2.0
978
<?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="tr-TR"> <title>SOAP Tarayıcısı | ZAP Uzantısı</title> <maps> <homeID>top</homeID> <map...
veggiespam/zap-extensions
addOns/soap/src/main/javahelp/org/zaproxy/zap/extension/soap/resources/help_tr_TR/helpset_tr_TR.hs
Haskell
apache-2.0
983
module Propellor.Property.OS ( cleanInstallOnce, Confirmation(..), preserveNetwork, preserveResolvConf, preserveRootSshAuthorized, oldOSRemoved, ) where import Propellor import qualified Propellor.Property.Debootstrap as Debootstrap import qualified Propellor.Property.Ssh as Ssh import qualified Propellor.Proper...
shosti/propellor
src/Propellor/Property/OS.hs
Haskell
bsd-2-clause
8,501
-- | -- Module : Data.Packer.Unsafe -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown -- -- Access to lower primitive that allow to use Packing and Unpacking, -- on mmap type of memory. Potentially unsafe, as it can't check if -- ...
erikd/hs-packer
Data/Packer/Unsafe.hs
Haskell
bsd-2-clause
2,120
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP , RankNTypes , MagicHash , UnboxedTuples , ScopedTypeVariables #-} {-# OPTIONS_GHC -Wno-deprecations #-} -- kludge for the Control.Concurrent.QSem, Control.Concurrent.QSemN -- and Control.Concurrent.SampleVar imports. --------...
rahulmutt/ghcvm
libraries/base/Control/Concurrent.hs
Haskell
bsd-3-clause
22,020
{-# LANGUAGE ForeignFunctionInterface, EmptyDataDecls, ScopedTypeVariables, DeriveDataTypeable, GADTs #-} module CommonFFI where import Prelude hiding (catch) import qualified Data.ByteString as S import qualified Data.ByteString.Unsafe as S import qualified Data.ByteString.Lazy as L import Foreign.Marshal.Utils impo...
diflying/logitext
CommonFFI.hs
Haskell
bsd-3-clause
2,463
-- Set up the data structures provided by 'Vectorise.Builtins'. module Vectorise.Builtins.Initialise ( -- * Initialisation initBuiltins, initBuiltinVars ) where import GhcPrelude import Vectorise.Builtins.Base import BasicTypes import TysPrim import DsMonad import TysWiredIn import DataCon import TyCon import C...
shlevy/ghc
compiler/vectorise/Vectorise/Builtins/Initialise.hs
Haskell
bsd-3-clause
10,351
{-# language OverloadedStrings #-} {-# language PackageImports #-} module Main where -------------------------------------------------------------------------------- -- Imports -------------------------------------------------------------------------------- import "base" System.Environment ( getArgs ) import "base" ...
ngzax/urbit
pkg/hs/terminal-progress-bar/test/test.hs
Haskell
mit
4,236
<?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>Интерфейсный сканер | Расширение ZAP </title> <maps> <homeID>top</homeID> ...
thc202/zap-extensions
addOns/frontendscanner/src/main/javahelp/org/zaproxy/zap/extension/frontendscanner/resources/help_ru_RU/helpset_ru_RU.hs
Haskell
apache-2.0
1,042
{- | The public face of Template Haskell For other documentation, refer to: <http://www.haskell.org/haskellwiki/Template_Haskell> -} module Language.Haskell.TH( -- * The monad and its operations Q, runQ, -- ** Administration: errors, locations and IO reportError, -...
AlexanderPankiv/ghc
libraries/template-haskell/Language/Haskell/TH.hs
Haskell
bsd-3-clause
5,474
<?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="id-ID"> <title>Kembali</title> <maps> <homeID>top</homeID> <mapref location="map.jhm"/>...
thc202/zap-extensions
addOns/revisit/src/main/javahelp/org/zaproxy/zap/extension/revisit/resources/help_id_ID/helpset_id_ID.hs
Haskell
apache-2.0
951
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE PatternGuards #-} import Test.Cabal.Workdir import Test.Cabal.Script import Test.Cabal.Server import Test.Cabal.Monad import Distribution.Verbosity (normal, verbose, Verbosity) import Distribution.Simple.Configure (getP...
mydaum/cabal
cabal-testsuite/main/cabal-tests.hs
Haskell
bsd-3-clause
12,985
{-# LANGUAGE CPP #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE NondecreasingIndentation #-} -- | A GHC run-server, which supports running multiple GHC scripts -- without having to restart from scratch. module Test.Cabal.Server ( Server, serverProcessId, ServerLogMsg(..), ServerLogMsgType(..), ...
mydaum/cabal
cabal-testsuite/Test/Cabal/Server.hs
Haskell
bsd-3-clause
17,705
{- Type name: qualified names for register types Part of Mackerel: a strawman device definition DSL for Barrelfish Copyright (c) 2011, ETH Zurich. All rights reserved. This file is distributed under the terms in the attached LICENSE file. If you do not find this file, copies can be found by writ...
daleooo/barrelfish
tools/mackerel/TypeName.hs
Haskell
mit
1,384
{- In order to test Hackage, we need to be able to send check for confirmation emails. In this module we provide a simple interface to do that. Currently we use mailinator, but the API is designed to be agnostic to the specific mail service used. -} module MailUtils ( Email(..) , testEmailAddress , ch...
ocharles/hackage-server
tests/MailUtils.hs
Haskell
bsd-3-clause
2,821
module GenUtils ( trace, assocMaybe, assocMaybeErr, arrElem, arrCond, memoise, Maybe(..), MaybeErr(..), mapMaybe, mapMaybeFail, maybeToBool, maybeToObj, maybeMap, joinMaybe, mkClosure, foldb, mapAccumL, ...
ezyang/ghc
testsuite/tests/programs/andy_cherry/GenUtils.hs
Haskell
bsd-3-clause
6,771
{-# LANGUAGE RecordWildCards #-} module T9436 where data T = T { x :: Int } f :: T -> Int f (T' { .. }) = x + 1
ezyang/ghc
testsuite/tests/rename/should_fail/T9436.hs
Haskell
bsd-3-clause
115
module WykopStream ( indexStream , module WykopTypes ) where import WykopTypes import WykopUtils indexStream :: Keys -> Maybe Int -> IO (Maybe [Entry]) indexStream k page = get k [] (mPageToGet page) "stream/index"
mikusp/hwykop
WykopStream.hs
Haskell
mit
231
{-# htermination minFM :: FiniteMap Int b -> Maybe Int #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_minFM_5.hs
Haskell
mit
76
module Problem6 where main :: IO () main = print $ squareSums [1..100] - sumSquares [1..100] squareSums :: Integral n => [n] -> n squareSums xs = (sum xs) ^ 2 sumSquares :: Integral n => [n] -> n sumSquares xs = sum $ map (^2) xs
DevJac/haskell-project-euler
src/Problem6.hs
Haskell
mit
236
module Robot ( Bearing(East,North,South,West) , bearing , coordinates , mkRobot , move ) where data Bearing = North | East | South | West deriving (Eq, Show) data Robot = Dummy bearing :: Robot -> Bearing bearing robot = error "You need to i...
exercism/xhaskell
exercises/practice/robot-simulator/src/Robot.hs
Haskell
mit
687
-- Экспортирование -- http://www.haskell.org/onlinereport/haskell2010/haskellch5.html#x11-1000005.2 module Chapter5.Section52 where -- exports → ( export1 , … , exportn [ , ] ) (n ≥ 0) -- -- export → qvar -- | qtycon [(..) | ( cname1 , … , cnamen )] (n ≥ 0) -- | qtycls [(..) | ( var1 , … , varn )] ...
mrLSD/HaskellTutorials
src/Chapter5/Section52.hs
Haskell
mit
539
{-# LANGUAGE RebindableSyntax, OverloadedStrings, CPP, TypeOperators #-} module Cochon.View where import Prelude hiding ((>>), return) import qualified Data.Foldable as Foldable import Data.Monoid import Data.String import Data.Text (Text) import qualified Data.Text as T import Data.Void import Lens.Family2 import ...
kwangkim/pigment
src-web/hs/Cochon/View.hs
Haskell
mit
5,329
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.SVGMaskElement (js_getMaskUnits, getMaskUnits, js_getMaskContentUnits, getMaskContentUnits, js_getX, getX, js_getY, getY, js_getWidth, getWidth, js_getHeight, getHeight, SVGMaskElement, ...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/SVGMaskElement.hs
Haskell
mit
3,686
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.Storage (key, key_, keyUnsafe, keyUnchecked, getItem, getItem_, getItemUnsafe, getItemUnchecked, setItem,...
ghcjs/jsaddle-dom
src/JSDOM/Generated/Storage.hs
Haskell
mit
4,607
{-# LANGUAGE LambdaCase #-} module Control.Monad.Evented where import Control.Monad.IO.Class import Control.Monad.Trans.Class newtype EventT m b = EventT { runEventT :: m (Either b (EventT m b)) } -------------------------------------------------------------------------------- -- Constructors ----...
schell/odin
src/Control/Monad/Evented.hs
Haskell
mit
2,453
{-# LANGUAGE Rank2Types, TypeFamilies #-} module TestInference where import Data.AEq import Numeric.Log import Control.Monad.Bayes.Class import Control.Monad.Bayes.Enumerator import Control.Monad.Bayes.Sampler import Control.Monad.Bayes.Population import Control.Monad.Bayes.Inference.SMC import Sprinkler sprin...
adscib/monad-bayes
test/TestInference.hs
Haskell
mit
1,082
-- | Reexports all @Manager@ utilities. module Control.TimeWarp.Manager ( module Control.TimeWarp.Manager.Job ) where import Control.TimeWarp.Manager.Job
serokell/time-warp
src/Control/TimeWarp/Manager.hs
Haskell
mit
180
{-# LANGUAGE OverloadedStrings #-} import Data.List import System.CPUTime notWhole :: Double -> Bool notWhole x = fromIntegral (round x) /= x cat :: Double -> Double -> Double cat l m | m < 0 = 3.1 | l == 0 = 3.1 | notWhole l = 3.1 | notWhole m = 3.1 | otherwise = read ...
dschalk/score3
analysis_A.hs
Haskell
mit
6,109
-------------------------------------------------------------------- -- File Name: xmonad.hs -- Purpose: Configure the Xmonad tiled window manager -- Creation Date: Sat Jul 07 07:13:31 CDT 2016 -- Last Modified: Sun Jan 22 17:21:02 CST 2017 -- Created By: Ivan Guerra <Ivan.E.Guerra-1@ou.edu> -----------------...
ivan-guerra/config_files
xmonad.hs
Haskell
mit
3,086
import System.IO import Data.List import Debug.Trace enumerate = zip [0..] discatenate :: [a] -> [[a]] discatenate xs = map (\a -> [a]) xs format :: (Int, Int) -> String format (i, n) = "Case #" ++ (show (i + 1)) ++ ": " ++ (show n) rsort :: (Ord a) => [a] -> [a] rsort = reverse . sort split :: [Int] -> Int -> [In...
davidrusu/Google-Code-Jam
2015/qualifiers/B/brute.hs
Haskell
mit
1,663
--matchTypes.hs module MatchTypes where import Data.List (sort) i :: Num a => a i = 1 f :: RealFrac a => a f = 1.0 freud :: Ord a => a -> a freud x = x freud' :: Int -> Int freud' x = x myX = 1 :: Int sigmund :: Int -> Int sigmund x = myX sigmund' :: Int -> Int sigmund' x = myX jung :: [Int] -> Int jung xs = ...
deciduously/Haskell-First-Principles-Exercises
2-Defining and combining/6-Typeclasses/code/matchTypes.hs
Haskell
mit
491
{-| Module : IREvaluator Description : EBNF IR evaluation Copyright : (c) chop-lang, 2015 License : MIT Maintainer : carterhinsley@gmail.com -} module IREvaluator ( PTerminal , PToken(..) , PAST , evaluate , createEvaluator ) where import Data.Text (Text(..)) import IRGenerator ( IRTerminal(..) ...
chop-lang/parsebnf
src/IREvaluator.hs
Haskell
mit
1,309
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} module Main where import Action import Control.Applicative import Control.Concurrent import Control.Lens import Control.Monad import Control.Monad.IO.Class import Control.Monad.State import ...
mplamann/magic-spieler
src/SnapServer.hs
Haskell
mit
14,387
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NoImplicitPrelude #-} module Rx.Disposable ( emptyDisposable , dispose , disposeCount , disposeErrorCount , newDisposable , ...
roman/Haskell-Reactive-Extensions
rx-disposable/src/Rx/Disposable.hs
Haskell
mit
7,151
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.AudioDestinationNode (js_getMaxChannelCount, getMaxChannelCount, AudioDestinationNode, castToAudioDestinationNode, gTypeAudioDestinationNode) where import Prelude ((.), (==), (>>=), return, I...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/AudioDestinationNode.hs
Haskell
mit
1,460
module Language.Binal.Util.TyKind where import Control.Monad.State import qualified Data.List as List import qualified Data.HashMap.Strict as HashMap import Language.Binal.Types import qualified Language.Binal.Util.Gen as Gen freeVariables :: TyKind -> [Variable] freeVariables (VarTy i) = [i] free...
pasberth/binal1
Language/Binal/Util/TyKind.hs
Haskell
mit
5,038
{-# LANGUAGE RecordWildCards #-} module Game.Graphics.Font ( FontText(..) , Font, loadFont , drawFontText ) where import Graphics.Rendering.FTGL import Game.Graphics.AffineTransform (AffineTransform, withTransformRasterGl) data FontText = FontText { getFont :: Font , getS...
caryoscelus/graphics
src/Game/Graphics/Font.hs
Haskell
mit
625
{-# LANGUAGE BangPatterns, ConstraintKinds, FlexibleContexts, GeneralizedNewtypeDeriving, MultiParamTypeClasses, StandaloneDeriving, TupleSections #-} {- | Module : Data.Graph.Unordered.Algorithms.Clustering Description : Graph partitioning Copyright : (c) Ivan Lazar Miljenovi...
ivan-m/unordered-graphs
src/Data/Graph/Unordered/Algorithms/Clustering.hs
Haskell
mit
8,702
-- | Exercises for chapter 3. module Chapter03 ( xs0, xs1, xs2, xs3, t0, t1, twice, palindrome, double, pair, swap, second ) where -- * Exercise 1 xs0 :: [Int] xs0 = [0, 1] -- Define the values below and give them types. -- | TODO: define as @['a','b','c']@ xs1 = undefined -- | TODO: define as @('a','b','c')@...
EindhovenHaskellMeetup/meetup
courses/programming-in-haskell/pih-exercises/src/Chapter03.hs
Haskell
mit
1,312