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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# OPTIONS -Wall #-}
{-# LANGUAGE ScopedTypeVariables #-}
main :: IO ()
main = do
depths :: [Int] <- map read . filter (not . null) . lines <$> getContents
let windows = map (\(a, b, c) -> a + b + c) $ zip3 depths (tail depths) (tail (tail depths))
let answer = length $ filter id $ zipWith (<) windows (tail win... | SamirTalwar/advent-of-code | 2021/AOC_01_2.hs | mit | 341 | 0 | 15 | 75 | 164 | 82 | 82 | 8 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ses-configurationseteventdestination.html
module Stratosphere.Resources.SESConfigurationSetEventDestination whe... | frontrowed/stratosphere | library-gen/Stratosphere/Resources/SESConfigurationSetEventDestination.hs | mit | 2,939 | 0 | 15 | 255 | 273 | 159 | 114 | 32 | 1 |
{- |
Module : $Header$
Description : Sentence for HolLight logic
Copyright : (c) Jonathan von Schroeder, DFKI GmbH 2010
License : GPLv2 or higher, see LICENSE.txt
Maintainer : jonathan.von_schroeder@dfki.de
Stability : experimental
Portability : portable
Definition of sentences for HolLight logic... | nevrenato/HetsAlloy | HolLight/Sentence.hs | gpl-2.0 | 12,890 | 2 | 43 | 6,388 | 4,078 | 2,087 | 1,991 | 266 | 52 |
{-# LANGUAGE TemplateHaskell #-}
{-| Lenses for Ganeti config objects
-}
{-
Copyright (C) 2014 Google Inc.
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 ... | ribag/ganeti-experiments | src/Ganeti/Objects/Lens.hs | gpl-2.0 | 3,203 | 0 | 10 | 512 | 596 | 304 | 292 | 70 | 0 |
module Tokens where
data Token = A | B | C
deriving Eq
instance Show Token where
show A = "番"
show B = "茄"
show C = "干"
| brainbush/Tomato-Programming-Language | Tokens.hs | gpl-2.0 | 142 | 0 | 6 | 45 | 52 | 29 | 23 | 7 | 0 |
{-# LANGUAGE
FlexibleInstances
, FlexibleContexts
, UndecidableInstances
, TypeFamilies
#-}
module VirMat.Core.VoronoiMicro
( mkVoronoiMicro
, VoronoiMicro
) where
import Data.IntMap (IntMap)
import Hammer.MicroGraph
import Linear.Vect
import qualified Data.IntMap as IM
import DeUni.Dim2.Base2D (fa... | lostbean/VirMat | src/VirMat/Core/VoronoiMicro.hs | gpl-3.0 | 2,345 | 0 | 16 | 463 | 801 | 437 | 364 | 65 | 1 |
module Utilities where
-- |Converts an amplitude value (between -1.0 to 1.0) to a dB value.
amplitude2db :: Double -> Double
amplitude2db x = 20.0 * logBase 10.0 x
-- |Converts a dB value (e.g. -6.0 for -6.0dB) to an amplitude value.
db2amplitude :: Double -> Double
db2amplitude x = 10.0 ** (x / 20.0)
-- |Renders... | Jannis/haskell-dsp-experiments | utilities.hs | gpl-3.0 | 766 | 0 | 11 | 159 | 208 | 108 | 100 | 12 | 1 |
-- | Domain, any-Domain.
module Domains.Domain where
import Domains.Dimensionable
import Domains.DomainElement
-- | Defines a multi-component domain class.
class (Dimensionable a) => Domain a where
-- | Cardinal number of domain.
cardinality :: a -> Int
-- | Returns n-th component of d... | mrlovre/super-memory | Pro1/src/Domains/Domain.hs | gpl-3.0 | 1,955 | 0 | 14 | 453 | 477 | 255 | 222 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module While.Domain.Congruence.Semantics where
import Abstat.Interface.GaloisConnection
import Abstat.Interface.State
import Abstat.Interface.Lattice
import Abstat.Interface.AbstractDomain()
import While.AST
import While.AbstractSemantics
import While.Domain.Con... | fpoli/abstat | src/While/Domain/Congruence/Semantics.hs | gpl-3.0 | 4,360 | 0 | 19 | 1,781 | 1,527 | 811 | 716 | 90 | 0 |
-- | Defines an abstraction for the game controller and the functions to read
-- it.
--
-- Lower-level devices replicate the higher-level API, and should accomodate to
-- it. Each device should:
--
-- - Upon initialisation, return any necessary information to poll it again.
--
-- - Update the controller with its ... | keera-studios/pang-a-lambda | Experiments/collisions/Input.hs | gpl-3.0 | 4,197 | 0 | 12 | 1,000 | 861 | 485 | 376 | 52 | 15 |
module Automatic.TextureTest where
import Graphics.UI.SDL2
import System.Mem(performGC)
windowWidth = 320
windowHeight = 240
mkWindowAndRenderer =
withWindowAndRenderer
"Test: drawLine"
WinPosCentered
WinPosCentered
windowWidth
windowHeight
[WindowShown]
(-1)
[RendererAccelerated]
... | EJahren/haskell-sdl2 | Tests/Automatic/TextureTest.hs | gpl-3.0 | 680 | 0 | 10 | 143 | 172 | 87 | 85 | 30 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.SQLAdmin.Types.Sum
-- Copyright : (c) 2015-2016 Brenda... | rueshyna/gogol | gogol-sqladmin/gen/Network/Google/SQLAdmin/Types/Sum.hs | mpl-2.0 | 600 | 0 | 4 | 109 | 29 | 25 | 4 | 8 | 0 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverlappingInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
-- | Data structures used for DCB computation.
module DCB.Structures where
import Data.Array.Repa as A hiding ((++))
import Data.Int
import Util
-- | a one-dimensional arr... | Drezil/hgraph | src/DCB/Structures.hs | agpl-3.0 | 2,326 | 0 | 15 | 734 | 328 | 199 | 129 | 26 | 0 |
{-# LANGUAGE
TypeFamilies,
FlexibleInstances #-}
module OrdSet where
import Set
data Extended x = NegInf | PosInf | Finite x
deriving(Show,Eq)
isFinite :: Extended x -> Bool
isFinite (Finite a) = True
isFinite _ = False
instance Ord x => Ord (Extended x) where
NegInf <= _ = True
_ <= PosInf = True
... | ntoronto/drbayes | drbayes/direct/haskell-impl/OrdSet.hs | lgpl-3.0 | 4,466 | 0 | 18 | 1,463 | 1,926 | 976 | 950 | 103 | 4 |
module ViperVM.Platform.Proc (
Proc(..), wrapProc, procInfo, procCapabilities,
procName, procVendor, procSupports
) where
import ViperVM.Platform.Memory
import ViperVM.Platform.ProcessorCapabilities
import qualified ViperVM.Platform.Peer.ProcPeer as Peer
import Data.Set (Set, member)
import qualified Data.Set ... | hsyl20/HViperVM | lib/ViperVM/Platform/Proc.hs | lgpl-3.0 | 1,688 | 0 | 16 | 319 | 495 | 272 | 223 | 37 | 1 |
data BookInfo = Book Int String [String]
deriving (Show)
data MagazineInfo = Magazine Int String [String]
deriving (Show)
type CustomerID = Int --- Type synonym
type ReviewBody = String
data BookReview = BookReview BookInfo CustomerID String
data BetterReviw = Bette... | caiorss/Functional-Programming | haskell/rwh/ch03/BookStore3.hs | unlicense | 636 | 0 | 7 | 162 | 170 | 94 | 76 | 14 | 1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module MT.Class (
MonadT(..)
) where
import Monad
class MonadT t where
lift :: (Monad m) => m a -> t m a
| seckcoder/lang-learn | haskell/lambda-calculus/src/MT/Class.hs | unlicense | 200 | 0 | 9 | 52 | 55 | 31 | 24 | 7 | 0 |
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE RebindableSyntax #-}
module RebindableSyntax where
import Prelude hiding (return, (>>), (>>=))
concatNums :: String
concatNums = do
"80"
"60"
"10"
where
(>>) = (++)
return x = x
... | haroldcarr/learn-haskell-coq-ml-etc | haskell/playpen/misc/src/RebindableSyntax.hs | unlicense | 405 | 0 | 7 | 110 | 109 | 65 | 44 | 19 | 1 |
class Node a where
children::(Node a)=>a->[a]
--data LatticePoint a b = LatticePoint a b deriving Show
type LatticePoint = (Int, Int)
instance Node Int where
--children::(LatticePoint Int Int)->[LatticePoint Int Int]
--children (LatticePoint a b) = [(LatticePoint (a+1) b), (LatticePoint (a-1) b), (Lattice... | Crazycolorz5/Haskell-Code | searchAlgorithms.hs | unlicense | 756 | 2 | 9 | 114 | 176 | 101 | 75 | 7 | 0 |
module L2ARP where
import L2
import L3Address
instance L2Message L2ARP where
msgType _ = L2PacketType
instance L2Packet L2ARP where
pktType _ = L2PacketTypeARP
data L2ARP = L2ARPRequest L3Address | L2ARPResponse L3Address
-- note: 'MAC' address is not in the message body, it should be obtained from the envel... | hdb3/FPR2 | L2ARP.hs | apache-2.0 | 324 | 0 | 6 | 59 | 57 | 32 | 25 | 8 | 0 |
module S2E6 where
import Data.List
sublist :: (Eq a) => [a] -> [a] -> Bool
sublist xs ys = any (sublist' xs) (tails ys)
sublist' :: (Eq a) => [a] -> [a] -> Bool
sublist' [] _ = True
sublist' _ [] = False
sublist' (x:xs) (y:ys) = x == y && sublist' xs ys
partial :: (Eq a) => [a] -> [a] -> Bool
partial [] _ = True
par... | wouwouwou/module_8 | src/main/haskell/series2/exercise6.hs | apache-2.0 | 439 | 0 | 8 | 117 | 265 | 139 | 126 | 13 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ParallelListComp #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE ViewPatterns #-}
{-
Copyright 2018 The CodeWorld Authors. All rights reserved.
Licensed ... | tgdavies/codeworld | codeworld-api/src/CodeWorld/CollaborationUI.hs | apache-2.0 | 8,286 | 1 | 19 | 2,111 | 3,016 | 1,519 | 1,497 | 186 | 2 |
module Y15.D18 where
import qualified Data.Vector.Unboxed as VU
import Data.Vector.Unboxed.Mutable (MVector)
import qualified Data.Vector.Unboxed.Mutable as VUM
import Util
import Imports
data YX = YX Int Int
data Board m = Board
{ bounds :: (YX, YX) -- (min,max) coo... | oshyshko/adventofcode | src/Y15/D18.hs | bsd-3-clause | 3,238 | 0 | 14 | 996 | 1,510 | 771 | 739 | -1 | -1 |
------------------------------------------------------------------------------
-- |
-- Module : GGTD.Relation
-- Copyright : (C) 2016 Samuli Thomasson
-- License : %% (see the file LICENSE)
-- Maintainer : Samuli Thomasson <samuli.thomasson@paivola.fi>
-- Stability : experimental
-- Portabi... | SimSaladin/ggtd | src/GGTD/Relation.hs | bsd-3-clause | 1,730 | 0 | 5 | 309 | 102 | 73 | 29 | 12 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Web.Server (
runServer
) where
import Control.Concurrent.Async (mapConcurrently)
import Control.Monad (forM_)
import Control.Monad.IO.Class (liftIO)
import Data.List (nub, sort)
import qualified Data.Text.Lazy as TL
import ... | sulami/tinfoilsub | src/Web/Server.hs | bsd-3-clause | 1,483 | 0 | 17 | 354 | 473 | 239 | 234 | 42 | 1 |
module Process.PeerChan
( PeerEventMessage
, PeerEventChannel
) where
import Control.Concurrent
import Control.Concurrent.STM
import qualified Data.ByteString as B
import Data.Word (Word8)
import Torrent
type BitField = B.ByteString
data PeerMessage
= KeepAlive
| Choke
| Unchoke
| Int... | artems/htorr | src/Process/PeerChan.hs | bsd-3-clause | 1,174 | 0 | 7 | 270 | 242 | 145 | 97 | 43 | 0 |
{-# LANGUAGE ForeignFunctionInterface, EmptyDataDecls #-}
{-# OPTIONS_GHC -fno-cse -fno-full-laziness #-}
-- | Low-level interface to Expat. Unless speed is paramount, this should
-- normally be avoided in favour of the interfaces provided by
-- 'Text.XML.Expat.SAX' and 'Text.XML.Expat.Tree', etc.
module Text.XML.Exp... | the-real-blackh/hexpat | Text/XML/Expat/Internal/IO.hs | bsd-3-clause | 8,465 | 0 | 26 | 2,065 | 1,983 | 1,026 | 957 | -1 | -1 |
-- |
-- Maintainer : Ralf Laemmel, Joost Visser
-- Stability : experimental
-- Portability : portable
--
-- This module is part of 'StrategyLib', a library of functional strategy
-- combinators, including combinators for generic traversal. In this module, we
-- define path combinator to constrain selection and transfo... | forste/haReFork | StrategyLib-4.0-beta/library/PathTheme.hs | bsd-3-clause | 2,864 | 2 | 9 | 672 | 520 | 277 | 243 | 26 | 1 |
{-# LANGUAGE CPP #-}
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Trustworthy #-}
#endif
{-# LANGUAGE TypeFamilies, MultiParamTypeClasses, TypeOperators, FlexibleContexts, FlexibleInstances, UndecidableInstances #-}
-------------------------------------------------------------------------... | ekmett/categories | old/src/Control/Category/Cartesian.hs | bsd-3-clause | 4,380 | 43 | 11 | 967 | 1,199 | 652 | 547 | 62 | 1 |
{-# LANGUAGE RankNTypes #-}
module Prisms where
import Control.Lens hiding (elements)
import Control.Lens.Properties
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck
import Ceilometer.Types
import SampleData
suite :... | anchor/ceilometer-common | tests/Prisms.hs | bsd-3-clause | 3,383 | 1 | 17 | 846 | 657 | 292 | 365 | 51 | 1 |
-- | Make a 'Stream' of media a segmented stream by using that has content which is an instance of 'CanSegment'.
-- TODO move or merge - after deciding howto proceed with the package structure in general
module Data.MediaBus.Conduit.Segment
( segmentC,
forgetSegmentationC,
)
where
import Conduit (ConduitT, awa... | lindenbaum/mediabus | src/Data/MediaBus/Conduit/Segment.hs | bsd-3-clause | 3,700 | 0 | 19 | 1,049 | 962 | 514 | 448 | -1 | -1 |
{-
(c) The AQUA Project, Glasgow University, 1993-1998
\section[SimplMonad]{The simplifier Monad}
-}
{-# LANGUAGE DeriveFunctor #-}
module SimplMonad (
-- The monad
SimplM,
initSmpl, traceSmpl,
getSimplRules, getFamEnvs,
-- Unique supply
MonadUnique(..), newId, newJoin... | sdiehl/ghc | compiler/simplCore/SimplMonad.hs | bsd-3-clause | 9,198 | 0 | 15 | 2,895 | 1,901 | 1,046 | 855 | 157 | 2 |
module Main where
import Data.Array.MArray
import Data.Array.Storable
import Foreign.Ptr
import Graphics.UI.GLFW as GLFW
import Graphics.Rendering.OpenGL.GL as GL
import LOGL.Application
vertices = [-0.5, -0.5, 0.0,
0.5, -0.5, 0.0,
0.0, 0.5, 0.0]
-- Shaders
vertexShaderSource = "#version 330 core\n"
+... | atwupack/LearnOpenGL | app/1_Getting-started/2_Hello-triangle/Hello-triangle.hs | bsd-3-clause | 2,626 | 0 | 11 | 615 | 746 | 352 | 394 | 79 | 1 |
{-# LANGUAGE DataKinds #-}
module Main where
import Protolude
import Network.Wai.Test
import GraphQL.API
import GraphQL.Wai
import GraphQL.Resolver
type Cat = Object "Cat" '[] '[Field "name" Text]
catHandler :: Handler IO Cat
catHandler = pure (pure "Felix")
test1 :: Session ()
test1 = do
r <- request $ setPath ... | jml/graphql-api | graphql-wai/tests/Tests.hs | bsd-3-clause | 507 | 0 | 11 | 86 | 164 | 84 | 80 | -1 | -1 |
-- | This module defines `WindowHandler`, a source of GLFW Events that are
-- received through a particular `GLFW.Window`. It is not necessary to
-- import this module unless you need to register callbacks outside of
-- reactive-banana.
--
-- This module should usually be imported qualified because it exports
-- names ... | cdxr/reactive-banana-glfw | Reactive/Banana/GLFW/WindowHandler.hs | bsd-3-clause | 3,004 | 0 | 20 | 711 | 819 | 447 | 372 | 60 | 1 |
module Main (main) where
-- This examples contains a simple Characteristic which only allows encrypted
-- authenticated reads. If the device pairing was not authenticated and
-- encrypted, the characteristic cannot be read. The default bluetooth agent
-- can handle PIN authentication. Check that the relevant device is... | plow-technologies/ble | examples/Auth.hs | bsd-3-clause | 1,182 | 0 | 11 | 213 | 215 | 116 | 99 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
import qualified System.EtCetera.CollectdSpec as CollectdSpec
import qualified System.EtCetera.InternalSpec as InternalSpec
import qualified System.EtCetera.InterfacesSpec as InterfacesSpec
import qualified System.EtCetera.LxcSpec as LxcSpec
import qualified System.EtCetera.RedisSpec... | paluh/et-cetera | test/Spec.hs | bsd-3-clause | 502 | 0 | 8 | 68 | 101 | 62 | 39 | 14 | 1 |
{-# LANGUAGE BangPatterns, CPP, NondecreasingIndentation, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
-- NB: we specifically ignore deprecations. GHC 7.6 marks the .QSem module as
-- deprecated, although it became un-deprecated later. As a result, using 7.6
-- as your bootstrap compiler ... | vikraman/ghc | compiler/main/GhcMake.hs | bsd-3-clause | 88,794 | 9 | 35 | 28,133 | 14,533 | 7,430 | 7,103 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS -Wall -fno-warn-missing-signatures #-}
-- | Ghc compatibility layer.
module Haskell.Docs.Ghc where
import Haskell.Docs.Types
import Control.Exception (SomeException)
import GHC hiding (verbosity)
... | chrisbarrett/haskell-docs | src/Haskell/Docs/Ghc.hs | bsd-3-clause | 3,236 | 0 | 18 | 725 | 580 | 317 | 263 | 44 | 2 |
-- Simple example reads a C file, extracts comments, and prints them.
-- Build with something like this:
-- ghc -package-conf ../dist/package.conf.inplace --make Main.hs
import Language.C
import Language.C.Comments
import System (getArgs)
import Text.Printf
printComment :: Comment -> IO ()
printComment c = do
let p... | ghulette/language-c-comments | examples/Main.hs | bsd-3-clause | 712 | 0 | 11 | 153 | 191 | 92 | 99 | 21 | 1 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE ViewPatterns #-}
module Comonad where
import Data.Function
import Data.Semigroup
import Control.Comonad
data Stream a = a :> Stream a deriving Functor
instance Comonad Stream where
extract (a :> _) = a
duplicate a@(_ :> as) = a :> duplicate as
newtype Embed f a = Em... | isovector/dependent-types | src/Comonad.hs | bsd-3-clause | 2,532 | 0 | 12 | 607 | 1,208 | 617 | 591 | 62 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
module AminoAcid
( AminoAcid (..)
, Radical (..)
, Hydrated (..)
, HydratedAminoAcid
, AtomType (..)
, atomCoordinates
, atomHydrogens
, connections
, atoms
) where
import Data.Data (Data, Typ... | mosigo/haskell-sandbox | src/AminoAcid.hs | bsd-3-clause | 33,381 | 0 | 25 | 13,808 | 10,757 | 5,481 | 5,276 | 725 | 88 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.ARB.VertexShader
-- Copyright : (c) Sven Panne 2015
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : portable
--... | phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/ARB/VertexShader.hs | bsd-3-clause | 2,647 | 0 | 4 | 298 | 259 | 180 | 79 | 75 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
module Lambda.Convertor.Type where
import DeepControl.Applicative
import DeepControl.Monad hiding (forM, mapM)
import Lambda.DataType (Name, Lambda)
import Lambda.DataType.Type
import Util.Pseudo
import Prelude hiding (forM, mapM)
import Data.Monoid
import Data.Foldable
import ... | ocean0yohsuke/Simply-Typed-Lambda | src/Lambda/Convertor/Type.hs | bsd-3-clause | 920 | 0 | 8 | 240 | 371 | 194 | 177 | 26 | 0 |
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module TestImport where
import Data.Aeson
import GHC.Generics
import Data.Serialize
import Data.Aeson.Serialize
import Control.Applicative ... | plow-technologies/simple-cell | test/TestImport.hs | bsd-3-clause | 5,412 | 0 | 14 | 1,378 | 1,251 | 648 | 603 | 116 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
--... | flaviusb/moss-submitter-webapp | src/Settings.hs | mit | 5,824 | 0 | 12 | 1,573 | 732 | 422 | 310 | 79 | 2 |
module Examples.MostReliablePath
( mrExamples
) where
import Utils
import Algebra.Matrix
import Algebra.Semiring
import Policy.MostReliablePath
mrExamples :: Int -> Matrix MostReliablePath
mrExamples 0 = M (toArray 5 [ zero , MR 0.1, MR 0.4, zero , MR 0.5
, MR 0.1, zero , MR 0.4, zer... | sdynerow/Semirings-Library | haskell/Examples/MostReliablePath.hs | apache-2.0 | 600 | 0 | 9 | 215 | 188 | 102 | 86 | 13 | 1 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="pt-BR">
<title>Substituto |Extensão ZAP</title>
<maps>
<homeID>top</homeID>
<mapref lo... | veggiespam/zap-extensions | addOns/replacer/src/main/javahelp/org/zaproxy/zap/extension/replacer/resources/help_pt_BR/helpset_pt_BR.hs | apache-2.0 | 973 | 80 | 66 | 158 | 418 | 211 | 207 | -1 | -1 |
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE PatternSynonyms #-}
module Hans.IP4.Input (
processArp,
processIP4,
handleIP4,
) where
import Hans.Checksum (computeChecksum)
import Hans.Device (Device(..),ChecksumOffload(..),rxOffload)
import Hans.Ethernet (Mac,pattern ETYPE_ARP,sendEthernet)
import Hans.... | GaloisInc/HaNS | src/Hans/IP4/Input.hs | bsd-3-clause | 6,239 | 0 | 19 | 1,587 | 1,454 | 760 | 694 | 94 | 5 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
--------------------------------------------------------------------------------
-- |
-- Module : Data.Rakhana.Nursery
-- Copyright : (C) 2014 Yorick Laupa
-- License : (see the file LICENSE)
--
-- Maintainer : Y... | erantapaa/rakhana | Data/Rakhana/Nursery.hs | bsd-3-clause | 18,119 | 0 | 21 | 5,470 | 3,708 | 1,869 | 1,839 | -1 | -1 |
{-# LANGUAGE NamedFieldPuns #-}
module CmdLine where
import Data.List (intersperse)
import System.Console.GetOpt
import Text.PrettyPrint
--------------------------------------------------------------------------------
-- Command line interaction
class PShow a where
pshow :: a -> String
class PRead a where
prea... | VCTLabs/cbmc-reporter | src/CmdLine.hs | bsd-3-clause | 9,177 | 0 | 16 | 2,907 | 2,121 | 1,169 | 952 | 219 | 6 |
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import qualified GitHub as GH
main :: IO ()
main = do
possibleUser <- GH.executeRequest' $ GH.userInfoForR "phadej"
print possibleUser
| jwiegley/github | samples/Users/ShowUser2.hs | bsd-3-clause | 205 | 0 | 10 | 38 | 55 | 30 | 25 | 7 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
{- |
Module : $Header$
Copyright : (c) Klaus Hartke, Uni Bremen 2008
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : experimental
Portability : non-portable (MPTC-FD)
-}
module Kripke where... | keithodulaigh/Hets | Temporal/Kripke.hs | gpl-2.0 | 752 | 0 | 9 | 135 | 91 | 51 | 40 | 8 | 0 |
{-|
Module : Idris.Core.WHNF
Description : Reduction to Weak Head Normal Form
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE PatternGuards #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.Core.WHNF(whnf, whnfArgs, WEnv) where
import Idris.Core.CaseTree
import I... | jmitchell/Idris-dev | src/Idris/Core/WHNF.hs | bsd-3-clause | 10,764 | 0 | 19 | 3,868 | 3,954 | 2,019 | 1,935 | 188 | 45 |
{-# LANGUAGE ScopedTypeVariables #-}
-- Test #246
module Main where
import Control.Exception
data T = T { x :: Bool, y :: Bool }
f (T { y=True, x=True }) = "Odd"
f _ = "OK"
g (T { x=True, y=True }) = "Odd2"
g _ = "Odd3"
funny = T { x = undefined, y = False }
main = do { ... | sdiehl/ghc | testsuite/tests/deSugar/should_run/T246.hs | bsd-3-clause | 697 | 0 | 11 | 279 | 185 | 108 | 77 | 13 | 1 |
-- | Pretty printing of graphs.
module GraphPpr (
dumpGraph,
dotGraph
)
where
import GraphBase
import Outputable
import Unique
import UniqSet
import UniqFM
import Data.List
import Data.Maybe
-- | Pretty print a graph in a somewhat human readable format.
dumpGraph
:: (Outputable k, Outputa... | spacekitteh/smcghc | compiler/utils/GraphPpr.hs | bsd-3-clause | 5,238 | 0 | 22 | 2,122 | 1,304 | 636 | 668 | 113 | 3 |
{-# OPTIONS_JHC -fno-prelude -fffi #-}
module System.Mem where
import Jhc.Prim.IO
foreign import ccall safe "hs_perform_gc" performGC :: IO ()
| m-alvarez/jhc | lib/jhc/System/Mem.hs | mit | 146 | 0 | 7 | 22 | 32 | 19 | 13 | 4 | 0 |
{-# LANGUAGE OverlappingInstances #-}
module C where
import A
import B
class Class1 a => Class2 a
instance Class2 B
| ryantm/ghc | testsuite/tests/ghci/prog007/C.hs | bsd-3-clause | 120 | 0 | 6 | 24 | 32 | 17 | 15 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE UnboxedTuples #-}
module UniqSupply (
-- * Main data type
UniqSupply, -- Abstractly
-- ** Operations on supplies
uniqFromSupply, uniqsFromSupply, -- basic ops
takeUn... | TomMD/ghc | compiler/basicTypes/UniqSupply.hs | bsd-3-clause | 7,329 | 0 | 28 | 1,981 | 1,557 | 850 | 707 | 102 | 1 |
module Records where
import Prelude ()
import BasicPrelude
import Data.Fixed (Centi)
import Control.Error (readMay)
import Data.Text.Encoding (encodeUtf8)
import Text.Blaze.Html (Html)
import Text.Blaze.Internal (MarkupM)
import Network.URI (URI)
import Text.Email.Validate (EmailAddress, validate)
import Data.Base58A... | singpolyma/rippleunion-interac | Records.hs | isc | 4,861 | 156 | 17 | 919 | 1,652 | 914 | 738 | 132 | 1 |
module Data where
import System.IO (Handle)
import Control.Monad.Reader (ReaderT, runReaderT)
import Control.Monad.IO.Class (liftIO)
import Database.Redis as R (Connection)
import Config (Config(..))
-- Convenience function to lift a computation from the IO Monad into the Bot monad.
-- Basically, it provides a type ... | jdiez17/HaskellHawk | Data.hs | mit | 619 | 0 | 9 | 130 | 156 | 94 | 62 | 16 | 1 |
module Rebase.GHC.IO.FD
(
module GHC.IO.FD
)
where
import GHC.IO.FD
| nikita-volkov/rebase | library/Rebase/GHC/IO/FD.hs | mit | 71 | 0 | 5 | 12 | 23 | 16 | 7 | 4 | 0 |
-- | This is a convenience module that reexports it's sub-modules
--
-- License: MIT
-- Maintainer: Montez Fitzpatrick
-- Stability: experimental
module Nexpose.API where
| m15k/hs-nexpose-client | nexpose/src/Nexpose/API.hs | mit | 179 | 0 | 3 | 33 | 11 | 9 | 2 | 1 | 0 |
-- Copyright (c) 2013 Radek Micek
--
-- This file is distributed under the terms of the MIT License.
-- Usage: OptApplyEval unoptimized.js optimized.js
--
-- Optimizes functions __IDR__.APPLY0 and __IDR__.EVAL0 by converting
-- the large if-else statement to switch.
import Data.List
import Control.Applicative
impor... | radekm/satviz | OptApplyEval.hs | mit | 1,992 | 0 | 11 | 543 | 552 | 309 | 243 | 47 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Text.Dot
main :: IO ()
main = renderToStdOut $ graph directed "example" $ do
a <- newNode
b <- newNode
c <- newNode
ranksame $ do
node_ a "a"
node_ c "c"
b <- node "b"
a --> b
c --> b
... | NorfairKing/haphviz | examples/ranksame.hs | mit | 321 | 0 | 11 | 142 | 103 | 46 | 57 | 13 | 1 |
module MathTests where
import Test.QuickCheck
import Test.HUnit
import System.IO
import TestAbstract
import Math
powModTests = TestList
[
TestCase $ assertEqual "powMod 4 13 497 should return 445." 445 (powMod 4 13 497),
TestCase $ assertEqual "powMod 46565 0 961748941 should return 1." 1... | Sobieck00/practice | utilities/nonvisualstudio/haskell/math/Tests.hs | mit | 1,949 | 0 | 11 | 420 | 448 | 230 | 218 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module StackIdePackage where
import Atom.CommandRegistry
import Atom.Decoration
import Atom.Marker
import Atom.Package
import Atom.TextEditor
import Control.Exception
import Control.Monad
import Data.IORef
import qualified Data.Text as T
import Data.Traversable
import GHCJS.Foreign
... | CRogers/stack-ide-atom | haskell/src/StackIdePackage.hs | mit | 1,698 | 9 | 26 | 328 | 514 | 255 | 259 | 51 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.HTMLDivElement
(js_setAlign, setAlign, js_getAlign, getAlign, HTMLDivElement,
castToHTMLDivElement, gTypeHTMLDivElement)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double... | manyoo/ghcjs-dom | ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/HTMLDivElement.hs | mit | 1,761 | 14 | 10 | 226 | 463 | 284 | 179 | 28 | 1 |
module Test.Week5 (week5) where
import Data.List (permutations)
import Test.Tasty
import Test.Tasty.HUnit
import Week5
import ExprT
import Parser
import qualified StackVM as S
week5 :: TestTree
week5 = testGroup "Week 5 - More polymorphism and type classes"
[
exercise1
, exercise2
, exercise3
, exercise4
... | taylor1791/cis-194-spring | test/Test/Week5.hs | mit | 1,919 | 0 | 16 | 501 | 785 | 404 | 381 | 58 | 1 |
-- Finding an appointment
-- http://www.codewars.com/kata/525f277c7103571f47000147/
-- Note: Tests fail due to ambiguous occurrence of `shuffle'
module FindingAnAppointment where
import Data.Maybe (listToMaybe)
import Control.Arrow ((***), (&&&))
import Data.List.Split (splitOn)
import Text.Printf (printf)
getStartT... | gafiatulin/codewars | src/3 kyu/FindingAnAppointment.hs | mit | 1,388 | 0 | 18 | 612 | 523 | 290 | 233 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Document.Tests.Lambdas where
-- Modules
import Document.Tests.Suite
import Logic.Expr.Const
import Logic.Proof
import Logic.Theories.FunctionTheory
import UnitB.Expr
-- Libraries
import Data.Map hiding ( map )
import qualified Data.Map as M
import Test.U... | literate-unitb/literate-unitb | src/Document/Tests/Lambdas.hs | mit | 65,368 | 0 | 17 | 25,962 | 5,827 | 3,664 | 2,163 | -1 | -1 |
module ParserTests where
class C a where
c :: a -> a
a1 :: C a => a -> a
a1 = c
a2 :: (a -> b) -> a -> b
a2 x = x
| antalsz/hs-to-coq | examples/tests/ParserTests.hs | mit | 119 | 0 | 7 | 41 | 71 | 38 | 33 | 7 | 1 |
{--
Copyright (c) 2014 Gorka Suárez García
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distri... | gorkinovich/Haskell | Problems/Problem0019.hs | mit | 6,830 | 0 | 13 | 1,789 | 1,915 | 1,048 | 867 | 117 | 3 |
{-# LANGUAGE RecursiveDo #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE GADTs #-}
module Editor where
import Reflex
import Reflex.Dom
import Reflex.Dom.Class
import Control.Monad.IO.Class
import Data.Set (Set)
import ... | osener/markup.rocks | src/Editor.hs | mit | 4,673 | 1 | 24 | 1,739 | 1,098 | 568 | 530 | 114 | 1 |
{-# LANGUAGE
RecordWildCards,
ExplicitNamespaces,
PolyKinds,
DataKinds,
ScopedTypeVariables
#-}
module ZipperN (
type ZipperN
) where
import Data.Array
import Data.List
import Data.Functor
import Data.Foldable
import Data.Traversable
import Data.Proxy
import Control.Applicative
import... | Solonarv/Zipper | ZipperN.hs | mit | 3,507 | 0 | 16 | 937 | 1,295 | 670 | 625 | 68 | 1 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
import Gelatin.SDL2 hiding (move)
import SDL
import Gelatin.FreeType2
import Odin.GUI
import Odin.Core
import Control.Lens
imp... | schell/odin | app/EntityMain.hs | mit | 2,378 | 0 | 26 | 779 | 677 | 328 | 349 | 63 | 4 |
{-# LANGUAGE ViewPatterns #-}
{- |
Used for building symmetrical sequences from one half of the symmetrical shape.
Eg: An oval can be described by giving the radius of the first 180 degrees, then reversing these first 180 degrees, and adding them on to the tail.
Note though, that the 180th degree would be there twice, ... | heathweiss/Tricad | src/Tests/Symmetrical/SequenceTest.hs | gpl-2.0 | 2,242 | 0 | 17 | 548 | 469 | 263 | 206 | 44 | 1 |
{-# OPTIONS -w -O0 #-}
{- |
Module : ExtModal/ATC_ExtModal.der.hs
Description : generated Typeable, ShATermConvertible instances
Copyright : (c) DFKI Bremen 2008
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : provisional
Portability : non-portable(over... | nevrenato/Hets_Fork | ExtModal/ATC_ExtModal.der.hs | gpl-2.0 | 2,873 | 0 | 4 | 308 | 145 | 101 | 44 | 22 | 0 |
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, DeriveDataTypeable
, FlexibleInstances, UndecidableInstances, ExistentialQuantification #-}
{- |
Module : $Header$
Description : interface and class for logic translations
Copyright : (c) Till Mossakowski, Uni Bremen 2002-2006
License : GPLv2 ... | nevrenato/HetsAlloy | Logic/Comorphism.hs | gpl-2.0 | 19,889 | 0 | 30 | 5,582 | 4,158 | 2,128 | 2,030 | 370 | 3 |
// Functor composition between Maybe and []
//
maybeTail :: [a] -> Maybe [a]
maybeTail [] = Nothing
maybeTail (x:xs) = Just xs
// The result of maybeTail is of a type thats a composition of two functors,
// Maybe and [], acting on a. Each of these functors has its own version of fmap.
square x = x * x
mis :: Maybe ... | sujeet4github/MyLangUtils | CategoryTheory_BartoszMilewsky/PI_07_Functors/MaybeTail.hs | gpl-3.0 | 944 | 39 | 9 | 195 | 469 | 242 | 227 | 8 | 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/Accounts/PublisherProFiles/List.hs | mpl-2.0 | 6,107 | 0 | 19 | 1,396 | 882 | 509 | 373 | 132 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-cloudidentity/gen/Network/Google/Resource/CloudIdentity/Groups/Memberships/Create.hs | mpl-2.0 | 5,199 | 0 | 17 | 1,173 | 783 | 457 | 326 | 114 | 1 |
{-
tempgres, REST service for creating temporary PostgreSQL databases.
Copyright (C) 2014-2020 Bardur Arantsson
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either versi... | ClockworkConsulting/tempgres-server | server/src/Tempgres/Mutex.hs | agpl-3.0 | 1,452 | 0 | 8 | 298 | 148 | 82 | 66 | 14 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module SchemaScaffold (prefixesOf, classInfos, scaffold) where
import Data.List (partition)
import Text.XML.Light
import Data.Text (unpack, toLower)
import Data.Map (toList)
import Swish.RDF
import Swish.Namespace (ScopedName, getScopeLocal)
import Swish.QName (getLName, LName)
imp... | LeifW/yaml2owl | src/SchemaScaffold.hs | lgpl-2.1 | 3,302 | 0 | 16 | 676 | 1,179 | 636 | 543 | 78 | 1 |
import System.Cmd
import System.Environment
import Control.Monad(when)
import Text.JSON
import Data.Array
import DataTypes
import Board
gameOver :: Board -> Bool
gameOver b = not (hasMovesFor b X || hasMovesFor b O)
count :: Board -> State -> Int
count b s = sum [ 1 | (i,j) <- indexes b , value b (i,j) == s ]
winne... | guiocavalcanti/haskell-reversi | MainCommand.hs | lgpl-3.0 | 1,416 | 0 | 25 | 426 | 629 | 312 | 317 | 46 | 4 |
{-# LANGUAGE NamedFieldPuns #-}
module Hecate.Backend.JSON.AppState
( EntriesMap
, AppState (..)
, mkAppState
, put
, delete
, query
, selectAll
, getCount
, getCountOfKeyId
) where
import qualified Data.Maybe as Maybe
import Data.Multimap (Multimap)
import qualified Data.Multimap as ... | henrytill/hecate | src/Hecate/Backend/JSON/AppState.hs | apache-2.0 | 2,775 | 0 | 12 | 585 | 889 | 473 | 416 | 62 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
module Quasar.Api.Http.Request where
import Control.Applicative
import Control.Lens
import qualified Data.ByteString as BS
import Data.Conduit.List (consume)
import Data.Conduit
import qualified Data.Text as T
import Data.Monoid
import Network.HTTP.Ty... | xdcrafts/Quasar | src/Quasar/Api/Http/Request.hs | apache-2.0 | 1,789 | 0 | 12 | 317 | 526 | 286 | 240 | 41 | 2 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QGraphicsPixmapItem_h.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:16
Warning : this file is machine genera... | keera-studios/hsQt | Qtc/Gui/QGraphicsPixmapItem_h.hs | bsd-2-clause | 99,447 | 0 | 18 | 20,812 | 30,664 | 14,671 | 15,993 | -1 | -1 |
module Widgets where
import Import
submitWidget :: GGWidget Jabaraster (GHandler Jabaraster Jabaraster) ()
submitWidget = do
addScriptRemote "https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"
$(widgetFile "submit")
submitWidget' :: Text -> GGWidget Jabaraster (GHandler Jabaraster Jabaraster) ()
s... | jabaraster/yefib | Widgets.hs | bsd-2-clause | 790 | 0 | 9 | 90 | 171 | 84 | 87 | 17 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# OPTIONS_HADDOCK hide #-}
module System.Hardware.Serialport.Windows where
import Data.Bits
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Unsafe as BU
import qualified System.Win32.Comm as Comm
import System.Win32.Types
import System.Win32.File
impor... | jputcu/serialport | System/Hardware/Serialport/Windows.hs | bsd-3-clause | 4,880 | 0 | 15 | 1,113 | 1,226 | 636 | 590 | 111 | 1 |
{-# OPTIONS_GHC -Wno-orphans #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
{-|
Module : AERN2.MP.WithCurrentPrec.Limit
Description : WithCurrentPrec limits
Copyright : (c) Michal... | michalkonecny/aern2 | aern2-mp/src/AERN2/MP/WithCurrentPrec/Limit.hs | bsd-3-clause | 1,881 | 0 | 14 | 450 | 493 | 255 | 238 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
module Sodium.Pascal.Convert (convert) where
import Prelude hiding (mapM)
import Control.Applicative
import Control.Monad.Reader hiding (mapM)
import qualified Data.Map as M
import Data.Traversable
import Control.Lens
-- S for Src, D for Dest
import qualified Sodium.Pascal.Program ... | kirbyfan64/sodium | src/Sodium/Pascal/Convert.hs | bsd-3-clause | 5,352 | 51 | 23 | 1,157 | 2,018 | 1,001 | 1,017 | -1 | -1 |
{-# language CPP #-}
{-# language DeriveFunctor #-}
{-# language DeriveTraversable #-}
{-# language MultiParamTypeClasses #-}
{-# language NoImplicitPrelude #-}
{-# language QuasiQuotes #-}
{-# language TemplateHaskell #-}
{-# language UndecidableInstances #-}
#if __GLASGOW_HASKELL__ >= 800
{-# options_ghc -Wno-redund... | Cortlandd/haskell-opencv | src/OpenCV/ImgProc/FeatureDetection.hs | bsd-3-clause | 16,829 | 0 | 28 | 4,095 | 2,099 | 1,155 | 944 | -1 | -1 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1998
\section[DataCon]{@DataCon@: Data Constructors}
-}
{-# LANGUAGE CPP, DeriveDataTypeable #-}
module DataCon (
-- * Main data types
DataCon, DataConRep(..),
SrcStrictness(..), SrcUnpackedness(..),
... | sdiehl/ghc | compiler/basicTypes/DataCon.hs | bsd-3-clause | 60,117 | 0 | 22 | 16,888 | 6,242 | 3,575 | 2,667 | 531 | 5 |
------------------------------------------------------------------------------
-- | Project Euler No. 7
--
-- 10001st prime number.
--
import Data.List (find)
import Data.Maybe (isNothing)
isqrt = ceiling . sqrt . fromIntegral
is_prime :: Int -> Bool
is_prime 2 = True
is_prime 3 = True
is_prime n = isNothing resul... | mazelife/project_euler | seven.hs | bsd-3-clause | 568 | 0 | 12 | 125 | 220 | 120 | 100 | 13 | 1 |
--
-- Circuit compiler for the Faerieplay hardware-assisted secure
-- computation project at Dartmouth College.
--
-- Copyright (C) 2003-2007, Alexander Iliev <sasho@cs.dartmouth.edu> and
-- Sean W. Smith <sws@cs.dartmouth.edu>
--
-- All rights reserved.
--
-- This code is released under a BSD license.
-- Please see LI... | ailiev/faerieplay-compiler | Faerieplay/GenHelper_SFDL.hs | bsd-3-clause | 561 | 0 | 7 | 94 | 52 | 36 | 16 | 4 | 1 |
{-|
Module : CSVdb.Base
Description : Implements basic CSV data types and core processing functionality
Copyright : (c) Nikos Karagiannidis, 2017
License : GPL-3
Maintainer : nkarag@gmail.com
Stability : experimental
Portability : POSIX
This offers functions for decoding a CS... | nkarag/haskell-CSVDB | src/CSVdb/Base.hs | bsd-3-clause | 35,490 | 0 | 32 | 14,351 | 2,811 | 1,630 | 1,181 | 234 | 9 |
-- | This is the filesystem module.
module Util.FileSystem (
-- * Data and Type
FDInfo(..),
Order, Predicate,
-- * Functions
toFDInfo,
lookover,
lookoverP,
traverse,
traverseP,
isDirectory,
) where
import Control.Monad (forM)
import Control.Applicative ((<$>),(<*>))
import... | ocean0yohsuke/Scheme | src/Util/FileSystem.hs | bsd-3-clause | 3,245 | 0 | 16 | 704 | 903 | 479 | 424 | 63 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
module Text.HTML.KURE
( -- * Reading HTML
parse... | ku-fpg/html-kure | Text/HTML/KURE.hs | bsd-3-clause | 13,948 | 26 | 23 | 4,252 | 3,825 | 1,993 | 1,832 | 253 | 8 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Prelude hiding (map)
import qualified Data.Vector.Storable as V
import Language.C.Quote.CUDA
import qualified Language.C.Syntax as C
#if !MIN_VERSION_template_haskell(2,7,0)
... | mainland/nikola | tests/Main.hs | bsd-3-clause | 2,001 | 0 | 11 | 712 | 401 | 232 | 169 | 39 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.