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 GeoLabel.Geometry.Polar (Polar(..)) where
import Prelude () -- Don't import anything from standard prelude
import Numeric.Units.Dimensional.Prelude
import GeoLabel.Real (R)
data Polar = Polar { r :: Length R,
theta :: Angle R,
phi :: Angle R } deriving Show
| wyager/GeoLabel | src/GeoLabel/Geometry/Polar.hs | Haskell | bsd-3-clause | 311 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import System.Environment (getArgs)
import qualified Funk.CLI as CLI
handleArgs :: [String] -> IO ()
handleArgs ["init"] = CLI.handleInit
handleArgs args@("status":"playing":_) = CLI.handlePlaying args
handleArgs _ = putStrLn "?"
main... | apa512/funk | src/Main.hs | Haskell | bsd-3-clause | 360 |
module Main where
import Data.Char (digitToInt)
highesNumber = 999999
isCoolNumber :: Int -> Bool
isCoolNumber n = n == (sum $ map (\x -> (digitToInt x)^5) $ show n)
main = print $ sum $ filter isCoolNumber [2..highesNumber]
| stulli/projectEuler | eu30.hs | Haskell | bsd-3-clause | 229 |
module GivenTypeWriteFunction where
co :: (b -> c) -> (a -> b) -> a -> c
co bToC aToB a = bToC (aToB a)
a :: (a -> c) -> a -> a
a aToC a = a
a' :: (a -> b) -> a -> b
a' aToB a = aToB a
| renevp/hello-haskell | src/givenTypeWriteFunction.hs | Haskell | bsd-3-clause | 188 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
#include "kinds.h"
#ifdef DataPolyKinds
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
#endif
#ifdef SafeHaskell
{-# LANGUAGE Safe #-}
#endif
module Type.Semigroup
( (:<>)
)
where
--------------------------------------... | duairc/symbols | types/src/Type/Semigroup.hs | Haskell | bsd-3-clause | 2,489 |
module Cloud.AWS.RDS.Types.Tag
( Tag(..)
) where
import Data.Text (Text)
data Tag = Tag
{ tagValue :: Text
, tagKey :: Text
}
deriving (Show, Eq)
| worksap-ate/aws-sdk | Cloud/AWS/RDS/Types/Tag.hs | Haskell | bsd-3-clause | 170 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TupleSections #-}
{-# OP... | zohl/postgresql-simple-bind | tests/Test/PGComment.hs | Haskell | bsd-3-clause | 3,606 |
-------------------------------------------------------------------------------------
-- |
-- Copyright : (c) Hans Hoglund 2012
--
-- License : BSD-style
--
-- Maintainer : hans@hanshoglund.se
-- Stability : experimental
-- Portability : portable
--
-- Provides Balances, i.e. mappings from relative to absolut... | music-suite/music-dynamics | src/Music/Dynamics/Balance.hs | Haskell | bsd-3-clause | 630 |
module Language.Lambda
( module Language.Lambda.Syntax
, module Language.Lambda.Parser
) where
import Language.Lambda.Syntax
import Language.Lambda.Parser
| utky/lambda-cute | src/Language/Lambda.hs | Haskell | bsd-3-clause | 162 |
{-# LANGUAGE PolyKinds, DataKinds, TemplateHaskell, TypeFamilies,
GADTs, TypeOperators, RankNTypes, FlexibleContexts, UndecidableInstances,
FlexibleInstances, ScopedTypeVariables, MultiParamTypeClasses,
OverlappingInstances, StandaloneDeriving #-}
module Oxymoron.Description.Material where
import Data.Singl... | jfischoff/oxymoron | src/Oxymoron/Description/Material.hs | Haskell | bsd-3-clause | 881 |
{-
This file is part of the package devalot-hakyll. It is subject to the
license terms in the LICENSE file found in the top-level directory of
this distribution and at git://pmade.com/devalot-hakyll/LICENSE. No
part of devalot-hakyll package, including this file, may be copied,
modified, propagated, or distributed ex... | pjones/devalot-hakyll | src/Hakyll/Web/JavaScript.hs | Haskell | bsd-3-clause | 1,621 |
module Web.Mp3Convertr where
import System.FilePath.Posix (combine)
import System.Process (readProcess)
data ConvertConf = ConvertConf { getFFmpegCommand :: FilePath
, getTempDir :: FilePath
, getExt :: String
... | algas/mp3huntr | src/Web/Mp3Convertr.hs | Haskell | bsd-3-clause | 866 |
----------------------------------------------------------------------------
-- |
-- Module : Server.Tags.SearchM
-- Copyright : (c) Sergey Vinokurov 2016
-- License : BSD3-style (see LICENSE)
-- Maintainer : serg.foo@gmail.com
-- Created : Tuesday, 23 August 2016
----------------------------------... | sergv/tags-server | src/Haskell/Language/Server/Tags/SearchM.hs | Haskell | bsd-3-clause | 1,823 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE UndecidableInstances #-}
-- | Representations for signed and unsigned integer types
--
-- The reason for using symbol names ending with @_t@ is that 'deriveRender'
-- uses everything that comes before @_@ when rendering the constructor.
module Data.TypeRep.Types.IntWord w... | emilaxelsson/open-typerep | src/Data/TypeRep/Types/IntWord.hs | Haskell | bsd-3-clause | 2,323 |
{-# LANGUAGE OverloadedStrings #-}
-- | Downloads page controller.
module HL.C.Downloads where
import HL.C
import HL.V.Downloads
-- | Downloads controller.
getDownloadsR :: C Html
getDownloadsR = senza downloadsV
-- | Downloads for particular OS.
getDownloadsForR :: OS -> C Html
getDownloadsForR = senza . download... | yogsototh/hl | src/HL/C/Downloads.hs | Haskell | bsd-3-clause | 326 |
{-# LANGUAGE DeriveGeneric, OverloadedStrings #-}
module DB.CardSimple.Model where
import Prelude hiding (id)
import Data.Text
import GHC.Generics
import Data.Aeson
import Data.Time.Clock
import Control.Applicative
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.FromRow
data CardSimple = CardSim... | ppseafield/backend-flashcard | src/DB/CardSimple/Model.hs | Haskell | bsd-3-clause | 880 |
module Import
( module Import
) where
import Foundation as Import
import Import.NoFoundation as Import | MaxGabriel/hackvote-yesod | Import.hs | Haskell | cc0-1.0 | 124 |
<?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="ko-KR">
<title>Replacer | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref lo... | veggiespam/zap-extensions | addOns/replacer/src/main/javahelp/org/zaproxy/zap/extension/replacer/resources/help_ko_KR/helpset_ko_KR.hs | Haskell | apache-2.0 | 970 |
<?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="sl-SI">
<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_sl_SI/helpset_sl_SI.hs | Haskell | apache-2.0 | 973 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TupleSections #-}
module Language.Haskell.Liquid.GHC.Play where
import GHC
import CoreSyn
import Var
import TypeRep
import TcRnMonad
import Coercion
import ... | abakst/liquidhaskell | src/Language/Haskell/Liquid/GHC/Play.hs | Haskell | bsd-3-clause | 2,898 |
{-# LANGUAGE CPP #-}
#include "fusion-phases.h"
-- | Selectors.
--
-- See "Data.Array.Parallel.Unlifted" for how this works.
--
module Data.Array.Parallel.Unlifted.Sequential.USel
( -- * Types
USel2(..)
-- * Operations on selectors
, mkUSel2
, lengthUSel2
, tags... | mainland/dph | dph-prim-seq/Data/Array/Parallel/Unlifted/Sequential/USel.hs | Haskell | bsd-3-clause | 3,266 |
{-# LANGUAGE FlexibleContexts #-}
module Futhark.Internalise.AccurateSizes
( shapeBody
, annotateArrayShape
, argShapes
, ensureResultShape
, ensureResultExtShape
, ensureShape
, ensureShapeVar
)
where
import Control.Applicative
import Control.Monad
import Data.Loc
import qualified Data.HashMap.Lazy ... | CulpaBS/wbBach | src/Futhark/Internalise/AccurateSizes.hs | Haskell | bsd-3-clause | 3,529 |
module B where
import B1
| sdiehl/ghc | testsuite/tests/ghci/prog019/B.hs | Haskell | bsd-3-clause | 26 |
<?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="de-DE">
<title>Requester</title>
<maps>
<homeID>requester</homeID>
<mapref location="ma... | thc202/zap-extensions | addOns/requester/src/main/javahelp/help_de_DE/helpset_de_DE.hs | Haskell | apache-2.0 | 960 |
<?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="fa-IR">
<title>Revisit | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref loca... | kingthorin/zap-extensions | addOns/revisit/src/main/javahelp/org/zaproxy/zap/extension/revisit/resources/help_fa_IR/helpset_fa_IR.hs | Haskell | apache-2.0 | 968 |
<?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="ja-JP">
<title>Passive Scan Rules - Beta | ZAP Extension</title>
<maps>
<homeID>top</homeID>... | thc202/zap-extensions | addOns/pscanrulesBeta/src/main/javahelp/org/zaproxy/zap/extension/pscanrulesBeta/resources/help_ja_JP/helpset_ja_JP.hs | Haskell | apache-2.0 | 1,012 |
module A (T,t) where
data T = T
t = T
instance Eq T where
t1 == t2 = False
| ghc-android/ghc | testsuite/tests/driver/recomp008/A2.hs | Haskell | bsd-3-clause | 80 |
module Main.Statements where
import Prelude
import Contravariant.Extras
import Hasql.Statement
import qualified Hasql.Encoders as E
import qualified Hasql.Decoders as D
createAccountTable :: Statement () ()
createAccountTable =
Statement sql E.noParams D.noResult False
where
sql =
"create table account... | nikita-volkov/hasql-transaction | conflicts-test/Main/Statements.hs | Haskell | mit | 1,261 |
{-# LANGUAGE OverloadedStrings, CPP #-}
{-|
Module : Examples
Description : Provides predefined networks.
Copyright : (c) Tessa Belder 2015.
Provides predefined networks.
-}
module Examples(
networkMap, networkMapFlattened, networkMapTyped,
module Examples.InvariantTestNetwork,
module Examples.Macr... | julienschmaltz/madl | examples/Examples.hs | Haskell | mit | 3,414 |
module Main (main) where
import Data.Word
import System.Environment (getArgs, getProgName)
import System.Exit (ExitCode(..), exitFailure)
import System.IO (hPutStrLn, stderr)
import qualified System.Process as P (shell)
import System.Process.ByteString ()
import qualified System.Process.Common as P
import Data.ByteS... | NicolasT/reedsolomon | cbits/reedsolomon-gal-mul-stdio-quickcheck.hs | Haskell | mit | 2,259 |
{-# LANGUAGE FlexibleContexts, LambdaCase, RankNTypes, TypeSynonymInstances, FlexibleInstances, ViewPatterns, OverloadedStrings, ScopedTypeVariables, ConstraintKinds, NamedFieldPuns, NoMonomorphismRestriction #-}
{-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-partial-type-signatures -fno-warn-orphans #-}
modu... | sboosali/commands | commands-spiros/config/Commands/Plugins/Spiros/Extra.hs | Haskell | mit | 10,480 |
module Main where
import Control.Monad.Trans
import System.Directory
import System.FilePath
import System.Environment
import System.Exit
import Text.PrettyPrint.HughesPJ
import ConstantCode
import CSPMDataStructures
import CSPMParser
import CSPMPrettyPrinter
import CSPMRecursionRefactorings
import CSPMTypeChecker.TCM... | tomgr/tyger | src/Main.hs | Haskell | mit | 3,109 |
exs :: [([Bool], Bool)]
exs = [ ([True, True, True], True),
([False, False, False], False),
([True, False], True),
([False, True], True)
]
| santolucito/ives | tests/benchmarks/bool_or.hs | Haskell | mit | 169 |
module Statistics where
import Data.List
import Control.Monad
import System.Directory
import Submissions
import Users
import Assignments
data Bucket = Bucket
{ rangeMin :: Double
, rangeMax :: Double
, count :: Int
} deriving Show
data Statistics = Statis... | cromulen/puh-project | src/Statistics.hs | Haskell | mit | 4,251 |
{-# LANGUAGE OverloadedStrings #-}
-- | Mobile application authentication flow example
--
-- Please remember to substitute __YOUR_API_KEY__,
-- __YOUR_SECRET__, __USERNAME__ and __PASSWORD__
-- for real values
import Control.Lens -- lens
import Data.Aeson.Lens -- lens-aeson
import qua... | supki/liblastfm | example/mobile-authentication.hs | Haskell | mit | 984 |
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-}
module Day4 where
import ClassyPrelude
import Control.Monad.Trans.Either
import Data.Attoparsec.Text hiding (take)
import Data.Char
import Debug.Trace
input :: IO Text
input = readFile "data/day4.txt"
test = "aaaaa-bbb-z-y-x-123[abxyz]\n\
\a-b-c-d-e-f-g... | farrellm/advent-2016 | src/Day4.hs | Haskell | mit | 2,122 |
{-# OPTIONS #-}
-- ------------------------------------------------------------
module Holumbus.Crawler
( module Holumbus.Crawler.Constants
, module Holumbus.Crawler.Core
, module Holumbus.Crawler.Html
, module Holumbus.Crawler.Logger
, module Holumbus.Crawler.Robots
, module Holumbus.Crawler.... | ichistmeinname/holumbus | src/Holumbus/Crawler.hs | Haskell | mit | 966 |
{-# LANGUAGE Haskell2010
, GeneralizedNewtypeDeriving
, DeriveDataTypeable
#-}
{-# OPTIONS
-Wall
-fno-warn-name-shadowing
#-}
-- | INTERNAL module is used to infer Haskell types from Java types.
module Foreign.Java.Bindings.Typomatic (
runTypomatic,
typomatic,
ArgInfo (..),
dataTName... | fehu/haskell-java-bridge-fork | src/Foreign/Java/Bindings/Typomatic.hs | Haskell | mit | 13,693 |
module Proteome.Test.ResolveTest where
import qualified Data.Map as Map (fromList)
import Hedgehog ((/==), (===))
import Path (Abs, Dir, absdir, parseAbsDir)
import Ribosome.File (canonicalPaths)
import Ribosome.Test.Run (UnitTest, unitTest)
import Ribosome.Test.Unit (fixture)
import Test.Tasty (TestTree, testGroup)
... | tek/proteome | packages/test/test/Proteome/Test/ResolveTest.hs | Haskell | mit | 2,342 |
-- | This file provides and helps extract version information.
--
-- Author: Thorsten Rangwich. See file <../LICENSE> for details.
module Version.Information
(
-- * Compile time and forever constants
module Version.Constants,
module Version.StaticVersion,
-- * Version information
versionSt... | tnrangwi/grill | src/Version/Information.hs | Haskell | mit | 4,869 |
module Glucose.Test.IR.Unchecked (module Glucose.Test.IR.Core, alias) where
import Glucose.Test.IR.Core
import Data.Text
import Glucose.IR
import Glucose.Parser.Source
alias :: FromSource Text -> FromSource Text -> FromSource (Definition Unchecked)
alias to from = definition to $ reference UnknownKind from ... | sardonicpresence/glucose | test/Glucose/Test/IR/Unchecked.hs | Haskell | mit | 329 |
module Ternary.Arbitraries where
import Test.QuickCheck
import Test.QuickCheck.Checkers hiding (Binop)
import Control.Monad (liftM2)
import Ternary.Core.Digit
import Ternary.Util.Triad (Triad, makeTriad)
import Ternary.List.Exact (Exact(Exact))
import Ternary.List.FiniteExact (FiniteExact, unsafeFinite)
instance Ar... | jeroennoels/exact-real | test/Ternary/Arbitraries.hs | Haskell | mit | 901 |
module Main where
import Data.Function
--Identity monad
type I a = a
--Identity Function
unitI :: a -> a
unitI a = a
-- plain postfix application (always call)
bindI :: a -> (a -> I b) -> I b
bindI a f = f a
-- just creating as a common f# operator
-- https://stackoverflow.co... | xunilrj/sandbox | sources/haskell/papers/reactive.hs | Haskell | apache-2.0 | 4,438 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
module DecisionProcedure.Opra2
( module DecisionProcedure.Opra
) where
-- standard modules
import Data.Maybe
import qualified Data.Set as Set
-- local modules
import Basics
import Calculus.Opra2
import DecisionProcedure
import DecisionProcedure.Algebra... | spatial-reasoning/zeno | src/DecisionProcedure/Opra2.hs | Haskell | bsd-2-clause | 1,053 |
{-# LANGUAGE TupleSections, TemplateHaskell #-}
{-| Configuration server for the metadata daemon.
-}
{-
Copyright (C) 2014 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributio... | dimara/ganeti | src/Ganeti/Metad/ConfigServer.hs | Haskell | bsd-2-clause | 2,470 |
{-# LANGUAGE BangPatterns, ExistentialQuantification,
TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses,
RecordWildCards #-}
module Codec.Compression.HLZ4.Decode
-- (
-- decompress
-- )
where
import Control.Monad (when)
import Control.Monad.IO.Class
import Control.Applicative ... | axman6/HLZ4 | src/Codec/Compression/HLZ4/Decode.hs | Haskell | bsd-3-clause | 12,266 |
-- 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.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Time.EN.AU.Corpus
( allExamples
) where
import Data.Strin... | facebookincubator/duckling | Duckling/Time/EN/AU/Corpus.hs | Haskell | bsd-3-clause | 4,316 |
{-# LANGUAGE MultiParamTypeClasses #-}
{- |
Copyright : Copyright (C) 2008 Bjorn Buckwalter
License : BSD3
Maintainer : bjorn.buckwalter@gmail.com
Stability : experimental
Portability: GHC only?
An implementation of TDB conversions based on formula (2.6) of
[Kaplan2005]. The formula reportedly ha... | bjornbm/astro | src/Astro/Time/Barycentric/Kaplan2005.hs | Haskell | bsd-3-clause | 2,118 |
module App.Password where
import Control.Monad.IO.Class (MonadIO(liftIO))
import Crypto.Scrypt
(EncryptedPass(EncryptedPass), Pass(Pass), encryptPassIO',
getEncryptedPass, verifyPass')
import Data.Text (Text)
import Data.Text.Encoding (decodeUtf8With, encodeUtf8)
import Data.Text.Encoding.Error (lenient... | arow-oss/arow-sample-webapp | src/App/Password.hs | Haskell | bsd-3-clause | 1,556 |
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ViewPatterns #-}
module GHC.Util (
module GHC.Util.View
, module GHC.Util.FreeVars
, module GHC.Util.ApiAnnotation
, module GHC.Util.HsDecl
, module GHC.Util.HsExpr
, module GHC.Util.SrcLoc
, module GHC.Util.DynFlags
, module GHC.Util.Scope
, module GHC... | ndmitchell/hlint | src/GHC/Util.hs | Haskell | bsd-3-clause | 2,787 |
module Main where
import Prelude ()
import Prelude.Compat
import Test.Tasty (TestTree, defaultMain, testGroup)
import Test.Golden (goldenTests)
main :: IO ()
main = do
-- createDirectoryIfMissing False (testDir </> "empty-dir")
tests <- testsIO
defaultMain tests
testsIO :: IO TestTree
testsIO = do
return $... | cdepillabout/highlight | test/Test.hs | Haskell | bsd-3-clause | 354 |
{-# LANGUAGE RankNTypes, PolyKinds, DataKinds, TypeOperators, TypeInType,
TypeFamilies, FlexibleContexts, UndecidableInstances, GADTs #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Singletons.Decide
-- Cop... | int-index/singletons | src/Data/Singletons/Decide.hs | Haskell | bsd-3-clause | 2,113 |
{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
module Main where
import Stashh.App
import Stashh.Env
import Stashh.Command
import Control.Monad.Reader
import Control.Monad.IO.Class (MonadIO, liftIO)
main :: IO ()
main = do
env <- parseEnv
runApp app env
app :: AppT IO ()
app = do
env <- ask
debugout e... | yuroyoro/stashh | src/Main.hs | Haskell | bsd-3-clause | 362 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Control.Applicative (optional, (<$>))
import Control.Category (Category, (<<<))
import qualified Control.Category as Cat (id, (.))
import Control.DeepSeq (NFData, rnf)... | BlairArchibald/bones | apps/maxclique/src/Main.hs | Haskell | bsd-3-clause | 12,772 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
--
-- Copyright (c) 2009-2011, ERICSSON AB
-- All rights... | emwap/feldspar-language | src/Feldspar/Core/Constructs/Save.hs | Haskell | bsd-3-clause | 2,700 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP
, NoImplicitPrelude
, RecordWildCards
, BangPatterns
, NondecreasingIndentation
, MagicHash
#-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
{-# OPTIONS_HADDOCK hide #-}
-... | bitemyapp/ghc | libraries/base/GHC/IO/Handle/Text.hs | Haskell | bsd-3-clause | 38,280 |
module Utils where
import qualified Data.DList as DList
breakWith :: (a -> Maybe b) -> [a] -> ([b], [a])
breakWith f = go mempty
where
go accum (x:xs)
| Just y <- f x = go (accum `DList.snoc` y) xs
| otherwise = (DList.toList accum, x:xs)
go accum [] = (DList.toList accum, [])
| bgamari/diff-utils | src/Utils.hs | Haskell | bsd-3-clause | 312 |
{-
-----------------------------------------------------------------------------
--
-- (c) The University of Glasgow 2001-2003
--
-- Access to system tools: gcc, cp, rm etc
--
-----------------------------------------------------------------------------
-}
{-# LANGUAGE CPP, MultiWayIf, ScopedTypeVariables #-}
module ... | sdiehl/ghc | compiler/main/SysTools.hs | Haskell | bsd-3-clause | 18,898 |
{-# LANGUAGE QuasiQuotes #-}
module Test0 () where
import LiquidHaskell
[lq| type GeNum a N = {v: a | N <= v} |]
[lq| type PosInt = GeNum Int {0} |]
[lq| myabs :: Int -> PosInt |]
myabs x = if (x > 0) then x else (-x)
[lq| incr :: x:Int -> GeNum Int {x} |]
incr x = x + 1
| spinda/liquidhaskell | tests/gsoc15/working/pos/alias01.hs | Haskell | bsd-3-clause | 283 |
{-
Gifcurry
(C) 2018 David Lettier
lettier.com
-}
{-# LANGUAGE
DuplicateRecordFields
#-}
module GuiRecords where
import Data.IORef
import Data.Int
import qualified GI.Gtk
import qualified Graphics.Rendering.Pango.Font as GRPF
import GI.Gst
data GuiComponents =
GuiComponents
{ window ... | lettier/gifcurry | src/gui/GuiRecords.hs | Haskell | bsd-3-clause | 9,187 |
{-# LANGUAGE OverloadedStrings #-}
module Sesyrel.FaultTree.Dynamic (
compileDynamicFaultTree
, logDynamicFactorInfo
, DynamicFactor(..)
, dynamicFactorExpr
) where
import Sesyrel.FaultTree.Base hiding (Variable)
import qualified Sesyrel.FaultTree.Base as F (Variable(..))
import Sesyrel.Expression
import S... | balodja/sesyrel | src/Sesyrel/FaultTree/Dynamic.hs | Haskell | bsd-3-clause | 6,383 |
module Main where
import Client
import Server
import Player
import System.IO
import System.IO.Error hiding (catch)
import System.Environment (getArgs)
import Network
import Text.Printf
import Control.Concurrent.STM
import Control.Concurrent.Async
import Control.Exception hiding (handle)
import Control.Monad.Reader
im... | thomasathorne/h-chu | src/Main.hs | Haskell | bsd-3-clause | 3,638 |
-- Copyright (c) Microsoft. All rights reserved.
-- Licensed under the MIT license. See LICENSE file in the project root for full license information.
import Test.Tasty
import Test.Tasty.QuickCheck
import Test.Tasty.HUnit (testCase)
import Tests.Syntax
import Tests.Codegen
import Tests.Codegen.Util(utilTestGroup)
tes... | gencer/bond | compiler/tests/TestMain.hs | Haskell | mit | 8,480 |
{-#LANGUAGE NoImplicitPrelude #-}
{-#LANGUAGE OverloadedStrings #-}
{-#LANGUAGE OverloadedLists #-}
{-#LANGUAGE TypeFamilies #-}
{-#LANGUAGE MultiParamTypeClasses #-}
{-#LANGUAGE FlexibleInstances #-}
{-#LANGUAGE FlexibleContexts #-}
{-#LANGUAGE LambdaCase #-}
{-#LANGUAGE TupleSections #-}
{-#LANGUAGE DeriveGeneric #-}... | tdammers/templar | src/Web/Sprinkles/Backends/Spec.hs | Haskell | bsd-3-clause | 19,599 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.Monoid
import qualified Graphics.Vty as V
import qualified Brick.Main as M
import Brick.Widgets.Core
( Widget
, padAll
, str
)
import qualified Brick.Widgets.Dialog as D
import qualified Brick.Widgets.Center as C
import qualified Brick.AttrMap a... | FranklinChen/brick | programs/DialogDemo.hs | Haskell | bsd-3-clause | 1,675 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.SBV.Examples.Puzzles.Coins
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : erkokl@gmail.com
-- Stability : experimental
--
-- Solves the following puzzle:
--
-- @
-- You and a friend ... | josefs/sbv | Data/SBV/Examples/Puzzles/Coins.hs | Haskell | bsd-3-clause | 3,989 |
-- | The functions in this module allow you to limit the total size of incoming request bodies.
--
-- Limiting incoming request body size helps protect your server against denial-of-service (DOS) attacks,
-- in which an attacker sends huge bodies to your server.
module Network.Wai.Middleware.RequestSizeLimit
(
... | sordina/wai | wai-extra/Network/Wai/Middleware/RequestSizeLimit.hs | Haskell | bsd-2-clause | 3,370 |
{-# LANGUAGE DeriveDataTypeable, UndecidableInstances #-}
{-# LANGUAGE CPP #-}
--
-- (c) The University of Glasgow 2002-2006
--
-- The IO Monad with an environment
--
-- The environment is passed around as a Reader monad but
-- as its in the IO monad, mutable references can be used
-- for updating state.
--
module IO... | GaloisInc/halvm-ghc | compiler/utils/IOEnv.hs | Haskell | bsd-3-clause | 7,617 |
module Dwarf.Types
( -- * Dwarf information
DwarfInfo(..)
, pprDwarfInfo
, pprAbbrevDecls
-- * Dwarf address range table
, DwarfARange(..)
, pprDwarfARanges
-- * Dwarf frame
, DwarfFrame(..), DwarfFrameProc(..), DwarfFrameBlock(..)
, pprDwarfFrame
-- * Utilities
, pprByte
, pprHalf
,... | ezyang/ghc | compiler/nativeGen/Dwarf/Types.hs | Haskell | bsd-3-clause | 23,682 |
-- | This module handles loading data from disk.
module HLearn.Data.LoadData
where
import SubHask
import SubHask.Algebra.Array
import SubHask.Algebra.Container
import SubHask.Algebra.Parallel
import SubHask.Compatibility.ByteString
import SubHask.Compatibility.Cassava
import SubHask.Compatibility.Containers
import... | mikeizbicki/HLearn | src/HLearn/Data/LoadData.hs | Haskell | bsd-3-clause | 12,398 |
<?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="ko-KR">
<title>Passive Scan Rules | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<... | kingthorin/zap-extensions | addOns/pscanrules/src/main/javahelp/org/zaproxy/zap/extension/pscanrules/resources/help_ko_KR/helpset_ko_KR.hs | Haskell | apache-2.0 | 979 |
<?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>TreeTools</title>
<maps>
<homeID>treetools</homeID>
<mapref location="ma... | thc202/zap-extensions | addOns/treetools/src/main/javahelp/help_id_ID/helpset_id_ID.hs | Haskell | apache-2.0 | 960 |
import Test.Cabal.Prelude
-- Test build-tool-depends between two packages
main = cabalTest $ do
cabal "new-build" ["client"]
| mydaum/cabal | cabal-testsuite/PackageTests/BuildToolDepends/setup.test.hs | Haskell | bsd-3-clause | 129 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE UnboxedSums #-}
module T12478_5 where
import Language.Haskell.TH
foo :: $(conT (unboxedSumTypeName 2) `appT` conT ''() `appT` conT ''())
-> $(conT (unboxedSumTypeName 2) `appT` conT ''() `appT` conT ''())
foo $(conP (unboxedSumDataName 1 2) [conP '() []])
= $(conE (... | olsner/ghc | testsuite/tests/th/T12478_5.hs | Haskell | bsd-3-clause | 693 |
{-# LANGUAGE TypeFamilies #-}
module Tc251_Help where
class Cls a where
type Fam a :: *
type Fam a = Maybe a
| wxwxwwxxx/ghc | testsuite/tests/typecheck/should_compile/Tc251_Help.hs | Haskell | bsd-3-clause | 118 |
{-# LANGUAGE TypeFamilies, FunctionalDependencies, RankNTypes, MultiParamTypeClasses #-}
module T4254 where
class FD a b | a -> b where
op :: a -> b;
op = undefined
instance FD Int Bool
ok1 :: forall a b. (a~Int,FD a b) => a -> b
ok1 = op
-- Should be OK: op has the right type
ok2 :: forall a b. (a~In... | wxwxwwxxx/ghc | testsuite/tests/indexed-types/should_fail/T4254.hs | Haskell | bsd-3-clause | 551 |
{-# LANGUAGE DeriveFunctor #-}
module T9071_2 where
newtype Mu f = Mu (f (Mu f))
newtype K1 a b = K1 a
newtype F1 a = F1 (Mu (K1 a)) deriving Functor
| gcampax/ghc | testsuite/tests/deriving/should_fail/T9071_2.hs | Haskell | bsd-3-clause | 152 |
{-# LANGUAGE Arrows #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MonadComprehensions #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ViewPatterns #... | mstksg/auto-examples | src/Experimental/Survive.hs | Haskell | mit | 33,328 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
module XmppDaemon.Stun where
import Control.Applicative
import Control.Concurrent.STM
import qualified Control.Exception as Ex
import Control.Monad
impo... | Philonous/xmpp-daemon | source/XmppDaemon/Stun.hs | Haskell | mit | 5,711 |
{-# LANGUAGE OverloadedStrings, NoImplicitPrelude #-}
module Stackage.Stats
( printStats
) where
import Stackage.Prelude
import Data.Yaml (decodeFileEither)
printStats :: FilePath -- ^ YAML build plan file
-> IO ()
printStats fp = do
bp <- decodeFileEither fp >>= either throwIO return
let c... | fpco/stackage-curator | src/Stackage/Stats.hs | Haskell | mit | 817 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{- |
Module : Orville.PostgreSQL.Expr.Name.TableName
Copyright : Flipstone Technology Partners 2016-2021
License : MIT
-}
module Orville.PostgreSQL.Internal.Expr.Name.TableName
( TableName,
tableName,
)
where
import Orville.PostgreSQL.Internal.Expr.Name.Identif... | flipstone/orville | orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/Expr/Name/TableName.hs | Haskell | mit | 604 |
module Network.Skype.Protocol.ChatMessage where
import Data.Typeable (Typeable)
import Network.Skype.Protocol.Chat
import Network.Skype.Protocol.Types
data ChatMessageProperty
-- | Time when the message was sent (UNIX timestamp).
= ChatMessageTimestamp Timestamp
-- | Skypename of the originator of the chatmess... | emonkak/skype4hs | src/Network/Skype/Protocol/ChatMessage.hs | Haskell | mit | 4,864 |
{-# Language TemplateHaskell, QuasiQuotes, FlexibleContexts #-}
module Main where
import Language.F2
import Language.F2.Util
import System.IO (hFlush, stdout)
import Control.Arrow (first, second, (>>>))
import Control.Monad.State
import Text.Peggy (defaultDelimiter, peggy, parseString)
[peggy|
space :: ()
= [ \r\n... | kagamilove0707/F2 | src/Main.hs | Haskell | mit | 2,011 |
{- This file was auto-generated from karps/proto/structured_transform.proto by the proto-lens-protoc program. -}
{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,
UndecidableInstances, MultiParamTypeClasses, FlexibleContexts,
FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude
#-}
{-# OPTION... | tjhunter/karps | haskell/src/Proto/Karps/Proto/StructuredTransform.hs | Haskell | apache-2.0 | 41,777 |
<?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>Import/Export</title>
<maps>
<homeID>exim</homeID>
<mapref location="map... | secdec/zap-extensions | addOns/exim/src/main/javahelp/help_ru_RU/helpset_ru_RU.hs | Haskell | apache-2.0 | 959 |
{-
Copyright 2019 The CodeWorld Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicab... | alphalambda/codeworld | codeworld-base/src/Core.hs | Haskell | apache-2.0 | 965 |
{- Copyright 2014 David Farrell <shokku.ra@gmail.com>
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or... | shockkolate/lambdircd | plugins.old/CModeNoExternal.hs | Haskell | apache-2.0 | 1,375 |
-- 45228
import Data.List(nub)
import Euler(digitUsage, fromDigits, intSqrt)
kk = 9
isPandigital n a b = digitUsage n == xs
where xs = zipWith3 (\x y z -> x+y+z)
(digitUsage a) (digitUsage b) (digitUsage $ a*b)
genPandigital m n = [x*y | x <- [1..intSqrt m],
y <- [x+1.... | higgsd/euler | hs/32.hs | Haskell | bsd-2-clause | 556 |
-- |
-- Module : Main
-- Copyright : [2013] Manuel M T Chakravarty
-- License : BSD3
--
-- Maintainer : Manuel M T Chakravarty <chak@cse.unsw.edu.au>
-- Portability : haskell2011
module Graphics.Gloss.Game (
-- * Reexport some basic Gloss datatypes
module Graphics.Gloss.Data.Color,
module Graphics... | mchakravarty/gloss-game | Graphics/Gloss/Game.hs | Haskell | bsd-3-clause | 9,807 |
{-# LANGUAGE TemplateHaskell #-}
module Language.Haskell.Liquid.TH.Misc (
-- * Convert Data to Exp
dataToExpQ'
-- * Split AnnoType
, splitSigmaRTy
, splitForAllRTy
, splitPhiRTy
, splitCxtArrowRTy
, splitCxtArrowRTy_maybe
, splitTuplesRTy
, splitTupleRTy
, splitTupleRTy_maybe
) where
im... | spinda/liquidhaskell | src/Language/Haskell/Liquid/TH/Misc.hs | Haskell | bsd-3-clause | 2,844 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.SBV.Provers.Prover
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : erkokl@gmail.com
-- Stability : experimental
--
-- Provable abstraction and the connection to SMT solvers
----------... | TomMD/cryptol | sbv/Data/SBV/Provers/Prover.hs | Haskell | bsd-3-clause | 26,293 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE Kind... | kylcarte/derivation | src/Data/Derivation/Structural.hs | Haskell | bsd-3-clause | 1,414 |
{-# LANGUAGE CPP, FlexibleInstances, NamedFieldPuns,
NoImplicitPrelude, TemplateHaskell,
UndecidableInstances #-}
#include "overlapping-compat.h"
{-|
Module: Data.Aeson.TH
Copyright: (c) 2011-2015 Bryan O'Sullivan
(c) 2011 MailRank, Inc.
License: Apache
Stability: experimental
Portab... | neobrain/aeson | Data/Aeson/TH.hs | Haskell | bsd-3-clause | 48,240 |
-- | This module implements encoding and decoding of CSV data. The
-- implementation is RFC 4180 compliant, with the following
-- extensions:
--
-- * Empty lines are ignored.
--
-- * Non-escaped fields may contain any characters except
-- double-quotes, commas, carriage returns, and newlines.
--
-- * Escaped fiel... | plow-technologies/cassava | Data/Csv.hs | Haskell | bsd-3-clause | 6,937 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
module Minecraft.Player where
import Control.Lens.TH (makeLenses)
import Data.Data (Data)
import Data.Typeable (Typeable)
import Data.NBT
im... | stepcut/minecraft-data | Minecraft/Player.hs | Haskell | bsd-3-clause | 6,179 |
{-# LANGUAGE CPP, DeriveDataTypeable, GeneralizedNewtypeDeriving, Rank2Types,
RecordWildCards #-}
#if __GLASGOW_HASKELL >= 800
-- a) THQ works on cross-compilers and unregisterised GHCs
-- b) may make compilation faster as no dynamic loading is ever needed (not sure about this)
-- c) removes one hindrance to have c... | roelvandijk/aeson | Data/Aeson/Types/Internal.hs | Haskell | bsd-3-clause | 20,704 |
{-# LANGUAGE CPP #-}
-- Copyright 2019 Google LLC
--
-- Use of this source code is governed by a BSD-style
-- license that can be found in the LICENSE file or at
-- https://developers.google.com/open-source/licenses/bsd
-- | This module provides combinators for constructing Haskell types.
module GHC.SourceGen.Type
... | google/ghc-source-gen | src/GHC/SourceGen/Type.hs | Haskell | bsd-3-clause | 3,157 |
module Main where
import qualified Lib as L
import System.Environment
import Data.Maybe
import Control.Monad
import qualified System.IO.Strict as S
import qualified PackageRank as PR
import qualified Data.Map.Strict as Map
import Data.List (isInfixOf)
import qualified TarUtil as T
import Pipes
import qualified Pipes.... | erantapaa/parse-cabal | app/Main.hs | Haskell | bsd-3-clause | 1,411 |
module Main where
import Network.Curl
import System.Environment (getArgs)
postJson :: URLString -> String -> IO CurlResponse
postJson url jsonData = do
writeFile "coverage.json" jsonData
h <- initialize
setopt h (CurlVerbose True)
setopt h (CurlURL url)
-- setopt h (CurlPost True)
-- setopt h ... | guillaume-nargeot/hpc-coveralls-experiment | src/Main.hs | Haskell | bsd-3-clause | 1,322 |
module Parser where
import Data.Binary
import Data.Binary.Get
import qualified Data.ByteString.Lazy as BS
import Codec.Compression.GZip (decompress)
import Control.Monad
import Numeric.LinearAlgebra
import Numeric.LinearAlgebra.Devel
import qualified Data.Vector as V
import Control.Monad.ST
type Pixel = Wor... | pierric/neural-network | Backend-hmatrix/Example/MNIST/Parser.hs | Haskell | bsd-3-clause | 1,889 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.