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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
------------------------------------------------------------------------------
-- | This module contains the ServerInfo data tyoe.
--
module Autotool.XmlRpc.Types.ServerInfo (
ServerInfo (..)
) where
------------------------------------------------------------------------------
import Network.XmlRpc.Internals
i... | j-hannes/autotool-xmlrpc-client | src/Autotool/XmlRpc/Types/ServerInfo.hs | bsd-3-clause | 1,194 | 0 | 11 | 286 | 247 | 135 | 112 | 21 | 0 |
module Main where
import GenericGame
import AgentGeneric
import BreakthroughGame
import Board
import ThreadLocal
import Data.Default
import Data.IORef
import Data.List (sort, group, groupBy)
import Control.Monad
import Control.Arrow
import Control.Concurrent
import Control.Concurrent.Async
main = runThrLocMainIO ... | Tener/deeplearning-thesis | src/breakthrough-driver.hs | bsd-3-clause | 1,813 | 0 | 19 | 638 | 469 | 238 | 231 | 42 | 2 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
module CLaSH.Util.Core.Types
( CoreBinding
, TypedThing(..)
, CoreContext(..)
, TransformState(..)
, TransformSession
, TransformStep
, tsTransformCounter
, tsBndrSubst
, tsUniqSupply
, emptyTransformState
)
where
-- Externa... | christiaanb/clash-tryout | src/CLaSH/Util/Core/Types.hs | bsd-3-clause | 2,032 | 0 | 11 | 410 | 496 | 287 | 209 | -1 | -1 |
module Data.Cauterize.Parser.Utils ( parens , quoted , spaces' ) where
import Text.Parsec
import Text.Parsec.Text
import Data.Text
import Control.Monad (liftM)
parens :: Parser a -> Parser a
parens a = do
_ <- char '('
a' <- a
_ <- char ')'
return a'
quoted :: Parser Text
quoted = do
_ <- char '"'
lif... | sw17ch/Z-ARCHIVED-hscauterize | Data/Cauterize/Parser/Utils.hs | bsd-3-clause | 407 | 0 | 10 | 89 | 164 | 83 | 81 | 17 | 1 |
{-# LANGUAGE ExtendedDefaultRules #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
-- |
module Ops.Cabal.Sandbox where
import Ops.Cabal.Common
import Data.List.Split (splitWhen)
import Data.Text (Text)
import qualified Data.Text as T
import... | diagrams/package-ops | src/Ops/Cabal/Sandbox.hs | bsd-3-clause | 973 | 0 | 16 | 261 | 276 | 146 | 130 | 29 | 3 |
{-# LANGUAGE NoImplicitPrelude #-}
module Bamboo.Theme.Blueprint.Control.Tag where
import Bamboo.Type (summary_for_tag)
import Bamboo.Type.State
import Bamboo.Theme.Blueprint.Atom.Post
import Bamboo.Theme.Blueprint.Control.Helper
import Bamboo.Theme.Blueprint.Env hiding (p, tag_id)
import Bamboo.Theme.Blueprint.Wid... | nfjinjing/bamboo-theme-blueprint | src/Bamboo/Theme/Blueprint/Control/Tag.hs | bsd-3-clause | 621 | 1 | 14 | 86 | 172 | 107 | 65 | -1 | -1 |
--
--
--
-----------------
-- Exercise 7.12.
-----------------
--
--
--
module E'7'12 where
import Prelude hiding ( minimum , maximum )
import qualified Data.List ( minimum )
import qualified Data.List ( maximum )
import GHC.Classes ( min )
import GHC.Classes ( max )
import Test.QuickCheck
-- Subchapter 7.4, ... | pascal-knodel/haskell-craft | _/links/E'7'12.hs | mit | 2,345 | 0 | 9 | 446 | 591 | 325 | 266 | -1 | -1 |
module UndefinedConstructor where
data Tree a = Bin (Tree a) (Tree a)
| Leaf a
main :: Tree Int
main = Binn (Leaf 3) (Leaf 5)
| roberth/uu-helium | test/staticerrors/UndefinedConstructor.hs | gpl-3.0 | 165 | 0 | 8 | 65 | 63 | 34 | 29 | 5 | 1 |
module ListWatched where
import qualified Github.Repos.Watching as Github
import Data.List (intercalate)
import Data.Maybe (fromMaybe)
main = do
possibleRepos <- Github.reposWatchedBy "mike-burns"
putStrLn $ either (("Error: "++) . show)
(intercalate "\n\n" . map formatRepo)
... | jwiegley/github | samples/Repos/Watching/ListWatched.hs | bsd-3-clause | 942 | 0 | 22 | 197 | 311 | 159 | 152 | 22 | 1 |
{-|
Module : Idris.Primitives
Description : Provision of primitive data types.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE PatternGuards, RankNTypes, ScopedTypeVariables #-}
module Idris.Primitives(primitives, Prim(..)) where
import Idris.AbsSyntax
import Idris.Core.Evalua... | ben-schulz/Idris-dev | src/Idris/Primitives.hs | bsd-3-clause | 23,585 | 0 | 14 | 5,366 | 11,370 | 5,892 | 5,478 | 449 | 8 |
module Hans.IP4.Dhcp.Options where
import Hans.IP4.Dhcp.Codec
import Hans.IP4.Packet (IP4,IP4Mask)
import qualified Control.Applicative as A
import Control.Monad (unless)
import Data.Maybe (fromMaybe)
import Data.Foldable (traverse_)
import qualified Data.Traversable as T
import ... | GaloisInc/HaNS | src/Hans/IP4/Dhcp/Options.hs | bsd-3-clause | 35,326 | 187 | 21 | 10,135 | 7,323 | 3,623 | 3,700 | 772 | 80 |
{-# LANGUAGE MagicHash #-}
module Test005 where
import RIO
import Prelude (print)
import Kask.Time
import GHC.Exts
fib1 :: Integer -> Integer
fib1 n
| n == 0 || n == 1 = n
| otherwise = fib1 (n - 1) + fib1 (n - 2)
fib2 :: Int -> Int
fib2 n
| n == 0 || n == 1 = n
| otherwise = fib2 (n - 1) + fib2 (n - 2)
fi... | kongra/kask-base | app/Test005.hs | bsd-3-clause | 682 | 0 | 12 | 189 | 348 | 170 | 178 | 28 | 3 |
{-# LANGUAGE ScopedTypeVariables #-}
-- |Utilities for filling 'BufferObject's.
module Graphics.GLUtil.BufferObjects where
import Data.Word (Word32)
import Graphics.Rendering.OpenGL
import Foreign.ForeignPtr
import Foreign.Ptr
import Foreign.Storable
import Data.Array.Storable
import qualified Data.Vector.Storable as V... | coghex/abridgefaraway | src/GLUtil/BufferObjects.hs | bsd-3-clause | 4,143 | 0 | 12 | 854 | 978 | 506 | 472 | 60 | 1 |
{-# LANGUAGE CPP, TemplateHaskell #-}
module Main where
#if METHOD == 1
import Data.Set.BUSplay
#else
import Data.Set.Splay
#endif
import Prelude hiding (minimum, maximum)
import Test.Framework.TH.Prime
import Test.Framework.Providers.DocTest.Prime
import Test.Framework.Providers.HUnit
import Test.HUnit
main :: IO ... | kazu-yamamoto/llrbtree | test/SplaySet.hs | bsd-3-clause | 3,582 | 0 | 8 | 1,027 | 1,154 | 603 | 551 | 104 | 1 |
{-#LANGUAGE NoImplicitPrelude #-}
{-#LANGUAGE OverloadedStrings #-}
{-#LANGUAGE TypeFamilies #-}
{-#LANGUAGE MultiParamTypeClasses #-}
{-#LANGUAGE FlexibleInstances #-}
{-#LANGUAGE FlexibleContexts #-}
{-#LANGUAGE LambdaCase #-}
{-#LANGUAGE DeriveGeneric #-}
{-#LANGUAGE DeriveFunctor #-}
{-#LANGUAGE TypeApplications #-... | tdammers/templar | src/Web/Sprinkles/Backends/Data.hs | bsd-3-clause | 10,824 | 1 | 20 | 3,248 | 2,821 | 1,502 | 1,319 | 240 | 3 |
import Control.Monad
import Language.Haskell.Interpreter
main :: IO ()
main = do r <- runInterpreter testHint
case r of
Left err -> printInterpreterError err
Right () -> putStrLn "that's all folks"
-- observe that Interpreter () is an alias for InterpreterT IO ()
testHint :: Interpre... | hakaru-dev/hint-exts | examples/example.hs | bsd-3-clause | 2,309 | 0 | 12 | 662 | 538 | 250 | 288 | 48 | 2 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[Foreign]{Foreign calls}
-}
{-# LANGUAGE DeriveDataTypeable #-}
module ForeignCall (
ForeignCall(..), isSafeForeignCall,
Safety(..), playSafe, playInterruptible,
CExportSpec(..), CLabelString, isCLabelString, pprCLabelStrin... | christiaanb/ghc | compiler/prelude/ForeignCall.hs | bsd-3-clause | 11,568 | 0 | 15 | 3,944 | 2,107 | 1,058 | 1,049 | 199 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Text.Parsec.String
-- Copyright : (c) Paolo Martini 2007
-- License : BSD-style (see the file libraries/parsec/LICENSE)
--
-- Maintainer : derek.a.elkins@gmail.com
-- Stability : provisional
-- Portability... | scott-fleischman/parsec | Text/Parsec/String.hs | bsd-2-clause | 1,256 | 0 | 10 | 281 | 148 | 90 | 58 | 10 | 1 |
module Fields where
data Point = P {x,y::Int} | Q {z::Int}
origin = P { x=0, y=0 }
h = P {x=1,y=1}
v = origin {y=1}
u = P {}
sq x = x*x
dist1 p = sq (x p) + sq (y p)
dist2 P{x=x,y=y} = sq x+sq y
--data Z = Z {z::Int}
data Thread s = T { name::String, status::s}
data Running = Running
data Runanble = Runnable (I... | forste/haReFork | tools/hs2alfa/tests/Fields.hs | bsd-3-clause | 361 | 0 | 9 | 86 | 231 | 133 | 98 | 13 | 1 |
{-# LANGUAGE ViewPatterns, GADTs, FlexibleInstances, UndecidableInstances,
CPP #-}
#if __GLASGOW_HASKELL__ <= 708
{-# LANGUAGE OverlappingInstances #-}
{-# OPTIONS_GHC -fno-warn-unrecognised-pragmas #-}
#endif
{-# OPTIONS_GHC -fno-warn-orphans #-}
-------------------------------------------------------... | ajnsit/glambda | src/Language/Glambda/Pretty.hs | bsd-3-clause | 4,454 | 0 | 14 | 981 | 1,188 | 651 | 537 | 77 | 1 |
module T6082_RULE where
-- Should warn
foo1 x = x
{-# RULES "foo1" forall x. foo1 x = x #-}
-- Should warn
foo2 x = x
{-# INLINE foo2 #-}
{-# RULES "foo2" forall x. foo2 x = x #-}
-- Should not warn
foo3 x = x
{-# NOINLINE foo3 #-}
{-# RULES "foo3" forall x. foo3 x = x #-}
| urbanslug/ghc | testsuite/tests/simplCore/should_compile/T6082-RULE.hs | bsd-3-clause | 278 | 0 | 5 | 67 | 36 | 23 | 13 | 9 | 1 |
module LilRender.Image.STB (stbLoadImage, stbWritePNG, stbWriteBMP, stbWriteTGA) where
import LilRender.Color
import LilRender.Image.Immutable
import qualified Data.Vector.Storable as V
import Foreign.C
import Foreign.ForeignPtr
import Foreign.Marshal
import Foreign.Ptr
import Foreign.Storable
foreign import cca... | SASinestro/lil-render | src/LilRender/Image/STB.hs | isc | 2,632 | 0 | 13 | 530 | 853 | 411 | 442 | 52 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Y2016.M11.D08.Solution where
import qualified Data.ByteString.Lazy.Char8 as BL
import Data.Maybe (fromJust)
-- below import available from cabal (aeson)
import Data.Aeson
{--
So, last week we looked at a graph of twitter-users. NOICE! If you look at the
source code that gen... | geophf/1HaskellADay | exercises/HAD/Y2016/M11/D08/Solution.hs | mit | 2,314 | 0 | 9 | 377 | 128 | 77 | 51 | 11 | 1 |
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad
import Data.Maybe
import qualified Data.Text.Lazy as TL
import qualified Data.Text.Lazy.Encoding as TLE
import Options.Applicative
import Path
import System.Directory
import System.Process hiding (cwd)
import System.Exit
import Network.WebSockets
import AIChalle... | ethercrow/ai-challenger | remote-play/RemotePlay.hs | mit | 3,262 | 0 | 24 | 1,133 | 862 | 422 | 440 | 83 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Graphics.UI.FLTK.LowLevel.FL as FL
import Graphics.UI.FLTK.LowLevel.Fl_Types
import Graphics.UI.FLTK.LowLevel.FLTKHS
buttonCb :: Ref Button -> IO ()
buttonCb b' = do
l' <- getLabel b'
if (l' == "Hello world")
then setLabel b' "Goodbye world"... | deech/fltkhs-hello-world | src/hello-world.hs | mit | 795 | 0 | 14 | 185 | 298 | 151 | 147 | 29 | 2 |
{-# LANGUAGE DeriveGeneric, GeneralizedNewtypeDeriving, OverloadedStrings #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
module Imvu.Network.IstatdClient.Types
( Name
, Packet (..)
, PacketType (..)
, nameFromBytes
, bytesFromName
) where
import Control.DeepSeq (NFData)
import Data.Hashable (Has... | imvu-open/hs-istatd-client | Imvu/Network/IstatdClient/Types.hs | mit | 2,527 | 0 | 11 | 570 | 690 | 384 | 306 | 78 | 3 |
module Parser where
import Diagrams
import Text.Parsec
import Text.Parsec.String
-- keywords = ["assign", "deref", "new", "while", "ifzero"]
-- keyword :: Parser String
-- keyword = choice $ map string keywords
ident :: Parser String
ident = (:) <$> letter <*> many alphaNum
number :: ... | nightuser/summer-school-on-game-semantics-sra-compiler | app/Parser.hs | mit | 1,703 | 0 | 13 | 418 | 438 | 239 | 199 | 43 | 1 |
module Acronyms where
getAcronym xs = [ x | x <- xs, elem x ['A'..'Z'] ]
main :: IO ()
main = do
putStrLn ( getAcronym "Three Letter Acronym" )
putStrLn ( getAcronym "National Aeronautics and Space Administration" )
| Lyapunov/haskell-programming-from-first-principles | chapter_9/acronyms.hs | mit | 224 | 0 | 9 | 47 | 76 | 38 | 38 | 6 | 1 |
module InfoSpec (spec) where
import Test.Hspec
import System.Process
import Info (formatInfo)
import Interpreter (ghc)
spec :: Spec
spec = do
describe "formatInfo" $ do
it "formats --info output" $ do
info <- readProcess ghc ["--info"] ""
formatInfo (read in... | sol/doctest | test/InfoSpec.hs | mit | 340 | 0 | 16 | 103 | 100 | 53 | 47 | 11 | 1 |
-- Problems/Problem015.hs
module Problems.Problem015 (p15) where
import Helpers.Numbers
main = print p15
p15 :: Integer
p15 = fact 40 `div` (fact 20 * fact 20)
| Sgoettschkes/learning | haskell/ProjectEuler/src/Problems/Problem015.hs | mit | 163 | 0 | 8 | 28 | 57 | 32 | 25 | 5 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Lamb... | lambdacms/lambdacms.org | lambdacmsorg-tutorial/LambdaCmsOrg/Tutorial/Models.hs | mit | 766 | 0 | 8 | 246 | 96 | 58 | 38 | 17 | 0 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.SVGAnimatedNumberList
(js_getBaseVal, getBaseVal, js_getAnimVal, getAnimVal,
SVGAnimatedNumberList, castToSVGAnimatedNumberList,
gTypeSVGAnimatedNumberList)
where
import Prelude ((.),... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/SVGAnimatedNumberList.hs | mit | 1,958 | 12 | 11 | 252 | 471 | 287 | 184 | 33 | 1 |
module Language.Erlang.Algebra where
import Language.Erlang.Syntax
data ErlangAlgebra
pr -- 1. result for program
at -- 2. result for attribute
fn -- 3. result for function
bv -- 4. result for basic value
iop -- 5. result for infix op
exp -- 6. result for expressions
mat -- 7. result for m... | arnihermann/timedreb2erl | src/Language/Erlang/Algebra.hs | mit | 1,929 | 0 | 14 | 554 | 656 | 403 | 253 | 66 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeOperators #-}
module DSL
( FuckDSL(..)
, module Fuckdown
) where
import Coproduct
import Fuckdown
-- | The Brainfuck DSL as a functor coproduct of the different actions
-- available... | djeik/fuckdown2 | src/DSL.hs | mit | 1,159 | 0 | 15 | 351 | 299 | 163 | 136 | 35 | 0 |
{-# LANGUAGE PackageImports #-}
{-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-}
-- | Reexports "Control.Monad.Compat"
-- from a globally unique namespace.
module Control.Monad.Compat.Repl (
module Control.Monad.Compat
) where
import "this" Control.Monad.Compat
| haskell-compat/base-compat | base-compat/src/Control/Monad/Compat/Repl.hs | mit | 284 | 0 | 5 | 31 | 28 | 21 | 7 | 5 | 0 |
{-# LANGUAGE OverloadedStrings,FlexibleInstances,QuasiQuotes,TemplateHaskell #-}
module Main where
import Prelude hiding(catch,lookup)
import Control.Applicative ((<$>))
import Control.Monad (liftM)
import Control.Exception
import Data.Foldable (fold)
import Data.Monoid (mappend,mempty)
import Data.Text
import Data.Ti... | joker1007/github-push-reporter | src/Main.hs | mit | 5,260 | 0 | 20 | 1,036 | 1,780 | 921 | 859 | 112 | 3 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module ReactHaskell.Types where
import Data.Aeson
import Database.PostgreSQL.Simple.FromRow
import Database.PostgreSQL.Simple.ToField
import Database.PostgreSQL.Simple.ToRow
data Todo = Todo
{ todoId ... | sestrella/react-haskell | src/ReactHaskell/Types.hs | mit | 915 | 0 | 9 | 312 | 206 | 114 | 92 | 23 | 0 |
module BlocVoting.Tally.Vote where
import BlocVoting.Tally.Voter
data Vote = Vote {
voteScalar :: Int
, voter :: Voter
, height :: Integer
, superseded :: Bool
}
deriving (Show, Eq)
| XertroV/blocvoting | src/BlocVoting/Tally/Vote.hs | mit | 196 | 0 | 8 | 43 | 57 | 36 | 21 | 8 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Data.API.CrunchBase.Person
( Person(..)
, Degree(..)
, Relationship(..)
, Milestone(..)
, Investment(..)
) where
import Data.API.CrunchBase.Response
import Data.API.CrunchBase.PersonQuery (PersonPermalink(..))
import qualified Data.API... | whittle/crunchbase | Data/API/CrunchBase/Person.hs | mit | 5,526 | 0 | 52 | 2,493 | 1,122 | 624 | 498 | 118 | 1 |
module Encode
( packWithEncoding
, unpackWithEncoding
, fromStrict' ) where
import Data.Text.Encoding
import qualified Data.Text as T
import qualified Data.ByteString as P (ByteString) -- type name only
import qualified Data.ByteString as S
import qualified Data.ByteString.Internal as S
import qualified Data.Byt... | cosmo0920/file-monitor-hs | Encode.hs | mit | 1,195 | 0 | 9 | 176 | 215 | 139 | 76 | 22 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-docdb-dbcluster.html
module Stratosphere.Resources.DocDBDBCluster where
import Stratosphere.ResourceImports
im... | frontrowed/stratosphere | library-gen/Stratosphere/Resources/DocDBDBCluster.hs | mit | 9,040 | 0 | 14 | 968 | 1,551 | 875 | 676 | 100 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
module Keystone.Web.Project.Types
where
import Data.Data (Typeable)
data ProjectCreateRequest = ProjectCreateRequest
{ description :: Maybe String
, domainId :: Maybe String
, name :: String
... | VictorDenisov/keystone | src/Keystone/Web/Project/Types.hs | gpl-2.0 | 440 | 0 | 9 | 186 | 84 | 49 | 35 | 9 | 0 |
module Text.Pit.Types (
-- general compiler data
Message,
showMessage,
-- Lexer
TokenType(..),
Token,
getTokenType,
getTokenPosition,
-- Parser
Term(..),
Definition(..),
Statement(..),
showTerm,
showDefinitio... | ShabbyX/pit | src/Text/Pit/Types.hs | gpl-2.0 | 8,287 | 0 | 20 | 2,653 | 1,904 | 1,025 | 879 | 113 | 6 |
{-# LANGUAGE Arrows, FlexibleContexts, NoMonomorphismRestriction, RankNTypes, TypeOperators #-}
{- The Muddy Children puzzle in circuits.
- Copyright : (C)opyright 2009-2011 peteg42 at gmail dot com
- License : GPL (see COPYING for details)
-
- ghci -package ADHOC MuddyChildren_clock.hs
-
- dot kautos
- ... | peteg/ADHOC | Apps/MuddyChildren/MuddyChildren_clock.hs | gpl-2.0 | 3,937 | 7 | 18 | 728 | 719 | 394 | 325 | -1 | -1 |
module ProgramOptions
(
getHomeDir,
checkHomeDir
)
where
import System.Environment
import System.Directory
import System.FilePath
getHomeDir :: IO FilePath
getHomeDir = do
userHomeDir <- getHomeDirectory
return $ userHomeDir </> ".SrcGen"
checkHomeDir :: IO ()
checkHomeDir = do
homeDir... | thomkoehler/SrcGen | src/ProgramOptions.hs | gpl-2.0 | 390 | 0 | 8 | 92 | 88 | 46 | 42 | 15 | 1 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Unittests for ganeti-htools.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 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 Sof... | kawamuray/ganeti | test/hs/Test/Ganeti/OpCodes.hs | gpl-2.0 | 31,072 | 0 | 50 | 9,172 | 5,525 | 2,780 | 2,745 | 543 | 2 |
-- taken from RosettaCode
-- http://rosettacode.org/wiki/Hostname#Haskell
module GetHostname where
import Foreign.Marshal.Array ( allocaArray0, peekArray0 )
import Foreign.C.Types ( CInt(..), CSize(..) )
import Foreign.C.String ( CString, peekCString )
import Foreign.C.Error ( throwErrnoIfMinus1_ )
getHostname ::... | obreitwi/dotfiles_desktop | xmonad/lib/GetHostname.hs | gpl-2.0 | 584 | 0 | 14 | 92 | 154 | 86 | 68 | 13 | 1 |
module Logic.PropositionalLogic.ResolutionSpec (spec) where
import Prelude
import Control.Monad (replicateM)
import Data.Text.Arbitrary
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.Quick... | NorfairKing/the-notes | test/Logic/PropositionalLogic/ResolutionSpec.hs | gpl-2.0 | 1,325 | 0 | 12 | 458 | 320 | 170 | 150 | 32 | 1 |
{- |
Module : $Header$
Description : abstract syntax for CASL_DL logic extension of CASL
Copyright : (c) Klaus Luettich, Dominik Luecke, Uni Bremen 2004-2008
License : GPLv2 or higher, see LICENSE.txt
Maintainer : luecke@informatik.uni-bremen.de
Stability : provisional
Portability : portable
Abst... | nevrenato/HetsAlloy | CASL_DL/AS_CASL_DL.der.hs | gpl-2.0 | 2,100 | 0 | 10 | 525 | 262 | 150 | 112 | 28 | 1 |
import Control.Parallel
import Control.Monad
import Text.Printf
cutoff = 35
fib' :: Int -> Integer
fib' 0 = 0
fib' 1 = 1
fib' n = fib' (n-1) + fib' (n-2)
fib :: Int -> Integer
fib n | n < cutoff = fib' n
| otherwise = r `par` (l `pseq` l + r)
where
l = fib (n-1)
r = fib (n-2)
main = forM_ [0..45... | limonheiro/OS | ex/haskel_fib.hs | gpl-3.0 | 374 | 0 | 9 | 113 | 203 | 106 | 97 | 15 | 1 |
module Main where
main = do
print "" | antonpetkoff/learning | haskell/fmi-fp/lambda.hs | gpl-3.0 | 43 | 0 | 7 | 14 | 15 | 8 | 7 | 3 | 1 |
module Problems46thru50Spec where
import Test.Hspec
import Problems46thru50
spec :: Spec
spec = do
it "can generate a predicate table for a given logical expression in 2\
\variables" $ do
let expected = unlines ["True True True"
,"True False True"
... | zcesur/h99 | tests/Problems46thru50Spec.hs | gpl-3.0 | 1,665 | 0 | 22 | 678 | 339 | 190 | 149 | 33 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-apps-reseller/gen/Network/Google/Resource/Reseller/Subscriptions/List.hs | mpl-2.0 | 4,812 | 0 | 17 | 1,117 | 657 | 384 | 273 | 95 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.AdExchangeBuyer2.Types
-- Copyright : (c) 2015-2016 Br... | brendanhay/gogol | gogol-adexchangebuyer2/gen/Network/Google/AdExchangeBuyer2/Types.hs | mpl-2.0 | 22,654 | 0 | 7 | 5,511 | 2,447 | 1,708 | 739 | 673 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-games/gen/Network/Google/Resource/Games/Players/List.hs | mpl-2.0 | 4,636 | 0 | 18 | 1,149 | 673 | 390 | 283 | 96 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-compute/gen/Network/Google/Resource/Compute/GlobalAddresses/List.hs | mpl-2.0 | 7,060 | 0 | 19 | 1,509 | 756 | 452 | 304 | 108 | 1 |
-- This file is part of purebred
-- Copyright (C) 2019 Fraser Tweedale
--
-- purebred 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 version 3 of the License, or
-- (at your option) any later ... | purebred-mua/purebred | src/Purebred/Types/IFC.hs | agpl-3.0 | 2,177 | 0 | 12 | 449 | 273 | 161 | 112 | 22 | 1 |
module StringUtils where
import Data.Text
import Text.Regex.Posix
trimws :: String -> IO String
trimws = return . unpack . Data.Text.strip . pack
pattern = "[\\ \\t]*\\/\\/[\\ \\t]*((TODO|NOTE)\\([a-zA-Z,\\ \\t\\[\\]]*\\)\\:| \\-)"
isNote :: String -> Bool
isNote str = str =~ pattern
| SteamPoweredAnimal/TaskL | StringUtils.hs | lgpl-3.0 | 289 | 0 | 7 | 44 | 76 | 42 | 34 | 8 | 1 |
module Syntax where
import Data.Set (union)
import qualified Data.Set as S
-- data Ty = Nat | Arr Ty Ty
-- deriving Show
type Op = String
type SymName = String
data Expr = Num Int
| Var SymName
| App Expr Expr
| Lam SymName Expr
| BinOp Op Expr Expr
| Let SymName ... | scturtle/turtlelang | Syntax.hs | unlicense | 784 | 0 | 10 | 265 | 325 | 173 | 152 | 22 | 7 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Openshift.V1beta1.ScaleSpec where
import GHC.Generics
import qualified Data.Aeson
-- | describes the attributes of a scale subresource
data Sc... | minhdoboi/deprecated-openshift-haskell-api | openshift/lib/Openshift/V1beta1/ScaleSpec.hs | apache-2.0 | 541 | 0 | 9 | 80 | 78 | 47 | 31 | 13 | 0 |
-- Copyright 2014 (c) Diego Souza <dsouza@c0d3.xxx>
--
-- 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 applicabl... | locaweb/leela | src/warpdrive/src/Leela/Data/Timeout.hs | apache-2.0 | 2,323 | 0 | 14 | 543 | 617 | 322 | 295 | 51 | 1 |
{-# LANGUAGE NamedFieldPuns, RecordWildCards, DeriveDataTypeable #-}
module HEP.Physics.MSSM.SLHA where
import qualified Data.ByteString as B
import Crypto.Classes
import Data.Digest.Pure.MD5
import Data.Typeable
import Data.Data
data SLHA = SLHA {
slhaContent :: B.ByteString
} deriving (Show,Typeable,Data... | wavewave/MSSMType | src/HEP/Physics/MSSM/SLHA.hs | bsd-2-clause | 2,055 | 0 | 9 | 686 | 98 | 59 | 39 | 12 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Renewal.Types ( renewalApi )
import Servant.JS
import Servant.JS.JQuery
import System.Environment ( getArgs )
main :: IO ()
main = do
[out] <- getArgs
let def = defCommonGeneratorOptions
writeJSForAPI renewalApi (jqueryWith (def { urlPrefix = "/api" ... | kevin-li-195/books | gen-client/Main.hs | bsd-3-clause | 328 | 0 | 12 | 55 | 97 | 54 | 43 | 11 | 1 |
{-# LANGUAGE CPP, MagicHash, NondecreasingIndentation, TupleSections,
RecordWildCards #-}
{-# OPTIONS -fno-cse #-}
-- -fno-cse is needed for GLOBAL_VAR's to behave properly
-----------------------------------------------------------------------------
--
-- GHC Interactive User Interface
--
-- (c) The GHC ... | AlexanderPankiv/ghc | ghc/InteractiveUI.hs | bsd-3-clause | 131,151 | 12 | 103 | 37,850 | 32,192 | 15,998 | 16,194 | -1 | -1 |
--------------------------------------------------------------------------------
-- Copyright © 2011 National Institute of Aerospace / Galois, Inc.
--------------------------------------------------------------------------------
-- | if-then-else.
{-# LANGUAGE Trustworthy #-}
module Copilot.Language.Operators.Mux
... | leepike/copilot-language | src/Copilot/Language/Operators/Mux.hs | bsd-3-clause | 1,016 | 0 | 9 | 135 | 205 | 112 | 93 | 15 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Database.Bloodhound.Internal.Query
( module X
, module Database.Bloodhound.Internal.Query
) where
import Bloodhound.Import
import Control.Monad.Fail (M... | bitemyapp/bloodhound | src/Database/Bloodhound/Internal/Query.hs | bsd-3-clause | 64,896 | 0 | 59 | 21,405 | 13,834 | 7,281 | 6,553 | 1,374 | 16 |
module Text.ParserCombinators.UU.TyErr
( module Text.ParserCombinators.UU.TyErr.Core
, module Text.ParserCombinators.UU.TyErr.Derived
) where
import Text.ParserCombinators.UU.TyErr.Core
import Text.ParserCombinators.UU.TyErr.Derived
| carlostome/uu-parsinglib-tyerr | src/Text/ParserCombinators/UU/TyErr.hs | bsd-3-clause | 241 | 0 | 5 | 22 | 44 | 33 | 11 | 5 | 0 |
{-# LANGUAGE OverloadedStrings #-}
module Network.SSH.Client.SimpleSSH
( -- * Data types
SimpleSSHError(..)
, SimpleSSH
, Session
, Result(..)
, ResultExit(..)
-- * Main functions
, runSimpleSSH
, withSessionPassword
, withSessionKey
, execCommand
, sendFile
-- * Lower-level functions
, o... | jprider63/simplessh-modified | src/Network/SSH/Client/SimpleSSH.hs | bsd-3-clause | 9,089 | 0 | 15 | 2,519 | 1,742 | 872 | 870 | 179 | 3 |
module ReadOnly.EqualitySpec (main, spec) where
import Test.Hspec
import Test.QuickCheck
import PolyGraph.Common
import PolyGraph.Buildable
import PolyGraph.Buildable.Properties
import PolyGraph.Common.PropertySupport
import qualified PolyGraph.ReadOnly.Graph.Properties as GProps
import qualified PolyGraph.ReadOnly.D... | rpeszek/GraphPlay | test/ReadOnly/EqualitySpec.hs | bsd-3-clause | 2,331 | 0 | 19 | 675 | 541 | 293 | 248 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Run where
import Control.Lens
import Control.Monad.Logger
import Control.Monad.Reader
import qualified Data.Text as Text
import qualified Data.Text.Encoding ... | nejla/auth-service | service/src/Run.hs | bsd-3-clause | 4,508 | 0 | 23 | 1,529 | 1,074 | 562 | 512 | -1 | -1 |
{-# LANGUAGE TypeSynonymInstances,
FlexibleInstances,
FlexibleContexts #-}
module Obsidian.MonadObsidian.Tools where
import Control.Monad.State
import Obsidian.MonadObsidian.Exp
import Obsidian.MonadObsidian.IC
import Obsidian.MonadObsidian.Types
import Obsidian.MonadObsidian.GPUMonad
im... | svenssonjoel/MonadObsidian | Obsidian/MonadObsidian/Tools.hs | bsd-3-clause | 4,757 | 0 | 13 | 1,460 | 1,538 | 809 | 729 | 86 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE KindSignatures #-}
module System.DirWatch.PreProcessor (
PreProcessor
, PreProcessorT
, runPreProcessor
, getTime
, getLbs
, yieldSource
, yieldConduit
, yieldFilePath
, yieldFileName
, (=>=)
) where
impo... | meteogrid/dropdirwatch | src/System/DirWatch/PreProcessor.hs | bsd-3-clause | 3,045 | 0 | 16 | 507 | 938 | 512 | 426 | 77 | 1 |
{-# LANGUAGE TypeFamilies, OverloadedStrings #-}
module Main(main) where
import Theory
import Dirs
import SolutionMap
import TaskGroup
import SiteState
import StorageBackend
import Control.Monad
import Control.Exception
import Data.List
import Data.Text (Text)
import qualified Data.Text as Text
import quali... | GaloisInc/verification-game | web-prover/exes/MakeReport.hs | bsd-3-clause | 4,562 | 0 | 26 | 1,953 | 1,261 | 654 | 607 | -1 | -1 |
{- SVM main implementation area -}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE RankNTypes #-}
module Numeric.Algorithms.HSVO.SVM where
import Numeric.Algorithms.HSVO.Detail
import Numeric.Algorithms.HSVO.Types
import Control.Lens
import ... | johnny555/HSVO | src/Numeric/Algorithms/HSVO/SVM.hs | bsd-3-clause | 10,870 | 1 | 15 | 2,398 | 2,771 | 1,444 | 1,327 | -1 | -1 |
module Procfile.Types where
-- | Procfile, that consists of a list of `App`s.
type Procfile = [App]
-- | An environmental variable.
type Env = (String, String)
-- | An app in `Procfile`.
data App = App { name :: String
, cmd :: String
} deriving (Eq,Ord,Show)
| fujimura/houseman | src/Procfile/Types.hs | bsd-3-clause | 294 | 0 | 8 | 82 | 66 | 42 | 24 | 6 | 0 |
module Compile (compile) where
import Control.Monad.State hiding (State)
import Data.List
import Language.C
import Language.C.Data.Ident
import Error
import Model hiding (CInteger)
import qualified Model as M
import Utils
-- | Compiles a program to a model for analysis.
compile :: CTranslUnit -> IO Model
compile uni... | tomahawkins/afv | src/Compile.hs | bsd-3-clause | 12,002 | 0 | 22 | 3,371 | 4,711 | 2,309 | 2,402 | 264 | 30 |
module Web.EmbedThis.ServiceConfig where
| rtrvrtg/embed-this | src/Web/EmbedThis/ServiceConfig.hs | bsd-3-clause | 42 | 0 | 3 | 4 | 7 | 5 | 2 | 1 | 0 |
module Text.EBNF (syntax) where
import Text.EBNF.Informal (syntax)
main :: IO()
main = putStrLn "this library is queer"
| Lokidottir/ebnf-bff | src/Text/EBNF.hs | mit | 122 | 0 | 6 | 19 | 40 | 23 | 17 | 4 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE... | ababkin/qmuli | tests/Qi/Test/Ipret.hs | mit | 5,537 | 0 | 15 | 1,493 | 1,486 | 814 | 672 | 161 | 11 |
module Main (main) where
-- | Run quickly with `make test`
-- Framework
import Test.Framework (Test, defaultMain)
import Test.Framework.Providers.QuickCheck2 (testProperty)
-- Module Tests
import qualified Codec.Encryption.Historical.Caesar.Test as Caesar
import qualified Codec.Encryption.Hi... | beni55/Historical-Cryptography | TestSuite.hs | mit | 746 | 0 | 11 | 159 | 169 | 110 | 59 | 15 | 1 |
--
--
--
-----------------
-- Exercise 5.15.
-----------------
--
--
--
module E'5'15 where
-- GHCi> [0, 0.1 .. 1]
-- [0.0, 0.1, 0.2, 0.30000000000000004, 0.4000000000000001, 0.5000000000000001, 0.6000000000000001, 0.7000000000000001, 0.8, 0.9, 1.0]
-- Floating point issues (see IEEE 754 documentation, Haskell docu... | pascal-knodel/haskell-craft | _/links/E'5'15.hs | mit | 390 | 0 | 2 | 63 | 18 | 17 | 1 | 1 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
-- ... | fmapfmapfmap/amazonka | amazonka-cloudfront/gen/Network/AWS/CloudFront/CreateStreamingDistribution.hs | mpl-2.0 | 5,788 | 0 | 14 | 1,043 | 689 | 412 | 277 | 89 | 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="sr-SP">
<title>SOAP Scanner | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapre... | veggiespam/zap-extensions | addOns/soap/src/main/javahelp/org/zaproxy/zap/extension/soap/resources/help_sr_SP/helpset_sr_SP.hs | apache-2.0 | 974 | 80 | 66 | 160 | 415 | 210 | 205 | -1 | -1 |
{-# LANGUAGE TemplateHaskell, BangPatterns #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Unittests for ganeti-htools.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the fo... | mbakke/ganeti | test/hs/Test/Ganeti/Query/Query.hs | bsd-2-clause | 16,613 | 0 | 24 | 4,252 | 4,099 | 2,115 | 1,984 | 289 | 8 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.Config
-- Copyright : (c) David Himmelstrup 2005
-- License : BSD-like
--
-- Maintainer : lemmih@gmail.com
-- Stability : provisional
-- Portability : portable
--
-... | seereason/cabal | cabal-install/Distribution/Client/Config.hs | bsd-3-clause | 39,041 | 0 | 25 | 10,505 | 8,107 | 4,366 | 3,741 | 702 | 9 |
module Language.Mecha.Viewer
( viewer
) where
import Control.Monad
import Graphics.Rendering.OpenGL
import Graphics.UI.SDL hiding (init, Color)
import qualified Graphics.UI.SDL as SDL
import Language.Mecha.OpenGL
data State = State
{ leftButton
, middleButton
, rightButton :: Bool
, theta
, phi
, sc... | tomahawkins/mecha | attic/Viewer.hs | bsd-3-clause | 6,282 | 0 | 16 | 1,759 | 2,028 | 997 | 1,031 | 172 | 12 |
module Timer (
Timer
, startTimer
, stopTimer
, getPOSIXTime
) where
import Control.Concurrent
import Control.Monad (when)
import Data.Time.Clock.POSIX
newtype Timer = Timer (MVar Bool)
-- | Start a timer.
--
-- Call given action repeatedly with the passed time since the timer has bee... | haasn/vimus | src/Timer.hs | mit | 1,629 | 0 | 16 | 461 | 415 | 214 | 201 | 33 | 1 |
{-# LANGUAGE PatternGuards, TemplateHaskell, QuasiQuotes #-}
-- |
-- Module : Language.C.Inline.C.Marshal
-- Copyright : [2013] Manuel M T Chakravarty
-- License : BSD3
--
-- Maintainer : Manuel M T Chakravarty <chak@cse.unsw.edu.au>
-- Stability : experimental
-- Portability : non-portable (GHC extensio... | beni55/language-c-inline | Language/C/Inline/C/Marshal.hs | bsd-3-clause | 19,319 | 14 | 20 | 7,462 | 3,617 | 2,142 | 1,475 | 285 | 8 |
{-# LANGUAGE TemplateHaskell, TypeOperators, MultiParamTypeClasses,
FlexibleInstances, FlexibleContexts, UndecidableInstances, GADTs,
ConstraintKinds #-}
--------------------------------------------------------------------------------
-- |
-- Module : Examples.Multi.Desugar
-- Copyright : (c) 2011 Patrick ... | spacekitteh/compdata | examples/Examples/Multi/Desugar.hs | bsd-3-clause | 3,046 | 0 | 13 | 814 | 528 | 305 | 223 | 31 | 1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1993-1998
\section[WwLib]{A library for the ``worker\/wrapper'' back-end to the strictness analyser}
-}
{-# LANGUAGE CPP #-}
module ETA.StrAnal.WwLib ( mkWwBodies, mkWWstr, mkWorkerArgs
, deepSplitProductType_maybe, findTypeShape
) where
#include "HsV... | alexander-at-github/eta | compiler/ETA/StrAnal/WwLib.hs | bsd-3-clause | 32,006 | 0 | 15 | 9,473 | 3,898 | 2,135 | 1,763 | 264 | 2 |
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.ByteString.Lazy.Char8 as B
import System.IO
import Data.Aeson
import System.Environment
import Examples
assignment :: ToJSON a => B.ByteString -> a -> B.ByteString
assignment varname value = B.concat [ varname, " = ", encode value, ";"]
main = do
args <... | psibi/incredible | logic/examples/bundle-examples.hs | mit | 524 | 0 | 14 | 124 | 145 | 76 | 69 | 15 | 2 |
{-# OPTIONS_GHC -Wall #-}
module Canonicalize.Environment where
import qualified Data.List as List
import qualified Data.Map as Map
import qualified Data.Maybe as Maybe
import qualified Data.Set as Set
import AST.Expression.General (saveEnvName)
import qualified AST.Module.Name as ModuleName
import qualified AST.Patt... | laszlopandy/elm-compiler | src/Canonicalize/Environment.hs | bsd-3-clause | 3,454 | 0 | 15 | 859 | 1,153 | 629 | 524 | 92 | 4 |
-- Copyright : Daan Leijen (c) 1999, daan@cs.uu.nl
-- HWT Group (c) 2003, haskelldb-users@lists.sourceforge.net
-- License : BSD-style
module Opaleye.SQLite.Internal.HaskellDB.Sql.Generate (SqlGenerator(..)) where
import Opaleye.SQLite.Internal.HaskellDB.PrimQuery
import Opaleye.SQLite.Internal... | bergmark/haskell-opaleye | opaleye-sqlite/src/Opaleye/SQLite/Internal/HaskellDB/Sql/Generate.hs | bsd-3-clause | 889 | 0 | 13 | 205 | 155 | 99 | 56 | 11 | 0 |
import System.IO (hFlush, stdout)
import Control.Monad (mapM)
import Control.Monad.Except (runExceptT)
import Control.Monad.Trans (liftIO)
import qualified Data.Map as Map
import qualified Data.Traversable as DT
import Readline (readline, load_history)
import Types
import Reader (read_str)
import Printer (_pr_str)
imp... | 0gajun/mal | haskell/step3_env.hs | mpl-2.0 | 3,548 | 0 | 18 | 1,011 | 1,432 | 701 | 731 | 98 | 5 |
{-# LANGUAGE CPP, DeriveGeneric #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Program.Find
-- Copyright : Duncan Coutts 2013
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : portable
--
-- A somewhat extended notion of the ... | tolysz/prepare-ghcjs | spec-lts8/cabal/Cabal/Distribution/Simple/Program/Find.hs | bsd-3-clause | 6,915 | 0 | 22 | 1,567 | 1,193 | 648 | 545 | 94 | 9 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
module Data.Extensible.Embeddable w... | jadaska/extensible-sp | src/Data/Extensible/Embeddable.hs | mit | 2,290 | 0 | 10 | 494 | 894 | 479 | 415 | 49 | 0 |
module Handlers.LegacyPlayoffs
( getLegacyPlayoffsR
) where
import Hockey.Database
import Hockey.Environment
import Hockey.Types (Season(..))
import Models.LegacyJson
import Yesod
getLegacyPlayoffsR :: HandlerT site IO Value
getLegacyPlayoffsR =
liftIO $ do
e <- env
p <- selectPeriods (database e) (year... | petester42/haskell-hockey | web/Handlers/LegacyPlayoffs.hs | mit | 532 | 0 | 11 | 101 | 189 | 95 | 94 | 16 | 1 |
import Language
import Heap
import Parser
import Compiler
import Data.List (partition)
import Data.Either (partitionEithers)
import System.Environment
import System.Exit
import System.FilePath.Posix
options = [("tco", TCO)
,("O0", OZ)
]
parseArg :: String -> Either String Option
parseArg ('-':op) ... | jmct/IterativeCompiler | frontend/frontend.hs | mit | 1,112 | 0 | 12 | 255 | 394 | 207 | 187 | 30 | 1 |
module Geometry.Sphere
( volume
, area
) where
volume :: Floating a => a -> a
volume r = 4/3 * pi * r^3
area :: Floating a => a -> a
area r = 4 * pi * r^2 | RAFIRAF/HASKELL | Geometry/Sphere.hs | mit | 158 | 0 | 8 | 43 | 90 | 47 | 43 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-------------------------------------------------------------------------------
-- |
-- Module : Correct.Core.hs
-- Note :
--
-- A simple spelling corrector, based off of
-- http://norvig.com/spell-correct.html
-------------------------------------------------------------... | danielcnorris/haskell-spelling-corrector | src/Correct/Core.hs | mit | 4,624 | 0 | 22 | 1,525 | 1,226 | 682 | 544 | 83 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.