code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-
H-99 Problems
Copyright 2015 (c) Adrian Nwankwo (Arcaed0x)
Problem : 11
Description : Modified run-length encoding.
License : MIT (See LICENSE file)
-}
-- | Data type from example.
data ListElemSize a = Multiple Int a | Single a
deriving (Show)
classifyAlike :: (Eq a) => [a] -> [Lis... | Arcaed0x/H-99-Solutions | src/prob11.hs | mit | 1,022 | 17 | 11 | 348 | 282 | 146 | 136 | 17 | 3 |
{-# LANGUAGE BangPatterns #-}
module Main where
import Control.Concurrent hiding (Chan)
import Control.Concurrent.GoChan
import Control.Monad
import Criterion.Main
import System.Random
for xs f = map f xs
main :: IO ()
main =
defaultMain $
(for
... | cstrahan/gochan | bench/Main.hs | mit | 3,612 | 0 | 19 | 1,651 | 1,348 | 635 | 713 | 117 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Smutt.HTTP.Server.Request.Content.Raw.Chunked where
import Data.IORef
import Control.Monad.Except
import Control.Concurrent.MVar
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.Char8 as BLC
im... | black0range/Smutt | src/Smutt/HTTP/Server/Request/Content/Raw/Chunked.hs | mit | 5,824 | 2 | 17 | 1,102 | 1,461 | 760 | 701 | 101 | 3 |
module Grin.Show(
prettyFun,
prettyExp,
printGrin,
hPrintGrin,
graphGrin,
render
) where
import Char
import Control.Monad.Writer(tell,when,forM_,execWriter)
import Data.Maybe
import IO
import qualified Data.Map as Map
import qualified Data.Set as Set
import C.Prims
import Data.Graph.Induct... | m-alvarez/jhc | src/Grin/Show.hs | mit | 9,839 | 0 | 18 | 2,050 | 4,517 | 2,257 | 2,260 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, RecordWildCards #-}
module Language.PiCalc.Pretty(
-- * Pretty printing
Pretty
, pretty
, prettyProg
, prettyTerm
, prettyShort
-- * Program pretty printing options
, PrettyProgOpts(..)
, parseableProgOpts
, defProgOpts
... | bordaigorl/jamesbound | src/Language/PiCalc/Pretty.hs | gpl-2.0 | 9,403 | 0 | 15 | 2,741 | 3,049 | 1,603 | 1,446 | 202 | 11 |
module Text.XML.HaXml.DtdToHaskell.Instance
( mkInstance
) where
import List (intersperse)
import Text.XML.HaXml.DtdToHaskell.TypeDef
import Text.PrettyPrint.HughesPJ
-- | Convert typedef to appropriate instance declaration, either @XmlContent@,
-- @XmlAttributes@, or @XmlAttrType@.
mkInstance :: TypeDef -> D... | jgoerzen/dtmconv | HaXml-1.12/src/Text/XML/HaXml/DtdToHaskell/Instance.hs | gpl-2.0 | 12,878 | 10 | 31 | 4,917 | 4,280 | 2,088 | 2,192 | 257 | 26 |
module Main where
import V
main = vmain
| vrthra/v | src/Main.hs | gpl-2.0 | 42 | 0 | 4 | 10 | 12 | 8 | 4 | 3 | 1 |
-- file: ch4/exB4.hs
-- A pair of function that take from a list while a predicate is true.
-- Daniel Brice
takeWhileRecursive :: (a -> Bool) -> [a] -> [a]
takeWhileRecursive = loop []
where
loop acc p (x : xs) = if p x
then loop (acc ++ [x]) p xs
else acc
... | friedbrice/RealWorldHaskell | ch4/exB4.hs | gpl-2.0 | 528 | 1 | 9 | 204 | 183 | 98 | 85 | 11 | 3 |
-- | Module servant a faire l'inférence de type à l'aide des règles de Hindley Milner
module TypeInference.Rules where
import TypeInference.Base
import qualified Data.Set as Set
import qualified Data.Map as Map
import TypeInference.TypeVariable
import LambdaCalculus
import Data.Monoid
type TypedExpr = Expr Monotype
... | bruno-cadorette/Baeta-Compiler | src/TypeInference/Rules.hs | gpl-3.0 | 3,774 | 0 | 12 | 825 | 1,184 | 590 | 594 | 67 | 1 |
import Data.Char
-- main = do
-- contents <- getContents
-- putStr (shortLinesOnly contents)
shortLinesOnly :: String -> String
shortLinesOnly input =
let allLines = lines input
shortLines = filter (\line -> length line < 10) allLines
result = unlines shortLines
in result
-- main = i... | lamontu/learning_haskell | get_contents.hs | gpl-3.0 | 597 | 0 | 13 | 140 | 143 | 74 | 69 | 12 | 2 |
{-#LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-}
module Carnap.Languages.PurePropositional.Logic.Gamut
( GamutMPND(..), gamutMPNDCalc, parseGamutMPND
, GamutIPND(..), gamutIPNDCalc, parseGamutIPND
, GamutPND(..), gamutPNDCalc, parseGamutPND
, GamutPNDPlus(..), gamutPNDPlusCa... | gleachkr/Carnap | Carnap/src/Carnap/Languages/PurePropositional/Logic/Gamut.hs | gpl-3.0 | 13,337 | 0 | 16 | 4,109 | 4,113 | 2,189 | 1,924 | 248 | 1 |
module Ordinals where
import Hip.Prelude
import qualified Prelude as P
data Nat = Z | S Nat deriving (P.Show)
Z + y = y
(S x) + y = S (x + y)
Z * _ = Z
(S x) * y = y + (x * y)
data Ord = Zero | Suc Ord | Lim (Nat -> Ord)
(%+) :: Ord -> Ord -> Ord
Zero %+ y = y
Suc x %+ y = Suc (x %+ y)
Lim f %+ y = Lim (... | danr/hipspec | examples/old-examples/hip/Ordinals.hs | gpl-3.0 | 1,382 | 0 | 9 | 409 | 537 | 274 | 263 | 29 | 1 |
{-# OPTIONS_GHC -fno-implicit-prelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Maybe
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer : libraries@haskell.org
-- ... | kaoskorobase/mescaline | resources/hugs/packages/base/Data/Maybe.hs | gpl-3.0 | 3,030 | 0 | 10 | 780 | 457 | 262 | 195 | 42 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Arrows #-}
-- | Interface for the NCBI Entrez REST webservice.
--
-- The entrezHTTP function provides a interface to the NCBI Entrez REST service.
--
-- A series of different eutilites and databases are provided by the REST interface.
-- Response depends on the com... | eggzilla/EntrezHTTP | Biobase/Entrez/HTTP.hs | gpl-3.0 | 19,474 | 18 | 18 | 3,605 | 4,307 | 2,155 | 2,152 | 317 | 1 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 karamellpelle@hotmail.com
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the Lice... | karamellpelle/grid | source/Game/Helpers/Prewarm/Plain.hs | gpl-3.0 | 850 | 0 | 3 | 154 | 34 | 30 | 4 | 3 | 0 |
{-# LANGUAGE NamedFieldPuns #-}
module Pudding.Observables.SimpleObservable
( SimpleObservable
, liftSimple
) where
import qualified Data.Vector.Unboxed as U
import Pudding.Observables.Observable
import Pudding.Observables.Separate
import Pudding.Types.Configuration (Configuration)
type SimpleObservable a = Configur... | jfulseca/Pudding | src/Pudding/Observables/SimpleObservable.hs | gpl-3.0 | 494 | 0 | 8 | 66 | 128 | 74 | 54 | 12 | 1 |
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
-- In addition, you can configure a number of different aspects of Yesod
-- by overriding methods in the Yesod typeclass. That instance is
-- declared in the Foundation.hs file.... | mmarx/minitrue | Settings.hs | gpl-3.0 | 6,154 | 0 | 12 | 1,698 | 866 | 493 | 373 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dlp/gen/Network/Google/Resource/DLP/Organizations/Locations/InspectTemplates/List.hs | mpl-2.0 | 8,784 | 0 | 20 | 1,850 | 1,063 | 622 | 441 | 156 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.QPXExpress.... | brendanhay/gogol | gogol-qpxexpress/gen/Network/Google/QPXExpress/Types/Product.hs | mpl-2.0 | 73,669 | 0 | 27 | 19,409 | 15,061 | 8,675 | 6,386 | 1,624 | 1 |
module Data.GI.CodeGen.JNI.Types where
import qualified Data.Map as M
import qualified Data.Text as T
import qualified Data.GI.CodeGen.API as GI
-- | Lists component of the package (like ["org", "freedesktop"])
type Package = [String]
-- | Unqualified class name
type Class = String
-- | Fully qualified class consi... | ford-prefect/gir2jni | src/Data/GI/CodeGen/JNI/Types.hs | lgpl-2.1 | 782 | 0 | 10 | 162 | 136 | 89 | 47 | 12 | 0 |
head' :: [a] -> a
head' xs = case xs of [] -> error "No head for empty lists!"
(x:_) -> x
| Physwf/physwf-haskell-lab | head.hs | apache-2.0 | 117 | 0 | 9 | 49 | 49 | 25 | 24 | 3 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{-
- Copyright (c) 2015, Peter Lebbing <peter@digitalbrains.com>
- 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. Redistrib... | DigitalBrains1/clash-lt24 | LT24/InitSteps.hs | bsd-2-clause | 3,615 | 0 | 30 | 1,041 | 381 | 200 | 181 | 38 | 1 |
module Application.DocManager.Job where
import Application.DocManager.Config
import Application.DocManager.Type
import Application.DocManager.Data.Document
import Application.DocManager.Xournal
import Application.DocManager.Xelatex
import Control.Monad
import Data.List
import Data.Char
import System.FilePath
imp... | wavewave/docmanager | lib/Application/DocManager/Job.hs | bsd-2-clause | 1,413 | 0 | 15 | 374 | 399 | 194 | 205 | 37 | 2 |
{-# LANGUAGE Trustworthy #-}
-----------------------------------------------------------------------------
-- |
-- Copyright : (C) 2015 Edward Kmett and Ted Cooper
-- License : BSD-style (see the file LICENSE)
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Ted Cooper <anthezium@gmail.com>
-... | anthezium/rcu | src/Control/Concurrent/RCU/QSBR.hs | bsd-2-clause | 776 | 0 | 5 | 128 | 87 | 65 | 22 | 16 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Main where
import Ivory.Tower
import Ivory.Lang... | GaloisInc/tower | tower-aadl/test/External.hs | bsd-3-clause | 1,800 | 0 | 24 | 455 | 442 | 213 | 229 | 46 | 1 |
{-# LANGUAGE OverloadedStrings, RankNTypes #-}
module Qualys.Internal.ParseWasCommon
( parseProfile
, parseTag
, parseProxy
, parseUser
, parseScanAppl
, parseComment
, parseV3List
) where
import Control.Applicative hiding (many)
import Control.Monad (join)
import ... | ahodgen/qualys | Qualys/Internal/ParseWasCommon.hs | bsd-3-clause | 2,226 | 0 | 13 | 526 | 628 | 326 | 302 | 55 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Haskcord.Resource.GuildChannel
where
import Control.Lens
import Data.Aeson
import qualified Data.Text as T
import Haskcord.Resource.Base
import Haskcord.Resource.Id
import Haskcord.Permissions
-- TODO we need to "thread in" guild_id somehow.
... | swagcod/haskcord | src/Haskcord/Resource/GuildChannel.hs | bsd-3-clause | 1,433 | 0 | 25 | 295 | 267 | 151 | 116 | 34 | 0 |
module Job.Description where
import Text.Regex.Posix
data JobDescription = JobDescription
{ jobId :: String
, name :: String
, args :: [String]
, matchExpr :: String
}
filterJobsMatching :: [JobDescription] -> FilePath -> [JobDescription]
filterJobsMatching jobDescriptions fileChang... | rickardlindberg/codemonitor | src/Job/Description.hs | bsd-3-clause | 540 | 0 | 9 | 121 | 145 | 82 | 63 | 12 | 1 |
module Test.Network.BitTorrent.Whiteout (theTests) where
import Control.Applicative
import Control.Concurrent.STM
import Data.Array.IArray
import Data.Maybe
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit
import Network.BitTorrent.Whiteout
theTests :: Test.Framework.Test
theTests =
... | enolan/whiteout | src/Test/Network/BitTorrent/Whiteout.hs | bsd-3-clause | 2,399 | 0 | 15 | 483 | 403 | 205 | 198 | 58 | 4 |
module Handler.CampaignDel where
import Import
getCampaignDelR :: CampaignId -> Handler Html
getCampaignDelR cid = do
user <- requireAuthId
camp <- runDB $ get404 cid
if user /= campaignOwnerId camp
then do
setMessage "Permission denied."
defaultLayout $ $(widgetFile "error")
else do
r... | sulami/hGM | Handler/CampaignDel.hs | bsd-3-clause | 473 | 0 | 14 | 114 | 140 | 64 | 76 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-----------------------------------------------------------------------------
--
-- (c) The University of Glasgow 2004-2009.
--
-- Package management... | mettekou/ghc | utils/ghc-pkg/Main.hs | bsd-3-clause | 84,915 | 53 | 101 | 24,012 | 17,303 | 8,873 | 8,430 | 1,420 | 32 |
module Data.Arrowee where
| maoe/arrowee | src/Data/Arrowee.hs | bsd-3-clause | 27 | 0 | 3 | 4 | 6 | 4 | 2 | 1 | 0 |
-----------------------------------------------------------------------------
-- |
-- Module : TestSuite.CRC.CCITT
-- Copyright : (c) Levent Erkok
-- License : BSD3
-- Maintainer : erkokl@gmail.com
-- Stability : experimental
--
-- Test suite for Examples.CRC.CCITT
-----------------------------------... | josefs/sbv | SBVTestSuite/TestSuite/CRC/CCITT.hs | bsd-3-clause | 1,633 | 0 | 11 | 346 | 411 | 227 | 184 | 28 | 2 |
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UndecidableInstances #-}
module Marvin.Internal where
import Control.Exception.Lifted
import Control.Mo... | JustusAdam/marvin | src/Marvin/Internal.hs | bsd-3-clause | 2,697 | 0 | 14 | 544 | 618 | 317 | 301 | -1 | -1 |
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE Strict #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Graphics.Vulkan.Pipeline where
import Graphics.Vulkan.Device( VkDevice(..)
)
import {-# SOURCE #-} Graphics.Vulkan.Pa... | oldmanmike/vulkan | src/Graphics/Vulkan/Pipeline.hs | bsd-3-clause | 49,824 | 0 | 27 | 17,359 | 10,233 | 5,708 | 4,525 | 708 | 0 |
module Main
( main
) where
import qualified Control.Monad as CM
import qualified Data.Char as C
import qualified Data.List as L
import qualified Data.Map.Strict as M
import qualified Data.Maybe as DM
import qualified Data.Set as S
import ManPages
import MangledRegistry
import qualified System.Directory as D
import... | haskell-opengl/OpenGLRaw | RegistryProcessor/src/Main.hs | bsd-3-clause | 35,625 | 0 | 33 | 9,469 | 10,423 | 5,209 | 5,214 | 859 | 38 |
{-# LANGUAGE DataKinds #-}
import Debug.Trace
import Test.QuickCheck
import Spec.SimplTest
import LSI.RationalFunction
prop_simpl :: RationalFunction 2 Rational -> (Rational, Rational) -> Bool
prop_simpl r zs = let r' = simplify r in
eval zs r' == eval zs r
main :: IO ()
main = do
let args = stdArgs { maxSize ... | gdeest/lsi-systems | test/Spec.hs | bsd-3-clause | 360 | 0 | 11 | 69 | 124 | 63 | 61 | 12 | 1 |
{-# LANGUAGE DeriveDataTypeable, DeriveFoldable, DeriveTraversable, DeriveFunctor, FlexibleContexts #-}
module Language.Haskell.AST.Sugar
where
import Data.Data
import Data.Foldable (Foldable)
import Data.Traversable (Traversable)
import Language.Haskell.AST.Core hiding (Exp, Alt, Pat, Type)
-- | Extension of @GTy... | jcpetruzza/haskell-ast | src/Language/Haskell/AST/Sugar.hs | bsd-3-clause | 8,972 | 0 | 10 | 3,295 | 2,523 | 1,339 | 1,184 | 139 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveDataTypeable #-}
-- | This takes care of querying, identifing, and deleting the problem layers.
-- Right now, *problem layers* is defined as being those that are missing
-- Postgres tables, ev... | erochest/problayers | ProbLayers.hs | bsd-3-clause | 7,313 | 0 | 15 | 1,817 | 1,476 | 795 | 681 | 123 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Article.DataSource.Timeline
(
addTimeline
, removeTimeline
, removeTimelineList
, removeTimelineListById
, getIdListByTimeline
, countTimeline
, getTimelineListById
, saveTimelineMeta
, removeTimelineMeta
, getTimelineMeta
) where
import Ar... | Lupino/dispatch-article | src/Article/DataSource/Timeline.hs | bsd-3-clause | 3,394 | 0 | 11 | 820 | 893 | 482 | 411 | 59 | 1 |
{-# LANGUAGE UndecidableInstances #-}
-- | A bicomplex aka double complex, of free Z-modules. We use the
-- convention that the squares in the complex *anticommute*.
module Math.Algebra.Bicomplex where
import Math.Algebra.Combination
import Math.Algebra.ChainComplex hiding (FiniteType)
import qualified Math.Algebra.C... | mvr/at | src/Math/Algebra/Bicomplex.hs | bsd-3-clause | 2,076 | 11 | 13 | 452 | 778 | 422 | 356 | -1 | -1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Com.DiagClientEvent where
import Com.DiagMessage
import Com.HSFZMessage
import Diag.DiagnosisCodes
import Network(PortID(PortNumber),connectTo)
import System.IO
import System.CPUTime
import System.TimeIt
import Control.Concurrent(putMVar,MVar,forkIO,newEmptyMVar,takeMVar)
im... | marcmo/hsDiagnosis | other/DiagClientEvent.hs | bsd-3-clause | 5,234 | 0 | 16 | 1,067 | 1,862 | 939 | 923 | 127 | 3 |
{-# LANGUAGE TypeFamilies, QuasiQuotes, MultiParamTypeClasses,
TemplateHaskell, OverloadedStrings, StandaloneDeriving #-}
import System.Environment (getEnv)
import System.Exit (exitFailure)
import System.IO.Error (isDoesNotExistError)
import Yesod
import Yesod.Auth
import Yesod.Auth.Facebook.ClientSide
im... | prowdsponsor/yesod-auth-fb | demo/clientside.hs | bsd-3-clause | 3,984 | 0 | 13 | 1,066 | 661 | 363 | 298 | 77 | 2 |
module Ditto.Funify where
import Ditto.Syntax
import Ditto.Whnf
import Ditto.Monad
import Ditto.Conv
import Ditto.Sub
import Ditto.Throw
----------------------------------------------------------------------
funifies :: [Name] -> Args -> Args -> TCM (Maybe Sub)
funifies xs [] [] = return . Just $ []
funifies xs (a1:a... | ditto-lang/ditto | src/Ditto/Funify.hs | gpl-3.0 | 1,426 | 0 | 17 | 306 | 662 | 331 | 331 | -1 | -1 |
{-# LANGUAGE DeriveDataTypeable, RankNTypes, ScopedTypeVariables, BangPatterns, MagicHash #-}
module Utils.Misc (
-- * Environment
envIsSet
, getEnvMaybe
-- * List operations
, subsetOf
, noDuplicates
, equivClasses
, partitions
, nonTrivialPartitions
, twoPartitions
-- * Control
, whileTru... | rsasse/tamarin-prover | lib/utils/src/Utils/Misc.hs | gpl-3.0 | 3,896 | 0 | 12 | 848 | 1,227 | 689 | 538 | 78 | 3 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{- |
Module : Neovim.Plugin.ConfigHelper
Description : Helper plugin to ease recompiling the nvim-hs config
Copyright : (c) Sebastian Witte
License : Apache-2.0
Maintainer : woozletoff@gmail.com
St... | lslah/nvim-hs | library/Neovim/Plugin/ConfigHelper.hs | apache-2.0 | 1,726 | 0 | 20 | 638 | 309 | 175 | 134 | 30 | 2 |
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE FlexibleContexts #-}
module Pontarius.E2E.Helpers where
import Control.Applicative (Applicative, (<$>), (<*>), pure)
import Control.Monad.Reader
import Control.Monad.State
import Control.Monad.Except
import Control... | Philonous/pontarius-xmpp-e2e | source/Pontarius/E2E/Helpers.hs | apache-2.0 | 5,032 | 0 | 15 | 1,485 | 1,414 | 737 | 677 | 107 | 1 |
{-| Crypto-related helper functions.
-}
{-
Copyright (C) 2011, 2012 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright notic... | mbakke/ganeti | src/Ganeti/Hash.hs | bsd-2-clause | 2,152 | 0 | 12 | 362 | 217 | 122 | 95 | 19 | 1 |
--------------------------------------------------------------------
-- |
-- Copyright : (c) Edward Kmett and Dan Doel 2013-2014
-- License : BSD2
-- Maintainer: Dan Doel <dan.doel@gmail.com>
-- Stability : experimental
-- Portability: non-portable
-----------------------------------------------------------------... | PipocaQuemada/ermine | src/Ermine/Syntax/Hint.hs | bsd-2-clause | 418 | 0 | 5 | 56 | 39 | 27 | 12 | 4 | 0 |
{--------------------------------------------------------------------------------
Copyright (c) Daan Leijen 2003
wxWindows License.
A file browser in wxHaskell.
Demonstrates:
- tree control and list control
- image lists
- basic directory handling in Haskell
---------------------------------------------------... | ekmett/wxHaskell | samples/wx/FileBrowse.hs | lgpl-2.1 | 8,953 | 0 | 18 | 2,132 | 2,033 | 1,007 | 1,026 | 151 | 5 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP
, NoImplicitPrelude
, BangPatterns
, MagicHash
#-}
-- ----------------------------------------------------------------------------
--
-- (c) The University of Glasgow 2006
--
-- Fingerprints for recompilation checking and ABI versioning,... | pparkkin/eta | libraries/base/GHC/Fingerprint.hs | bsd-3-clause | 3,422 | 9 | 23 | 802 | 784 | 404 | 380 | -1 | -1 |
{-# LANGUAGE Unsafe #-}
{-# LANGUAGE ConstraintKinds #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Typeable.Internal
-- Copyright : (c) The University of Glasgow, CWI 2001--2011
-- License : BSD-style (see the file libraries/base/LI... | beni55/haste-compiler | libraries/ghc-7.8/base/Data/Typeable/Internal.hs | bsd-3-clause | 12,359 | 0 | 15 | 2,875 | 2,893 | 1,622 | 1,271 | 210 | 2 |
module LiquidClass where
-- | Typing classes
-- | Step 1: Refine type dictionaries:
class Compare a where
cmax :: a -> a -> a
cmin :: a -> a -> a
instance Compare Int where
{-@ instance Compare Int where
cmax :: Odd -> Odd -> Odd ;
cmin :: Int -> Int -> Int
@-}
cmax y x = if x >= y then x else y
cmin y... | abakst/liquidhaskell | tests/pos/LiquidClass.hs | bsd-3-clause | 957 | 3 | 9 | 268 | 139 | 81 | 58 | 9 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Magic
-- Copyright : (c) The University of Glasgow 2009
-- License : see libraries/ghc-prim/LICENSE
--
-- Maintainer : cvs-ghc@haskell.org
--... | frantisekfarka/ghc-dsi | libraries/ghc-prim/GHC/Magic.hs | bsd-3-clause | 2,615 | 0 | 5 | 460 | 105 | 84 | 21 | 8 | 1 |
{-# LANGUAGE BangPatterns #-}
module Main where
import ByteCodeLink
import CoreMonad
import Data.Array
import DataCon
import DebuggerUtils
import GHC
import HscTypes
import Linker
import RtClosureInspect
import TcEnv
import Type
import TcRnMonad
import TcType
import Control.Applicative
import Name (getOccString)
impor... | siddhanathan/ghc | testsuite/tests/ghc-api/T4891/T4891.hs | bsd-3-clause | 1,839 | 0 | 26 | 425 | 593 | 289 | 304 | 61 | 4 |
-- !!! Test monomorphism + RULES
module ShouldCompile where
-- This example crashed GHC 4.08.1.
-- The reason was that foobar is monomorphic, so the RULE
-- should not generalise over it.
{-# NOINLINE [1] foo #-}
foo 1 = 2
{-# NOINLINE [1] bar #-}
bar 0 = 1
foobar = 2
{-# RULES
"foo/bar" foo bar = foobar
#-}
... | siddhanathan/ghc | testsuite/tests/typecheck/should_compile/tc111.hs | bsd-3-clause | 322 | 0 | 5 | 72 | 32 | 21 | 11 | 8 | 1 |
-----------------------------------------------------------------------------
--
-- Module : Language.PureScript.CodeGen.JS.Optimizer.Blocks
-- Copyright : (c) Phil Freeman 2013-14
-- License : MIT
--
-- Maintainer : Phil Freeman <paf31@cantab.net>
-- Stability : experimental
-- Portability :
--
-- |... | michaelficarra/purescript | src/Language/PureScript/CodeGen/JS/Optimizer/Blocks.hs | mit | 1,187 | 0 | 13 | 200 | 228 | 131 | 97 | 18 | 3 |
module Language.HAsm.Parse where
import Data.Char
import Data.Either (lefts, rights)
import Data.List (intercalate, nub, sort)
import qualified Data.Map as M
import qualified Control.Arrow as Arr
import Control.Applicative ((<$>), (<*), liftA2)
import Control.Monad (when)
import Numeric
import Text.Parsec
import Te... | EarlGray/hasm | src/Language/HAsm/Parse.hs | mit | 11,011 | 0 | 17 | 3,010 | 4,070 | 2,197 | 1,873 | 268 | 17 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module LDAP.Classy.SSha where
import Prelude (Eq, Int, ... | benkolera/haskell-ldap-classy | LDAP/Classy/SSha.hs | mit | 1,895 | 0 | 10 | 602 | 500 | 288 | 212 | 44 | 1 |
{-# LANGUAGE OverloadedStrings, RecordWildCards #-}
module Text.Feed.Crawl where
import Text.Feed.Crawl.Common
import Text.Feed.Crawl.DetectLink
import Network.Connection (TLSSettings(..))
import Network.HTTP.Conduit
import qualified Data.Conduit as C
import qualified Data.ByteString.Char8 as B
import qualified Data.B... | danchoi/feed-crawl | Text/Feed/Crawl.hs | mit | 4,984 | 0 | 19 | 1,405 | 1,330 | 695 | 635 | 110 | 3 |
module Y2017.M01.D12.Exercise where
import Data.Set (Set)
import qualified Data.Set as Set
{--
Continuing the conversation of partial functions, studying Haskell pitfalls from
@bitemyapp.
Yesterday we looked at partial functions on List and solved that problem. Today,
we'll look at the more general problem of partia... | geophf/1HaskellADay | exercises/HAD/Y2017/M01/D12/Exercise.hs | mit | 2,254 | 0 | 8 | 412 | 140 | 83 | 57 | 12 | 1 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.HTMLMarqueeElement (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.HTMLMarqueeElement
#else
module Graphics.UI.Gtk.WebKit.DOM.HTMLMarqueeElement
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAV... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/HTMLMarqueeElement.hs | mit | 475 | 0 | 5 | 39 | 33 | 26 | 7 | 4 | 0 |
module StateMonad where
newtype State s a = State { runState :: s -> (a,s) }
instance Functor (State s) where
fmap f (State x) = State $ \s -> let (v, s') = x s in (f v, s')
instance Applicative (State s) where
pure a = State $ \s -> (a, s)
(State f) <*> (State a) = State $ \s -> let (f', s1) = f s
... | limdauto/learning-haskell | monads/StateMonad.hs | mit | 686 | 0 | 12 | 265 | 376 | 199 | 177 | 16 | 1 |
module Gist where
import Imports
-- Clipboard gists via https://github.com/defunkt/gist
gistFromClipboard :: String -> XX ()
gistFromClipboard filename = forkXio $ do
url <- syncSpawnAndRead "gist" ["-P", "-p", "-f", filename]
logInfo $ "Gist url from clipboard: " <> fromString url
syncSpawn "xdg-open" [url]
| mgsloan/compconfig | env/src/Gist.hs | mit | 318 | 0 | 10 | 51 | 83 | 43 | 40 | 7 | 1 |
import Test.DocTest
import System.FilePath
import System.Directory
-- |
-- >>> collectTestFiles ["a.cpp","a.hs","c",".d"]
-- ["a.hs"]
--
collectTestFiles :: [FilePath] -> [FilePath]
collectTestFiles files = filter isHs files where
isHs = (== ".hs") . snd . splitExtension
main :: IO ()
main = do
setCurrentDirector... | tshm/fmon | test/Spec.hs | mit | 440 | 0 | 9 | 73 | 117 | 62 | 55 | 11 | 1 |
import Control.Applicative
import Data.List
euler012 :: [[Int]] -> Int
euler012 m =
let directions = [id, transpose, diag, diag . reverse]
in maximum . map max_product $ directions <*> pure m
where
max_product = maximum . map (product . take 4) . tails . concat
diag = concatMap (transpose . diag') . tai... | marknsikora/euler | euler011/euler011.hs | mit | 535 | 0 | 15 | 136 | 239 | 121 | 118 | 14 | 2 |
module Handler.EinsendungAnlegen where
import Import
import Handler.AufgabeKonfiguration (checkKonfiguration)
import Yesod.Form.Fields.PreField (preField)
import qualified Control.Exception as Exception
import Data.ByteString (ByteString)
import Data.Conduit (($$))
import Data.Conduit.Binary (sinkLbs)
import Data.Dig... | marcellussiegburg/autotool | yesod/Handler/EinsendungAnlegen.hs | gpl-2.0 | 10,149 | 0 | 18 | 1,798 | 3,122 | 1,579 | 1,543 | -1 | -1 |
{-# language ParallelListComp #-}
-- | Module 'ErrorProp' is used to calculate error propagation in
-- non-linear systems
module Math.ErrorProp
(Measurement
, Fn, Transf
, mkTransf
, (+-), measurement, measurementCov
, getCovariance, getValues
, variables
, defVa... | hepek/ErrorProp | src/Math/ErrorProp.hs | gpl-2.0 | 4,975 | 23 | 13 | 1,456 | 1,511 | 845 | 666 | 103 | 2 |
import Probability
model = do
xs <- iid 10 (normal 0.0 1.0)
let ys = map (\x -> x * x) xs
return ["xs" %=% xs, "squares" %=% ys, "sum" %=% sum ys]
main = do
mcmc model
| bredelings/BAli-Phy | tests/prob_prog/demos/2/Main.hs | gpl-2.0 | 197 | 0 | 13 | 67 | 96 | 47 | 49 | 7 | 1 |
{-# LANGUAGE GADTs, NoMonomorphismRestriction, FlexibleInstances, DeriveDataTypeable #-}
module Specify.Expression where
import Autolib.Set
import Autolib.TES.Identifier
import Autolib.ToDoc
import Autolib.Reader
import Autolib.Size
import Text.ParserCombinators.Parsec
import Text.ParserCombinators.Parsec.Expr hidi... | Erdwolf/autotool-bonn | src/Specify/Expression.hs | gpl-2.0 | 7,248 | 163 | 16 | 2,349 | 1,450 | 903 | 547 | 140 | 1 |
module Solver where
import Data.Maybe (mapMaybe, fromJust)
import Data.List (minimumBy)
import Control.Monad (liftM)
import Grid
import Queue
import Relation
import Graph
import Set
newSolve :: Grid -> Maybe [Direction]
newSolve grid = findPath properGraph
where
graph = mapStates (\stateInfo -> (stateInfo, ... | mkm/sokoban | src/Solver.hs | gpl-3.0 | 3,737 | 0 | 21 | 1,460 | 1,129 | 592 | 537 | 65 | 11 |
-- Exercise 3
type Stack = [Char]
type State = Stack
newtype ST a = S (State -> (a, State))
app :: ST a -> State -> (a, State)
app (S st) x = st x
instance Monad ST where
st >>= f = S(\s -> let (x,s') = app st s
in app (f x) s')
instance Functor ST where
fmap g st = do x <- st
... | mdipirro/functional-languages-homeworks | Week 11/Exercise3.hs | gpl-3.0 | 499 | 0 | 13 | 202 | 251 | 128 | 123 | 16 | 1 |
-- | Alle meine Entchen
module Songs.AlleMeineEntchen where
import Songs.Fun
import Euterpea
-- | Melody of /Alle meine Entchen/ put together
entchenMelody :: Music Pitch
entchenMelody = e1 :+: e2 :+: e3 :+: e4 :+: e5
-- | Melody of /Alle meine Entchen/ as list of primitive values
entchenList :: [Music Pitch]
entc... | flofehrenbacher/music-project | EasyNotes/Songs/AlleMeineEntchen.hs | gpl-3.0 | 610 | 0 | 8 | 130 | 227 | 121 | 106 | 13 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{- |
Module : Postmaster.FSM.EventHandler
Copyright : (c) 2004-2008 by Peter Simons
License : GPL2
Maintainer : simons@cryp.to
Stability : provisional
Portability : Haskell 2-pre
-}
module Postmaster.FSM.EventHandler where
import Data.Typeabl... | richardfontana/postmaster | Postmaster/FSM/EventHandler.hs | gpl-3.0 | 968 | 0 | 12 | 191 | 168 | 91 | 77 | 18 | 1 |
{-# LANGUAGE ScopedTypeVariables, TypeFamilies #-}
module Math.Jalla.VectorSpace
( ) where
import Data.VectorSpace
import Math.Vector
import Math.InnerProduct
instance (InnerProduct o f) => InnerSpace o where
Scalar o :: f
a <.> b = innerProduct a b
instance AdditiveGroup (CVector (vec e) e) where
zeroV ... | cgo/jalla | Math/Jalla/VectorSpace.hs | gpl-3.0 | 406 | 2 | 9 | 77 | 95 | 52 | 43 | -1 | -1 |
module Main where
import Application.FilterStats.FilterStats
import Application.GMM.ConvertPVPGMMConduit
import Control.Monad as M
import Control.Monad.Trans.Resource
import Data.Conduit
import Data.Conduit.Binary as CB... | XinhuaZhang/PetaVisionHaskell | Application/FilterStats/Main.hs | gpl-3.0 | 786 | 0 | 15 | 325 | 188 | 106 | 82 | 23 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralisedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Qua... | merijn/GPU-benchmarks | benchmark-analysis/src/Schema/UnknownPredictions/V1.hs | gpl-3.0 | 1,615 | 0 | 9 | 247 | 231 | 143 | 88 | 33 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Hie.Language.Haskell.Exts.Pretty
-- Copyright : (c) Niklas Broberg 2004-2009,
-- (c) The GHC Team, Noel Winstanley 1997-2000
-- License : BSD-style (see the file LICENSE.txt)
--
-- Maintainer : ... | monsanto/hie | Hie/Language/Haskell/Exts/Pretty.hs | gpl-3.0 | 67,585 | 0 | 23 | 22,417 | 22,654 | 11,298 | 11,356 | 1,208 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-bigquery/gen/Network/Google/Resource/BigQuery/Jobs/GetQueryResults.hs | mpl-2.0 | 5,267 | 0 | 18 | 1,285 | 767 | 443 | 324 | 113 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-maps-engine/gen/Network/Google/Resource/MapsEngine/Assets/Parents/List.hs | mpl-2.0 | 3,853 | 0 | 15 | 922 | 492 | 291 | 201 | 74 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Workspaces/Triggers/Update.hs | mpl-2.0 | 6,406 | 0 | 18 | 1,398 | 863 | 503 | 360 | 132 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-dlp/gen/Network/Google/Resource/DLP/Organizations/StoredInfoTypes/Delete.hs | mpl-2.0 | 5,431 | 0 | 15 | 1,139 | 702 | 413 | 289 | 107 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Bidders/Accounts/FilterSets/FilteredBidRequests/List.hs | mpl-2.0 | 7,898 | 0 | 18 | 1,612 | 892 | 521 | 371 | 138 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-people/gen/Network/Google/Resource/People/OtherContacts/List.hs | mpl-2.0 | 9,871 | 0 | 21 | 2,141 | 1,182 | 698 | 484 | 156 | 1 |
module Tests.Command where
import Condition(Value(..),ScopeType(..),Condition(..))
import Command
import Duration(Duration(..))
import Scoped(Error())
import Tests.QuickMaker(quickMake)
import Data.Text(Text,unlines)
import Data.Either(isLeft)
import Test.Tasty
import Test.Tasty.HUnit
import Prelude hiding (unline... | joelwilliamson/validator | Tests/Command.hs | agpl-3.0 | 46,805 | 0 | 14 | 26,556 | 5,632 | 3,266 | 2,366 | 803 | 1 |
--
-- Copyright (c) 2013 Stefan Wehr - http://www.stefanwehr.de
--
-- This program is free software; you can redistribute it and/or
-- modify it under the terms of the GNU General Public License as
-- published by the Free Software Foundation; either version 2 of
-- the License, or (at your option) any later version.... | skogsbaer/HTF | tests/ThreadPoolTest.hs | lgpl-2.1 | 1,419 | 0 | 13 | 385 | 225 | 124 | 101 | 18 | 4 |
{-# OPTIONS_GHC -Wno-missing-signatures #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
module X05 where
import Data.Proxy
import Data.Tagged
import ... | haroldcarr/learn-haskell-coq-ml-etc | haskell/topic/phantoms/hc-phantom/src/X05.hs | unlicense | 2,285 | 0 | 13 | 563 | 721 | 367 | 354 | 63 | 3 |
import Data.Char
ans = map chr . map (\x -> if x >= (ord 'D')
then x - 3
else x - (ord 'A') + (ord 'X') ) . map ord
main = do
l <- getLine
let o = ans l
putStrLn o
| a143753/AOJ | 0512.hs | apache-2.0 | 225 | 1 | 14 | 105 | 111 | 53 | 58 | 8 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module NLP.TAG.Vanilla.Earley.TreeGen.Tests where
import qualified Data.Set as S
import Test.Tasty (TestTree)
import qualified NLP.TAG.Vanilla.Earley.TreeGen as E
import qualified NLP.TAG.Vanilla.Tree as E
import qualified NLP.TAG.Vanilla.Tests as T
-- | All the test... | kawu/tag-vanilla | src/NLP/TAG/Vanilla/Earley/TreeGen/Tests.hs | bsd-2-clause | 1,378 | 0 | 8 | 302 | 124 | 95 | 29 | 10 | 1 |
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- |
-- Module: $HEADER$
-- Description: FromAscii instances for Text
-- Copyright: (c) 2013 Peter Trsko
-- License: BSD3
--
-- Maintainer: peter.trsko@gmail.com
-- Stability: stable
-- Portability: non-portable (CPP)
--
-- 'FromAscii' inst... | trskop/hpwgen | src/Text/Pwgen/FromAscii/Text.hs | bsd-3-clause | 1,111 | 0 | 7 | 185 | 168 | 113 | 55 | 12 | 0 |
module System.Systemd.Config.Networkd.Network where
import Data.Monoid ((<>), Last)
import Data.Text (Text, unpack)
import Data.Text.IO (writeFile)
import GHC.Generics (Generic)
import Generics.Deriving.Monoid (GMonoid, gmempty, gmappend)
import qualified Net.Mac.Text as Mac
import qualified Net.IPv4.Text as IPv4
impo... | paluh/systemd-config | src/System/Systemd/Config/Networkd/Network.hs | bsd-3-clause | 4,868 | 0 | 15 | 845 | 1,339 | 764 | 575 | -1 | -1 |
{-# language CPP #-}
{-# language QuasiQuotes #-}
{-# language TemplateHaskell #-}
#if __GLASGOW_HASKELL__ >= 800
{-# options_ghc -Wno-redundant-constraints #-}
#endif
module OpenCV.ImgProc.MiscImgTransform
( -- * Color conversion
cvtColor
, module OpenCV.ImgProc.MiscImgTransform.ColorCodes
-- * ... | Cortlandd/haskell-opencv | src/OpenCV/ImgProc/MiscImgTransform.hs | bsd-3-clause | 16,774 | 0 | 21 | 4,155 | 1,611 | 905 | 706 | -1 | -1 |
-- TODO: check that every occurrence of "die" should really be a death, and not just a "fix-it-up-and-warn"
-- boilerplate {{{
{-# LANGUAGE NoMonomorphismRestriction, FlexibleContexts #-}
module Data.SGF.Parse (
collection,
clipDate,
PropertyType(..),
properties,
extraProperties,
Property(..),
... | dmwit/sgf | Data/SGF/Parse.hs | bsd-3-clause | 23,384 | 0 | 21 | 6,411 | 7,864 | 4,185 | 3,679 | 397 | 9 |
-- 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 NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
module Duckling.Time.Corpus
( datetime
, ... | facebookincubator/duckling | Duckling/Time/Corpus.hs | bsd-3-clause | 2,652 | 0 | 13 | 473 | 816 | 444 | 372 | 55 | 3 |
{-# LANGUAGE DeriveDataTypeable, RecordWildCards, OverloadedStrings #-}
module Network.IRC.Bot.Types
( User(..)
, nullUser
) where
import Data.ByteString (ByteString)
import Data.Data (Data, Typeable)
import Network.IRC as I
import Network (HostName)
d... | eigengrau/haskell-ircbot | Network/IRC/Bot/Types.hs | bsd-3-clause | 820 | 0 | 8 | 281 | 159 | 101 | 58 | 19 | 1 |
----------------------------------------------------------------------------
-- |
-- Module : Haskell.Language.Lexer.Preprocessor.Tests
-- Copyright : (c) Sergey Vinokurov 2017
-- License : BSD3-style (see LICENSE)
-- Maintainer : serg.foo@gmail.com
-- Created : 29 May 2017
------------------------... | sergv/tags-server | tests/Haskell/Language/Lexer/Preprocessor/Tests.hs | bsd-3-clause | 4,822 | 0 | 15 | 1,456 | 775 | 414 | 361 | 87 | 1 |
module Main (main) where
import Control.Monad
import System.Environment(getArgs)
import System.Exit
import Data.Char
import Data.Map (Map, (!))
import qualified Data.Map as M
import Util.Command
import Genome.Dna.Kmer
import Genome.Dna.Dna
main :: IO ()
main = do
args <- getArgs
dispatch args
dispatch :: ... | visood/bioalgo | app/cltools/Main.hs | bsd-3-clause | 631 | 0 | 9 | 133 | 231 | 127 | 104 | 22 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
module Api.Invoice
( Identifier (..)
, WithInvoice
, resource
, invoiceFromIdentifier
) where
import Control.Applicative
import Control.Concurrent.STM (STM, TVar, atomically, modifyTVar, readTVar)
import Control.Monad (unless)
import Control.Monad.Error (ErrorT, throwError... | tinkerthaler/basic-invoice-rest | example-api/Api/Invoice.hs | bsd-3-clause | 5,195 | 0 | 20 | 1,044 | 1,492 | 792 | 700 | 111 | 3 |
-- | This is a parser for HTML documents. Unlike for XML documents, it
-- must include a certain amount of error-correction to account for
-- HTML features like self-terminating tags, unterminated tags, and
-- incorrect nesting. The input is tokenised by the
-- XML lexer (a separate lexer is not required for ... | FranklinChen/hugs98-plus-Sep2006 | packages/HaXml/src/Text/XML/HaXml/Html/Parse.hs | bsd-3-clause | 23,765 | 0 | 27 | 6,694 | 5,501 | 2,975 | 2,526 | 334 | 5 |
-- Needed to ensure correctness, and because we can't guarantee rules fire
-- The MagicHash is for unboxed primitives (-fglasgow-exts also works)
-- We only need MagicHash if on GHC, but we can't hide it in an #ifdef
{-# LANGUAGE CPP
, MultiParamTypeClasses
, FlexibleInstances
#-}
... | wrengr/logfloat | src/Data/Number/RealToFrac.hs | bsd-3-clause | 4,913 | 0 | 9 | 999 | 507 | 308 | 199 | 22 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.